/* grodt hub - styling system */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --white: #ffffff;
    --grey-100: rgba(255,255,255,0.85);
    --grey-300: rgba(255,255,255,0.45);
    --grey-500: rgba(255,255,255,0.25);
    --grey-700: rgba(255,255,255,0.10);
    --border: rgba(255,255,255,0.12);
    --border-bright: rgba(255,255,255,0.30);

    /* simplified liquid glass recipe */
    --glass-bg: rgba(255,255,255,0.04);
    --glass-blur: blur(8px) saturate(120%);
    --glass-border: 1px solid rgba(255,255,255,0.1);
    --glass-shadow: 0 4px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
    --glass-shadow-hover: 0 8px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
}

html, body {
    background: #000;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}



/* ── LAYOUT ── */
#app { position: relative; z-index: 10; min-height: 100vh; display: flex; flex-direction: column; }

/* ── NAV ── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 64px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(32px) saturate(160%);
    -webkit-backdrop-filter: blur(32px) saturate(160%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.04), 0 1px 0 rgba(255,255,255,0.02);
}
.nav-logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.03em;
    color: var(--white);
    text-decoration: none;
}
.nav-logo span { color: var(--grey-300); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-user {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--grey-300);
    font-weight: 600;
}
.nav-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 0 8px rgba(255,255,255,0.7), 0 0 16px rgba(255,255,255,0.3);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
    padding: 6px 16px;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--grey-300);
    text-decoration: none;
    cursor: pointer;
    border-radius: 100px;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
}
.nav-tab:hover { color: var(--white); }
.nav-tab.active {
    color: var(--white);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* ── MAIN ── */
main { flex: 1; padding: 40px 48px 80px; max-width: 1200px; width: 100%; margin: 0 auto; }

/* ── SECTION LABEL ── */
.section-label {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--grey-500);
    font-weight: 600;
    margin-bottom: 16px;
}

/* ── LIQUID GLASS BASE ── */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.glass:hover {
    box-shadow: var(--glass-shadow-hover);
    border-color: rgba(255,255,255,0.22);
}

/* ── STATS ROW ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}
.stat-card {
    border-radius: 20px;
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
}
.stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--white);
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--grey-300);
    font-weight: 500;
}

/* ── LEAD QUEUE ── */
.lead-queue { display: flex; flex-direction: column; gap: 12px; margin-bottom: 48px; }

.lead-card {
    border-radius: 18px;
    padding: 24px 28px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 32px;
    align-items: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.lead-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22) 30%, rgba(255,255,255,0.22) 70%, transparent);
}
.lead-card.claimed {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.22);
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -1px 0 rgba(255,255,255,0.06);
}
.lead-card.claimed::before {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4) 30%, rgba(255,255,255,0.4) 70%, transparent);
}

.lead-info { display: flex; flex-direction: column; gap: 6px; }
.lead-name {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
}
.lead-meta {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey-300);
    font-weight: 500;
}

.lead-contact { display: flex; flex-direction: column; gap: 4px; }
.lead-phone {
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.01em;
}
.lead-address { font-size: 12px; color: var(--grey-300); }
.lead-rating { font-size: 12px; color: var(--grey-300); margin-top: 2px; }
.lead-maps {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey-500);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.2s;
}
.lead-maps:hover { color: var(--grey-300); }

.lead-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* ── GLASS BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}
.btn-glass {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-glass:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.28);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.28);
    transform: translateY(-1px);
}
.btn-solid {
    background: rgba(255,255,255,0.92);
    color: #000;
    box-shadow: 0 4px 20px rgba(255,255,255,0.15), inset 0 1px 0 rgba(255,255,255,1);
}
.btn-solid:hover {
    background: #fff;
    box-shadow: 0 8px 32px rgba(255,255,255,0.25);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--grey-300);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-outline:hover {
    border-color: rgba(255,255,255,0.35);
    color: var(--white);
    transform: translateY(-1px);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--grey-300);
    background: rgba(255,255,255,0.05);
}

/* ── OUTCOME BUTTONS (on claimed card) ── */
.outcome-buttons { display: flex; gap: 8px; margin-top: 8px; }

/* ── ADMIN STATS ── */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}
.admin-stat {
    border-radius: 20px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}
.admin-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}
.admin-stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--white);
    line-height: 1;
    margin-bottom: 6px;
}
.admin-stat-label {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--grey-300);
    font-weight: 600;
}

/* ── TEAM ROWS ── */
.team-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 48px; }
.team-row {
    border-radius: 16px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
}
.team-row::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2) 40%, rgba(255,255,255,0.2) 60%, transparent);
}
.team-left { display: flex; flex-direction: column; gap: 4px; }
.team-name {
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: lowercase;
}
.team-role {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--grey-300);
    font-weight: 600;
}
.team-right { display: flex; align-items: center; gap: 24px; }
.team-stats {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--grey-300);
    letter-spacing: 0.04em;
}
.team-stat-item { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.team-stat-val { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 700; color: var(--white); letter-spacing: -0.02em; }
.team-stat-lbl { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-500); }

/* ── ACTIVITY FEED ── */
.activity-panel {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}
.activity-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25) 30%, rgba(255,255,255,0.25) 70%, transparent);
    z-index: 1;
}
.activity-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.2s;
}
.activity-row:last-child { border-bottom: none; }
.activity-row:hover { background: rgba(255,255,255,0.03); }
.activity-time {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--grey-500);
    min-width: 44px;
}
.activity-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.25); flex-shrink: 0; }
.activity-text { font-size: 13px; color: var(--grey-100); text-transform: lowercase; }
.activity-text strong { color: var(--white); font-weight: 600; text-transform: none; }

/* ── LOGIN PAGE ── */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 40px;
}
.login-card {
    border-radius: 28px;
    padding: 52px 48px;
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4) 40%, rgba(255,255,255,0.4) 60%, transparent);
}
.login-title {
    font-family: 'Syne', sans-serif;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--white);
    margin-bottom: 6px;
    text-align: center;
}
.login-sub {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey-300);
    text-align: center;
    margin-bottom: 40px;
}
.input-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.input-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-300); font-weight: 600; }
.input-field {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--white);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}
.input-field::placeholder { color: var(--grey-500); }
.input-field:focus {
    border-color: rgba(255,255,255,0.30);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.04), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-login {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    border-radius: 12px;
    font-size: 11px;
    letter-spacing: 0.14em;
}

/* ── FADE IN ── */
.fade-up {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeUp {
    to { opacity: 1; transform: none; }
}
.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.10s; }
.fade-up:nth-child(3) { animation-delay: 0.15s; }
.fade-up:nth-child(4) { animation-delay: 0.20s; }
.fade-up:nth-child(5) { animation-delay: 0.25s; }
.fade-up:nth-child(6) { animation-delay: 0.30s; }

/* ── MOBILE RESPONSIVENESS ── */
@media (max-width: 768px) {
    nav {
        padding: 16px 20px;
        height: auto;
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    .nav-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
    }
    .nav-tabs {
        flex-wrap: wrap;
    }
    main {
        padding: 24px 20px 80px;
    }
    .stats-row {
        grid-template-columns: 1fr;
    }
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .lead-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .lead-actions {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .team-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
    }
    .team-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .activity-row {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .login-wrap {
        padding: 20px;
    }
    .login-card {
        padding: 40px 24px;
    }
    .admin-stat-num {
        font-size: 32px;
    }
    .stat-num {
        font-size: 40px;
    }
    .outcome-buttons {
        flex-wrap: wrap;
    }
    .fab {
        bottom: 20px;
        right: 20px;
    }
    #config-sidebar {
        width: 100vw;
        right: -100vw;
        padding: 40px 20px;
    }
    #config-sidebar.active {
        right: 0;
    }
    #tier-modal .glass, #contact-modal .glass {
        width: calc(100% - 40px);
        margin: 20px;
        padding: 32px 24px;
    }
}

/* ═══ Search Control Center ═══ */
.fab {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 64px;
    height: 64px;
    border-radius: 32px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border 0.4s ease;
    outline: none;
}
.fab:hover {
    transform: scale(1.05);
    box-shadow: var(--glass-shadow-hover);
    border: 1px solid rgba(255,255,255,0.25);
}
.fab svg {
    width: 28px;
    height: 28px;
    color: white;
}

#config-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-left: var(--glass-border);
    box-shadow: -8px 0 32px rgba(0,0,0,0.6);
    z-index: 1001;
    padding: 60px 40px;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
#config-sidebar.active {
    right: 0;
}
#config-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(4px);
}

.config-title {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    margin-bottom: 8px;
}
.config-subtitle {
    font-size: 13px;
    color: var(--grey-400);
    margin-bottom: 40px;
}

.config-group {
    margin-bottom: 32px;
}
.config-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--grey-500);
    margin-bottom: 16px;
    display: block;
}

.niche-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
}
.niche-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: 1px solid transparent;
}
.niche-item:hover {
    background: rgba(255,255,255,0.06);
}
.niche-item.active {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.niche-item input {
    display: none;
}
.niche-text {
    font-size: 14px;
    color: var(--grey-200);
}
.niche-item.active .niche-text {
    color: white;
    font-weight: 500;
}

.custom-niche-wrap {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}
.custom-niche-input {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 16px;
    color: white;
    font-size: 13px;
    outline: none;
}
.custom-niche-input:focus {
    border-color: rgba(255,255,255,0.3);
}

.slider-wrap {
    padding: 10px 0;
}
.slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}
.slider-val {
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--white);
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}
input[type=range]:focus {
    outline: none;
}

.strike-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--glass-bg);
    border: var(--glass-border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    border-radius: 16px;
}
.strike-toggle label {
    font-size: 13px;
    color: var(--white);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Toggle Switch CSS */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider.round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .4s;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.1);
}
.slider.round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: var(--grey-300);
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider.round {
  background-color: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}
input:checked + .slider.round:before {
  transform: translateX(20px);
  background-color: var(--white);
  box-shadow: 0 0 8px rgba(255,255,255,0.8);
}
