/* Theme Colors (overridable by settings) */
@import url('theme-colors.css');

/* ===========================
   ROOT THEME VARIABLES
=========================== */
:root {

    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --muted-text: #64748b;

    --sidebar-width: 260px;
    --border-radius: 14px;
}

/* ===========================
   GLOBAL STYLES
=========================== */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 14px;
}

a {
    text-decoration: none;
}

.wrapper {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* ===========================
   SIDEBAR
=========================== */
.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    position: fixed;
    height: 100vh;
    padding: 1rem 0;
}

.sidebar-header {
    padding: 0 1.5rem 1rem;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.sidebar .nav {
    padding: 0;
}

.sidebar .nav-section {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--muted-text);
    padding: 1rem 1.5rem 0.25rem;
}

.sidebar .nav-link {
    color: #334155;
    padding: 10px 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 0;
    transition: all 0.2s ease;
}

.sidebar .nav-link i {
    font-size: 16px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: rgba(13, 148, 136, 0.08);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

/* ===========================
   MAIN CONTENT AREA
=========================== */
.content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

/* ===========================
   WELCOME BANNER
=========================== */
.welcome-banner {
    background: linear-gradient(
        135deg,
        var(--secondary-color),
        #020617
    );
    color: #ffffff;
    border-radius: var(--border-radius);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.welcome-banner h2 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.welcome-banner p {
    color: #cbd5f5;
    margin-bottom: 1rem;
}

.welcome-banner .btn {
    background-color: var(--primary-color);
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
}

.welcome-icon {
    font-size: 64px;
    opacity: 0.9;
}

/* ===========================
   KPI CARDS
=========================== */
.stat-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border-top: 4px solid var(--primary-color);
    height: 100%;
}

.stat-card.secondary {
    border-top-color: var(--accent-color);
}

.stat-card.danger {
    border-top-color: #ef4444;
}

.stat-card.success {
    border-top-color: #22c55e;
}

.stat-card .label {
    font-size: 13px;
    color: var(--muted-text);
    margin-bottom: 0.25rem;
}

.stat-card .value {
    font-size: 26px;
    font-weight: 700;
}

.stat-card .icon {
    font-size: 28px;
    color: var(--primary-color);
    opacity: 0.9;
}

/* ===========================
   TABLES (RECENT ACTIVITY)
=========================== */
.card-table {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.table th {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted-text);
    border-bottom: 1px solid #e5e7eb;
}

.table td {
    vertical-align: middle;
}

/* ===========================
   FOOTER
=========================== */
.footer {
    color: var(--muted-text);
    font-size: 12px;
    margin-left: var(--sidebar-width);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 991px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .content,
    .footer {
        margin-left: 0;
    }

    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ===========================
   PRINT STYLES
=========================== */
@media print {
    .sidebar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .card-table {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    
    .stat-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    table {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    body {
        font-size: 12px !important;
        color: #000 !important;
        background: #fff !important;
    }
}
