@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@500;600;700;800&family=Tajawal:wght@500;700;800&display=swap');

:root {
    --bg: #0f1c24;
    --bg-2: #16303b;
    --surface: #1a3542;
    --surface-2: #214555;
    --line: rgba(232, 241, 245, 0.12);
    --text: #eef6f8;
    --muted: #9db4bd;
    --accent: #2ec4b6;
    --accent-2: #f4a261;
    --danger: #e76f51;
    --success: #2a9d8f;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --radius: 18px;
    --font: 'Cairo', 'Tajawal', sans-serif;
    --display: 'Cairo', 'Tajawal', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 100% -10%, rgba(46, 196, 182, 0.18), transparent 55%),
        radial-gradient(900px 500px at -10% 110%, rgba(244, 162, 97, 0.14), transparent 50%),
        linear-gradient(160deg, var(--bg), var(--bg-2));
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-weight: 600;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #7eefe4; }

.muted { color: var(--muted); }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #06251f; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: rgba(231, 111, 81, 0.18); color: #ffb4a2; border: 1px solid rgba(231, 111, 81, 0.35); }
.btn-sm { padding: 8px 12px; font-size: 0.9rem; }
.btn-block { width: 100%; }

label {
    display: grid;
    gap: 6px;
    font-size: 0.92rem;
    color: var(--muted);
}
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="url"],
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(8, 20, 26, 0.45);
    color: var(--text);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus {
    outline: 2px solid rgba(46, 196, 182, 0.35);
    border-color: rgba(46, 196, 182, 0.5);
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin: 0 0 14px;
}
.alert-success { background: rgba(42, 157, 143, 0.18); color: #9be7db; }
.alert-error { background: rgba(231, 111, 81, 0.18); color: #ffc1b3; }
.alert-info { background: rgba(46, 196, 182, 0.12); color: #b8efe8; }

/* Auth */
.auth-body {
    display: grid;
    place-items: center;
    padding: 24px;
}
.auth-card {
    width: min(440px, 100%);
    background: rgba(26, 53, 66, 0.88);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}
.auth-card h1 {
    font-family: var(--display);
    margin: 0 0 8px;
    letter-spacing: 0.02em;
}

/* Admin layout */
.admin-body { min-height: 100vh; }
.admin-body.admin-nav-lock { overflow: hidden; }

.admin-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
    width: 100%;
}

.admin-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 40;
}

.admin-side {
    background: rgba(10, 22, 28, 0.92);
    border-left: 1px solid var(--line);
    padding: 18px 14px 28px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 50;
    -webkit-overflow-scrolling: touch;
}
.admin-side-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.admin-nav-close {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 20, 26, 0.45);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.brand {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.35rem;
    margin: 0;
    color: var(--text);
}
.brand span { color: var(--accent); }

.nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted);
    margin-bottom: 4px;
    font-size: 0.95rem;
}
.nav a.active, .nav a:hover {
    background: rgba(46, 196, 182, 0.12);
    color: var(--text);
}
.nav-label {
    margin: 14px 8px 8px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(157, 180, 189, 0.7);
}

.admin-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 30;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(10, 22, 28, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}
.admin-topbar-title {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.admin-topbar-title strong {
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-topbar-title span { font-size: 0.78rem; }
.admin-topbar-user {
    font-size: 0.85rem;
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-menu-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 20, 26, 0.45);
    display: inline-grid;
    place-content: center;
    gap: 5px;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
}
.admin-menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.admin-main {
    padding: 28px clamp(16px, 3vw, 32px) 40px;
    width: 100%;
    max-width: 1400px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.page-head h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.35rem, 2.2vw, 2rem);
}
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head .row { width: auto; }

.panel {
    background: rgba(26, 53, 66, 0.72);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(14px, 2vw, 20px);
    box-shadow: var(--shadow);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.stat {
    background: rgba(8, 20, 26, 0.35);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    min-width: 0;
}
.stat strong {
    display: block;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-family: var(--display);
    margin-top: 4px;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}
.type-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(8, 20, 26, 0.35);
    border: 1px solid var(--line);
    color: var(--text);
    transition: border-color .15s ease, transform .15s ease;
}
.type-card:hover {
    border-color: rgba(46, 196, 182, 0.45);
    transform: translateY(-2px);
    color: var(--text);
}
.type-card span { color: var(--muted); font-size: 0.9rem; }

.dash-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 20px;
    margin-bottom: 22px;
    border-radius: 20px;
    border: 1px solid rgba(46, 196, 182, 0.35);
    background:
        linear-gradient(135deg, rgba(46, 196, 182, 0.18), rgba(26, 53, 66, 0.55));
    color: var(--text);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}
.dash-hero:hover { color: var(--text); border-color: rgba(46, 196, 182, 0.55); }
.dash-hero-kicker {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 6px;
    font-weight: 700;
}
.dash-hero strong {
    display: block;
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-family: var(--display);
}
.dash-hero p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}
.dash-hero-count {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    background: rgba(8, 20, 26, 0.35);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    white-space: nowrap;
}

.dash-sections { margin-bottom: 22px; }
.dash-sections-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-family: var(--display);
}
.dash-sections-desc { margin: 0 0 14px; }
.dash-section-grid {
    display: grid;
    gap: 12px;
}
.dash-section {
    background: rgba(26, 53, 66, 0.72);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.dash-section-btn {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    flex-wrap: wrap;
    user-select: none;
}
.dash-section-btn::-webkit-details-marker { display: none; }
.dash-section-btn::after {
    content: '+';
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(46, 196, 182, 0.12);
    color: var(--accent);
    font-weight: 800;
    flex: 0 0 auto;
}
.dash-section[open] .dash-section-btn::after { content: '−'; }
.dash-section-name {
    font-weight: 800;
    font-size: 1.05rem;
}
.dash-section-meta {
    display: flex;
    gap: 10px;
    color: var(--muted);
    font-size: 0.86rem;
    margin-inline-end: auto;
}
.dash-section-meta span {
    background: rgba(8, 20, 26, 0.35);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
}
.dash-type-grid {
    padding: 0 14px 16px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}
.dash-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.scan-box {
    width: min(420px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(8, 20, 26, 0.45);
    min-height: 280px;
}
.identify-card {
    border-color: rgba(46, 196, 182, 0.35);
    box-shadow: 0 0 0 1px rgba(46, 196, 182, 0.12), var(--shadow);
}

.admin-edit-grid {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 18px;
    align-items: start;
}
.admin-edit-grid .panel { min-width: 0; }

.table-wrap {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    margin: 0 -2px;
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}
th, td {
    text-align: right;
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
th { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-empty { background: rgba(157, 180, 189, 0.15); color: #c4d5dc; }
.badge-active { background: rgba(46, 196, 182, 0.18); color: #8eedE3; }

.checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.checks-group { margin-bottom: 14px; }
.checks-group-title {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0 0 8px;
    font-weight: 700;
}
.group-heading {
    margin: 8px 0 12px;
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 700;
}
.check {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(8, 20, 26, 0.35);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--text);
}
.check input { width: auto; accent-color: var(--accent); }

.link-block {
    background: rgba(8, 20, 26, 0.35);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}
.link-block-head {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}
.link-entries { display: grid; gap: 10px; }
.link-entry {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    padding: 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.link-entry .link-remove { justify-self: start; }
.link-block .link-add { margin-top: auto; padding-top: 10px; }

.setup-links-grid .link-block {
    margin-bottom: 0;
    height: 100%;
}

.setup-body .menu-shell.setup-shell-wide {
    width: min(1100px, 100%);
}
.setup-section {
    margin-top: 6px;
    padding-top: 4px;
}
.setup-section-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.02em;
}
.setup-profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.setup-links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
}
.setup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.setup-actions .btn { min-width: 160px; }
.setup-form > .setup-section + .setup-section {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    margin-top: 8px;
}

@media (min-width: 700px) {
    .setup-profile-grid {
        grid-template-columns: 1fr 1fr;
    }
    .setup-avatar-field,
    .setup-avatar-current {
        grid-column: 1 / -1;
    }
    .setup-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .setup-links-grid .link-entry {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1024px) {
    .setup-links-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.filters input,
.filters select,
.filters .btn {
    flex: 1 1 160px;
    min-width: 0;
    width: auto;
}

/* Large desktop */
@media (min-width: 1400px) {
    .admin-shell { grid-template-columns: 280px minmax(0, 1fr); }
    .admin-main { max-width: 1500px; }
}

/* Laptop */
@media (max-width: 1199px) {
    .admin-shell { grid-template-columns: 230px minmax(0, 1fr); }
    .admin-main { padding: 22px 18px 36px; }
    .type-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* Tablet + phone: drawer nav */
@media (max-width: 991px) {
    .admin-shell { grid-template-columns: minmax(0, 1fr); }
    .admin-topbar { display: flex; }
    .admin-backdrop {
        display: block;
    }
    .admin-backdrop[hidden] { display: none !important; }

    .admin-side {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 88vw);
        height: 100vh;
        height: 100dvh;
        border-left: 1px solid var(--line);
        border-bottom: 0;
        transform: translateX(105%);
        transition: transform .22s ease;
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
    }
    .admin-shell.nav-open .admin-side { transform: translateX(0); }
    .admin-nav-close { display: inline-grid; place-items: center; }

    .admin-main { padding: 16px 14px 32px; max-width: none; }
    .page-head { align-items: stretch; }
    .page-head .btn,
    .page-head .row { width: 100%; }
    .page-head .row .btn { flex: 1 1 auto; }

    .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .stat { padding: 12px; }
    .stat strong { font-size: 1.25rem; }

    .admin-edit-grid { grid-template-columns: 1fr; }
    .checks { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (min-width: 700px) {
    .link-entry {
        grid-template-columns: 1.2fr 1fr auto;
        align-items: center;
    }
}

/* Phone */
@media (max-width: 640px) {
    .stats { grid-template-columns: 1fr; }
    .filters input,
    .filters select,
    .filters .btn {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }
    .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .type-card { padding: 12px; }
    .checks { grid-template-columns: 1fr; }
    .btn { min-height: 44px; }
    .btn-sm { min-height: 36px; }
    table { min-width: 620px; font-size: 0.9rem; }
    th, td { padding: 10px 8px; }
    .qr-thumb { width: 48px; height: 48px; }
    .admin-topbar-user { display: none; }
    .row > .panel,
    .row > [style*="flex"] { width: 100% !important; flex: 1 1 100% !important; }
}

@media (max-width: 400px) {
    .type-grid { grid-template-columns: 1fr; }
}

.qr-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
}

.print-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.print-card {
    background: #fff;
    color: #102028;
    border-radius: 16px;
    padding: 14px;
    text-align: center;
}
.print-card img { width: 140px; height: 140px; }
.print-card .code { font-weight: 700; margin-top: 8px; letter-spacing: 0.06em; }
.print-card .pin { font-size: 0.85rem; color: #4b6570; margin-top: 4px; }

@media print {
    body { background: #fff; color: #000; }
    .no-print { display: none !important; }
    .print-card { break-inside: avoid; border: 1px solid #ddd; }
}

/* Public menu */
.menu-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px 64px;
    background: linear-gradient(165deg, #062028 0%, #04141a 55%, #031016 100%);
    background-color: #04161c;
    position: relative;
    overflow-x: hidden;
}
.menu-shell {
    width: min(420px, 100%);
    position: relative;
    z-index: 1;
}
.owner-gate-hit {
    position: absolute;
    top: -8px;
    left: 0;
    width: 56px;
    height: 56px;
    z-index: 5;
    opacity: 0;
}
.menu-hero {
    text-align: center;
    margin-bottom: 22px;
}
.menu-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 800;
    color: #eef6f8;
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
    overflow: hidden;
    border: 0 !important;
    flex: 0 0 100px;
    position: relative;
}
.menu-avatar img {
    position: absolute;
    inset: 0;
    width: 100px;
    height: 100px;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 50%;
    background: transparent;
}
.menu-hero h1 {
    margin: 0;
    font-size: clamp(1.45rem, 5vw, 1.85rem);
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.35;
    color: #ffffff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.menu-hero p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 1rem;
    font-weight: 500;
}
.menu-list { display: grid; gap: 12px; }
.menu-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    border-radius: 16px;
    background: rgba(26, 53, 66, 0.78);
    border: 1px solid var(--line);
    color: var(--text);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.menu-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(46, 196, 182, 0.45);
    color: var(--text);
    background: rgba(33, 69, 85, 0.9);
}
.menu-ico {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(8, 20, 26, 0.45);
    flex: 0 0 auto;
}
.menu-ico svg { width: 22px; height: 22px; fill: currentColor; }
.menu-btn span {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.contact-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    background: transparent;
    display: flex;
    justify-content: center;
    pointer-events: none;
}
.contact-bar-btn {
    pointer-events: auto;
    width: auto;
    min-width: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(8, 20, 26, 0.4);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.68rem;
    line-height: 1.1;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
}
.contact-bar-btn:hover {
    color: #ffffff;
    background: rgba(8, 20, 26, 0.65);
    filter: none;
}
.contact-bar-btn svg {
    width: 14px;
    height: 14px;
    fill: #ffffff;
    flex: 0 0 auto;
}

.app-toast {
    position: fixed;
    left: 50%;
    bottom: 78px;
    transform: translateX(-50%) translateY(12px);
    z-index: 80;
    width: max-content;
    max-width: 92vw;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(8, 20, 26, 0.94);
    color: #eef6f8;
    border: 1px solid rgba(46, 196, 182, 0.35);
    font-size: 0.86rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.app-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.contact-popup {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 12, 16, 0.72);
    backdrop-filter: blur(4px);
}
.contact-popup[hidden] {
    display: none !important;
}
.contact-popup-card {
    width: min(360px, 100%);
    background: #1a3542;
    border: 1px solid rgba(232, 241, 245, 0.14);
    border-radius: 18px;
    padding: 22px 18px;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}
.contact-popup-card h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}
.contact-popup-card p {
    margin: 0 0 18px;
    color: #9db4bd;
    font-size: 0.92rem;
    line-height: 1.5;
}
.contact-popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.contact-popup-actions .btn {
    min-width: 110px;
}
.avatar-preview {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    object-fit: cover;
    border: 2px solid var(--line);
    background: rgba(8, 20, 26, 0.35);
}
.menu-foot {
    text-align: center;
    margin-top: 22px;
    color: var(--muted);
    font-size: 0.85rem;
}

.setup-card {
    background: rgba(26, 53, 66, 0.86);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: clamp(16px, 2.5vw, 28px);
    box-shadow: var(--shadow);
}
.setup-card h1 {
    margin: 0 0 8px;
    font-family: var(--display);
    font-size: 1.4rem;
}

.platform-whatsapp { color: #25D366; }
.platform-instagram { color: #E1306C; }
.platform-facebook { color: #4c8bff; }
.platform-tiktok { color: #69C9D0; }
.platform-website { color: var(--accent); }
.platform-youtube { color: #FF4D4D; }
.platform-telegram { color: #2AABEE; }
.platform-snapchat { color: #FFFC00; }
.platform-email { color: #f4a261; }
.platform-phone { color: #9be7db; }
.platform-sms { color: #86efac; }
.platform-maps { color: #8ad07a; }
.platform-address { color: #a3e635; }
.platform-linkedin { color: #0A66C2; }
.platform-x { color: #e8eef2; }
.platform-threads { color: #f5f5f5; }
.platform-pinterest { color: #E60023; }
.platform-discord { color: #5865F2; }
.platform-github { color: #c9d1d9; }
.platform-image { color: #c4a5f5; }
.platform-video { color: #ff7b72; }
.platform-music { color: #1DB954; }
.platform-podcast { color: #f97316; }
.platform-blog { color: #94a3b8; }
.platform-cv { color: #60a5fa; }
.platform-portfolio { color: #a78bfa; }
.platform-catalog { color: #38bdf8; }
.platform-food_menu { color: #fb923c; }
.platform-pdf { color: #e85d5d; }
.platform-file { color: #fbbf24; }
.platform-drive { color: #34a853; }
.platform-brochure { color: #c084fc; }
.platform-booking { color: #22d3ee; }
.platform-calendar { color: #f472b6; }
.platform-shop { color: #34d399; }
.platform-payment { color: #facc15; }
.platform-offer { color: #fb7185; }
.platform-review { color: #fde047; }
.platform-form { color: #818cf8; }
.platform-support { color: #67e8f9; }
.platform-app { color: #93c5fd; }
.platform-zoom { color: #2D8CFF; }
.platform-link { color: #7dd3c7; }
.platform-newsletter { color: #fda4af; }
.platform-wifi { color: #5eead4; }
