/* =====================================================================
   10,000 SKIN STORIES — Internal Dashboard
   Admin-clean base + G.G.G brand accents (energetic blue / active orange)
   Tokens imported from ../../../colors_and_type.css
   ===================================================================== */

* { box-sizing: border-box; }
html,body { margin: 0; padding: 0; height: 100vh; overflow: hidden; }
body {
  background: #F4F5F7;
  color: var(--color-fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#root { height: 100vh; overflow: hidden; }
.app { display: flex; height: 100vh; overflow: hidden; }

/* tabular numbers everywhere numbers matter */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ============================ SIDEBAR ============================ */
.sidebar {
  width: 248px;
  flex: none;
  background: var(--ggg-dark-grayish-red);
  color: var(--color-fg-inverse);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  gap: 4px;
}
.sb-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 20px; }
.sb-logo {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  background: linear-gradient(135deg, var(--ggg-energetic-blue), var(--ggg-active-orange));
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900; color: #fff; font-size: 17px;
  letter-spacing: -0.04em;
}
.sb-brand .name { font-family: var(--font-display); font-weight: 800; font-size: 15px; line-height: 1.15; letter-spacing: -0.01em; }
.sb-brand .sub { font-size: 11px; color: rgba(255,255,255,0.5); letter-spacing: 0.04em; margin-top: 2px; }

.sb-section { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.34); padding: 16px 12px 7px; font-weight: 700; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,0.74); font-size: 14px; font-weight: 500;
  cursor: pointer; border: none; background: none; width: 100%; text-align: left;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast);
  font-family: var(--font-body);
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.on { background: rgba(255,255,255,0.10); color: #fff; }
.nav-item.on .nav-ic { color: var(--ggg-cyber-aqua); }
.nav-ic { width: 19px; height: 19px; flex: none; color: rgba(255,255,255,0.6); }
.nav-item .badge-count {
  margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  background: var(--ggg-active-orange); color: #fff; font-variant-numeric: tabular-nums;
}

.sb-foot { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid rgba(255,255,255,0.10); }
.sb-foot .live { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,0.6); }
.live-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--color-success); box-shadow: 0 0 0 0 rgba(45,171,102,0.6); animation: pulse 2s var(--ease-out) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(45,171,102,0.5); } 70% { box-shadow: 0 0 0 7px rgba(45,171,102,0); } 100% { box-shadow: 0 0 0 0 rgba(45,171,102,0); } }
.sb-foot .src { font-size: 10.5px; color: rgba(255,255,255,0.36); margin-top: 8px; line-height: 1.5; }

/* ============================ MAIN ============================ */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 32px; background: #fff; border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.topbar .crumb { font-size: 12px; color: var(--color-fg-subtle); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; margin-bottom: 3px; }
.topbar .spacer { flex: 1; }
.top-prog { display: flex; align-items: center; gap: 14px; }
.top-prog .pwrap { width: 220px; }
.top-prog .pmeta { display: flex; justify-content: space-between; font-size: 12px; color: var(--color-fg-muted); margin-bottom: 5px; }
.top-prog .pmeta b { color: var(--color-fg); font-weight: 700; }
.ptrack { height: 8px; border-radius: 999px; background: #ECECEC; overflow: hidden; }
.pfill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ggg-energetic-blue), var(--ggg-active-orange)); transition: width 0.6s var(--ease-out); }
.top-date { text-align: right; font-size: 12px; color: var(--color-fg-muted); }
.top-date b { display: block; color: var(--color-fg); font-size: 13px; font-weight: 700; }

.content { padding: 28px 32px 60px; max-width: 1320px; width: 100%; flex: 1; overflow-y: auto; min-height: 0; }

/* ============================ CARDS ============================ */
.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow-xs);
}
.card-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.card-h h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.card-h .sub { font-size: 12.5px; color: var(--color-fg-subtle); }
.card-note { font-size: 12px; color: var(--color-fg-subtle); margin-top: 2px; }
.grid { display: grid; gap: 18px; }

/* KPI */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi {
  background: #fff; border: 1px solid var(--color-border); border-radius: 16px; padding: 18px 20px;
  position: relative; overflow: hidden; box-shadow: var(--shadow-xs);
}
.kpi .accent { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.kpi .klabel { font-size: 12px; color: var(--color-fg-muted); font-weight: 600; letter-spacing: 0.02em; display: flex; align-items: center; gap: 7px; }
.kpi .kic { width: 16px; height: 16px; }
.kpi .kval { font-family: var(--font-display); font-weight: 800; font-size: 38px; line-height: 1; letter-spacing: -0.03em; margin-top: 12px; }
.kpi .kfoot { font-size: 12px; color: var(--color-fg-subtle); margin-top: 9px; display: flex; align-items: center; gap: 6px; }
.kpi .trend { font-weight: 700; }
.trend.up { color: var(--color-success); }
.trend.down { color: var(--color-danger); }

/* ============================ CHARTS ============================ */
.chart-svg { width: 100%; display: block; overflow: visible; }
.axis-label { font-size: 11px; fill: var(--color-fg-subtle); font-family: var(--font-body); }
.bar-track { fill: #F0F1F3; }
.grid-line { stroke: #ECECEC; stroke-width: 1; }

.hbar-row { display: grid; grid-template-columns: 168px 1fr 52px; align-items: center; gap: 12px; padding: 5px 0; }
.hbar-label { font-size: 13px; color: var(--color-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 22px; background: #F0F1F3; border-radius: 6px; overflow: hidden; position: relative; }
.hbar-fill { height: 100%; border-radius: 6px; transition: width 0.6s var(--ease-out); }
.hbar-val { font-size: 13px; font-weight: 700; text-align: right; color: var(--color-fg); font-variant-numeric: tabular-nums; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--color-fg-muted); }
.legend-sw { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend-item b { color: var(--color-fg); font-variant-numeric: tabular-nums; }

.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut-center { text-anchor: middle; }
.donut-center .big { font-family: var(--font-display); font-weight: 800; font-size: 26px; fill: var(--color-fg); }
.donut-center .small { font-size: 11px; fill: var(--color-fg-subtle); }

/* ============================ FILTERS / INPUTS ============================ */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.search {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--color-border);
  border-radius: 10px; padding: 0 12px; height: 38px; min-width: 230px; flex: 1; max-width: 340px;
}
.search input { border: none; outline: none; font-family: var(--font-body); font-size: 14px; width: 100%; background: none; color: var(--color-fg); }
.search svg { width: 16px; height: 16px; color: var(--color-fg-subtle); flex: none; }
select.fselect, .fbtn {
  height: 38px; border: 1px solid var(--color-border); background: #fff; border-radius: 10px;
  padding: 0 12px; font-family: var(--font-body); font-size: 13.5px; color: var(--color-fg); cursor: pointer;
  outline: none;
}
select.fselect:focus, .search:focus-within { border-color: var(--ggg-energetic-blue); }
.fbtn { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; transition: all var(--dur-fast); }
.fbtn:hover { border-color: var(--color-border-strong); }
.fbtn.primary { background: var(--color-fg); color: #fff; border-color: var(--color-fg); }
.fbtn.primary:hover { background: #000; }
.fbtn svg { width: 15px; height: 15px; }
.tbm { margin-left: auto; font-size: 13px; color: var(--color-fg-muted); }
.tbm b { color: var(--color-fg); font-variant-numeric: tabular-nums; }

/* ============================ TABLE ============================ */
.tbl-wrap { background: #fff; border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-xs); }
.tbl-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 880px; }
table.tbl thead th {
  text-align: left; padding: 13px 14px; font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--color-fg-muted); font-weight: 700; background: #FAFAFA; border-bottom: 1px solid var(--color-border);
  white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: 0;
}
table.tbl thead th .sortc { color: var(--ggg-energetic-blue); margin-left: 4px; }
table.tbl tbody td { padding: 12px 14px; border-bottom: 1px solid #F2F2F2; vertical-align: middle; }
table.tbl tbody tr { cursor: pointer; transition: background var(--dur-fast); }
table.tbl tbody tr:hover { background: #F8FAFD; }
table.tbl tbody tr:last-child td { border-bottom: none; }
.cell-name { font-weight: 600; }
.cell-id { font-family: var(--font-mono); font-size: 12px; color: var(--color-fg-subtle); }
.cell-muted { color: var(--color-fg-muted); }
.chips-mini { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-mini { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #F0F1F3; color: var(--color-fg-muted); white-space: nowrap; }

.status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 10px 3px 8px; border-radius: 999px; white-space: nowrap;
}
.status .dot { width: 7px; height: 7px; border-radius: 999px; flex: none; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge-success { background: rgba(45,171,102,0.12); color: #2DAB66; }
.badge-warn { background: rgba(254,170,26,0.12); color: #d97706; }
.badge-danger { background: rgba(216,27,96,0.12); color: #D81B60; }
.badge-info { background: rgba(0,153,255,0.12); color: #0099FF; }

.pagination { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-top: 1px solid var(--color-border); }
.pagination .pinfo { font-size: 13px; color: var(--color-fg-muted); }
.pagination .pbtns { display: flex; gap: 8px; }
.pbtn { height: 32px; min-width: 32px; padding: 0 10px; border: 1px solid var(--color-border); background: #fff; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--color-fg); font-family: var(--font-body); }
.pbtn:disabled { opacity: 0.4; cursor: not-allowed; }
.pbtn:not(:disabled):hover { border-color: var(--color-border-strong); }

/* ============================ DRAWER (record detail) ============================ */
.drawer-scrim { position: fixed; inset: 0; background: rgba(31,29,29,0.4); z-index: 50; animation: fade 0.2s var(--ease-out); }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 92vw; background: #fff; z-index: 51;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slidein 0.28s var(--ease-out);
}
@keyframes slidein { from { transform: translateX(40px); opacity: 0.4; } }
.drawer-h { padding: 22px 24px; border-bottom: 1px solid var(--color-border); display: flex; align-items: flex-start; gap: 12px; }
.drawer-h .x { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--color-fg-subtle); font-size: 22px; line-height: 1; padding: 2px; }
.drawer-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.dfield { margin-bottom: 18px; }
.dfield .dl { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-fg-subtle); font-weight: 700; margin-bottom: 6px; }
.dfield .dv { font-size: 14px; color: var(--color-fg); line-height: 1.55; }
.dstory { background: #FAFAFA; border-left: 3px solid var(--ggg-energetic-blue); padding: 12px 14px; border-radius: 0 10px 10px 0; font-size: 13.5px; line-height: 1.6; color: var(--color-fg); }
.drow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.statseg { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.seg-btn { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--color-border); background: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--color-fg-muted); font-family: var(--font-body); transition: all var(--dur-fast); }
.seg-btn:hover { border-color: var(--color-border-strong); }
.seg-btn.on { color: #fff; border-color: transparent; }

/* ============================ WORKFLOW (kanban) ============================ */
.wf-tabs { display: inline-flex; background: #ECECEC; border-radius: 10px; padding: 3px; gap: 3px; margin-bottom: 18px; }
.wf-tab { padding: 7px 16px; border-radius: 7px; border: none; background: none; font-family: var(--font-body); font-size: 13.5px; font-weight: 600; color: var(--color-fg-muted); cursor: pointer; }
.wf-tab.on { background: #fff; color: var(--color-fg); box-shadow: var(--shadow-xs); }
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.kcol { background: #F4F5F7; border-radius: 14px; padding: 12px; min-height: 200px; }
.kcol.dragover { outline: 2px dashed var(--ggg-energetic-blue); outline-offset: -2px; background: #EAF4FF; }
.kcol-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; font-size: 13px; font-weight: 700; }
.kcol-h .kc-dot { width: 9px; height: 9px; border-radius: 999px; }
.kcol-h .kc-n { margin-left: auto; font-size: 12px; color: var(--color-fg-muted); background: #fff; padding: 1px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.kcard {
  background: #fff; border: 1px solid var(--color-border); border-radius: 11px; padding: 12px 13px; margin-bottom: 10px;
  cursor: grab; box-shadow: var(--shadow-xs); transition: box-shadow var(--dur-fast), transform var(--dur-fast);
}
.kcard:active { cursor: grabbing; }
.kcard:hover { box-shadow: var(--shadow-sm); }
.kcard.dragging { opacity: 0.4; }
.kcard .kc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.kcard .kc-name { font-weight: 700; font-size: 13.5px; }
.kcard .kc-id { font-family: var(--font-mono); font-size: 11px; color: var(--color-fg-subtle); margin-left: auto; }
.kcard .kc-meta { font-size: 12px; color: var(--color-fg-muted); line-height: 1.5; }
.kcard .kc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.kc-more { text-align: center; font-size: 12px; color: var(--color-fg-subtle); padding: 6px; }
.kanban-hint { font-size: 12.5px; color: var(--color-fg-subtle); margin-bottom: 14px; }

/* ============================ MAP ============================ */
.map-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.prov-row { display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; gap: 12px; padding: 6px 0; }
.prov-row .pn { font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.prov-rank { width: 20px; height: 20px; border-radius: 6px; background: #F0F1F3; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--color-fg-muted); flex: none; }
.prov-row .ptr { height: 20px; background: #F0F1F3; border-radius: 5px; overflow: hidden; }
.prov-fill { height: 100%; background: linear-gradient(90deg, var(--ggg-cobalt-core), var(--ggg-energetic-blue)); border-radius: 5px; }
.prov-row .pv { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.prov-row .pv b { font-weight: 700; }
.prov-row .pv span { color: var(--color-fg-subtle); font-size: 11px; }

/* ============================ MODAL (Zalo) ============================ */
.modal-scrim { position: fixed; inset: 0; background: rgba(31,29,29,0.46); z-index: 60; display: grid; place-items: center; padding: 24px; animation: fade 0.2s var(--ease-out); }
.modal {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); width: 540px; max-width: 100%;
  max-height: 90vh; display: flex; flex-direction: column; animation: pop 0.24s var(--ease-snap);
}
@keyframes pop { from { transform: scale(0.96); opacity: 0.5; } }
.modal-h { padding: 20px 24px 16px; border-bottom: 1px solid var(--color-border); display: flex; align-items: flex-start; gap: 12px; }
.modal-h .zalo-mark { width: 28px; height: 28px; border-radius: 6px; background: #0068FF; color: #fff; display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); flex: none; font-size: 12px; letter-spacing: -0.02em; }
.modal-h h3 { margin: 0; font-size: 18px; font-weight: 800; }
.modal-h .mh-sub { font-size: 13px; color: var(--color-fg-muted); margin-top: 2px; }
.modal-h .x { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--color-fg-subtle); font-size: 24px; line-height: 1; }
.modal-b { padding: 20px 24px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-f { padding: 16px 24px; border-top: 1px solid var(--color-border); display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }

.recip { display: flex; align-items: center; gap: 12px; background: #FAFAFA; border: 1px solid var(--color-border); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.recip .ava { width: 40px; height: 40px; border-radius: 999px; background: linear-gradient(135deg,#0099FF,#FF6600); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.recip .rn { font-weight: 700; font-size: 14px; }
.recip .rp { font-size: 13px; color: var(--color-fg-muted); }
.recip .rstatus { margin-left: auto; }

.flbl { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-fg-subtle); font-weight: 700; margin-bottom: 7px; display: flex; align-items: center; gap: 8px; }
.flbl .reset { margin-left: auto; font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--ggg-energetic-blue); cursor: pointer; background: none; border: none; font-family: var(--font-body); }
.zinput, .ztext {
  width: 100%; border: 1px solid var(--color-border); border-radius: 10px; padding: 10px 12px;
  font-family: var(--font-body); font-size: 14px; color: var(--color-fg); outline: none; background: #fff; resize: vertical;
}
.zinput:focus, .ztext:focus { border-color: var(--ggg-energetic-blue); }
.ztext { line-height: 1.6; min-height: 110px; }
.zhelp { font-size: 12px; color: var(--color-fg-subtle); margin-top: 6px; line-height: 1.5; }
.zfield { margin-bottom: 18px; }
.zrow { display: flex; gap: 14px; }
.zrow > * { flex: 1; }

.btn-x { height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--color-border); background: #fff; font-family: var(--font-body); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--color-fg); transition: all var(--dur-fast); }
.btn-x:hover { border-color: var(--color-border-strong); }
.btn-x.ghost { color: var(--color-fg-muted); }
.btn-x.primary { background: #0068FF; border-color: #0068FF; color: #fff; }
.btn-x.primary:hover { background: #0057DB; }
.btn-x.danger { background: var(--ggg-pink-600); border-color: var(--ggg-pink-600); color: #fff; }
.btn-x:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-f .ftip { margin-right: auto; font-size: 12.5px; color: var(--color-fg-subtle); max-width: 230px; line-height: 1.45; }

/* toggle switch */
.tog { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--color-fg); }
.tog input { display: none; }
.tog .track { width: 40px; height: 23px; border-radius: 999px; background: #D7D7D7; position: relative; transition: background var(--dur-base); flex: none; }
.tog .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-xs); transition: transform var(--dur-base) var(--ease-out); }
.tog input:checked + .track { background: #2DAB66; }
.tog input:checked + .track::after { transform: translateX(17px); }

/* segmented (channel) */
.zseg { display: inline-flex; background: #ECECEC; border-radius: 9px; padding: 3px; gap: 3px; }
.zseg button { padding: 7px 14px; border: none; background: none; border-radius: 6px; font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--color-fg-muted); cursor: pointer; }
.zseg button.on { background: #fff; color: var(--color-fg); box-shadow: var(--shadow-xs); }

/* settings button in topbar */
.gear-btn { height: 38px; padding: 0 14px; border: 1px solid var(--color-border); background: #fff; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--color-fg); }
.gear-btn:hover { border-color: var(--color-border-strong); }
.gear-btn svg { width: 16px; height: 16px; }
.gear-btn .zd { width: 8px; height: 8px; border-radius: 999px; }

/* zalo badge on cards/drawer */
.zbadge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.zbadge.ok { background: #E8F7EF; color: #1E8A4F; }
.zbadge.fail { background: #FDE6EE; color: #C2185B; }

/* log list */
.zlog { max-height: 230px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: 12px; }
.zlog-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #F2F2F2; font-size: 13px; }
.zlog-row:last-child { border-bottom: none; }
.zlog-row .zl-name { font-weight: 600; }
.zlog-row .zl-time { margin-left: auto; font-size: 11.5px; color: var(--color-fg-subtle); white-space: nowrap; }

/* toasts */
#ss-toasts { position: fixed; bottom: 24px; right: 24px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.ss-toast { background: var(--ggg-dark-grayish-red); color: #fff; padding: 12px 16px; border-radius: 11px; box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: 340px; animation: slidein 0.28s var(--ease-out); border-left: 4px solid #0068FF; }
.ss-toast.ok { border-left-color: #2DAB66; }
.ss-toast.err { border-left-color: var(--ggg-pink-600); }
/* warn = việc đã xong nhưng CÒN VIỆC PHẢI LÀM TAY (vd: đơn lên Haravan rồi
   nhưng chưa đủ điều kiện tự giao -> nhân sự phải vào bấm xác nhận). */
.ss-toast.warn { border-left-color: var(--ggg-active-orange, #FEAA1A); }
.ss-toast.hide { opacity: 0; transform: translateX(20px); transition: all 0.3s var(--ease-out); }
.ss-toast b { font-weight: 700; }

/* small util */
.muted { color: var(--color-fg-muted); }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.mt8 { margin-top: 8px; } .mt14 { margin-top: 14px; } .mt22 { margin-top: 22px; }
.empty { text-align: center; padding: 50px 20px; color: var(--color-fg-subtle); font-size: 14px; }

@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .kanban { grid-template-columns: repeat(2, 1fr); }
  .map-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sidebar { display: none; }
  .kpi-row { grid-template-columns: 1fr; }
  .top-prog { display: none; }
}

/* ============================ ADDITIONAL STYLES (GIFT & SKELETON) ============================ */
.ds-gift-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.ds-gift-badge.cooling {
  background: var(--ggg-energetic-blue);
  color: #fff;
}
.ds-gift-badge.chaga {
  background: var(--ggg-active-orange);
  color: #fff;
}
.ds-gift-badge.cream {
  background: #8B5E3C;
  color: #fff;
}
.ds-gift-badge.toner {
  background: #0D9488;
  color: #fff;
}
.ds-gift-badge.retinol {
  background: #7E57C2;
  color: #fff;
}

/* Sidebar Data Source Indicator */
.ds-mode-badge {
  padding: 0 16px 14px;
}
.ds-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ds-badge.live {
  background: rgba(45, 171, 102, 0.15);
  color: #2DAB66;
}
.ds-badge.mock {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
}

/* Skeleton Loading Screens */
.skeleton-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: pulse-skeleton 1.5s infinite ease-in-out;
  padding: 10px;
}
.skeleton-title {
  height: 28px;
  width: 200px;
  background: #EAECEF;
  border-radius: 6px;
}
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.skeleton-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.skeleton-card {
  background: #EAECEF;
  border-radius: 16px;
}
.skeleton-card.card-kpi {
  height: 120px;
}
.skeleton-card.card-chart {
  height: 280px;
}
.skeleton-card.card-half {
  height: 240px;
}

@keyframes pulse-skeleton {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

@media (max-width: 1100px) {
  .skeleton-grid { grid-template-columns: repeat(2, 1fr); }
  .skeleton-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .skeleton-grid { grid-template-columns: 1fr; }
}

/* ============================ INTERACTIVE CHARTS & LEGENS ============================ */
.hbar-row.clickable {
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 6px;
  margin-left: -6px;
  margin-right: -6px;
  transition: all 0.15s ease-in-out;
}
.hbar-row.clickable:hover {
  background: var(--color-bg-muted);
}
.hbar-row.clickable:hover .hbar-label {
  font-weight: 700;
  color: var(--ggg-active-orange);
}
.hbar-row.clickable:hover .hbar-track {
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.04);
}

.donut-segment-hoverable {
  transition: all 0.2s ease-in-out;
}
.donut-segment-hoverable:hover {
  opacity: 0.85;
  stroke-width: 29px !important;
}

.legend-item.clickable {
  cursor: pointer;
  padding: 3px 6px;
  margin-left: -6px;
  margin-right: -6px;
  border-radius: 4px;
  transition: all 0.15s ease-in-out;
}
.legend-item.clickable:hover {
  background: var(--color-bg-muted);
  color: var(--color-fg);
  font-weight: 600;
}

.kols-view-tr-clickable {
  cursor: pointer;
  transition: all 0.15s ease;
}
.kols-view-tr-clickable:hover td {
  background: var(--color-bg-muted) !important;
  color: var(--ggg-active-orange) !important;
}

/* ============================ MODAL DETAIL POPUPS ============================ */
.modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .modal-grid-2 {
    grid-template-columns: 1fr;
  }
}
.modal-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.modal-kpi-card {
  background: var(--color-bg-muted);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
.modal-kpi-card .accent-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--ggg-energetic-blue);
}
.modal-kpi-card .lbl {
  font-size: 11px;
  color: var(--color-fg-subtle);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.modal-kpi-card .val {
  font-size: 24px;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-fg);
  margin-top: 6px;
}
.modal-kpi-card .subtext {
  font-size: 11px;
  color: var(--color-fg-muted);
  margin-top: 4px;
}
.story-scroll-list {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg-muted);
  padding: 8px;
}
.story-card-item {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 6px;
  border: 1px solid rgba(0,0,0,0.03);
  box-shadow: 0 1px 2px rgba(0,0,0,0.01);
}
.story-card-item:last-child {
  margin-bottom: 0;
}
.story-card-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-fg-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.story-card-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-fg);
}
.story-card-content mark {
  background: var(--ggg-lemon-spark);
  color: inherit;
  font-weight: 600;
  border-radius: 2px;
  padding: 0 2px;
}
.session-log-wrap {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 14px;
}
.session-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.session-log-table th {
  background: var(--color-bg-muted);
  font-weight: 700;
  color: var(--color-fg-muted);
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.session-log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-fg);
}
.session-log-table tr:last-child td {
  border-bottom: none;
}
.session-log-table tr:hover td {
  background: rgba(0,0,0,0.01);
}

/* ============================ ADVISOR SECTION ============================ */
.advisor-card {
  background: var(--color-bg-muted);
  border: 1px dashed var(--ggg-energetic-blue);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-xs);
  transition: all var(--dur-base) var(--ease-out);
}
.advisor-card:hover {
  border-color: var(--ggg-active-orange);
  box-shadow: var(--shadow-sm);
  background: #fff;
}
.adv-card-h {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-3);
}
.adv-spark {
  font-size: var(--fs-24);
  color: var(--ggg-active-orange);
  animation: spark-glow 2s infinite ease-in-out;
  display: inline-block;
}
@keyframes spark-glow {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--ggg-active-orange)); }
  50% { transform: scale(1.2); filter: drop-shadow(0 0 6px var(--ggg-active-orange)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 2px var(--ggg-active-orange)); }
}
.adv-card-h h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--color-fg);
  font-family: var(--font-display);
}
.adv-sub {
  font-size: 11px;
  color: var(--color-fg-muted);
  margin-top: 2px;
}
.adv-section-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.adv-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.adv-meta-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.adv-meta-lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--color-fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.adv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.adv-tag {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.adv-tag.habit {
  background: #FFF0E6;
  color: var(--ggg-solar-orange);
}
.adv-tag.circumstance {
  background: #E5F5FF;
  color: var(--ggg-energetic-blue);
}
.adv-tag.struggle {
  background: #FFF6E0;
  color: #D68F00;
}
.adv-tag.need {
  background: #E8F7EF;
  color: #1E8A4F;
}
.adv-products {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.adv-product-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  box-shadow: var(--shadow-xs);
}
.adv-product-badge {
  background: var(--ggg-dark-grayish-red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.adv-product-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-fg);
}
.adv-msg-box {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.adv-msg-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.adv-msg-h .reset-btn {
  background: none;
  border: none;
  color: var(--ggg-energetic-blue);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}
.adv-msg-h .reset-btn:hover {
  text-decoration: underline;
}
.adv-textarea {
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--color-fg);
  resize: vertical;
  outline: none;
  background: #FAFAFA;
  transition: all var(--dur-fast);
}
.adv-textarea:focus {
  background: #fff;
  border-color: var(--ggg-energetic-blue);
  box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.1);
}
.adv-action-row {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}
.adv-btn {
  height: 38px;
  padding: 0 var(--space-4);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--dur-fast);
}
.adv-btn.copy-btn {
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-fg-muted);
}
.adv-btn.copy-btn:hover {
  border-color: var(--color-border-strong);
  color: var(--color-fg);
  background: #FAFAFA;
}
.adv-btn.send-btn {
  background: #0068FF;
  border: 1px solid #0068FF;
  color: #fff;
}
.adv-btn.send-btn:hover {
  background: #0057DB;
  border-color: #0057DB;
}
.adv-btn.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .adv-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   INFOGRAPHIC DESIGN (Premium Skincare Prescription Card for Zalo)
   ===================================================================== */
.ggg-info-layout {
  width: 700px; /* Standard optimized width for sharing as Zalo image */
  margin: 0 auto; /* Centered horizontally in block container */
  background: #110F0F; /* Near black body, extremely deep premium spa feel */
  color: #FFFFFF;
  padding: 32px;
  box-sizing: border-box;
  font-family: var(--font-body);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Subtle corner gradient glows to represent Glow, Glitter, Glare brand vibe */
.ggg-info-layout::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 153, 255, 0.15) 0%, rgba(0, 153, 255, 0) 70%);
  pointer-events: none;
}
.ggg-info-layout::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 102, 0, 0.12) 0%, rgba(255, 102, 0, 0) 70%);
  pointer-events: none;
}

/* Header */
.info-header {
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.info-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--ggg-energetic-blue), var(--ggg-active-orange));
}
.info-logo-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.info-logo {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #FFFFFF;
  line-height: 1;
}
.info-brand-tagline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}
.info-title-box h2 {
  margin: 6px 0 2px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-family: var(--font-display);
  background: linear-gradient(90deg, #FFFFFF, #E0E0E0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.info-title-box p {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

/* Profile Bar */
.info-profile-bar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.info-prof-item {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
}
.info-prof-item strong {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  margin-right: 4px;
}

/* Panels */
.info-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-sec-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #FFFFFF;
  text-transform: uppercase;
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* 2-Column Grid */
.info-grid-2 {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}
.info-sec-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.info-diag-item {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 2px solid var(--ggg-active-orange);
}
.info-diag-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ggg-active-orange);
  margin-bottom: 4px;
}
.info-diag-desc {
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 3px;
}
.info-diag-desc strong {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
}

/* Habits */
.info-habits-box {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.info-habits-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
}
.info-habits-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.info-habit-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 102, 0, 0.1);
  color: #FF8833;
  border: 1px solid rgba(255, 102, 0, 0.15);
}

/* Ingredients */
.info-ingredients-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.info-ing-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 153, 255, 0.1);
  color: #33B5FF;
  border: 1px solid rgba(0, 153, 255, 0.18);
}

/* Routine Section */
.info-routine-panel {
  padding: 16px;
}
.info-routine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.info-routine-col {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 12px;
}
.info-routine-col.morning {
  border-top: 3px solid #FEAA1A;
}
.info-routine-col.evening {
  border-top: 3px solid #0099FF;
}
.info-routine-h {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: var(--font-display);
}
.info-routine-col.morning .info-routine-h { color: #FEAA1A; }
.info-routine-col.evening .info-routine-h { color: #0099FF; }

.info-routine-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-step-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.info-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 800;
  color: #FFFFFF;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 2px;
}
.info-routine-col.morning .info-step-num { background: #FEAA1A; }
.info-routine-col.evening .info-step-num { background: #0099FF; }

.info-step-text {
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}

/* Recommended Products Grid */
.info-products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.info-product-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 14px 12px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: visible; /* crucial for overflow */
}
.info-prod-img-box {
  width: 60px;
  height: 75px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible; /* no border, no background, overflow visible */
}
.info-prod-glow {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  filter: blur(16px);
  opacity: 0.5;
  z-index: 1;
}
.info-prod-img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  transform: scale(1.15) translateY(-2px);
  transition: transform 0.2s ease;
}
.info-prod-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: -0.05em;
  border-radius: 8px;
  position: relative;
  z-index: 2;
}
.info-prod-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  padding-left: 6px;
}
.info-prod-name {
  font-size: 12px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
}
.info-prod-reason {
  font-size: 10px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* Footer Section */
.info-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}
.info-promo-box {
  background: linear-gradient(90deg, rgba(0, 153, 255, 0.08), rgba(255, 102, 0, 0.08));
  border: 1px dashed rgba(255, 102, 0, 0.3);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 11.5px;
  color: #FFCC99;
}
.info-promo-box strong {
  color: #FF6600;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.info-footer-sub {
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.35);
}

/* Physical/Hygiene solutions styling */
.info-hygiene-panel {
  padding: 16px;
}
.info-hygiene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 600px) {
  .info-hygiene-grid {
    grid-template-columns: 1fr;
  }
}
.info-hygiene-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.info-hygiene-icon {
  font-size: 18px;
  flex: none;
  margin-top: 1px;
}
.info-hygiene-text {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.8);
}

/* Routine step thumbnails styling */
.info-step-thumb-box {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
  flex: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.info-step-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
.info-step-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: -0.05em;
}

/* ============================ LOGIN VIEW ============================ */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, #FDF4F5, #F5F7FB, #FFF0F2);
  z-index: 9999;
  font-family: var(--font-body);
}
.login-bg-decor {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(254,170,26,0.08) 0%, rgba(254,170,26,0) 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}
.login-bg-decor-2 {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,104,255,0.06) 0%, rgba(0,104,255,0) 70%);
  bottom: -150px;
  left: -150px;
  pointer-events: none;
}
.login-card {
  width: 420px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.login-logo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--ggg-energetic-blue), var(--ggg-active-orange));
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  color: #fff;
  font-size: 28px;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  box-shadow: 0 10px 20px rgba(0, 104, 255, 0.15);
}
.login-card h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--ggg-dark-grayish-red);
  margin: 0 0 4px;
  text-align: center;
  letter-spacing: -0.01em;
}
.login-card .subtitle {
  font-size: 13px;
  color: var(--color-fg-muted);
  margin-bottom: 30px;
  text-align: center;
}
.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.login-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.2s ease;
}
.login-input:focus {
  outline: none;
  border-color: var(--ggg-energetic-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 104, 255, 0.08);
}
.login-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: var(--ggg-dark-grayish-red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  font-family: var(--font-body);
}
.login-btn:hover {
  background: #3c3333;
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.login-btn:active {
  transform: translateY(0);
}
.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.login-error {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(216, 27, 96, 0.06);
  border-left: 3px solid #D81B60;
  color: #D81B60;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 8px;
}
.login-footer {
  margin-top: 24px;
  font-size: 11px;
  color: var(--color-fg-subtle);
  text-align: center;
  line-height: 1.5;
}
.login-footer code {
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 4px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
}
.sb-logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  margin-top: auto;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}
.sb-logout-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.login-forgot-pwd-hint {
  font-size: 11.5px;
  color: var(--color-fg-muted);
  margin-top: -8px;
  margin-bottom: 20px;
  text-align: left;
  line-height: 1.5;
  background: rgba(242, 244, 247, 0.6);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--color-fg-subtle);
}

/* status colors for bounce rate evaluation */
.status-danger {
  background: var(--color-danger-bg) !important;
  color: var(--color-danger) !important;
}
.status-warn {
  background: var(--color-warning-bg) !important;
  color: #c48300 !important;
}
.status-ok {
  background: var(--color-success-bg) !important;
  color: var(--color-success) !important;
}

/* Spinner keyframe animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* =====================================================================
   CRITERIA-BASED APPROVAL PROPOSAL (ĐỀ XUẤT XÉT DUYỆT THEO KHUNG TIÊU CHÍ)
   ===================================================================== */
.criteria-proposal-container {
  display: flex;
  flex-direction: column;
}

.proposal-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.rate-meter {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  width: 100%;
}
.rate-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.banner-warning {
  animation: fadeIn 0.4s ease;
}

.btn-group-segmented {
  display: inline-flex;
  background: #ECECEC;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2px;
}
.btn-group-segmented .seg-btn {
  background: none;
  border: none;
  color: var(--color-fg-muted);
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s ease;
}
.btn-group-segmented .seg-btn:hover {
  color: var(--color-fg);
}
.btn-group-segmented .seg-btn.active {
  background: #fff;
  color: var(--color-fg);
  box-shadow: var(--shadow-xs);
}

.proposal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.proposal-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}
.proposal-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-brand);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.proposal-card.active {
  border-color: var(--color-brand);
  background: var(--color-info-bg);
  box-shadow: var(--shadow-md);
}

.proposal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.proposal-card-header .card-id {
  font-size: 11px;
  color: var(--color-fg-subtle);
  font-weight: 500;
}
.proposal-card-header .card-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--color-fg);
  margin-top: 2px;
}
.proposal-card-header .badge-tier {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
}

.proposal-card-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--color-fg-muted);
  margin-bottom: 14px;
}
.proposal-card-details .detail-row {
  display: flex;
  justify-content: space-between;
}
.proposal-card-details .source-badge {
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--color-fg-muted);
}

.card-story-preview {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--color-fg-muted);
  font-style: italic;
  background: var(--ggg-soft-milk);
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
  flex: 1;
}

.proposal-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}
.decision-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-fg);
  font-weight: 600;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.pending { background: #FEAA1A; }
.status-dot.approved { background: #2DAB66; }
.status-dot.published { background: #2DAB66; }
.status-dot.rejected { background: #D81B60; }

.action-buttons-mini {
  display: flex;
  gap: 6px;
}
.btn-mini-action {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-fg-muted);
  font-size: 13px;
  font-weight: bold;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-mini-action:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.btn-mini-action.approve:hover {
  background: rgba(45, 171, 102, 0.15);
  border-color: #2DAB66;
  color: #2DAB66;
}
.btn-mini-action.reject:hover {
  background: rgba(216, 27, 96, 0.15);
  border-color: #D81B60;
  color: #D81B60;
}
.btn-mini-action.undo:hover {
  background: rgba(254, 170, 26, 0.15);
  border-color: #FEAA1A;
  color: #FEAA1A;
}

/* MODAL CRITERIA AND CALCULATOR */
.modal-scrim {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.criteria-modal {
  width: 90%;
  max-width: 820px;
  height: 85vh;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal-subtitle {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ggg-active-orange);
}
.modal-title {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--color-fg);
}
.modal-meta {
  font-size: 12px;
  color: var(--color-fg-subtle);
  margin-top: 4px;
}
.btn-close-modal {
  background: none;
  border: none;
  color: var(--color-fg-subtle);
  font-size: 28px;
  cursor: pointer;
  line-height: 0.8;
  transition: color 0.15s ease;
}
.btn-close-modal:hover {
  color: var(--color-fg);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-section-box {
  background: var(--ggg-soft-milk);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px 20px;
}
.section-title-mod {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--color-fg);
  letter-spacing: 0.02em;
  margin: 0 0 14px;
  border-left: 3px solid var(--color-brand);
  padding-left: 8px;
}

/* Gate checklist styles */
.gate-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.gate-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.gate-item.pass { border-left: 3px solid var(--color-success); }
.gate-item.fail { border-left: 3px solid var(--color-danger); }

.gate-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gate-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  display: grid;
  place-items: center;
  color: #fff;
}
.pass .gate-icon { background: var(--color-success); }
.fail .gate-icon { background: var(--color-danger); }

.gate-code {
  font-size: 9.5px;
  font-weight: bold;
  color: var(--color-fg-subtle);
}
.gate-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-fg);
}
.gate-val {
  font-size: 11px;
  color: var(--color-fg);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gate-desc {
  font-size: 10.5px;
  color: var(--color-fg-muted);
  margin-top: 2px;
}

/* Scorecard Table Styles */
.scorecard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.scorecard-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--color-fg-muted);
  font-weight: 600;
  border-bottom: 2px solid var(--color-border);
}
.scorecard-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-fg);
}
.scorecard-table tr.group-header-row td {
  background: rgba(0, 0, 0, 0.03);
  font-weight: bold;
  color: var(--ggg-active-orange);
  padding: 6px 10px;
  font-size: 11px;
  border-bottom: 1px solid var(--color-border);
}
.score-cell {
  text-align: center;
  color: var(--color-brand) !important;
  font-size: 13px;
}
.max-cell {
  text-align: center;
  color: var(--color-fg-muted);
}
.val-hi {
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-body);
  color: var(--color-fg);
}
.rule-cell {
  color: var(--color-fg-subtle);
  font-size: 11px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ============================ LINEAR PROCESS TIMELINE ============================ */
.process-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px 16px 16px 36px;
}
.process-timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: var(--color-border);
  z-index: 1;
}
.process-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.process-step-dot {
  position: absolute;
  left: -23px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-fg-subtle);
  border: 2px solid #fff;
  z-index: 2;
  box-shadow: 0 0 0 2px var(--color-border);
  transition: all var(--dur-base) var(--ease-out);
}
.process-step.active .process-step-dot {
  background: var(--ggg-energetic-blue);
  box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.25);
  transform: scale(1.1);
}
.process-step.success .process-step-dot {
  background: #2DAB66;
  box-shadow: 0 0 0 3px rgba(45, 171, 102, 0.25);
}
.process-step.fail .process-step-dot {
  background: #D81B60;
  box-shadow: 0 0 0 3px rgba(216, 27, 96, 0.25);
}
.process-step-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-fg-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.process-step.success .process-step-title {
  color: var(--color-fg);
}
.process-step.active .process-step-title {
  color: var(--ggg-energetic-blue);
}
.process-step.fail .process-step-title {
  color: #D81B60;
}
.process-step-desc {
  font-size: 12px;
  color: var(--color-fg-muted);
  line-height: 1.4;
}
.process-step-meta {
  font-size: 11px;
  color: var(--color-fg-subtle);
}

/* ============================ NEXT ACTION BOX ============================ */
.next-action-box {
  background: rgba(0, 153, 255, 0.04);
  border: 1px dashed rgba(0, 153, 255, 0.25);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  animation: slideUp 0.3s var(--ease-out);
}
.next-action-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-fg);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.next-action-desc {
  font-size: 12.5px;
  color: var(--color-fg-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.next-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.next-action-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--dur-fast) var(--ease-out);
  border: none;
}
.next-action-btn.primary {
  background: var(--ggg-energetic-blue);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 153, 255, 0.2);
}
.next-action-btn.primary:hover {
  background: var(--ggg-cobalt-core);
}
.next-action-btn.success {
  background: #2DAB66;
  color: #fff;
  box-shadow: 0 2px 4px rgba(45, 171, 102, 0.2);
}
.next-action-btn.success:hover {
  background: #1E8A4F;
}
.next-action-btn.danger {
  background: #D81B60;
  color: #fff;
  box-shadow: 0 2px 4px rgba(216, 27, 96, 0.2);
}
.next-action-btn.danger:hover {
  background: #C2185B;
}
.next-action-btn.secondary {
  background: #fff;
  color: var(--color-fg-muted);
  border: 1px solid var(--color-border);
}
.next-action-btn.secondary:hover {
  border-color: var(--color-border-strong);
  color: var(--color-fg);
}
.next-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ============================ BULK PROGRESS WIDGET ============================ */
.bulk-progress-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: var(--color-fg, #1a1a1a);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  padding: 16px;
  z-index: 9999;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slidein 0.3s ease;
}
.bulk-progress-widget .bpw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bulk-progress-widget .bpw-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}
.bulk-progress-widget .bpw-count {
  font-size: 12.5px;
  font-weight: 600;
  color: #aaa;
}
.bulk-progress-widget .bpw-track {
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}
.bulk-progress-widget .bpw-bar {
  height: 100%;
  background: #0068FF;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.bulk-progress-widget .bpw-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.bulk-progress-widget .bpw-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  transition: background 0.2s ease;
}
.bulk-progress-widget .bpw-btn.stop {
  background: #D81B60;
  color: #fff;
}
.bulk-progress-widget .bpw-btn.stop:hover {
  background: #C2185B;
}
.bulk-progress-widget .bpw-btn.undo {
  background: #FEAA1A;
  color: #fff;
}
.bulk-progress-widget .bpw-btn.undo:hover {
  background: #E09515;
}
.bulk-progress-widget .bpw-btn.close {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.bulk-progress-widget .bpw-btn.close:hover {
  background: rgba(255,255,255,0.2);
}

/* =====================================================================
   ADVISOR SETTINGS VIEW (CẤU HÌNH CỐ VẤN & BÁC SĨ ẢO)
   ===================================================================== */
.advisor-settings-view {
  animation: fadeIn 0.4s var(--ease-out);
}

.advisor-settings-view .field-label {
  font-family: var(--font-body);
  color: var(--color-fg);
  font-weight: 700;
  font-size: 12.5px;
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.adv-input-field {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 13.5px;
  color: var(--color-fg);
  background: #fff;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s ease;
}
.adv-input-field:focus {
  border-color: var(--ggg-energetic-blue);
}

.adv-textarea {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 13.5px;
  color: var(--color-fg);
  background: #fff;
  font-family: var(--font-body);
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease;
}
.adv-textarea:focus {
  border-color: var(--ggg-energetic-blue);
}

/* Doctor avatar signature box in Infographic */
.info-doctor-sig-box {
  animation: fadeIn 0.4s var(--ease-out);
}




/* =====================================================================
   REPORT VIEW (tab Báo cáo) — executive report, preview + print
   ===================================================================== */
.rp-view { gap: 18px; }
.rp-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.rp-presets { display: flex; gap: 8px; }
.rp-dates { display: flex; gap: 12px; align-items: center; }
.rp-dates label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-fg-muted); font-weight: 600; }
.rp-dates .form-input { width: auto; padding: 7px 10px; }
.rp-actions { display: flex; gap: 8px; margin-left: auto; }
.rp-actions .btn-x { display: inline-flex; align-items: center; gap: 6px; }

.rp-doc { display: flex; flex-direction: column; gap: 16px; }
.rp-block { break-inside: avoid; page-break-inside: avoid; }
.rp-wide { grid-column: 1 / -1; }

/* ---- Trang bìa / header ---- */
.rp-header { text-align: center; padding: 26px 20px 20px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg, 16px); position: relative; overflow: hidden; }
.rp-brand-line { position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--ggg-active-orange), var(--ggg-energetic-blue), var(--ggg-pink-600)); }
.rp-brand { font-size: 11px; letter-spacing: 3px; font-weight: 800; color: var(--ggg-active-orange); margin-top: 6px; }
.rp-header h1 { margin: 8px 0 12px; font-size: 25px; line-height: 1.25; font-weight: 900; color: var(--color-fg); }
.rp-period-pill { display: inline-block; background: var(--ggg-cobalt-core, #0047AB); color: #fff; font-weight: 800; font-size: 13px; padding: 6px 16px; border-radius: 999px; }
.rp-meta { margin-top: 10px; font-size: 12px; color: var(--color-fg-muted); line-height: 1.6; }

/* ---- Hero điểm nhấn ---- */
.rp-hero { display: grid; grid-template-columns: 1.1fr 2fr; gap: 16px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg, 16px); padding: 20px; align-items: center; }
.rp-hero-lbl { font-size: 12px; font-weight: 700; color: var(--color-fg-muted); text-transform: uppercase; letter-spacing: .6px; }
.rp-hero-big { font-size: 46px; font-weight: 900; color: var(--ggg-active-orange); line-height: 1.05; margin: 4px 0; }
.rp-hero-sub { font-size: 12.5px; color: var(--color-fg-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rp-hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rp-hero-stat { border: 1px solid var(--color-border); border-radius: 12px; padding: 10px 12px; background: var(--color-bg-muted); }
.rp-hero-stat .lbl { font-size: 10.5px; font-weight: 700; color: var(--color-fg-muted); text-transform: uppercase; letter-spacing: .4px; }
.rp-hero-stat .val { font-size: 20px; font-weight: 800; color: var(--color-fg); margin: 2px 0 4px; }
@media (max-width: 900px) { .rp-hero { grid-template-columns: 1fr; } .rp-hero-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---- Callout tóm tắt ---- */
.rp-callout { border-left: 4px solid var(--ggg-active-orange); }
.rp-callout h3 { font-size: 14.5px; margin: 0 0 6px; }
.rp-summary-list { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.75; }
.rp-summary-list li { margin-bottom: 5px; }

/* ---- Tiêu đề mục ---- */
.rp-section { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--color-fg); break-after: avoid; }
.rp-section-num { width: 42px; height: 42px; flex: none; display: grid; place-items: center; background: var(--color-fg); color: #fff; font-weight: 900; font-size: 18px; border-radius: 10px; }
.rp-section h2 { margin: 0; font-size: 18px; font-weight: 900; color: var(--color-fg); }
.rp-section-sub { font-size: 12px; color: var(--color-fg-muted); margin-top: 2px; }
.rp-sub-h { font-size: 13.5px; font-weight: 800; color: var(--ggg-cobalt-core, #0047AB); text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; break-after: avoid; }
.rp-sub-note { text-transform: none; letter-spacing: 0; color: var(--color-fg-muted); font-weight: 600; }

/* ---- Lưới & thanh ngang ---- */
.rp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .rp-grid-2 { grid-template-columns: 1fr; } }

.rp-bars { display: flex; flex-direction: column; gap: 7px; }
.rp-bar-row { display: grid; grid-template-columns: minmax(120px, 1.3fr) 2fr auto auto; align-items: center; gap: 10px; font-size: 12.5px; }
.rp-bar-label { color: var(--color-fg); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-bar-track { height: 12px; background: var(--color-bg-muted); border-radius: 6px; overflow: hidden; }
.rp-bar-fill { height: 100%; border-radius: 6px 0 0 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rp-bar-val { font-weight: 700; color: var(--color-fg); white-space: nowrap; }
.rp-bar-pct { color: var(--color-fg-muted); font-weight: 600; }
.rp-bar-delta { min-width: 46px; text-align: right; }

.rp-delta { font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 6px; white-space: nowrap; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rp-delta.up { color: var(--color-success, #2DAB66); background: rgba(45,171,102,.12); }
.rp-delta.down { color: var(--color-danger, #D81B60); background: rgba(216,27,96,.09); }
.rp-delta.flat, .rp-delta.na { color: var(--color-fg-muted); background: var(--color-bg-muted); }

.rp-note { border-top: 1px dashed var(--color-border); padding-top: 8px; }

/* ---- Bảng KOL ---- */
.rp-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12.5px; }
.rp-table th { text-align: left; padding: 8px; border-bottom: 2px solid var(--color-fg); color: var(--color-fg-muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; }
.rp-table td { padding: 7px 8px; border-bottom: 1px solid var(--color-border); }
.rp-table tbody tr:nth-child(even) { background: rgba(0,0,0,.015); }
.rp-table th.tnum, .rp-table td.tnum { text-align: right; white-space: nowrap; }

/* ---- Phễu & dừng chân ---- */
.rp-funnel-track { flex: 1; height: 14px; background: var(--color-bg-muted); border-radius: 4px; overflow: hidden; }
.rp-funnel-fill { height: 100%; border-radius: 4px 0 0 4px; background: linear-gradient(90deg, var(--ggg-energetic-blue), var(--ggg-cobalt-core, #0047AB)); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rp-funnel-drop { width: 56px; font-size: 10.5px; font-weight: 700; color: var(--color-danger, #D81B60); background: rgba(216,27,96,.08); padding: 2px 6px; border-radius: 4px; text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rp-pause-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 0 8px 8px 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rp-pause-name { font-size: 13px; font-weight: 700; color: var(--color-fg); }
.rp-pause-time { font-size: 15px; font-weight: 800; color: var(--ggg-active-orange); }

/* ---- Khuyến nghị ---- */
.rp-reco { border-left: 4px solid var(--ggg-cobalt-core, #0047AB); }
.rp-reco-list { margin: 4px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.8; }
.rp-reco-list li { margin-bottom: 6px; }

.rp-footer { text-align: center; font-size: 11px; color: var(--color-fg-subtle, #9D9999); padding: 12px 0 20px; border-top: 1px dashed var(--color-border); }

/* ---------- In / Xuất PDF ---------- */
@media print {
  @page { size: A4 portrait; margin: 11mm; }
  body.rp-printing { background: #fff !important; }
  body.rp-printing .sidebar,
  body.rp-printing .topbar,
  body.rp-printing .no-print { display: none !important; }
  body.rp-printing .app { display: block !important; }
  body.rp-printing .main, body.rp-printing .content { padding: 0 !important; margin: 0 !important; max-width: none !important; overflow: visible !important; }
  body.rp-printing .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  body.rp-printing .rp-grid-2 { display: block; }
  body.rp-printing .rp-grid-2 > * { margin-bottom: 12px; }
  body.rp-printing .rp-hero { grid-template-columns: 1fr; }
  body.rp-printing .rp-hero-stats { grid-template-columns: repeat(4, 1fr); }
  body.rp-printing .rp-section { break-after: avoid; }
  body.rp-printing .rp-section-num,
  body.rp-printing .rp-period-pill,
  body.rp-printing .rp-brand-line { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.rp-printing .rp-header { break-after: avoid; }
}

/* Cảnh báo dữ liệu trong báo cáo (v1.5.67) */
.rp-warn { border-left: 4px solid var(--ggg-lemon-spark, #FEAA1A); font-size: 13px; color: var(--color-fg); line-height: 1.6; }

/* ---- Sơ đồ Phễu Vận hành 5 Bước & Chuỗi Vận đơn 6 Nấc (v1.27.0) ---- */
.rp-pipeline-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 14px 0 10px; }
@media (max-width: 1100px) { .rp-pipeline-flow { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .rp-pipeline-flow { grid-template-columns: 1fr; } }

.rp-step-node {
  background: var(--color-bg-muted, #f8f9fa);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.2s ease;
}
.rp-step-node.active {
  border-color: var(--ggg-cobalt-core, #0047AB);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,71,171,0.06);
}
.rp-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.rp-step-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rp-step-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.rp-step-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-fg);
  line-height: 1.3;
  margin-bottom: 6px;
}
.rp-step-val {
  font-size: 22px;
  font-weight: 900;
  color: var(--color-fg);
  line-height: 1.1;
  margin-bottom: 4px;
}
.rp-step-sub {
  font-size: 11.5px;
  color: var(--color-fg-muted);
  line-height: 1.4;
}

/* Chuỗi Vận đơn 6 Nấc */
.rp-fulfill-tracker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 14px 0 10px;
}
@media (max-width: 1200px) { .rp-fulfill-tracker { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .rp-fulfill-tracker { grid-template-columns: 1fr; } }

.rp-fulfill-node {
  background: var(--color-bg-muted, #f8f9fa);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.rp-fulfill-node.highlight-success {
  background: rgba(45,171,102,0.06);
  border-color: rgba(45,171,102,0.3);
}
.rp-fulfill-node.highlight-warn {
  background: rgba(254,170,26,0.06);
  border-color: rgba(254,170,26,0.3);
}
.rp-fulfill-node.highlight-danger {
  background: rgba(216,27,96,0.06);
  border-color: rgba(216,27,96,0.3);
}
.rp-fulfill-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-fg);
  margin-bottom: 6px;
}
.rp-fulfill-val {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 4px;
}
.rp-fulfill-pct {
  font-size: 11px;
  color: var(--color-fg-muted);
  font-weight: 600;
}

/* Thẻ Tiến độ Mục tiêu 10k */
.rp-goal-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--color-bg-muted);
  border-radius: 10px;
}
.rp-goal-bar-track {
  width: 100%;
  height: 12px;
  background: rgba(0,0,0,0.06);
  border-radius: 6px;
  overflow: hidden;
}
.rp-goal-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--ggg-active-orange), var(--ggg-energetic-blue));
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Thẻ KPI nhỏ 4 cột */
.rp-mini-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 10px;
}
@media (max-width: 900px) { .rp-mini-kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.rp-mini-kpi-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}
.rp-mini-kpi-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.rp-mini-kpi-val {
  font-size: 22px;
  font-weight: 900;
  color: var(--color-fg);
  margin-bottom: 2px;
}
.rp-mini-kpi-foot {
  font-size: 11.5px;
  color: var(--color-fg-muted);
}


/* ==========================================================================
   TRUNG TÂM THÔNG BÁO & GIÁM SÁT HỆ THỐNG (NOTIFICATION CENTER) - v1.26.0
   ========================================================================== */
.notif-topbar-btn {
  position: relative;
  height: 38px;
  width: 38px;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-fg);
  transition: all 0.2s ease;
}
.notif-topbar-btn:hover {
  border-color: var(--color-border-strong);
  background: var(--color-bg-light, #FAFAFA);
}
.notif-bell-icon {
  font-size: 16px;
  line-height: 1;
}
.notif-topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--ggg-pink-600, #E91E63);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(233,30,99,0.3);
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.notif-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
.notif-modal-card {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14), 0 9px 46px 8px rgba(0,0,0,0.12);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.notif-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FAFAFA;
}
.notif-tab-nav {
  display: flex;
  gap: 6px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--color-border);
  background: #fff;
  overflow-x: auto;
}
.notif-tab-btn {
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-fg-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.notif-tab-btn:hover {
  background: #F4F4F5;
  color: var(--color-fg);
}
.notif-tab-btn.active {
  background: #E8F0FE;
  color: #1A73E8;
  border-color: #D2E3FC;
}
.notif-badge-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}
.notif-badge-pill.danger { background: #FDE8E8; color: #E02424; }
.notif-badge-pill.primary { background: #E1EFFE; color: #1E429F; }
.notif-badge-pill.success { background: #DEF7EC; color: #03543F; }

.notif-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.notif-item {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease;
}
.notif-item:hover {
  border-color: var(--color-border-strong);
}
.notif-item.warning-border {
  border-left: 4px solid var(--ggg-active-orange, #FEAA1A);
}
.notif-item.danger-border {
  border-left: 4px solid var(--ggg-pink-600, #E91E63);
}
.notif-item.success-border {
  border-left: 4px solid #10B981;
}
.notif-item.info-border {
  border-left: 4px solid #3B82F6;
}

