/* ============================================================
   IT Asset Management System — Custom Styles
   Ghana Integrated Aluminium Development Corporation
   ============================================================ */

:root {
    --sidebar-width: 250px;
    --sidebar-bg: #1a3a6b;
    --sidebar-hover: #244d8f;
    --topbar-height: 56px;
    --primary: #1a3a6b;
    --accent: #0d6efd;
}

/* ---- Body & Layout ---- */
body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    overflow-x: hidden;
    background: #f0f2f5;
}

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1040;
    transition: transform 0.3s ease, width 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0,0,0,0.2);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
}

.sidebar-brand i { font-size: 1.3rem; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.sidebar-avatar-placeholder {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.2); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 700; flex-shrink: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.85rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left-color: #4fa3e0;
}

.sidebar-nav li a i { width: 18px; text-align: center; font-size: 0.9rem; }

.sidebar-section {
    padding: 16px 18px 4px;
    color: rgba(255,255,255,0.4);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- Main Wrapper ---- */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* ---- Topbar ---- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-bottom: 1px solid #e9ecef;
}

.topbar-title { font-weight: 600; color: #333; }

/* ---- Page Content ---- */
.page-content {
    flex: 1;
    padding: 20px;
}

/* ---- Cards ---- */
.card-shadow { box-shadow: 0 1px 6px rgba(0,0,0,0.07); border: 1px solid #e8ecf0; }

/* ---- Stat Cards ---- */
.stat-card {
    border-radius: 10px;
    padding: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.stat-card .stat-icon { font-size: 1.8rem; opacity: 0.85; }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { font-size: 0.75rem; opacity: 0.85; margin-top: 3px; }

.stat-blue    { background: linear-gradient(135deg, #1a3a6b, #2c5fc5); }
.stat-green   { background: linear-gradient(135deg, #198754, #28b970); }
.stat-primary { background: linear-gradient(135deg, #0d6efd, #4dabff); }
.stat-warning { background: linear-gradient(135deg, #c57a00, #f0a500); }
.stat-danger  { background: linear-gradient(135deg, #dc3545, #ff6b6b); }
.stat-dark    { background: linear-gradient(135deg, #343a40, #6c757d); }
.stat-orange  { background: linear-gradient(135deg, #bf5000, #fd7e14); }
.stat-teal    { background: linear-gradient(135deg, #0d7a6b, #20c997); }
.stat-purple  { background: linear-gradient(135deg, #6610f2, #9b59b6); }

/* ---- Auth Pages ---- */
.auth-body {
    background: linear-gradient(135deg, #1a3a6b 0%, #2c5fc5 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-wrapper { width: 100%; max-width: 440px; }

.auth-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-header {
    background: linear-gradient(135deg, #1a3a6b, #2c5fc5);
    padding: 30px 32px;
    text-align: center;
    color: #fff;
}

.auth-header h2 { font-size: 1.4rem; margin: 10px 0 4px; }
.auth-header p { margin: 0; font-size: 0.85rem; }

.auth-logo {
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto;
}

.auth-body-content { padding: 28px 32px; }

/* ---- Tables ---- */
.table td, .table th { vertical-align: middle; }
.table-sm td, .table-sm th { padding: 0.35rem 0.75rem; }

/* ---- Buttons ---- */
.btn-xs { padding: 2px 7px; font-size: 0.75rem; border-radius: 4px; }

/* ---- Detail Rows ---- */
.detail-row { padding: 6px 0; border-bottom: 1px solid #f0f2f5; }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 600; color: #555; font-size: 0.8rem; display: block; }
.detail-value { color: #222; font-size: 0.875rem; }

/* ---- Badges ---- */
.bg-orange { background-color: #fd7e14 !important; }
.bg-purple { background-color: #6f42c1 !important; }

/* ---- Sidebar overlay (mobile) ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1039;
}

/* ---- Tiny text ---- */
.tiny { font-size: 0.7rem; }
.small { font-size: 0.82rem; }

/* ---- Form labels ---- */
.form-label.required::after { content: ' *'; color: #dc3545; }

/* ---- Table soft colors ---- */
.table-success-soft { background: rgba(25,135,84,0.05); }
.table-danger-soft  { background: rgba(220,53,69,0.05); }

/* ---- Card header colors ---- */
.card-header { font-size: 0.875rem; padding: 10px 16px; }

/* ---- Alert ---- */
.alert { font-size: 0.875rem; }

/* ---- Print ---- */
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-wrapper { margin-left: 0 !important; }
    .page-content { padding: 0; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .sidebar-overlay.show {
        display: block;
    }
    .main-wrapper {
        margin-left: 0;
    }
    .page-content {
        padding: 12px;
    }
    .stat-card .stat-value { font-size: 1.3rem; }
}

@media (max-width: 576px) {
    .topbar { padding: 0 12px; }
    .auth-body-content { padding: 20px; }
}
