/* ============================================================================
   O-HUB — Stile Principale
   Dark + Tiffany Theme — Elegante, Dinamico, Professionale
   ============================================================================ */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #0ABAB5;
    --primary-dark: #089E9A;
    --primary-light: rgba(10, 186, 181, 0.12);
    --primary-glow: rgba(10, 186, 181, 0.25);
    --accent: #0ABAB5;
    --accent-2: #6366f1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --bg: #0a0e1a;
    --bg-card: rgba(15, 23, 42, 0.7);
    --bg-dark: #060a14;
    --bg-sidebar: #0f172a;
    --bg-elevated: rgba(20, 30, 52, 0.8);

    --text: #e2e8f0;
    --text-light: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #f8fafc;

    --border: rgba(148, 163, 184, 0.12);
    --border-focus: var(--primary);

    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow: 0 2px 8px rgba(0,0,0,.3);
    --shadow-lg: 0 12px 28px rgba(0,0,0,.4);
    --shadow-xl: 0 24px 48px rgba(0,0,0,.5);
    --shadow-glow: 0 0 20px rgba(10, 186, 181, 0.15);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --transition: 250ms cubic-bezier(.4, 0, .2, 1);
    --glass: blur(20px) saturate(180%);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: #2dd4bf; }

img { max-width: 100%; height: auto; }

/* ── Animated Background ─────────────────────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(10, 186, 181, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 0%, rgba(10, 186, 181, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

/* ── Header / Navbar ──────────────────────────────────────────────────────── */
.navbar {
    background: rgba(6, 10, 20, 0.85);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    color: var(--text-inverse);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-inverse);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.navbar-brand .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #2dd4bf);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #060a14;
    box-shadow: 0 0 16px rgba(10, 186, 181, 0.3);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.navbar-nav a {
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--primary);
    background: rgba(10, 186, 181, 0.08);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-badge {
    background: linear-gradient(135deg, var(--primary), #2dd4bf);
    color: #060a14;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-inverse);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ── Hero Section ────────────────────────────────────────────────────────── */
.hero-section {
    position: relative;
    padding: 3rem 0 2rem;
    text-align: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(10, 186, 181, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: heroPulse 6s ease-in-out infinite;
}

@keyframes heroPulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 0.5rem;
    position: relative;
}

.hero-title .tiffany {
    background: linear-gradient(135deg, var(--primary), #2dd4bf, #67e8f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    position: relative;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.5rem;
    position: relative;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* ── Search Bar ──────────────────────────────────────────────────────────── */
.search-wrapper {
    max-width: 480px;
    margin: 0 auto 2.5rem;
    position: relative;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.search-wrapper .form-control {
    padding-left: 2.75rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 0.95rem;
    height: 48px;
    transition: all var(--transition);
}

.search-wrapper .form-control::placeholder {
    color: var(--text-muted);
}

.search-wrapper .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.15), 0 0 20px rgba(10, 186, 181, 0.1);
}

/* ── Section Headers ─────────────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.section-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.section-icon-fav {
    background: rgba(250, 204, 21, 0.12);
    color: #facc15;
}

.section-icon-recent {
    background: rgba(10, 186, 181, 0.12);
    color: var(--primary);
}

.section-icon-all {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.section-count {
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(10, 186, 181, 0.12);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-left: auto;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(10, 186, 181, 0.2);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body { padding: 1.5rem; }
.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(6, 10, 20, 0.4);
}

/* ── App Grid ─────────────────────────────────────────────────────────────── */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.app-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.app-card .app-screenshot {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    position: relative;
    background: rgba(6, 10, 20, 0.5);
}

.app-card .app-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    transition: transform 0.4s ease, opacity var(--transition);
    opacity: 0.85;
}

.app-card:hover .app-screenshot img {
    transform: scale(1.05);
    opacity: 1;
}

.app-card .app-screenshot-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    background: linear-gradient(135deg, rgba(10, 186, 181, 0.08), rgba(99, 102, 241, 0.06));
}

.app-card .app-icon {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(10, 186, 181, 0.15), rgba(99, 102, 241, 0.1));
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid rgba(10, 186, 181, 0.1);
    transition: all var(--transition);
}

.app-card:hover .app-icon {
    box-shadow: 0 0 16px rgba(10, 186, 181, 0.2);
    border-color: rgba(10, 186, 181, 0.25);
}

.app-card .app-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #fff;
}

.app-card .app-version {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary);
    background: rgba(10, 186, 181, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(10, 186, 181, 0.15);
}

.app-card .app-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── Level Badges ────────────────────────────────────────────────────────── */
.app-level-badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
}

.level-0 { background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.15); }
.level-1 { background: rgba(59, 130, 246, 0.12); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.15); }
.level-2 { background: rgba(99, 102, 241, 0.12); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.15); }
.level-3 { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.15); }
.level-high { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.15); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    font-family: var(--font);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #089E9A);
    color: #060a14;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(10, 186, 181, 0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #2dd4bf, var(--primary));
    color: #060a14;
    box-shadow: 0 4px 16px rgba(10, 186, 181, 0.35);
    transform: translateY(-1px);
}

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-warning { background: var(--warning); color: #060a14; }
.btn-warning:hover { background: #d97706; color: #060a14; }

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(10, 186, 181, 0.08);
}

.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; }

.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.form-group .hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: border-color var(--transition), box-shadow var(--transition);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.15);
}

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

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid;
    backdrop-filter: blur(10px);
}

.alert-success { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.25); color: #6ee7b7; }
.alert-danger  { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.alert-warning { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.25); color: #fcd34d; }
.alert-info    { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.25); color: #93c5fd; }

/* ── Table ─────────────────────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

.table th {
    background: rgba(15, 23, 42, 0.5);
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
}

.table tr:hover { background: rgba(10, 186, 181, 0.04); }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; }
.badge-warning { background: rgba(245, 158, 11, 0.12); color: #fcd34d; }
.badge-danger  { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.badge-info    { background: rgba(59, 130, 246, 0.12); color: #93c5fd; }
.badge-muted   { background: rgba(100, 116, 139, 0.12); color: #94a3b8; }

/* ── Status badges ────────────────────────────────────────────────────────── */
.stato-attivo    { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; }
.stato-in_attesa { background: rgba(245, 158, 11, 0.12); color: #fcd34d; }
.stato-bloccato  { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }

/* ── System Monitor ───────────────────────────────────────────────────────── */
.system-monitor {
    background: rgba(6, 10, 20, 0.9);
    backdrop-filter: blur(10px);
    color: var(--text-inverse);
    padding: 1.25rem 0;
    margin-top: auto;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.monitor-item {
    text-align: center;
}

.monitor-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.monitor-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.progress-bar {
    height: 3px;
    background: rgba(255,255,255,.08);
    border-radius: 2px;
    margin-top: 0.35rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

.progress-ok   { background: linear-gradient(90deg, var(--primary), #2dd4bf); }
.progress-warn { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.progress-crit { background: linear-gradient(90deg, var(--danger), #f87171); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
    background: rgba(6, 10, 20, 0.95);
    color: var(--text-muted);
    padding: 1.5rem 0;
    font-size: 0.8rem;
    text-align: center;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--primary); }

/* ── Auth Pages ───────────────────────────────────────────────────────────── */
.auth-wrapper {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 480px;
}

.auth-card .card-header {
    text-align: center;
    padding: 2rem 1.5rem 1rem;
    border-bottom: none;
    flex-direction: column;
}

.auth-card .card-header .logo-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    font-size: 1.4rem;
}

/* ── Page Header ──────────────────────────────────────────────────────────── */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.page-header p {
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* ── Stats Cards ──────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Disclaimer Page ──────────────────────────────────────────────────────── */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(10, 186, 181, 0.2);
    color: #fff;
}

.legal-content h3 {
    font-size: 1.05rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.legal-content p, .legal-content li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-light);
}

.legal-content ul, .legal-content ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.legal-content li { margin-bottom: 0.35rem; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hamburger { display: block; }

    .navbar-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(6, 10, 20, 0.95);
        backdrop-filter: var(--glass);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid var(--border);
    }

    .navbar-nav.open { display: flex; }
    .navbar-nav a { padding: 0.75rem 1rem; }

    .app-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .monitor-grid { grid-template-columns: repeat(2, 1fr); }

    .container { padding: 0 1rem; }

    .hero-title { font-size: 1.75rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-stats { gap: 1.5rem; }
    .hero-stat-value { font-size: 1.5rem; }

    .page-header h1 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .monitor-grid { grid-template-columns: 1fr; }
    .hero-stats { flex-direction: column; gap: 1rem; }
}

/* ── Utilities ────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.85rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.w-100 { width: 100%; }

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.fade-in {
    opacity: 0;
    animation: fadeInScale 0.5s ease forwards;
}

.app-card:nth-child(1) { animation-delay: 0.03s; }
.app-card:nth-child(2) { animation-delay: 0.06s; }
.app-card:nth-child(3) { animation-delay: 0.09s; }
.app-card:nth-child(4) { animation-delay: 0.12s; }
.app-card:nth-child(5) { animation-delay: 0.15s; }
.app-card:nth-child(6) { animation-delay: 0.18s; }
.app-card:nth-child(7) { animation-delay: 0.21s; }
.app-card:nth-child(8) { animation-delay: 0.24s; }
.app-card:nth-child(9) { animation-delay: 0.27s; }

/* ── No apps ──────────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 { color: var(--text-light); margin-bottom: 0.5rem; }

/* ── Checkbox custom ──────────────────────────────────────────────────────── */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* ── Light Theme Override ────────────────────────────────────────────────── */
[data-theme="light"] {
    --bg: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-dark: #0f172a;
    --bg-elevated: rgba(255, 255, 255, 0.8);
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
    --shadow-glow: 0 0 20px rgba(10, 186, 181, 0.08);
}

[data-theme="light"] body::before { display: none; }
[data-theme="light"] .card { background: var(--bg-card); }
[data-theme="light"] .card:hover { box-shadow: var(--shadow-lg), var(--shadow-glow); }
[data-theme="light"] .card-footer { background: #f8fafc; }
[data-theme="light"] .table th { background: #f8fafc; }
[data-theme="light"] .table tr:hover { background: #f8fafc; }
[data-theme="light"] .form-control { background: #fff; color: #1e293b; border-color: #e2e8f0; }
[data-theme="light"] .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.12); }
[data-theme="light"] .alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
[data-theme="light"] .alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
[data-theme="light"] .alert-warning { background: #fffbeb; border-color: #fed7aa; color: #92400e; }
[data-theme="light"] .alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
[data-theme="light"] .stat-card { background: #fff; border-color: #e2e8f0; }
[data-theme="light"] .app-card .app-icon { background: rgba(10, 186, 181, 0.08); border-color: rgba(10, 186, 181, 0.1); }
[data-theme="light"] .app-card .app-name { color: #1e293b; }
[data-theme="light"] .app-card .app-version { color: var(--primary-dark); background: rgba(10, 186, 181, 0.08); border-color: rgba(10, 186, 181, 0.12); }
[data-theme="light"] .badge-success { background: #dcfce7; color: #166534; }
[data-theme="light"] .badge-warning { background: #fef3c7; color: #92400e; }
[data-theme="light"] .badge-danger { background: #fee2e2; color: #991b1b; }
[data-theme="light"] .badge-info { background: #dbeafe; color: #1e40af; }
[data-theme="light"] .badge-muted { background: #f1f5f9; color: #64748b; }
[data-theme="light"] .level-0 { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
[data-theme="light"] .level-1 { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
[data-theme="light"] .level-2 { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
[data-theme="light"] .level-3 { background: #fef3c7; color: #92400e; border-color: #fed7aa; }
[data-theme="light"] .level-high { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
[data-theme="light"] .btn-outline { border-color: #e2e8f0; color: #1e293b; }
[data-theme="light"] .btn-outline:hover { border-color: var(--primary); background: rgba(10, 186, 181, 0.06); }
[data-theme="light"] .btn-primary { color: #fff; }
[data-theme="light"] .btn-primary:hover { color: #fff; }
[data-theme="light"] .user-badge { color: #fff; }
[data-theme="light"] .hero-title { color: #0f172a; }
[data-theme="light"] .hero-title .tiffany { -webkit-text-fill-color: transparent; }
[data-theme="light"] .hero-section::before { background: radial-gradient(circle, rgba(10, 186, 181, 0.05) 0%, transparent 70%); }
[data-theme="light"] .search-wrapper .form-control { background: rgba(255,255,255,0.8); border-color: #e2e8f0; color: #1e293b; }
[data-theme="light"] .section-count { background: rgba(10, 186, 181, 0.08); }
[data-theme="light"] .navbar { background: rgba(15, 23, 42, 0.95); }
[data-theme="light"] ::-webkit-scrollbar-track { background: #f1f5f9; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cbd5e1; }
[data-theme="light"] .system-monitor { background: #0f172a; }
[data-theme="light"] .footer { background: #0f172a; }

/* ── Theme Toggle ────────────────────────────────────────────────────────── */
.theme-toggle { transition: transform 0.3s; }
.theme-toggle:hover { transform: scale(1.2); }

/* ── Decorative line ─────────────────────────────────────────────────────── */
.tiffany-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #2dd4bf);
    border-radius: 2px;
    margin: 0 auto 1rem;
}
