
/* ===================================================================
   Zomato LeadFinder — "Liquid Glass" UI
   Inspired by Apple iOS 26/27 design language:
   translucent frosted panels, continuous large radii, specular
   highlights, layered soft shadows, spring motion.
   =================================================================== */

:root {
    /* Ambient canvas */
    --bg-main: #eef1f6;            /* cool light tint behind the glass */
    --bg-tint-1: rgba(226, 55, 68, 0.10);
    --bg-tint-2: rgba(0, 122, 255, 0.10);
    --bg-tint-3: rgba(255, 159, 10, 0.10);

    /* Glass surfaces (translucent) */
    --glass-panel: rgba(255, 255, 255, 0.55);
    --glass-panel-strong: rgba(255, 255, 255, 0.72);
    --glass-input: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);   /* bright top edge */
    --glass-border-soft: rgba(120, 120, 140, 0.18);
    --glass-highlight: rgba(255, 255, 255, 0.85);

    --text-primary: #1c1c1e;       /* iOS label */
    --text-muted: #6b6b73;         /* iOS secondary label */

    /* Accent — Zomato crimson, kept vivid for glass tinting */
    --accent: #e23744;
    --accent-hover: #cb202d;
    --accent-light: rgba(226, 55, 68, 0.12);
    --accent-soft: rgba(226, 55, 68, 0.18);

    --success: #34c759;            /* iOS green */
    --success-light: rgba(52, 199, 89, 0.14);
    --error: #ff3b30;              /* iOS red */
    --error-light: rgba(255, 59, 48, 0.14);
    --warning: #ff9f0a;            /* iOS amber */
    --warning-light: rgba(255, 159, 10, 0.14);
    --info: #0a84ff;               /* iOS blue */

    /* Corner corner radii */
    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 26px;
    --r-pill: 999px;

    /* Layered iOS-style shadows */
    --shadow-sm: 0 1px 2px rgba(20, 22, 40, 0.06);
    --shadow-md: 0 8px 24px -6px rgba(20, 22, 40, 0.16), 0 2px 6px rgba(20, 22, 40, 0.06);
    --shadow-lg: 0 24px 60px -12px rgba(20, 22, 40, 0.28), 0 8px 24px -8px rgba(20, 22, 40, 0.14);
    --shadow-glass-inset: inset 0 1px 0 var(--glass-highlight), inset 0 0 0 0.5px rgba(255, 255, 255, 0.4);

    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 2rem;
    letter-spacing: -0.01em;
}

/* Ambient mesh-gradient background */
.bg-glow-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(60% 50% at 80% 110%, var(--bg-tint-2) 0%, transparent 70%),
        radial-gradient(50% 40% at 50% 40%, var(--bg-tint-3) 0%, transparent 70%);
}

.glow-bg {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.9;
    animation: glowDrift 18s ease-in-out infinite alternate;
}

.glow-bg.top-left {
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, var(--bg-tint-1) 0%, transparent 70%);
    top: -220px;
    left: -180px;
}

.glow-bg.bottom-right {
    width: 820px;
    height: 820px;
    background: radial-gradient(circle, var(--bg-tint-2) 0%, transparent 72%);
    bottom: -320px;
    right: -280px;
    animation-delay: -6s;
}

@keyframes glowDrift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(40px, -30px, 0) scale(1.12); }
}

.container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

.app-panel {
    position: relative;
    background: var(--glass-panel);
    border: 0.5px solid var(--glass-border-soft);
    border-top-color: var(--glass-border);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-md), var(--shadow-glass-inset);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    transition: box-shadow 0.4s var(--ease-soft), transform 0.4s var(--ease-soft);
}

.app-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 35%);
    opacity: 0.6;
    pointer-events: none;
}

.app-panel:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glass-inset);
}

.app-panel.padding-none {
    padding: 0;
    overflow: hidden;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    gap: 16px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-icon-wrapper {
    background: linear-gradient(135deg, #ff5d6c, var(--accent));
    padding: 9px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(226, 55, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.logo-icon {
    width: 20px;
    height: 20px;
    color: white;
}

.header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse-green 2s infinite ease-in-out;
}

.status-dot.loading {
    background-color: var(--warning);
    box-shadow: 0 0 10px var(--warning);
    animation: pulse-amber 2s infinite ease-in-out;
}

.status-dot.error {
    background-color: var(--error);
    box-shadow: 0 0 10px var(--error);
    animation: pulse-red 2s infinite ease-in-out;
}

.status-dot.premium {
    background-color: var(--warning);
    box-shadow: 0 0 10px var(--warning);
    animation: pulse-amber 2s infinite ease-in-out;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(52, 199, 89, 0.7); }
    50% { opacity: 0.4; box-shadow: 0 0 2px rgba(52, 199, 89, 0.2); }
}
@keyframes pulse-amber {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(255, 159, 10, 0.7); }
    50% { opacity: 0.4; box-shadow: 0 0 2px rgba(255, 159, 10, 0.2); }
}

.status-text {
    display: none;
}

.main-content {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    position: relative;
    z-index: 20;
    align-items: stretch;
}

.results-section {
    position: relative;
    z-index: 1;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.section-header h2 i {
    width: 18px;
    color: var(--accent);
}

.section-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 4px;
}

.outline-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: var(--glass-input);
    border: 0.5px solid var(--glass-border-soft);
    border-radius: var(--r-pill);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease-spring);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-glass-inset);
}

.outline-btn:hover:not(:disabled) {
    background: var(--glass-panel-strong);
    transform: translateY(-1px);
}
.outline-btn:active:not(:disabled) { transform: scale(0.97); }
.outline-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-tiny { width: auto; padding: 5px 11px; font-size: 0.75rem; }
.btn-icon-tiny { width: 12px; height: 12px; margin-right: 4px; }
.btn-icon-right { width: 16px; height: 16px; }

.primary-btn {
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: var(--r-pill);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-spring);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 50%);
    pointer-events: none;
}

.primary-btn {
    background: linear-gradient(180deg, #ff4d5e, var(--accent));
    box-shadow: 0 8px 20px rgba(226, 55, 68, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(226, 55, 68, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.primary-btn:active:not(:disabled) { transform: scale(0.97); }

.pulse-glow { animation: ctaGlow 2.8s ease-in-out infinite; }

@keyframes ctaGlow {
    0%, 100% { box-shadow: 0 8px 20px rgba(226, 55, 68, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
    50% { box-shadow: 0 8px 30px rgba(226, 55, 68, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
}

/* Monitoring section */
.monitoring-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.monitoring-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    height: 100%;
}

/* City progress circular dials */
.city-circle-card {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 
        0 10px 25px -8px rgba(20, 22, 40, 0.12),
        inset 0 1.5px 1.5px rgba(255, 255, 255, 0.7),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-soft);
}

.city-circle-card:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 16px 32px -8px rgba(20, 22, 40, 0.18),
        inset 0 2px 2px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05);
}

.city-circle-card svg {
    position: absolute;
    top: -0.5px;
    left: -0.5px;
    width: 100px;
    height: 100px;
    pointer-events: none;
    transform: rotate(-90deg);
}

.progress-ring__background {
    stroke: rgba(120, 120, 140, 0.12);
}

.progress-ring__circle {
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s var(--ease-soft);
}

.city-circle-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    width: 100%;
}

.city-circle-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: capitalize;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 85px;
    margin-bottom: 2px;
}

.city-circle-count {
    font-size: 1.15rem;
    font-weight: 800;
    color: #6366f1;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.city-circle-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Stats circular dials */
.stat-circle-card {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 
        0 12px 30px -10px rgba(20, 22, 40, 0.15),
        inset 0 1.5px 1.5px rgba(255, 255, 255, 0.8),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-soft);
}

.stat-circle-card:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 
        0 18px 36px -10px rgba(20, 22, 40, 0.22),
        inset 0 2px 2px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05);
}

.stat-circle-card svg {
    position: absolute;
    top: -0.5px;
    left: -0.5px;
    width: 140px;
    height: 140px;
    pointer-events: none;
    transform: rotate(-90deg);
}

.stat-circle-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    width: 100%;
}

.stat-circle-name {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.stat-circle-count {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-circle-count.accent {
    color: var(--accent);
}

.stat-circle-count.indigo {
    color: #6366f1;
}

.stat-circle-count.success {
    color: var(--success);
}

.stat-circle-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 2px;
}


/* Results table */
.table-header-row {
    background: rgba(255, 255, 255, 0.35);
    padding: 14px 0;
    border-bottom: 0.5px solid var(--glass-border-soft);
    border-top-left-radius: var(--r-lg);
    border-top-right-radius: var(--r-lg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.table-fixed-layout {
    width: 100%;
    min-width: 850px;
    table-layout: fixed;
    border-collapse: collapse;
}

.col-city { width: 10%; }
.col-locality { width: 15%; }
.col-name { width: 28%; }
.col-phone { width: 17%; }
.col-address { width: 20%; }
.col-url { width: 10%; }

th {
    padding: 0 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: left;
    border: none;
}

.phone-header-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.export-actions { display: flex; gap: 8px; }

.btn-excel {
    background: var(--success-light) !important;
    border-color: rgba(52, 199, 89, 0.3) !important;
    color: #248a3d !important;
}
.btn-excel:hover:not(:disabled) { background: rgba(52, 199, 89, 0.22) !important; }

.table-container {
    background: transparent;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: auto;
    border-bottom-left-radius: var(--r-lg);
    border-bottom-right-radius: var(--r-lg);
    -webkit-overflow-scrolling: touch;
}

td {
    padding: 12px 16px;
    font-size: 0.85rem;
    border-bottom: 0.5px solid var(--glass-border-soft);
    color: var(--text-primary);
    vertical-align: middle;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

tr:last-child td { border-bottom: none; }

tr:hover:not(:has(.empty-row)) { background: rgba(255, 255, 255, 0.4); }

.url-link {
    color: var(--info);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
    white-space: nowrap;
}
.url-link:hover { text-decoration: underline; color: var(--accent); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: var(--r-pill);
    font-size: 0.7rem;
    font-weight: 600;
}
.badge.success {
    background: var(--success-light);
    color: #248a3d;
    border: 0.5px solid rgba(52, 199, 89, 0.3);
}
.badge.error {
    background: var(--error-light);
    color: var(--error);
    border: 0.5px solid rgba(255, 59, 48, 0.3);
}
.badge.info {
    background: rgba(10, 132, 255, 0.14);
    color: #0a84ff;
    border: 0.5px solid rgba(10, 132, 255, 0.3);
}

.empty-row td {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 40px;
}

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(120, 120, 140, 0.3);
    border-radius: var(--r-pill);
}
::-webkit-scrollbar-thumb:hover { background: rgba(120, 120, 140, 0.5); }

/* Row enter animation */
@keyframes rowPopIn {
    0% { transform: translateY(4px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
tr:not(.empty-row) { animation: rowPopIn 0.25s var(--ease-soft) forwards; }

/* ===================================================================
   Responsive — Full Mobile Optimization
   =================================================================== */

/* Tablet & small desktop */
@media (max-width: 1000px) {
    .main-content { grid-template-columns: 1fr; }
    .monitoring-column { flex-direction: column; }
    body { padding: 1rem; }
}

/* Tablet portrait & large phones */
@media (max-width: 768px) {
    body { padding: 12px; }

    .container { gap: 14px; }

    /* Header: stack vertically */
    .header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 14px 16px;
    }
    .header .logo-area { justify-content: center; }
    .header h1 { font-size: 1.2rem; }
    .search-bar-center {
        max-width: 100% !important;
        padding: 0 !important;
        order: 2;
        margin: 0 !important;
    }
    .header-actions { justify-content: center !important; }

    /* Panels tighter padding */
    .app-panel { padding: 16px; border-radius: var(--r-md); }

    /* Stats row: stack dials + grid vertically */
    .stats-row-container {
        flex-direction: column !important;
        gap: 20px;
        align-items: center;
    }
    .stats-dials-column {
        flex-direction: row;
        gap: 16px;
        justify-content: center;
        flex-wrap: wrap;
    }
    .stats-grid-column {
        max-width: 100%;
        width: 100%;
    }

    /* Stat circles slightly smaller */
    .stat-circle-card { width: 120px; height: 120px; }
    .stat-circle-card svg { width: 120px; height: 120px; }
    .stat-circle-count { font-size: 1.2rem; }
    .stat-circle-name { font-size: 0.62rem; }

    /* City circles: smaller & wrap */
    .city-circle-card { width: 90px; height: 90px; }
    .city-circle-card svg { width: 90px; height: 90px; }
    .city-circle-count { font-size: 0.95rem; }
    .city-circle-name { font-size: 0.65rem; max-width: 70px; }

    /* Table: horizontal scroll */
    .app-panel.padding-none { overflow: visible; border-radius: var(--r-md); }
    .table-container { max-height: 400px; }
    .table-fixed-layout { min-width: 850px; }
    td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* Scroll hint arrow on relative container instead of section */
    .table-container-relative::after {
        content: '→';
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0,0,0,0.55);
        color: white;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        text-align: center;
        line-height: 30px;
        font-size: 15px;
        z-index: 30;
        pointer-events: none;
        animation: scrollHintPulse 2s ease-in-out infinite;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        transition: opacity 0.3s ease;
    }
    .table-container-relative.hide-hint::after {
        opacity: 0 !important;
        pointer-events: none;
    }
    @keyframes scrollHintPulse {
        0%, 100% { opacity: 0.6; transform: translateY(-50%) translateX(0); }
        50% { opacity: 1; transform: translateY(-50%) translateX(4px); }
    }

    /* Table header row */
    .table-header-row {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: flex-start !important;
        padding: 12px 16px !important;
    }
    .export-actions { width: 100%; justify-content: flex-end; }

    /* Toast: full width on mobile */
    .toast-container {
        bottom: 12px;
        right: 12px;
        left: 12px;
    }
    .toast { width: 100%; }

    /* Login modal: full width */
    .login-modal-overlay { padding: 16px; }
    .login-modal-card { padding: 24px 20px; max-width: 100%; }

    /* Tier buttons smaller text */
    .tier-btn { padding: 7px 8px; font-size: 0.72rem; }

    /* Section headers */
    .section-header h2 { font-size: 1rem; }
    .section-header p { font-size: 0.72rem; }

    /* Action buttons */
    .action-buttons { gap: 10px; }
    .primary-btn { padding: 11px 14px; font-size: 0.85rem; }
}

/* Mobile phones */
@media (max-width: 480px) {
    body { padding: 8px; }

    .container { gap: 10px; }

    .header { padding: 12px 14px; gap: 10px; }
    .header h1 { font-size: 1.05rem; }

    .app-panel { padding: 14px; border-radius: 16px; }

    /* Stats dials even smaller */
    .stat-circle-card { width: 105px; height: 105px; padding: 0; }
    .stat-circle-card svg { width: 105px; height: 105px; }
    .stat-circle-count { font-size: 1.05rem; }
    .stat-circle-name { font-size: 0.58rem; }
    .stat-circle-label { font-size: 0.55rem; }

    /* City circles compact */
    .city-circle-card { width: 80px; height: 80px; }
    .city-circle-card svg { width: 80px; height: 80px; }
    .city-circle-count { font-size: 0.85rem; }
    .city-circle-name { font-size: 0.58rem; max-width: 60px; }
    .city-circle-label { font-size: 0.52rem; }

    /* Stats grid: single column on very small */
    .stats-grid-column { grid-template-columns: 1fr 1fr; gap: 10px; }
    .mini-stat-card { padding: 10px 12px; }
    .mini-stat-title { font-size: 0.62rem; }
    .mini-stat-value { font-size: 1rem; }

    /* Table */
    .table-container { max-height: 300px; }
    td { padding: 10px 12px; font-size: 0.78rem; }
    th { padding: 10px 12px; font-size: 0.72rem; }

    /* Buttons */
    .outline-btn { padding: 8px 12px; font-size: 0.78rem; }
    .btn-tiny { padding: 4px 9px; font-size: 0.68rem; }
    .primary-btn { padding: 10px 12px; font-size: 0.82rem; }

    /* Dropdowns */
    .custom-select-trigger { padding: 10px 14px; font-size: 0.8rem; }
    .custom-select-option { padding: 9px 12px; font-size: 0.8rem; }

    /* Login modal */
    .login-modal-card { padding: 20px 16px; border-radius: 18px; }
    .login-modal-title { font-size: 1.4rem; }
    .login-modal-subtitle { font-size: 0.82rem; }
    .otp-box { width: 38px; height: 38px; font-size: 1.1rem; }
    .otp-container { gap: 5px; }

    /* Toast */
    .toast { font-size: 0.78rem; }
    .toast-title { font-size: 0.8rem; }
    .toast-message { font-size: 0.72rem; }

    /* Header premium button */
    .header-premium-btn { padding: 6px 12px; font-size: 0.75rem; }

    /* Lock overlay */
    .lock-content-box { padding: 18px 20px; }
    .lock-box-title { font-size: 1rem; }
    .lock-box-subtitle { font-size: 0.78rem; }
    .lock-box-btn { padding: 9px 18px; font-size: 0.82rem; }
}

/* Very small phones (iPhone SE, etc.) */
@media (max-width: 360px) {
    body { padding: 6px; }

    .header h1 { font-size: 0.95rem; }
    .header { padding: 10px 12px; }

    .app-panel { padding: 12px; border-radius: 14px; }

    .stat-circle-card { width: 95px; height: 95px; }
    .stat-circle-card svg { width: 95px; height: 95px; }
    .stat-circle-count { font-size: 0.95rem; }

    .city-circle-card { width: 72px; height: 72px; }
    .city-circle-card svg { width: 72px; height: 72px; }
    .city-circle-count { font-size: 0.78rem; }
    .city-circle-name { font-size: 0.52rem; max-width: 55px; }

    .stats-grid-column { gap: 8px; }
    .mini-stat-card { padding: 8px 10px; }
    .mini-stat-value { font-size: 0.9rem; }

    .tier-btn { padding: 6px 6px; font-size: 0.65rem; }

    .otp-box { width: 34px; height: 34px; font-size: 1rem; border-radius: 8px; }
    .otp-container { gap: 4px; }

    .login-modal-card { padding: 16px 14px; gap: 18px; }
    .login-modal-title { font-size: 1.25rem; }
}

/* Custom premium select (glass) */
.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: var(--glass-input);
    border: 0.5px solid var(--glass-border-soft);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s var(--ease-soft);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-glass-inset);
}

.custom-select-trigger span {
    text-align: center;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
    flex: 1;
    min-width: 0;
}

.custom-select-trigger:hover { background: var(--glass-panel-strong); }

.custom-select.open .custom-select-trigger {
    background: var(--glass-panel-strong);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.select-arrow-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.3s var(--ease-spring);
}
.custom-select.open .select-arrow-icon { transform: rotate(180deg); }

.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--glass-panel-strong);
    border: 0.5px solid var(--glass-border-soft);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg), var(--shadow-glass-inset);
    z-index: 100;
    max-height: 260px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    pointer-events: none;
    transition: all 0.28s var(--ease-spring);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
}

.custom-select.open .custom-select-options {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.custom-select-options-list { overflow-y: auto; flex: 1; max-height: 200px; padding: 6px; }

.custom-select-option {
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
    text-align: center;
    text-transform: capitalize;
}

.custom-select-option:hover { background: var(--accent-light); color: var(--accent); }

.custom-select-option.selected {
    background: linear-gradient(180deg, #ff4d5e, var(--accent));
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(226, 55, 68, 0.3);
}

.custom-select-option.disabled {
    color: var(--text-muted);
    font-style: italic;
    cursor: not-allowed;
    background: transparent !important;
}

.custom-select.disabled { opacity: 0.5; }
.custom-select.disabled .custom-select-trigger { cursor: not-allowed; }

.custom-select-search-wrapper {
    padding: 8px;
    border-bottom: 0.5px solid var(--glass-border-soft);
    background: rgba(255, 255, 255, 0.25);
    position: sticky;
    top: 0;
    z-index: 10;
}

.custom-select-search {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.8rem;
    border: 0.5px solid var(--glass-border-soft);
    border-radius: 10px;
    outline: none;
    background: var(--glass-input);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    text-transform: capitalize;
}
.custom-select-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.modal-input {
    width: 100%;
    background: var(--glass-input);
    border: 0.5px solid var(--glass-border-soft);
    border-radius: var(--r-sm);
    padding: 11px 13px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.25s var(--ease-soft);
}
.modal-input:focus {
    background: var(--glass-panel-strong);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

/* ===================================================================
   Frosted Glass Toast Notifications
   =================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    width: 330px;
    background: var(--glass-panel-strong);
    border: 0.5px solid var(--glass-border-soft);
    border-left: 4px solid var(--accent);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg), var(--shadow-glass-inset);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s var(--ease-spring);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.toast.success { border-left-color: var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.error .toast-icon { color: var(--error); }
.toast.info { border-left-color: var(--info); }
.toast.info .toast-icon { color: var(--info); }
.toast.warning { border-left-color: var(--warning); }
.toast.warning .toast-icon { color: var(--warning); }

/* ===================================================================
   City Tier Segmented Control
   =================================================================== */
.tier-segmented-control {
    display: flex;
    background: var(--glass-input);
    border: 0.5px solid var(--glass-border-soft);
    border-radius: var(--r-sm);
    padding: 4px;
    gap: 4px;
    box-shadow: var(--shadow-glass-inset);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tier-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: calc(var(--r-sm) - 4px);
    cursor: pointer;
    transition: all 0.25s var(--ease-soft);
}

.tier-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.2);
}

.tier-btn.active {
    background: linear-gradient(135deg, #ff5d6c, var(--accent));
    color: white;
    box-shadow: 0 4px 12px rgba(226, 55, 68, 0.25);
}

/* ===================================================================
   Lead Analytics Stats Row & Grid
   =================================================================== */
.stats-row-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    margin: 8px 0;
}

.stats-dials-column {
    display: flex;
    flex-direction: row;
    gap: 24px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.stats-grid-column {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 360px;
}

.mini-stat-card {
    background: rgba(255, 255, 255, 0.3);
    border: 0.5px solid var(--glass-border-soft);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow-sm), var(--shadow-glass-inset);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-soft), background-color 0.3s;
}

.mini-stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.45);
    box-shadow: var(--shadow-md), var(--shadow-glass-inset);
}

.mini-stat-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.mini-stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

@media (max-width: 1100px) {
    .stats-row-container {
        flex-direction: column;
        gap: 24px;
        align-items: stretch;
    }
    .stats-dials-column {
        justify-content: center;
    }
}

/* ===================================================================
   Premium Glassmorphic Login Panel & Table Lock Styles
   =================================================================== */

/* Login Modal Overlay (No Backdrop Blur, Visibility Fix) */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 15, 20, 0.45); /* Soft dimming with no blur */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    padding: 24px;
}

.login-modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Premium Glassmorphic Login Modal Card */
.login-modal-card {
    background: rgba(255, 255, 255, 0.96); /* Clean sharp white background with no blur */
    border: 1px solid rgba(255, 255, 255, 0.5); /* Highlight border edge */
    border-radius: 24px;
    box-shadow: 
        0 32px 64px -16px rgba(10, 20, 50, 0.22), 
        var(--shadow-glass-inset);
    width: 100%;
    max-width: 360px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    overflow: hidden;
}

.login-modal-overlay.show .login-modal-card {
    transform: translateY(0);
    opacity: 1;
}

/* Smooth sliding container for Full Name input */
.login-form-group#loginNameGroup {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, margin-bottom 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form-group#loginNameGroup.show {
    max-height: 80px;
    opacity: 1;
    margin-bottom: 16px;
}

.login-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.35);
    border: 0.5px solid var(--glass-border-soft);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: background-color 0.2s, transform 0.2s;
    z-index: 10;
}

.login-modal-close:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

/* Modal Branding */
.login-modal-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.login-brand-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px -6px rgba(37, 211, 102, 0.6);
}

.login-brand-logo i {
    width: 26px;
    height: 26px;
}

.login-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.68rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1c1c1e 0%, #44444f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    margin-top: 4px;
}

.login-modal-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    padding: 0 6px;
}

/* Plan Badge */
.pricing-badge-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2px;
}

.pricing-badge {
    background: var(--accent-light); /* light translucent Zomato red */
    border: 0.5px solid var(--accent-soft); /* Zomato red glass border */
    color: var(--accent); /* Zomato red text */
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 16px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-glass-inset);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Input Fields and Forms */
.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-input-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.login-phone-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.phone-prefix {
    position: absolute;
    left: 16px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    padding-right: 10px;
}

.login-input {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    padding: 0 16px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    box-shadow: var(--shadow-glass-inset);
}

.login-input::placeholder {
    color: #6b6b73;
    font-weight: 400;
}

.login-input:focus {
    outline: none;
    border-color: #25d366; /* WhatsApp Brand Green Focus */
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.15), var(--shadow-glass-inset);
}

.login-input.phone-input {
    padding-left: 64px;
}

/* Buttons */
.whatsapp-btn {
    background: linear-gradient(180deg, #ff4d5e, var(--accent));
    color: white;
    border: none;
    height: 42px;
    border-radius: var(--r-pill);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 16px rgba(226, 55, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(226, 55, 68, 0.45);
}

.whatsapp-btn:active {
    transform: translateY(0);
}

.whatsapp-btn:disabled {
    opacity: 0.6;
    pointer-events: none;
}

.otp-container {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.otp-box {
    width: 42px;
    height: 42px;
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.01);
    border-radius: 10px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.otp-box:focus {
    outline: none;
    border-color: #25d366; /* WhatsApp Brand Green Focus */
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.15);
}

/* Lock Badge in Header Profile */
.header-premium-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-input);
    padding: 7px 14px;
    border-radius: var(--r-pill);
    border: 0.5px solid var(--glass-border-soft);
    box-shadow: var(--shadow-glass-inset);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.header-premium-btn:hover {
    background: var(--glass-panel-strong);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 12px -3px rgba(20, 22, 40, 0.12),
        var(--shadow-glass-inset);
}

.header-premium-btn:active {
    transform: translateY(0);
}

.header-profile-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-logout-link {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.user-logout-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Table Locked Overlay */
.table-container-relative {
    position: relative;
    width: 100%;
    transition: min-height 0.3s var(--ease-soft);
}

.table-container-relative.locked {
    min-height: 480px;
}

.table-locked-fade {
    position: absolute;
    inset: 0; /* Cover the whole area to allow flex centering at the bottom */
    background: linear-gradient(to bottom, 
        rgba(238, 241, 246, 0.05) 0%, 
        rgba(238, 241, 246, 0.45) 25%, 
        rgba(238, 241, 246, 0.95) 65%, 
        rgba(238, 241, 246, 0.98) 100%
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push the lock box down */
    align-items: center;
    padding: 30px 24px;
    z-index: 20;
    border-bottom-left-radius: var(--r-md);
    border-bottom-right-radius: var(--r-md);
    text-align: center;
    box-shadow: inset 0 20px 40px -20px rgba(255,255,255,1);
}

.lock-content-box {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-lg), var(--shadow-glass-inset);
    border-radius: var(--r-md);
    padding: 24px 32px;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(10px);
    animation: lockCardFloat 4s ease-in-out infinite alternate;
}

@keyframes lockCardFloat {
    0% { transform: translateY(10px); }
    100% { transform: translateY(0px); }
}

.lock-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(226, 55, 68, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-icon-circle i {
    width: 20px;
    height: 20px;
}

.lock-box-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

.lock-box-subtitle {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: -6px;
}

.lock-box-btn {
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: var(--r-pill);
    padding: 10px 24px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, background-color 0.2s;
}

.lock-box-btn:hover {
    background: var(--accent);
    transform: scale(1.02);
}

/* Payment Modal Overlay & Iframe Styles */
.payment-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 15, 20, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    padding: 16px;
}

.payment-modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.payment-modal-card {
    background: transparent;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    height: auto;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    overflow: hidden;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    isolation: isolate;
}

.payment-modal-overlay.show .payment-modal-card {
    transform: translateY(0);
    opacity: 1;
}

.payment-iframe {
    width: 100%;
    height: 540px;
    max-height: 90vh;
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    background: transparent;
}
