/* Fiber Optic Logistics System - Modern Sidebar App Shell Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Slate & Neutral Palette */
    --slate-950: #090d16;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50:  #f8fafc;

    --brand-primary: #0f172a;
    --brand-accent: #2563eb;
    --brand-success: #10b981;
    --brand-warning: #f59e0b;
    --brand-danger: #ef4444;

    --sidebar-width: 260px;
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;

    --shadow-subtle: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.02);
    --shadow-card: 0 2px 4px -1px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
    --shadow-lift: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

body {
    font-family: var(--font-sans);
    background-color: var(--slate-50);
    color: var(--slate-900);
    height: 100%;
    height: 100dvh;
    margin: 0;
    letter-spacing: -0.015em;
    -webkit-font-smoothing: antialiased;
}

/* App Shell Layout */
.app-layout {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

/* Desktop Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background-color: #ffffff;
    border-right: 1px solid var(--slate-200);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    z-index: 1020;
}

.sidebar-brand {
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid var(--slate-100);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo-img {
    height: 42px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.brand-link:hover .brand-logo-img {
    transform: scale(1.02);
}

.brand-icon-box {
    width: 36px;
    height: 36px;
    background: var(--slate-900);
    color: #ffffff;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15);
    flex-shrink: 0;
}

.brand-title {
    font-weight: 700;
    font-size: 1.08rem;
    color: var(--slate-950);
    display: block;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--slate-500);
    display: block;
}

.sidebar-group-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate-400);
    padding: 1.25rem 1.25rem 0.4rem 1.25rem;
}

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

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.25rem;
    color: var(--slate-600);
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.15s ease;
    text-decoration: none;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-nav .nav-link:hover {
    color: var(--slate-950);
    background-color: var(--slate-100);
}

.sidebar-nav .nav-link.active {
    color: var(--slate-950);
    font-weight: 600;
    background-color: #f1f5f9;
    border-right: 3px solid var(--slate-900);
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--slate-100);
    background-color: #ffffff;
}

.user-avatar-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--slate-900);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-avatar-badge-sm {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--slate-900);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.84rem;
    color: var(--slate-900);
    line-height: 1.2;
}

.user-role {
    font-size: 0.72rem;
}

.btn-logout {
    color: var(--slate-400);
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    transition: color 0.15s ease;
}
.btn-logout:hover {
    color: #ef4444;
}

/* App Main Content */
.app-main-content {
    flex: 1 1 0%;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--slate-50);
}

@media (max-width: 991.98px) {
    .app-main-content {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Locked Topbar Header */
.app-topbar {
    flex-shrink: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-200);
    padding: 0.75rem 0;
    z-index: 1010;
    position: relative;
}

.btn-notification {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #ffffff;
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-notification:hover {
    background-color: var(--slate-100) !important;
    border-color: var(--slate-300) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px -1px rgba(15, 23, 42, 0.08);
}

.btn-notification:active {
    transform: translateY(0);
}

/* Offcanvas Mobile Drawer Quick Action Buttons */
.quick-action-btn {
    border-radius: 9px;
    padding: 0.55rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    border-width: 1px;
    border-style: solid;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}
.quick-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.quick-action-btn:active {
    transform: translateY(0);
}
.quick-action-btn.action-restock {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.quick-action-btn.action-restock:hover {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}
.quick-action-btn.action-issue {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}
.quick-action-btn.action-issue:hover {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}
.quick-action-btn.action-return {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}
.quick-action-btn.action-return:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.dropdown-item-container:hover {
    background-color: #f8fafc !important;
}

/* PWA Install Sidebar Widget */
.pwa-sidebar-card {
    transition: all 0.2s ease;
}
.pwa-sidebar-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.btn-pwa-install:hover {
    background-color: #1e293b !important;
    transform: translateY(-1px);
}
.btn-pwa-install:active {
    transform: translateY(0);
}

/* Scrollable Middle Content Area */
.app-main-content > main {
    flex: 1 1 0%;
    min-height: 0;
    height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Action Buttons in Topbar */
.btn-quick-issue {
    background-color: var(--slate-900);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.86rem;
    border-radius: var(--radius-sm);
    padding: 0.48rem 1rem;
    border: 1px solid var(--slate-900);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    transition: all 0.15s ease;
}
.btn-quick-issue:hover {
    background-color: var(--slate-800);
    transform: translateY(-1px);
}

.btn-quick-return {
    background-color: #ffffff;
    color: var(--slate-700) !important;
    border: 1.5px solid var(--slate-200);
    font-weight: 600;
    font-size: 0.86rem;
    border-radius: var(--radius-sm);
    padding: 0.48rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    transition: all 0.15s ease;
}
.btn-quick-return:hover {
    background-color: var(--slate-50);
    border-color: var(--slate-300);
    transform: translateY(-1px);
}

/* Clean Page Title Row (Natural inline page heading) */
.page-title-row {
    padding: 0.25rem 0 1.25rem 0;
}
.page-title-row h1, .page-title-row h2, .page-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--slate-950);
    margin-bottom: 0.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.page-title-row p {
    color: var(--slate-500);
    font-size: 0.84rem;
    margin-bottom: 0;
}

/* Stat KPI Cards */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: all 0.15s ease;
}
.stat-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    border-color: var(--slate-300);
    transform: translateY(-1px);
}
.stat-card > div:first-child,
.stat-card > a > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}
.stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--slate-500);
    margin-bottom: 0.25rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stat-number {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--slate-950);
    line-height: 1.1;
    margin-bottom: 0.2rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stat-sub {
    font-size: 0.72rem;
    color: var(--slate-400);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: var(--slate-100);
    color: var(--slate-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    border: 1px solid var(--slate-200);
}
.stat-icon.alert-red {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fee2e2;
}
.stat-icon.alert-amber {
    background-color: #fffbeb;
    color: #d97706;
    border-color: #fef3c7;
}
.stat-icon.alert-blue {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}
.stat-icon.alert-green {
    background-color: #ecfdf5;
    color: #059669;
    border-color: #d1fae5;
}

/* Responsive Alert Action Buttons */
.alert .btn,
.alert-actions .btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.alert-actions {
    flex-shrink: 0 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 767.98px) {
    .alert.d-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    .alert-actions {
        width: 100%;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem;
    }
    .alert-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
        text-align: center;
        white-space: nowrap !important;
    }
}

/* Card Modern Container */
.card-modern {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    overflow: hidden;
}

.card-header-modern {
    background-color: #ffffff;
    border-bottom: 1px solid var(--slate-100);
    padding: 0.9rem 1.25rem;
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--slate-900);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modal-title {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Desktop Tables */
.table-modern {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}
.table-modern thead th {
    background-color: #f8fafc;
    color: var(--slate-600);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.7rem 0.85rem;
    border-top: 1px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-200);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.table-modern tbody td {
    padding: 0.75rem 0.85rem;
    font-size: 0.875rem;
    color: var(--slate-800);
    border-bottom: 1px solid var(--slate-100);
    vertical-align: middle;
}
.table-modern td.text-end,
.table-modern th.text-end {
    white-space: nowrap;
}
.table-modern tbody tr:last-child td {
    border-bottom: none;
}
.table-modern tbody tr:hover td {
    background-color: #f8fafc;
}

/* Mobile Item Cards (< 768px) */
.mobile-card-item {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xs);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.35rem;
}
.mobile-card-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--slate-950);
    margin-bottom: 0.15rem;
}
.mobile-card-meta {
    font-size: 0.78rem;
    color: var(--slate-500);
    margin-bottom: 0.55rem;
}
.mobile-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.55rem;
    border-top: 1px solid var(--slate-100);
}

/* Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    font-size: 0.74rem;
    font-weight: 500;
    border-radius: 9999px;
    line-height: 1.2;
    white-space: nowrap;
}
.badge-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.badge-in-stock {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}
.badge-in-stock::before { background-color: #10b981; }

.badge-low-stock {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.badge-low-stock::before { background-color: #f59e0b; }

.badge-out-stock {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.badge-out-stock::before { background-color: #ef4444; }

.badge-type-pill {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.18rem 0.55rem;
    border-radius: 6px;
    background: var(--slate-100);
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
    white-space: nowrap;
}
.badge-returnable {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

/* Clean Professional Forms */
.form-control, .form-select {
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-xs);
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
    color: var(--slate-900);
    background-color: #ffffff;
    height: 38px;
    min-height: 38px;
    transition: all 0.15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--slate-800);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
    outline: none;
}
.form-label {
    font-weight: 500;
    font-size: 0.84rem;
    color: var(--slate-700);
    margin-bottom: 0.35rem;
}
.form-text {
    font-size: 0.78rem;
    color: var(--slate-500);
    margin-top: 0.3rem;
}

.input-group .form-control,
.input-group .input-group-text {
    height: 40px;
}
.input-group-text {
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: #64748b;
    font-size: 0.875rem;
}

/* Executive Seamless Unified Input Group */
.input-group-seamless {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    height: 44px;
    width: 100%;
}

.input-group-seamless:hover {
    border-color: #94a3b8;
}

.input-group-seamless:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-group-seamless .input-group-text {
    background: transparent !important;
    border: none !important;
    color: #64748b;
    padding: 0 0.25rem 0 0.85rem;
    font-size: 1.05rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    height: 100%;
}

.input-group-seamless:focus-within .input-group-text {
    color: #2563eb;
}

.input-group-seamless .form-control {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    height: 100% !important;
    min-height: auto !important;
    padding: 0.5rem 0.85rem 0.5rem 0.5rem;
    font-size: 0.92rem;
    color: #0f172a;
    width: 100%;
    flex: 1 1 auto;
}

.input-group-seamless .form-control::placeholder {
    color: #94a3b8;
    font-size: 0.88rem;
}

.input-group-seamless .password-toggle-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 100%;
    transition: color 0.15s ease;
}

.input-group-seamless .password-toggle-btn:hover {
    color: #1e293b;
}

.btn-sm {
    font-size: 0.8rem;
    height: 30px;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Action Buttons */
.btn-primary-action {
    background-color: var(--slate-900);
    color: #ffffff !important;
    border: 1px solid var(--slate-900);
    font-weight: 500;
    font-size: 0.84rem;
    border-radius: var(--radius-xs);
    padding: 0.38rem 0.85rem;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.15s ease;
}
.btn-primary-action:hover {
    background-color: var(--slate-800);
    border-color: var(--slate-800);
    transform: translateY(-0.5px);
}

.btn-secondary-action {
    background-color: #ffffff;
    color: var(--slate-700) !important;
    border: 1px solid #cbd5e1;
    font-weight: 500;
    font-size: 0.84rem;
    border-radius: var(--radius-xs);
    padding: 0.38rem 0.85rem;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.15s ease;
}
.btn-secondary-action:hover {
    background-color: var(--slate-50);
    border-color: var(--slate-400);
    color: var(--slate-900) !important;
}

/* Modals */
.modal-content {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
}
.modal-header {
    border-bottom: 1px solid var(--slate-100);
    padding: 1.25rem 1.5rem;
}
.modal-footer {
    border-top: 1px solid var(--slate-100);
    padding: 1rem 1.5rem;
}

/* Mobile Bottom Navigation Bar (Smartphones < 992px) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--slate-200);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.45rem 0.25rem 0.6rem 0.25rem;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--slate-500);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.3rem 0.4rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    flex: 1;
    text-align: center;
}

.mobile-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.mobile-nav-item:hover {
    color: var(--slate-800);
}

.mobile-nav-item.active {
    color: var(--slate-950);
    font-weight: 600;
}

.mobile-nav-item.active i {
    color: var(--slate-950);
}

/* Mobile Offcanvas Sidebar Drawer */
.offcanvas-mobile-sidebar {
    width: 285px !important;
    max-width: 82vw !important;
    border-right: 1px solid var(--slate-200);
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.12) !important;
}

.offcanvas-mobile-sidebar .offcanvas-body {
    overflow-x: hidden;
    overflow-y: auto;
}

.mobile-drawer-user {
    background-color: var(--slate-100) !important;
    border: 1px solid var(--slate-200) !important;
    border-radius: var(--radius-sm);
}

/* Tablet & Mobile Media Queries */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 0 !important;
    }
    .app-main-content > main {
        padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .mobile-bottom-nav {
        padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 767.98px) {
    .card-header-modern {
        padding: 0.85rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .stat-card {
        padding: 0.8rem 0.85rem;
        gap: 0.45rem;
    }
    .stat-number {
        font-size: clamp(1.15rem, 4vw, 1.35rem);
    }
    .stat-label {
        font-size: 0.68rem;
    }
    .stat-sub {
        font-size: 0.68rem;
    }
    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    .form-control, .form-select, .input-group-seamless {
        min-height: 40px;
        font-size: 0.88rem;
    }
    .btn:not(.btn-sm):not(.quick-action-btn):not(.mobile-nav-item) {
        min-height: 36px;
        font-size: 0.84rem;
        padding: 0.38rem 0.85rem;
    }
    .btn-sm {
        min-height: 30px;
        font-size: 0.78rem !important;
        padding: 0.25rem 0.55rem !important;
    }
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    .ts-control {
        min-height: 40px !important;
        padding: 0.45rem 0.75rem !important;
        font-size: 0.88rem !important;
    }
    .ts-dropdown .option {
        padding: 0.65rem 0.85rem !important;
        font-size: 0.88rem !important;
    }
}

@media (max-width: 575.98px) {
    .stat-card {
        padding: 0.65rem 0.7rem;
        gap: 0.35rem;
        border-radius: var(--radius-xs);
    }
    .stat-number {
        font-size: clamp(1.1rem, 3.8vw, 1.25rem);
    }
    .stat-label {
        font-size: 0.63rem;
        letter-spacing: 0.02em;
    }
    .stat-sub {
        font-size: 0.64rem;
    }
    .stat-icon {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    .page-title-row h2 {
        font-size: 1.15rem;
    }
    .page-title-row p {
        font-size: 0.78rem;
    }
    .card-header-pills {
        width: 100%;
        display: flex;
    }
    .card-header-pills .nav-item {
        flex: 1;
    }
    .card-header-pills .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }
    .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100% - 1rem) !important;
    }
    .modal-content {
        border-radius: 12px !important;
    }
    .modal-header, .modal-footer {
        padding: 0.85rem 1rem !important;
    }
    .modal-body {
        padding: 1rem !important;
    }
    .page-title-row .d-flex.flex-wrap,
    .page-title-row .d-flex.gap-2 {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem !important;
        align-items: center;
    }
    .page-title-row .d-flex.flex-wrap > .btn,
    .page-title-row .d-flex.flex-wrap > .dropdown,
    .page-title-row .d-flex.gap-2 > .btn,
    .page-title-row .d-flex.gap-2 > .dropdown {
        flex: 0 1 auto;
        min-width: auto;
        padding: 0.32rem 0.65rem !important;
        font-size: 0.8rem !important;
    }
    .page-title-row .d-flex.flex-wrap > .dropdown > .dropdown-toggle,
    .page-title-row .d-flex.gap-2 > .dropdown > .dropdown-toggle {
        width: auto;
        padding: 0.32rem 0.65rem !important;
        font-size: 0.8rem !important;
    }
}

/* Tom Select Enterprise Styling */
.ts-wrapper {
    position: relative;
}
.ts-control {
    border: 1px solid #cbd5e1 !important;
    border-radius: var(--radius-xs) !important;
    padding: 0.45rem 0.75rem !important;
    min-height: 38px !important;
    font-size: 0.875rem !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
}
.ts-control:focus, .ts-wrapper.focus .ts-control {
    border-color: var(--slate-800) !important;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08) !important;
}
.ts-dropdown {
    border: 1px solid var(--slate-200) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1) !important;
    padding: 0.35rem !important;
    font-size: 0.86rem !important;
    z-index: 1060 !important;
}
.ts-dropdown .option {
    padding: 0.45rem 0.75rem !important;
    border-radius: var(--radius-xs) !important;
}
.ts-dropdown .active {
    background-color: var(--slate-100) !important;
    color: var(--slate-950) !important;
}

/* Back link breadcrumb navigation */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--slate-500);
    text-decoration: none;
    transition: color 0.15s ease;
}
.back-link:hover {
    color: var(--slate-900);
}

/* ApexCharts Container Polish */
.chart-container {
    min-height: 260px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.apexcharts-canvas {
    max-width: 100% !important;
    margin: 0 auto;
}
.apexcharts-canvas svg {
    max-width: 100% !important;
}
.apexcharts-tooltip {
    border-radius: 8px !important;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08) !important;
    border: 1px solid var(--slate-200) !important;
}

/* Report Mode Switcher & Presets */
.report-mode-nav {
    display: inline-flex;
    background: var(--slate-100);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    gap: 0.25rem;
}

.report-mode-btn {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--slate-600);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.report-mode-btn:hover {
    color: var(--slate-900);
    background: rgba(255, 255, 255, 0.6);
}

.report-mode-btn.active {
    background: #ffffff;
    color: var(--slate-950);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.preset-pill {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid var(--slate-200);
    background: #ffffff;
    color: var(--slate-600);
    text-decoration: none;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.preset-pill:hover {
    border-color: var(--slate-400);
    color: var(--slate-900);
    background: var(--slate-50);
}

.preset-pill.active {
    background: var(--slate-900);
    color: #ffffff;
    border-color: var(--slate-900);
}

.recon-guide-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

/* Compact Reconciliation Formula Banner */
.recon-formula-strip {
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    font-size: 0.84rem;
}

.math-operator-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--slate-200);
    color: var(--slate-700);
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* Responsive Action Header */
.page-action-strip,
.report-action-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.report-action-bar .btn,
.page-action-strip .btn {
    white-space: nowrap !important;
}

.btn-white {
    background-color: #ffffff;
    color: var(--slate-700);
    border: 1px solid var(--slate-300);
    font-size: 0.82rem;
    transition: all 0.15s ease;
    white-space: nowrap !important;
}
.btn-white:hover {
    background-color: var(--slate-50);
    color: var(--slate-950);
    border-color: var(--slate-400);
}

@media (min-width: 992px) {
    .page-action-strip,
    .report-action-bar {
        flex-wrap: nowrap;
    }
}

@media (max-width: 767.98px) {
    .report-action-bar {
        width: 100%;
    }
    .report-action-bar .btn-sm {
        font-size: 0.8125rem !important;
        min-height: 38px;
        padding: 0.35rem 0.65rem !important;
    }
}

@media (max-width: 575.98px) {
    .report-action-bar {
        width: 100%;
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.35rem;
    }
    .report-action-bar .report-btn-group {
        display: inline-flex !important;
        flex: 0 1 auto;
    }
    .report-action-bar .report-btn-group .dropdown {
        display: inline-flex;
    }
    .report-action-bar .report-btn-group .dropdown > button {
        width: auto;
        padding: 0.32rem 0.65rem !important;
        white-space: nowrap !important;
        font-size: 0.8rem !important;
    }
    .report-action-bar .report-btn-group > button {
        width: auto;
        padding: 0.32rem 0.65rem !important;
        white-space: nowrap !important;
        font-size: 0.8rem !important;
    }
    .report-action-bar > a.btn {
        flex: 0 1 auto;
        min-width: auto;
        padding: 0.32rem 0.65rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
        text-align: center;
    }
}

.recon-equation-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.recon-equation-scroll::-webkit-scrollbar {
    height: 4px;
}
.recon-equation-scroll::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 4px;
}

@media (max-width: 767.98px) {
    .report-mode-nav {
        display: flex;
        width: 100%;
    }
    .report-mode-btn {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 0.45rem 0.4rem;
        font-size: 0.78rem;
        text-align: center;
        white-space: nowrap;
    }
    .recon-formula-strip {
        padding: 0.5rem 0.75rem;
        font-size: 0.78rem;
    }
    .preset-pill {
        font-size: 0.75rem;
        padding: 0.25rem 0.55rem;
    }
    .card-modern > .p-4 {
        padding: 1.25rem 1rem !important;
    }
}



/* Print */
@media print {
    .app-layout, .app-main-content, .app-main-content > main {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .app-sidebar, .app-topbar, .mobile-bottom-nav, .btn, .no-print {
        display: none !important;
    }
    .card-modern, .mobile-card-item {
        border: 1px solid #ccc;
        box-shadow: none !important;
    }
    body {
        background: #fff;
        padding-bottom: 0 !important;
    }
}

/* ==========================================================================
   EXECUTIVE SLEEK DASHBOARD REDESIGN (Professional, Minimalist, No Cartoon)
   ========================================================================== */
.dash-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.dash-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin: 0;
    line-height: 1.2;
}
.dash-subtitle {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.25rem;
    margin-bottom: 0;
}
.dash-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Sleek KPI Metric Tiles */
.kpi-tile {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
}
.kpi-tile:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
}
.kpi-tile-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.4rem;
}
.kpi-tile-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.35rem;
}
.kpi-tile-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Office Trays Console Strip */
.tray-tile {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.15rem;
    height: 100%;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}
.tray-tile:hover {
    border-color: #0f172a;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.05);
}
.tray-tile.tray-has-action {
    border-color: #3b82f6;
    background: #fafcff;
}
.tray-tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}
.tray-tile-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
}
.tray-tile-count {
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.02em;
}
.tray-tile-status {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.35rem;
}

/* Executive Alert Strip */
.executive-alert {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #0f172a;
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.executive-alert.alert-warning-sleek {
    border-left-color: #f59e0b;
    background: #fffdfa;
    border-color: #fde68a;
}
.executive-alert.alert-danger-sleek {
    border-left-color: #ef4444;
    background: #fffafb;
    border-color: #fecdd3;
}
.executive-alert.alert-success-sleek {
    border-left-color: #10b981;
    background: #fbfefc;
    border-color: #bbf7d0;
}
.alert-text-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
}
.alert-text-sub {
    font-size: 0.77rem;
    color: #64748b;
    margin-top: 0.15rem;
}

/* Professional Surface Card */
.surface-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.surface-header {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}
.surface-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.surface-meta {
    font-size: 0.75rem;
    color: #64748b;
}

/* Minimalist Clean Badges */
.badge-minimal {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
}
.badge-minimal-slate {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.badge-minimal-blue {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}
.badge-minimal-green {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #d1fae5;
}
.badge-minimal-amber {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fef3c7;
}
.badge-minimal-rose {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #ffe4e6;
}
.badge-minimal-dark {
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
}
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot-green { background-color: #10b981; }
.status-dot-amber { background-color: #f59e0b; }
.status-dot-blue  { background-color: #3b82f6; }
.status-dot-rose  { background-color: #ef4444; }
.status-dot-slate { background-color: #94a3b8; }

/* Segmented Office Tray Navigation */
.segmented-nav {
    display: flex;
    background: #f1f5f9;
    padding: 0.3rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.segmented-nav::-webkit-scrollbar {
    display: none;
}
.segmented-nav .nav-item {
    flex: 1 1 auto;
    min-width: 140px;
}
.segmented-nav .nav-link {
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.6rem 0.85rem;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}
.segmented-nav .nav-link:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.5);
}
.segmented-nav .nav-link.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    border-color: #e2e8f0;
}

/* Executive Workflow Stepper */
.workflow-stepper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.4rem 0;
}
.workflow-stepper::-webkit-scrollbar {
    display: none;
}
.stepper-step {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}
.stepper-step.step-completed {
    background: #ecfdf5;
    color: #065f46;
    border-color: #d1fae5;
    font-weight: 600;
}
.stepper-step.step-active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    font-weight: 600;
}
.stepper-step.step-pending {
    color: #64748b;
}
.stepper-connector {
    color: #cbd5e1;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
}

/* Requisition Dossier Card */
.dossier-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    transition: all 0.2s ease;
    overflow: hidden;
}
.dossier-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}
.dossier-card.dossier-delayed {
    border-left: 4px solid #ef4444;
}
.dossier-header {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.dossier-body {
    padding: 1.15rem 1.25rem;
}
.dossier-footer {
    padding: 0.75rem 1.25rem;
    background: #fafcff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Requisition Form Wizard Header */
.form-wizard-strip {
    display: flex;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.form-wizard-step {
    flex: 1;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #64748b;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
}
.form-wizard-step:last-child {
    border-right: none;
}
.form-wizard-step.active {
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
}
.wizard-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #475569;
}
.form-wizard-step.active .wizard-badge {
    background: #0f172a;
    color: #ffffff;
}

/* Password Security Evaluation Meter */
.security-meter {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}
.security-progress {
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    overflow: hidden;
    margin-top: 0.4rem;
    margin-bottom: 0.5rem;
}
.security-progress-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}
.security-progress-fill.fill-weak {
    width: 25%;
    background-color: #ef4444;
}
.security-progress-fill.fill-fair {
    width: 50%;
    background-color: #f59e0b;
}
.security-progress-fill.fill-good {
    width: 75%;
    background-color: #3b82f6;
}
.security-progress-fill.fill-strong {
    width: 100%;
    background-color: #10b981;
}
.security-rule-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.72rem;
    color: #64748b;
}
.security-rule-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.security-rule-item.valid {
    color: #059669;
    font-weight: 500;
}

/* User Identity Context Strip & Spec Lists */
.identity-strip {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.user-avatar-badge {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.01em;
}
.spec-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.spec-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #f1f5f9;
}
.spec-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.spec-label {
    color: #64748b;
}
.spec-value {
    color: #0f172a;
    font-weight: 600;
}
.guideline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.guideline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.guideline-item:first-child {
    padding-top: 0;
}
.guideline-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.guideline-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.15rem;
}
.guideline-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
    margin: 0;
}

/* Requisition Workflow Guide (Clean, Modern & Fully Responsive) */
.workflow-guide-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.workflow-guide-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.workflow-guide-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.workflow-guide-num {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 6px;
    background: #0f172a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}
.workflow-guide-num.num-success {
    background: #10b981;
}
.workflow-guide-content {
    flex: 1 1 auto;
    min-width: 0;
}
.workflow-guide-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.2rem;
    line-height: 1.25;
}
.workflow-guide-desc {
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.35;
    margin: 0;
    word-break: break-word;
}
.workflow-guide-desc a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}
.workflow-guide-desc a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Comprehensive Mobile Phone & Desktop Responsiveness Rules
   ========================================================================== */

/* Touch Scroll Enhancements */
.segmented-nav,
.workflow-stepper,
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* Requisition Items Table Mobile Safeguard */
#itemsTable {
    min-width: 580px;
}

/* Responsive Breakpoints: Tablets & Phones (< 768px) */
@media (max-width: 767.98px) {
    .dash-page-header {
        margin-bottom: 1rem;
    }
    .dash-page-title {
        font-size: 1.3rem;
    }
    .dash-page-subtitle {
        font-size: 0.78rem;
    }

    /* Dossier Cards Mobile Layout */
    .dossier-header {
        padding: 0.75rem 1rem;
    }
    .dossier-body {
        padding: 0.85rem 1rem;
    }
    .dossier-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.65rem;
    }
    .dossier-footer > div {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .dossier-footer .btn {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
        min-height: 34px;
    }

    /* Mobile Card Layout for Materials Catalog */
    .mobile-card-item {
        border-radius: 8px;
        padding: 0.85rem 1rem;
        margin-bottom: 0.65rem;
    }
}

/* Responsive Breakpoints: Small Mobile Phones (< 576px) */
@media (max-width: 575.98px) {
    /* KPI Metric Cards Grid */
    .kpi-tile {
        padding: 0.75rem 0.85rem;
        min-height: 85px;
    }
    .kpi-tile-label {
        font-size: 0.66rem;
        margin-bottom: 0.2rem;
    }
    .kpi-tile-value {
        font-size: 1.35rem;
        margin-bottom: 0.2rem;
    }
    /* Office Tray Console Strip on Mobile */
    .tray-tile {
        padding: 0.75rem 0.85rem;
        min-height: 85px;
    }
    .tray-tile-header {
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-bottom: 0.25rem;
    }
    .tray-tile-title {
        font-size: 0.68rem;
    }
    .tray-tile-count {
        font-size: 1.35rem;
    }
    .tray-tile-status {
        font-size: 0.68rem;
        line-height: 1.2;
    }

    /* Requisition Workflow Guide Mobile */
    .workflow-guide-item {
        padding: 0.65rem 0.75rem;
        gap: 0.65rem;
    }
    .workflow-guide-num {
        width: 22px;
        height: 22px;
        min-width: 22px;
        font-size: 0.7rem;
    }
    .workflow-guide-title {
        font-size: 0.78rem;
    }
    .workflow-guide-desc {
        font-size: 0.72rem;
    }

    /* Segmented Office Tray Navigation */
    .segmented-nav {
        padding: 0.25rem;
        gap: 0.2rem;
    }
    .segmented-nav .nav-item {
        min-width: 125px;
    }
    .segmented-nav .nav-link {
        font-size: 0.75rem;
        padding: 0.45rem 0.6rem;
    }

    /* Workflow Pipeline Stepper */
    .workflow-stepper {
        padding: 0.25rem 0;
        gap: 0.2rem;
    }
    .stepper-step {
        font-size: 0.68rem;
        padding: 0.2rem 0.4rem;
        gap: 0.25rem;
    }

    /* Surface Card Header */
    .surface-card {
        border-radius: 8px;
    }
    .surface-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.35rem;
    }
    .surface-title {
        font-size: 0.82rem;
    }
    .surface-meta {
        display: block;
        margin-left: 0 !important;
        margin-top: 0.15rem;
        font-size: 0.72rem;
    }

    /* Executive Alert Banner */
    .executive-alert {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    .executive-alert > a.btn,
    .executive-alert > button.btn {
        width: auto;
        text-align: center;
        justify-content: center;
        flex-shrink: 0;
    }

    /* Requisition Form Wizard */
    .form-wizard-strip {
        margin-bottom: 1rem;
    }
    .form-wizard-step {
        padding: 0.5rem 0.25rem;
        font-size: 0.68rem;
        gap: 0.25rem;
        justify-content: center;
        text-align: center;
    }
    .wizard-badge {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        flex-shrink: 0;
    }

    /* Security Meter Checklist 2x2 Grid */
    .security-rule-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
        font-size: 0.7rem;
    }

    /* Requisition Submit Action Bar */
    .requisition-submit-bar {
        flex-direction: column-reverse;
        align-items: stretch !important;
        gap: 0.65rem !important;
    }
    .requisition-submit-bar .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Action Modal Adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-header,
    .modal-footer {
        padding: 0.75rem 1rem !important;
    }
    .modal-body {
        padding: 1rem !important;
    }
}

/* Compact Dashboard Action Cards */
.action-card-sleek {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    height: 100%;
}
.action-card-sleek:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}
.action-card-sleek-icon {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.action-card-sleek-body {
    min-width: 0;
    flex: 1;
}
.action-card-sleek-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.action-card-sleek-desc {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.25;
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.action-card-sleek-arrow {
    color: #94a3b8;
    font-size: 0.85rem;
    transition: transform 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}
.action-card-sleek:hover .action-card-sleek-arrow {
    color: #0f172a;
    transform: translateX(2px);
}

@media (max-width: 576px) {
    .action-card-sleek {
        padding: 0.6rem 0.8rem;
        gap: 0.65rem;
    }
    .action-card-sleek-icon {
        width: 32px;
        height: 32px;
        font-size: 0.88rem;
        border-radius: 6px;
    }
    .action-card-sleek-title {
        font-size: 0.8rem;
    }
    .action-card-sleek-desc {
        font-size: 0.68rem;
    }
}

/* ==========================================================================
   EXECUTIVE RED APPROVAL & REVIEW PIPELINE STEPPER
   Matches executive horizontal progress tracker in vibrant red palette
   Clean, Minimal, Pure Card (as in reference mockup)
   ========================================================================== */
.approval-pipeline-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 2.25rem 2rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.red-stepper-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}
.red-stepper-wrapper::-webkit-scrollbar {
    height: 4px;
}
.red-stepper-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.red-stepper-wrapper::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.red-stepper-track {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-width: 580px;
    width: 100%;
    position: relative;
}

.red-step-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    flex: 0 0 115px;
    max-width: 135px;
    z-index: 2;
}

.red-step-divider {
    flex: 1 1 auto;
    height: 3.5px;
    margin-top: 22px; /* Centered with 48px node */
    margin-left: 8px;
    margin-right: 8px;
    position: relative;
    z-index: 1;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}
.red-step-divider.divider-completed {
    background-color: #dc2626; /* Solid red */
}
.red-step-divider.divider-pending {
    background-color: #e2e8f0; /* Soft muted gray line */
}

.red-step-node {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.2s ease-in-out;
    position: relative;
    user-select: none;
}

/* 1. Completed: Solid Red Circle with White Checkmark */
.red-step-node.node-completed {
    background-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.25);
}
.red-step-node.node-completed i {
    font-size: 1.35rem;
    line-height: 1;
    font-weight: bold;
}

/* Pulsing Red Halo Animation for Active Step */
@keyframes red-halo-pulse {
    0% {
        box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.14), 0 0 20px rgba(220, 38, 38, 0.35);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.22), 0 0 28px rgba(220, 38, 38, 0.55);
    }
    100% {
        box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.14), 0 0 20px rgba(220, 38, 38, 0.35);
    }
}

/* 2. Active: Solid Red Circle with Step Number & Glowing Halo */
.red-step-node.node-active {
    background-color: #dc2626;
    color: #ffffff;
    font-size: 1.15rem;
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.14), 0 0 24px rgba(220, 38, 38, 0.45);
    transform: scale(1.04);
    animation: red-halo-pulse 2.5s infinite ease-in-out;
}

/* 3. Queried: Amber/Orange Circle with Alert Icon */
.red-step-node.node-queried {
    background-color: #f59e0b;
    color: #ffffff;
    font-size: 1.1rem;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.2), 0 0 20px rgba(245, 158, 11, 0.45);
}

/* 4. Pending: Soft Gray Circle with Step Number */
.red-step-node.node-pending {
    background-color: #f1f5f9;
    color: #94a3b8;
}

/* Titles & Subtitles */
.red-step-label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 0.85rem;
    line-height: 1.25;
    color: #0f172a;
    word-break: break-word;
}
.red-step-label.label-active {
    color: #dc2626;
    font-weight: 800;
}
.red-step-label.label-queried {
    color: #d97706;
    font-weight: 800;
}
.red-step-label.label-pending {
    color: #94a3b8;
    font-weight: 600;
}

.red-step-sub {
    font-size: 0.72rem;
    margin-top: 0.25rem;
    line-height: 1.2;
    color: #64748b;
    word-break: break-word;
}
.red-step-sub.sub-active {
    color: #334155;
    font-weight: 600;
}
.red-step-sub.sub-queried {
    color: #b45309;
    font-weight: 600;
}
.red-step-sub.sub-pending {
    color: #cbd5e1;
}

/* Compact version for dossier cards inside office_trays.php */
.red-stepper-compact .red-stepper-track {
    min-width: 460px;
}
.red-stepper-compact .red-step-col {
    flex: 0 0 88px;
    max-width: 105px;
}
.red-stepper-compact .red-step-node {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}
.red-stepper-compact .red-step-node.node-completed i {
    font-size: 1rem;
}
.red-stepper-compact .red-step-divider {
    margin-top: 15px;
    height: 2px;
}
.red-stepper-compact .red-step-label {
    font-size: 0.67rem;
    margin-top: 0.45rem;
}
.red-stepper-compact .red-step-sub {
    font-size: 0.64rem;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ========================================================================== */

/* Tablet (768px - 991px) */
@media (max-width: 991.98px) {
    .approval-pipeline-card {
        padding: 1.65rem 1.5rem;
        border-radius: 14px;
    }
    .red-stepper-track {
        min-width: 520px;
    }
    .red-step-col {
        flex: 0 0 95px;
        max-width: 115px;
    }
    .red-step-node {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }
    .red-step-divider {
        margin-top: 19px;
        height: 3px;
    }
    .red-step-label {
        font-size: 0.7rem;
    }
    .red-step-sub {
        font-size: 0.66rem;
    }
}

/* Mobile Phones (max-width: 767.98px) */
@media (max-width: 767.98px) {
    .approval-pipeline-card {
        padding: 1.35rem 0.85rem;
        border-radius: 14px;
        margin-bottom: 1.15rem;
    }
    .red-stepper-wrapper {
        padding: 0.25rem 0 0.5rem 0;
    }
    .red-stepper-track {
        min-width: 440px;
        padding-right: 0.5rem;
    }
    .red-step-col {
        flex: 0 0 80px;
        max-width: 90px;
    }
    .red-step-node {
        width: 36px;
        height: 36px;
        font-size: 0.88rem;
    }
    .red-step-node.node-completed i {
        font-size: 1.1rem;
    }
    .red-step-divider {
        margin-top: 17px;
        height: 2.5px;
        margin-left: 4px;
        margin-right: 4px;
    }
    .red-step-label {
        font-size: 0.63rem;
        letter-spacing: 0.02em;
        margin-top: 0.5rem;
        line-height: 1.2;
    }
    .red-step-sub {
        font-size: 0.6rem;
        margin-top: 0.15rem;
    }

    .red-stepper-compact .red-stepper-track {
        min-width: 400px;
    }
    .red-stepper-compact .red-step-col {
        flex: 0 0 74px;
        max-width: 82px;
    }
    .red-stepper-compact .red-step-node {
        width: 28px;
        height: 28px;
        font-size: 0.78rem;
    }
    .red-stepper-compact .red-step-divider {
        margin-top: 13px;
        height: 2px;
    }
    .red-stepper-compact .red-step-label {
        font-size: 0.6rem;
    }
    .red-stepper-compact .red-step-sub {
        font-size: 0.58rem;
    }
}

/* Extra Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .approval-pipeline-card {
        padding: 1.15rem 0.65rem;
    }
    .red-stepper-track {
        min-width: 380px;
    }
    .red-step-col {
        flex: 0 0 68px;
        max-width: 76px;
    }
    .red-step-node {
        width: 32px;
        height: 32px;
        font-size: 0.82rem;
    }
    .red-step-node.node-completed i {
        font-size: 1rem;
    }
    .red-step-divider {
        margin-top: 15px;
        height: 2px;
        margin-left: 2px;
        margin-right: 2px;
    }
    .red-step-label {
        font-size: 0.56rem;
        margin-top: 0.35rem;
        line-height: 1.15;
    }
    .red-step-sub {
        font-size: 0.53rem;
    }
}

/* Project Material Audit Dashboard Styles */
.filter-tab {
    transition: all 0.18s ease;
    border: none;
    font-size: 0.78rem;
}
.filter-tab.active {
    background-color: #0f172a !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15) !important;
}
.filter-tab:not(.active):hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}
.audit-search-box .input-group-text,
.audit-search-box .form-control {
    border-color: #e2e8f0;
}
.audit-search-box .form-control:focus {
    border-color: #94a3b8;
    box-shadow: none;
}
@media print {
    .no-print, nav, aside, .sidebar, .sidebar-overlay, .navbar, .mobile-dock, footer {
        display: none !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 10pt !important;
    }
    .container-fluid {
        padding: 0 !important;
    }
    .card-modern {
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
    }
    .table-modern thead th {
        background-color: #f1f5f9 !important;
        color: #000000 !important;
        border: 1px solid #cbd5e1 !important;
    }
    .table-modern tbody td,
    .table-modern tfoot td {
        border: 1px solid #e2e8f0 !important;
    }
}

/* Global Comprehensive Responsiveness Enforcements (Desktop & Mobile) */
@media (max-width: 991.98px) {
    main {
        padding-bottom: 85px !important;
    }
    .dash-page-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    body {
        overflow-x: hidden;
    }
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    .dash-title {
        font-size: 1.15rem !important;
    }
    .dash-subtitle {
        font-size: 0.72rem !important;
    }
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }
    .swal2-popup {
        width: 94vw !important;
        padding: 1rem !important;
    }
}

/* Prevent Mobile Input Auto-Zoom (Enforces 16px min font-size on Mobile Controls) */
@media (max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="search"],
    input[type="password"],
    input[type="email"],
    input[type="date"],
    select,
    textarea,
    .form-control,
    .form-select {
        font-size: 16px !important;
    }
}

