:root {
    --primary-color: #003865;       /* Xanh dương đặc trưng ATS */
    --primary-light: #1A5485;       /* Xanh dương sáng hơn chút */
    --primary-hover: #00284D;
    
    --accent-color: #e8f1f8;        /* Xanh dương cực nhạt, rất thanh lịch, tươi sáng */
    --accent-gold: #D4AF37;         /* Vàng đồng sang trọng nếu cần điểm nhấn */
    
    --bg-color: #f4f7fa;            /* Nền trắng xám cực nhẹ, sang trọng */
    --surface-color: #ffffff;
    
    --text-main: #1a202c;           /* Đen chuyên nghiệp */
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 32px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0, 56, 101, 0.04);
    z-index: 100;
}

.logo-container {
    padding: 0 24px 32px;
    margin-bottom: 12px;
    text-align: center;
}

.logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 12px;
}

.slogan {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu {
    display: flex;
    flex-direction: column;
    padding: 0 16px;
}

.menu-item {
    padding: 14px 18px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14.5px;
    font-weight: 500;
    border-radius: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.menu-item:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.menu-item.active {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* Hiệu ứng thanh dọc bên trái cho menu active */
.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 0 4px 4px 0;
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.menu-item.active i {
    transform: scale(1.15);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 48px 60px;
    max-width: 1400px;
}

/* Section Transitions */
.section {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.header {
    margin-bottom: 40px;
    position: relative;
}

/* Thêm điểm nhấn gradient nhẹ cho tiêu đề chính */
.header h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.header p {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 800px;
    line-height: 1.7;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* Glassmorphism / Luxury card effect */
.stat-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 28px 32px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(0, 56, 101, 0.04), inset 0 0 0 1px rgba(255,255,255,0.5);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 56, 101, 0.08);
}

/* Xử lý căn chỉnh "4.2 Tỷ" */
.stat-card h2 {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.stat-card .number {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.stat-card .unit {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-light);
}

.stat-card p {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
}

/* Form Card */
.card {
    background-color: var(--surface-color);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 48px;
    box-shadow: 0 10px 40px rgba(0, 56, 101, 0.03);
    position: relative;
    overflow: hidden;
}

/* Subtle accent line on top of card */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.card h3 {
    font-size: 24px;
    color: var(--text-main);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.card .subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.6;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.form-group label {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.25s ease;
    background-color: #f8fafc;
    color: var(--text-main);
}

.form-control:hover {
    border-color: #cbd5e1;
}

.form-control:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(0, 56, 101, 0.08);
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.upload-area i {
    font-size: 36px;
    color: var(--primary-light);
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.upload-area:hover i {
    transform: scale(1.1);
}

.upload-area p {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
}

small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 13.5px;
}

/* Buttons */
.btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 6px 16px rgba(0, 56, 101, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(0, 56, 101, 0.3);
    transform: translateY(-2px);
}

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

.form-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.processing-time {
    font-size: 14.5px;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.processing-time i {
    color: #059669; /* Green success */
    font-size: 18px;
}

/* --- Login Overlay --- */
#login-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(244, 247, 250, 0.90);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.login-box {
    background: #ffffff;
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 56, 101, 0.08);
    text-align: center;
    max-width: 420px;
    width: 90%;
    border: 1px solid rgba(0, 56, 101, 0.05);
}

.login-logo {
    width: 110px;
    margin-bottom: 24px;
}

.login-box h2 {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-box p {
    color: var(--text-muted);
    font-size: 14.5px;
    margin-bottom: 32px;
}

.login-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-box input {
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    color: var(--primary-color);
    font-weight: 500;
}

.login-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 56, 101, 0.08);
}

.login-box #login-code {
    text-align: center;
    letter-spacing: 6px;
    font-weight: 600;
}

.login-box button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-box button:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 56, 101, 0.2);
}

.login-box button:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.login-error {
    color: #ef4444 !important;
    font-size: 13px !important;
    margin: 12px 0 0 !important;
    font-weight: 500;
}

.sidebar-user {
    margin-top: auto;
    padding: 20px 24px 0;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-user[hidden],
.menu-item[hidden] { display: none; }

.sidebar-user button {
    align-self: flex-start;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 13px;
    color: var(--primary-color);
    cursor: pointer;
}

.sidebar-user button:hover { border-color: var(--primary-color); }

.no-access {
    padding: 48px;
    color: var(--text-muted);
    font-size: 15px;
}

/* ===== Phần bổ sung: khối ghi chú, kết quả, kiểm chứng ===== */
.notice {
    display: flex; gap: 12px; align-items: flex-start;
    background: #f8fafc; border: 1px solid #e2e8f0; border-left: 3px solid #1e3a8a;
    border-radius: 6px; padding: 14px 16px; margin: 18px 0;
    font-size: 13px; line-height: 1.65; color: #475569;
}
.notice i { color: #1e3a8a; margin-top: 3px; }
.notice b { color: #0f172a; }
.notice mark { background: #fef08a; padding: 0 3px; border-radius: 2px; }

.result {
    margin-top: 24px; padding-top: 24px; border-top: 1px solid #e2e8f0;
}
.result-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 20px; flex-wrap: wrap; margin-bottom: 20px;
}
.result-head h4 { font-size: 17px; color: #0f172a; margin: 0 0 4px; }
.result-head p { font-size: 13px; color: #64748b; margin: 0; }
.result-head .btn { white-space: nowrap; }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 900px) { .result-grid { grid-template-columns: 1fr; } }
.result h5 {
    font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
    color: #64748b; margin: 18px 0 8px; font-weight: 600;
}
.result ul { margin: 0; padding-left: 18px; }
.result li { font-size: 13px; line-height: 1.7; color: #334155; margin-bottom: 6px; }

.fee-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fee-table th {
    text-align: left; padding: 8px; background: #f1f5f9; color: #475569;
    font-weight: 600; border: 1px solid #e2e8f0;
}
.fee-table td { padding: 8px; border: 1px solid #e2e8f0; color: #334155; vertical-align: top; }
.fee-blank { color: #94a3b8; font-style: italic; text-align: center; white-space: nowrap; }
.fee-note {
    font-size: 12px; color: #64748b; line-height: 1.6; margin-top: 10px;
    background: #f8fafc; padding: 10px 12px; border-radius: 6px;
}
.fee-note i { color: #1e3a8a; margin-right: 6px; }
.ask-list li { color: #7c2d12; }

.verify-bar {
    display: flex; gap: 10px; align-items: center; padding: 12px 16px;
    border-radius: 6px; font-size: 13px; margin-bottom: 20px;
}
.verify-bar.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.verify-bar.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

.memo-sec { margin-bottom: 22px; }
.memo-sec h5 { display: flex; align-items: center; gap: 8px; text-transform: none; font-size: 14px; color: #0f172a; }
.memo-sec p { font-size: 13.5px; line-height: 1.75; color: #334155; margin: 6px 0; text-align: justify; }
.memo-sec .badge {
    font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
    background: #f0fdf4; color: #166534; text-transform: none; letter-spacing: 0;
}
.memo-sec.unverified { background: #fffbeb; border-left: 3px solid #f59e0b; padding: 12px 14px; border-radius: 4px; }
.memo-sec.unverified .badge { background: #fef3c7; color: #92400e; }
.memo-sec.ask { background: #f8fafc; padding: 12px 14px; border-radius: 6px; }
.cites { font-size: 11.5px !important; color: #94a3b8 !important; }
.issues li { font-size: 12px; color: #92400e; }
.src-list li { font-size: 12px; color: #64748b; }
.src-list a { color: #1e3a8a; margin-left: 6px; }

/* ===== Thanh tiến trình ===== */
.steps {
    margin-top: 18px; padding: 18px 20px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
}
.steps-list { display: flex; flex-direction: column; gap: 2px; }
.step {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 0; font-size: 13.5px; color: #94a3b8;
    transition: color .35s ease;
}
.step .dot { width: 18px; text-align: center; font-size: 13px; }
.step .label { flex: 1; }
.step .took { font-size: 11.5px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.step.doing { color: #1e3a8a; font-weight: 600; }
.step.doing .dot { color: #1e3a8a; }
.step.done { color: #475569; }
.step.done .dot { color: #16a34a; }
.steps-note {
    margin: 14px 0 0; padding-top: 14px; border-top: 1px dashed #e2e8f0;
    font-size: 12.5px; color: #64748b; line-height: 1.6;
}
.steps-note i { color: #1e3a8a; margin-right: 6px; }
.steps-clock {
    float: right; color: #1e3a8a; font-variant-numeric: tabular-nums;
    background: #eef2ff; padding: 2px 10px; border-radius: 20px; font-size: 12px;
}

/* ===== Căn cứ pháp lý nguyên văn (memo) ===== */
.law-quote {
    margin: 12px 0; padding: 12px 16px;
    background: #fbfcfe; border: 1px solid #e2e8f0; border-left: 3px solid #16a34a;
    border-radius: 6px;
}
.law-ref { font-size: 13px; font-weight: 700; color: #0f172a; margin: 0 0 6px; }
.law-quote blockquote {
    margin: 0; padding: 0; font-size: 13px; line-height: 1.75; color: #334155;
    font-style: italic; text-align: justify;
}
.law-src { display: inline-block; margin-top: 8px; font-size: 12px; color: #1e3a8a; }
.law-src i { margin-right: 4px; font-size: 10px; }
.analysis-head { margin-top: 22px !important; }

/* ===== Email nháp ===== */
.btn-group-mail { display: flex; gap: 10px; flex-wrap: wrap; }
.email-draft {
    background: #fbfcfe; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 18px 20px; margin-bottom: 16px;
}
.email-subject { font-size: 13.5px; color: #0f172a; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px dashed #e2e8f0; }
.email-body { font-size: 13.5px; line-height: 1.8; color: #334155; }
.email-notes-h {
    font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
    color: #64748b; margin: 16px 0 8px; font-weight: 600;
}

/* ===== Rà soát hợp đồng ===== */
.upload-area.drag { border-color: #1e3a8a; background: #eef2ff; }
.finding {
    border: 1px solid #e2e8f0; border-left-width: 4px; border-radius: 6px;
    padding: 14px 16px; margin-bottom: 14px; background: #fff;
}
.finding.risk-high { border-left-color: #dc2626; }
.finding.risk-mid  { border-left-color: #f59e0b; }
.finding.risk-low  { border-left-color: #16a34a; }
.finding-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.risk-badge { font-size: 10.5px; font-weight: 700; padding: 2px 10px; border-radius: 20px; background: #f1f5f9; color: #475569; }
.risk-high .risk-badge { background: #fef2f2; color: #dc2626; }
.risk-mid  .risk-badge { background: #fffbeb; color: #b45309; }
.risk-low  .risk-badge { background: #f0fdf4; color: #166534; }
.finding .pid { font-size: 11px; color: #94a3b8; font-family: monospace; }
.badge-warn { font-size: 11px; color: #b45309; }
.finding blockquote {
    margin: 0 0 8px; padding: 8px 12px; background: #f8fafc;
    border-radius: 4px; font-size: 12.5px; font-style: italic; color: #475569;
}
.finding p { font-size: 13px; line-height: 1.65; color: #334155; margin: 4px 0; }
.finding .suggestion { color: #166534; }

/* ===== Cập nhật luật ===== */
.watch-report { font-size: 13.5px; line-height: 1.8; color: #334155; }
.watch-report h5 { font-size: 14px; color: #0f172a; margin: 18px 0 8px; }
.watch-report li { margin: 4px 0 4px 18px; }

/* ===== Ảnh bản tin ===== */
.kw { background: #eef2ff; color: #1e3a8a; padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.photo-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px; margin-top: 6px;
}
.photo-card {
    position: relative; border-radius: 8px; overflow: hidden; display: block;
    border: 1px solid #e2e8f0; aspect-ratio: 3/2; background: #f1f5f9;
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.photo-card:hover img { transform: scale(1.04); }
.photo-card .credit {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px;
    background: linear-gradient(transparent, rgba(15,23,42,.75));
    color: #fff; font-size: 11px;
}

/* ===== Law Bulletin — thẻ bài theo chuẩn Legal Update của atslegal.vn ===== */
.lu-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px; margin-bottom: 8px;
}
.lu-card {
    border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden;
    background: #fff; display: flex; flex-direction: column;
}
.lu-img { aspect-ratio: 5/2; overflow: hidden; background: #f1f5f9; }
.lu-img img { width: 100%; height: 100%; object-fit: cover; }
.lu-body { padding: 16px 18px; }
.lu-cat {
    display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .6px;
    text-transform: uppercase; color: #b45309; margin-bottom: 6px;
}
.lu-title { font-size: 15px; color: #1e3a8a; margin: 0 0 8px; text-transform: uppercase; line-height: 1.45; }
.lu-open { font-size: 13px; color: #334155; line-height: 1.65; margin: 0 0 8px; }
.lu-points { margin: 0 0 8px; padding-left: 18px; }
.lu-points li { font-size: 12.5px; color: #475569; line-height: 1.6; margin: 3px 0; }
.lu-prev {
    font-size: 12.5px; color: #64748b; background: #f8fafc; padding: 8px 12px;
    border-radius: 6px; line-height: 1.6; margin: 0 0 8px;
}
.lu-ref { font-size: 12.5px; font-weight: 600; color: #1e3a8a; margin: 0; }
.lu-draft {
    border-left: 3px solid #f59e0b; background: #fffbeb; padding: 10px 14px;
    border-radius: 6px; margin-bottom: 10px; font-size: 13px; color: #334155;
}
.lu-draft p { margin: 4px 0 0; font-size: 12.5px; color: #64748b; line-height: 1.6; }

/* ===== Memo: typography dễ đọc cho luật sư ===== */
.memo-body { max-width: 900px; }
.memo-sec p {
    font-size: 15.5px; line-height: 1.95; color: #1f2937;
    margin: 10px 0; text-align: justify;
}
.memo-sec h5 { font-size: 16px; margin-bottom: 4px; }
.memo-sec .badge { font-size: 11px; }
.cites { font-size: 12px !important; color: #94a3b8 !important; text-align: left !important; }

/* Hộp kết luận — thứ luật sư cần thấy đầu tiên */
.answer-box {
    background: #eef2ff; border: 1px solid #c7d2fe; border-left: 5px solid #1e3a8a;
    border-radius: 8px; padding: 18px 22px; margin-bottom: 24px;
}
.answer-label {
    font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
    color: #1e3a8a; margin: 0 0 8px;
}
.answer-label i { margin-right: 6px; }
.answer-text {
    font-size: 16.5px; line-height: 1.9; color: #111827; margin: 0; text-align: justify;
}

/* Căn cứ pháp lý: gập/mở được, nguyên văn dễ đọc */
.law-fold { margin-bottom: 6px; }
.law-fold summary { cursor: pointer; list-style: none; }
.law-fold summary::-webkit-details-marker { display: none; }
.law-fold summary h5 {
    display: inline-block; font-size: 15px; color: #0f172a; margin: 12px 0 6px;
}
.law-fold summary h5::after {
    content: "▾"; margin-left: 8px; color: #64748b; font-size: 12px;
}
.law-fold:not([open]) summary h5::after { content: "▸"; }
.law-quote blockquote { font-size: 14px; line-height: 1.85; }
.law-ref { font-size: 14px; }
.analysis-head { font-size: 15px !important; color: #0f172a; margin: 20px 0 4px; }

/* ===== Vòng hỏi–đáp báo giá ===== */
.qa-loop {
    margin-top: 24px; padding: 18px 20px;
    background: #fbfcfe; border: 1px solid #e2e8f0; border-left: 4px solid #b45309;
    border-radius: 8px;
}
.qa-loop > h5 { font-size: 13px; color: #0f172a; margin: 0 0 14px; }
.qa-loop > h5 i { color: #b45309; margin-right: 6px; }
.qa-item { margin-bottom: 12px; }
.qa-q { font-size: 13.5px; color: #7c2d12; font-weight: 600; margin: 0 0 6px; }
.qa-a { font-size: 13.5px; }

/* ===== Trợ lý chọn template ===== */
.tpl-row { display: flex; gap: 10px; align-items: stretch; }
.tpl-row .form-control { flex: 1; }
.btn-ghost {
    border: 1px solid #c7d2fe; background: #eef2ff; color: #1e3a8a;
    border-radius: 6px; padding: 0 16px; font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: background .15s;
}
.btn-ghost:hover { background: #e0e7ff; }
.btn-ghost:disabled { opacity: .6; cursor: default; }
.tpl-reason {
    display: block; margin-top: 8px; font-size: 12.5px; color: #475569;
    background: #f8fafc; border-left: 3px solid #16a34a; border-radius: 4px;
    padding: 8px 12px; line-height: 1.6;
}

/* ===== Wizard: Trợ lý trình Luật sư duyệt mẫu ===== */
.wizard {
    margin-top: 18px; padding: 18px 22px;
    background: #fbfcfe; border: 1px solid #e2e8f0; border-left: 4px solid #1e3a8a;
    border-radius: 8px;
}
.wiz-loading { font-size: 13.5px; color: #475569; margin: 0; }
.wiz-loading i { color: #1e3a8a; margin-right: 8px; }
.wiz-head {
    font-size: 12px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
    color: #1e3a8a; margin-bottom: 10px;
}
.wiz-head i { margin-right: 6px; }
.wiz-text { font-size: 13.5px; color: #475569; margin: 0 0 10px; }
.wiz-choice {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 14px 16px; margin-bottom: 14px;
}
.wiz-tpl { font-size: 15px; color: #0f172a; margin: 0 0 6px; }
.wiz-reason { font-size: 13px; color: #64748b; line-height: 1.65; margin: 0; }
.wiz-warn { font-size: 13px; color: #b45309; margin: 8px 0 0; }
.lang-badge {
    display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 8px;
    border-radius: 20px; background: #f0fdf4; color: #166534; vertical-align: 2px;
}
.lang-badge.en { background: #eff6ff; color: #1d4ed8; }
.wiz-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.wiz-item {
    display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer;
    font-size: 13.5px; color: #0f172a; transition: border-color .15s;
}
.wiz-item:hover { border-color: #1e3a8a; }
.wiz-item input { margin-top: 4px; }
.wiz-item small { color: #64748b; line-height: 1.5; }

/* ===== Hai phương án khi tiền lệ vênh phân tích ===== */
.wiz-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 900px) { .wiz-duo { grid-template-columns: 1fr; } }
.wiz-duo .wiz-choice { margin-bottom: 0; display: flex; flex-direction: column; }
.wiz-duo .wiz-reason { flex: 1; margin-bottom: 12px; }
.wiz-tag {
    font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    color: #1e3a8a; margin: 0 0 8px;
}
.wiz-tag.alt { color: #b45309; }

/* --- Mail báo phí (HM1 dạng 2) --- */
.mail-bp { margin-top: 18px; padding-top: 14px; border-top: 2px solid #e2e8f0; }
.mail-bp h5 { margin: 0 0 8px; font-size: 13px; color: #475569; }
.mail-bp-tuy-chon { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.mail-bp-tuy-chon .form-control { width: auto; }
.mail-bp-xem { margin-top: 12px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; max-height: 420px; overflow: auto; }
.mail-bp-nut { margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* HM2 bộ hồ sơ (static/ho-so.js). Ô ngắn xếp lưới 2-3 cột, ô rong/dai cả hàng (_truong.yaml) */
.bo-tong{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:12px 14px;margin:0 0 14px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;font-size:14px}
.bo-tong-so{flex:1 1 260px;display:flex;flex-wrap:wrap;gap:2px 10px;align-items:baseline}
.bo-tong-so b{font-size:15.5px;color:#166534}
.bo-tong-so span{color:#64748b}
.bo-tong-so .bo-con{color:#b45309;font-weight:600}
.bo-tong-so .bo-du{color:#166534;font-weight:600}
.bo-tong .bo-loc{padding:7px 12px;font-size:13px}
.bo-tong .bo-loc.bat{background:#fef3c7;border-color:#f59e0b;color:#92400e}
.bo-chu-giai{flex-basis:100%;display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:#64748b}
.bo-chu-giai span::before{content:"";display:inline-block;width:12px;height:9px;border:2px solid;border-radius:3px;margin-right:5px;vertical-align:-1px}
.bo-chu-giai .cg-doc::before{border-color:#16a34a;background:#f0fdf4}
.bo-chu-giai .cg-md::before{border-color:#94a3b8;border-style:dashed}
.bo-chu-giai .cg-tay::before{border-color:#60a5fa}
.bo-chu-giai .cg-trong::before{border-color:#f59e0b;background:#fffbeb}
.bo-nhom{border:1px solid #e2e8f0;border-radius:10px;margin:0 0 12px;background:#fff}
.bo-nhom>summary{display:flex;align-items:center;gap:8px;padding:10px 14px;cursor:pointer;font-weight:600;list-style:none}
.bo-nhom>summary::-webkit-details-marker{display:none}
.bo-nhom>summary::before{content:"\25B8";color:#94a3b8;transition:transform .15s}
.bo-nhom[open]>summary::before{transform:rotate(90deg)}
.bo-dem{margin-left:auto;font-size:12.5px;font-weight:500;color:#b45309;white-space:nowrap}
.bo-dem.du{color:#166534}
.bo-luoi{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px 14px;padding:2px 14px 12px}
.bo-o{display:flex;flex-direction:column;justify-content:flex-end;min-width:0}
.bo-o.bo-rong,.bo-o.bo-dai{grid-column:1/-1}
.bo-o label{font-size:13px;font-weight:600;line-height:1.35;margin:0 0 4px;color:#334155}
.bo-o .form-control{padding:8px 11px;font-size:14px;border-radius:8px}
.bo-o textarea.form-control{min-height:60px;resize:vertical}
.bo-o .form-control::placeholder{color:#b6bfcc;font-style:italic}
.bo-ghi{min-height:16px;margin-top:2px;font-size:11.5px;line-height:1.35;color:#94a3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bo-o--doc .form-control{border-color:#16a34a;background:#f0fdf4}
.bo-o--doc .bo-ghi{color:#15803d}
.bo-o--md .form-control{border-color:#94a3b8;border-style:dashed}
.bo-o--tay .form-control{border-color:#60a5fa}
.bo-o--tay .bo-ghi{color:#2563eb}
.bo-o--trong .form-control{border-color:#f59e0b;background:#fffbeb}
.bo-o--trong .bo-ghi{color:#b45309}
.bo-chi-thieu .bo-o:not(.bo-o--trong),.bo-chi-thieu .bo-nhom--xong{display:none}
.bo-ds-giay{list-style:none;padding:0;margin:10px 0 0;display:grid;gap:6px}
.bo-giay{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;padding:7px 8px 7px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;font-size:13px}
.bo-giay--cho{border-color:#f59e0b;background:#fffbeb}
.bo-giay-chu{flex:1 1 240px;min-width:0;display:flex;flex-wrap:wrap;gap:0 10px}
.bo-giay-ten{font-weight:600;color:#334155;min-width:0;overflow-wrap:anywhere}
#bo-drop.bo-co-file{padding:14px}
#bo-drop.bo-co-file i{font-size:20px;margin-bottom:2px}
.bo-giay-loai{color:#64748b}
.bo-vai{margin-left:auto;position:relative}
.bo-vai>summary{cursor:pointer;list-style:none;padding:3px 10px;border-radius:12px;background:#e8f1f8;color:#003865;font-weight:600}
.bo-vai>summary::-webkit-details-marker{display:none}
.bo-vai>summary::after{content:" \25BE"}
.bo-giay--cho .bo-vai>summary{background:#fde68a;color:#92400e}
.bo-vai-ds{position:absolute;right:0;z-index:5;margin-top:4px;padding:8px 10px;min-width:240px;background:#fff;border:1px solid #cbd5e1;border-radius:8px;box-shadow:0 6px 18px rgba(15,23,42,.12);display:grid;gap:4px}
.bo-vai-ds label{display:flex;gap:6px;align-items:center;font-weight:400;cursor:pointer}
.bo-giay .bo-bo{margin-left:auto}
.bo-giay .bo-vai~.bo-bo{margin-left:0}
.bo-bo{border:0;background:none;cursor:pointer;font-size:16px;line-height:1;color:#64748b;padding:0 4px}
.bo-bo:hover{color:#b91c1c}
.upload-area.bo-dang-doc{opacity:.7}
#bo-form .form-actions{flex-wrap:wrap;gap:12px 20px;margin-top:20px;padding-top:20px}
@media (max-width:640px){.bo-luoi{grid-template-columns:1fr;padding:2px 10px 10px}.bo-nhom>summary{padding:10px}}
.bo-file{list-style:none;padding:0;margin:0 0 12px}
.bo-file li{margin:0 0 8px}
.bo-file small{margin-left:8px;color:#b45309}
/* --- Việc của tôi (v12) --- */
.viec-dem { background: #dc2626; color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; margin-left: 6px; }
.viec-loc { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.viec-meta { font-size: 13px; color: #64748b; margin: 0 0 8px; }
.viec-loc .form-control { max-width: 260px; }
.viec-bang { width: 100%; border-collapse: collapse; font-size: 13px; }
.viec-bang th { text-align: left; padding: 8px; background: #f1f5f9; color: #475569; font-weight: 600; }
.viec-bang td { padding: 8px; border-top: 1px solid #e2e8f0; color: #334155; vertical-align: top; }
.viec-bang tr.viec-dong { cursor: pointer; }
.viec-bang tr.viec-dong:hover td { background: #f8fafc; }
.viec-tt { display: inline-block; border-radius: 10px; padding: 1px 8px; font-size: 12px; background: #e2e8f0; color: #334155; }
.viec-tt.cho-duyet-gia { background: #fef3c7; color: #92400e; }
.viec-tt.da-co-gia { background: #dcfce7; color: #166534; }
.viec-ct { margin-top: 18px; padding-top: 16px; border-top: 2px solid #e2e8f0; }
.viec-ct h4 { margin: 0 0 6px; font-size: 16px; color: #0f172a; }
.viec-ct h5 { margin: 16px 0 6px; font-size: 13px; color: #475569; }
.viec-ct ul { margin: 0; padding-left: 18px; font-size: 13px; }
.viec-hanh-dong { display: grid; gap: 10px; padding: 12px; background: #f8fafc; border-radius: 8px; margin-top: 10px; }
.viec-hanh-dong .hang { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.viec-hanh-dong .form-control { flex: 1 1 220px; }
.fee-input { width: 100%; padding: 4px 6px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 12.5px; text-align: right; }
.viec-loi { color: #b91c1c; font-size: 13px; }
@media (max-width: 640px) {
    .viec-bang .an-tren-dt { display: none; }
}
