/* ===== DIQUARKS AI — Premium Mobile-First Design ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #10b981;
    --primary-light: #34d399;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.35);
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.25);
    --accent: #f59e0b;
    --bg-deep: #040d0a;
    --bg-dark: #071a14;
    --bg-card: rgba(8, 30, 22, 0.65);
    --bg-card-solid: #0a1f17;
    --bg-input: rgba(6, 20, 15, 0.7);
    --text-main: #ecfdf5;
    --text-muted: #6ee7b7;
    --text-dim: #3a7d5e;
    --border: rgba(16, 185, 129, 0.15);
    --border-subtle: rgba(255,255,255,0.06);
    --error: #ff4d6d;
    --success: #10b981;
    --warning: #fbbf24;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow-card: 0 8px 32px rgba(0,0,0,0.35), 0 0 0 1px var(--border);
    --shadow-glow: 0 0 40px var(--primary-glow);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-deep);
    color: var(--text-main);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(245, 158, 11, 0.04) 0%, transparent 50%);
    animation: bgShift 20s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

@keyframes bgShift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-5%, 3%) rotate(3deg); }
}

/* ===== LAYOUT ===== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 1;
}

/* ===== SIDEBAR (Desktop) / BOTTOM NAV (Mobile) ===== */
.sidebar {
    width: 240px;
    background: rgba(4, 13, 10, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding: 1.8rem 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    font-weight: 800;
    font-size: 1.3rem;
    padding: 0 1.5rem;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #34d399, #10b981, #06b6d4);
    background-size: 200% 200%;
    animation: gradientText 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes gradientText {
    0%,100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.75rem;
}

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.sidebar-links a:hover {
    color: var(--text-main);
    background: rgba(16, 185, 129, 0.08);
}

.sidebar-links a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.08));
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.sidebar-links a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.sidebar-links a .icon { font-size: 1.2rem; }
.sidebar-links a .text { white-space: nowrap; }

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    animation: cardIn 0.5s ease both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.card:hover {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: var(--shadow-card), 0 0 30px rgba(16, 185, 129, 0.08);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 100%);
    pointer-events: none;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #059669);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 28px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-success {
    background: linear-gradient(135deg, #059669, var(--secondary));
    box-shadow: 0 4px 16px var(--secondary-glow);
}

.btn-success:hover { filter: brightness(1.1); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.1rem; }

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 0 20px rgba(16, 185, 129, 0.1);
    background: rgba(6, 20, 15, 0.9);
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237c8db5' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

textarea.form-control { resize: vertical; min-height: 80px; }

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.35rem;
    background: rgba(4, 15, 10, 0.5);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.1));
    color: #fff;
    box-shadow: 0 2px 12px var(--primary-glow);
}

.tab-content {
    display: none;
    animation: fadeSlideIn 0.35s ease;
}

.tab-content.active { display: block; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== CAMERA & UPLOAD AREA ===== */
.media-area {
    width: 100%;
    aspect-ratio: 4/3;
    background: rgba(3, 10, 7, 0.8);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(16, 185, 129, 0.25);
    transition: var(--transition);
}

.media-area:hover { border-color: rgba(16, 185, 129, 0.45); }

#video-preview, #image-preview, #upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.capture-btn {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: 4px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary-glow), 0 4px 12px rgba(0,0,0,0.3);
    transition: var(--transition);
    z-index: 5;
}

.capture-btn:active {
    transform: translateX(-50%) scale(0.9);
    box-shadow: 0 0 30px var(--primary-glow);
}

/* ===== TABLES ===== */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

th {
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(3, 10, 7, 0.4);
    position: sticky;
    top: 0;
}

tbody tr { transition: var(--transition); }
tbody tr:hover { background: rgba(16, 185, 129, 0.04); }

/* ===== BADGES ===== */
.badge {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-success { background: rgba(6, 214, 160, 0.15); color: #34d399; border: 1px solid rgba(6, 214, 160, 0.2); }
.badge-warning { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.2); }
.badge-error { background: rgba(255, 77, 109, 0.15); color: #ff6b8a; border: 1px solid rgba(255, 77, 109, 0.2); }
.badge-pending { background: rgba(124, 141, 181, 0.12); color: #94a3b8; border: 1px solid rgba(124, 141, 181, 0.15); }

/* ===== GRID ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* ===== LOADER ===== */
#loader {
    position: fixed;
    inset: 0;
    background: rgba(3, 10, 7, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    gap: 1.2rem;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(16, 185, 129, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

#loader-text {
    color: var(--text-muted) !important;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== PAGE TITLES ===== */
h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(16, 185, 129, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(16, 185, 129, 0.5); }

/* ===== MOBILE TOP HEADER ===== */
.mobile-header {
    display: none;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    background: rgba(4, 13, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 95;
}

.mobile-header .m-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.mobile-header .m-brand {
    font-weight: 800;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #34d399, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.01em;
}

/* ============================================================
   MOBILE — Premium Phone Experience
   ============================================================ */
@media (max-width: 768px) {
    .mobile-header { display: flex; }
    html { font-size: 14px; }

    /* Bottom Navigation */
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-top: 1px solid var(--border);
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 0;
        flex-direction: row;
        background: rgba(4, 13, 10, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        box-shadow: 0 -4px 30px rgba(0,0,0,0.4);
        padding-bottom: var(--safe-bottom);
    }

    .sidebar-brand { display: none; }

    .sidebar-links {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        padding: 0;
        gap: 0;
    }

    .sidebar-links a {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 0.65rem;
        padding: 0.6rem 0.3rem;
        gap: 0.2rem;
        border-radius: 0;
        flex: 1;
        text-align: center;
        min-height: 52px;
    }

    .sidebar-links a.active {
        background: transparent;
        box-shadow: none;
        color: var(--primary-light);
    }

    .sidebar-links a.active::before {
        top: 0;
        left: 25%;
        width: 50%;
        height: 2px;
        border-radius: 0 0 2px 2px;
    }

    .sidebar-links a .icon { font-size: 1.35rem; }

    /* Main Content */
    .main-content { margin-left: 0; }

    body { padding-bottom: calc(60px + var(--safe-bottom)); }

    .container { padding: 1rem 0.85rem; }

    /* Grid */
    .grid-2 { grid-template-columns: 1fr; gap: 1rem; }

    /* Cards */
    .card {
        padding: 1.15rem;
        border-radius: 14px;
        border: 1px solid var(--border-subtle);
    }

    .card:hover {
        transform: none;
        box-shadow: var(--shadow-card);
    }

    /* Buttons — fat touch targets */
    .btn {
        padding: 0.9rem 1.25rem;
        font-size: 0.95rem;
        border-radius: var(--radius-sm);
        min-height: 48px;
    }

    /* Forms — comfortable inputs */
    .form-control {
        padding: 0.85rem 1rem;
        font-size: 1rem;
        border-radius: var(--radius-sm);
        min-height: 48px;
    }

    .form-label {
        font-size: 0.75rem;
        margin-bottom: 0.35rem;
    }

    .form-group { margin-bottom: 0.9rem; }

    /* Tabs — pill style on mobile */
    .tabs {
        position: sticky;
        top: 0;
        z-index: 90;
        background: rgba(3, 10, 7, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        margin: -1rem -0.85rem 1rem;
        padding: 0.5rem 0.6rem;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--border-subtle);
        gap: 0.35rem;
    }

    .tab-btn {
        padding: 0.6rem 0.5rem;
        font-size: 0.78rem;
        border-radius: var(--radius-xs);
    }

    /* Media area */
    .media-area {
        aspect-ratio: 3/2;
        border-radius: 12px;
    }

    .capture-btn {
        width: 56px;
        height: 56px;
        bottom: 12px;
    }

    /* Table — card-like rows on mobile */
    table { font-size: 0.85rem; }
    th, td { padding: 0.7rem 0.6rem; }
    th { font-size: 0.68rem; }

    /* Page titles */
    h2 { font-size: 1.2rem; }
    h3 { font-size: 0.95rem; }

    /* Scrollbar hidden on mobile */
    ::-webkit-scrollbar { display: none; }
}

/* Extra small phones */
@media (max-width: 380px) {
    html { font-size: 13px; }
    .container { padding: 0.75rem 0.6rem; }
    .card { padding: 1rem; }
    .tab-btn { font-size: 0.72rem; padding: 0.5rem 0.4rem; }
    .sidebar-links a .icon { font-size: 1.2rem; }
    .sidebar-links a { font-size: 0.6rem; }
}

/* ===== UTILITY ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: rgba(6, 20, 15, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: toastIn 0.4s ease, toastOut 0.3s ease 3.7s forwards;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 340px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }
.toast.info { border-left: 3px solid var(--primary); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: calc(70px + var(--safe-bottom));
        right: 0.5rem;
        left: 0.5rem;
    }
    .toast { max-width: 100%; font-size: 0.82rem; }
}

/* ===== MOBILE LEAD CARDS (Dashboard) ===== */
.lead-card-mobile {
    display: none;
}

@media (max-width: 768px) {
    .table-responsive { display: none; }
    .lead-card-mobile { display: block; }

    .lead-item {
        background: var(--bg-card);
        border: 1px solid var(--border-subtle);
        border-radius: 14px;
        padding: 1rem;
        margin-bottom: 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.85rem;
        transition: var(--transition);
        text-decoration: none;
        color: inherit;
    }

    .lead-item:active { transform: scale(0.98); background: rgba(16, 185, 129, 0.06); }

    .lead-avatar {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: linear-gradient(135deg, var(--primary), #059669);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 1rem;
        color: #fff;
        flex-shrink: 0;
    }

    .lead-info { flex: 1; min-width: 0; }
    .lead-info .name { font-weight: 600; font-size: 0.92rem; margin-bottom: 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .lead-info .company { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .lead-badges { display: flex; gap: 0.35rem; flex-shrink: 0; }
    .lead-badges .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }
    .dot.sent { background: var(--success); box-shadow: 0 0 6px var(--secondary-glow); }
    .dot.pending { background: var(--text-dim); }
    .dot.failed { background: var(--error); }

    .lead-arrow {
        color: var(--text-dim);
        font-size: 1.1rem;
        flex-shrink: 0;
    }
}

/* ===== PWA INSTALL BANNER ===== */
#pwa-install-banner {
    position: fixed;
    bottom: -200px;
    left: 0;
    right: 0;
    z-index: 10001;
    padding: 0 1rem 1rem;
    transition: bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

#pwa-install-banner.visible {
    bottom: 0;
    pointer-events: auto;
}

#pwa-install-banner.hiding {
    bottom: -200px;
    transition: bottom 0.4s cubic-bezier(0.55, 0.06, 0.68, 0.19);
}

.pwa-banner-inner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    background: rgba(8, 30, 22, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 18px;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45),
                0 0 60px rgba(16, 185, 129, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.pwa-banner-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.5), rgba(6, 182, 212, 0.3), transparent);
}

.pwa-banner-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 40px;
    background: radial-gradient(ellipse, rgba(16, 185, 129, 0.15), transparent);
    pointer-events: none;
    filter: blur(12px);
}

.pwa-banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.pwa-banner-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-banner-content {
    flex: 1;
    min-width: 0;
}

.pwa-banner-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 0.15rem;
    letter-spacing: -0.01em;
}

.pwa-banner-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-btn-install {
    background: linear-gradient(135deg, var(--primary), #059669);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px var(--primary-glow);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.pwa-btn-install:active {
    transform: scale(0.95);
}

.pwa-btn-install:hover {
    box-shadow: 0 6px 24px var(--primary-glow);
    filter: brightness(1.1);
}

.pwa-btn-dismiss {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: var(--transition);
    flex-shrink: 0;
}

.pwa-btn-dismiss:hover {
    background: rgba(255, 77, 109, 0.1);
    border-color: rgba(255, 77, 109, 0.2);
    color: var(--error);
}

@media (max-width: 768px) {
    #pwa-install-banner {
        padding: 0 0.6rem;
        padding-bottom: calc(68px + var(--safe-bottom));
    }

    .pwa-banner-inner {
        padding: 0.85rem 1rem;
        border-radius: 14px;
    }

    .pwa-banner-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .pwa-banner-title {
        font-size: 0.88rem;
    }

    .pwa-banner-desc {
        font-size: 0.7rem;
    }

    .pwa-btn-install {
        padding: 0.55rem 1rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 380px) {
    .pwa-banner-desc {
        display: none;
    }
}

/* ===== PHONE VALIDATION SYSTEM ===== */
.phone-input-group {
    position: relative;
}

.phone-meta {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.45rem;
    padding: 0.45rem 0.65rem;
    background: rgba(4, 15, 10, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    animation: fadeSlideIn 0.3s ease;
}

.phone-country {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
}

.phone-badge-valid {
    background: rgba(6, 214, 160, 0.15);
    color: #34d399;
    border: 1px solid rgba(6, 214, 160, 0.25);
    box-shadow: 0 0 8px rgba(6, 214, 160, 0.1);
}

.phone-badge-invalid {
    background: rgba(255, 77, 109, 0.15);
    color: #ff6b8a;
    border: 1px solid rgba(255, 77, 109, 0.25);
    box-shadow: 0 0 8px rgba(255, 77, 109, 0.1);
}

.phone-badge-review {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.25);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.1);
    animation: pulseReview 2s ease-in-out infinite;
}

@keyframes pulseReview {
    0%, 100% { box-shadow: 0 0 8px rgba(251, 191, 36, 0.1); }
    50% { box-shadow: 0 0 16px rgba(251, 191, 36, 0.25); }
}

.phone-normalized {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dim);
    font-family: 'Inter', monospace;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.phone-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-left: 3px solid var(--warning);
    border-radius: var(--radius-sm);
    color: #fbbf24;
    font-size: 0.85rem;
    font-weight: 500;
    animation: fadeSlideIn 0.3s ease;
}

@media (max-width: 768px) {
    .phone-meta {
        gap: 0.35rem;
        padding: 0.35rem 0.5rem;
    }

    .phone-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }

    .phone-country {
        font-size: 0.72rem;
    }

    .phone-normalized {
        font-size: 0.7rem;
    }

    .phone-warning {
        font-size: 0.8rem;
        padding: 0.6rem 0.85rem;
    }
}
