:root {
    --bb-primary: #087538;
    --bb-primary-dark: #055d2c;
    --bb-primary-soft: #e8f6ed;
    --bb-red: #e3131b;
    --bb-red-dark: #bb0710;
    --bb-red-soft: #fff0f0;
    --bb-orange: #ee8a00;
    --bb-orange-soft: #fff4df;
    --bb-blue: #1769d1;
    --bb-blue-soft: #e9f2ff;
    --bb-text: #171a1f;
    --bb-muted: #626a76;
    --bb-border: #dfe3e8;
    --bb-surface: #fff;
    --bb-background: #f5f7f8;
    --bb-shadow: 0 2px 8px rgba(20, 30, 40, .07);
    --bb-radius: 8px;
}

html { min-width: 320px; }
body {
    margin: 0;
    background: var(--bb-background);
    color: var(--bb-text);
    font-family: Arial, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.45;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }
.bb-svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.bb-btn {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    color: var(--bb-text);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.bb-btn svg { width: 17px; height: 17px; }
.bb-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.09); }
.bb-btn:focus-visible { outline: 3px solid rgba(8,117,56,.2); outline-offset: 2px; }
.bb-btn-primary { background: var(--bb-primary); border-color: var(--bb-primary); color: #fff; }
.bb-btn-primary:hover { background: var(--bb-primary-dark); border-color: var(--bb-primary-dark); }
.bb-btn-outline { border-color: #aeb5be; color: #303640; }
.bb-btn-outline-primary { border-color: var(--bb-primary); color: var(--bb-primary); }
.bb-btn-outline-primary:hover { background: var(--bb-primary-soft); }

.bb-toast {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 1000;
    max-width: min(460px, calc(100vw - 32px));
    padding: 11px 16px;
    border-radius: 7px;
    background: #174e31;
    color: #fff;
    box-shadow: 0 8px 28px rgba(0,0,0,.2);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -12px);
    transition: opacity .2s, transform .2s;
}
.bb-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.bb-toast.is-error { background: #9f1420; }

/* Phần riêng của danh sách biên bản. Khung chung: /css/qlna-list-page.css */
.list-filter-grid { grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(145px, .65fr)) minmax(170px, .75fr) auto; }
.list-input-icon { position: relative; display: block; }
.list-input-icon svg { position: absolute; top: 10px; left: 10px; width: 16px; height: 16px; color: #777f89; }
.list-input-icon input { padding-left: 33px; }
#recordGrid .cell-stack small { color: var(--bb-muted); font-size: 10px; }
#recordGrid .record-code { display: block; color: #172226; white-space: nowrap; }
.result-summary { display: flex; flex-direction: column; gap: 1px; font-size: 11px; }
.result-summary b { color: var(--bb-primary); font-weight: 600; }
.result-summary em { color: var(--bb-red); font-style: normal; }
.muted { color: var(--bb-muted) !important; }
.record-status { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.record-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.record-status.checking { background: #e8f6ed; color: #087538; }
.record-status.completed { background: #e9f2ff; color: #1769d1; }
.record-status.draft { background: #fff4df; color: #9d5d00; }
.record-open-button { width: 30px; height: 30px; border: 1px solid #d5dae0; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #444c55; cursor: pointer; }
.record-open-button:hover { border-color: var(--bb-primary); color: var(--bb-primary); background: var(--bb-primary-soft); }
.record-open-button svg { width: 16px; height: 16px; }

@media (max-width: 1050px) {
    .list-filter-grid { grid-template-columns: repeat(4, 1fr); }
    .list-field-search { grid-column: span 2; }
    .qlna-list-field:nth-child(4) { grid-column: span 2; }
    .qlna-list-filter-actions { justify-content: flex-end; grid-column: span 2; }
}

@media (max-width: 767px) {
    body { background: #f6f7f8; }
    .list-filter-grid { grid-template-columns: 1fr 1fr; }
    .list-field-search,
    .qlna-list-field:last-of-type,
    .qlna-list-filter-actions { grid-column: 1 / -1; }
    #recordGrid .record-status { min-width: 0; padding: 4px 6px; font-size: 10px; }
    #recordGrid .record-open-button { width: 28px; height: 28px; }
    .bb-toast { top: 12px; font-size: 13px; }
}
