/* Hub — cùng tông với Workspace KOVA (navy, chữ K). */
:root { --navy: #0F2043; --ink: #111827; --muted: #6B7280; --line: #E5E7EB; --bg: #F9FAFB; --soft: #F3F4F6;
  --ok: #04695C; --bad: #B42318; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/var(--mx-lh-body) var(--mx-font-body); -webkit-text-size-adjust: 100%; }
a { color: var(--navy); }
h1, h2, h3, .brand, .card-t { font-family: var(--mx-font-heading); }
h1 { margin: 0; line-height: var(--mx-lh-tight); font-size: 26px; color: var(--navy); letter-spacing: -.01em; }
h2 { margin: 0 0 12px; font-size: 16px; line-height: var(--mx-lh-heading); }
code { font: 12.5px var(--mx-font-mono); background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); } .sm { font-size: 12px; } .nowrap { white-space: nowrap; } .bad-t { color: var(--bad); }

/* thanh trên */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 20px;
  background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; color: var(--navy); text-decoration: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; }
.top-right form { margin: 0; }
.top-right button, .btn-sm { font: inherit; padding: 5px 12px; border: 1px solid #D1D5DB; border-radius: 6px; background: #fff;
  color: #374151; cursor: pointer; text-decoration: none; }
.top-right button:hover, .btn-sm:hover { border-color: var(--navy); color: var(--navy); }
.top-link { text-decoration: none; font-weight: 600; padding: 5px 10px; border-radius: 6px; }
.top-link.on, .top-link:hover { background: #EEF1F6; }
.top-email { color: var(--muted); }

/* trang chủ */
.home { max-width: 1100px; margin: 0 auto; padding: 56px 20px 64px; }
.hero h1 { font-size: 36px; font-weight: 800; line-height: var(--mx-lh-tight); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.lead { font-size: 17px; color: #374151; max-width: 680px; margin: 12px 0 0; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { font-size: 13px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; color: var(--navy); }
a.chip:hover { border-color: var(--navy); }
.chip.plain { color: #374151; }
.sect { margin-top: 44px; }
.para { max-width: 720px; color: #374151; }
.para-lead { max-width: 760px; margin: 0 0 14px; font: 700 21px/1.5 var(--mx-font-heading); color: var(--navy); letter-spacing: -.005em; }
/* ---- phần dưới trang chủ: thẻ 2 cột ---- */
.pc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
.pc { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px 28px 28px;
  box-shadow: 0 1px 2px rgba(16,31,60,.04); }
.pc.wide { grid-column: 1 / -1; }
.pc-h { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.pc-h h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--navy); }
.pc-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #EAF0F9; color: #2457A7; }
.pc-ic svg { width: 21px; height: 21px; }
.pc .para { margin: 0 0 12px; font-size: 14.5px; line-height: 1.7; color: #334155; }
.pc .para-lead { margin: 0 0 14px; font-size: 17px; line-height: 1.55; color: var(--navy); }
.pc .pc-sub { color: #64748B; margin-bottom: 16px; }
.pc-contact { list-style: none; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px dashed #CBD5E1; display: grid; gap: 4px; }
.pc-contact li, .pc-contact a { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: #334155; text-decoration: none; padding: 4px 0; }
.pc-contact a:hover { color: #2457A7; }
.ci { display: inline-flex; color: #2457A7; } .ci svg { width: 17px; height: 17px; }
.sk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sk { padding: 14px 16px; background: #F8FAFC; border: 1px solid #EEF2F7; border-radius: 14px; }
.sk-top { display: flex; align-items: center; gap: 10px; }
.sk-b { flex: none; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.sk-n { font-size: 14px; font-weight: 600; color: var(--navy); line-height: 1.35; }
.sk-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.sk-track { flex: 1; height: 6px; border-radius: 99px; background: #E2E8F0; overflow: hidden; }
.sk-fill { display: block; height: 100%; border-radius: inherit; background: #2457A7; }
.sk-pct { font-size: 12px; font-weight: 600; color: #64748B; font-variant-numeric: tabular-nums; }
.pc-list { display: grid; gap: 12px; }
.pc-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 16px; border: 1.5px dashed #CBD5E1;
  border-radius: 14px; background: #FBFCFE; }
.pc-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-item.step .pc-num { background: #EAF0F9; color: #2457A7; }
.pc-item h3 { margin: 1px 0 4px; font-size: 15.5px; font-weight: 700; line-height: var(--mx-lh-heading); color: var(--navy); }
.pc-item p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #475569; }
.pc .cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pc .card { background: #F8FAFC; border-color: #EEF2F7; border-radius: 14px; }
@media (max-width: 860px) {
  .pc-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .pc { padding: 20px 18px 22px; border-radius: 16px; }
}
@media (max-width: 420px) { .sk-grid { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 700px) { .para-lead { font-size: 18px; } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: var(--ink); }
a.card:hover { border-color: var(--navy); box-shadow: 0 6px 18px rgba(15,32,67,.08); }
.card-t { font-weight: 600; line-height: var(--mx-lh-heading); font-size: 15px; color: var(--navy); }
.card-d { color: #4B5563; font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tag { font-size: 11.5px; background: var(--soft); border-radius: 999px; padding: 1px 8px; color: #374151; }
.foot { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* đăng nhập, lỗi */
.login { display: grid; place-items: center; min-height: calc(100vh - 56px); padding: 16px; }
.login-box { width: 100%; max-width: 360px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.login-box h1 { font-size: 22px; }
.login-box label, .grid-form label { display: block; margin-top: 14px; font-weight: 600; font-size: 13px; }
input[type=email], input[type=password], input[type=search], select { display: block; width: 100%; margin-top: 4px; padding: 9px 10px;
  font: inherit; border: 1px solid #D1D5DB; border-radius: 8px; background: #fff; }
input:focus, select:focus { outline: 2px solid var(--navy); outline-offset: -1px; border-color: var(--navy); }
button.primary, .btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.login-box button.primary { margin-top: 18px; width: 100%; padding: 10px; border: 0; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.alert { padding: 9px 12px; border-radius: 8px; margin: 12px 0; font-size: 13px; }
.alert.err { background: #FEE2E2; color: #7F1D1D; } .alert.ok { background: #ECFDF5; color: var(--ok); }
.narrow { max-width: 640px; margin: 56px auto; padding: 0 16px; }

/* quản trị */
.admin { max-width: 1200px; margin: 0 auto; padding: 20px 20px 56px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--navy); }
.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.head-row p { margin: 4px 0 0; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-top: 16px; }
.btn { font: inherit; font-size: 13px; padding: 7px 14px; border: 1px solid #D1D5DB; border-radius: 8px; background: #fff; color: #374151; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--navy); color: var(--navy); }
.btn.primary:hover { color: #fff; opacity: .9; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.danger { color: var(--bad); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1.5px solid var(--navy); white-space: nowrap; }
.tbl td { padding: 9px 8px; border-bottom: 1px solid #EEF1F5; vertical-align: top; }
.tbl tr.off td { opacity: .55; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.ok { background: #12B76A; } .dot.bad { background: var(--bad); } .dot.gray { background: #D0D5DD; }
.bars { display: flex; gap: 1px; height: 20px; align-items: stretch; min-width: 200px; }
.bars i { flex: 1; border-radius: 1px; background: #D0D5DD; } .bars i.ok { background: #32D583; } .bars i.bad { background: #F04438; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.facts dt { font-size: 12px; color: var(--muted); } .facts dd { margin: 2px 0 0; font-weight: 500; }
.plan { background: var(--soft); border-radius: 8px; padding: 14px; font-size: 12.5px; white-space: pre-wrap; margin: 0 0 12px; }
form.inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 0; }
form.inline input[type=password] { width: 150px; margin: 0; padding: 5px 8px; }
.checks { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; }
.checks label { font-weight: 400; margin: 0; white-space: nowrap; font-size: 13px; }
.actions { white-space: nowrap; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: end; }
.grid-form .checks { grid-column: 1 / -1; margin-top: 14px; }
.grid-form .btn { grid-column: 1 / -1; justify-self: start; margin-top: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.k-l { font-size: 12px; color: var(--muted); } .k-v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
ol.top { margin: 0; padding-left: 20px; } ol.top li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.filters { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.filters select, .filters input { width: auto; margin: 0; padding: 6px 8px; }
.ev { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--soft); }
.ev.login { background: #ECFDF5; color: var(--ok); } .ev.login_failed { background: #FEE2E2; color: var(--bad); }

/* ---- trang chủ dạng portfolio: khung trắng trên nền navy (MINDORAX) ---- */
.pf-page { background: var(--bg); }
.pf-wrap { position: relative; overflow: hidden; background: #101F3C; padding: 48px 56px; }
.pf-wrap::before, .pf-wrap::after { content: ""; position: absolute; z-index: 0; width: 150px; height: 150px;
  background-image: radial-gradient(circle, rgba(22,188,229,.45) 2.5px, transparent 3px); background-size: 25px 25px; }
.pf-wrap::before { top: 12px; right: 18px; }
.pf-wrap::after { bottom: 14px; left: 14px; background-image: radial-gradient(circle, rgba(157,180,222,.5) 2.5px, transparent 3px); }
.pf-card { position: relative; z-index: 1; max-width: 1320px; min-height: calc(100vh - 96px); margin: 0 auto; display: flex;
  flex-direction: column; background: #fff; border-radius: 16px; padding: 26px 44px 24px; box-shadow: 0 30px 70px rgba(0,0,0,.28); }
.pf-top { display: flex; align-items: center; gap: 16px; }
.pf-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.pf-nav form { margin: 0; }
.pf-ico { display: inline-flex; color: var(--navy); }
.pf-ico:hover { color: #2457A7; }
.pf-acc { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid #CBD5E1; border-radius: 8px; background: #fff;
  color: #334155; text-decoration: none; cursor: pointer; }
.pf-acc:hover { border-color: var(--navy); color: var(--navy); }
.pf-hero { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 40px 0; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 56px; }
.pf-hero.no-photo { grid-template-columns: minmax(0, 1fr); }
.pf-text h1 { margin: 0; font-size: clamp(30px, 3.6vw, 50px); font-weight: 600; line-height: var(--mx-lh-tight);
  letter-spacing: -.015em; color: var(--navy); }
.pf-text h1 span { display: block; }
.pf-text h1 .hl { display: inline; background: linear-gradient(transparent 60%, #E3EAF7 60%); -webkit-box-decoration-break: clone;
  box-decoration-break: clone; }
.pf-intro { max-width: 500px; margin: 24px 0 30px; }
.pf-intro p { margin: 0 0 12px; }
.pf-intro .i1 { font: 600 20px/1.45 var(--mx-font-heading); color: var(--navy); }
.pf-intro .i2 { font-size: 16px; line-height: 1.65; color: #334155; }
.pf-intro .i3 { margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: #64748B; font-weight: 500; }
.pf-cta { display: inline-block; padding: 12px 30px; border-radius: 8px; background: #2457A7; color: #fff; font-weight: 600;
  font-size: 15px; text-decoration: none; box-shadow: 0 8px 18px rgba(36,87,167,.25); }
.pf-cta:hover { background: #1C4689; }
.pf-photo { position: relative; justify-self: center; width: min(100%, 320px); margin: 0; }
.pf-photo img { position: relative; z-index: 2; display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
  filter: grayscale(1) contrast(1.04); transition: filter .5s; }
.pf-photo:hover img { filter: none; }
.pf-block { position: absolute; z-index: 1; top: 7%; left: 10%; right: -10%; bottom: -7%; background: #2457A7; }
.pf-dots { position: absolute; z-index: 0; top: -55px; left: -85px; width: 180px; height: 210px;
  background-image: radial-gradient(circle, #9DB4DE 3.5px, transparent 4px); background-size: 30px 30px; }
.pf-more { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--navy);
  font-size: 16px; font-weight: 500; text-decoration: none; }
.pf-more span { display: inline-flex; animation: pf-bob 2.2s ease-in-out infinite; }
@keyframes pf-bob { 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .pf-more span { animation: none; } .pf-photo img { transition: none; } }
@media (max-width: 860px) {
  .pf-wrap { padding: 16px; }
  .pf-wrap::before, .pf-wrap::after { width: 90px; height: 90px; }
  .pf-card { min-height: calc(100vh - 32px); padding: 16px 18px 18px; border-radius: 14px; }
  .pf-nav { gap: 12px; } .pf-ico svg { width: 21px; height: 21px; }
  .pf-hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 32px 0 28px; }
  .pf-photo { order: -1; width: min(62%, 250px); }
  .pf-dots { top: -28px; left: -48px; width: 120px; height: 150px; background-size: 24px 24px; }
  .pf-intro { margin: 18px 0 24px; } .pf-intro .i1 { font-size: 18px; } .pf-intro .i2 { font-size: 15px; } .pf-intro .i3 { font-size: 13.5px; }
}
@media (max-width: 420px) { .pf-top .brand span { display: none; } }

@media (max-width: 700px) {
  .top { padding: 0 12px; gap: 10px; } .top-email { display: none; }
  .home { padding: 36px 16px 48px; } .hero h1 { font-size: 28px; }
  .admin { padding: 14px 12px 40px; } .grid-form, .kpis { grid-template-columns: minmax(0, 1fr); }
  .head-row { flex-direction: column; }
}
