/* ====================================================================
   APP DOWNLOAD PAGE STYLES
   Version 4.0 — Complete & Modern — Fully Responsive
   ==================================================================== */

/* ====================================================================
   1. HERO
   ==================================================================== */
.download-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16,185,129,.18);
    background: linear-gradient(135deg, #0f172a 0%, #102e35 52%, #075e54 100%);
    color: #fff;
    border-radius: 28px;
    max-width: 1180px;
    margin: 22px auto 0;
    padding: 48px;
    box-shadow: 0 30px 90px -20px rgba(15,23,42,.35);
}

.download-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 48px;
    align-items: center;
}

.download-copy { max-width: 720px; }

.download-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.07);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 900;
    color: #6ee7b7;
    margin-bottom: 16px;
}

.download-copy h1 {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.35;
    letter-spacing: -1.2px;
    margin: 12px 0 14px;
    font-weight: 900;
    color: #fff;
}

.download-copy p {
    color: rgba(255,255,255,.72);
    font-size: 14px;
    line-height: 2;
    max-width: 620px;
}

.download-hero-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.download-trust {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: rgba(255,255,255,.62);
    font-size: 11px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.download-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}
.download-trust i { color: #34d399; font-size: 12px; }

.download-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(3px);
    opacity: .24;
    pointer-events: none;
}
.orb-a {
    width: 300px;
    height: 300px;
    right: -90px;
    top: -120px;
    background: #14b8a6;
}
.orb-b {
    width: 220px;
    height: 220px;
    left: -50px;
    bottom: -100px;
    background: #22d3ee;
}

/* ====================================================================
   2. HERO CARD (Preview device)
   ==================================================================== */
.download-hero-card {
    display: flex;
    justify-content: center;
}

.device-window {
    width: min(360px, 100%);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 24px;
    background: rgba(2,6,23,.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 25px 70px -22px rgba(0,0,0,.5);
    overflow: hidden;
    transform: rotate(2deg);
    transition: transform .4s cubic-bezier(.2,.9,.3,1.05);
}
.device-window:hover { transform: rotate(0deg) translateY(-3px); }

.window-bar {
    height: 42px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.window-bar > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.3);
}
.window-bar small {
    margin-right: auto;
    color: rgba(255,255,255,.52);
    font-size: 10px;
    font-weight: 700;
}

.device-screen {
    padding: 46px 26px 42px;
    text-align: center;
}

.shield {
    width: 84px;
    height: 84px;
    border-radius: 26px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    font-size: 36px;
    color: #fff;
    box-shadow: 0 20px 40px -14px rgba(16,185,129,.6);
}

.device-screen strong {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
}
.device-screen small {
    display: block;
    color: rgba(255,255,255,.55);
    margin-top: 5px;
    font-size: 12px;
}

.fake-progress {
    height: 7px;
    border-radius: 99px;
    background: rgba(255,255,255,.08);
    margin: 24px 0 13px;
    overflow: hidden;
}
.fake-progress span {
    display: block;
    width: 78%;
    height: 100%;
    background: linear-gradient(90deg, #34d399, #22d3ee);
    border-radius: 99px;
    animation: fakeProgress 3s ease-in-out infinite;
}
@keyframes fakeProgress {
    0%   { width: 20%; }
    50%  { width: 78%; }
    100% { width: 20%; }
}

.device-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(52,211,153,.1);
    color: #6ee7b7;
    border: 1px solid rgba(52,211,153,.2);
    font-size: 10.5px;
    font-weight: 800;
}

/* ====================================================================
   3. MAIN CONTENT
   ==================================================================== */
.download-main { padding: 50px 0; }

.download-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.download-section-head h2 {
    font-size: clamp(22px, 3vw, 27px);
    font-weight: 900;
    letter-spacing: -.5px;
    margin-top: 5px;
}
.download-section-head p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.9;
}

.download-help {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}
.download-help i { color: var(--primary); font-size: 13px; }

/* ====================================================================
   4. PLATFORM TABS
   ==================================================================== */
.platform-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.platform-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    transition: all var(--t);
    cursor: pointer;
    text-decoration: none;
}
.platform-tab:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
    border-color: var(--border-2);
}
.platform-tab.active {
    border-color: var(--primary-border);
    background: var(--primary-soft);
    color: var(--primary-dark);
}
.platform-tab i { font-size: 14px; }

.platform-tab b {
    font-size: 10px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 99px;
    background: var(--surface-3);
    color: var(--muted);
    font-weight: 800;
}
.platform-tab.active b {
    background: var(--primary);
    color: #fff;
}

/* ====================================================================
   5. PLATFORM SECTION
   ==================================================================== */
.platform-section { margin-bottom: 40px; }

.platform-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.platform-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 20px;
    flex-shrink: 0;
}
.platform-title h3 {
    font-size: 17px;
    font-weight: 900;
    color: var(--text);
}
.platform-title p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

/* ====================================================================
   6. RELEASE CARDS
   ==================================================================== */
.release-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.release-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 19px;
    padding: 18px;
    box-shadow: var(--shadow-xs);
    transition: all var(--t);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.release-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
}

.featured-release {
    border-color: var(--primary-border);
    box-shadow: 0 18px 50px -20px rgba(16,185,129,.25);
}
.featured-release::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: var(--grad-success);
}

.release-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 10px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 1px solid var(--primary-border);
    padding: 4px 9px;
    border-radius: 999px;
    font-weight: 800;
    z-index: 2;
}

.release-top {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-left: 92px;
    padding-top: 4px;
}

.release-logo {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f766e, #06b6d4);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 12px 28px -10px rgba(6,182,212,.5);
    flex-shrink: 0;
}
.release-top h4 {
    font-size: 14.5px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.release-version {
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
    margin-top: 3px;
    display: inline-block;
}

.release-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.85;
    min-height: 42px;
    margin: 14px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.release-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted-2);
    font-size: 10.5px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-soft);
    font-weight: 700;
}
.release-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.release-meta i { color: var(--primary); font-size: 10px; }

.release-notes {
    margin: 12px 0;
    font-size: 11.5px;
    color: var(--text-2);
}
.release-notes summary {
    cursor: pointer;
    font-weight: 900;
    color: var(--primary-dark);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.release-notes summary::-webkit-details-marker { display: none; }
.release-notes summary::before {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 9px;
    transition: transform var(--t);
}
.release-notes[open] summary::before { transform: rotate(180deg); }
.release-notes div {
    padding-top: 8px;
    line-height: 1.95;
    color: var(--muted);
    white-space: pre-wrap;
}

.download-btn {
    width: 100%;
    justify-content: center;
    margin-top: auto;
    padding-top: 6px;
}

/* ====================================================================
   7. EMPTY STATE
   ==================================================================== */
.empty-download {
    padding: 80px 20px;
    text-align: center;
    background: var(--surface);
    border: 1.5px dashed var(--border);
    border-radius: 22px;
}
.empty-download-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 19px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 28px;
}
.empty-download h3 {
    font-size: 17px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 5px;
}
.empty-download p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.9;
}

/* ====================================================================
   8. INSTALL STRIP
   ==================================================================== */
.install-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff, #f0fdfa);
    border: 1px solid #ccfbf1;
    border-radius: 20px;
    flex-wrap: wrap;
}
.install-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #ccfbf1;
    color: var(--primary-dark);
    font-size: 20px;
    flex-shrink: 0;
}
.install-strip > div:not(.install-icon) { flex: 1; min-width: 220px; }
.install-strip strong {
    font-size: 13.5px;
    font-weight: 900;
    color: var(--text);
    display: block;
}
.install-strip p {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.85;
}
.install-strip .btn { margin-right: auto; white-space: nowrap; }

/* ====================================================================
   9. ADMIN GRID (apps.php admin)
   ==================================================================== */
.app-admin-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 15px;
    margin-bottom: 15px;
    align-items: start;
}

.app-admin-guide {
    position: sticky;
    top: 90px;
    align-self: start;
}

.app-admin-guide .guide-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 22px;
    margin-bottom: 12px;
}

.app-admin-guide h2 {
    font-size: 17px;
    font-weight: 900;
    margin-bottom: 6px;
}
.app-admin-guide > p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.9;
    margin-bottom: 16px;
}

.guide-points {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}
.guide-points div {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-2);
    padding: 10px 12px;
    background: var(--surface-2);
    border-radius: 11px;
}
.guide-points b {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--grad-success);
    color: #fff;
    font-size: 11.5px;
    font-weight: 900;
    flex-shrink: 0;
}

.guide-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 11px 13px;
    border-radius: 12px;
    background: var(--warning-soft);
    border: 1px solid #fde68a;
    color: var(--warning-text);
    font-size: 11px;
    line-height: 1.85;
}
.guide-note i { color: var(--warning); margin-top: 3px; font-size: 13px; }

/* ====================================================================
   10. FORM EXTRAS
   ==================================================================== */
.form-hint,
.existing-file {
    display: block;
    font-size: 10.5px;
    color: var(--muted-2);
    margin-top: 6px;
    line-height: 1.75;
}
.existing-file {
    color: var(--primary-dark);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.switches {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

.actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ====================================================================
   11. ADMIN TABLE
   ==================================================================== */
.app-release-table { overflow: hidden; }
.app-release-table .toolbar { padding: 17px; }
.app-release-table .table td { vertical-align: middle; }

/* ====================================================================
   12. RESPONSIVE
   ==================================================================== */
@media (max-width: 980px) {
    .download-hero {
        margin-inline: 10px;
        padding: 34px;
        border-radius: 22px;
    }
    .download-hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .download-hero-card { display: none; }
    .download-copy h1   { font-size: 34px; }
    .release-grid       { grid-template-columns: repeat(2, 1fr); }
    .app-admin-grid     { grid-template-columns: 1fr; }
    .app-admin-guide    { position: static; }
}

@media (max-width: 640px) {
    .download-hero {
        border-radius: 20px;
        padding: 26px 20px;
        margin-inline: 8px;
    }
    .download-copy h1   { font-size: 26px; letter-spacing: -.5px; }
    .download-copy p    { font-size: 13px; }
    .download-section-head { display: block; }
    .download-help      { margin-top: 12px; }
    .download-hero-actions { display: grid; grid-template-columns: 1fr; }
    .download-hero-actions .btn { width: 100%; justify-content: center; }

    .platform-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        margin-bottom: 22px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .platform-tabs::-webkit-scrollbar { display: none; }
    .platform-tab { white-space: nowrap; flex-shrink: 0; }

    .release-grid       { grid-template-columns: 1fr; }
    .install-strip      { display: block; }
    .install-icon       { margin-bottom: 10px; }
    .install-strip .btn {
        width: 100%;
        margin-top: 12px;
        margin-right: 0;
        justify-content: center;
    }
    .release-top        { padding-left: 0; }
    .release-badge      {
        position: static;
        display: inline-flex;
        margin-bottom: 10px;
    }
}

@media (max-width: 420px) {
    .download-hero { padding: 22px 16px; }
    .download-copy h1 { font-size: 22px; }
    .platform-title h3 { font-size: 15px; }
    .release-card { padding: 14px; }
}


/* ====================================================================
   13. ADMIN PANEL — APPS MANAGER (admin/apps.php)
   ==================================================================== */

/* ---------- Apps Wrapper ---------- */
.apps-wrap { display: grid; gap: 18px; }

/* ---------- App Admin Grid ---------- */
.app-admin-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 15px;
    margin-bottom: 15px;
    align-items: start;
}

.app-admin-guide {
    position: sticky;
    top: 90px;
    align-self: start;
    background: linear-gradient(160deg,#0f172a 0%,#1e293b 100%);
    color: #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.app-admin-guide::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(99,102,241,.35), transparent 70%);
    pointer-events: none;
}

.app-admin-guide .guide-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(99,102,241,.15);
    color: #a5b4fc;
    font-size: 22px;
    margin-bottom: 12px;
    position: relative;
}

.app-admin-guide h2 {
    font-size: 17px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 8px;
    position: relative;
}
.app-admin-guide > p {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.9;
    margin: 0 0 16px;
    position: relative;
}

.guide-points {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    position: relative;
}
.guide-points div {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #e2e8f0;
    padding: 10px 12px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
}
.guide-points b {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.guide-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 11px 13px;
    border-radius: 12px;
    background: rgba(245,158,11,.12);
    border: 1px solid rgba(245,158,11,.25);
    color: #fde68a;
    font-size: 11px;
    line-height: 1.85;
    position: relative;
}
.guide-note i { color: #f59e0b; margin-top: 3px; font-size: 13px; }

/* ---------- Admin Table (App Releases) ---------- */
.app-release-table { overflow: hidden; }
.app-release-table .toolbar { padding: 17px; }
.app-release-table .table td { vertical-align: middle; }

/* ---------- Form extras ---------- */
.switches {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border, #e2e8f0);
}

.actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.existing-file {
    color: var(--primary-dark, #047857);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    margin-top: 6px;
}

/* ====================================================================
   14. ADMIN PANEL — APPS PAGE EXTRAS
   ==================================================================== */
.apps-grid {
    display: grid;
    grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr);
    gap: 18px;
}
@media (max-width: 1100px) { .apps-grid { grid-template-columns: 1fr; } }

.form-card {
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.form-card .fc-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.form-card .fc-head h2 { font-size: 16px; font-weight: 800; color: #0f172a; margin: 0; }
.form-card .fc-head p { font-size: 11px; color: #64748b; margin: 4px 0 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.grid-full { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: #334155; }
.field .hint { font-size: 10.5px; color: #94a3b8; margin-top: 2px; }

/* ====================================================================
   15. RESPONSIVE FIXES — APP DOWNLOAD PAGE
   ==================================================================== */
@media (max-width: 900px) {
    .apps-grid,
    .app-admin-grid {
        grid-template-columns: 1fr !important;
    }
    .app-admin-guide {
        position: static !important;
    }
}

@media (max-width: 640px) {
    .apps-wrap,
    .app-admin-grid { gap: 14px !important; }

    .guide-points div { font-size: 11.5px; }

    .form-card { padding: 16px !important; }
    .form-card .fc-head { gap: 8px; }
    .form-card .fc-head h2 { font-size: 15px !important; }

    .drop-zone { padding: 14px 12px !important; }
    .drop-zone .dz-text { font-size: 12px !important; }
    .drop-zone .dz-sub { font-size: 10px !important; }

    .platform-picker label {
        font-size: 11px !important;
        padding: 7px 10px !important;
    }

    .switches { gap: 12px !important; }
    .actions-row .btn { width: 100% !important; justify-content: center !important; }
}

/* ====================================================================
   16. STATS-4 (for admin/apps.php)
   ==================================================================== */
.stats-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 14px;
}
@media (max-width: 900px) { .stats-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .stats-4 { grid-template-columns: 1fr; } }

.stat-box {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -18px rgba(15,23,42,.25);
    transition: transform .25s, box-shadow .25s;
}
.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px -10px rgba(15,23,42,.35);
}
.stat-box .si {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 18px;
}
.stat-box .si.s1 { background: linear-gradient(135deg,#3b82f6,#6366f1); }
.stat-box .si.s2 { background: linear-gradient(135deg,#10b981,#059669); }
.stat-box .si.s3 { background: linear-gradient(135deg,#f59e0b,#ea580c); }
.stat-box .si.s4 { background: linear-gradient(135deg,#8b5cf6,#d946ef); }
.stat-box .sv { font-size: 20px; font-weight: 800; color: #0f172a; line-height: 1.1; }
.stat-box .sl { font-size: 10.5px; color: #64748b; margin-top: 3px; }

/* ====================================================================
   17. APP TABLE (admin/apps.php)
   ==================================================================== */
.app-table { width: 100%; border-collapse: collapse; }
.app-table thead th {
    background: var(--surface-2, #f8fafc);
    font-size: 11px;
    color: var(--muted, #64748b);
    font-weight: 700;
    text-align: right;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    white-space: nowrap;
}
.app-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft, #f1f5f9);
    font-size: 12.5px;
    color: var(--text, #1e293b);
    vertical-align: middle;
}
.app-table tbody tr:hover { background: var(--surface-2, #f8fafc); }
.app-table .t-title { font-weight: 800; color: var(--text, #0f172a); }
.app-table .t-id { font-size: 10.5px; color: var(--muted-2, #94a3b8); }

/* ---------- Modal (delete confirm) ---------- */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}
.modal-bg.open { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 400px;
    padding: 22px;
    box-shadow: 0 30px 60px -20px rgba(15,23,42,.5);
    text-align: center;
    animation: modalIn .25s cubic-bezier(.2,.9,.3,1.15);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(.94) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-box h3 { font-size: 15px; margin: 0 0 6px; color: var(--text, #0f172a); }
.modal-box p  { font-size: 12.5px; color: var(--muted, #64748b); margin: 0 0 18px; }
.modal-box .mi {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: var(--danger-soft, #fef2f2);
    color: var(--danger-text, #dc2626);
    display: grid;
    place-items: center;
    font-size: 22px;
}
.modal-box .ma { display: flex; gap: 8px; justify-content: center; }

/* ---------- Empty State ---------- */
.empty-state {
    padding: 46px 20px;
    text-align: center;
}
.empty-state .ei {
    width: 62px;
    height: 62px;
    margin: 0 auto 12px;
    border-radius: 18px;
    background: linear-gradient(135deg,#eef2ff,#f5f3ff);
    color: #6366f1;
    display: grid;
    place-items: center;
    font-size: 24px;
}
.empty-state h3 {
    font-size: 15px;
    color: var(--text, #0f172a);
    margin: 0 0 5px;
}
.empty-state p {
    font-size: 12px;
    color: var(--muted, #64748b);
    margin: 0;
}

/* ---------- Responsive add-ons ---------- */
@media (max-width: 640px) {
    .app-admin-guide {
        padding: 18px !important;
        border-radius: 18px !important;
    }
    .app-admin-guide h2 { font-size: 15px !important; }
    .guide-points div { padding: 8px 10px !important; }

    .stats-4 { grid-template-columns: 1fr !important; }
    .stat-box .sv { font-size: 18px !important; }
}