/* Giao diện theo demo (Design artifact "Portal quản lý dự án pentest") */
:root { --ink:#111827; --muted:#4B5563; --soft:#6B7280; --bg:#F4F5F7; --bar:#0F1A2E; --accent:#1F4FD1; --accent-d:#163A9C; --line:#E1E5EB; --line2:#EEF0F3; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:14px/1.5 "IBM Plex Sans", system-ui, "Segoe UI", sans-serif; }
a { color:var(--accent); } a:hover { color:var(--accent-d); }
.mono { font-family:"IBM Plex Mono", ui-monospace, Consolas, monospace; }
h1 { margin:0; font-size:24px; font-weight:700; letter-spacing:-.01em; } h2 { margin:0; font-size:16px; font-weight:600; } h3 { margin:0; font-size:15px; }
.muted { color:var(--muted); } .soft { color:var(--soft); }
/* khung */
.topbar { background:var(--bar); color:#fff; }
.topbar .in { max-width:1320px; margin:0 auto; padding:0 20px; min-height:60px; display:flex; align-items:center; gap:28px; flex-wrap:wrap; }
.brand { color:#fff; font-size:17px; font-weight:700; text-decoration:none; display:flex; gap:8px; align-items:center; } .brand:hover { color:#fff; }
.topnav { flex-grow:1; display:flex; gap:20px; color:#C9D3E6; } .topnav a { color:#fff; font-weight:600; text-decoration:none; }
.me { display:flex; align-items:center; gap:10px; font-size:13px; color:#C9D3E6; }
.me .who { display:flex; align-items:center; gap:10px; } .me a, .me .linkbtn { color:#C9D3E6; font:inherit; font-size:13px; text-decoration:none; background:none; border:0; padding:0; cursor:pointer; } .me a:hover, .me .linkbtn:hover { color:#fff; text-decoration:underline; } .me form { margin:0; }
.role { font-size:11px; font-weight:600; padding:1px 7px; border-radius:99px; background:#2A3B5C; color:#DCE6FF; margin-left:4px; }
.auth { max-width:400px; margin:9vh auto 0; padding:0 16px; } .auth .card { padding:28px; } .auth h1 { font-size:22px; margin-bottom:4px; } .auth .brand-c { display:flex; gap:8px; align-items:center; justify-content:center; font-weight:700; font-size:18px; margin-bottom:18px; color:var(--ink); }
.auth label { display:block; font-weight:600; font-size:13px; margin-bottom:4px; } .auth .errorlist, .errorlist { list-style:none; margin:4px 0 0; padding:0; color:#B91C1C; font-size:13px; }
.avatar { display:inline-flex; width:32px; height:32px; border-radius:50%; background:#2A3B5C; color:#fff; align-items:center; justify-content:center; font-weight:600; text-transform:uppercase; }
.container { max-width:1320px; margin:0 auto; padding:28px 20px 72px; }
.crumb { display:flex; gap:8px; align-items:center; font-size:13px; color:var(--muted); margin-bottom:10px; }
.crumb a { text-decoration:none; }
/* thành phần */
.card { background:#fff; border:1px solid var(--line); border-radius:12px; } .pad { padding:22px; } .clip { overflow:hidden; }
.btn { font:inherit; font-size:14px; font-weight:500; min-height:40px; padding:0 16px; border-radius:8px; border:1px solid #C5CCD6; background:#fff; color:var(--ink); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; }
.btn:hover { background:#EEF1F5; color:var(--ink); } .btn-p { background:var(--accent); border-color:var(--accent); color:#fff; } .btn-p:hover { background:var(--accent-d); color:#fff; }
.btn:disabled, .btn.off { opacity:.45; cursor:not-allowed; pointer-events:none; } .btn-s { min-height:32px; padding:0 10px; font-size:13px; }
.btn-link { font:inherit; font-size:13px; font-weight:600; border:0; background:transparent; color:var(--accent); cursor:pointer; padding:4px 6px; border-radius:6px; text-decoration:none; } .btn-link:hover { background:#EEF3FE; }
.btn-danger { color:#B91C1C; } .btn-danger:hover { background:#FDECEC; }
.lbl { display:block; font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; margin-bottom:6px; }
.inp, input[type=text], input[type=password], input[type=search], input[type=number], select, textarea { font:inherit; font-size:14px; width:100%; min-height:38px; padding:7px 10px; border:1px solid #C5CCD6; border-radius:8px; background:#fff; color:var(--ink); }
textarea { resize:vertical; line-height:1.45; } input:focus, select:focus, textarea:focus, .btn:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
input[type=file] { width:auto; border:0; padding:0; min-height:0; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; } .between { justify-content:space-between; } .end { align-items:flex-end; }
.grid-auto { display:grid; grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)); gap:20px; align-items:start; } .span2 { grid-column:span 2; min-width:0; }
.grid-f { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:16px; }
.kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:16px; margin-bottom:24px; } .kpi { padding:18px 20px; } .kpi .v { font-size:30px; font-weight:700; margin-top:6px; }
/* bảng dạng lưới như demo */
.th, .tr { display:grid; gap:12px; padding:10px 16px; align-items:center; }
.th { background:#F8F9FB; border-bottom:1px solid var(--line); font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.tr { padding:9px 16px; border-bottom:1px solid var(--line2); font-size:14px; } .tr.sel { background:#EEF3FE; box-shadow:inset 3px 0 0 var(--accent); }
.scroll-x { overflow-x:auto; } .nowrap { white-space:nowrap; } .pre { white-space:pre-line; } .brk { word-break:break-all; }
.tr input { min-height:34px; }
/* chip, nhãn */
.chip { display:inline-block; padding:2px 8px; border-radius:6px; font-size:12px; font-weight:600; background:#E8EEFC; color:#1E3A8A; }
.chip.dark { background:#1F2937; color:#fff; } .chip.sev { padding:1px 10px; }
.sev-NT { background:#EDE4F7; color:#5B21B6; } .sev-CAO { background:#FDE2E2; color:#B91C1C; } .sev-TB { background:#FEF0C7; color:#92400E; } .sev-THAP { background:#DCF2E1; color:#166534; } .sev-NA { background:#E5E7EB; color:#374151; }
.tag { display:inline-block; font-size:12px; font-weight:600; padding:2px 10px; border-radius:6px; white-space:nowrap; }
.tag.err { background:#FDE2E2; color:#B91C1C; } .tag.warn { background:#FEF0C7; color:#92400E; } .tag.ok { background:#DCF2E1; color:#166534; } .tag.gray { background:#E5E7EB; color:#374151; } .tag.blue { background:#E3EBFB; color:#1E3A8A; }
.pill { display:inline-block; font-size:12px; font-weight:600; padding:3px 10px; border-radius:999px; white-space:nowrap; }
.rt-open { background:#FEF0C7; color:#92400E; } .rt-partial { background:#E3EBFB; color:#1E3A8A; } .rt-fixed { background:#DCF2E1; color:#166534; } .rt-accepted { background:#E5E7EB; color:#374151; } .rt-handled { background:#E2F0EC; color:#115E59; }
.bar { display:block; height:6px; background:#E6E9EE; border-radius:3px; margin-top:6px; overflow:hidden; } .bar > i { display:block; height:100%; background:#3B66DB; } .bar.done > i { background:#16A34A; }
/* bước */
.stepper { padding:10px; display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:6px; margin-bottom:20px; }
.st { font:inherit; display:flex; gap:10px; align-items:center; padding:10px; border-radius:8px; min-height:52px; text-align:left; color:var(--ink); border:1px solid transparent; background:transparent; text-decoration:none; }
.st.cur { border-color:var(--accent); background:#EEF3FE; } .st.off { opacity:.5; pointer-events:none; } a.st:hover { background:#F3F6FC; color:var(--ink); }
.dot { flex-shrink:0; width:28px; height:28px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; background:#E6E9EE; color:var(--muted); }
.st.cur .dot { background:var(--accent); color:#fff; } .st.done .dot { background:#DCF2E1; color:#166534; }
.st .t { display:flex; flex-direction:column; line-height:1.25; } .st .t b { font-size:14px; } .st .t small { font-size:12px; color:#5B6472; }
.tabs { display:flex; gap:4px; border-bottom:1px solid #D5DBE3; margin-bottom:20px; }
.tabs a { font-size:14px; font-weight:600; min-height:44px; padding:0 16px; margin-bottom:-1px; display:inline-flex; align-items:center; color:var(--muted); border-bottom:2px solid transparent; text-decoration:none; } .tabs a.on { color:var(--accent); border-color:var(--accent); }
.lockbar { background:#1F2937; color:#fff; border-radius:10px; padding:12px 16px; margin-bottom:16px; }
.foot { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:24px; flex-wrap:wrap; padding-top:16px; border-top:1px solid #D5DBE3; }
/* thông báo */
.msg { padding:10px 14px; border-radius:8px; margin-bottom:12px; background:#E3EBFB; color:#1E3A8A; } .msg.success { background:#DCF2E1; color:#14532D; } .msg.error { background:#FDECEC; color:#7F1D1D; } .msg.warning { background:#FEF3D7; color:#78350F; }
.alert-err { background:#FDECEC; color:#7F1D1D; border-radius:10px; padding:12px 16px; margin-bottom:16px; }
.box { padding:12px; border-radius:8px; background:#F4F6F9; } .box.green { background:#DCF2E1; color:#14532D; font-weight:600; }
.fileico { display:inline-flex; width:40px; height:40px; border-radius:8px; align-items:center; justify-content:center; font-weight:700; font-size:11px; flex-shrink:0; } .fileico.x { background:#E3F0E6; color:#166534; } .fileico.d { background:#E3EBFB; color:#1E3A8A; }
.num { display:inline-flex; width:28px; height:28px; border-radius:50%; background:var(--accent); color:#fff; align-items:center; justify-content:center; font-weight:700; font-size:13px; flex-shrink:0; }
.drop { border:1.5px dashed #9AA7B8; border-radius:12px; padding:28px 20px; text-align:center; background:#FAFBFC; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; flex-grow:1; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.typecards { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:10px; }
.typecard { display:flex; flex-direction:column; gap:2px; padding:12px 14px; border-radius:10px; border:1px solid #C5CCD6; background:#fff; cursor:pointer; } .typecard b { font-size:15px; } .typecard span { font-size:13px; color:var(--muted); }
.typecard:has(input:checked) { border:2px solid var(--accent); background:#EEF3FE; padding:11px 13px; } .typecard input { position:absolute; opacity:0; pointer-events:none; }
.errorlist { color:#B91C1C; list-style:none; padding:0; margin:4px 0 0; font-size:13px; } .errtxt { color:#B91C1C; } .oktxt { color:#166534; font-weight:600; }
.field { margin-bottom:14px; } small.hint { display:block; color:var(--muted); font-size:13px; margin-top:3px; }
.seg { display:inline-flex; border:1px solid #C5CCD6; border-radius:8px; overflow:hidden; } .seg label { margin:0; }
.seg label span { display:block; font-size:13px; font-weight:600; min-height:34px; line-height:34px; padding:0 12px; cursor:pointer; background:#fff; color:#374151; border-left:1px solid #C5CCD6; }
.seg label:first-child span { border-left:0; } .seg input { position:absolute; opacity:0; }
.seg input:checked + span.f { background:#16A34A; color:#fff; } .seg input:checked + span.o { background:#D97706; color:#fff; } .seg input:checked + span.a { background:#4B5563; color:#fff; }
.thumbs { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:8px; } .thumb { width:170px; } .thumb img { width:170px; height:110px; object-fit:cover; border:1px solid var(--line); border-radius:6px; display:block; margin-bottom:4px; }
.chips { display:flex; gap:8px; flex-wrap:wrap; } .fchip { font-size:13px; font-weight:600; min-height:32px; padding:0 10px; border-radius:999px; border:1px solid #D5DBE3; background:#fff; color:#374151; display:inline-flex; align-items:center; gap:6px; text-decoration:none; } .fchip.on { background:#E8EEFC; color:#1E3A8A; border-color:#1E3A8A; }
.rowlink { display:flex; gap:10px; align-items:flex-start; padding:12px 14px; border-bottom:1px solid var(--line2); color:var(--ink); text-decoration:none; } .rowlink:hover { background:#F3F6FC; color:var(--ink); } .rowlink.sel { background:#EEF3FE; box-shadow:inset 3px 0 0 var(--accent); }
.kv { margin-bottom:14px; } .kv .lbl { margin-bottom:2px; }
@media (max-width:800px) { .span2 { grid-column:auto; } }
[hidden] { display:none !important; }
.iplist { max-height:150px; overflow-y:auto; }
/* Nessus: dòng đã loại */
.rowlink.removed .nm { text-decoration:line-through; color:var(--muted); } .rowlink.removed { background:#FAFAFB; }

/* Ô chọn ngày theo lịch */
.datefld { position:relative; display:flex; align-items:center; }
.datefld input[type=text] { padding-right:40px; }
.datebtn { position:absolute; right:4px; top:50%; transform:translateY(-50%); width:30px; height:30px; display:flex; align-items:center; justify-content:center; border:0; border-radius:6px; background:transparent; color:#4B5A70; cursor:pointer; }
.datebtn:hover, .datebtn:focus-visible { background:#EAF0FB; color:#1F4FD1; outline:none; }

/* danh sách + chi tiết cập nhật tại chỗ (livelist.js): cột danh sách đứng yên khi cuộn chi tiết dài */
[data-live] { transition:opacity .12s; }
.live-list { max-height:640px; overflow-y:auto; overscroll-behavior:contain; }
@media (min-width:900px) {
  .live-side { position:sticky; top:12px; align-self:start; }
  .live-list { max-height:max(320px, calc(100vh - 150px)); }
}

/* lịch chọn ngày tự vẽ (static/js/datepicker.js) */
.dp { position:fixed; z-index:1000; width:288px; padding:12px; background:#fff; border:1px solid var(--line); border-radius:14px; box-shadow:0 12px 32px rgba(15,26,46,.18), 0 2px 6px rgba(15,26,46,.08); animation:dp-in .12s ease-out; transform-origin:top left; user-select:none; }
.dp.up { transform-origin:bottom left; }
@keyframes dp-in { from { opacity:0; transform:translateY(-4px) scale(.98); } to { opacity:1; transform:none; } }
.dp-head { display:grid; grid-template-columns:32px 1fr 84px 32px; gap:6px; align-items:center; margin-bottom:8px; }
.dp-nav { width:32px; height:32px; border:0; border-radius:8px; background:transparent; color:#374151; font-size:20px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0 0 2px; }
.dp-nav:hover { background:#EEF3FE; color:var(--accent); } .dp-nav:focus-visible, .dp-day:focus-visible, .dp-link:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.dp-sel { min-height:32px; height:32px; padding:0 6px; font-size:13px; font-weight:600; border:1px solid transparent; background:transparent; border-radius:8px; cursor:pointer; color:var(--ink); }
.dp-sel:hover { background:#F3F6FC; border-color:var(--line); }
.dp-week, .dp-grid { display:grid; grid-template-columns:repeat(7, 1fr); }
.dp-week { margin-bottom:2px; } .dp-week span { text-align:center; font-size:11px; font-weight:600; letter-spacing:.04em; color:var(--soft); padding:4px 0; } .dp-week .we { color:#C2410C; }
.dp-day { aspect-ratio:1; min-width:0; border:0; border-radius:50%; background:transparent; font:inherit; font-size:13px; color:var(--ink); cursor:pointer; padding:0; margin:1px; }
.dp-day:hover { background:#EEF3FE; } .dp-day.out { color:#9CA3AF; } .dp-day.we { color:#C2410C; } .dp-day.out.we { color:#E0A98F; }
.dp-day.today { box-shadow:inset 0 0 0 1.5px var(--accent); font-weight:600; }
.dp-day.on, .dp-day.on:hover { background:var(--accent); color:#fff; font-weight:600; box-shadow:none; }
.dp-foot { display:flex; justify-content:space-between; margin-top:8px; padding-top:8px; border-top:1px solid var(--line2); }
.dp-link { border:0; background:transparent; font:inherit; font-size:13px; font-weight:600; color:var(--accent); cursor:pointer; padding:5px 10px; border-radius:8px; } .dp-link:hover { background:#EEF3FE; } .dp-clear { color:var(--muted); } .dp-clear:hover { background:#F3F4F6; }
@media (prefers-reduced-motion:reduce) { .dp { animation:none; } }

/* thanh tiến trình + toast (static/js/livelist.js) */
#nav-progress { position:fixed; left:0; top:0; height:3px; width:100%; z-index:2000; pointer-events:none; opacity:0; background:linear-gradient(90deg, transparent, var(--accent), transparent); background-size:40% 100%; background-repeat:no-repeat; transition:opacity .15s; }
#nav-progress.on { opacity:1; animation:navbar 1s linear infinite; }
@keyframes navbar { from { background-position:-40% 0; } to { background-position:140% 0; } }
html.is-loading { cursor:progress; }
.btn.is-busy { position:relative; color:transparent !important; } .btn.is-busy::after { content:""; position:absolute; width:16px; height:16px; border-radius:50%; border:2px solid currentColor; border-color:#9CA3AF; border-top-color:var(--accent); animation:spin .7s linear infinite; } .btn-p.is-busy::after { border-color:rgba(255,255,255,.4); border-top-color:#fff; }
@keyframes spin { to { transform:rotate(360deg); } }
#toasts { position:fixed; right:16px; bottom:16px; z-index:1500; display:flex; flex-direction:column; gap:8px; max-width:min(420px, calc(100vw - 32px)); }
.toast { display:flex; gap:10px; align-items:flex-start; padding:11px 12px 11px 14px; border-radius:10px; background:#1F2937; color:#fff; box-shadow:0 8px 24px rgba(15,26,46,.28); font-size:14px; line-height:1.45; border-left:4px solid #6B8CF0; animation:toast-in .18s ease-out; }
.toast.success { border-left-color:#34C26A; } .toast.error { border-left-color:#F26B6B; background:#3A1D1D; } .toast.warning { border-left-color:#F2B134; }
.toast span { flex:1; min-width:0; overflow-wrap:anywhere; }
.toast-x { border:0; background:transparent; color:#C9D3E6; font-size:18px; line-height:1; cursor:pointer; padding:0 2px; border-radius:4px; } .toast-x:hover { color:#fff; }
.toast.out { opacity:0; transform:translateY(6px); transition:opacity .18s, transform .18s; }
@keyframes toast-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce) { .toast, #nav-progress.on, .btn.is-busy::after { animation-duration:0s; } }
/* đăng nhập / mật khẩu */
.rules { margin:6px 0 14px; padding-left:18px; color:var(--muted); font-size:13px; } .rules li { margin:1px 0; }
label.check { display:flex; align-items:center; gap:8px; font-weight:400; font-size:13px; margin:0 0 14px; cursor:pointer; } label.check input { width:auto; min-height:0; }
.pwbox { position:relative; } .pwbox input { padding-right:62px; } .pwbox .pwtoggle { position:absolute; right:4px; top:50%; transform:translateY(-50%); font:inherit; font-size:12px; font-weight:600; border:0; background:transparent; color:var(--accent); cursor:pointer; padding:6px 8px; border-radius:6px; } .pwbox .pwtoggle:hover { background:#EEF3FE; }
.capswarn { color:#B45309; font-size:13px; margin-top:4px; }
#sess-banner { position:fixed; left:50%; top:12px; transform:translateX(-50%); z-index:60; background:#FEF3D7; color:#78350F; border:1px solid #F2D58A; border-radius:10px; padding:10px 14px; box-shadow:0 6px 20px rgba(0,0,0,.15); display:none; align-items:center; gap:12px; font-size:14px; max-width:calc(100vw - 24px); } #sess-banner.on { display:flex; }
