:root {
    --primary: #0d6efd;
    --sidebar-width: 250px;
}

body {
    background-color: #f4f6f9;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
}

/* Sidebar Layout */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: #1a2332;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar .brand {
    padding: 1.2rem 1rem;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid #2d3748;
    flex-shrink: 0;
}

.sidebar nav.nav {
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 0.5rem 0;
    display: block !important;
}

.sidebar nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar nav::-webkit-scrollbar-track {
    background: #2d3748;
}

.sidebar nav::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 3px;
}

.sidebar nav::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

.sidebar .nav-section-label {
    color: #4a5568;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    display: block;
}

.sidebar nav.nav .nav-link {
    color: #a0aec0;
    padding: .6rem 1.2rem;
    font-size: .875rem;
    border-radius: 6px;
    margin: 2px 8px;
    display: block !important;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

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

.sidebar nav.nav .nav-link i {
    width: 20px;
    margin-right: 8px;
    display: inline-block;
}

.sidebar-footer {
    flex-shrink: 0;
    background: #1a2332;
    border-top: 1px solid #2d3748;
    padding: 1rem;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    transition: transform .2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

/* OTP Input */
input[name="otp"] {
    font-size: 1.8rem;
    letter-spacing: .5rem;
}

/* Status badges */
.badge { font-size: .8rem; }

/* Tables */
.table thead th {
    background: #f8f9fa;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6c757d;
}

/* Status row colors — override Bootstrap table-hover */
.table > tbody > tr.row-new,
.table > tbody > tr.row-new > td { background-color: #fffbeb !important; }

.table > tbody > tr.row-assigned,
.table > tbody > tr.row-assigned > td { background-color: #eff6ff !important; }

.table > tbody > tr.row-wip,
.table > tbody > tr.row-wip > td { background-color: #f0f9ff !important; }

.table > tbody > tr.row-waiting,
.table > tbody > tr.row-waiting > td { background-color: #fefce8 !important; }

.table > tbody > tr.row-completed,
.table > tbody > tr.row-completed > td { background-color: #f0fdf4 !important; }

.table > tbody > tr.row-reopened,
.table > tbody > tr.row-reopened > td { background-color: #fff1f2 !important; }

.table > tbody > tr.row-onhold,
.table > tbody > tr.row-onhold > td { background-color: #f8fafc !important; }

.table > tbody > tr.row-overdue,
.table > tbody > tr.row-overdue > td { background-color: #fff1f2 !important; }

/* Form labels */
.form-label { font-size: .875rem; font-weight: 500; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 100%; min-height: auto; position: relative; }
    .main-content { margin-left: 0; }
}
