/* ============================================
   Domain Control Panel — Design System
   Premium dark theme, lightweight CSS-only
   ============================================ */

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

/* --- CSS Variables --- */
:root {
    --bg-primary: #0b1121;
    --bg-secondary: #111827;
    --bg-card: #1e293b;
    --bg-card-hover: #243044;
    --bg-input: #0f172a;
    --border: #1e3a5f;
    --border-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --cyan: #06b6d4;
    --green: #10b981;
    --green-bg: rgba(16, 185, 129, 0.1);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    --yellow: #f59e0b;
    --yellow-bg: rgba(245, 158, 11, 0.1);
    --purple: #8b5cf6;
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Light Theme --- */
[data-theme="light"] {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

[data-theme="light"] .flash-success {
    background: #ecfdf5;
    border-color: rgba(16,185,129,0.3);
    color: #065f46;
}
[data-theme="light"] .flash-error {
    background: #fef2f2;
    border-color: rgba(239,68,68,0.3);
    color: #991b1b;
}
[data-theme="light"] .flash-warning {
    background: #fffbeb;
    border-color: rgba(245,158,11,0.3);
    color: #92400e;
}
[data-theme="light"] .flash-info {
    background: #eff6ff;
    border-color: rgba(59,130,246,0.3);
    color: #1e40af;
}

[data-theme="light"] .login-wrapper {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
}

[data-theme="light"] .login-card {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* --- RTL Support --- */
[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--border);
}

[dir="rtl"] .main-content {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

[dir="rtl"] .flash-messages {
    right: auto;
    left: 1rem;
}

[dir="rtl"] th {
    text-align: right;
}

[dir="rtl"] .nav-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .sidebar-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .topbar-left,
[dir="rtl"] .topbar-right {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-group {
    flex-direction: row-reverse;
}

[dir="rtl"] .service-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .cron-human {
    text-align: left;
}

@media (max-width: 992px) {
    [dir="rtl"] .sidebar { transform: translateX(100%); }
    [dir="rtl"] .sidebar.open { transform: translateX(0); }
    [dir="rtl"] .main-content { margin-right: 0; }
}

/* --- Theme Toggle Button --- */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.lang-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    transition: all var(--transition);
}

.lang-toggle:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

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

html { font-size: 14px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--cyan); }

/* --- Login Page --- */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0b1121 0%, #1a1a40 50%, #0b1121 100%);
    padding: 1rem;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow), 0 0 80px rgba(59,130,246,0.06);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.4rem;
}

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

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width var(--transition);
    overflow: hidden;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: var(--topbar-height);
}

.sidebar-header .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-header .logo-icon svg { width: 20px; height: 20px; color: white; }

.sidebar-header .logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
}

.sidebar-header .logo-text span {
    color: var(--cyan);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition);
    margin-bottom: 2px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(59,130,246,0.2);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active svg,
.nav-item:hover svg { opacity: 1; }

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid var(--border);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: var(--bg-primary);
    transition: margin-left var(--transition);
}

/* --- Topbar --- */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-left h2 {
    font-size: 1.15rem;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-card);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.user-badge .avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: white;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* --- Page Content --- */
.page-content {
    padding: 2rem;
    max-width: 1400px;
    min-height: calc(100vh - var(--topbar-height));
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.blue::before { background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.stat-card.green::before { background: linear-gradient(90deg, var(--green), #34d399); }
.stat-card.yellow::before { background: linear-gradient(90deg, var(--yellow), #fbbf24); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), #a78bfa); }
.stat-card.red::before { background: linear-gradient(90deg, var(--red), #f87171); }
.stat-card.cyan::before { background: linear-gradient(90deg, var(--cyan), #22d3ee); }

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-light);
    box-shadow: var(--shadow);
}

.stat-card .stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-card .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card.blue .stat-icon { background: rgba(59,130,246,0.12); color: var(--accent); }
.stat-card.green .stat-icon { background: var(--green-bg); color: var(--green); }
.stat-card.yellow .stat-icon { background: var(--yellow-bg); color: var(--yellow); }
.stat-card.purple .stat-icon { background: rgba(139,92,246,0.12); color: var(--purple); }
.stat-card.red .stat-icon { background: var(--red-bg); color: var(--red); }
.stat-card.cyan .stat-icon { background: rgba(6,182,212,0.12); color: var(--cyan); }

.stat-card .stat-icon svg { width: 22px; height: 22px; }

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

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.stat-card .stat-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* --- Progress Bar --- */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.progress-fill.blue { background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.progress-fill.green { background: linear-gradient(90deg, var(--green), #34d399); }
.progress-fill.yellow { background: linear-gradient(90deg, var(--yellow), #fbbf24); }
.progress-fill.red { background: linear-gradient(90deg, var(--red), #f87171); }
.progress-fill.purple { background: linear-gradient(90deg, var(--purple), #a78bfa); }

/* --- Cards & Panels --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* --- Tables --- */
.table-wrap {
    overflow-x: auto;
}

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

th {
    text-align: left;
    padding: 0.85rem 1.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    background: var(--bg-input);
}

td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(30,58,95,0.4);
    font-size: 0.9rem;
    vertical-align: middle;
}

tr:hover td {
    background: rgba(59,130,246,0.03);
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}

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

.btn-danger {
    background: transparent;
    color: var(--red);
    border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover {
    background: var(--red-bg);
    border-color: var(--red);
}

.btn-warning {
    background: transparent;
    color: var(--yellow);
    border-color: rgba(245,158,11,0.3);
}
.btn-warning:hover { background: var(--yellow-bg); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

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

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(16,185,129,0.2);
}

.badge-danger {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(239,68,68,0.2);
}

.badge-warning {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid rgba(245,158,11,0.2);
}

.badge-info {
    background: rgba(6,182,212,0.1);
    color: var(--cyan);
    border: 1px solid rgba(6,182,212,0.2);
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}
.badge-dot.green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.badge-dot.red { background: var(--red); box-shadow: 0 0 6px var(--red); }
.badge-dot.yellow { background: var(--yellow); }

/* --- Flash Messages / Toasts --- */
.flash-messages {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

.flash {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.flash-success {
    background: #064e3b;
    border: 1px solid rgba(16,185,129,0.3);
    color: #6ee7b7;
}
.flash-error {
    background: #7f1d1d;
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
}
.flash-warning {
    background: #78350f;
    border: 1px solid rgba(245,158,11,0.3);
    color: #fcd34d;
}
.flash-info {
    background: #1e3a5f;
    border: 1px solid rgba(59,130,246,0.3);
    color: #93c5fd;
}

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

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 520px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.4);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 { font-size: 1.05rem; font-weight: 600; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 1.5rem; }

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* --- Log Viewer --- */
.log-viewer {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    line-height: 1.7;
    max-height: 500px;
    overflow-y: auto;
    color: var(--text-secondary);
}

.log-viewer .log-line {
    padding: 0.1rem 0;
    border-bottom: 1px solid rgba(30,58,95,0.15);
}

.log-viewer .log-line:hover {
    background: rgba(59,130,246,0.04);
    color: var(--text-primary);
}

/* --- Tabs --- */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.tab:hover { color: var(--text-primary); }
.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* --- Mobile Responsive (Amazon Dashboard) --- */
@media (max-width: 992px) {
    :root { --sidebar-width: 0px; }
    .sidebar { transform: translateX(-100%); width: 260px; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .topbar { padding: 0 1rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .topbar-right span { display: none; }
    .page-content { padding: 1rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .card-body.flex-between { flex-direction: column; align-items: flex-start; }
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-muted);
    left: 2px;
    bottom: 2px;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: white;
}

/* --- Service Card --- */
.service-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(30,58,95,0.4);
    transition: background var(--transition);
}

.service-card:last-child { border-bottom: none; }

.service-card:hover { background: rgba(59,130,246,0.03); }

.service-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59,130,246,0.1);
    color: var(--accent);
}

.service-icon svg { width: 20px; height: 20px; }

.service-name { font-weight: 600; margin-bottom: 0.2rem; }
.service-detail { font-size: 0.8rem; color: var(--text-muted); }

/* --- Grid Layouts --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

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

/* --- Cron Job Row --- */
.cron-job {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(30,58,95,0.4);
    transition: background var(--transition);
}

.cron-job:hover { background: rgba(59,130,246,0.03); }
.cron-job.disabled { opacity: 0.5; }

.cron-schedule {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    background: var(--bg-input);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    white-space: nowrap;
    min-width: 140px;
}

.cron-command {
    flex: 1;
    font-size: 0.85rem;
    word-break: break-all;
}

.cron-human {
    color: var(--text-muted);
    font-size: 0.78rem;
    min-width: 120px;
    text-align: right;
}

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

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state p { font-size: 0.9rem; }

/* --- Circular Gauge --- */
.gauge {
    position: relative;
    width: 100px;
    height: 100px;
}

.gauge svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.gauge .gauge-bg { stroke: var(--bg-input); }
.gauge .gauge-fill { transition: stroke-dashoffset 0.6s ease; }

.gauge-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar.open { transform: translateX(0); }

    .main-content { margin-left: 0; }

    .menu-toggle { display: flex; }

    .page-content { padding: 1.25rem; }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.75rem;
    }

    .stat-card .stat-value { font-size: 1.4rem; }

    .cron-job { flex-wrap: wrap; }
    .cron-human { min-width: auto; text-align: left; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* --- Utils --- */
.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; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
