* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .layout {
            display: flex;
        }
        .percent-input {
            text-align: right;
        }
        body {
            font-family: 'English', 'Hanuman', serif;
            background-color: #f9fafc;
        }

        .header {
            background-color: #0052CC;
            color: white;
            padding: 15px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background-color 0.3s ease;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo {
            width: 50px;
            height: 50px;
            background-color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }

        .header-title h1 {
            font-size: 18px;
            font-weight: bold;
        }

        .header-title p {
            font-size: 14px;
            font-weight: normal;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        
        .color-picker-btn {
            background: rgba(255, 255, 255, 0.2);
            border: 2px solid white;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
            position: relative;
        }
        
        .color-picker-btn:hover {
            transform: scale(1.1);
            background: rgba(255, 255, 255, 0.3);
        }
        
        .color-picker-btn svg {
            width: 20px;
            height: 20px;
        }
        
        .color-picker-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        
        .color-picker-modal.active {
            display: flex;
        }
        
        .color-picker-content {
            background-color: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            width: 400px;
            max-width: 90%;
        }
        
        .color-picker-title {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 20px;
            color: #333;
        }
        
        .color-input-group {
            margin-bottom: 20px;
        }
        
        .color-input-label {
            display: block;
            margin-bottom: 10px;
            font-weight: 500;
            color: #555;
        }
        
        .color-input-wrapper {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        
        .color-input {
            flex: 1;
            padding: 10px;
            border: 2px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            font-family: monospace;
        }
        
        .color-input:focus {
            outline: none;
            border-color: green;
        }
        
        .color-preview {
            width: 50px;
            height: 50px;
            border-radius: 5px;
            border: 2px solid #ddd;
        }
        
        .color-picker-buttons {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }
        
        .color-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
            font-size: 14px;
            transition: all 0.3s;
        }
        
        .color-btn-save {
            background-color: green;
            color: white;
        }
        
        .color-btn-save:hover {
            background-color: darkgreen;
        }
        
        .color-btn-cancel {
            background-color: #666;
            color: white;
        }
        
        .color-btn-cancel:hover {
            background-color: #444;
        }
        
        .preset-colors {
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            gap: 8px;
            margin-top: 15px;
        }
        
        .preset-color {
            width: 100%;
            height: 35px;
            border-radius: 5px;
            border: 2px solid #ddd;
            cursor: pointer;
            transition: transform 0.2s;
        }
        
        .preset-color:hover {
            transform: scale(1.1);
            border-color: #333;
        }

        .flag-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 5px;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s;
        }
        
        .flag-btn:hover {
            transform: scale(1.1);
        }
        
        .flag-btn svg {
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
        }

        .login-btn {
            background-color: transparent;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: bold;
            font-size: 15px;
        }
        
        .login-btn:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }
        
        .login-btn svg {
            width: 20px;
            height: 20px;
        }

        .container {
            display: flex;
            height: calc(100vh - 80px);
            overflow: hidden;
        }

        .sidebar {
            width: 280px;
            background-color: white;
            padding: 5px 0 0 0;
            box-shadow: 2px 0 5px rgba(0,0,0,0.05);
             margin-right: 20px;
        }

        .sidebar-item {
            padding: 15px 20px;
            cursor: pointer;
            border-bottom: 1px solid #e0e0e0;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: all 0.3s;
            position: relative;
            margin: 0 10px;
            font-weight: 500;
            text-decoration: none;
            color: inherit;
        }

        a.sidebar-item {
            display: flex;
        }

        .sidebar-item:hover {
            background-color: #f0f0f0;
            border-radius: 8px;
        }

        .sidebar-item.active {
            background-color: #0052CC;
            color: white;
            border-radius: 8px;
            border-bottom: 1px solid #0052CC;
        }

        .sidebar-item.has-children::after {
            content: '▼';
            position: absolute;
            right: 20px;
            font-size: 10px;
            transition: transform 0.3s;
        }

        .sidebar-item.has-children.open::after {
            transform: rotate(-180deg);
        }

        .sidebar-icon {
            font-size: 20px;
            width: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .submenu {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            background-color: #f9f9f9;
        }

        .submenu.open {
            max-height: 500px;
        }

        .submenu-item {
            padding: 12px 20px 12px 56px;
            cursor: pointer;
            border-bottom: 1px solid #e0e0e0;
            transition: background-color 0.3s;
            font-size: 14px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .submenu-icon {
            font-size: 16px;
            width: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .submenu-item:hover {
            background-color: #e8e8e8;
        }

        .submenu-item.active {
            background-color: #d4f4dd;
            color: #0052CC;
            font-weight: bold;
        }

        .main-content {
            flex: 1;
            padding: 30px;
            overflow-y: auto;
            background-color: white;
        }

        
        
        
        
/* Stepper icon mode (kept for compatibility if used elsewhere) */
.step-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
}
.step-item.active .step-number {
    background: #0052CC;
    color: #ffffff;
}
.step-item.completed .step-number {
    background: #16a34a;
    color: #ffffff;
}
.step-number svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}
.step-texts {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.step-next-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}
.step-next-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}
.step-item:last-child .step-next-icon {
    opacity: 0;
}

/* Review layout styling */
.review-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 12px;
}
.review-card {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 16px 18px;
    margin-bottom: 18px;
}
.info-grid-2,
.info-grid-3 {
    display: grid;
    gap: 10px 18px;
}
.info-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.info-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 768px) {
    .info-grid-2,
    .info-grid-3 {
        grid-template-columns: 1fr;
    }
}
.info-item {
    display: flex;
    flex-direction: column;
    font-size: 15px;
}
.info-label {
    color: #333;
    margin-bottom: 2px;
}
.info-value {
    color: #111827;
    font-weight: 600;
    text-align: left;
}
.subsection-title {
    font-size: 15px;
    font-weight: 700;
    color: #0052CC;
    margin: 10px 0 8px;
}
.inline-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    margin-bottom: 8px;
}
.inline-row-label {
    color: #333;
}
.inline-row-value {
    color: #111827;
    font-weight: 600;
}

/* === NEW row/column 12-grid for key–value === */
.kv-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px 6px;
}
.kv-col {
    padding: 0 8px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.kv-col-2 {
    flex: 0 0 16.6667%;
    max-width: 16.6667%;
}
.kv-col-3 {
    flex: 0 0 25%;
    max-width: 25%;
}
.kv-col-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}
.kv-col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}
.kv-col-8 {
    flex: 0 0 66.6667%;
    max-width: 66.6667%;
}
.kv-col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.kv-label {
    color: #23272e;
    font-size: 15px;
    display: block;
}
.kv-value {
    color: #111827;
    font-weight: 600;
    font-size: 15px;
    display: block;
}

@media (max-width: 768px) {
    .kv-col-2,
    .kv-col-3,
    .kv-col-4,
    .kv-col-6,
    .kv-col-8,
    .kv-col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Transfer document row */
.transfer-doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f9fafb;
}
.transfer-doc-info {
    display: flex;
    flex-direction: column;
    font-size: 15px;
}
.transfer-doc-title {
    font-weight: 600;
    color: #111827;
}
.transfer-doc-file {
    font-size: 14px;
    color: #4b5563;
}

.btn-link {
    border: none;
    background: #ffffff;
    border-radius: 999px;
    padding: 6px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
}
.btn-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}
.btn-link:hover {
    background: #f3f4f6;
}

/* Purpose checkboxes */
.purpose-check-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 6px;
}
.purpose-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}
.purpose-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #16a34a;
}

/* Fertilizer table */
.fert-table-wrapper {
    margin-top: 10px;
    overflow-x: auto;
}
table.review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.review-table thead tr {
    background: #0052CC;
}
.review-table th,
.review-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 10px;
    text-align: center;
    white-space: nowrap;
}
.review-table th {
    font-weight: 600;
    color: #1f2937;
}
.review-table tbody tr:nth-child(odd) {
    background: #f9fafb;
}
.review-table tbody tr:nth-child(even) {
    background: #ffffff;
}
.review-table td {
    color: #111827;
}
.table-action-btn {
    border: none;
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 4px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}
.table-action-btn:hover {
    background: #bbf7d0;
}
.table-action-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}
.total-count {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

/* Attachments list styles */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.doc-item {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: 14px;
}
.doc-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.doc-title-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}
.doc-title {
    font-weight: 600;
    color: #111827;
}
.doc-required {
    color: #dc2626;
    font-weight: 700;
}
.doc-meta-row {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.doc-status-hasfile {
    color: #065f46;
    font-weight: 600;
}
.doc-status-empty {
    color: #9ca3af;
    font-style: italic;
}
.doc-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    font-size: 12px;
    color: #14532d;
}
.doc-file-pill svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}
.doc-file-name {
    white-space: nowrap;
}
.doc-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .doc-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .doc-actions {
        align-self: stretch;
        justify-content: flex-start;
    }
}

/* Declaration */
.declaration-box {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fdfdfb;
    font-size: 14px;
    line-height: 1.8;
    color: #111827;
}
.declaration-header {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
    color: #064e3b;
}
.declaration-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.declaration-check input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: #16a34a;
}
.declaration-check a {
    color: #1d4ed8;
    text-decoration: underline;
}
.required {
    color: red;
}

/* Modal for fertilizer detail */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.modal-backdrop:not(.hidden) {
    display: flex;
}
.modal-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
    max-width: 820px;
    width: 100%;
    margin: 0 12px;
    padding: 20px 24px 24px;
    font-size: 14px;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #064e3b;
}
.modal-close-btn {
    border: none;
    background: #f3f4f6;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.modal-close-btn svg {
    width: 16px;
    height: 16px;
    stroke: #4b5563;
}
.modal-body {
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
}
.modal-section {
    margin-bottom: 16px;
}
.modal-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #047857;
    margin-bottom: 8px;
}
.detail-grid-2,
.detail-grid-3 {
    display: grid;
    gap: 10px 18px;
}
.detail-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.detail-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 640px) {
    .modal-card {
        max-width: 95%;
    }
    .detail-grid-2,
    .detail-grid-3 {
        grid-template-columns: 1fr;
    }
}
.detail-item {
    display: flex;
    flex-direction: column;
}
.detail-label {
    color: #374151;
    margin-bottom: 2px;
}
.detail-value {
    color: #111827;
    font-weight: 600;
}

/* badges & toggles */
.badge-inline {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    padding: 2px 8px;
    margin-left: 8px;
    cursor: pointer;
}
.badge-inline:hover {
    background: #d1d5db;
}
.badge-inline.active {
    background: #16a34a;
    color: white;
    font-weight: 600;
}
.type-toggle {
    cursor: pointer;
    font-weight: 600;
    text-underline-offset: 2px;
}

/* applicant layout with photo on right */
.applicant-layout {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}
.applicant-left {
    flex: 1;
}
.applicant-right {
    width: 160px;
    display: flex;
    justify-content: center;
}
.applicant-photo {
    width: 120px;
    height: 130px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #6b7280;
}

.no-rep-text {
    font-size: 14px;
    color: #374151;
    margin-top: 10px;
}
.flat-green-btn {
    background: #ffffff;
    color: #16a34a;
    border: 1px solid #16a34a;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
.flat-green-btn:hover {
    background: #ecfdf5;
}

.general-flex {
    display: flex;
    gap: 32px;
}

.general-left,
.general-right {
    flex: 1;
}

.kv-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.kv-key {
    font-size: 15px;
    color: #374151;
    font-weight: 500;
}

.kv-value-right {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    text-align: right;
}

.btn-row {
    text-align: right;
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-row-table {
    float: left;
    text-align: left;
    margin: 15px 0px 15px 0px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.flat-btn {
    font-family: 'Hanuman', sans-serif;
    background: white;
    color: #16a34a;
    border: 1px solid #16a34a;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s;
}

.flat-btn:hover {
    background: #ecfdf5;
}

@media (max-width: 768px) {
    .general-flex {
        flex-direction: column;
    }
    .kv-line {
        flex-direction: column;
        align-items: flex-start;
    }
    .kv-value-right {
        text-align: left;
    }
}

/* ===== TOP TOOLBAR ROW (TITLE + ACTION BUTTONS) ===== */
.review-toolbar {
    background: #ffffff;
    padding: 30px 20px;         /* Increase height */
    border-radius: 8px;
    margin: 16px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
/* Title */
.review-toolbar-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    font-family: 'Hanuman', sans-serif;
}
.review-toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.mat-btn {
    font-family: 'Hanuman', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    cursor: pointer;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s, transform 0.1s, background-color 0.2s;
    color: #ffffff;
    white-space: nowrap;
    gap: 6px;
    align-items: center;
    display: inline-flex;
}
.mat-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}
.mat-btn:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}
.mat-btn:active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
}
.mat-primary {
    background: #0866FF;
}
.mat-warn {
    background: #dc2626; /* red */
}
.mat-return {
    background: #facc15; /* yellow */
    color: #063df2;      /* dark text for contrast */
}
.mat-success {
    background: #31b331;
}
.mat-allocate {
    background: #d97706;
}

@media (max-width: 640px) {
    .review-toolbar {
        align-items: flex-start;
    }
    .review-toolbar-actions {
        justify-content: flex-start;
    }
}

/* ===== Material Raised Button ===== */
.mat-raised-btn {
    font-family: 'Hanuman', sans-serif;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: #0866FF;;                /* Requested color */
    box-shadow: 0 2px 3px rgba(0,0,0,0.25);
    transition: 0.2s ease-in-out;
}

.mat-raised-btn:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}

.mat-raised-btn:active {
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
    transform: translateY(0);
}

/* ===== TAB NAVIGATION ===== */
.tab-container {
    margin-top: 20px;
    font-family: 'Hanuman', sans-serif;
}

.tab-header {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    gap: 10px;
    background: white;
}

.tab-btn {
    padding: 10px 18px;
    border: none;
    background: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    color: #374151;
    font-family: 'Hanuman', system-ui, sans-serif !important;
}

.tab-btn.active {
    background: #0052CC;
    color: white;
}

.tab-content {
    display: none;
    padding-top: 16px;
}

.tab-content * {
    font-family: 'Hanuman', system-ui, sans-serif !important;
}

.tab-content.active {
    display: block;
}


/* Simple vertical form fields inside modal */
.form-field {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.form-input {
    font-family: 'Hanuman', system-ui, sans-serif;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    padding: 6px 10px;
    min-height: 34px;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 1px #bbf7d0;
}

textarea.form-input {
    resize: vertical;
}

/* Red mat-raised button for cancel */
.mat-raised-btn-cancel {
    background: #dc2626;
}
.mat-raised-btn-cancel:hover {
    background: #b91c1c;
}

/* ===== DOCUMENT HISTORY TIMELINE ===== */

/* ===== SIMPLE VERTICAL TIMELINE (LIKE SCREENSHOT) ===== */

.timeline {
    margin-top: 4px;
    font-size: 14px;
}

/* each row */
.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    position: relative;
    padding-bottom: 14px;
}

/* left column = dot + line */
.timeline-marker {
    width: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4px; /* align dot with title line */
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #cccccc;         /* default grey */
    flex-shrink: 0;
}

.timeline-line {
    flex: 1;
    width: 1px;
    background: #d4d4d4;
    margin-top: 3px;
}

/* hide line for last item */
.timeline-item:last-child .timeline-line {
    display: none;
}

/* right side text (no card box) */
.timeline-card {
    flex: 1;
    padding: 0;
    border: none;
    background: transparent;
}

/* title line (អនុម័ត, ផ្ទេរទៅកាន់, អ្នកទទួល...) */
.timeline-header {
    font-family: 'Hanuman', sans-serif;
    font-size: 14px;
    margin-bottom: 2px;
}

.timeline-title {
    color: #1d4ed8;              /* blue like link */
    font-weight: 700;
    margin-right: 4px;
}

.timeline-meta {
    color: #1d4ed8;              /* same blue */
    font-size: 13px;
}

/* detail lines under title */
.timeline-body {
    margin-top: 2px;
}

.timeline-body p {
    margin: 2px 0;
    color: #111827;
    font-size: 14px;
}

/* label/value style */
.timeline-label {
    font-weight: 400;
    color: #111827;
}

.timeline-value {
    font-weight: 700;
    color: #111827;
}

/* ===== DOT COLORS BY TYPE ===== */
/* អនុម័ត – green */
.timeline-item.approve .timeline-dot {
    background: #16a34a;
}

/* ផ្ទេរទៅកាន់ – blue #0866FF */
.timeline-item.transfer .timeline-dot {
    background: #0866FF;
}

/* អ្នកទទួល – blue #0866FF */
.timeline-item.receiver .timeline-dot {
    background: #0866FF;
}

/* បញ្ជូនត្រឡប់ – yellow #facc15 */
.timeline-item.return .timeline-dot {
    background: #facc15;
}

/* ស្នើសុំអាជ្ញាបណ្ណ – light green border */
.timeline-item.request .timeline-dot {
    background: #ecfdf5;
    border: 1px solid #16a34a;
}

/* Make tab buttons flex so icon + text align nicely */
.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;              /* space between icon and text */
    padding: 10px 18px;
    border: none;
    background: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    color: #374151;
    font-family: 'Hanuman', system-ui, sans-serif !important;
}

/* Icon inside tab */
.tab-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    font-size: 16px;  /* for emoji/icons font */
}

/* Active tab stays the same, just works with icon too */
.tab-btn.active {
    background: #0052CC;
    color: white;
}


.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    background: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    color: #374151;
    font-family: 'Hanuman', system-ui, sans-serif !important;
}

.tab-btn.active {
    background: #0052CC;
    color: white;
}

.tab-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    stroke: currentColor;
}

.btn-attach {
    background: #ffffff;
    border: 1px solid #16a34a;
    color: #16a34a;
    font-family: 'Hanuman', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-attach:hover {
    background: #ecfdf5;
}

.btn-attach svg {
    width: 18px;
    height: 18px;
}

.doc-hidden-input {
    display: none;
}


/* ===== COMPACT APPROVE/REJECT BUTTONS ===== */
.btn-compact {
    font-family: 'Hanuman', sans-serif;
    font-size: 13px;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-compact svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* Approve button - green */
.btn-approve {
    background: #16a34a;
    color: white;
}

.btn-approve:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.3);
}

/* Reject button - red */
.btn-reject {
    background: #dc2626;
    color: white;
}

.btn-reject:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

/* Return button - yellow/orange */
.btn-return {
    background: #f59e0b;
    color: white;
}

.btn-return:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* Info button - blue */
.btn-info {
    background: #0866FF;
    color: white;
}

.btn-info:hover {
    background: #0652cc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(8, 102, 255, 0.3);
}

/* Secondary button - gray */
.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

/* ===== LABELS WITH BACKGROUND COLORS ===== */
.label-badge {
    font-family: 'Hanuman', sans-serif;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    padding: 4px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.label-badge svg {
    width: 14px;
    height: 14px;
}

/* Status labels */
.label-approved {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.label-pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.label-rejected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.label-returned {
    background: #fed7aa;
    color: #9a3412;
    border: 1px solid #fdba74;
}

.label-completed {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.label-processing {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.label-draft {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

/* Priority labels */
.label-high {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.label-medium {
    background: #fef9c3;
    color: #a16207;
    border: 1px solid #fef08a;
}

.label-low {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Type labels */
.label-individual {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

.label-company {
    background: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

.label-required {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-size: 11px;
}

.label-optional {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    font-size: 11px;
}

/* ==== Checkbox grid in Section 1 ==== */
        .checkbox-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 14px;
        }

        .checkbox-pill-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 4px;
            border-radius: 6px;
            background: transparent;
            cursor: pointer;
            font-size: 14px;
        }

        .checkbox-pill-row:hover {
            background: #f3fff3;
        }

        .checkbox-pill-row input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: #008000;
        }

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


        /* ===== PAGINATION COMPONENT ===== */
        .pagination-wrapper {
            display: flex;
            justify-content: right;
            align-items: center;
            gap: 8px;
            font-family: 'Hanuman', sans-serif;
        }

        .pagination {
            display: flex;
            align-items: center;
            gap: 6px;
            list-style: none;
        }

        .page-item {
            display: inline-flex;
        }

        .page-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 38px;
            height: 38px;
            padding: 0 12px;
            border: 1.5px solid #e5e7eb;
            border-radius: 8px;
            background: #ffffff;
            color: #374151;
            font-size: 14px;
            font-weight: 600;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
        }

        .page-link:hover {
            background: #f3f4f6;
            border-color: #0052CC;
            color: #0052CC;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .page-item.active .page-link {
            background: #0052CC;
            border-color: #0052CC;
            color: #ffffff;
            font-weight: 700;
            box-shadow: 0 2px 6px rgba(53,54,144, 0.3);
        }

        .page-item.active .page-link:hover {
            transform: none;
            cursor: default;
        }

        .page-item.disabled .page-link {
            background: #f9fafb;
            border-color: #e5e7eb;
            color: #d1d5db;
            cursor: not-allowed;
            pointer-events: none;
        }

        .page-link.page-prev,
        .page-link.page-next {
            padding: 0 14px;
            gap: 6px;
        }

        .page-link svg {
            width: 16px;
            height: 16px;
            stroke-width: 2.5;
        }

        .page-item.ellipsis .page-link {
            border: none;
            background: transparent;
            cursor: default;
            pointer-events: none;
        }

        .page-item.ellipsis .page-link:hover {
            transform: none;
            box-shadow: none;
        }

        .pagination-info {
            font-size: 14px;
            color: #6b7280;
            font-weight: 500;
            margin: 0 8px;
        }

        /* Circle variant */
        .pagination.pagination-circle .page-link {
            border-radius: 50%;
            min-width: 38px;
            width: 38px;
            padding: 0;
        }

        .pagination.pagination-circle .page-link.page-prev,
        .pagination.pagination-circle .page-link.page-next {
            width: auto;
            border-radius: 8px;
            padding: 0 12px;
        }

        /* Green theme */
        .pagination.pagination-green .page-link:hover {
            border-color: #16a34a;
            color: #16a34a;
        }

        .pagination.pagination-green .page-item.active .page-link {
            background: #16a34a;
            border-color: #16a34a;
            box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
        }

        /* Small size */
        .pagination.pagination-sm .page-link {
            min-width: 32px;
            height: 32px;
            padding: 0 8px;
            font-size: 13px;
        }

        .pagination.pagination-sm .page-link svg {
            width: 14px;
            height: 14px;
        }

        /* Large size */
        .pagination.pagination-lg .page-link {
            min-width: 44px;
            height: 44px;
            padding: 0 16px;
            font-size: 16px;
        }

        .pagination.pagination-lg .page-link svg {
            width: 18px;
            height: 18px;
        }

        @media (max-width: 640px) {
            .pagination-wrapper {
                gap: 6px;
            }
            
            .pagination {
                gap: 4px;
            }
            
            .page-link {
                min-width: 34px;
                height: 34px;
                padding: 0 10px;
                font-size: 13px;
            }
        }
.hidden {
    display: none;
}
.hidden-block {
    display: none;
}

.form-container {
    padding: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 400;
    color: black;
    font-size: 14px;
}

.form-group label .required {
    color: red;
    margin-left: 3px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
    padding: 8px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Hanuman', serif;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0052CC;
    box-shadow: 0 0 0 3px rgba(53,54,144, 0.1);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

@media (max-width: 1024px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 20px;
    }
}
/* ===== Stepper ===== */
.stepper {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.stepper .step-item {
    text-decoration: none;
}

.step-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease, color 0.2s ease;
    color: #2f5233;
}

.step-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.step-number {
    width: 34px;
    height: 34px;
    background: #198754;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step-texts {
    display: flex;
    flex-direction: column;
}

.step-label-main {
    font-weight: 700;
    font-size: 1rem;
}

.step-label-sub {
    font-size: 0.85rem;
    color: #6b7280;
}

/* active & completed */
.step-item.active {
    background: #0052CC;
    color: #ffffff;
}

.step-item.active .step-number {
    background: #ffffff;
    color: #0052CC;;
}

.step-item.completed {
    background: #ffffff;
    color: #080707;
}

.step-item.completed .step-number {
    background: #ffffff;
    color: #2f5233;
}

@media (max-width: 768px) {
    .step-label-sub {
        display: none;
    }
    .stepper {
        flex-direction: column;
    }
}

/* ===== Sections (cards) ===== */
.section {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
}

.section-header {
    background: #0052CC;;
    color: white;
    padding: 13px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    transition: background 0.3s ease;
}

.section-header:hover {
    background: #0052CC;;
}

.section-header::after {
    content: '▼';
    font-size: 14px;
    transition: transform 0.3s ease;
}

.section-header.collapsed::after {
    transform: rotate(-90deg);
}

.section-content {
    background: white;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.section-content.collapsed {
    max-height: 0;
    padding: 0;
}

.form-container {
    padding: 30px;
}

/* ===== applicant type row (radios left, checkbox right) ===== */
.applicant-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-pill {
    position: relative;
}

.radio-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-pill label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
    background: white;
    position: relative;
}

.radio-pill label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #bbb;
    border-radius: 50%;
    background: white;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.radio-pill input[type="radio"]:checked + label {
    background: white;
    border-color: #0052CC;;
    color: #0052CC;;
    font-weight: 700;
}

.radio-pill input[type="radio"]:checked + label::before {
    border-color: #0052CC;;
    background: white;
    box-shadow: inset 0 0 0 5px #0052CC;;
}

.radio-pill label:hover {
    border-color: #0052CC;;
}

/* checkbox pill on the right */
.self-applicant-wrapper {
    display: flex;
    align-items: center;
}

.checkbox-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1.5px solid #e0e0e0;
    background: #fafafa;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.checkbox-pill input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0052CC;;
}

.checkbox-pill:hover {
    border-color: #0052CC;;
    background: #f0fff4;
}

.form-grid {
    display: grid;
    grid-template-columns: 10fr 2fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-row-3 {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 400;
    color: #333;
    font-size: 15px;
}

.form-group label .required {
    color: red;
    margin-left: 3px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
    padding: 12px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Hanuman', serif;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #0052CC;;
    box-shadow: 0 0 0 3px rgba(0, 128, 0, 0.1);
}

.form-group input[type="file"] {
    display: none;
}

.file-upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.file-upload-preview {
    width: 120px;
    height: 140px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-preview:hover {
    border-color: #0052CC;;
    background: #f0f8f0;
}

.file-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-upload-preview svg {
    width: 70px;
    height: 70px;
    color: #ccc;
}

.file-upload-btn {
    background: #0052CC;;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Hanuman', serif;
    font-size: 13px;
    transition: background 0.3s ease;
}

.file-upload-btn:hover {
    background: #0052CC;;
}

.hidden {
    display: none;
}

/* Transfer upload row */
.transfer-upload-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.transfer-label-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #333;
}

.transfer-label-text .required {
    color: red;
    margin-left: 3px;
}

.transfer-label-text a {
    color: #0052CC;;
    text-decoration: underline;
    font-size: 14px;
}

.transfer-file-input {
    display: none;
}

.transfer-upload-btn {
    background: #0052CC;;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Hanuman', serif;
    font-size: 14px;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.transfer-upload-btn:hover {
    background: #0052CC;;
}

/* Step navigation buttons (bottom) */
.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

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

.btn {
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    font-family: 'Hanuman', serif;
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-primary {
    background: #0052CC;;
    color: #fff;
    border: none;
    padding: 5px 18px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #006600;
}

.btn-outline-green {
    background: #ffffff;
    color: #0052CC;;
    border: 1.8px solid #0052CC;;
    padding: 5px 18px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-outline-green:hover {
    background: #f3fff3;
    color: #0052CC;;
    border-color: #0052CC;;
}

.btn-icon svg,
.btn-icon-right svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        font-size: 16px;
        padding: 15px 20px;
    }

    .form-container {
        padding: 20px;
    }

    .applicant-type-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .self-applicant-wrapper {
        align-self: flex-start;
    }
}

/* Select arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

/* Representative form spacing */
#repIndividualForm,
#repCompanyForm {
    padding-top: 16px;
    margin-top: 10px;
}

.btn-tertiary {
    background: #ffffff;
    color: #333;
    border: 1.5px solid #dcdcdc;
}

.btn-tertiary:hover {
    background: #f5f5f5;
    border-color: #c6c6c6;
}

/* Page header */
.page-header-soft {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #dcffe6;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.2rem;
}

.page-title {
    color: #044c29;
}

.page-home {
    display: flex;
    align-items: center;
}

.home-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    color: #0b57d0;
    font-weight: 600;
}

.home-link:hover {
    text-decoration: underline;
}

.home-icon {
    width: 20px;
    height: 20px;
}

/* Step 2 specific helpers */
.checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 20px;
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0052CC;;
}

#otherPurposeText {
    margin-top: 8px;
    display: none;
}

/* Fertilizer table */
.table-wrapper {
    overflow-x: auto;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.table-wrapper th,
.table-wrapper td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
}

.table-wrapper th {
    background: #f3f4f6;
    font-weight: 700;
}

.table-wrapper td input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

.table-actions {
    margin-top: 10px;
}

/* ==== Checkbox grid in Section 1 ==== */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.checkbox-purpose{
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    background: #ffffff;
    /* border: 2px solid #e5e7eb;*/
    cursor: pointer;
    font-size: 15px;
    transition: all 0.25s ease;
    /*box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);*/
}

.checkbox-purpose:hover {
    background: #dbeafe;
    box-shadow: 0 2px 6px rgba(0, 128, 0, 0.1);
    transform: translateY(-1px);
}

.checkbox-purpose:has(input[type="radio"]:checked),
.checkbox-purpose:has(input[type="checkbox"]:checked) {
    background: #dbeafe;
    font-weight: 600;
    color: #0a146d;
}

.checkbox-purpose::before {
    content: '';
    width: 15px;
    height: 15px;
    border: 2.5px solid #d1d5db;
    background: #ffffff;
    flex-shrink: 0;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-purpose input[type="radio"],
.checkbox-purpose input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.checkbox-purpose:has(input[type="radio"]:checked),
.checkbox-purpose:has(input[type="checkbox"]:checked) {
    background: #dbeafe;
    font-weight: 600;
    color: #1e40af;
}

/* NEW — tick style */
.checkbox-purpose:has(input:checked)::before {
    background: #0052CC;
    border-color: #0052CC;
    color: white;
    content: "✔";
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}




.checkbox-pill-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    background: #ffffff;
   /* border: 2px solid #e5e7eb;*/
    cursor: pointer;
    font-size: 15px;
    transition: all 0.25s ease;
    /*box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);*/
}

.checkbox-pill-row:hover {
    background: #dbeafe;
    box-shadow: 0 2px 6px rgba(0, 128, 0, 0.1);
    transform: translateY(-1px);
}

.checkbox-pill-row input[type="radio"],
.checkbox-pill-row input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-pill-row::before {
    content: '';
    width: 15px;
    height: 15px;
    border: 2.5px solid #d1d5db;
    border-radius: 50%;
    background: #ffffff;
    flex-shrink: 0;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-pill-row:has(input[type="radio"]:checked)::before,
.checkbox-pill-row:has(input[type="checkbox"]:checked)::before {
    background: #ffffff;
    border-color: #0052CC;
    box-shadow: inset 0 0 0 5px #1658a3, 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.checkbox-pill-row:has(input[type="radio"]:checked),
.checkbox-pill-row:has(input[type="checkbox"]:checked) {
    background: #dbeafe;
    font-weight: 600;
    color: #0052CC;
}

/* Keep label normal even when the input is disabled */
.purpose-check[disabled],
.purpose-check.disabled {
    pointer-events: none;
    opacity: 1 !important;
}

/* Make the checkbox element itself look normal when disabled */
.purpose-check input[disabled] {
    pointer-events: none;
    opacity: 1 !important;
    filter: none !important;
}

/* You can adjust these 2 values if needed */
:root{
  --header-h: 80px;     /* match your real header height */
  --sidebar-w: 280px;   /* match your sidebar width */
}

/* Prevent page scrolling; only main-content scrolls */
html, body {
  height: 100%;
}
body {
  overflow: hidden;
}

/* Fixed header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;

  /* keep your existing style */
  background-color: #0052CC;
  color: white;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Layout wrappers can stay flex, but should not control scrolling */
.layout {
  display: flex;
}

/* Container should not scroll; it’s just a wrapper now */
.container {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden; /* important */
  padding-top: var(--header-h); /* reserve space for fixed header */
}

/* Fixed sidebar (under header) */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;            /* sidebar can scroll if menu is long */
  z-index: 900;

  /* keep your existing style */
  background-color: white;
  padding: 5px 0 0 0;
  box-shadow: 2px 0 5px rgba(0,0,0,0.05);

  /* remove layout push that breaks fixed sidebar */
  margin-right: 0;
}

/* Main content: scroll here only */
.main-content {
  margin-top: var(--header-h);
  margin-left: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;            /* ✅ only scroll area */
  overflow-x: hidden;

  /* keep your existing style */
  flex: 1;
  padding: 30px;
  background-color: white;
}

/* Optional: nicer scrolling + avoid “jump” */
.main-content,
.sidebar {
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

/* Requests Page Styles */
        .page-title {
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 20px;
            color: #333;
        }

        .search-container {
            margin-bottom: 20px;
            display: flex;
            gap: 15px;
            align-items: center;
            flex-wrap: wrap;
            width: 70%;
        }

        .search-box {
            padding: 10px;
            flex: 1;
            min-width: 200px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
        }

        .select-box {
            padding: 10px;
            min-width: 150px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            background-color: white;
            cursor: pointer;
        }

        .select-box:focus {
            outline: none;
            border-color: #0052CC;
        }

        .search-btn {
            background-color: #0052CC;
            color: white;
            border: none;
            padding: 10px 25px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            font-weight: bold;
            transition: background-color 0.3s;
        }

        .search-btn:hover {
            background-color: #2a2b70;
        }

        .table-container {
            background-color: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            overflow-x: auto;
        }

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

        th, td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #e0e0e0;
        }

        th {
            background-color: #0052CC;
            font-weight: bold;
            color: white;
        }

        tr:hover {
            background-color: #f9f9f9;
        }

        .table-container-detail {
            background-color: white;
            border-radius: 10px;
         
        }

        .table-container-detail th, td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #e0e0e0;
        }

        .table-container-detail th {
            background-color: #f9f9f9;
            font-weight: bold;
            color: black;
        }

        .table-container-detail tr:hover {
            background-color: #f9f9f9;
        }

        .view-btn {
            background-color: #0052CC;
            color: white;
            border: none;
            padding: 8px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            transition: background-color 0.3s;
        }

        .view-btn:hover {
            background-color: #2a2b70;
        }

        .view-btn svg {
            width: 16px;
            height: 16px;
        }

        /* Detail Page Styles */
        .detail-container {
            background-color: white;
            border-radius: 10px;
            padding: 30px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            max-width: 800px;
        }

        .detail-row {
            display: flex;
            padding: 15px 0;
            border-bottom: 1px solid #e0e0e0;
        }

        .detail-label {
            font-weight: bold;
            width: 200px;
            color: #555;
        }

        /* Define custom colors based on the image */
        .color-green-title { color: #059669; } 
        .color-blue-sub { color: #3b82f6; } 
        .color-green-app { color: #10b981; } 
        .color-red-fail { color: #ef4444; } 
        .color-orange-warn { color: #f97316; } 

        /* Interaction styles for the boxes */
        /* Added 'group' class to facilitate icon color change on hover */
        .stat-box {
            transition: all 0.2s ease-in-out;
            cursor: pointer;
        }

        /* Hover effect: Subtle lift and shadow */
        .stat-box:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        }

        /* Value text size for visual impact */
        .box-value {
            font-size: 2.5rem; /* ~40px */
            line-height: 1;
        }
        .layout {
            display: flex;
            width: 100%;
            overflow: hidden;
            }





        .status-label {
            font-family: 'Hanuman', sans-serif;
            font-size: 13px;
            font-weight: 700;
            border-radius: 6px;
            padding: 4px 12px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        /* Dark Gray - Pending  រង់ចាំទទួលសំណាក */
        .status-pending {
            background-color: #616161;
            color: #ffffff;
        }

        /* Dark Blue - Preparing កំពុងរៀបចំសំណាក */
        .status-preparing {
            background-color: #1976d2;
            color: #ffffff;
        }

        /* Dark Cyan - Testing កំពុងពិសោធន៍ */
        .status-testing {
            background-color: #00acc1;
            color: #ffffff;
        }

        /* Dark Indigo - Completed បានពិសោធន៍ */
        .status-completed {
            background-color: #0052CC;
            color: #ffffff;
        }

        /* Dark Amber - Reviewing កំពុងពិនិត្យលទ្ធផល */
        .status-reviewing {
            background-color: #f57f17;
            color: #ffffff;
        }

        /* Dark Orange - Returned */
        .status-returned {
            background-color: #e65100;
            color: #ffffff;
        }

        /* Dark Green - Approved */
        .status-approved {
            background-color: #388e3c;
            color: #ffffff;
        }

        /* Dark Red - Rejected */
        .status-rejected {
            background-color: #d32f2f;
            color: #ffffff;
        }