/* GDSC theme — from Sam's logo: navy · cream · logo blue · logo red (red only for "needs attention").
   Light = warm cream (no pure white glare); dark = logo navy. Few colours, big buttons (Rule Book v1.3 §G). */
:root {
  --bg: #f2efe7; --card: #fbfaf6; --ink: #16223a; --muted: #687187; --line: #e1dccf;
  --accent: #1f4e85; --accent-ink: #fbfaf6; --red: #b2382e; --red-bg: #f7e8e4; --green: #2d7650;
  --band: #8b909a; --chg: #fbefc6; --chg-line: #d1ad45;
  --brand: #0f1a2c; --brand-ink: #efe8d8; --brand-red: #c8372d; --brand-blue: #2b5c95;
  --shadow: 0 1px 2px rgba(15, 26, 44, .06), 0 4px 14px rgba(15, 26, 44, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1524; --card: #142036; --ink: #e9e3d4; --muted: #9ba4b6; --line: #24324b;
    --accent: #80a8da; --accent-ink: #0c1524; --red: #e8877c; --red-bg: #3a1f22; --green: #7dc59b;
    --band: #7e8698; --chg: #3a3214; --chg-line: #a8892a;
    --brand: #09111f; --brand-ink: #efe8d8; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1524; --card: #142036; --ink: #e9e3d4; --muted: #9ba4b6; --line: #24324b;
  --accent: #80a8da; --accent-ink: #0c1524; --red: #e8877c; --red-bg: #3a1f22; --green: #7dc59b;
  --band: #7e8698; --chg: #3a3214; --chg-line: #a8892a;
  --brand: #09111f; --brand-ink: #efe8d8; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--brand); color: var(--brand-ink);
  box-shadow: inset 0 -3px 0 var(--brand-red), var(--shadow); }
.top h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 600; letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .logo { width: 30px; height: 30px; border-radius: 7px; flex: none; }
.top .icon, .top .link { color: var(--brand-ink); }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
button, .btn { font: inherit; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); padding: 10px 14px; cursor: pointer; min-height: 44px; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
.danger { color: var(--red); }
.link { border: 0; background: none; color: var(--accent); min-height: 0; padding: 6px; }
.icon { border: 0; background: none; font-size: 22px; padding: 4px 8px; min-height: 0; }
.group { margin: 22px 0 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tile { text-align: left; padding: 14px 14px 14px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); border-left: 4px solid var(--brand-blue);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.tile:hover { transform: translateY(-1px); border-left-color: var(--brand-red); }
.tile b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.tile span { font-size: 13px; color: var(--muted); }
.bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.bar input[type=search] { flex: 1 1 180px; }
input, select, textarea { font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--ink);
  border: 1px solid var(--line); background: var(--card); min-height: 44px; }
textarea { min-height: 70px; }
.list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list button { width: 100%; text-align: left; border: 0; border-radius: 0; background: none; padding: 12px 14px; }
.list .sub { display: block; font-size: 13px; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); margin-left: 6px; }
.pill.band { color: var(--band); }
.pill.red { color: var(--red); border-color: var(--red); background: var(--red-bg); }
.pill.green { color: var(--green); border-color: var(--green); }
form .f { margin-bottom: 12px; }
form label { display: block; font-size: 14px; margin-bottom: 4px; }
form .req::after { content: " *"; color: var(--red); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 0; }
.checks input, .switch input { width: auto; min-height: 0; }
.switch { display: flex; align-items: center; gap: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 16px;
  box-shadow: var(--shadow); }
.card h2 { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scroll { overflow-x: auto; }
.err { color: var(--red); background: var(--red-bg); padding: 10px 12px; border-radius: 10px; }
#toast { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 520px; margin: 0 auto; padding: 12px 14px;
  border-radius: 12px; background: var(--brand); color: var(--brand-ink); text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25); border-bottom: 3px solid var(--brand-red); }
.login { max-width: 360px; margin: 40px auto; }
/* sheet (bulk edit) */
.sheet { max-height: 70vh; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.sheet table { font-size: 13px; }
.sheet th { position: sticky; top: 0; background: var(--card); z-index: 1; white-space: nowrap; }
.sheet td { padding: 2px; }
.sheet input, .sheet select { min-height: 34px; padding: 4px 6px; border-radius: 6px; min-width: 110px; font-size: 13px; }
.sheet input[type=checkbox] { min-width: 0; }
.sheet .stick { position: sticky; left: 0; background: var(--card); z-index: 1; }
.sheet th.stick { z-index: 2; }
.sheet .stick input { min-width: 170px; }
.sheet .rid { color: var(--muted); font-size: 12px; }
.chg { background: var(--chg) !important; border-color: var(--chg-line) !important; }
.bandrow td { opacity: .6; }
.errrow td { background: var(--red-bg); }
.list li.row { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; }
.list li.row button { width: auto; }
.list li.dup { padding: 10px 14px; }
.list li.dup .bar { margin: 8px 0 0; }
.list li.dup .bar button { width: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
/* lead inbox */
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.tabs { overflow-x: auto; flex-wrap: nowrap; }
.tabs button { white-space: nowrap; }
.enq { border-top: 1px solid var(--line); padding: 8px 0; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
main.wide { max-width: 1400px; }
@media (min-width: 1000px) { .sheet { max-height: 78vh; } }
.list li.dup .bar button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
.bcard span { display: block; }
.redtxt { color: var(--red); }
.bigpw { font: 600 22px/1.3 ui-monospace, monospace; letter-spacing: .02em; margin: 6px 0; overflow-wrap: anywhere; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.login { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.hero { text-align: center; margin-bottom: 18px; }
.hero img { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); }
.hero b { display: block; font-size: 20px; margin-top: 10px; letter-spacing: .02em; }
.hero span { display: block; font-size: 12px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
@media (min-width: 1000px) {   /* kept LAST so it wins over the phone rules — laptop / desktop: more room, bigger tiles */
  main { max-width: 1080px; padding: 24px 32px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
  .tile { padding: 18px 18px 18px 20px; }
}
.checkrow td:first-child { border-left: 3px solid var(--amber, #c98a00); }

/* ===== D-44/45/46/47 new look: CEO Home + company dashboard (MIS style). Light motion, few numbers. ===== */
:root { --gp: #8a5a1c; --gdsc: #1f5f8b; --morsel: #9b2c5a; --p3d: #2f7d6b; --personal: #3b3f4a;
  --amber: #b7791f; --amber-bg: #fbf1dc; --green-bg: #e3f1e8; --ring: rgba(31, 78, 133, .18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --amber: #e3b25c; --amber-bg: #3a2f17; --green-bg: #17302a; } }
:root[data-theme="dark"] { --amber: #e3b25c; --amber-bg: #3a2f17; --green-bg: #17302a; }
body { background: radial-gradient(1200px 500px at 50% -200px, var(--ring), transparent 70%), var(--bg); background-attachment: fixed; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(.97); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  main > * { animation: rise .35s ease both; }
  main > *:nth-child(2) { animation-delay: .04s; } main > *:nth-child(3) { animation-delay: .08s; }
  main > *:nth-child(4) { animation-delay: .12s; } main > *:nth-child(5) { animation-delay: .16s; }
  main > *:nth-child(n+6) { animation-delay: .2s; }
  .co, .tool, .kpi, .tile, .todo li { transition: transform .18s ease, box-shadow .18s ease; }
  .co:hover, .tool:hover, .kpi:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15, 26, 44, .14); }
  .co:active, .tool:active, .tile:active, .todo button:active { animation: pop .22s ease; }
}
.hello { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 2px 14px; }
.hello h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.hello span { color: var(--muted); font-size: 14px; }
.sec { display: flex; align-items: center; gap: 8px; margin: 26px 2px 10px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* today's work */
.todo { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.todo ul { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.todo li:last-child { border-bottom: 0; }
.todo .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--accent); }
.todo .dot.red { background: var(--red); } .todo .dot.amber { background: var(--amber); } .todo .dot.green { background: var(--green); }
.todo .t { flex: 1; min-width: 0; } .todo .t b { display: block; font-weight: 600; font-size: 15px; }
.todo .t span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo li > button { min-height: 36px; padding: 6px 12px; flex: none; }
.todo .empty { padding: 22px 16px; text-align: center; color: var(--muted); }
.todo .empty b { display: block; font-size: 18px; color: var(--green); margin-bottom: 2px; }
.todo .foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--bg); font-size: 13px; color: var(--muted); }
/* big company cards */
.cos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.co { position: relative; text-align: left; border: 0; border-radius: 20px; padding: 18px 18px 16px; min-height: 150px; color: #fff;
  background: linear-gradient(135deg, var(--c, var(--accent)) 0%, color-mix(in srgb, var(--c, var(--accent)) 62%, #000) 100%);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--c, #000) 30%, transparent); overflow: hidden; display: flex; flex-direction: column; }
.co::after { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.09); }
.co .ini { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: .03em; }
.co b { display: block; font-size: 19px; font-weight: 700; margin-top: 14px; line-height: 1.2; }
.co small { display: block; font-size: 13px; opacity: .82; margin-top: 2px; }
.co .st { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.co .st i { width: 9px; height: 9px; border-radius: 50%; background: #7ee2a5; box-shadow: 0 0 0 3px rgba(126,226,165,.25); }
.co .st i.amber { background: #ffd27a; box-shadow: 0 0 0 3px rgba(255,210,122,.25); }
.co .st i.red { background: #ff8c80; box-shadow: 0 0 0 3px rgba(255,140,128,.3); }
.co .go { position: absolute; right: 16px; bottom: 14px; font-size: 20px; opacity: .8; }
/* personal (locked) */
.personal { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 14px; text-align: left; border-radius: 18px; padding: 16px 18px;
  border: 1px dashed color-mix(in srgb, var(--personal) 45%, var(--line)); background: repeating-linear-gradient(135deg, var(--card) 0 14px, var(--bg) 14px 28px); }
.personal .lock { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--brand); color: var(--brand-ink); flex: none; }
.personal b { display: block; font-size: 17px; } .personal span { font-size: 13px; color: var(--muted); }
/* tools below */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tool { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); min-height: 104px; }
.tool .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--bg); margin-bottom: 10px; }
.tool b { display: block; font-size: 15px; font-weight: 600; } .tool span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
/* company dashboard */
.banner { border-radius: 20px; padding: 20px; color: #fff; display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, var(--c) 0%, color-mix(in srgb, var(--c) 60%, #000) 100%); box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 30%, transparent); }
.banner .ini { width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-weight: 800; }
.banner b { display: block; font-size: 20px; } .banner small { opacity: .85; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); border-top: 4px solid var(--c, var(--accent)); }
.kpi .l { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .v.bad { color: var(--red); }
.kpi .d { font-size: 12px; color: var(--muted); } .kpi .d .up { color: var(--green); } .kpi .d .dn { color: var(--red); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-top: 14px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; text-align: center; }
.panel .empty { text-align: center; color: var(--muted); font-size: 14px; padding: 18px 0; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 130px; padding-top: 6px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bars i { display: block; width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: var(--c, var(--accent)); min-height: 2px; transform-origin: bottom; }
@media (prefers-reduced-motion: no-preference) { .bars i { animation: grow .6s ease both; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bars span { font-size: 10px; color: var(--muted); }
.mis th { background: var(--c, var(--accent)); color: #fff; font-weight: 600; font-size: 13px; padding: 8px 10px; }
.mis td { padding: 9px 10px; font-size: 14px; } .mis tr:nth-child(even) td { background: color-mix(in srgb, var(--c, var(--accent)) 6%, transparent); }
.mis td.n { text-align: right; font-variant-numeric: tabular-nums; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; }
.chip.red { background: var(--red-bg); color: var(--red); } .chip.amber { background: var(--amber-bg); color: var(--amber); } .chip.green { background: var(--green-bg); color: var(--green); }
.hbar { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; font-size: 13px; margin: 7px 0; }
.hbar i { display: block; height: 10px; border-radius: 99px; background: var(--c, var(--accent)); }
.screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.screens .tool { border-top: 4px solid var(--c, var(--accent)); }
@media (min-width: 1000px) {
  .cos { grid-template-columns: repeat(4, 1fr); } .co { min-height: 180px; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .twocol .panel { margin-top: 14px; }
}
@media (max-width: 380px) { .cos { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .hello { flex-direction: column; gap: 2px; } .hello h2 { font-size: 22px; } }

/* ---------- D-50: P&L tile, machine use (24 h), month production vs kharcha, haazri ---------- */
.kpi.click { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.kpi .go { color: var(--c, var(--accent)); }
.kpi .v.good { color: var(--green); }
.kpi .lines { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.kpi .lines b { color: var(--ink); font-weight: 650; }
.kpi .d.warn { color: var(--amber); }
.banner-warn { display: block; width: 100%; text-align: left; margin-top: 14px; padding: 10px 14px; border-radius: 12px;
  background: var(--amber-bg); border: 1px solid var(--amber); color: var(--ink); font-size: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin: 0 0 10px; justify-content: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend i.run, .bar24 i.run, .stack i.run { background: var(--green); }
.legend i.down, .bar24 i.down, .stack i.down { background: var(--amber); }
.legend i.idle { background: var(--line); }
.legend i.half { width: 2px; height: 12px; background: var(--ink); border-radius: 0; }
.legend i.p, .pair i.p { background: var(--c, var(--accent)); } .legend i.c, .pair i.c { background: var(--red); opacity: .75; }
.mrow { display: grid; grid-template-columns: 110px 1fr 62px; gap: 12px; align-items: center; width: 100%; text-align: left;
  padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: inherit; cursor: pointer; }
.mrow:last-child { border-bottom: 0; } .mrow:hover { background: var(--bg); }
.mrow .mn b { display: block; } .mrow .mn span { font-size: 12px; color: var(--muted); }
.bar24 { position: relative; display: flex; height: 18px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar24 em { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .55; }
.mp { font-weight: 800; font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.mp small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.mp.ok { color: var(--green); } .mp.lo { color: var(--amber); } .mp.zero { color: var(--red); }
.mtots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.mt { background: var(--bg); border-radius: 10px; padding: 8px 10px; } .mt span { display: block; font-size: 12px; color: var(--muted); }
.mt b { font-size: 17px; font-variant-numeric: tabular-nums; } .mt.pl.pos b { color: var(--green); } .mt.pl.neg b { color: var(--red); }
.bars.two .pair { display: flex; gap: 1px; align-items: flex-end; width: 100%; justify-content: center; }
.bars.two .pair i { width: 45%; border-radius: 3px 3px 0 0; }
.bars.use > div { cursor: pointer; border-radius: 6px; } .bars.use > div.sel { background: var(--bg); outline: 1px solid var(--line); }
.bars.use b { font-size: 10px; color: var(--muted); font-weight: 600; }
.bars.use .stack { position: relative; display: flex; flex-direction: column; justify-content: flex-end; width: 70%; height: 110px;
  background: linear-gradient(to top, transparent calc(50% - 1px), var(--muted) calc(50% - 1px), var(--muted) 50%, transparent 50%); }
.bars.use .stack i { display: block; width: 100%; }
.bars.use .stack i.run { border-radius: 0 0 3px 3px; } .bars.use .stack i.down { border-radius: 3px 3px 0 0; }
table.mis tr.tot td { font-weight: 800; border-top: 2px solid var(--line); }
.list li.hz { display: grid; gap: 8px; padding: 12px 14px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { padding: 8px 10px; min-height: 40px; font-size: 14px; }
.seg button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.list li.hz input { max-width: 160px; }
@media (min-width: 1000px) { .mtots { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .mrow { grid-template-columns: 78px 1fr 54px; gap: 8px; } }
.bars .pair { flex: none; flex-direction: row; height: auto; gap: 1px; }
.bars .stack { flex: none; gap: 0; align-items: stretch; }
.bars .stack i { max-width: none; border-radius: 0; animation: none; }
.bars.use { height: 165px; }
.list .seg button { width: auto; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 8px 12px; }
.list .seg button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---- D-50 part 2: Funds & cash flow ---- */
.goodtxt { color: var(--green); }
.funds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 14px; }
.fund { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c, var(--accent)); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.fund.red { border-left-color: var(--red); background: var(--red-bg); }
.fund.ok { border-left-color: var(--green); }
.fund .top { position: static; display: flex; justify-content: space-between; align-items: baseline; padding: 0; background: none; color: inherit; box-shadow: none; }
.fund .top .v { font-size: 1.25rem; font-weight: 700; }
.fund .v.bad { color: var(--red); }
.fund .bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.fund .bar button { width: auto; flex: 1 1 auto; min-height: 36px; padding: 4px 10px; }
.meter { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.fund.red .meter i { background: var(--red); }
.fset { border-top: 1px dashed var(--line); padding-top: 8px; display: grid; gap: 8px; }
.fset label { display: grid; gap: 2px; font-size: .85rem; color: var(--muted); }
.tool.slim { min-height: 0; padding: 12px; text-align: center; border-style: dashed; box-shadow: none; }
.split { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 8px 0; display: grid; gap: 8px; }
.split label { display: grid; gap: 2px; font-size: .85rem; color: var(--muted); }
.split .bar button, .panel .bar button { width: auto; }
table.flow tr.red td { background: var(--red-bg); }
table.flow td.n { position: relative; white-space: nowrap; }
table.flow i.fl { display: block; height: 3px; margin-top: 3px; margin-left: auto; background: var(--accent); border-radius: 2px; opacity: .5; }
table.flow tr.red i.fl { background: var(--red); }
.aibox textarea { width: 100%; font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); resize: vertical; }
.aibox .ans { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-top: 8px; font-size: .95rem; }
.panel form.grid2 button { grid-column: 1 / -1; }
@media (max-width: 560px) { .funds { grid-template-columns: 1fr; } }
.fset[hidden], .ans[hidden], .split .grid2[hidden], .fpick[hidden], .f[hidden], .fset label[hidden], div[hidden] { display: none; }
table.fsum { width: 100%; font-size: 14px; margin: 2px 0; }
table.fsum td { padding: 2px 0; border: 0; }
.fpick { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.fund.add { justify-content: center; border-left-style: dashed; }
button[disabled] { opacity: .5; cursor: not-allowed; }
td.sheetv { font-weight: 700; background: #fff7c2; color: #3a3000; text-align: center; }

/* D-48 GDSC Task App */
.list.tks li.tk { display: grid; gap: 6px; padding: 10px 14px; }
.list.tks .tkl { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.list.tks .tkl input[type=checkbox] { width: 24px; height: 24px; flex: 0 0 24px; margin-top: 1px; accent-color: var(--green); }
.list.tks .tkl b { display: block; font-weight: 600; }
.list.tks .tkl em { font-style: normal; color: var(--muted); font-weight: 400; }
.list.tks .tkl small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.list.tks li.done .tkl b { text-decoration: line-through; color: var(--muted); }
.list.tks li.late { border-left: 4px solid var(--amber); }
.list.tks li.red { background: var(--red-bg); border-left: 4px solid var(--red); }
.list.tks .tkb { display: flex; gap: 6px; flex-wrap: wrap; padding-left: 36px; }
.list.tks .tkb button { width: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 13px; background: var(--card); }
.list.tks .tkn { margin-left: 36px; width: calc(100% - 36px); font-size: 13px; padding: 6px 10px; }
.list.tks .chk { width: 22px; height: 22px; flex: 0 0 22px; border: 2px solid var(--line); border-radius: 6px; display: grid; place-items: center; color: var(--green); font-style: normal; font-weight: 800; }
.present { display: block; width: 100%; margin: 6px 0 14px; padding: 14px; font-size: 17px; text-align: center; border-radius: 14px; }
.present.ok { background: var(--green-bg); color: var(--green); font-weight: 700; }
pre.brief { white-space: pre-wrap; font: 14px/1.5 inherit; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
table.tasks tr { cursor: pointer; } table.tasks tr.red td { background: var(--red-bg); } table.tasks tr.done td { color: var(--muted); text-decoration: line-through; }
.list.rts li { padding: 8px 10px; } .list.rts li.off { opacity: .55; }
.list.rts form.rt { display: grid; grid-template-columns: 1fr 2fr 110px 1fr 1fr auto auto; gap: 6px; align-items: center; }
.list.rts form.rt button { width: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.list.rts form.rt button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 760px) { .list.rts form.rt { grid-template-columns: 1fr 1fr; } .list.rts form.rt input:not([type=time]) { grid-column: 1 / -1; } }
.panel.qa { display: grid; gap: 8px; }
.tablewrap { overflow-x: auto; }
.list.tks .tkadd { justify-self: start; margin-left: 36px; width: auto; border: 0; background: none; padding: 0; font-size: 13px; color: var(--accent); }
.pres { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 6px 0 14px; }
.pres .tkl { display: flex; gap: 12px; align-items: center; }
.pres input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--green); }
/* HR review letter (looks like the printed letter; print = Save as PDF) */
article.letter { background: #fff; color: #1b1b1b; border: 1px solid var(--line); border-radius: 6px; padding: 32px 36px; max-width: 760px; margin: 0 auto; box-shadow: var(--shadow); font-size: 14.5px; line-height: 1.55; }
article.letter header { text-align: center; border-bottom: 2px solid #1b1b1b; padding-bottom: 10px; margin-bottom: 14px; display: grid; gap: 2px; }
article.letter header b { font-size: 20px; letter-spacing: .06em; } article.letter header span { font-size: 12.5px; color: #444; }
article.letter h3 { text-align: center; margin: 8px 0 12px; font-size: 17px; }
article.letter h4 { margin: 16px 0 6px; font-size: 15px; }
article.letter ul { margin: 4px 0 8px 18px; padding: 0; } article.letter li { margin: 3px 0; }
article.letter table.lmeta { width: auto; margin-bottom: 10px; } article.letter table.lmeta td { padding: 2px 14px 2px 0; border: 0; } article.letter table.lmeta td:first-child { color: #555; }
article.letter .sign { margin-top: 22px; } article.letter .rr { border-top: 1px dashed #888; margin-top: 18px; padding-top: 10px; }
article.letter .ack { display: flex; gap: 10px; align-items: center; font-weight: 600; } article.letter .ack.ok { color: #1e7a45; }
article.letter .ack input { width: 22px; height: 22px; }
.rep textarea { width: 100%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) article.letter { background: #fff; color: #1b1b1b; } }
@media print { header.top, .noprint, #toast { display: none !important; } body { background: #fff; } article.letter { border: 0; box-shadow: none; padding: 0; max-width: none; } }
