/* ═══════════════════════════════════════════════
   AKTIVMAP — main.css
═══════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-200);
    border-radius: 3px;
}

/* ── Design System Variables ─────────────────────────── */
:root {
    --primary: #1E88E5;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --accent: #7c3aed;
    --accent-light: #f5f3ff;
    --teal: #0891b2;
    --teal-light: #ecfeff;
    --green: #059669;
    --green-dark: #1B5E21;
    --green-light: #ecfdf5;
    --amber: #d97706;
    --amber-light: #fffbeb;
    --indigo: #6366f1;
    --indigo-light: #eef2ff;
    --danger: #DC2626;
    --danger-light: #FEF2F2;
    --neutral-900: #0f172a;
    --neutral-800: #1e293b;
    --neutral-700: #334155;
    --neutral-600: #475569;
    --neutral-400: #94a3b8;
    --neutral-200: #e2e8f0;
    --neutral-100: #f1f5f9;
    --neutral-50: #FAFBFA; /*#f8faff;*/
    --white: #ffffff;
    --font-heading: "Plus Jakarta Sans", sans-serif;
    --font-size-base: 0.85rem;
    --font-size-text: 0.8rem;
    --font-body: "Inter", sans-serif;
    --pos: #2563eb;
    --neg: #d97706;
    /* ─── Spacing (px, 4-based grid) ─── */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 32px;
    /* ─── Radius ─── */
    --radius-card: 14px;
    --radius-btn: 9px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --sidebar-bg: #0e2248;
    /* ─── Shadows ─── */
    --shadow-xs: 0 1px 2px rgba(15,23,42,.05);
    /*--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);*/
    --shadow-sm: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
    --shadow-md: 0 8px 20px rgba(15,23,42,.12);
    --shadow-lg: 0 20px 48px rgba(15,23,42,.16);
}

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

html {
    scroll-behavior: smooth;
}

/* ── Main Layout ─────────────────────────────────────── */
main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px 20px 24px;
    font-family: var(--font-body);
    background: var(--neutral-50);
    color: var(--neutral-600);
    min-height: 100vh;
    font-size: 13px;
}

/* ── Content Header ──────────────────────────────────── */
.content-header {
    margin-bottom: 1rem !important;
}

    .content-header .content-header-left {
        padding-left: 0px;
        border-radius: 8px;
    }

/* ── Section Header ──────────────────────────────────── */
.sec-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sec-head-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--neutral-700);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.sec-head-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--neutral-200), transparent);
}

.sec-head-note {
    font-size: 0.68rem;
    color: var(--neutral-400);
    white-space: nowrap;
}



/* ══ PAGE HEADER ══ */
.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.page-header-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 900px;
}

.page-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.page-header-row h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0 0 6px;
    line-height: 1.35;
}

.header-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.code-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 9999px;
    font-family: 'Courier New', monospace;
}

.year-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F5F3FF;
    color: #7C3AED;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 9999px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

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

    .tab-pane {
        padding: 14px;
    }

    .detail-tabs .form-tabs {
        position: static;
    }
}

/* ══ EMPTY / NOT FOUND ══ */
.empty-inline {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--neutral-600);
    font-style: italic;
    background: var(--neutral-100);
    border-radius: 8px;
}

.not-found-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--neutral-600);
}

    .not-found-state i {
        font-size: 36px;
        color: #cbd5e1;
        display: block;
        margin-bottom: 12px;
    }

    .not-found-state.hidden {
        display: none;
    }

/* ── Dashboard Card ── */
.dashboard-card {
    background-color: #fff;
    box-shadow: 1px 1px 20px 10px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    min-width: 0;
}

.dash-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.dash-card-body {
    padding: 16px 18px;
}

.dash-card-title {
    font-family: var(--font-head);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--neutral-900);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

/*.dash-card-title::before {
    content: '';
    width: 3px;
    height: 15px;
    background: var(--primary);
    border-radius: 2px;
    flex-shrink: 0;
}*/

/* ── Section Card ── */
.section-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    /* font-size: 12.5px; */
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 14px;
}

    .section-title i {
        color: var(--primary);
        font-size: 14px;
    }

.section-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ══════════════════════════════════════
       TIMELINE CARD
    ══════════════════════════════════════ */
.timeline-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    box-shadow: var(--shadow-sm);
    padding: 24px 28px;
    max-width: 600px;
    width: 100%;
    margin-top: 20px;
}

.timeline-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .timeline-card-title i {
        color: var(--primary);
        font-size: 13px;
    }

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

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 18px;
    position: relative;
}

    .timeline-item:not(:last-child)::before {
        content: '';
        position: absolute;
        left: 13px;
        top: 28px;
        width: 2px;
        height: calc(100% - 12px);
        background: #E2E8F0;
    }

.timeline-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
}

.dot-done {
    background: #D1FAE5;
    color: #059669;
    border: 2px solid #6EE7B7;
}

.dot-active {
    background: var(--primary-light);
    color: var(--primary);
    border: 2px solid #93C5FD;
}

.dot-pending {
    background: var(--neutral-100);
    color: #94A3B8;
    border: 2px dashed #CBD5E1;
}

.timeline-content {
    padding-top: 3px;
}

.timeline-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 2px;
}

.timeline-desc {
    font-size: 12px;
    color: var(--neutral-600);
    margin: 0;
}

.timeline-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    margin-left: 6px;
    vertical-align: middle;
}

.tag-done {
    background: #D1FAE5;
    color: #059669;
}

.tag-active {
    background: var(--primary-light);
    color: var(--primary);
}

.tag-pending {
    background: var(--neutral-100);
    color: #94A3B8;
}

/* ══════════════════════════════════════
                               TABLE CARD
    ══════════════════════════════════════ */
.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 20px;
}

.table-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
    flex-wrap: wrap;
    gap: 10px;
}

.table-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--neutral-900);
    text-transform: uppercase;
    letter-spacing: .4px;
}

    .table-title i {
        color: var(--primary);
    }

.table-count-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
}

.table-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-scroll-wrap {
    overflow-x: auto;
}

    .table-scroll-wrap::-webkit-scrollbar {
        height: 6px;
    }

    .table-scroll-wrap::-webkit-scrollbar-thumb {
        background: #e2e8f0;
        border-radius: 3px;
    }

/* ══════════════════════════════════════
            DETAIL TABLE
    ══════════════════════════════════════ */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
    .data-table thead th {
        color: var(--neutral-600);
        color: #fff;
        vertical-align: middle;
    }

    .data-table thead th {
        /*background: #f8fafc;*/
        background: var(--primary);
        padding: 10px 12px;
        font-size: 12px;
        font-weight: 700;
        /*color: #475569;*/
        color: #fff;
        text-transform: uppercase;
        letter-spacing: .4px;
        white-space: nowrap;
        border-bottom: 2px solid #e8edf5;
        box-shadow: inset 0 -1px 0 #e2e8f0;
        position: sticky;
        top: 0;
        z-index: 1;
    }

        .data-table thead th.th-num {
            text-align: right;
        }

        .data-table thead th.text-center {
            text-align: center;
        }

        .data-table thead th.text-right {
            text-align: right;
        }

    .data-table tbody tr {
        border-bottom: 1px solid #f1f5f9;
        transition: background .15s;
    }

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

        .data-table tbody tr:hover {
            background: #f8faff;
        }

    .data-table tbody td {
        padding: 8px 12px;
        vertical-align: middle;
        color: var(--neutral-900);
    }

        .data-table tbody td.td-num {
            text-align: right;
            font-variant-numeric: tabular-nums;
        }

        .data-table tbody td.text-center {
            text-align: center;
        }

        .data-table tbody td.text-right {
            text-align: right;
        }

.row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Cột hiển thị (column visibility toggle) ── */
.col-toggle-wrap {
    position: relative;
    margin-left: auto;
}

.col-toggle-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 220px;
    max-width: calc(100vw - 40px);
}

    .col-toggle-panel[hidden] {
        display: none;
    }

.col-toggle-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--neutral-600);
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 4px 8px 8px;
}

.col-toggle-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: 7px;
    font-size: 13px;
    color: var(--neutral-900);
    cursor: pointer;
    transition: background .15s;
    margin: 0;
}

    .col-toggle-item:hover {
        background: var(--neutral-100);
    }

    .col-toggle-item input[type="checkbox"] {
        width: 15px;
        height: 15px;
        accent-color: var(--primary);
        cursor: pointer;
        flex-shrink: 0;
    }

/* ══════════════════════════════════════
             PROGRESS BAR IN TABLE
    ══════════════════════════════════════ */
.sync-prog-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 110px;
}

.sync-prog-bar {
    flex: 1;
    height: 7px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.sync-prog-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #0d9488, #2563eb);
    transition: width .6s ease;
}

    .sync-prog-fill.amber {
        background: linear-gradient(90deg, #f59e0b, #f97316);
    }

    .sync-prog-fill.red {
        background: linear-gradient(90deg, #ef4444, #dc2626);
    }

.sync-prog-pct {
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    min-width: 34px;
    text-align: right;
}

/* ── Scroll Animations ───────────────────────────────── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

    .animate-on-scroll.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .animate-on-scroll:nth-child(2) {
        transition-delay: 0.05s;
    }

    .animate-on-scroll:nth-child(3) {
        transition-delay: 0.1s;
    }

    .animate-on-scroll:nth-child(4) {
        transition-delay: 0.15s;
    }

/* ── Card ─────────────────────────────────────────────── */
.card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px 10px;
    border-bottom: 1px solid var(--neutral-100);
    background: linear-gradient(135deg, #fafcff, var(--white));
    gap: 8px;
}

.card-title {
    font-family: var(--font-heading) !important;
    font-size: var(--font-size-base) !important;
    font-weight: 700 !important;
    color: var(--neutral-900);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0px;
}
    .card-title i {
        color: var(--primary);
    }
.card-subtitle {
    font-size: 11.5px;
    color: var(--neutral-400);
    margin-top: 2px;
}
.card-link {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.card-title-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    display: inline-block;
}

.card-tag {
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    padding: 2px 8px;
    border-radius: 9999px;
    background: var(--primary-light);
    color: var(--primary);
    white-space: nowrap;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Filter Bar ────────────────────────────────────────── */
.filter-bar {
    width: 100%;
    background: var(--white);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    /* margin-bottom: 14px; */
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    z-index: 99;
    position: relative;
}

.filter-search-wrap {
    position: relative;
    flex: 1;
    min-width: 160px;
    max-width: 220px;
}

    .filter-search-wrap i {
        position: absolute;
        left: 9px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        font-size: 11px;
        pointer-events: none;
    }

.filter-bar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 480px) {
    .filter-bar-right span {
        display: none;
    }
}

/* range filter (number / date) */
.range-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
}

    .range-wrap .f-input {
        flex: 1;
        min-width: 0;
    }

.range-sep {
    font-size: 11px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* filter-bool */
.bool-group {
    display: flex;
    gap: 4px;
}

.bool-btn {
    padding: 5px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 10.5px;
    font-weight: 500;
    color: #64748b;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

    .bool-btn:hover {
        border-color: #94a3b8;
        background: #f1f5f9;
    }

    .bool-btn.checked {
        background: var(--primary-light);
        border-color: var(--primary);
        color: var(--primary);
        font-weight: 600;
    }

/* filter-input-text */
.filter-input {
    width: 100%;
    padding: 5px 10px 5px 28px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px;
    font-size: 11px;
    color: #374151;
    /* background: #f8fafc; */
    outline: none;
    transition: border 0.18s, box-shadow 0.18s;
    width: 100%;
    height: 40px;
}

    .filter-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
        background: #fff;
    }

    .filter-input::placeholder {
        color: #94a3b8;
    }

.filter-label {
    font-size: inherit;
    font-weight: 600;
    color: var(--neutral-900);
    white-space: nowrap;
}

/* filter-select */
.filter-select {
    padding: 6px 26px 6px 9px;
    border: 1px solid #aaa;
    border-radius: 7px;
    /*font-size: 11px;*/
    color: var(--neutral-900);
    /* background: var(--neutral-50); */
    /*background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24'%3E%3Cpath fill='%2394a3b8' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");*/
    background-repeat: no-repeat;
    background-position: right 7px center;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: border 0.18s, box-shadow 0.18s;
    width: 100%;
    height: 40px;
}

    .filter-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
        background-color: #fff;
        outline: none;
    }

    .filter-select:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        background: #f1f5f9;
    }

/* filter-input-date */
.filter-input-date {
    padding: 5px 10px;
    border: 1px solid #aaa;
    border-radius: 6px;
    /*font-size: 11px;*/
    color: #374151;
    /*background: #f8fafc;*/
    outline: none;
    transition: border 0.18s, box-shadow 0.18s;
    width: 128px;
}

    .filter-input-date:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
        outline: none;
    }

.filter-date-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-date-sep {
    font-size: 11px;
    color: #94a3b8;
}

/* Biến thể số — dùng cho khoảng giá trị số (VD lý trình Km) thay vì ngày.
   Cấu trúc giống hệt filter-date-group/-sep, chỉ đổi tên cho đúng ngữ nghĩa
   khi cặp input không phải kiểu date. */
.filter-input-number {
    padding: 5px 10px;
    border: 1px solid #aaa;
    border-radius: 6px;
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
    width: 110px;
    transition: border .18s, box-shadow .18s;
    height: 40px;
}

    .filter-input-number::placeholder {
        color: #94a3b8;
    }

    .filter-input-number:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37,99,235,.12);
        outline: none;
    }

.btn-filter-search {
    width: 32px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    flex-shrink: 0;
    /*padding: 5px 14px;
    font-weight: 600;
    gap: 5px;*/
}

    .btn-filter-search:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
        filter: brightness(1.05);
    }

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

.btn-filter-export {
    background: linear-gradient(135deg, #0d9488, #0ea5e9);
}

    .btn-filter-export:hover {
        box-shadow: 0 6px 20px rgba(13,148,136,.3);
    }

.filter-sep {
    width: 1px;
    height: 20px;
    background: var(--neutral-200);
    margin: 0 4px;
}

.filter-btn-apply {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}

    .filter-btn-apply:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
    }

.filter-btn-reset {
    background: var(--neutral-100);
    color: var(--neutral-900);
    border: 1px solid var(--neutral-200);
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
}

    .filter-btn-reset:hover {
        background: var(--neutral-200);
    }

.filter-info {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--neutral-400);
}

    .filter-info .dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--green);
        display: inline-block;
    }

        .filter-info .dot.orange {
            background: var(--orange);
        }

.export-btn-apply {
    border-radius: 5px;
    transition: all 0.18s;
}

    .export-btn-apply:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
    }

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

    .status-badge::before {
        content: "";
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: currentColor;
        flex-shrink: 0;
    }

.badge-huy {
    background: #fef3c7;
    color: #92400e;
}

.badge-moi {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-dang {
    background: #dcfce7;
    color: #166534;
}

.badge-hoan {
    background: #f0fdf4;
    color: #15803d;
}

.badge-tam {
    background: #f5f3ff;
    color: #6d28d9;
}

.st-planned {
    background: #F1F5F9;
    color: #475569;
}

.st-approved {
    background: #EEF2FF;
    color: #4F46E5;
}

.st-inprogress {
    background: #EFF6FF;
    color: #2563EB;
}

.st-suspended {
    background: #FFFBEB;
    color: #B45309;
}

.st-completed {
    background: #ECFDF5;
    color: #047857;
}

.st-accepted {
    background: #F0FDF4;
    color: #15803D;
}

.st-closed {
    background: #F0FDFA;
    color: #0F766E;
}

.st-cancelled {
    background: #F1F5F9;
    color: #64748B;
}

.st-rejected {
    background: #FFF7ED;
    color: #C2410C;
}

.prio-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

    .prio-badge .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: currentColor;
    }

.prio-cao {
    background: #FFF7ED;
    color: #C2410C;
}

.prio-tb {
    background: #EFF6FF;
    color: #2563EB;
}

.prio-thap {
    background: #F1F5F9;
    color: #64748B;
}

/* ── Responsive ── */
@media (max-width: 969px) {
    .filter-sep {
        display: none;
    }

    .wrap-filter-select {
        width: auto !important;
    }
}

@media (max-width: 768px) {
    .filter-bar {
        gap: 6px;
    }

    .wrap-filter-select {
        width: 100% !important;
    }

    .filter-search-wrap,
    .filter-select {
        min-width: unset;
        width: 100%;
        max-width: 100% !important;
    }

    .filter-date-group {
        width: 100%;
    }

    .filter-input-date {
        width: 50%;
    }

    .btn-audio {
        margin-left: 0;
    }
}

/* ── Datatable ───────────────────────────────────── */
.data-tbl {
    width: 100%;
    font-size: inherit;
    border-collapse: collapse;
}

    .data-tbl thead th {
        font-weight: 600;
        color: var(--neutral-600);
        font-size: inherit;
        padding: 5px 8px;
        border-bottom: 2px solid var(--neutral-200);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        white-space: nowrap;
    }

    .data-tbl tbody td {
        padding: 6px 8px;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .data-tbl tbody tr:hover {
        background: #f8faff;
    }

/* ── Tabs ── */
.page-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 9px 9px 0 0;
    padding: 0 16px;
    box-shadow: var(--shadow-sm);
}

.page-tab {
    padding: 10px 18px;
    /* font-size: 12px; */
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.18s, border-color 0.18s;
    white-space: nowrap;
}

    .page-tab:hover {
        color: var(--primary);
    }

    .page-tab.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        font-weight: 700;
    }

/* Tab content */
.tab-pane {
    display: none;
}

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

.tab-pane-title {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

    .tab-pane-title .roman {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        flex-shrink: 0;
        background: var(--primary-light);
        color: var(--primary);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: 800;
        /*font-family: 'Courier New', monospace;*/
    }

.count-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
}

/* ── Action Row ── */
.action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

/* ── Thống kê hạ tầng cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

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

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

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: var(--radius-btn);
    font-family: var(--font-body) !important;
    font-size: var(--font-size-text) !important;
    font-weight: 600 !important;
    cursor: pointer;
    /* border: none; */
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
        filter: brightness(1.08);
    }

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

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #fff;
    border: none;
    padding: 9px 22px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

    .btn-outline:hover {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.08);
        color: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

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

.btn-outline-custom {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 9px 22px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .btn-outline-custom:hover {
        background: var(--primary-light);
        box-shadow: 0 6px 20px rgba(37,99,235,.12);
    }

.btn-ghost {
    background: var(--neutral-100);
    color: var(--neutral-700);
    border: 1px solid var(--neutral-200);
}

    .btn-ghost:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
        background: white;
    }

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

.btn svg {
    flex-shrink: 0;
}

.btn-view-data {
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 6px 16px;
    /* font-size: 11.5px; */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .btn-view-data:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(22, 163, 74, 0.3);
        filter: brightness(1.07);
    }

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

.btn-filter-action {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all .2s ease;
}

    .btn-filter-action:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(37,99,235,.3);
        filter: brightness(1.05);
    }

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

.btn-filter-reset {
    background: #fff;
    color: var(--neutral-600);
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all .2s ease;
}

    .btn-filter-reset:hover {
        border-color: var(--primary);
        color: var(--primary);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(37,99,235,.12);
    }

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

.btn-row-action {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s ease;
    border: 1px solid transparent;
}

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

    .btn-row-action.view {
        background: #fff;
        border-color: #e2e8f0;
        color: var(--primary);
        text-decoration: none;
    }

        .btn-row-action.view:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(37,99,235,.18);
            border-color: var(--primary);
            background: var(--primary-light);
        }

    .btn-row-action.add {
        background: var(--primary-light);
        color: var(--primary);
    }

        .btn-row-action.add:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(37,99,235,.3);
            filter: brightness(1.08);
        }

    .btn-row-action.edit {
        background: linear-gradient(135deg, var(--primary), #3b82f6);
        color: #fff;
    }

        .btn-row-action.edit:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(37,99,235,.3);
            filter: brightness(1.08);
        }

    .btn-row-action.delete {
        background: #fff;
        border-color: #e2e8f0;
        color: var(--neutral-600);
    }

        .btn-row-action.delete:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,.1);
            border-color: var(--neutral-600);
            color: var(--neutral-900);
        }

    .btn-row-action.total {
        background: #009c9f;
        border-color: #e2e8f0;
        color: #fff;
    }

        .btn-row-action.total:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,.1);
            border-color: var(--neutral-600);
            color: #fff;
        }

.btn-outline-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: var(--neutral-600);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

    .btn-outline-action:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
        color: var(--primary);
        border-color: var(--primary);
    }

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

    .btn-outline-action.primary {
        background: linear-gradient(135deg, var(--primary), #3b82f6);
        color: #fff !important;
        border-color: transparent;
    }

        .btn-outline-action.primary:hover {
            box-shadow: 0 6px 20px rgba(37, 99, 235, .25);
            filter: brightness(1.05);
            color: #fff;
        }

    .btn-outline-action.danger {
    }

        .btn-outline-action.danger:hover {
            color: var(--danger);
            border-color: var(--danger);
            box-shadow: 0 4px 12px rgba(220,38,38,.15);
        }

/* Phiếu đã SUBMITTED — khoá nút Chỉnh sửa, không cho tương tác */
.btn-row-action[disabled] {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
    background: #f1f5f9;
    color: var(--neutral-600);
    box-shadow: none;
}
/* ── Badges ─────────────────────────────────────────── */
.badge-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-blue {
    background: #eff6ff;
    color: #2563eb;
}

.badge-violet {
    background: #f5f3ff;
    color: #7c3aed;
}

.badge-green {
    background: #f0fdf4;
    color: #15803d;
}

.badge-slate {
    background: #f1f5f9;
    color: #475569;
}

.badge-amber {
    background: #fffbeb;
    color: #b45309;
}

.badge-teal {
    background: #ecfeff;
    color: #0891b2;
}

.badge-indigo {
    background: #eef2ff;
    color: #6366f1;
}

.badge-gray {
    background: #f8fafc;
    color: #64748b;
}

.badge-red {
    background: #fee2e2;
    color: #dc2626;
}

.badge-yellow {
    background: #fef3c7;
    color: #d97706;
}

.badge-pink {
    background: #fce7f3;
    color: #db2777;
}

.badge-cyan {
    background: #ecfeff;
    color: #0891b2;
}

/* ── FORM-INPUT ─────────────────────────────────────────── */
/* Divider for sub-sections within a column */
.form-subsection-title {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin: 16px 0 10px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.field-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.form-group label .req {
    color: #ef4444;
    margin-left: 2px;
}

/* ── TAB ─────────────────────────────────────────── */
.form-tabs {
    background: #fff;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}

.form-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .18s, border-color .18s;
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

    .form-tab:hover {
        color: var(--primary);
    }

    .form-tab.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
    }

    .form-tab:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: -2px;
    }

    .form-tab i {
        font-size: 13px;
    }

.form-tabs button:focus {
    outline: none !important;
}

.form-body {
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    border-top: none;
    padding: 0;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.detail-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.detail-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.detail-title-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--neutral-900);
}

.detail-count-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
}

/* ── MODAL ─────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

    .modal-overlay.open {
        opacity: 1;
        visibility: visible;
    }
.legend-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.96);
    width: min(920px, 92vw);
    max-height: 86vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

    .legend-modal.open {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
    }
    .legend-modal.size-sm {
        width: min(500px, 92vw);
    }
    .legend-modal.size-md {
        width: min(760px, 92vw);
    }
    .legend-modal.size-lg {
        width: min(980px, 92vw);
    }
    .legend-modal.size-xl {
        width: min(1024px, 92vw);
    }

.legend-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px 14px 0 0;
    flex-shrink: 0;
}

.legend-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}
    .legend-modal-title small {
        display: block;
        font-size: 11px;
        font-weight: 500;
        color: rgba(255, 255, 255, .75);
        margin-top: 2px;
    }

.legend-modal-body {
    padding: 20px 22px;
    overflow-y: auto;
}
.modal-close-btn {
    background: rgba(255,255,255,.18);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    transition: all .2s ease;
}

    .modal-close-btn:hover {
        background: rgba(255,255,255,.32);
        transform: translateY(-2px);
    }

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

.legend-card-desc {
    font-size: 13px;
    color: var(--neutral-600);
    margin: 0 0 16px;
}

.legend-group {
    margin-bottom: 16px;
}

    .legend-group:last-child {
        margin-bottom: 0;
    }

.legend-group-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--neutral-600);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
}

@media (min-width: 768px) {
    .legend-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .legend-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.status-legend-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.legend-item-code {
    font-size: 11px;
    color: var(--neutral-600);
    display: block;
    margin-top: 3px;
    font-family: 'Courier New', monospace;
}

.legend-item-desc {
    font-size: 13px;
    color: var(--neutral-600);
    display: block;
    margin-top: 3px;
    line-height: 1.5;
}

.legend-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--neutral-900);
}

.legend-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.info-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 14px;
}

.info-text {
    text-align: center;
    font-size: 14px;
    color: var(--neutral-600);
    line-height: 1.6;
}

.confirm-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--danger-light);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 14px;
}

.confirm-text {
    text-align: center;
    font-size: 14px;
    color: var(--neutral-600);
    line-height: 1.6;
}

.btn-save-modal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

    .btn-save-modal:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(37,99,235,.25);
        filter: brightness(1.05);
    }

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

.btn-cancel-modal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: var(--neutral-600);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
}

    .btn-cancel-modal:hover {
        background: #f1f5f9;
        transform: translateY(-1px);
    }

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

.btn-danger-modal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

    .btn-danger-modal:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(220,38,38,.28);
        filter: brightness(1.05);
    }

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

/* ═══════════════════════════════════════════════
   attachment-list
═══════════════════════════════════════════════ */

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.attachment-icon {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
}

    .attachment-icon.pdf {
        background: linear-gradient(135deg, #F59E0B, #FBBF24);
    }

    .attachment-icon.image {
        background: linear-gradient(135deg, #0EA5E9, #38BDF8);
    }

    .attachment-icon.doc {
        background: linear-gradient(135deg, #6366F1, #818CF8);
    }

    .attachment-icon.other {
        background: linear-gradient(135deg, #64748B, #94A3B8);
    }

.attachment-text {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--neutral-900);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-meta {
    font-size: 11px;
    color: var(--neutral-600);
    display: block;
    margin-top: 1px;
}

.attachment-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-attachment-action {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--neutral-600);
    transition: all .2s ease;
}

    .btn-attachment-action:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,.08);
        border-color: var(--primary);
        color: var(--primary);
    }

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

    .btn-attachment-action.remove:hover {
        border-color: var(--neutral-600);
        color: var(--neutral-900);
    }

.attachment-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--neutral-600);
    margin-top: 3px;
}

    .attachment-count-badge i {
        color: var(--primary);
        font-size: 10px;
    }

/* Upload zone (click / kéo-thả) — dùng trong form thêm/sửa phiếu điều tra */
.upload-zone {
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color .18s, background .18s;
}

    .upload-zone:hover,
    .upload-zone.dragover {
        border-color: var(--primary);
        background: var(--primary-light);
    }

    .upload-zone i {
        font-size: 22px;
        color: #cbd5e1;
        display: block;
        margin-bottom: 6px;
    }

    .upload-zone p {
        font-size: 12px;
        color: var(--neutral-600);
        margin: 0;
    }

    .upload-zone span {
        color: var(--primary);
        font-weight: 600;
    }

    .upload-zone .field-hint {
        display: block;
        margin-top: 4px;
    }

.empty-state {
    padding: 48px 20px;
    text-align: center;
    color: var(--neutral-600);
}

    .empty-state i {
        font-size: 32px;
        color: #cbd5e1;
        margin-bottom: 10px;
        display: block;
    }

    .empty-state.hidden {
        display: none;
    }

/* ══════════════════════════════════════
       RESPONSIVE — mobile-first breakpoints
       320 / 768 / 1024 / 1280
    ══════════════════════════════════════ */
@media (max-width: 767px) {
    .legend-modal {
        width: 94vw;
        max-height: 90vh;
    }

    .legend-modal-body {
        padding: 16px;
    }
}