:root {
    --slate-950: #0f172a;
    --slate-900: #111827;
    --slate-800: #1f2937;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --emerald: #10b981;
    --blue: #2563eb;
    --danger: #ef4444;
}

body {
    min-height: 100vh;
    background: var(--slate-50);
    color: var(--slate-900);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .14), transparent 34%),
        linear-gradient(135deg, var(--login-bg, #f8fafc) 0%, #eef2ff 100%);
    color: var(--login-text, #111827);
}

.login-card {
    width: min(100%, 430px);
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 12px;
    background: color-mix(in srgb, var(--login-card, #fff) 94%, transparent);
    box-shadow: 0 24px 80px rgba(15, 23, 42, .12);
}

.login-logo {
    max-width: 220px;
    max-height: 82px;
    object-fit: contain;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar,
.mobile-menu {
    background: var(--slate-950);
    color: #fff;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    padding: 24px 18px;
    flex-direction: column;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--blue);
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-logo {
    max-width: 190px;
    max-height: 58px;
    object-fit: contain;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
}

.sidebar-nav .nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

.nav-parent-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-parent[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg);
}

.nav-chevron {
    margin-left: auto;
    font-size: .78rem;
    opacity: .72;
    transition: transform .18s ease;
}

.sidebar-submenu {
    margin: -2px 0 4px 0;
    padding-left: 36px;
}

.sidebar-nav .submenu-link {
    position: relative;
    padding: 8px 12px;
    border-radius: 6px;
    color: #94a3b8;
    font-size: .88rem;
    font-weight: 600;
}

.sidebar-nav .submenu-link::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    opacity: .55;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.app-main {
    width: 100%;
    margin-left: 260px;
    padding: 26px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.topbar h1 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-user span {
    display: block;
    color: #64748b;
    font-size: .82rem;
}

.metric-card,
.content-card {
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .05);
}

.metric-card {
    padding: 20px;
}

.metric-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--blue);
    font-size: 1.25rem;
}

.metric-icon.success {
    background: #ecfdf5;
    color: var(--emerald);
}

.metric-icon.warning {
    background: #fff7ed;
    color: #f97316;
}

.metric-value {
    margin: 12px 0 0;
    font-size: 1.45rem;
    font-weight: 800;
}

.content-card {
    padding: 22px;
}

.table thead th {
    color: #64748b;
    font-size: .78rem;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
}

.form-control,
.form-select {
    border-radius: 8px;
}

.preview-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, .28);
}

.preview-wide {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, .28);
}

@media (max-width: 991.98px) {
    .app-main {
        margin-left: 0;
        padding: 18px;
    }

    .topbar {
        align-items: flex-start;
    }
}
