/* ============================================================
   NCloud Portal — Global Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ──────────────────────────────────────── */
:root {
    --primary:        #4f46e5;
    --primary-dark:   #3730a3;
    --primary-light:  #6366f1;
    --accent:         #7c3aed;
    --success:        #10b981;
    --warning:        #f59e0b;
    --danger:         #ef4444;
    --info:           #3b82f6;

    --bg:             #f1f5f9;
    --bg-card:        #ffffff;
    --bg-sidebar:     #1e1b4b;
    --bg-sidebar-hover: #312e81;
    --bg-header:      linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4f46e5 100%);

    --text-primary:   #1e293b;
    --text-secondary: #64748b;
    --text-light:     #94a3b8;
    --text-white:     #ffffff;
    --text-sidebar:   #c7d2fe;

    --border:         #e2e8f0;
    --border-focus:   #6366f1;

    --radius-sm:      6px;
    --radius:         10px;
    --radius-lg:      16px;
    --radius-xl:      24px;

    --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
    --shadow:         0 4px 16px rgba(79,70,229,.10);
    --shadow-lg:      0 8px 32px rgba(79,70,229,.18);

    --sidebar-w:      240px;
    --topbar-h:       56px;
    --transition:     all .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--primary); }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ── Layout ─────────────────────────────────────────────── */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo .logo-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; color: #fff;
    box-shadow: 0 4px 12px rgba(79,70,229,.5);
}
.sidebar-logo .logo-text {
    font-size: 20px; font-weight: 800;
    color: #fff; letter-spacing: -.5px;
}
.sidebar-logo .logo-text span { color: var(--primary-light); }

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-label {
    font-size: 10px; font-weight: 600; letter-spacing: 1px;
    text-transform: uppercase; color: rgba(255,255,255,.35);
    padding: 12px 20px 4px;
}

.nav-item { position: relative; }

.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px;
    color: var(--text-sidebar);
    font-size: 13.5px; font-weight: 500;
    border-radius: 0;
    transition: var(--transition);
    white-space: nowrap;
}
.nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: #fff;
}
.nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: inset 4px 0 0 var(--primary-light);
}
.nav-link .nav-icon {
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 16px;
}
.nav-link .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 100px; padding: 1px 6px;
}

/* Submenu */
.nav-submenu { display: none; background: rgba(0,0,0,.2); }
.nav-item.open > .nav-submenu { display: block; }
.nav-submenu .nav-link { padding-left: 52px; font-size: 13px; }
.nav-arrow { margin-left: auto; font-size: 11px; transition: var(--transition); }
.nav-item.open .nav-arrow { transform: rotate(90deg); }

/* Plan box */
.sidebar-plan {
    margin: 12px 14px;
    background: rgba(99,102,241,.2);
    border: 1px solid rgba(99,102,241,.3);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.sidebar-plan .plan-name { color: #fff; font-weight: 600; font-size: 13px; }
.sidebar-plan .plan-sub  { color: rgba(255,255,255,.55); font-size: 11.5px; margin-top: 2px; }
.btn-upgrade {
    display: block; width: 100%;
    margin-top: 10px; padding: 7px;
    background: var(--primary); color: #fff;
    border: none; border-radius: 8px;
    font-size: 12.5px; font-weight: 600;
    transition: var(--transition);
    text-align: center;
}
.btn-upgrade:hover { background: var(--primary-dark); }

/* ── Main Content ───────────────────────────────────────── */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.hamburger {
    background: none; border: none; padding: 4px;
    color: var(--text-secondary); font-size: 20px;
    display: none;
}
.topbar-sub-name {
    font-size: 12.5px; font-weight: 600;
    color: var(--primary); letter-spacing: .2px;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-notif {
    position: relative; background: none; border: none;
    color: var(--text-secondary); font-size: 20px; padding: 4px;
}
.notif-dot {
    position: absolute; top: 2px; right: 2px;
    width: 8px; height: 8px; background: var(--danger);
    border-radius: 50%; border: 2px solid #fff;
}
.topbar-user {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; padding: 4px 8px;
    border-radius: var(--radius-sm); transition: var(--transition);
    position: relative;
}
.topbar-user:hover { background: var(--bg); }
.avatar {
    width: 32px; height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 13px;
}
.user-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.user-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px);
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    min-width: 180px; display: none; z-index: 200;
}
.topbar-user:hover .user-dropdown,
.topbar-user.open .user-dropdown { display: block; }
.user-dropdown a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; color: var(--text-primary); font-size: 13.5px;
    transition: var(--transition);
}
.user-dropdown a:hover { background: var(--bg); color: var(--primary); }
.user-dropdown .divider { border-top: 1px solid var(--border); margin: 4px 0; }
.user-dropdown .logout { color: var(--danger) !important; }

/* ── Hero Banner ────────────────────────────────────────── */
.hero-banner {
    background: var(--bg-header);
    padding: 18px 28px;
    display: flex; align-items: center; justify-content: space-between;
    position: relative; overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='rgba(255,255,255,.15)'/%3E%3C/svg%3E");
    opacity: .5;
}
.hero-content { position: relative; }
.hero-title { color: #fff; font-size: 20px; font-weight: 800; }
.hero-sub { color: rgba(255,255,255,.7); font-size: 13px; margin-top: 2px; }
.hero-actions { position: relative; display: flex; gap: 10px; }

/* ── Raise Service Request Button ───────────────────────── */
.btn-raise {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff; border: none;
    padding: 9px 18px; border-radius: 8px;
    font-size: 13px; font-weight: 600;
    box-shadow: 0 4px 12px rgba(79,70,229,.4);
    transition: var(--transition);
    display: flex; align-items: center; gap: 6px;
}
.btn-raise:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79,70,229,.5); }

/* ── Page Content ───────────────────────────────────────── */
.page-content { padding: 24px 28px; flex: 1; }

.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.page-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 18px; font-weight: 700; color: var(--text-primary);
}
.page-title .icon { color: var(--primary); font-size: 20px; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-title {
    font-size: 15px; font-weight: 700;
    color: var(--text-primary); margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}

/* ── Grid helpers ───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* ── Stat Widgets ───────────────────────────────────────── */
.stat-widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 18px 20px;
    display: flex; align-items: center; gap: 14px;
    transition: var(--transition);
}
.stat-widget:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.stat-icon.purple  { background: #ede9fe; color: #7c3aed; }
.stat-icon.blue    { background: #dbeafe; color: #2563eb; }
.stat-icon.green   { background: #d1fae5; color: #059669; }
.stat-icon.orange  { background: #ffedd5; color: #ea580c; }
.stat-icon.red     { background: #fee2e2; color: var(--danger); }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; }

/* ── Progress bars ──────────────────────────────────────── */
.progress-row { margin-bottom: 14px; }
.progress-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.progress-track {
    height: 6px; background: var(--bg); border-radius: 100px; overflow: hidden;
}
.progress-fill {
    height: 100%; border-radius: 100px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width .6s ease;
}
.progress-fill.warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-fill.danger  { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ── Donut Charts ───────────────────────────────────────── */
.donut-wrap {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.donut-wrap canvas { max-width: 160px; }
.donut-legend { margin-top: 10px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.legend-dot {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; color: var(--text-secondary);
}
.legend-dot::before {
    content: ''; width: 10px; height: 10px;
    border-radius: 50%; background: var(--c, var(--primary));
}

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead { background: linear-gradient(135deg, var(--primary), var(--accent)); }
thead th {
    padding: 11px 14px; text-align: left;
    color: #fff; font-weight: 600; font-size: 12.5px;
    white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }
tbody td { padding: 12px 14px; color: var(--text-primary); }

/* ── Badges / Status ─────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 100px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-online  { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-offline { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.badge-trial   { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.badge-active  { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-expired { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.badge-open    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.badge::before { content: '●'; font-size: 8px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px; border: none;
    font-size: 13px; font-weight: 600;
    transition: var(--transition); white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary  { background: var(--primary);  color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,.3); }
.btn-primary:hover  { background: var(--primary-dark); }
.btn-accent   { background: var(--accent);   color: #fff; box-shadow: 0 2px 8px rgba(124,58,237,.3); }
.btn-success  { background: var(--success);  color: #fff; }
.btn-danger   { background: var(--danger);   color: #fff; }
.btn-warning  { background: var(--warning);  color: #fff; }
.btn-outline  { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost    { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 11px 24px; font-size: 15px; }
.btn-icon { padding: 8px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); color: var(--text-secondary); }
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--text-primary); margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
    width: 100%; padding: 9px 14px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13.5px; font-family: inherit;
    color: var(--text-primary); background: #fff;
    transition: var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.form-control::placeholder { color: var(--text-light); }
.form-hint { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* Input with icon */
.input-wrap { position: relative; }
.input-wrap .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 16px; }
.input-wrap .form-control { padding-left: 38px; }
.input-wrap .input-icon-right { left: auto; right: 12px; cursor: pointer; }
.input-wrap .input-icon-right + .form-control { padding-left: 14px; padding-right: 38px; }

/* Checkbox / Radio */
.check-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check-wrap input[type=checkbox],
.check-wrap input[type=radio] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.check-wrap span { font-size: 13.5px; color: var(--text-primary); }

/* ── Modals ─────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.5);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 20px;
    opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
    background: #fff; border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg); width: 100%; max-width: 540px;
    max-height: 90vh; overflow-y: auto;
    transform: translateY(20px) scale(.97); transition: var(--transition);
}
.modal-overlay.open .modal { transform: none; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--text-secondary); padding: 2px; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 10px;
}

/* ── Alerts / Toasts ─────────────────────────────────────── */
.alert {
    padding: 12px 16px; border-radius: var(--radius);
    font-size: 13.5px; margin-bottom: 16px;
    display: flex; align-items: flex-start; gap: 10px;
    border-left: 4px solid;
}
.alert-success { background: #f0fdf4; color: #166534; border-color: var(--success); }
.alert-danger  { background: #fff1f2; color: #9b1c1c; border-color: var(--danger); }
.alert-warning { background: #fffbeb; color: #92400e; border-color: var(--warning); }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: var(--info); }

/* Toast stack */
#toast-stack {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 9000; display: flex; flex-direction: column; gap: 8px;
}
.toast {
    background: #1e293b; color: #fff;
    padding: 12px 18px; border-radius: var(--radius);
    font-size: 13.5px; font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 10px;
    animation: slideInRight .3s ease, fadeOut .3s ease 2.7s forwards;
    max-width: 320px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--info); }
@keyframes slideInRight {
    from { transform: translateX(60px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
@keyframes fadeOut { to { opacity: 0; transform: translateX(60px); } }

/* ── Login Page ─────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(79,70,229,.25) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 50%, rgba(124,58,237,.2) 0%, transparent 60%);
}
.login-card {
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    width: 100%; max-width: 420px;
    position: relative; z-index: 1;
    box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.login-logo {
    text-align: center; margin-bottom: 28px;
}
.login-logo .logo-mark {
    width: 56px; height: 56px; border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 800; color: #fff;
    box-shadow: 0 8px 24px rgba(79,70,229,.5);
    margin-bottom: 12px;
}
.login-logo h1 { color: #fff; font-size: 24px; font-weight: 800; }
.login-logo p  { color: rgba(255,255,255,.55); font-size: 13px; margin-top: 4px; }
.login-card .form-label { color: rgba(255,255,255,.8); }
.login-card .form-control {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.2);
    color: #fff;
}
.login-card .form-control::placeholder { color: rgba(255,255,255,.35); }
.login-card .form-control:focus { border-color: var(--primary-light); background: rgba(255,255,255,.15); }
.login-card .input-icon { color: rgba(255,255,255,.4); }
.btn-login {
    width: 100%; padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; border: none; border-radius: 10px;
    font-size: 15px; font-weight: 700;
    box-shadow: 0 6px 20px rgba(79,70,229,.5);
    transition: var(--transition); margin-top: 6px;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(79,70,229,.6); }

/* ── Quick Login Table ───────────────────────────────────── */
.quick-login-section { margin-bottom: 24px; }
.quick-login-section .section-label {
    font-size: 14px; font-weight: 700; color: var(--text-primary);
    margin-bottom: 10px;
}

/* ── Plan Detail Widget ──────────────────────────────────── */
.plan-widget { padding: 16px 20px; }
.plan-widget .plan-head {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.plan-widget .plan-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px;
}
.plan-widget .plan-name-text { font-size: 14px; font-weight: 700; }
.plan-widget .plan-sub-text  { font-size: 12px; color: var(--text-secondary); }
.plan-widget .details-link   { font-size: 12px; color: var(--primary); margin-left: auto; }

/* ── Health Check ───────────────────────────────────────── */
.health-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.health-card {
    border: 1.5px solid var(--border); border-radius: var(--radius-lg);
    padding: 20px; text-align: center;
    transition: var(--transition); cursor: pointer;
}
.health-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.health-card .hc-icon {
    font-size: 28px; color: var(--primary);
    margin-bottom: 10px;
}
.health-card .hc-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.health-card .hc-desc { font-size: 12px; color: var(--text-secondary); }
.health-result { border-radius: var(--radius-lg); padding: 8px 14px; font-size: 13px; font-weight: 600; }
.health-result.ok   { background: #d1fae5; color: #065f46; }
.health-result.warn { background: #fef3c7; color: #92400e; }
.health-result.fail { background: #fee2e2; color: #991b1b; }
.health-result.run  { background: #eff6ff; color: #1e40af; }

/* ── File Manager ───────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.breadcrumb-item { font-size: 13px; color: var(--text-secondary); }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item::after { content: '/'; margin-left: 4px; }
.breadcrumb-item:last-child::after { display: none; }
.breadcrumb-item:last-child { color: var(--text-primary); font-weight: 600; }

/* ── Security Rules ─────────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.toggle-switch input { display: none; }
.toggle-slider {
    position: absolute; inset: 0;
    background: #cbd5e1; border-radius: 100px;
    transition: var(--transition); cursor: pointer;
}
.toggle-slider::before {
    content: ''; position: absolute;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; top: 3px; left: 3px;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

/* ── Pagination ─────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 16px; }
.page-btn {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; border: 1px solid var(--border);
    background: #fff; color: var(--text-primary); transition: var(--transition);
    cursor: pointer;
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Search ─────────────────────────────────────────────── */
.search-bar {
    display: flex; align-items: center; gap: 10px;
    border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 8px 14px; background: #fff; transition: var(--transition);
}
.search-bar:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.search-bar input { border: none; outline: none; font-size: 13.5px; flex: 1; background: transparent; }
.search-bar .search-icon { color: var(--text-light); font-size: 16px; }

/* ── Footer ─────────────────────────────────────────────── */
footer {
    background: #1e1b4b; color: rgba(255,255,255,.55);
    padding: 16px 28px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12.5px; flex-wrap: wrap; gap: 8px;
}
footer a { color: rgba(255,255,255,.55); transition: var(--transition); }
footer a:hover { color: #fff; }
.footer-links { display: flex; gap: 16px; }

/* ── Utility ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-primary-c { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted   { color: var(--text-secondary); }
.fw-bold { font-weight: 700; }
.fw-600  { font-weight: 600; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8  { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.w-full { width: 100%; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.empty-state {
    text-align: center; padding: 48px 20px;
}
.empty-state .empty-icon { font-size: 48px; color: var(--text-light); margin-bottom: 12px; }
.empty-state p { color: var(--text-secondary); font-size: 14px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2,1fr); }
    .health-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: none; }
    .main { margin-left: 0; }
    .hamburger { display: flex; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .page-content { padding: 16px; }
    .hero-banner { padding: 14px 16px; }
}

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
    width: 24px; height: 24px; border-radius: 50%;
    border: 3px solid rgba(99,102,241,.2);
    border-top-color: var(--primary);
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── What's new tab ──────────────────────────────────────── */
.whats-new-tab {
    position: fixed; right: -100px; top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    background: var(--primary); color: #fff;
    padding: 8px 16px; border-radius: 0 0 8px 8px;
    font-size: 12px; font-weight: 600;
    cursor: pointer; z-index: 200;
    transition: right .3s;
}
