.auth-body {
  min-height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(33,115,70,.18), transparent),
    #e9e8e6;
  overflow: auto;
}
.auth-card {
  width: 420px;
  max-width: calc(100% - 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 28px 22px;
  box-shadow: var(--shadow-md);
}
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.auth-card h1 { margin: 2px 0 0; font-size: 22px; }
.auth-lead { color: var(--muted); font-size: 13px; margin: 10px 0 16px; }
.auth-card label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin: 10px 0 4px; }
.auth-card input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: 13px var(--font);
}
.auth-card .btn { width: 100%; margin-top: 14px; padding: 9px 16px; }
.auth-err { color: #a4262c; font-size: 12px; margin: 10px 0 0; }
.pwd-modal { width: min(440px, 100%); }
.pwd-form { padding: 16px 22px 22px; }
.pwd-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pwd-form .btn { margin-top: 0; }

.acct { text-align: right; line-height: 1.2; margin-right: 8px; }
.acct-name { display: block; font-size: 12px; font-weight: 700; }
.acct-role { display: block; font-size: 10px; opacity: .8; }
.acct-link {
  color: #fff;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 4px;
  padding: 5px 9px;
  font: 600 11px var(--font);
  text-decoration: none;
  cursor: pointer;
}
.acct-link:hover { background: rgba(255,255,255,.24); }
.acct-users {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.acct-users svg { display: block; }

.users-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(32,31,30,.45);
  z-index: 90;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.users-bg.open { display: flex; }
.users-modal {
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.users-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--grid);
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}
.users-head h2 { margin: 0 0 4px; font-size: 20px; }
.users-head p { margin: 0; color: var(--muted); font-size: 13px; }
.users-close {
  border: 1px solid var(--line);
  background: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
}
.users-close:hover { background: #f3f2f1; }
.users-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  min-height: 420px;
}
.users-list { padding: 16px 18px 18px; min-width: 0; }
.users-sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.users-sec-head h3,
.users-side h3 { margin: 0 0 10px; font-size: 14px; }
.users-sec-head span { font-size: 12px; color: var(--muted); font-weight: 700; }
.users-table-wrap { overflow: auto; max-height: 520px; }
.users-side {
  border-left: 1px solid var(--grid);
  padding: 16px 18px 20px;
  background: #faf9f8;
}
.users-side .admin-form + .admin-form {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--grid);
}
.users-modal .admin-msg { margin: 0 22px 16px; }
@media (max-width: 860px) {
  .users-body { grid-template-columns: 1fr; }
  .users-side { border-left: 0; border-top: 1px solid var(--grid); }
}

.admin-body {
  height: 100%;
  overflow: hidden;
  background: #f6f7f8;
  display: flex;
  flex-direction: column;
}
.admin-body .titlebar {
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
}
.admin-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px 36px 56px;
  max-width: none;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.admin-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.admin-top h1 { margin: 0 0 4px; font-size: 26px; }
.admin-top p { margin: 0; color: var(--muted); }
.admin-card { margin-bottom: 16px; }
.admin-card h2 { margin: 0 0 8px; font-size: 16px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.admin-form label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin: 8px 0 4px; }
.admin-form input, .admin-form select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: 13px var(--font);
}
.admin-form .btn { margin-top: 12px; }
.hint { font-size: 12px; color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--grid); font-size: 12px; }
.admin-table th { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: #484644; }
.admin-table .ops { white-space: nowrap; }
.admin-table .ops button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 3px;
  padding: 3px 7px;
  font: 11px var(--font);
  cursor: pointer;
  margin-left: 4px;
}
.admin-msg { margin-top: 12px; font-size: 13px; }
.admin-msg.ok { color: #217346; }
.admin-msg.bad { color: #a4262c; }

.dash-panel.card,
.dash-panel { background: transparent; padding: 0; border: 0; box-shadow: none; }
.dash-panel .hint { display: none; }
.dash-ui { color: var(--ink); }
.dash-view { padding: 20px 28px 56px !important; background: #f6f7f8 !important; }

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.dash-kpis-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dash-kpi {
  border: 0;
  border-radius: 16px;
  padding: 16px 16px 18px;
  min-height: 96px;
  box-shadow: 0 10px 24px rgba(16,24,20,.08);
  position: relative;
  overflow: hidden;
  color: #fff;
}
.dash-kpi.overall { background: linear-gradient(160deg, #2d8a56, #185a36); }
.dash-kpi.todo, .dash-kpi.late { background: linear-gradient(160deg, #e85d61, #d13438); }
.dash-kpi.doing, .dash-kpi.soon { background: linear-gradient(160deg, #f1c40f, #e67e22); color: #3d2a00; }
.dash-kpi.done { background: linear-gradient(160deg, #2d8a56, #0b6a0b); }
.dash-kpi.high { background: linear-gradient(160deg, #7b4fb0, #5c2d91); }
.dash-kpi b { display: block; font-size: 32px; line-height: 1; letter-spacing: -.03em; margin-top: 10px; color: inherit; }
.dash-kpi span {
  font-size: 10px;
  color: inherit;
  opacity: .85;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
button.dash-kpi {
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: transform .15s ease, box-shadow .15s ease;
}
button.dash-kpi:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(16,24,20,.08); }

.dash-bar {
  height: 8px;
  background: #f3f2f1;
  border-radius: 6px;
  overflow: hidden;
  margin: 12px 0 0;
}
.dash-bar i { display: block; height: 100%; border-radius: 6px; }
.dash-people { display: flex; flex-direction: column; gap: 8px; }
.dash-person {
  background: #fff;
  border: 1px solid #eceae8;
  border-radius: 14px;
  padding: 12px 14px;
  transition: transform .15s, box-shadow .15s;
}
.dash-person.tone-idle { background: #fff5f5; border-color: #f5b4b6; }
.dash-person.tone-bad { background: #fde7e9; border-color: #d13438; }
.dash-person.tone-warn { background: #fff4d6; border-color: #e67e22; }
.dash-person.tone-ok { background: #e6f4ec; border-color: #9fd4b3; }
.dash-person:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(16,24,20,.08); }
.dash-person.open {
  box-shadow: 0 0 0 3px rgba(33,115,70,.22);
}
.dash-head {
  width: 100%;
  display: grid;
  grid-template-columns: 52px minmax(150px, 190px) 1fr auto;
  align-items: center;
  gap: 14px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.dash-av-wrap { position: relative; width: 48px; height: 48px; }
.dash-av-wrap .dash-ring { position: absolute; inset: 0; }
.dash-av-wrap .dash-av { position: absolute; inset: 8px; width: 32px; height: 32px; font-size: 11px; }
.dash-av { width: 40px; height: 40px; font-size: 13px; }
.dash-who { min-width: 0; }
.dash-who strong { display: block; font-size: 14px; }
.dash-who small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.dash-mid { min-width: 0; }
.dash-stack {
  display: flex;
  height: 8px;
  background: #eef0f1;
  border-radius: 99px;
  overflow: hidden;
}
.dash-stack i { display: block; height: 100%; }
.dash-stack .s-todo { background: var(--todo); }
.dash-stack .s-doing { background: linear-gradient(90deg, var(--doing-y), var(--doing-o)); }
.dash-stack .s-done { background: var(--done); }
.dash-pct { font-size: 20px; font-weight: 700; text-align: right; letter-spacing: -.03em; }
.dash-counts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 11px; font-weight: 700; }
.dash-counts .c-todo { color: var(--todo); }
.dash-counts .c-doing { color: var(--doing-o); }
.dash-counts .c-done { color: var(--done); }
.dash-last { margin-top: 12px; font-size: 12px; color: var(--faint); }
.dash-tasks {
  list-style: none;
  margin: 8px 0 0;
  padding: 4px 0 0;
}
.dash-tasks li {
  display: grid;
  grid-template-columns: 10px 1fr 88px 104px;
  gap: 10px;
  align-items: center;
  padding: 9px 8px;
  font-size: 13px;
  border-radius: 8px;
}
.dash-tasks li:hover { background: #f7f8f8; }
.dash-tasks .dash-cols {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.dash-tasks .dash-cols:hover { background: transparent; }
.dash-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--todo); }
.dash-tasks li.st-doing .dash-dot { background: var(--doing-o); }
.dash-tasks li.st-done .dash-dot { background: var(--done); }
.dash-tdue { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dash-st.pill {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.dash-tasks li.st-todo .dash-st.pill { background: #fde7e9; color: var(--todo); }
.dash-tasks li.st-doing .dash-st.pill { background: #fff4d6; color: #c45900; }
.dash-tasks li.st-done .dash-st.pill { background: #e6f4ec; color: var(--done); }
.dash-empty { padding: 28px; color: var(--muted); text-align: center; }

.dash-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding: 22px 26px;
  margin-bottom: 16px;
  background:
    radial-gradient(680px 220px at 100% -10%, rgba(33,115,70,.18), transparent 50%),
    radial-gradient(420px 180px at 0% 120%, rgba(230,126,34,.12), transparent 46%),
    #fff;
  border: 1px solid #eceae8;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(16,24,20,.05);
}
.dash-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-dk);
}
.dash-hero h3 { margin: 6px 0 6px; font-size: 28px; letter-spacing: -.03em; }
.dash-hero p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.dash-hero-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-hero-pills span {
  background: #f6f7f6;
  border: 1px solid #eceae8;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  color: var(--muted);
}
.dash-hero-pills b { color: var(--ink); margin-right: 4px; }
.dash-hero-gauge {
  position: relative;
  width: 92px;
  height: 92px;
  flex-shrink: 0;
}
.dash-hero-gauge .dash-ring { width: 92px; height: 92px; }
.dash-hero-gauge div {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.dash-hero-gauge b { font-size: 20px; letter-spacing: -.03em; line-height: 1; }
.dash-hero-gauge small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.dash-ring { display: block; }
.dash-ring .track { fill: none; stroke: #eef0f1; stroke-width: 5; }
.dash-ring .val { fill: none; stroke-width: 5; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 24px 24px; }

.dash-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .85fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.dash-col, .dash-detail, .dash-box {
  background: #fff;
  border: 1px solid #eceae8;
  border-radius: 16px;
  padding: 16px 16px 18px;
  box-shadow: 0 10px 28px rgba(16,24,20,.04);
}
.dash-detail { position: sticky; top: 12px; }
.dash-toolbar, .dash-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.dash-toolbar h3, .dash-box h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.dash-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dash-tools.wrap { margin: 10px 0 8px; }
.dash-chip {
  border: 1px solid #e4e2e0;
  background: #fff;
  border-radius: 999px;
  padding: 5px 11px;
  font: 600 11px var(--font);
  color: var(--muted);
  cursor: pointer;
}
.dash-chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.dash-sort {
  border: 1px solid #e4e2e0;
  border-radius: 999px;
  padding: 5px 10px;
  font: 12px var(--font);
  background: #fff;
}
.dash-detail-head { align-items: center; justify-content: flex-start; }
.dash-detail-head strong { display: block; font-size: 17px; }
.dash-detail-head small { color: var(--muted); font-size: 12px; }
.dash-counts.tight { margin: 0 0 4px; }
.dash-meta-r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dash-health {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 8px;
}
.dash-health.bad { background: #fde7e9; color: var(--todo); }
.dash-health.warn { background: #fff4d6; color: #c45900; }
.dash-health.ok { background: #e6f4ec; color: var(--done); }
.dash-health.idle { background: #f3f2f1; color: var(--muted); }
.dash-counts .c-late { color: var(--todo); }
.dash-tasks li.late .dash-tdue { color: var(--todo); font-weight: 700; }
.dash-tname em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--todo);
  font-weight: 700;
}
.dash-none { color: var(--muted); grid-template-columns: 1fr !important; }
.dash-focus {
  background: #fff;
  border: 1px solid #eceae8;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(16,24,20,.04);
}
.dash-focus-count { font-size: 12px; font-weight: 700; color: var(--muted); }
.dash-focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.dash-focus-card {
  border-radius: 14px;
  padding: 14px 14px 12px;
  color: #fff;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-focus-card.late { background: linear-gradient(160deg, #e85d61, #d13438); }
.dash-focus-card.soon { background: linear-gradient(160deg, #f1c40f, #e67e22); color: #3d2a00; }
.dash-focus-card.high { background: linear-gradient(160deg, #7b4fb0, #5c2d91); }
.dash-focus-card.todo { background: linear-gradient(160deg, #5c6bc0, #3949ab); }
.dash-focus-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .85;
}
.dash-focus-card strong { font-size: 14px; line-height: 1.3; }
.dash-focus-card span { font-size: 12px; opacity: .85; }

@media (max-width: 1180px) {
  .admin-grid { grid-template-columns: 1fr; }
  .dash-kpis, .dash-kpis-7 { grid-template-columns: 1fr 1fr; }
  .dash-main { grid-template-columns: 1fr; }
  .dash-detail { position: static; }
  .dash-head { grid-template-columns: 52px 1fr auto; }
  .dash-mid { grid-column: 1 / -1; }
  .dash-focus-grid { grid-template-columns: 1fr 1fr; }
}
