﻿/* ===== Base ===== */
:root {
    --dm-sidebar: #1e293b;
    --dm-sidebar-text: #cbd5e1;
    --dm-accent: #3b82f6;
    --dm-page: #f1f5f9;
    --dm-ink: #0f172a;
    --dm-line: #e2e8f0;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--dm-ink);
}

#content-wrapper {
    background: var(--dm-page);
}

/* ===== Sidebar ===== */
.sidebar.bg-gradient-primary {
    background-color: var(--dm-sidebar);
    background-image: none;
}

.sidebar .sidebar-brand {
    border-bottom: 1px solid #334155;
}

#tit h3 {
    color: #ffffff !important;
}

.sidebar hr.sidebar-divider {
    border-top: 1px solid #334155;
}

.sidebar .nav-item .nav-link {
    color: var(--dm-sidebar-text);
    transition: background .15s ease, color .15s ease;
}

.sidebar .nav-item .nav-link i {
    color: #94a3b8;
}

.sidebar:not(.toggled) .nav-item .nav-link {
    width: auto;
    margin: 3px 10px;
    padding: .7rem .9rem;
    border-radius: 8px;
}

.sidebar .nav-item .nav-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #ffffff;
}

.sidebar .nav-item .nav-link:hover i {
    color: #ffffff;
}

.sidebar .nav-item.active .nav-link {
    background: var(--dm-accent);
    color: #ffffff;
}

.sidebar .nav-item.active .nav-link i {
    color: #ffffff;
}

.sidebar .nav-item .collapse .collapse-inner,
.sidebar .nav-item .collapsing .collapse-inner {
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .25);
}

.sidebar .nav-item .collapse .collapse-inner .collapse-item,
.sidebar .nav-item .collapsing .collapse-inner .collapse-item {
    border-radius: 6px;
    color: #334155;
    cursor: pointer;
}

.sidebar .nav-item .collapse .collapse-inner .collapse-item:hover,
.sidebar .nav-item .collapsing .collapse-inner .collapse-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

#sidebarToggle {
    background-color: rgba(255, 255, 255, .12);
}

/* ===== Topbar ===== */
.topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid var(--dm-line);
    box-shadow: none !important;
}

#topbar {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--dm-ink);
}

.topbar .img-profile {
    height: 2.2rem;
    width: 2.2rem;
    border: 2px solid var(--dm-line);
}

/* ===== Footer ===== */
.sticky-footer {
    background: #ffffff;
    border-top: 1px solid var(--dm-line);
}

.sticky-footer .copyright {
    font-size: 13px;
    color: #64748b;
}

/* ===== Dashboard cards ===== */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    padding: 4px 0 20px;
}

.dash-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100px;
    padding: 20px 22px;
    border-radius: 14px;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.dash-card.clickable {
    cursor: pointer;
}

.dash-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .2);
    filter: brightness(1.06);
}

.dash-label {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .92);
}

.dash-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    min-height: 29px;
}

.dash-action {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.dash-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .2);
    font-size: 22px;
    color: #ffffff;
}

/* Card colors */
.dc-blue   { background: #2563eb; }
.dc-green  { background: #16a34a; }
.dc-indigo { background: #4f46e5; }
.dc-cyan   { background: #0891b2; }
.dc-purple { background: #7c3aed; }
.dc-orange { background: #ea580c; }
.dc-red    { background: #dc2626; }
.dc-teal   { background: #0d9488; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .dash-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .dash-card {
        padding: 14px;
        min-height: 88px;
    }
    .dash-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        border-radius: 10px;
    }
    .dash-value {
        font-size: 19px;
    }
    .dash-action {
        font-size: 14px;
    }
    #topbar {
        font-size: 15px;
    }
}

@media (max-width: 420px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}