@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap");

:root {
    --font-primary:
        "Plus Jakarta Sans", -apple-system, blinkmacsystemfont, "Segoe UI",
        roboto, sans-serif;

    /* Premium Color Palette */
    --bg-deep: #080b11;
    --bg-main: #0c101b;
    --bg-card: rgb(17 25 40 / 75%);
    --bg-card-hover: rgb(23 33 53 / 85%);
    --bg-glass: rgb(12 16 27 / 60%);
    --border-glow: rgb(99 102 241 / 15%);
    --border-glass: rgb(255 255 255 / 6%);
    --border-glass-focus: rgb(99 102 241 / 40%);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Neon Accents */
    --accent-indigo: #6366f1;
    --accent-violet: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-gradient: linear-gradient(
        135deg,
        #6366f1 0%,
        #a855f7 50%,
        #06b6d4 100%
    );
    --accent-gradient-hover: linear-gradient(
        135deg,
        #4f46e5 0%,
        #9333ea 50%,
        #0891b2 100%
    );
    --success: #10b981;
    --success-bg: rgb(16 185 129 / 15%);
    --danger: #ef4444;
    --danger-bg: rgb(239 68 68 / 15%);
    --warning: #f59e0b;
    --warning-bg: rgb(245 158 11 / 15%);
    --shadow-neon: 0 0 20px rgb(99 102 241 / 15%);
    --shadow-neon-cyan: 0 0 20px rgb(6 182 212 / 20%);
    --shadow-main: 0 10px 30px -10px rgb(0 0 0 / 50%);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-indigo);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Background glows for premium look */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.bg-glow-1 {
    background: var(--accent-violet);
    top: -200px;
    left: -100px;
}

.bg-glow-2 {
    background: var(--accent-cyan);
    bottom: -200px;
    right: -100px;
}

/* LOGIN LAYOUT */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-main), var(--shadow-neon);
    text-align: center;
    animation: fade-in 0.6s ease-out;
}

.login-logo {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 35px;
}

.login-divider {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin: 25px 0;
    letter-spacing: 1px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-glass);
}

.login-divider::before {
    margin-right: 15px;
}

.login-divider::after {
    margin-left: 15px;
}

.g-signin-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

/* DASHBOARD LAYOUT */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

/* SIDEBAR */
.sidebar {
    width: 350px;
    background: rgb(10 14 23 / 85%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 20;
    transition: var(--transition-smooth);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-glass);
}

.sidebar-title-link {
    text-decoration: none;
    display: inline-block;
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-top: 16px;
    padding: 12px;
    background: var(--border-glass);
    border-radius: 16px;
    border: 1px solid rgb(255 255 255 / 2%);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    margin-right: 12px;
    border: 2px solid var(--accent-cyan);
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.sidebar-search {
    padding: 16px 24px;
}

.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 12px 16px 12px 40px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--border-glass-focus);
    box-shadow: 0 0 10px rgb(99 102 241 / 15%);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.places-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}

.places-list {
    list-style: none;
}

.place-item {
    margin-bottom: 8px;
}

.place-link {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.place-link:hover {
    background: rgb(255 255 255 / 2%);
    color: var(--text-primary);
}

.place-link.active {
    background: var(--border-glass);
    border-color: rgb(99 102 241 / 20%);
    color: var(--text-primary);
    box-shadow: inset 0 0 12px rgb(99 102 241 / 5%);
}

.place-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid var(--border-glass);
    background: var(--bg-deep);
}

.place-thumbnail-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    margin-right: 12px;
    background: var(--accent-gradient);
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
}

.place-meta {
    flex: 1;
    overflow: hidden;
}

.place-title {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-coords-muted {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.place-link.active .place-title {
    background: linear-gradient(90deg, #f3f4f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* MAIN CONTENT AREA */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    position: relative;
    z-index: 10;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* STATS CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    padding: 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgb(99 102 241 / 15%);
    box-shadow: var(--shadow-main), var(--shadow-neon);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgb(99 102 241 / 10%);
    border: 1px solid rgb(99 102 241 / 20%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 16px;
    color: var(--accent-indigo);
}

.stat-icon-visits {
    background: rgb(6 182 212 / 10%);
    border: 1px solid rgb(6 182 212 / 20%);
    color: var(--accent-cyan);
}

.stat-icon-revisits {
    background: var(--success-bg);
    border: 1px solid rgb(16 185 129 / 20%);
    color: var(--success);
}

.stat-icon-users {
    background: rgb(139 92 246 / 10%);
    border: 1px solid rgb(139 92 246 / 20%);
    color: var(--accent-violet);
}

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 2px;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    max-width: 600px;
    margin: 40px auto;
    box-shadow: var(--shadow-main);
    animation: fade-in 0.5s ease-out;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: float 4s ease-in-out infinite;
}

.empty-state-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.empty-state-text {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* DETAILED PLACE PANELS */
.place-detail-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
    align-items: start;
    animation: fade-in 0.4s ease-out;
}

@media (width <= 1100px) {
    .place-detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-panel {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-main);
}

.detail-header-img {
    height: 250px;
    position: relative;
    background: var(--bg-deep);
}

.detail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-img-placeholder {
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    font-weight: 800;
}

.detail-header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--overlay-gradient);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.detail-badge {
    background: rgb(6 182 212 / 20%);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: inline-block;
}

.detail-name {
    font-size: 1.6rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgb(0 0 0 / 50%);
}

.detail-actions {
    display: flex;
    gap: 10px;
}

.detail-body {
    padding: 30px;
}

.info-row {
    display: flex;
    margin-bottom: 24px;
    gap: 30px;
}

.info-item {
    flex: 1;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
}

.info-value-mono {
    font-family: monospace;
    font-size: 0.95rem;
    background: var(--bg-deep);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-glass);
    display: inline-block;
}

/* MAP WRAPPER */
.map-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.map-wrapper {
    height: 250px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    box-shadow: inset 0 0 20px rgb(0 0 0 / 50%);
    background: var(--bg-deep);
}

/* Leaflet dark theme fix */
.leaflet-container {
    background: var(--bg-deep) !important;
}

/* VISITS LIST */
.visits-panel,
.stats-panel {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow-main);
}

.card-preview-panel {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow-main);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.card-preview-header .visits-title {
    margin-bottom: 0;
    align-self: flex-start;
}

.visits-badge-gold {
    color: #fbbf24;
    border-color: rgb(251 191 36 / 20%);
}

.card-preview-tabs {
    display: flex;
    gap: 8px;
}

.card-preview-tab-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
}

.card-preview-tab-btn:hover {
    color: var(--text-primary);
    background: rgb(255 255 255 / 3%);
    border-color: rgb(255 255 255 / 15%);
}

.card-preview-tab-btn.active {
    color: var(--text-primary);
    background: rgb(99 102 241 / 10%);
    border-color: var(--accent-indigo);
    box-shadow: var(--shadow-neon);
}

.card-preview-tab-btn[data-rarity="common"].active {
    background: rgb(16 185 129 / 8%);
    border-color: var(--success);
    box-shadow: 0 0 15px rgb(16 185 129 / 15%);
}

.card-preview-tab-btn[data-rarity="rare"].active {
    background: rgb(6 182 212 / 8%);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-neon-cyan);
}

.card-preview-tab-btn[data-rarity="legendary"].active {
    background: rgb(245 158 11 / 8%);
    border-color: var(--warning);
    box-shadow: 0 0 15px rgb(245 158 11 / 15%);
}

.card-preview-container {
    width: 100%;
}

.card-preview-content {
    display: none;
    width: 100%;
    gap: 24px;
    justify-content: center;
    background-color: var(--bg-deep);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    flex-wrap: wrap;
}

.card-preview-content.active {
    display: flex;
}

.card-preview-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 230px;
    width: 100%;
}

.pokemon-card-wrapper {
    width: 100%;
    height: auto;
    box-shadow:
        0 20px 25px -5px rgb(0 0 0 / 30%),
        0 8px 10px -6px rgb(0 0 0 / 30%);
    border-radius: 18px;
    transition: transform var(--transition-fast);
    background-color: #0f172a;
    display: flex;
}

.pokemon-card-wrapper svg {
    width: 100% !important;
    height: auto !important;
    display: block;
}

.pokemon-card-wrapper:hover {
    transform: scale(1.04);
}

.card-preview-side-label {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-generation-error {
    color: var(--text-secondary);
    font-size: 13px;
}

.visits-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.visits-badge {
    background: var(--border-glass);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--accent-cyan);
}

.visits-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.visit-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgb(8 12 21 / 40%);
    border: 1px solid rgb(255 255 255 / 2%);
    border-radius: 14px;
    transition: var(--transition-fast);
}

.visit-item:hover {
    background: rgb(255 255 255 / 1%);
    border-color: var(--border-glass);
}

.visit-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-right: 12px;
    border: 1px solid var(--border-glass);
}

.visit-user-details {
    flex: 1;
    overflow: hidden;
}

.visit-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visit-user-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visit-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
    display: flex;
    flex-direction: column;
}

.visit-date-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.visits-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    background: var(--bg-deep);
    border-radius: 14px;
    border: 1px dashed var(--border-glass);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    gap: 8px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgb(99 102 241 / 20%);
}

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    box-shadow:
        0 4px 20px rgb(99 102 241 / 35%),
        var(--shadow-neon-cyan);
    color: white;
}

.btn-secondary {
    background: var(--border-glass);
    border-color: var(--border-glass);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgb(255 255 255 / 8%);
    border-color: var(--text-secondary);
}

.btn-danger {
    background: var(--danger-bg);
    border-color: rgb(239 68 68 / 30%);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 15px rgb(239 68 68 / 30%);
}

.btn-sm {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-glass-focus);
    box-shadow: 0 0 12px rgb(99 102 241 / 20%);
}

.form-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 4px;
    font-weight: 500;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* MODALS */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgb(6 8 14 / 80%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    width: 100%;
    max-width: 550px;
    max-height: calc(100vh - 60px);
    box-shadow: var(--shadow-main), var(--shadow-neon);
    transform: translateY(30px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-overlay.open .modal-card {
    transform: translateY(0);
}

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* FLASH MESSAGES */
.flash-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
}

.flash-message {
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: var(--shadow-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    animation: slide-in-right 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flash-success {
    background: var(--success-bg);
    border-color: rgb(16 185 129 / 30%);
    color: var(--success);
}

.flash-error {
    background: var(--danger-bg);
    border-color: rgb(239 68 68 / 30%);
    color: var(--danger);
}

.flash-warning {
    background: var(--warning-bg);
    border-color: rgb(245 158 11 / 30%);
    color: var(--warning);
}

.flash-close {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.flash-close:hover {
    opacity: 1;
}

/* KEYFRAMES */
@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* CSS Utilities to eliminate inline styles in Twig templates */
.hidden {
    display: none !important;
}

.w-full {
    width: 100% !important;
}

.justify-center {
    justify-content: center !important;
}

.gap-xs {
    gap: 6px !important;
}

.gap-sm {
    gap: 8px !important;
}

.mt-md {
    margin-top: 15px !important;
}

.mb-md {
    margin-bottom: 25px !important;
}

.mb-lg {
    margin-bottom: 30px !important;
}

.text-muted-center {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

.text-sm {
    font-size: 0.9rem !important;
}

.flex-align-center {
    display: flex;
    align-items: center;
}

.token-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.token-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scrollable-visits {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.modal-text-confirm {
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-text-warning {
    color: var(--danger);
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.qrcode-container {
    background: #fff;
    padding: 20px;
    display: inline-block;
    border-radius: 12px;
    margin-bottom: 20px;
}

#qrcode-canvas {
    max-width: 100%;
    width: 480px;
    height: 480px;
    display: block;
    margin: 0 auto;
}

#modal-qrcode .modal-card {
    max-width: 580px;
}

/* ERROR PAGES */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.error-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-main), var(--shadow-neon);
    text-align: center;
    animation: fade-in 0.6s ease-out;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.error-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.error-message {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* LOGIN BYPASS FORMS & UTILITIES */
.login-bypass-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.login-bypass-form {
    width: 100%;
}

.btn-secondary-border {
    border: 1px solid rgb(255 255 255 / 15%) !important;
}

.campaign-row:hover {
    background: rgb(255 255 255 / 2%) !important;
}

/* REQUEST ACCESS LINK */
.login-request-wrapper {
    margin-top: 25px;
    text-align: center;
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: var(--transition-fast);
    padding: 0;
}

.btn-link:hover {
    color: var(--accent-indigo);
}

/* STATUS BADGES */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: rgb(245 158 11 / 10%) !important;
    color: #f59e0b !important;
    border: 1px solid rgb(245 158 11 / 20%) !important;
}

.badge-approved {
    background: rgb(16 185 129 / 10%) !important;
    color: #10b981 !important;
    border: 1px solid rgb(16 185 129 / 20%) !important;
}

.badge-rejected {
    background: rgb(239 68 68 / 10%) !important;
    color: #ef4444 !important;
    border: 1px solid rgb(239 68 68 / 20%) !important;
}

:root {
    --font-primary: "Outfit", "Inter", sans-serif;

    /* LIGHT MODE Variables (Default) */
    --bg-deep: #f1f5f9; /* Slate-100 */
    --bg-main: #f8fafc; /* Slate-50 */
    --bg-card: rgb(255 255 255 / 90%); /* Clear frosted white card */
    --bg-card-hover: #fff;
    --bg-glass: rgb(255 255 255 / 80%);
    --border-glow: rgb(22 163 74 / 10%);
    --border-glass: rgb(148 163 184 / 18%); /* Visible slate outline */
    --border-glass-focus: #16a34a;
    --text-primary: #0f172a; /* Slate-900 */
    --text-secondary: #475569; /* Slate-600 */
    --text-muted: #64748b; /* Slate-500 */

    /* Light Mode Accents */
    --accent-indigo: #16a34a; /* Forest Green */
    --accent-violet: #d97706; /* Honey Gold */
    --accent-cyan: #10b981; /* Emerald Green */
    --accent-gradient: linear-gradient(135deg, #16a34a 0%, #10b981 100%);
    --accent-gradient-hover: linear-gradient(135deg, #15803d 0%, #059669 100%);
    --shadow-neon: 0 0 25px rgb(22 163 74 / 6%);
    --shadow-neon-cyan: 0 0 25px rgb(217 119 6 / 8%);
    --shadow-main:
        0 15px 30px -10px rgb(15 23 42 / 8%), 0 0 0 1px rgb(15 23 42 / 1%);

    /* Glow colors for light mode */
    --glow-color-1: rgb(134 239 172 / 35%); /* Lime */
    --glow-color-2: rgb(254 240 138 / 35%); /* Honey */
    --sidebar-text: #475569;
    --sidebar-logo-text: #0f172a;
    --overlay-gradient: linear-gradient(
        to top,
        rgb(248 250 252 / 98%) 0%,
        rgb(248 250 252 / 60%) 60%,
        transparent 100%
    );
    --bg-input: rgb(15 23 42 / 4%);
}

/* DARK MODE Overrides */
html[data-theme="dark"] {
    --bg-deep: #05080d; /* Deepest navy-black */
    --bg-main: #090d16; /* Modern dark-slate */
    --bg-card: rgb(13 20 32 / 65%); /* Frosted dark-slate glass */
    --bg-card-hover: rgb(20 31 48 / 80%);
    --bg-glass: rgb(9 13 22 / 70%);
    --border-glow: rgb(16 185 129 / 15%);
    --border-glass: rgb(255 255 255 / 5%); /* fine white outline */
    --border-glass-focus: #10b981;
    --text-primary: #f8fafc; /* Clear off-white */
    --text-secondary: #94a3b8; /* Slate-400 */
    --text-muted: #64748b; /* Slate-500 */

    /* Dark Mode Accents */
    --accent-indigo: #10b981; /* Emerald Green */
    --accent-violet: #f59e0b; /* Honey Gold */
    --accent-cyan: #34d399; /* Mint Green */
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --accent-gradient-hover: linear-gradient(135deg, #059669 0%, #047857 100%);
    --shadow-neon: 0 0 25px rgb(16 185 129 / 12%);
    --shadow-neon-cyan: 0 0 25px rgb(245 158 11 / 10%);
    --shadow-main: 0 30px 60px -20px rgb(0 0 0 / 70%);

    /* Glow colors for dark mode */
    --glow-color-1: rgb(16 185 129 / 20%); /* Emerald */
    --glow-color-2: rgb(245 158 11 / 15%); /* Gold */
    --sidebar-text: rgb(248 250 252 / 70%);
    --sidebar-logo-text: #f8fafc;
    --overlay-gradient: linear-gradient(
        to top,
        rgb(9 13 22 / 98%) 0%,
        rgb(9 13 22 / 60%) 60%,
        transparent 100%
    );
    --bg-input: rgb(8 12 21 / 60%);
}

body {
    background: var(--bg-main) !important;
}

/* Dynamic background glows */
.bg-glow-1 {
    background: radial-gradient(
        circle,
        var(--glow-color-1) 0%,
        transparent 60%
    ) !important;
    display: block !important;
    position: fixed;
    top: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    z-index: 0;
}

.bg-glow-2 {
    background: radial-gradient(
        circle,
        var(--glow-color-2) 0%,
        transparent 60%
    ) !important;
    display: block !important;
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    z-index: 0;
}

/* Frosted glass sidebar */
.sidebar {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-right: 1px solid var(--border-glass) !important;
    z-index: 10;
}

.sidebar .sidebar-logo span {
    color: var(--sidebar-logo-text) !important;
}

.sidebar .nav-link {
    color: var(--sidebar-text) !important;
    border-radius: 16px !important;
    margin: 4px 0 !important;
    font-weight: 500 !important;
}

.sidebar .nav-link:hover {
    background: rgb(22 163 74 / 5%) !important;
    color: #16a34a !important;
}

.sidebar .nav-link.active {
    background: rgb(22 163 74 / 8%) !important;
    color: #16a34a !important;
    font-weight: 600 !important;
    border-left: 3px solid #16a34a !important;
}

.sidebar .sidebar-logo {
    border-bottom: 1px solid var(--border-glass) !important;
}

.sidebar .quota-box {
    background: rgb(22 163 74 / 5%) !important;
    border: 1px solid rgb(22 163 74 / 10%) !important;
    border-radius: 18px !important;
}

.sidebar .quota-title {
    color: #15803d !important;
}

.sidebar .quota-text {
    color: var(--sidebar-text) !important;
}

/* Frosted glass stats cards and panels */
.stats-panel,
.visits-panel,
.detail-panel {
    background: var(--bg-card) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 28px !important;
    padding: 32px !important;
    box-shadow: var(--shadow-main) !important;
    position: relative;
    z-index: 1;
}

/* Stat cards styling */
.stat-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 24px !important;
    padding: 24px !important;
}

.stat-card:hover {
    transform: translateY(-3px) !important;
    border-color: rgb(22 163 74 / 25%) !important;
    box-shadow: var(--shadow-main), var(--shadow-neon) !important;
}

/* Tactile buttons styling */
.btn-primary {
    border-radius: 16px !important;
    font-weight: 600 !important;
}

.btn-secondary {
    border-radius: 16px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-glass) !important;
    color: var(--text-primary) !important;
}

.btn-secondary:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--text-muted) !important;
}

/* Pro badge styles */
.visits-badge {
    border-color: rgb(245 158 11 / 20%) !important;
    color: #f59e0b !important;
}

/* User management dashboard styles */
.user-list-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
    margin-top: 16px;
}

.user-list-table th {
    padding: 14px 12px;
    border-bottom: 2px solid var(--border-glass);
    color: var(--text-secondary);
    font-weight: 700;
}

.user-list-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-primary);
    vertical-align: middle;
}

.user-list-table tbody tr:hover {
    background: rgb(255 255 255 / 2%);
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pagination-links {
    display: flex;
    gap: 8px;
}

/* User list roles and subscription badges */
.badge-god {
    background: rgb(168 85 247 / 10%) !important;
    color: #a855f7 !important;
    border: 1px solid rgb(168 85 247 / 20%) !important;
}

.badge-admin {
    background: rgb(99 102 241 / 10%) !important;
    color: #6366f1 !important;
    border: 1px solid rgb(99 102 241 / 20%) !important;
}

.badge-pro {
    background: rgb(245 158 11 / 10%) !important;
    color: #f59e0b !important;
    border: 1px solid rgb(245 158 11 / 20%) !important;
}

.badge-starter {
    background: rgb(148 163 184 / 10%) !important;
    color: var(--text-secondary) !important;
    border: 1px solid rgb(148 163 184 / 20%) !important;
}

.badge-active {
    background: rgb(16 185 129 / 10%) !important;
    color: #10b981 !important;
    border: 1px solid rgb(16 185 129 / 20%) !important;
}

.badge-inactive {
    background: rgb(239 68 68 / 10%) !important;
    color: #ef4444 !important;
    border: 1px solid rgb(239 68 68 / 20%) !important;
}

.badge-none {
    background: rgb(148 163 184 / 5%) !important;
    color: var(--text-muted) !important;
    border: 1px solid rgb(148 163 184 / 10%) !important;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state span {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 0.95rem;
    font-weight: 500;
}

.table-responsive {
    overflow-x: auto;
}

/* Information Card for Place Stats */
.stats-info-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    background: rgb(59 130 246 / 5%); /* very light blue tint */
    border: 1px solid rgb(59 130 246 / 20%);
    border-radius: 12px;
    margin-bottom: 20px;
}

.stats-info-card-icon {
    font-size: 1.1rem;
    line-height: 1;
    margin-top: 2px;
}

.stats-info-card-content {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.stats-info-card-content strong {
    color: var(--text-primary);
}

/* Delete Account Styles */
.delete-account-title {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 1.5rem;
    text-align: center;
}

.delete-warning-box {
    display: block;
    margin-bottom: 20px;
}

.delete-warning-title {
    display: block;
    margin-bottom: 8px;
}

.delete-warning-text {
    font-size: 0.9rem;
    margin-bottom: 8px;
    opacity: 0.9;
}

.delete-data-list {
    font-size: 0.9rem;
    margin-left: 20px;
    margin-bottom: 0;
    opacity: 0.9;
    text-align: left;
}

.delete-subtitle-box {
    margin-bottom: 24px;
}

.delete-success-box {
    text-align: center;
}

.delete-success-title {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.delete-success-text {
    font-size: 0.95rem;
    margin-bottom: 0;
    opacity: 0.9;
}
