:root {
    --bg-app: #f1f5f9;
    --bg-sidebar: #0f172a;
    --bg-card: #ffffff;
    --text-main: #000000;
    /* Pure black for maximum contrast */
    --text-muted: #334155;
    /* Darker grey for labels */
    --text-sidebar: #cbd5e1;
    --border-color: #cbd5e1;
    /* More visible borders */
    --primary: #2563eb;
    /* Brighter, more legible blue */

    --font-urge: Arial, Helvetica, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --sidebar-width: 260px;
    --header-height: 70px;
    --radius-lg: 12px;
    --radius-md: 8px;
}

body {
    font-family: var(--font-urge);
    background: var(--bg-app);
    color: var(--text-main);
    font-size: 15px;
    font-weight: 500;
    /* Use browser defaults for best rendering on standard displays */
    text-rendering: auto;
    overflow-x: hidden;
}

/* ─── Layout ─── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ─── Main Content ─── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-title h1 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    color: #000000;
    letter-spacing: -0.5px;
}

/* ─── Main Content ─── */


.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    gap: 8px;
    width: 280px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    width: 100%;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: #f8fafc;
    color: var(--primary);
    border-color: #cbd5e1;
}

.modern-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 15px;
    cursor: pointer;
    font-size: 1.1rem;
}

.modern-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    color: var(--primary, #3b82f6);
    border-color: var(--primary, #3b82f6);
}

.content-container {
    padding: 24px 32px;
    max-width: 100%;
}

/* KPI Cards */
.kpi-card {
    background: white;
    border: 2px solid #cbd5e1;
    /* Thicker, sharper border */
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.kpi-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kpi-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    color: #000000;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 600;
    color: #000000;
    line-height: 1;
}

/* KPI Colors */
.bg-blue {
    border-left-color: #3b82f6;
}

.bg-blue .kpi-icon {
    background: #eff6ff;
    color: #3b82f6;
}

.bg-red {
    border-left-color: #ef4444;
}

.bg-red .kpi-icon {
    background: #fef2f2;
    color: #ef4444;
}

.bg-purple {
    border-left-color: #a855f7;
}

.bg-purple .kpi-icon {
    background: #faf5ff;
    color: #a855f7;
}

.bg-orange {
    border-left-color: #f97316;
}

.bg-orange .kpi-icon {
    background: #fff7ed;
    color: #f97316;
}

.bg-cyan {
    border-left-color: #06b6d4;
}

.bg-cyan .kpi-icon {
    background: #ecfeff;
    color: #06b6d4;
}

.bg-teal {
    border-left-color: #14b8a6;
}

.bg-teal .kpi-icon {
    background: #f0fdfa;
    color: #14b8a6;
}

/* Tabs */
.custom-tabs .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    border: none;
    background: transparent;
    padding: 10px 20px;
    border-bottom: 2px solid transparent;
}

.custom-tabs .nav-link.active {
    color: #000000;
    border-bottom: 3px solid var(--primary);
    font-weight: 800;
}

/* Table Styling */
.table-hover>tbody>tr>td {
    vertical-align: middle;
}

/* Urgent Row Styling (User Request) */
.row-urgent {
    background-color: #fef2f2 !important;
    /* Red-50 */
}

.row-urgent td {
    color: #991b1b;
    font-weight: 500;
    background-color: inherit !important;
}

/* Status Badges (User Request) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    width: 100%;
    justify-content: center;
    white-space: nowrap;
}

.status-badge i {
    font-size: 13px;
}

.status-badge.missing {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

.status-badge.missing:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.status-badge.uploaded {
    background: #ecfdf5;
    color: #059669;
    /* Emerald */
    border-color: #a7f3d0;
}

.status-badge.uploaded:hover {
    background: #d1fae5;
}

/* Main Urgent Badge */
.badge-status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}

.badge-urgent {
    background: #ef4444;
    color: white;
}

.badge-normal {
    background: #f1f5f9;
    color: #94a3b8;
}

/* Description Text Truncation */
.desc-cell {
    max-width: 200px;
    cursor: pointer;
    color: #000000;
    font-weight: 600;
    /* Bolder titles in table */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desc-cell:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Checkbox */
.form-check-input {
    cursor: pointer;
}

/* User Avatar */
.user-info .avatar {
    width: 36px;
    height: 36px;
    background: #334155;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info .details {
    display: flex;
    flex-direction: column;
}

.user-info .name {
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 500;
}

.user-info .role {
    font-size: 11px;
    color: #64748b;
}

@media (max-width: 992px) {
    .main-content {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 0 16px;
    }

    .page-title h1 {
        font-size: 16px;
    }

    .search-box {
        display: none;
    }

    .content-container {
        padding: 16px;
    }

    .kpi-card {
        padding: 12px;
        gap: 10px;
    }

    .kpi-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .kpi-title {
        font-size: 10px;
    }

    .kpi-value {
        font-size: 16px;
    }
}

.dataTables_filter {
    display: none;
}