:root {
            --primary-red: #b91c1c;
            --primary-red-dark: #991b1b;
            --navy: #1f2548;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --border-color: #e5e7eb;
            --page-bg: #f6f7fb;
            --card: #ffffff;
            --soft-red: #fef2f2;
            --soft-green: #dcfce7;
            --soft-yellow: #fef3c7;
            --soft-blue: #eff6ff;
            --soft-purple: #ede9fe;
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            font-family: "DM Sans", sans-serif;
            background: var(--page-bg);
            color: var(--text-main);
        }

        a {
            color: inherit;
            text-decoration: none;
        }

        .app-container {
            display: flex;
            min-height: 100vh;
        }

        .sidebar {
            width: 252px;
            background: #fff;
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            position: fixed;
            inset: 0 auto 0 0;
            z-index: 10;
        }

        .sidebar-header {
            height: 68px;
            display: flex;
            align-items: center;
            padding: 0 18px;
            border-bottom: 1px solid var(--border-color);
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo-icon img {
            width: 42px;
            display: block;
        }

        .logo-text {
            font-weight: 700;
            font-size: .95rem;
        }

        .sidebar-nav {
            padding: 18px 14px;
            flex: 1;
            overflow: auto;
        }

        .nav-group-title {
            font-size: .72rem;
            color: #94a3b8;
            font-weight: 700;
            margin: 20px 10px 8px;
            text-transform: uppercase;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 12px;
            border-radius: 8px;
            color: #475569;
            font-size: .9rem;
            font-weight: 600;
            margin-bottom: 4px;
            position: relative;
        }

        .nav-item i {
            width: 16px;
            text-align: center;
            color: #334155;
        }

        .nav-item.active,
        .nav-item:hover {
            background: #fff;
            box-shadow: 0 6px 18px rgba(15, 23, 42, .07);
            color: var(--primary-red);
        }

        .nav-item.active::before {
            content: "";
            position: absolute;
            left: -14px;
            top: 9px;
            bottom: 9px;
            width: 3px;
            background: var(--primary-red);
            border-radius: 4px;
        }

        .nav-item.active i,
        .nav-item:hover i {
            color: var(--primary-red);
        }

        .badge {
            margin-left: auto;
            background: var(--primary-red);
            color: #fff;
            min-width: 22px;
            height: 22px;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: .72rem;
            font-weight: 700;
        }

        .nav-sub-menu {
            display: none;
            padding-left: 35px;
        }

        .nav-sub-menu.show {
            display: block;
        }

        .sub-nav-item {
            display: block;
            padding: 8px 10px;
            color: #64748b;
            font-size: .84rem;
            border-radius: 6px;
            margin: 2px 0;
        }

        .sub-nav-item:hover {
            color: var(--primary-red);
            background: #fef2f2;
        }

        .sidebar-footer {
            padding: 16px 18px;
            border-top: 1px solid var(--border-color);
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .user-profile img {
            width: 38px;
            height: 38px;
            border-radius: 50%;
        }

        .user-name {
            display: block;
            font-size: .84rem;
            font-weight: 700;
        }

        .user-role {
            display: block;
            font-size: .76rem;
            color: var(--text-muted);
        }

        .main-content {
            margin-left: 252px;
            min-height: 100vh;
            width: calc(100% - 252px);
        }

        .top-header {
            height: 52px;
            background: #fff;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            padding: 0 28px;
        }

        .breadcrumb {
            font-size: .86rem;
            color: var(--text-muted);
        }

        .breadcrumb .separator {
            margin: 0 10px;
            color: #cbd5e1;
        }

        .breadcrumb .current {
            color: var(--text-main);
            font-weight: 700;
        }

        .page-content {
            padding: 26px 28px 42px;
        }

        .page-title-section {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 22px;
        }

        .title-left {
            display: flex;
            align-items: flex-start;
            gap: 15px;
        }

        .title-icon {
            width: 46px;
            height: 46px;
            border-radius: 12px;
            background: #fee2e2;
            color: var(--primary-red);
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
        }

        h1 {
            margin: 0;
            font-size: 1.55rem;
        }

        .page-subtitle {
            margin: 6px 0 0;
            color: var(--text-muted);
            font-size: .9rem;
        }

        .btn {
            border: 1px solid var(--border-color);
            background: #fff;
            color: var(--text-main);
            border-radius: 7px;
            padding: 10px 14px;
            font-weight: 700;
            font-size: .88rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn:hover {
            box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
        }

        .btn-primary {
            background: var(--primary-red);
            border-color: var(--primary-red);
            color: #fff;
        }

        .btn-primary:hover {
            background: var(--primary-red-dark);
        }

        .btn-text-red {
            color: var(--primary-red);
            padding: 0;
            border: 0;
            background: transparent;
        }

        .status-banner {
            background: #fffbeb;
            border: 1px solid #fde68a;
            border-radius: 9px;
            padding: 15px 17px;
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 20px;
        }

        .status-banner i {
            color: #b45309;
            margin-top: 2px;
        }

        .status-banner strong {
            display: block;
            color: #92400e;
            margin-bottom: 4px;
        }

        .status-banner p {
            margin: 0;
            color: #92400e;
            font-size: .85rem;
            line-height: 1.45;
        }

        .layout {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 330px;
            gap: 20px;
            align-items: start;
        }

        .card {
            background: #fff;
            border: 1px solid var(--border-color);
            border-radius: 9px;
            overflow: hidden;
            margin-bottom: 18px;
        }

        .card-header {
            padding: 16px 19px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .card-header h2 {
            margin: 0;
            font-size: 1rem;
        }

        .card-body {
            padding: 19px;
        }

        .detail-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 18px 20px;
        }

        .detail-item.full {
            grid-column: 1 / -1;
        }

        .detail-label {
            display: block;
            color: var(--text-muted);
            font-size: .72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .04em;
            margin-bottom: 5px;
        }

        .detail-value {
            font-size: .9rem;
            font-weight: 600;
            line-height: 1.45;
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 10px;
            border-radius: 999px;
            font-size: .75rem;
            font-weight: 800;
        }

        .status-pending {
            background: var(--soft-yellow);
            color: #b45309;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            background: var(--navy);
            color: #fff;
            padding: 12px 14px;
            text-align: left;
            font-size: .78rem;
            white-space: nowrap;
        }

        .data-table td {
            padding: 14px;
            border-bottom: 1px solid var(--border-color);
            font-size: .86rem;
            vertical-align: top;
        }

        .data-table tbody tr:last-child td {
            border-bottom: 0;
        }

        .amount {
            text-align: right;
            font-weight: 700;
        }

        .attachment-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            padding: 13px 0;
            border-bottom: 1px solid var(--border-color);
        }

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

        .attachment-info {
            display: flex;
            align-items: center;
            gap: 11px;
        }

        .attachment-icon {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            background: var(--soft-red);
            color: var(--primary-red);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .attachment-name {
            font-size: .86rem;
            font-weight: 700;
        }

        .attachment-meta {
            font-size: .75rem;
            color: var(--text-muted);
            margin-top: 3px;
        }

        .side-card {
            background: #fff;
            border: 1px solid var(--border-color);
            border-radius: 9px;
            padding: 17px;
            margin-bottom: 16px;
        }

        .side-card h3 {
            margin: 0 0 14px;
            font-size: .95rem;
        }

        .summary-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            padding: 10px 0;
            border-bottom: 1px solid var(--border-color);
            font-size: .86rem;
        }

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

        .summary-row span:first-child {
            color: var(--text-muted);
        }

        .summary-row strong {
            font-weight: 800;
        }

        .summary-total {
            font-size: 1.15rem;
            color: var(--primary-red);
        }

        .timeline {
            position: relative;
            padding-left: 4px;
        }

        .timeline-item {
            position: relative;
            display: grid;
            grid-template-columns: 30px 1fr;
            gap: 10px;
            padding-bottom: 20px;
        }

        .timeline-item:last-child {
            padding-bottom: 0;
        }

        .timeline-item::before {
            content: "";
            position: absolute;
            left: 14px;
            top: 28px;
            bottom: 0;
            width: 1px;
            background: #dbe2ea;
        }

        .timeline-item:last-child::before {
            display: none;
        }

        .timeline-dot {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 1px solid #cbd5e1;
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #94a3b8;
            font-size: .7rem;
            z-index: 1;
        }

        .timeline-item.done .timeline-dot {
            background: var(--soft-green);
            border-color: #86efac;
            color: #15803d;
        }

        .timeline-item.current .timeline-dot {
            background: var(--soft-yellow);
            border-color: #fcd34d;
            color: #b45309;
        }

        .timeline-title {
            font-size: .84rem;
            font-weight: 800;
            margin-bottom: 3px;
        }

        .timeline-meta {
            color: var(--text-muted);
            font-size: .75rem;
            line-height: 1.4;
        }

        .note-box {
            background: #f8fafc;
            border: 1px solid var(--border-color);
            border-radius: 7px;
            padding: 13px;
            font-size: .84rem;
            color: #475569;
            line-height: 1.5;
        }

        .action-bar {
            position: sticky;
            bottom: 0;
            background: rgba(255, 255, 255, .96);
            border-top: 1px solid var(--border-color);
            padding: 14px 28px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            z-index: 5;
        }

        .action-group {
            display: flex;
            gap: 10px;
        }

        @media (max-width: 1100px) {
            .layout {
                grid-template-columns: 1fr;
            }

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

        @media (max-width: 760px) {
            .sidebar {
                position: static;
                width: 100%;
            }

            .app-container {
                display: block;
            }

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

            .page-title-section {
                align-items: flex-start;
                flex-direction: column;
            }

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

            .action-bar {
                position: static;
                flex-direction: column;
                align-items: stretch;
            }

            .action-group {
                width: 100%;
            }

            .action-group .btn {
                flex: 1;
            }
        }

        @media print {

            .sidebar,
            .top-header,
            .page-title-section .action-group,
            .action-bar {
                display: none !important;
            }

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

            .page-content {
                padding: 0;
            }

            body {
                background: #fff;
            }
        }
