:root { --blue:#005ca1; --blue2:#004a82; --gray:#838280; --orange:#f0aa1d; --light:#eef4fa; --line:#e3e8ef; --red:#c0392b; --green:#1e8e3e; }
* { box-sizing: border-box; }
html, body { margin: 0; background: #f4f6f9; color: #222; font: 14px/1.45 Montserrat, "Segoe UI", Arial, sans-serif; }
.hidden { display: none !important; }
.muted { color: var(--gray); font-size: 12.5px; }
.err { color: var(--red); font-size: 13px; min-height: 18px; }
h2 { margin: 0; font-size: 17px; color: var(--blue); font-weight: 800; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,40,80,.05); }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #cdd5df; border-radius: 8px; width: 100%; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(0,92,161,.25); border-color: var(--blue); }
input.bad { border-color: var(--red); background: #fff5f4; }
label { display: block; font-weight: 600; font-size: 12.5px; color: #555; margin-bottom: 10px; }
label > input, label > select, label > textarea { margin-top: 4px; }
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; background: #e9eef5; color: var(--blue); white-space: nowrap; }
.btn:hover { filter: brightness(.96); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue2); }
.btn.warn { background: var(--orange); color: #222; }
.btn.danger { background: #fdecea; color: var(--red); }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); }
.btn.link { background: none; color: var(--gray); font-weight: 600; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.big { width: 100%; padding: 11px; font-size: 15px; margin-top: 6px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 38px; height: 38px; border-radius: 9px; }
.brand b { display: block; font-size: 16px; font-weight: 800; }
.brand span { font-size: 11.5px; opacity: .8; }

.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #005ca1 0%, #003e6e 100%); }
.auth { width: 380px; max-width: 100%; padding: 26px 26px 18px; }
.auth .brand { margin-bottom: 18px; color: var(--blue); }
.auth .brand span { color: var(--gray); opacity: 1; }

header.top { background: var(--blue); color: #fff; display: flex; align-items: center; gap: 22px; padding: 10px 22px; position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav a { color: #fff; opacity: .78; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
nav a:hover { opacity: 1; background: rgba(255,255,255,.08); }
nav a.on { opacity: 1; background: rgba(255,255,255,.16); }
.pill { background: var(--orange); color: #222; border-radius: 10px; padding: 0 7px; font-size: 11.5px; font-weight: 800; }
.pill:empty { display: none; }
.me { display: flex; gap: 8px; align-items: center; font-size: 13px; }
main { padding: 20px 22px 40px; max-width: 1400px; margin: 0 auto; }
.bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.bar h2 { flex: 1; min-width: 240px; }
.bar input { width: 280px; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.grid th { text-align: left; background: var(--light); color: var(--blue); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; padding: 10px 12px; position: sticky; top: 0; }
.grid th:first-child { border-top-left-radius: 12px; } .grid th:last-child { border-top-right-radius: 12px; }
.grid td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.grid tr:hover td { background: #fafcff; }
.grid td.act { white-space: nowrap; text-align: right; }
.grid td.act .btn { margin-left: 4px; }
.grid .empty { text-align: center; color: var(--gray); padding: 30px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 700; background: var(--light); color: var(--blue); margin: 1px 2px 1px 0; }
.tag.o { background: #fff3db; color: #8a5a00; } .tag.r { background: #fdecea; color: var(--red); } .tag.g { background: #e6f4ea; color: var(--green); }

.modal { position: fixed; inset: 0; background: rgba(10,25,40,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.dlg { width: 560px; max-width: 100%; max-height: 92vh; overflow: auto; padding: 0 20px 18px; }
.dlg-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 12px; position: sticky; top: 0; background: #fff; color: var(--blue); font-size: 16px; }
.x { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--gray); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 12px; }
.checks label { display: flex; align-items: center; gap: 6px; font-weight: 600; margin: 0; color: #333; }
.checks input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 4px; margin: 0 0 12px; }
legend { color: var(--blue); font-weight: 700; font-size: 12.5px; padding: 0 6px; }
.dlg .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.toast { position: fixed; right: 20px; bottom: 20px; background: #222; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 99; max-width: 420px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.e { background: var(--red); }

/* phien ngan hang */
#sessions { display: grid; gap: 16px; }
.sess { padding: 0; overflow: hidden; }
.sess-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sess-h b { font-size: 15px; flex: 1; }
.st { white-space: nowrap; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px; background: var(--light); color: var(--blue); }
.st.ready { background: #e6f4ea; color: var(--green); } .st.error { background: #fdecea; color: var(--red); } .st.ask { background: #fff3db; color: #8a5a00; }
.sess-b { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; }
.sess-b > div { padding: 14px 16px; }
.sess-b > div + div { border-left: 1px solid var(--line); background: #fbfcfe; }
.step { font-weight: 600; margin-bottom: 8px; }
.step.err { color: var(--red); }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid #b9cce0; border-top-color: var(--blue); border-radius: 50%; animation: sp 0.8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes sp { to { transform: rotate(360deg); } }
.logs { font: 11.5px/1.5 Consolas, monospace; color: #555; background: #f6f7f9; border-radius: 8px; padding: 8px 10px; max-height: 220px; overflow: auto; white-space: pre-wrap; }
.ask { background: #fff8e8; border: 1px solid #f4d48a; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.ask img { display: block; max-width: 100%; border: 1px solid #ddd; border-radius: 6px; margin: 8px 0; background: #fff; }
.ask img.cap { height: 60px; image-rendering: auto; }
.ask .r { display: flex; gap: 8px; }
.accs { display: grid; gap: 4px; margin: 6px 0 12px; }
.accs label { display: flex; gap: 8px; align-items: center; font-weight: 600; color: #333; margin: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.accs input { width: auto; margin: 0; }
.files { display: grid; gap: 4px; margin-top: 10px; }
.files a { color: var(--blue); font-weight: 600; text-decoration: none; }
.files a:hover { text-decoration: underline; }
h4 { margin: 12px 0 6px; color: var(--blue); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
h4:first-child { margin-top: 0; }

/* lich chon ky ES */
.pp .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { border: 1px solid #cfdcea; background: #fff; color: var(--blue); border-radius: 14px; padding: 4px 10px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
.chip:hover { background: var(--light); }
.chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.chip:disabled { color: #bbb; border-color: #eee; cursor: not-allowed; background: #fafafa; }
.yearbar { display: flex; align-items: center; justify-content: space-between; background: var(--light); border-radius: 8px; padding: 3px 6px; margin: 8px 0 6px; }
.yearbar button { border: 0; background: transparent; color: var(--blue); font-size: 17px; font-weight: 800; cursor: pointer; width: 30px; }
.yearbar button:disabled { opacity: .3; }
.yearbar b { color: var(--blue); }
.g6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 5px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 5px; }
.g6 .chip, .g4 .chip, .g3 .chip { border-radius: 6px; padding: 5px 0; text-align: center; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.range label { margin: 0; }
.hint { font-size: 12px; margin-top: 6px; min-height: 16px; color: var(--gray); }

@media (max-width: 900px) { .sess-b { grid-template-columns: 1fr; } .sess-b > div + div { border-left: 0; border-top: 1px solid var(--line); } .bar input { width: 100%; } }
