/* ===== Global Theme: Graphite Pro (Dark/Light) ===== */

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Dark mode */
body.theme-dark {
    background: #1a1a1a;
    color: #ddd;
}

/* Light mode */
body.theme-light {
    background: #f3f4f6;
    color: #111827;
}

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 55px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 900;
    border-bottom: 1px solid #333;
    background: #111111;
    color: #e5e5e5;
    transition: left .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.sidebar.collapsed + .topbar {
    left: 80px;
}
body.theme-light .topbar {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #111827;
}

.app-title {
    font-weight: 600;
    font-size: 18px;
}

.db-status {
    font-size: 14px;
}

/* Page content */
.page-content {
    margin-left: 260px;
    padding: 75px 25px 30px;
    transition: margin-left .25s ease, background .25s ease, color .25s ease;
}
.sidebar.collapsed + .topbar + .page-content {
    margin-left: 80px;
}

/* Responsive: mobile */
@media (max-width: 768px) {
    .topbar {
        left: 0;
        padding-left: 12px;
    }
    .page-content {
        margin-left: 0;
        padding-top: 70px;
    }
}

/* Cards / tables */
body.theme-dark .card {
    background: #222;
    color: #ddd;
    border-color: #333;
}
body.theme-light .card {
    background: #ffffff;
    color: #111827;
    border-color: #e5e7eb;
}

body.theme-dark .table {
    color: #ddd;
}
body.theme-dark .table thead {
    background: #111;
}
body.theme-dark .table tbody tr:nth-child(even) {
    background: #1f1f1f;
}

/* Scrollbar basic dark */
body.theme-dark ::-webkit-scrollbar {
    width: 8px;
}
body.theme-dark ::-webkit-scrollbar-track {
    background: #111;
}
body.theme-dark ::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
