:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1d2433;
  --muted: #6b7385;
  --line: #e2e6ee;
  --primary: #23377f;
  --primary-dark: #182766;
  --navy: #12285c;
  --gold: #c9a24d;
  --green: #1f9d55;
  --green-bg: #e6f6ec;
  --orange: #c26a00;
  --orange-bg: #fff3e0;
  --red: #d93636;
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Office photo behind everything; a light shade over it once logged in so lists stay readable. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url(/bg.jpg) center / cover no-repeat;
}
body.in-app::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  /* Cream wash, lighter on the right so the building shows through like the design. */
  background: linear-gradient(90deg, rgba(250, 247, 241, .97) 0%, rgba(250, 247, 241, .93) 55%, rgba(250, 247, 241, .62) 100%);
}

/* ---------- app frame: sidebar + top bar ---------- */
/* The window itself never scrolls; only the content area does. So the layout looks the
   same in every browser and profile, whether the page is long or short. */
/* Pinned to the window edges (not 100vh) so it still fills the screen when app.js undoes a browser zoom. */
.shell { position: fixed; inset: 0; display: grid; grid-template-columns: 300px 1fr; overflow: hidden; }
.content { height: 100%; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; }

.side {
  height: 100%; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 30px 24px 24px;
  color: #fff;
  background: linear-gradient(180deg, rgba(14, 30, 70, .99) 0%, rgba(17, 35, 80, .97) 60%, rgba(17, 35, 80, .9) 100%), url(/bg.jpg) 30% center / cover;
}
.side-brand { text-align: center; padding-bottom: 34px; }
.side-logo { display: inline-block; color: #d9b46a; }
.side-name { font-size: 29px; margin-top: 10px; letter-spacing: .01em; }
.side-sub { font-size: 12.5px; letter-spacing: .32em; margin-top: 6px; opacity: .9; }

.side-nav, .side-foot { display: flex; flex-direction: column; gap: 6px; }
.side-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .16); margin-left: 12px; margin-right: 12px; }
.nav-item {
  display: flex; align-items: center; gap: 18px;
  width: 100%; padding: 13px 22px;
  border: 0; border-radius: 9px;
  background: none; color: rgba(255, 255, 255, .92);
  font-size: 17px; text-align: left;
}
.side-foot .nav-item { padding: 11px 10px; font-size: 16px; }
.nav-item:hover { background: rgba(255, 255, 255, .08); }
.nav-item.active { background: linear-gradient(90deg, #fbefd6, #f1ddb3); color: var(--navy); font-weight: 600; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.nav-item svg { flex-shrink: 0; }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  flex-shrink: 0; /* never squash the header when the page is long */
  display: flex; align-items: center; gap: 14px;
  height: 76px; padding: 0 24px 0 40px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #ebe5d8;
}
.topbar h1 { margin: 0 auto 0 0; font-size: 32px; color: var(--navy); font-weight: 700; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; color: var(--navy); }
.me { display: flex; align-items: center; gap: 12px; color: var(--navy); }
.me strong { font-size: 16px; }
.me-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 600; font-size: 16px; }
.admin-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 8px; background: #f6e6c2; color: #8f6a1c; font-size: 13.5px; font-weight: 500; }

.content main { max-width: none; margin: 0; padding: 26px 40px 48px; flex-shrink: 0; }

/* ---------- dashboard ---------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2, .panel-head h2 { margin: 0; font-size: 27px; color: var(--navy); font-weight: 700; }
.section-head p, .panel-head p { margin: 4px 0 0 4px; color: #5d6478; font-size: 16px; }
.btn-navy {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 28px; border: 0; border-radius: 9px;
  background: var(--navy); color: #fff; font-size: 17px; font-weight: 500;
  box-shadow: 0 6px 16px rgba(18, 40, 92, .25);
}
.btn-navy:hover { background: #0b1d46; }
.btn-light { display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: 9px; border: 1px solid #e3ddd0; color: var(--navy); font-weight: 600; background: #fff; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi {
  display: flex; align-items: center; gap: 22px;
  padding: 24px 20px; border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 18px rgba(40, 35, 20, .07);
}
.kpi-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #eef0f5; color: var(--navy); flex-shrink: 0; }
.kpi-v { font-size: 32px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.kpi-l { color: #5d6478; font-size: 15.5px; margin-top: 4px; }
.kpi.warn .kpi-icon { background: #fbeedd; color: #b5762a; }
.kpi.warn .kpi-v, .kpi.warn .kpi-l { color: #b5762a; }

.panel { background: rgba(255, 255, 255, .95); border-radius: 12px; padding: 22px 22px 18px; box-shadow: 0 4px 18px rgba(40, 35, 20, .07); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-head h2 { font-size: 25px; }
.panel-head p { margin-left: 0; font-size: 15.5px; }
.panel-tools { display: flex; gap: 16px; flex-wrap: wrap; }
.search { position: relative; display: block; margin: 0; font-weight: 400; color: #5d6478; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.search input { width: 250px; max-width: 100%; height: 42px; padding-left: 44px; border-color: #e3ddd0; border-radius: 9px; }

table.people-table th { font-size: 13px; color: #4c5368; font-weight: 600; padding: 10px; border-bottom: 1px solid #e8e3d8; }
table.people-table td { padding: 7px 10px; border-bottom: 1px solid #efebe2; font-size: 14.5px; }
table.people-table .c { text-align: center; }
.who-cell { display: inline-flex; align-items: center; gap: 14px; color: var(--navy); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 600; font-size: 15px; }
.pending-chip { display: inline-block; min-width: 34px; padding: 3px 10px; border-radius: 7px; background: #fbeedd; border: 1px solid #f3d9b0; color: #9a6216; font-weight: 600; }
.att-times { font-size: 12.5px; }

.panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

/* All people in one box that scrolls; the column titles stay visible while scrolling. */
.people-scroll { max-height: 520px; overflow: auto; border-bottom: 1px solid #efebe2; }
.people-scroll thead th { position: sticky; top: 0; z-index: 1; background: #fff; }

@media (max-width: 900px) {
  .shell { position: static; grid-template-columns: 1fr; overflow: visible; }
  .content { height: auto; overflow: visible; }
  .people-scroll { max-height: 60vh; }
  .side { height: auto; overflow: visible; padding: 14px 12px; }
  .side-brand { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; text-align: left; }
  .side-brand .logo { width: 40px; height: 40px; }
  .side-name { font-size: 20px; margin: 0; }
  .side-sub { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .side-foot { flex-direction: row; border: 0; margin: 6px 0 0; padding: 0; }
  .nav-item, .side-foot .nav-item { width: auto; white-space: nowrap; padding: 8px 12px; font-size: 14px; gap: 8px; }
  .nav-item svg { width: 18px; height: 18px; }
  .topbar { height: 60px; padding: 0 12px; }
  .topbar h1 { font-size: 22px; }
  .me strong, .admin-badge { display: none; }
  .me-avatar { width: 36px; height: 36px; font-size: 14px; }
  .content main { padding: 16px 12px 40px; }
  .search input { width: 100%; }
}

button, input, select, textarea { font: inherit; color: inherit; }

button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: 8px 14px;
}
button:hover { background: #eef1f7; }
button.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
button.primary:hover { background: var(--primary-dark); }
button.success { background: var(--green); border-color: var(--green); color: #fff; }
button.danger { color: var(--red); }
button.small { padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .6; cursor: default; }

input, select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #b9c9fb; border-color: var(--primary); }
textarea { resize: vertical; min-height: 90px; }
label { display: block; font-weight: 600; margin: 12px 0 5px; font-size: 14px; }

/* ---------- login ---------- */
.logo { display: block; flex-shrink: 0; }
.serif { font-family: "Libre Caslon Text", Georgia, "Times New Roman", serif; }
.caps { font-family: Cinzel, "Libre Caslon Text", Georgia, serif; }

.login-page { position: fixed; inset: 0; overflow-y: auto; display: flex; flex-direction: column; }
.login-top {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 4vw 40px;
  background: linear-gradient(180deg, rgba(251, 246, 236, .92) 0%, rgba(251, 246, 236, .6) 55%, rgba(251, 246, 236, 0) 100%);
}
.brand-mark { display: flex; align-items: center; gap: 18px; color: var(--navy); }
.brand-mark .bar { width: 1.5px; height: 52px; background: var(--navy); }
.brand-mark .name { font-size: clamp(22px, 2.6vw, 40px); font-weight: 600; letter-spacing: .02em; }
.services { display: flex; align-items: center; gap: 14px; font-size: 12.5px; letter-spacing: .16em; color: var(--navy); font-weight: 600; }
.services .sep { width: 1px; height: 14px; background: var(--navy); opacity: .5; }
.services::after { content: ''; width: 56px; height: 1.5px; background: var(--gold); }

.login-main { flex: 1; display: flex; justify-content: flex-end; align-items: center; padding: 0 3.5vw 28px; }
.login-card {
  width: min(480px, 100%);
  padding: 34px 44px 26px;
  border-radius: 22px;
  border: 1.5px solid rgba(201, 162, 77, .75);
  background: rgba(252, 248, 240, .84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(60, 45, 15, .18);
  color: var(--navy);
}
.login-card .head { text-align: center; }
.login-card .head .logo { margin: 0 auto 10px; }
.login-card .head .caps { font-size: 22px; font-weight: 600; letter-spacing: .04em; }
.gold-rule { width: 70px; height: 2px; background: var(--gold); margin: 18px auto; border: 0; }
.login-card h1 { margin: 0; font-size: clamp(32px, 3.4vw, 46px); font-weight: 700; line-height: 1.1; }
.login-card .sub { margin: 6px 0 18px; font-size: 19px; color: #4a5470; }
.login-card label { font-weight: 500; color: var(--navy); margin: 14px 0 6px; }

.field { position: relative; }
.field input { height: 52px; padding: 0 46px 0 48px; background: rgba(255, 255, 255, .85); border-color: #e4dccb; font-size: 16px; }
.field .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--navy); pointer-events: none; }
.field .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 6px; color: #4a5470; line-height: 0; }
.field .eye:hover { background: none; color: var(--navy); }

.login-opts { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 15px; }
.login-opts label { display: flex; align-items: center; gap: 9px; margin: 0; font-weight: 400; cursor: pointer; }
.login-opts input { width: 18px; height: 18px; accent-color: var(--navy); }
.login-opts a { color: var(--navy); font-weight: 600; text-decoration: none; }
.login-opts a:hover { text-decoration: underline; }

.login-btn {
  width: 100%; height: 56px; margin-top: 22px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--navy); border: 0; border-radius: 9px; color: #fff; font-size: 20px; font-weight: 500;
}
.login-btn:hover { background: #0b1d46; }
.login-card .foot { border-top: 1.5px solid rgba(201, 162, 77, .6); margin-top: 26px; padding-top: 18px; text-align: center; color: #3b4560; font-size: 15px; }
.error { color: var(--red); font-size: 14px; margin-top: 10px; min-height: 1em; text-align: center; }

.login-tag {
  position: absolute; left: 0; bottom: 0;
  display: flex; align-items: center; gap: 20px;
  padding: 12px 48px 12px 2.2vw;
  background: linear-gradient(90deg, rgba(251, 246, 236, .9) 60%, rgba(251, 246, 236, 0));
  color: var(--navy); font-style: italic; font-size: clamp(18px, 1.8vw, 28px);
}
.login-tag::before { content: ''; width: 60px; height: 1.5px; background: var(--gold); }

@media (max-width: 1000px) {
  .services, .login-tag { display: none; }
  .login-main { justify-content: center; padding: 0 16px 24px; }
}
/* Short screens (laptops): shrink the card so the whole login fits without scrolling. */
@media (max-height: 860px) {
  .login-top { padding-top: 12px; padding-bottom: 12px; }
  .brand-mark .logo { width: 48px; height: 48px; }
  .brand-mark .bar { height: 40px; }
  .login-main { padding-bottom: 12px; }
  .login-card { padding: 20px 38px 16px; }
  .login-card .head .logo { width: 56px; height: 56px; margin-bottom: 6px; }
  .login-card .head .caps { font-size: 18px; }
  .gold-rule { margin: 10px auto; }
  .login-card h1 { font-size: 32px; }
  .login-card .sub { margin: 2px 0 8px; font-size: 16px; }
  .login-card label { margin: 8px 0 4px; }
  .field input { height: 44px; }
  .login-opts { margin-top: 10px; }
  .login-btn { height: 48px; margin-top: 14px; }
  .login-card .foot { margin-top: 14px; padding-top: 10px; }
  .error { margin-top: 6px; }
}
/* Phones: the card already shows the logo and name, so the top bar is hidden to save space. */
@media (max-width: 520px) {
  .login-top { display: none; }
  .login-main { padding: 12px; align-items: center; }
  .login-card { padding: 22px 18px 16px; }
  .login-card h1 { font-size: 30px; }
}

/* ---------- layout ---------- */
header.top {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 5;
}
header.top .brand { font-weight: 700; font-size: 17px; margin-right: auto; color: var(--primary); }
header.top .who { color: var(--muted); font-size: 14px; }

main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 60px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { border-radius: 20px; }
.tabs button.active { background: var(--text); border-color: var(--text); color: #fff; }

.card { background: rgba(255, 255, 255, .95); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 4px 18px rgba(40, 35, 20, .07); }
.card h2 { margin: 0 0 12px; font-size: 21px; color: var(--navy); font-family: "Libre Caslon Text", Georgia, serif; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card h2 .count { background: var(--bg); color: var(--muted); font-size: 13px; padding: 1px 9px; border-radius: 20px; font-weight: 600; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 22px 0; }

/* ---------- task lists ---------- */
.day-head { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 6px; }
.day-head:first-child { margin-top: 0; }
.task { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 12px; align-items: flex-start; }
.task .body { flex: 1; min-width: 0; }
.task .title { white-space: pre-wrap; word-wrap: break-word; }
.task .details { white-space: pre-wrap; color: var(--muted); font-size: 14px; margin-top: 3px; }
.task .meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.task.pending { border-left: 4px solid var(--orange); }
.task.done { border-left: 4px solid var(--green); }
.badge { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 20px; }
.badge.done { background: var(--green-bg); color: var(--green); }
.badge.pending { background: var(--orange-bg); color: var(--orange); }
.badge.assigned { background: #e9eefc; color: var(--primary); }
.badge.absent { background: #fde8e8; color: var(--red); }
.badge.off { background: #eef0f4; color: var(--muted); }
.badge.late { background: var(--orange-bg); color: var(--orange); }
.task .actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f7f9fd; }
tr.inactive td { opacity: .5; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: rgba(255, 255, 255, .95); border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 4px 18px rgba(40, 35, 20, .07); }
.stat .v { font-size: 28px; font-weight: 700; color: var(--navy); }
/* ---------- file register (Excel-like grid) ---------- */
.file-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.file-tools select { width: auto; height: 42px; border-color: #e3ddd0; border-radius: 9px; }
.grid-wrap { overflow: auto; max-height: calc(100vh - 360px); min-height: 260px; border: 1px solid #ddd5c4; border-radius: 8px; background: #fff; }
/* Exact width = sum of the columns (set in app.js), so date pickers can't stretch their column. */
table.grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 100%; }
table.grid .cell[type="date"] { min-width: 0; padding: 0 4px 0 8px; }
table.grid th {
  position: sticky; top: 0; z-index: 2;
  padding: 10px 8px; background: #f3efe6; color: var(--navy);
  font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  border-bottom: 1px solid #ddd5c4; border-right: 1px solid #e8e2d4;
}
table.grid td { padding: 0; border-bottom: 1px solid #ece7dc; border-right: 1px solid #ece7dc; white-space: normal; vertical-align: middle; }
table.grid td.sno { text-align: center; color: var(--muted); background: #faf8f3; font-variant-numeric: tabular-nums; }
table.grid tr:hover td { background: #fbfaf6; }
table.grid tr.done-row td { background: #f3faf5; }
table.grid tfoot td {
  position: sticky; bottom: 0; z-index: 2;
  padding: 10px 8px; background: #f3efe6; color: var(--navy); font-weight: 700;
  border-top: 1px solid #ddd5c4;
}
.cell { width: 100%; height: 38px; padding: 0 8px; border: 0; border-radius: 0; background: transparent; font-size: 14px; }
.cell:focus { outline: 2px solid var(--navy); outline-offset: -2px; background: #fffdf6; border-color: transparent; }
select.cell { padding: 0 4px; cursor: pointer; }
.cell.saving { background: #fff8e1; }
.cell.saved { animation: saved-flash 1s; }
.cell.cell-error { background: #fde8e8; }
@keyframes saved-flash { from { background: #d7f2e1; } to { background: transparent; } }
table.grid .status-cell, table.grid .act-cell { padding: 6px 8px; }
.act-cell { white-space: nowrap; }
.act-cell button { margin: 2px 4px 2px 0; }
.act-cell button.small { padding: 4px 8px; }
/* S.No and Name of client stay fixed on the left while scrolling across the 9 steps. */
table.grid .freeze { position: sticky; left: 0; z-index: 1; background: #faf8f3; }
table.grid .freeze-2 { left: 46px; background: #fff; box-shadow: 6px 0 8px -6px rgba(40, 35, 20, .18); }
table.grid th.freeze { z-index: 3; background: #f3efe6; }
table.grid tfoot .freeze { z-index: 3; background: #f3efe6; }
table.grid tr.done-row td.freeze-2 { background: #f3faf5; }
table.grid tr.late-row td { background: #fff4f4; }
table.grid td.now-step { background: #fff8ec; box-shadow: inset 0 0 0 2px #f1c27d; }
table.grid th { white-space: normal; line-height: 1.25; vertical-align: top; }
/* The 3 amount columns are tinted so they read as one "Amount" group. */
table.grid td.money.claim_fee { background: #fbf8ef; }
table.grid td.money.file_charge { background: #f2f6fb; }
table.grid td.money.legal_fee { background: #f4f8f1; }
table.grid th.money.claim_fee, table.grid tfoot td.money.claim_fee { background: #efe6cf; }
table.grid th.money.file_charge, table.grid tfoot td.money.file_charge { background: #dfe8f3; }
table.grid th.money.legal_fee, table.grid tfoot td.money.legal_fee { background: #e3eedb; }
.th-group { font-size: 10px; letter-spacing: .08em; color: #8f6a1c; margin-bottom: 2px; }
.foot-total { font-size: 12.5px; color: #8f6a1c; margin-top: 2px; }
.th-team { margin-top: 3px; font-size: 10.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: #7a6a45; white-space: normal; }
.step.late { background: #fde8e8; color: var(--red); }
.steps-guide summary { cursor: pointer; }
.steps-list { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 10px; }
.steps-list li { padding-left: 4px; }
.steps-list .muted { font-size: 13.5px; margin-top: 2px; }
.step-team { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: #f3efe6; color: #7a5d1c; font-size: 12.5px; }
.my-work .my-step { padding: 10px 12px; border-left: 4px solid var(--gold); background: #fbf7ee; border-radius: 6px; margin-bottom: 8px; }
.my-work .my-step div { margin-top: 3px; color: #4a5470; font-size: 14px; }
.step-status { padding: 0 8px 6px; line-height: 1; }
.step-status:empty { display: none; }
.step { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.step.done { background: var(--green-bg); color: var(--green); }
.step.pending { background: var(--orange-bg); color: var(--orange); }
.step.waiting { background: #eef0f4; color: #5d6478; }
.file-note { margin-top: 4px; font-size: 12px; color: #8a5300; white-space: normal; }
.hint { margin-top: 10px; font-size: 13px; }
table.files-table td { white-space: normal; }
table.files-table td.sno { color: var(--muted); }
ul.history { list-style: none; margin: 10px 0 0; padding: 0; max-height: 50vh; overflow: auto; }
ul.history li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.stat.click { cursor: pointer; }
.stat.picked { outline: 2px solid var(--navy); }
.att-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.att-row-title { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #5d6478; margin: 4px 0 8px; }
.stat.click:hover { box-shadow: 0 4px 18px rgba(18, 40, 92, .16); }
.stat .l { color: var(--muted); font-size: 13px; }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.filters label { margin-top: 0; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin-top: 6px; }
.people label { font-weight: 400; margin: 0; display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.people input { width: auto; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: 8px;
  z-index: 50; max-width: calc(100% - 32px); box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
}
#toast.bad { background: var(--red); }

.modal-bg { position: fixed; inset: 0; background: rgba(15, 20, 35, .45); display: grid; place-items: center; padding: 16px; z-index: 40; }
.modal { background: var(--card); border-radius: 12px; padding: 20px; width: 100%; max-width: 420px; }
.modal h3 { margin: 0 0 6px; }
.modal .row.end { margin-top: 18px; }

@media (max-width: 600px) {
  main { padding: 14px 12px 60px; }
  .card { padding: 14px; }
  .task { flex-direction: column; }
  .task .actions { align-self: flex-end; }
  header.top .who { order: 3; width: 100%; }
}
