* { box-sizing: border-box; }

:root {
    --navy: #17365d;
    --navy-dark: #102a4a;
    --blue: #2563eb;
    --gold: #b88a2b;
    --ink: #172033;
    --muted: #667085;
    --surface: #ffffff;
    --surface-soft: #f6f7f9;
    --border: #e5e7eb;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f6f8;
}

/* Windows-inspired login */
.windows-login {
    overflow-x: hidden;
}

.login-wallpaper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, #f8f7f2 0%, #eef2f7 48%, #dfe7f0 100%);
}

.login-wallpaper::before {
    content: "";
    position: absolute;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    right: -210px;
    top: -280px;
    background: radial-gradient(circle, rgba(23,54,93,.20), transparent 66%);
}

.login-wallpaper::after {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    left: -250px;
    bottom: -250px;
    background: radial-gradient(circle, rgba(184,138,43,.14), transparent 66%);
}

.login-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
}

.glow-one {
    width: 180px;
    height: 180px;
    background: rgba(37,99,235,.12);
    right: 18%;
    bottom: 14%;
}

.glow-two {
    width: 100px;
    height: 100px;
    background: rgba(184,138,43,.13);
    left: 18%;
    top: 18%;
}

.login-container {
    width: min(100%, 480px);
    padding: 24px;
    position: relative;
    z-index: 2;
}

.windows-acrylic {
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(255,255,255,.82);
    box-shadow:
        0 28px 90px rgba(16,42,74,.16),
        0 3px 12px rgba(16,42,74,.07);
    backdrop-filter: blur(25px) saturate(130%);
}

.login-card {
    padding: 38px;
    border-radius: 22px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 13px;
}

.app-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 800;
    font-size: 23px;
    background: linear-gradient(145deg, var(--navy), #28558c);
    box-shadow: inset 0 1px rgba(255,255,255,.25);
}

.brand-kicker {
    font-size: 11px;
    letter-spacing: .14em;
    font-weight: 800;
    color: #697586;
}

.brand-name {
    font-weight: 750;
    font-size: 17px;
    color: var(--navy-dark);
}

.login-heading {
    margin: 42px 0 26px;
}

.login-heading h1 {
    font-size: 30px;
    letter-spacing: -.025em;
    font-weight: 700;
    margin: 0 0 7px;
}

.login-heading p {
    color: var(--muted);
    margin: 0;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 7px;
}

.field input,
.form-control {
    width: 100%;
    display: block;
    border-radius: 10px;
    border: 1px solid #d4d8de;
    min-height: 46px;
    padding: 0 13px;
    box-shadow: 0 1px 2px rgba(16,24,40,.03);
}

.password-wrap {
    position: relative;
    width: 100%;
}

.password-wrap input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #687586;
    cursor: pointer;
    transition: .15s ease;
}

.password-toggle:hover {
    background: #eef2f6;
    color: var(--navy);
}

.password-toggle:focus-visible {
    outline: 2px solid rgba(37,99,235,.28);
    outline-offset: 1px;
}

.eye-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eye-closed {
    display: none;
}

.password-toggle.is-visible .eye-open {
    display: none;
}

.password-toggle.is-visible .eye-closed {
    display: block;
}

.field input:focus,
.form-control:focus {
    border-color: #5d7fa6;
    box-shadow: 0 0 0 3px rgba(37,99,235,.10);
}

.windows-button {
    min-height: 44px;
    border-radius: 9px;
    border: 1px solid #cdd3da;
    padding: 0 17px;
    background: white;
    color: var(--ink);
    font-weight: 650;
    transition: .16s ease;
}

.windows-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(16,24,40,.10);
}

.windows-button.primary {
    color: white;
    border-color: var(--navy);
    background: linear-gradient(180deg, #234a78, #17365d);
}

.button-arrow {
    float: right;
    font-size: 20px;
    line-height: 18px;
}

.windows-alert {
    border: 1px solid rgba(180,60,60,.20);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: rgba(255,244,244,.92);
    color: #8b2d2d;
    font-size: 13px;
}

.success-alert {
    border-color: rgba(25,135,84,.20);
    background: #effaf3;
    color: #17653f;
}

.login-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(0,0,0,.07);
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 11px;
    color: #7a8491;
    text-align: center;
}

/* Application */
.app-body {
    background: #f5f6f8;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    background: linear-gradient(180deg, #17365d 0%, #102a4a 100%);
    color: white;
    padding: 20px 14px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 8px 0 30px rgba(16,42,74,.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    text-decoration: none;
    padding: 7px 10px 25px;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.12);
    font-size: 20px;
    font-weight: 800;
}

.sidebar-brand strong {
    display: block;
    font-size: 16px;
}

.sidebar-brand small {
    color: #b8c6d8;
    font-size: 10px;
}

.nav-caption {
    margin: 17px 10px 7px;
    color: #8fa4bd;
    font-size: 10px;
    letter-spacing: .12em;
    font-weight: 750;
    text-transform: uppercase;
}

.side-link {
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    color: #d8e1eb;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 3px;
}

.side-link:hover,
.side-link.active {
    color: white;
    background: rgba(255,255,255,.105);
}

.side-icon {
    width: 22px;
    text-align: center;
    opacity: .9;
}

.coming {
    margin-left: auto;
    font-size: 9px;
    color: #9fb2c8;
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,.09);
    padding: 16px 8px 5px;
}

.mini-user,
.topbar-account,
.user-table {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-user-text {
    min-width: 0;
}

.mini-user-text strong,
.mini-user-text small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-user-text strong {
    font-size: 12px;
}

.mini-user-text small {
    color: #9fb2c8;
    font-size: 10px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    background: #e7edf4;
    color: var(--navy);
    font-weight: 750;
    font-size: 12px;
}

.avatar.small {
    width: 34px;
    height: 34px;
}

.logout-link {
    display: block;
    color: #b9c7d7;
    text-decoration: none;
    font-size: 11px;
    margin: 13px 2px 0;
}

.logout-link:hover {
    color: white;
}

.main-area {
    margin-left: 264px;
    min-height: 100vh;
}

.topbar {
    height: 76px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,.88);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: blur(14px);
}

.topbar-title {
    font-weight: 700;
    font-size: 14px;
}

.topbar-subtitle {
    color: #7a8491;
    font-size: 10px;
    margin-top: 2px;
}

.topbar-account span,
.topbar-account strong {
    display: block;
}

.topbar-account strong {
    font-size: 12px;
}

.topbar-account span {
    font-size: 10px;
    color: #7a8491;
}

.page-content {
    padding: 30px 32px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.eyebrow {
    font-size: 10px;
    color: #748196;
    font-weight: 800;
    letter-spacing: .14em;
    margin-bottom: 5px;
}

.page-heading h1 {
    font-size: 26px;
    font-weight: 720;
    letter-spacing: -.02em;
    margin: 0;
}

.page-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.windows-chip,
.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
    padding: 6px 10px;
}

.windows-chip {
    color: var(--navy);
    background: #e8eef5;
    border: 1px solid #d8e1eb;
}

.windows-chip.neutral {
    color: #687385;
    background: #f1f3f5;
    border-color: #e5e7eb;
}

.stat-card {
    min-height: 140px;
    padding: 21px;
    border-radius: 14px;
    background: white;
    border: 1px solid #e4e7eb;
    box-shadow: 0 5px 20px rgba(16,24,40,.035);
}

.stat-label {
    display: block;
    color: #737e8d;
    font-size: 11px;
    margin-bottom: 8px;
}

.stat-card strong {
    display: block;
    font-size: 31px;
    line-height: 1;
    font-weight: 730;
    color: var(--navy-dark);
}

.stat-card small {
    display: block;
    margin-top: 12px;
    color: #8a94a2;
    font-size: 10px;
}

.content-card {
    border: 1px solid #e4e7eb;
    border-radius: 14px;
    background: white;
    box-shadow: 0 5px 20px rgba(16,24,40,.035);
    padding: 22px;
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-header h2 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.section-header p {
    margin: 5px 0 0;
    font-size: 11px;
    color: var(--muted);
}

.dummy-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dummy-panel {
    min-height: 110px;
    display: flex;
    align-items: flex-end;
    padding: 15px;
    border: 1px dashed #d8dde4;
    border-radius: 12px;
    color: #7b8491;
    font-size: 11px;
    background: #fafbfc;
}

.status-pill.success {
    color: #17653f;
    background: #eaf7ef;
}

.status-pill.muted {
    color: #667085;
    background: #f0f2f4;
}

.table thead th {
    font-size: 10px;
    color: #7a8491;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom-color: #e8ebef;
}

.table tbody td {
    font-size: 12px;
    border-bottom-color: #eef0f2;
}

.user-table span {
    display: block;
    color: #7a8491;
    font-size: 10px;
}

.table-action {
    border: 0;
    background: transparent;
    color: var(--navy);
    font-size: 10px;
    font-weight: 700;
    padding: 5px 6px;
}

.table-action.danger {
    color: #a33b3b;
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    background: #e8eef5;
    color: var(--navy);
    font-size: 22px;
    font-weight: 800;
}

.profile-summary h2 {
    font-size: 17px;
    margin: 0;
}

.profile-summary p {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--muted);
}

.app-footer {
    padding: 18px 32px 26px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #8993a0;
    font-size: 10px;
}

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #f5f6f8;
}

.error-card {
    text-align: center;
    padding: 40px;
}

.error-code {
    color: var(--navy);
    font-size: 72px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 15px;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .main-area {
        margin-left: 0;
    }

    .topbar {
        position: static;
    }

    .dummy-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .page-content {
        padding: 22px 16px;
    }

    .topbar {
        padding: 0 16px;
    }

    .page-heading {
        flex-direction: column;
    }

    .dummy-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 28px 22px;
    }

    .login-footer {
        flex-direction: column;
    }
}


/* Login form width fix */
.login-card form {
    width: 100%;
}

.login-card .field {
    width: 100%;
}

.login-card .field input,
.login-card .password-wrap,
.login-card .password-wrap input {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
}

.login-card .field input {
    display: block;
    box-sizing: border-box;
}

.login-card .password-wrap {
    display: block;
}

.login-card .password-wrap input {
    display: block;
}

/* Management User enhancements */
.stat-card.compact {
    min-height: 120px;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 10px;
    font-weight: 750;
    color: #214e7c;
    background: #edf3f9;
}

.role-pill.gold {
    color: #765515;
    background: #f8f0dc;
}

.table-lock {
    color: #8a94a2;
    font-size: 10px;
    font-weight: 650;
    margin-left: 4px;
}

.user-form-card {
    max-width: 980px;
}

.form-note {
    padding: 12px 14px;
    border-radius: 10px;
    background: #f7f9fb;
    border: 1px solid #e6eaf0;
    color: #6d7785;
    font-size: 11px;
}

.form-select {
    min-height: 46px;
    border-radius: 10px;
    border-color: #d4d8de;
}

.form-select:focus {
    border-color: #5d7fa6;
    box-shadow: 0 0 0 3px rgba(37,99,235,.10);
}


/* Category management */
.category-rule-card {
    background: linear-gradient(180deg, #fff, #fbfcfd);
}

.rule-title {
    color: var(--navy-dark);
    font-size: 13px;
    font-weight: 750;
    margin-bottom: 10px;
}

.category-rules {
    margin: 0;
    padding-left: 18px;
    color: #697586;
    font-size: 11px;
}

.category-rules li {
    margin-bottom: 8px;
}

.category-list {
    display: flex;
    flex-direction: column;
}

.category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 4px;
    border-bottom: 1px solid #edf0f3;
}

.category-row:last-child {
    border-bottom: 0;
}

.category-main {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.category-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #edf2f7;
    color: var(--navy);
    font-size: 14px;
    font-weight: 800;
}

.category-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

.category-description {
    color: #7a8491;
    font-size: 10px;
    margin-top: 4px;
}

.category-meta {
    color: #9aa3ae;
    font-size: 9px;
    margin-top: 6px;
}

.category-meta strong {
    color: #6d7785;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.category-badge.default {
    color: #80621f;
    background: #f8f1df;
    border: 1px solid #eadbb5;
}

.category-badge.custom {
    color: #315d86;
    background: #eaf1f8;
    border: 1px solid #d7e3ef;
}

.category-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: wrap;
}

.empty-state {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #7a8491;
    font-size: 12px;
    gap: 4px;
}

.empty-state strong {
    color: var(--ink);
}

@media (max-width: 767.98px) {
    .category-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-actions {
        width: 100%;
        justify-content: flex-start;
        padding-left: 53px;
    }
}


/* Item type management */
.item-category-heading {
    margin-top: 8px;
    padding: 10px 4px;
    border-bottom: 1px solid #e9edf1;
    color: var(--navy-dark);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.item-category-heading:first-child {
    margin-top: 0;
}

.category-folder-icon {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-right: 6px;
    border-radius: 7px;
    background: #edf2f7;
    color: var(--navy);
}

.item-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 4px 14px 34px;
    border-bottom: 1px solid #f0f2f4;
}

.item-type-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.item-type-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f1f4f7;
    color: #536a82;
    font-size: 13px;
}

.item-type-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
}

.windows-modal {
    border: 1px solid #e0e5ea;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(16,42,74,.18);
}

.windows-modal .modal-header {
    padding: 20px 22px 14px;
    border-bottom: 1px solid #edf0f3;
}

.windows-modal .modal-body {
    padding: 20px 22px;
}

.windows-modal .modal-footer {
    padding: 13px 22px;
    border-top: 1px solid #edf0f3;
    background: #fafbfc;
}

.item-popup-info {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 11px;
    background: #f2f6fa;
    border: 1px solid #e0e8f0;
}

.item-popup-icon {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #e0e9f2;
    color: var(--navy);
    font-weight: 800;
}

.item-popup-info strong,
.item-popup-info small {
    display: block;
}

.item-popup-info strong {
    color: var(--navy-dark);
    font-size: 11px;
}

.item-popup-info small {
    color: #7b8694;
    font-size: 9px;
    margin-top: 2px;
}

.form-select {
    min-height: 46px;
    border-radius: 10px;
    border-color: #d4d8de;
    font-size: 12px;
}

.form-select:focus {
    border-color: #5d7fa6;
    box-shadow: 0 0 0 3px rgba(37,99,235,.10);
}

.stat-card.compact {
    min-height: 125px;
}


/* Ajuan BHP module */
.status-pill.warning {
    color: #805d17;
    background: #fbf2dc;
}

.status-pill.info {
    color: #285a87;
    background: #eaf2f9;
}

.info-alert {
    border-color: #d6e4f1;
    background: #f1f7fc;
    color: #315d83;
}

.warning-alert {
    border-color: #eadbb5;
    background: #fbf7ea;
    color: #765b20;
}

.ajuan-items-head,
.ajuan-item-row {
    display: grid;
    grid-template-columns:
        minmax(145px, 1.15fr)
        minmax(145px, 1.15fr)
        minmax(150px, 1.25fr)
        minmax(120px, .9fr)
        minmax(90px, .7fr)
        minmax(115px, .9fr)
        minmax(145px, 1.1fr)
        minmax(190px, 1.45fr)
        36px;
    gap: 9px;
    align-items: end;
}

.ajuan-items-head {
    padding: 0 6px 9px;
    color: #7a8491;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.ajuan-item-row {
    padding: 13px 6px;
    border-top: 1px solid #edf0f3;
}

.item-field label {
    display: none;
    color: #788493;
    font-size: 9px;
    font-weight: 750;
    margin-bottom: 5px;
}

.item-field .form-control,
.item-field .form-select {
    min-height: 40px;
    font-size: 11px;
}

.item-total {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid #e2e6ea;
    border-radius: 9px;
    background: #f8fafb;
    color: var(--navy-dark);
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.remove-item {
    width: 34px;
    height: 40px;
    border: 1px solid #eadada;
    border-radius: 9px;
    background: #fff7f7;
    color: #a33b3b;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

.remove-item:hover {
    background: #fbecec;
}

.ajuan-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 15px;
    padding: 18px 8px 4px;
    border-top: 1px solid #e5e8ec;
}

.ajuan-total span {
    color: #697586;
    font-size: 11px;
    font-weight: 700;
}

.ajuan-total strong {
    min-width: 180px;
    text-align: right;
    color: var(--navy-dark);
    font-size: 20px;
}

.form-actions-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.form-hint {
    color: #8993a0;
    font-size: 10px;
}

@media (max-width: 1400px) {
    .ajuan-items-head {
        display: none;
    }

    .ajuan-item-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: end;
        padding: 16px 5px;
    }

    .item-field label {
        display: block;
    }

    .category-field { grid-column: span 1; }
    .type-field { grid-column: span 1; }
    .specification-field { grid-column: span 2; }
    .price-field { grid-column: span 1; }
    .quantity-field { grid-column: span 1; }
    .unit-field { grid-column: span 1; }
    .total-field { grid-column: span 1; }
    .link-field { grid-column: span 3; }
    .action-field { grid-column: span 1; }
}

@media (max-width: 767.98px) {
    .ajuan-item-row {
        grid-template-columns: 1fr 1fr;
        padding: 16px 0;
    }

    .category-field,
    .type-field,
    .specification-field,
    .price-field,
    .quantity-field,
    .unit-field,
    .total-field,
    .link-field,
    .action-field {
        grid-column: span 1;
    }

    .specification-field,
    .link-field {
        grid-column: span 2;
    }

    .ajuan-total {
        justify-content: space-between;
    }

    .ajuan-total strong {
        min-width: auto;
    }

    .form-actions-bar {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   VERIFICATION WORKSPACE - Windows UI
   ========================================================= */
.verification-workspace { overflow: hidden; }
.verification-list { display: flex; flex-direction: column; gap: 14px; }
.verification-item { border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(16,42,74,.04); overflow: hidden; }
.verification-item-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 16px; background:linear-gradient(180deg,#f8fafc,#f3f6fa); border-bottom:1px solid var(--border); }
.verification-item-title { display:flex; align-items:center; gap:12px; min-width:0; }
.verification-item-title strong { display:block; color:var(--ink); font-size:15px; }
.verification-item-title small { display:block; margin-top:3px; color:var(--muted); }
.verification-number { width:32px; height:32px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; background:#e8eef6; color:var(--navy); font-weight:700; flex:0 0 32px; }
.verification-grid { display:grid; grid-template-columns:minmax(260px,2fr) minmax(180px,1fr) minmax(150px,.8fr) minmax(150px,.8fr) minmax(190px,1fr) minmax(150px,.8fr) minmax(260px,1.6fr); gap:14px; padding:16px; align-items:start; }
.verification-field { min-width:0; }
.verification-field label { display:block; margin:0 0 6px; font-size:11px; font-weight:700; color:#51627a; text-transform:uppercase; letter-spacing:.04em; }
.verification-field .form-control, .verification-field .form-select { min-height:42px; border-radius:10px; border-color:#d5dce5; }
.verification-field textarea.form-control { min-height:72px; resize:vertical; }
.verification-field .form-control:focus, .verification-field .form-select:focus { border-color:#8ca8c9; box-shadow:0 0 0 3px rgba(37,99,235,.10); }
.verification-readonly { min-height:42px; display:flex; align-items:center; gap:5px; padding:9px 12px; border:1px solid #e1e6ec; border-radius:10px; background:#f7f8fa; color:#24364f; font-weight:600; }
.verification-readonly span { color:var(--muted); font-weight:500; }
.verification-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:4px; padding-top:16px; border-top:1px solid var(--border); }
.verification-help { color:var(--muted); font-size:12px; }
@media (max-width:1400px) { .verification-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } .verification-wide { grid-column:span 2; } .verification-note { grid-column:span 2; } }
@media (max-width:900px) { .verification-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .verification-wide,.verification-note { grid-column:span 2; } .verification-actions { flex-direction:column; align-items:stretch; } }
@media (max-width:576px) { .verification-item-head { align-items:flex-start; flex-direction:column; } .verification-grid { grid-template-columns:1fr; padding:12px; } .verification-wide,.verification-note { grid-column:span 1; } }


/* ============================================================
   BHPfikom — AJUAN GABUNGAN / WINDOWS UI
   Scoped hanya untuk halaman ajuan_gabungan.php.
   Tidak mengubah struktur atau data modul lain.
   ============================================================ */
body[data-page="ajuan_gabungan.php"] .page-content {
    padding: 28px 30px 34px;
}

body[data-page="ajuan_gabungan.php"] .content-card,
body[data-page="ajuan_gabungan.php"] .ajuan-gabungan-card,
body[data-page="ajuan_gabungan.php"] .gabungan-card {
    background: #fff;
    border: 1px solid #e1e6ec;
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(16,24,40,.045);
}

body[data-page="ajuan_gabungan.php"] .section-header,
body[data-page="ajuan_gabungan.php"] .gabungan-header {
    padding: 20px 22px 16px;
}

body[data-page="ajuan_gabungan.php"] table.table,
body[data-page="ajuan_gabungan.php"] .ajuan-gabungan-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

body[data-page="ajuan_gabungan.php"] .table-responsive {
    border: 1px solid #e5e9ee;
    border-radius: 12px;
    background: #fff;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body[data-page="ajuan_gabungan.php"] table.table thead th,
body[data-page="ajuan_gabungan.php"] .ajuan-gabungan-table thead th {
    background: #f4f7fa !important;
    color: #53657a !important;
    border-bottom: 1px solid #dfe5eb !important;
    border-top: 0 !important;
    padding: 13px 14px !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
    font-weight: 800 !important;
    letter-spacing: .055em !important;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

body[data-page="ajuan_gabungan.php"] table.table tbody td,
body[data-page="ajuan_gabungan.php"] .ajuan-gabungan-table tbody td {
    padding: 14px !important;
    color: #243447 !important;
    border-bottom: 1px solid #edf0f3 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    vertical-align: middle !important;
    white-space: normal;
}

body[data-page="ajuan_gabungan.php"] table.table tbody tr:last-child td,
body[data-page="ajuan_gabungan.php"] .ajuan-gabungan-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

body[data-page="ajuan_gabungan.php"] table.table tbody tr:hover td,
body[data-page="ajuan_gabungan.php"] .ajuan-gabungan-table tbody tr:hover td {
    background: #f8fafc !important;
}

/* Kolom angka / harga lebih teratur. */
body[data-page="ajuan_gabungan.php"] table.table th:nth-child(1),
body[data-page="ajuan_gabungan.php"] table.table td:nth-child(1) {
    width: 48px;
    text-align: center;
}

body[data-page="ajuan_gabungan.php"] table.table th:nth-child(5),
body[data-page="ajuan_gabungan.php"] table.table td:nth-child(5) {
    min-width: 105px;
    text-align: center;
    white-space: nowrap;
}

body[data-page="ajuan_gabungan.php"] table.table th:nth-child(6),
body[data-page="ajuan_gabungan.php"] table.table td:nth-child(6) {
    min-width: 80px;
    white-space: nowrap;
}

body[data-page="ajuan_gabungan.php"] table.table th:nth-child(7),
body[data-page="ajuan_gabungan.php"] table.table td:nth-child(7),
body[data-page="ajuan_gabungan.php"] table.table th:nth-child(8),
body[data-page="ajuan_gabungan.php"] table.table td:nth-child(8) {
    min-width: 135px;
    white-space: nowrap;
}

/* Nama barang dibuat tegas tetapi tidak terlalu besar. */
body[data-page="ajuan_gabungan.php"] table.table td strong {
    color: #132a46;
    font-size: 12px;
    font-weight: 750;
}

body[data-page="ajuan_gabungan.php"] table.table td small {
    color: #718096;
    font-size: 10px;
}

/* Link sumber tetap terlihat seperti action Windows UI. */
body[data-page="ajuan_gabungan.php"] table.table a,
body[data-page="ajuan_gabungan.php"] .source-link {
    color: #245b96;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

body[data-page="ajuan_gabungan.php"] table.table a:hover,
body[data-page="ajuan_gabungan.php"] .source-link:hover {
    text-decoration: underline;
}

/* Jika ada badge jumlah sumber / kategori. */
body[data-page="ajuan_gabungan.php"] .badge,
body[data-page="ajuan_gabungan.php"] .source-badge,
body[data-page="ajuan_gabungan.php"] .category-badge {
    border-radius: 8px;
    font-size: 10px;
    font-weight: 750;
    padding: 6px 9px;
}

/* Harga / total: terbaca jelas, tidak terlalu besar. */
body[data-page="ajuan_gabungan.php"] .money,
body[data-page="ajuan_gabungan.php"] .price,
body[data-page="ajuan_gabungan.php"] .total-value {
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

/* Footer / summary bila tersedia di halaman gabungan. */
body[data-page="ajuan_gabungan.php"] .review-summary,
body[data-page="ajuan_gabungan.php"] .gabungan-summary,
body[data-page="ajuan_gabungan.php"] .summary-card {
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px solid #d9e7f7;
    border-radius: 12px;
    background: linear-gradient(180deg,#f3f8fe,#edf5fd);
}

body[data-page="ajuan_gabungan.php"] .form-actions-bar {
    margin-top: 16px;
}

@media (max-width: 1100px) {
    body[data-page="ajuan_gabungan.php"] .page-content {
        padding: 22px 18px 28px;
    }

    body[data-page="ajuan_gabungan.php"] table.table {
        min-width: 980px;
    }
}

@media (max-width: 700px) {
    body[data-page="ajuan_gabungan.php"] .page-content {
        padding: 16px 12px 24px;
    }

    body[data-page="ajuan_gabungan.php"] .section-header,
    body[data-page="ajuan_gabungan.php"] .gabungan-header {
        padding: 16px 15px 13px;
    }
}
