/* Kian Mas Sales Dashboard — theme */
:root {
  --gold: #918231; --gold-d: #5C5220; --gold-l: #C9BC7A; --gold-xl: #EFE9D3; --gold-xxl: #F7F4EA;
  --grey: #939598; --grey-d: #5F6064; --ink: #2B2A26; --muted: #7C7B76; --line: #E6E0CB; --bg: #FAF8F1; --card: #FFFFFF;
  --red: #A8553C; --green: #5E7A2E;
  --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --r: 14px; --shadow: 0 1px 2px rgba(60, 50, 10, .05), 0 6px 24px rgba(60, 50, 10, .06);
  --side: 258px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--gold-d); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.ic { width: 18px; height: 18px; flex: none; }

/* ---------- boot / fatal ---------- */
.boot, .fatal { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 22px; text-align: center; padding: 24px; }
.boot img, .fatal img { width: min(320px, 70vw); animation: fadeUp .8s ease both; }
.boot-bar { width: 160px; height: 3px; border-radius: 3px; background: var(--gold-xl); overflow: hidden; position: relative; }
.boot-bar::after { content: ''; position: absolute; inset: 0; width: 40%; background: var(--gold); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 20% 10%, #fff 0%, var(--gold-xxl) 45%, var(--gold-xl) 100%); display: grid; place-items: center; }
.login-art::before { content: ''; position: absolute; inset: -20%; background: url('../img/icon.png') no-repeat 115% 110% / 70% auto; opacity: .08; animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-3%, -2%) rotate(-2deg); } }
.art-inner { position: relative; text-align: center; padding: 40px; animation: fadeUp 1s ease both; }
.art-inner img { width: min(460px, 80%); }
.art-quote { font-family: var(--serif); font-size: 30px; color: var(--gold-d); margin: 26px 0 0; line-height: 1.2; }
.art-quote em { color: var(--gold); }
.login-card { align-self: center; justify-self: center; width: min(400px, 90vw); display: flex; flex-direction: column; gap: 14px; padding: 40px 6px; animation: fadeUp .8s .1s ease both; }
.login-logo { display: none; width: 220px; margin: 0 auto 6px; }
.login-card h1 { font-family: var(--serif); font-size: 38px; color: var(--gold-d); }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--grey-d); }
.login-card input { padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 15px; text-transform: none; letter-spacing: 0; outline: none; transition: border .2s, box-shadow .2s; }
.login-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(145, 130, 49, .12); }
.sig { text-align: center; font-size: 11px; color: var(--muted); letter-spacing: .05em; margin-top: 18px; font-style: italic; }
.alert { background: #F8E9E3; color: var(--red); padding: 10px 12px; border-radius: 10px; font-size: 13px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; background: #fff; cursor: pointer; font-weight: 600; font-size: 13px; text-decoration: none; transition: transform .15s, background .2s, box-shadow .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--gold); color: #fff; box-shadow: 0 4px 14px rgba(145, 130, 49, .28); }
.btn.primary:hover { background: var(--gold-d); }
.btn.ghost { border-color: var(--line); color: var(--gold-d); }
.btn.ghost:hover { background: var(--gold-xxl); border-color: var(--gold-l); }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost.danger { background: #fff; color: var(--red); border-color: #EBCFC5; }
.btn.block { justify-content: center; padding: 14px; font-size: 14px; }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--grey-d); cursor: pointer; transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--gold-xl); color: var(--gold-d); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm .ic { width: 15px; height: 15px; }
.icon-btn.danger:hover { background: #F8E9E3; color: var(--red); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.link { font-size: 12px; font-weight: 600; text-decoration: none; color: var(--gold); }
.link:hover { color: var(--gold-d); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; }
.side-brand { padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }
.side-brand img { width: 100%; max-width: 196px; display: block; }
.side nav { padding: 10px 12px 20px; flex: 1; }
.nav-grp { margin-top: 12px; }
.nav-grp > span { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); padding: 8px 12px 6px; font-weight: 600; }
.side a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--grey-d); font-weight: 500; font-size: 13px; position: relative; transition: background .2s, color .2s; }
.side a em { font-style: normal; }
.side a:hover { background: var(--gold-xxl); color: var(--gold-d); }
.side a.active { background: var(--gold-xl); color: var(--gold-d); font-weight: 600; }
.side a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.side-foot { padding: 14px 22px; font-size: 10.5px; color: var(--grey); font-style: italic; border-top: 1px solid var(--line); }
.side-scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 14px 28px; background: rgba(250, 248, 241, .86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.burger { display: none; }
.top-title { flex: 1; min-width: 0; }
.top-title small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.top-title h2 { font-family: var(--serif); font-size: 26px; color: var(--gold-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1; }
.top-sel { display: flex; gap: 10px; }
.top-sel label { display: flex; flex-direction: column; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey-d); font-weight: 600; gap: 3px; }
.top-sel select { padding: 8px 32px 8px 12px; border: 1.5px solid var(--gold); border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23918231' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; font-weight: 700; color: var(--gold-d); font-size: 14px; cursor: pointer; }
.top-user { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; cursor: pointer; padding: 4px; border-radius: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-weight: 700; }
.u-name { display: flex; flex-direction: column; text-align: left; font-weight: 600; font-size: 13px; }
.u-name small { font-weight: 500; color: var(--muted); font-size: 11px; text-transform: capitalize; }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 210px; opacity: 0; pointer-events: none; transform: translateY(-6px); transition: .18s; }
.user-menu.open { opacity: 1; pointer-events: auto; transform: none; }
.user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: 13px; text-align: left; }
.user-menu button:hover { background: var(--gold-xxl); }
.view { padding: 24px 28px 40px; flex: 1; }
.view.enter > * { animation: fadeUp .45s ease both; }
.view.enter > *:nth-child(2) { animation-delay: .04s; } .view.enter > *:nth-child(3) { animation-delay: .08s; } .view.enter > *:nth-child(4) { animation-delay: .12s; } .view.enter > *:nth-child(5) { animation-delay: .16s; } .view.enter > *:nth-child(n+6) { animation-delay: .2s; }
.foot { padding: 16px 28px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }
.foot span { font-style: italic; }

/* ---------- page ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-size: 32px; color: var(--gold-d); line-height: 1.1; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; max-width: 760px; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px; margin-bottom: 18px; border-radius: var(--r); background: linear-gradient(120deg, #fff 0%, var(--gold-xxl) 55%, var(--gold-xl) 100%); border: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -40px; top: -60px; width: 300px; height: 300px; background: url('../img/icon.png') no-repeat center / contain; opacity: .09; }
.hero h1 { font-family: var(--serif); font-size: 42px; color: var(--gold-d); line-height: 1; margin: 4px 0; }
.hero p { margin: 0; color: var(--grey-d); font-size: 12.5px; }
.badge { position: relative; z-index: 1; background: var(--grey-d); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 700; letter-spacing: .1em; font-size: 13px; text-align: center; }
.badge small { display: block; font-weight: 500; letter-spacing: 0; opacity: .85; margin-top: 2px; font-size: 11px; }
.badge.ok { background: var(--green); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px 0; }
.card-head h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-d); font-weight: 700; }
.card-body { padding: 16px 20px 18px; }
.note { margin: -6px 20px 14px; font-size: 11.5px; color: var(--muted); font-style: italic; }
.grid { display: grid; gap: 18px; }
.grid > .card { margin-bottom: 0; }
.grid + .card, .grid + .grid, .card + .grid { margin-top: 18px; }
.g-2-1 { grid-template-columns: 2fr 1fr; } .g-1-1 { grid-template-columns: 1fr 1fr; } .g-1-2 { grid-template-columns: 1fr 2fr; } .g-1-3 { grid-template-columns: 300px 1fr; } .g-3 { grid-template-columns: repeat(3, 1fr); }
.info { background: var(--gold-xxl); border: 1px solid var(--line); border-left: 3px solid var(--gold); padding: 10px 14px; border-radius: 10px; font-size: 12.5px; color: var(--grey-d); margin-bottom: 16px; display: flex; gap: 8px; align-items: center; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; animation: fadeUp .5s var(--d) ease both; transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(60, 50, 10, .1); }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--gold), var(--gold-l)); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey-d); font-weight: 700; min-height: 22px; }
.kpi-top .ring { width: 38px; height: 38px; margin: -6px -4px -10px 0; }
.kpi-val { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--gold-d); margin: 6px 0 2px; white-space: nowrap; }
.kpi-val.neg { color: var(--red); } .kpi-val.pos { color: var(--green); }
.kpi-sub { font-size: 11.5px; color: var(--muted); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th, .tbl td { padding: 9px 12px; border-bottom: 1px solid #F0EBDB; text-align: left; vertical-align: top; }
.tbl thead th { background: var(--gold); color: #fff; font-size: 11px; letter-spacing: .04em; font-weight: 600; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl thead th[data-sort] { cursor: pointer; }
.tbl thead th[data-sort]:hover { background: var(--gold-d); }
.tbl tbody tr:hover td { background: #FCFAF2; }
.tbl tbody th { font-weight: 600; background: var(--gold-xxl); white-space: nowrap; }
.tbl tfoot td, .tbl tfoot th { background: var(--gold-xl); font-weight: 700; border-bottom: 0; }
.tbl .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .c { text-align: center; }
.tbl .strong { font-weight: 700; }
.tbl tr.hl td { background: #F6EFCF !important; font-weight: 600; }
.tbl .hlc { background: rgba(201, 188, 122, .22); }
.tbl thead .hlc { background: var(--gold-d); }
.tbl .empty { text-align: center; color: var(--muted); padding: 30px; }
.tbl.compact th, .tbl.compact td, .compact .tbl th, .compact .tbl td { padding: 7px 10px; }
.sticky-first td:first-child, .sticky-first th:first-child { position: sticky; left: 0; background: #fff; z-index: 2; }
.sticky-first thead th:first-child { background: var(--gold); z-index: 3; }
.sticky-first tfoot td:first-child { background: var(--gold-xl); }
.cell-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { color: var(--gold); }
.wrap { display: block; min-width: 200px; white-space: normal; }
.acts td { white-space: nowrap; }
.row-act { display: inline-flex; gap: 2px; opacity: .55; transition: opacity .2s; }
tr:hover .row-act, .prog-item:hover .row-act { opacity: 1; }
.tbl-meta { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; font-size: 12.5px; color: var(--grey-d); gap: 10px; flex-wrap: wrap; }
.tbl-meta.end { margin: 10px 0 0; justify-content: flex-end; }
.pager { display: inline-flex; align-items: center; gap: 6px; }
.neg { color: var(--red); } .pos { color: var(--green); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 3px 9px 3px 7px; border-radius: 20px; background: color-mix(in srgb, var(--c) 16%, #fff); color: color-mix(in srgb, var(--c) 75%, #000); white-space: nowrap; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pbar { display: inline-block; width: 60px; height: 6px; background: var(--gold-xl); border-radius: 6px; overflow: hidden; vertical-align: middle; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-l), var(--gold)); border-radius: 6px; transition: width .8s ease; }
.pbar.lg { width: auto; flex: 1; height: 8px; }

/* filters / inputs */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; align-items: flex-end; }
.filters.col { flex-direction: column; align-items: stretch; }
.filters label, .inline-sel label { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--grey-d); font-weight: 600; }
.filters .grow { flex: 1; min-width: 200px; }
.filters select, .filters input, .inline-sel select, .field input, .field select, .field textarea, textarea, .h-in { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 500; outline: none; transition: border .2s, box-shadow .2s; width: 100%; }
.filters select:focus, .filters input:focus, .field input:focus, .field select:focus, .field textarea:focus, textarea:focus, .h-in:focus, .cell-in:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(145, 130, 49, .12); }
.inline-sel { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; font-size: 12.5px; }
.inline-sel > span { padding-bottom: 9px; color: var(--grey-d); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.check input { width: 16px; height: 16px; accent-color: var(--gold); }
.cell-in { width: 100%; min-width: 110px; padding: 6px 8px; border: 1px solid transparent; border-radius: 7px; background: var(--gold-xxl); text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; outline: none; }
.cell-in.sm { min-width: 52px; }
.cell-in.txt { text-align: left; min-width: 140px; }
.cell-in[readonly] { background: transparent; }
.tbl.edit td { padding: 5px 6px; vertical-align: middle; }
.msel { position: relative; }
.msel summary { cursor: pointer; list-style: none; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; font-weight: 600; color: var(--gold-d); }
.msel > div { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; z-index: 20; width: 300px; }

/* summaries */
.mini-sum { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.mini-sum > div { flex: 1; min-width: 130px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.mini-sum b { font-family: var(--serif); font-size: 22px; color: var(--gold-d); }
.mini-sum small { color: var(--muted); font-size: 11px; }
.mini-sum span { font-size: 12px; color: var(--grey-d); font-weight: 600; }
.mini-sum .tot { background: var(--gold); border-color: var(--gold); }
.mini-sum .tot b, .mini-sum .tot span { color: #fff; }
.bench { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bench.four { grid-template-columns: repeat(4, 1fr); } .bench.two { grid-template-columns: 1fr 1fr; } .bench.three { grid-template-columns: repeat(3, 1fr); }
.bench > div:not(.card), .bench .card-body { display: flex; flex-direction: column; gap: 4px; }
.bench > div:not(.card) { padding: 12px 14px; background: var(--gold-xxl); border-radius: 10px; }
.bench span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--grey-d); font-weight: 600; }
.bench b { font-family: var(--serif); font-size: 22px; color: var(--gold-d); }
.bench > .card { margin-bottom: 0; }
.ratios { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--grey-d); margin-top: 10px; }

/* charts */
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #EEE8D6; stroke-width: 1; }
.chart .ax { font-size: 11px; fill: #8C8A83; font-family: var(--sans); }
.chart .ax.lbl { fill: var(--grey-d); font-weight: 600; }
.chart .ax.hl { fill: var(--gold-d); font-weight: 700; }
.chart .hlband { fill: rgba(201, 188, 122, .14); pointer-events: none; }
.chart rect.bar, .chart rect { transition: opacity .2s; }
.chart rect:hover, .donut .slice:hover { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; font-size: 11.5px; color: var(--grey-d); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 10px; border-radius: 3px; display: inline-block; }
.donut { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: center; margin-bottom: 14px; }
.donut svg { width: 100%; }
.d-big { font-family: var(--serif); font-size: 30px; font-weight: 700; fill: var(--gold-d); }
.d-small { font-size: 11px; fill: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.d-legend > div { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; padding: 4px 0; }
.d-legend i { width: 10px; height: 10px; border-radius: 3px; }
.tooltip { position: fixed; pointer-events: none; z-index: 1000; background: var(--ink); color: #fff; padding: 8px 11px; border-radius: 8px; font-size: 12px; line-height: 1.45; opacity: 0; transition: opacity .12s; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: 280px; }
.top-list .top-row { display: grid; grid-template-columns: 22px 1fr 90px auto 46px; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.top-row em { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--gold-xl); color: var(--gold-d); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.top-row:nth-child(-n+3) em { background: var(--gold); color: #fff; }
.top-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-row .pbar { width: 100%; }
.top-row b { font-size: 12px; white-space: nowrap; }
.top-row small { color: var(--muted); text-align: right; }
.rooms .room-row { display: grid; grid-template-columns: 90px 1fr 30px 70px; align-items: center; gap: 12px; padding: 7px 0; font-size: 13px; }
.rooms b { text-align: right; color: var(--gold-d); }
.rooms small { color: var(--muted); text-align: right; }

/* calendar */
.cal { width: 100%; border-collapse: collapse; font-size: 11.5px; min-width: 980px; }
.cal th, .cal td { border: 1px solid #EEE8D6; padding: 6px; vertical-align: top; width: 13%; }
.cal thead th { background: var(--gold); color: #fff; font-weight: 600; }
.cal tr.wk th { background: var(--gold-l); color: var(--gold-d); font-weight: 700; text-align: center; }
.cal th.room { background: var(--gold-xxl); text-align: left; width: 9%; color: var(--gold-d); }
.cal td.off { background: repeating-linear-gradient(45deg, #FAF8F1, #FAF8F1 6px, #F3EFE0 6px, #F3EFE0 12px); }
.ev { border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border-radius: 6px; padding: 4px 6px; margin-bottom: 4px; }
.ev b { display: block; font-size: 11px; } .ev small { color: var(--grey-d); font-size: 10px; }

/* weekly plan */
.plans { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto; }
.plan { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: .2s; }
.plan:hover { border-color: var(--gold-l); } .plan.active { background: var(--gold-xl); border-color: var(--gold); }
.plan span { font-size: 12px; color: var(--grey-d); } .plan small { color: var(--muted); font-size: 11px; }
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.plan-head h3 { font-family: var(--serif); font-size: 24px; color: var(--gold-d); }
.card-body h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 18px 0 8px; }
.report { background: var(--gold-xxl); border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.6; white-space: normal; }

/* programs / marketing */
.prog td { min-width: 220px; }
.prog-item { position: relative; background: var(--gold-xxl); border-left: 3px solid var(--gold); padding: 8px 10px; border-radius: 6px; margin-bottom: 6px; font-size: 12px; line-height: 1.45; }
.prog-item .row-act { position: absolute; right: 4px; top: 4px; background: #fff; border-radius: 8px; }
.add-mini { border: 1px dashed var(--gold-l); background: transparent; color: var(--gold); border-radius: 8px; width: 100%; padding: 4px; cursor: pointer; display: grid; place-items: center; }
.add-mini .ic { width: 14px; height: 14px; }
.mk td.gantt { padding: 6px 2px; text-align: center; min-width: 34px; }
.gantt i { display: block; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--gold-l), var(--gold)); }
.strat { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.strat-item { display: flex; gap: 14px; padding: 18px; margin: 0; align-items: flex-start; }
.strat-item h3 { font-family: var(--serif); font-size: 22px; color: var(--gold-d); }
.strat-item ul { margin: 6px 0 0; padding-left: 18px; color: var(--grey-d); }
.strat-item .grow { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.h-in { font-weight: 700; color: var(--gold-d); }
.num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--serif); font-size: 18px; }
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 18px; }
.step { display: flex; gap: 14px; padding: 18px; margin: 0; }
.step h3 { font-size: 14px; color: var(--gold-d); margin-bottom: 4px; } .step p { margin: 0; color: var(--grey-d); font-size: 13px; line-height: 1.55; }
.formula li { margin: 6px 0; }
.sev { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.sev.Critical { background: #F3D9CF; color: #8A3B22; } .sev.High { background: #F6E5C8; color: #7A5410; } .sev.Medium { background: var(--gold-xl); color: var(--gold-d); } .sev.Review { background: #ECECEC; color: #555; }
.role { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 10px; background: var(--gold-xl); color: var(--gold-d); }
.role.admin { background: var(--gold); color: #fff; }
.st-sel { padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; }
.st-sel.s-Done { background: #E3EBD3; } .st-sel.s-InProgress { background: #F6EFCF; }
.bk-list > div { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.bk-list span { flex: 1; }
.computed { padding: 10px 12px; background: var(--gold-xxl); border-radius: 9px; font-size: 13px; }

/* modal */
.modal-wrap { position: fixed; inset: 0; background: rgba(43, 42, 38, .42); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 200; padding: 16px; opacity: 0; transition: opacity .2s; }
.modal-wrap.show { opacity: 1; }
.modal { background: #fff; border-radius: 16px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); transform: translateY(12px) scale(.98); transition: transform .25s; }
.modal.wide { width: min(940px, 100%); }
.modal-wrap.show .modal { transform: none; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--serif); font-size: 24px; color: var(--gold-d); }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--gold-xxl); border-radius: 0 0 16px 16px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.form-grid.cols-1 { grid-template-columns: 1fr; } .form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--grey-d); }
.field > label b { color: var(--red); }
.field small { color: var(--muted); font-size: 11px; }
.field input.num { text-align: right; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 13px; z-index: 300; opacity: 0; transition: .25s; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); }
#toast-root { position: relative; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(2, 1fr); } .g-2-1, .g-1-1 { grid-template-columns: 1fr; } }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .3s ease; box-shadow: 20px 0 60px rgba(0, 0, 0, .15); }
  body.nav-open .side { transform: none; }
  body.nav-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 35; }
  .burger { display: inline-grid; }
  .top { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .top-sel { order: 3; width: 100%; } .top-sel label { flex: 1; } .top-sel select { width: 100%; }
  .u-name { display: none; }
  .view { padding: 16px; }
  .g-1-2, .g-1-3, .g-3 { grid-template-columns: 1fr; }
  .bench, .bench.four, .bench.three { grid-template-columns: 1fr 1fr; }
  .login { grid-template-columns: 1fr; } .login-art { display: none; } .login-logo { display: block; }
  .strat, .steps { grid-template-columns: 1fr; }
  .form-grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .form-grid .field { grid-column: auto !important; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 12px; } .kpi-val { font-size: 22px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 18px; } .hero h1 { font-size: 34px; }
  .top-title h2 { font-size: 21px; }
  .donut { grid-template-columns: 1fr; } .donut svg { max-width: 200px; margin: auto; }
  .form-grid, .form-grid.cols-4 { grid-template-columns: 1fr; }
  .top-list .top-row { grid-template-columns: 22px 1fr auto; } .top-row .pbar, .top-row small { display: none; }
  .page-head h1 { font-size: 26px; }
}
@media print { .side, .top, .foot, .tools, .row-act { display: none !important; } .shell { display: block; } .card { break-inside: avoid; box-shadow: none; } }
