:root {
    --app-blue-50: #f1f6ff;
    --app-blue-100: #e3edff;
    --app-blue-200: #c6d9fb;
    --app-blue-500: #3478ee;
    --app-blue-600: #285ed0;
    --app-blue-700: #19429f;
    --app-navy: #0b1e49;
    --app-text: #172744;
    --app-muted: #637593;
    --app-border: #d7e1f1;
    --app-canvas: #f3f6fc;
    --bs-primary: #285ed0;
    --bs-primary-rgb: 40, 94, 208;
    --bs-link-color: #285ed0;
    --bs-link-hover-color: #173f9c;
}

body {
    font-family: Arial, sans-serif;
    color: var(--app-text);
}

.app-body {
    background: var(--app-canvas);
    color: var(--app-text);
}

a {
    color: var(--app-blue-600);
}

a:hover {
    color: var(--app-navy);
}

.layout-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 56px;
}

.sidebar {
    width: 276px;
    background: linear-gradient(180deg, #123a79 0%, #0b2455 48%, #081a3b 100%);
    color: #fff;
    min-height: calc(100vh - 56px);
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.navbar.bg-dark {
    background: linear-gradient(100deg, #174a9b 0%, #103776 46%, #0b214e 100%) !important;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1.1rem 0.85rem 0.85rem;
}

.brand-box {
    padding: 1rem 1rem 1.2rem;
    font-weight: 700;
    font-size: 1.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0.5rem;
}

.sidebar-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.55rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, #55c9f2 0%, #397cf3 58%, #354bc5 100%);
    color: #fff;
    font-size: 1.25rem;
}

.sidebar-heading-copy,
.account-details {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.sidebar-heading-copy strong {
    color: #f5f8f3;
    font-size: 0.9rem;
    font-weight: 700;
}

.sidebar-heading-copy small {
    margin-top: 0.12rem;
    color: #a9c5ed;
    font-size: 0.75rem;
}

.sidebar-navigation {
    flex: 1;
    padding-top: 1.1rem;
}

.sidebar-section + .sidebar-section {
    margin-top: 1.45rem;
}

.sidebar-section-label {
    padding: 0 0.7rem 0.55rem;
    color: #9bb6dc;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 43px;
    margin-bottom: 3px;
    padding: 0.65rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #d1def2;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

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

.sidebar .nav-link.active {
    border-color: rgba(112, 174, 255, 0.28);
    background: linear-gradient(100deg, rgba(62, 132, 239, 0.3), rgba(61, 91, 196, 0.18));
    color: #fff;
}

.sidebar .nav-icon {
    width: 1.15rem;
    color: #a9c4e8;
    font-size: 1rem;
    text-align: center;
}

.sidebar .nav-link.active .nav-icon {
    color: #79c9ff;
}

.sidebar-account {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.5rem;
    padding: 0.8rem 0.45rem 0.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.account-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #2866bf, #253d83);
    color: #b7e4ff;
}

.account-details {
    flex: 1;
}

.account-details strong {
    overflow: hidden;
    color: #f1f5f2;
    font-size: 0.77rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-details small {
    margin-top: 0.12rem;
    color: #a9c5ed;
    font-size: 0.7rem;
}

.account-menu-icon {
    color: #a9c5ed;
}

.main-content {
    margin-left: 276px;
    width: calc(100% - 276px);
    padding: 1rem 1.5rem 2rem;
}

.app-footer {
    padding: 1.25rem 0 0.25rem;
    color: var(--app-muted);
    font-size: 0.78rem;
    text-align: center;
}

.app-footer strong {
    color: var(--app-blue-700);
}

.app-footer span {
    margin-left: 0.2rem;
    color: var(--app-muted);
}

.reports-body .app-footer,
.disposal-review-body .app-footer {
    display: none;
}

.login-bg {
    background: linear-gradient(135deg, #e8f1ff 0%, #d5e5ff 38%, #f2f6fc 100%);
}

.card {
    border: 0;
    border-radius: 18px;
    color: var(--app-text);
}

.dashboard-stat {
    min-height: 142px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 10px 22px rgba(12, 33, 78, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.dashboard-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(12, 33, 78, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.dashboard-stat .card-body {
    gap: 1rem;
    padding: 1rem 1.05rem;
}

.stat-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.stat-label {
    padding-top: 0.2rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
}

.stat-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1rem;
}

.stat-value {
    color: #fff;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
}

.tile-gradient-blue {
    background: linear-gradient(180deg, #3c76f5 0%, #142c70 100%) !important;
}

.tile-gradient-cyan {
    background: linear-gradient(180deg, #1688c7 0%, #083d82 100%) !important;
}

.tile-gradient-indigo {
    background: linear-gradient(180deg, #4b5acb 0%, #142258 100%) !important;
}

.tile-gradient-violet {
    background: linear-gradient(180deg, #704af0 0%, #29136f 100%) !important;
}

.tile-gradient-teal {
    background: linear-gradient(180deg, #0b78a6 0%, #09234e 100%) !important;
}

.table thead th {
    background: var(--app-blue-50);
    color: #29456f;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table > :not(caption) > * > * {
    border-color: var(--app-border);
}

.badge {
    font-size: 0.72rem;
    padding: 0.45em 0.7em;
}

.form-control, .form-select {
    border-radius: 10px;
    border-color: #cbd7e9;
    color: var(--app-text);
}

.form-control:focus,
.form-select:focus {
    border-color: #6c9cf0;
    box-shadow: 0 0 0 0.22rem rgba(52, 120, 238, 0.18);
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #3c7ef3 0%, #285ed0 54%, #173e9e 100%);
    color: #fff;
    box-shadow: 0 4px 10px rgba(40, 94, 208, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: transparent;
    background: linear-gradient(135deg, #2d68d5 0%, #1c4aa9 100%);
    color: #fff;
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 0.22rem rgba(52, 120, 238, 0.28);
}

.btn-outline-primary {
    border-color: #4776ce;
    color: #2456b5;
}

.btn-outline-primary:hover {
    border-color: #2456b5;
    background: #2456b5;
    color: #fff;
}

.bg-primary {
    background: linear-gradient(135deg, #3c7ef3, #173e9e) !important;
}

.text-primary,
.link-primary {
    color: #285ed0 !important;
}

.form-check-input:checked {
    border-color: #285ed0;
    background-color: #285ed0;
}

.form-check-input:focus {
    border-color: #6c9cf0;
    box-shadow: 0 0 0 0.22rem rgba(52, 120, 238, 0.18);
}

.disposal-quantity {
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.8rem;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-blue-50);
}

.disposal-quantity small {
    color: var(--app-muted);
    font-size: 0.72rem;
}

.disposal-quantity strong {
    color: var(--app-navy);
    font-size: 1.25rem;
}

.disposal-print-sheet {
    max-width: 900px;
    margin: 0 auto 1.5rem;
    padding: 2rem;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 48, 96, 0.08);
}

.disposal-print-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid var(--app-blue-600);
}

.disposal-print-mark {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #55c9f2 0%, #397cf3 58%, #354bc5 100%);
    color: #fff;
    font-size: 1.4rem;
}

.disposal-print-heading p {
    margin: 0 0 0.2rem;
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.disposal-print-heading h1 {
    margin: 0;
    color: var(--app-navy);
    font-size: 1.45rem;
    font-weight: 700;
}

.disposal-print-table th {
    width: 34%;
    color: #29456f;
    font-weight: 600;
}

.disposal-print-table td,
.disposal-print-table th {
    padding: 0.85rem 0.75rem;
    border-color: var(--app-border);
    vertical-align: top;
}

.disposal-signature-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
    margin-top: 3.5rem;
    color: var(--app-text);
    font-size: 0.9rem;
    font-weight: 600;
    break-inside: avoid;
}

.disposal-signature-line {
    height: 2.5rem;
    border-bottom: 1px solid #33415a;
}

.disposal-print-footer {
    margin-top: 2rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--app-border);
    color: var(--app-muted);
    font-size: 0.75rem;
    text-align: center;
}

.disposal-print-footer strong {
    color: var(--app-blue-700);
}

.disposal-upload-card {
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

.disposal-report-sheet {
    padding: 1.5rem;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 48, 96, 0.08);
}

.inventory-report-sheet {
    margin-top: 1.5rem;
}

.disposal-report-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--app-blue-600);
}

.disposal-report-heading p {
    margin: 0 0 0.25rem;
    color: var(--app-blue-600);
    font-size: 0.8rem;
    font-weight: 700;
}

.disposal-report-heading h3 {
    margin: 0;
    color: var(--app-navy);
    font-size: 1.35rem;
}

.disposal-report-heading span {
    display: inline-block;
    margin-top: 0.35rem;
    color: var(--app-muted);
    font-size: 0.8rem;
}

.disposal-report-actions {
    display: flex;
    gap: 0.5rem;
}

.disposal-report-table {
    margin: 0;
    font-size: 0.85rem;
}

.disposal-report-table th,
.disposal-report-table td {
    padding: 0.65rem 0.55rem;
    border-color: var(--app-border);
    vertical-align: middle;
}

.disposal-report-table tfoot {
    background: var(--app-blue-50);
    color: var(--app-navy);
    font-weight: 700;
}

.disposal-report-footer {
    margin-top: 1.25rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--app-border);
    color: var(--app-muted);
    font-size: 0.75rem;
    text-align: center;
}

.disposal-report-footer strong {
    color: var(--app-blue-700);
}

@media print {
    @page {
        size: A4;
        margin: 0.5in;
    }

    body::after {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        display: block !important;
        padding: 3mm 0 1mm;
        border-top: 1px solid #b8c7dc;
        background: #fff;
        color: #425675;
        content: "Powered by EasyTech 0321-8628218";
        font-size: 9pt;
        text-align: center;
        visibility: visible !important;
    }

    .app-footer {
        display: none !important;
    }

    body.disposal-review-body::after {
        display: none !important;
        content: none !important;
    }

    body.disposal-review-body * {
        visibility: hidden !important;
    }

    body.disposal-review-body .disposal-print-sheet,
    body.disposal-review-body .disposal-print-sheet * {
        visibility: visible !important;
    }

    .navbar,
    .sidebar,
    .disposal-print-actions,
    .disposal-upload-card {
        display: none !important;
    }

    body.disposal-review-body .main-content {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.disposal-review-body .disposal-print-sheet {
        position: static;
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    body.disposal-report-printing * {
        visibility: hidden !important;
    }

    body.disposal-report-printing::after {
        display: none !important;
        content: none !important;
    }

    body.disposal-report-printing .disposal-report-sheet,
    body.disposal-report-printing .disposal-report-sheet * {
        visibility: visible !important;
    }

    body.disposal-report-printing .navbar,
    body.disposal-report-printing .sidebar,
    body.disposal-report-printing .app-footer,
    body.disposal-report-printing .main-content > :not(.reports-page),
    body.disposal-report-printing .reports-page > :not(#disposal-report-sheet) {
        display: none !important;
    }

    body.disposal-report-printing .layout-wrapper {
        display: block;
        min-height: 0;
        padding: 0;
    }

    body.disposal-report-printing .main-content {
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.disposal-report-printing .reports-page {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    body.disposal-report-printing .disposal-report-sheet,
    body.disposal-report-printing .disposal-report-sheet * {
        visibility: visible !important;
    }

    body.disposal-report-printing .disposal-report-sheet {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 0.5in;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    body.inventory-report-printing * {
        visibility: hidden !important;
    }

    body.inventory-report-printing::after {
        display: none !important;
        content: none !important;
    }

    body.inventory-report-printing .inventory-report-sheet,
    body.inventory-report-printing .inventory-report-sheet * {
        visibility: visible !important;
    }

    body.inventory-report-printing .navbar,
    body.inventory-report-printing .sidebar,
    body.inventory-report-printing .app-footer,
    body.inventory-report-printing .main-content > :not(.reports-page),
    body.inventory-report-printing .reports-page > :not(.inventory-report-sheet) {
        display: none !important;
    }

    body.inventory-report-printing .layout-wrapper {
        display: block;
        min-height: 0;
        padding: 0;
    }

    body.inventory-report-printing .main-content {
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.inventory-report-printing .reports-page {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    body.inventory-report-printing .inventory-report-sheet {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 0.5in;
    }

    body.inventory-report-printing .disposal-report-actions {
        display: none !important;
    }

    body.inventory-report-printing .inventory-report-table {
        font-size: 10pt;
    }

    body.disposal-report-printing .disposal-report-actions {
        display: none !important;
    }

    body.disposal-report-printing .disposal-report-table {
        font-size: 9pt;
    }

    body.disposal-report-printing .disposal-report-table th,
    body.disposal-report-printing .disposal-report-table td {
        padding: 0.12in 0.1in;
    }
}

::selection {
    background: #c6d9fb;
    color: #0b1e49;
}

@media (max-width: 992px) {
    .layout-wrapper {
        display: block;
        padding-top: 56px;
    }

    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .sidebar-menu {
        min-height: auto;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
    }
}
