:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #17202a;
  --muted: #637083;
  --line: #d9e1ea;
  --blue: #285d9c;
  --blue-deep: #1f3f68;
  --blue-soft: #e5f0fb;
  --green: #237454;
  --green-soft: #def3e9;
  --amber: #a46816;
  --amber-soft: #fff1d1;
  --red: #b42318;
  --red-soft: #ffe2df;
  --slate: #263241;
  --slate-2: #1a2430;
  --shadow: 0 18px 44px rgba(23, 32, 42, 0.11);
  --shadow-soft: 0 10px 24px rgba(23, 32, 42, 0.07);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(243, 246, 250, 0)),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 0.92fr);
}

.login-screen.login-only {
  grid-template-columns: minmax(320px, 520px);
  place-content: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(37, 62, 99, 0.98) 0%, rgba(47, 116, 104, 0.96) 58%, rgba(139, 103, 38, 0.88) 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 18px);
}

.login-screen.login-only .login-visual {
  display: none;
}

.dashboard-visual {
  min-height: 650px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  padding: 34px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(37, 62, 99, 0.98) 0%, rgba(47, 116, 104, 0.96) 55%, rgba(139, 103, 38, 0.9) 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 18px);
  box-shadow: var(--shadow-soft);
}

.dashboard-visual .visual-shell {
  width: min(620px, 100%);
}

.login-visual {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 54px;
  background:
    linear-gradient(135deg, rgba(37, 62, 99, 0.98) 0%, rgba(47, 116, 104, 0.96) 55%, rgba(139, 103, 38, 0.9) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='920' height='720' viewBox='0 0 920 720'%3E%3Crect width='920' height='720' fill='%23eef4f9'/%3E%3Cg opacity='0.18' fill='none' stroke='%2317202a' stroke-width='2'%3E%3Cpath d='M40 96h840M40 192h840M40 288h840M40 384h840M40 480h840M40 576h840M118 40v640M254 40v640M390 40v640M526 40v640M662 40v640M798 40v640'/%3E%3C/g%3E%3Cg opacity='0.46'%3E%3Crect x='110' y='92' width='280' height='72' rx='8' fill='%23ffffff'/%3E%3Crect x='474' y='190' width='260' height='72' rx='8' fill='%23ffffff'/%3E%3Crect x='150' y='382' width='420' height='92' rx='8' fill='%23ffffff'/%3E%3Crect x='640' y='510' width='160' height='70' rx='8' fill='%23ffffff'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 32%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 18px);
  pointer-events: none;
}

.visual-shell {
  position: relative;
  width: min(560px, 100%);
  color: #fff;
}

.visual-header,
.visual-mood-card,
.visual-command-grid,
.visual-queue,
.visual-bottom-grid {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  box-shadow: 0 22px 60px rgba(10, 18, 28, 0.22);
  backdrop-filter: blur(10px);
}

.visual-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.visual-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
}

.visual-logo svg {
  width: 24px;
  height: 24px;
}

.visual-header strong {
  display: block;
  font-size: 27px;
  margin-top: 5px;
}

.visual-mood-card {
  margin-top: 14px;
  padding: 16px 18px;
  display: grid;
  gap: 5px;
  background: rgba(255, 255, 255, 0.18);
}

.visual-mood-card span {
  width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 241, 209, 0.96);
  color: #80510f;
  font-size: 12px;
  font-weight: 950;
}

.visual-mood-card strong {
  font-size: 21px;
  line-height: 1.25;
}

.visual-mood-card small {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  line-height: 1.45;
}

.mini-label,
.live-pill {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.live-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(222, 243, 233, 0.95);
  color: var(--green);
  margin-left: auto;
}

.live-pill svg {
  width: 14px;
  height: 14px;
}

.visual-command-grid {
  margin-top: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1.35fr repeat(4, minmax(0, 0.72fr));
  gap: 10px;
}

.visual-command-grid article,
.visual-queue-row,
.visual-rank p {
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--slate);
}

.visual-command-grid span,
.visual-queue span,
.visual-bars span,
.visual-rank span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.visual-main-card {
  display: grid;
  gap: 5px;
}

.visual-main-card strong,
.visual-mini-card strong {
  display: block;
  font-size: 30px;
  line-height: 1.05;
}

.visual-main-card small {
  color: var(--green);
  font-weight: 900;
}

.visual-main-card i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #58a775);
  margin-top: 6px;
}

.visual-mini-card {
  display: grid;
  align-content: space-between;
  min-height: 96px;
}

.visual-mini-card.green strong {
  color: var(--green);
}

.visual-mini-card.amber strong {
  color: var(--amber);
}

.visual-mini-card.trend {
  min-height: 96px;
}

.visual-mini-card.trend strong {
  font-size: 24px;
}

.visual-mini-card.trend.up strong {
  color: var(--green);
}

.visual-mini-card.trend.down strong {
  color: var(--amber);
}

.visual-queue {
  margin-top: 14px;
  padding: 12px;
  display: grid;
  gap: 7px;
}

.visual-queue-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 0 14px;
}

.visual-queue-row span {
  display: grid;
  gap: 2px;
}

.visual-queue-row span b {
  padding: 0;
  background: transparent;
  color: var(--slate);
  font-size: 14px;
}

.visual-queue-row span small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.visual-queue-row em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 13px;
  font-weight: 950;
  color: var(--green);
}

.visual-queue .visual-queue-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: auto;
  padding: 0 4px 4px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
}

.visual-queue .visual-queue-head span,
.visual-queue .visual-queue-head b {
  color: rgba(255, 255, 255, 0.86);
}

.visual-queue b {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
}

.visual-queue b.ok {
  background: var(--green-soft);
  color: var(--green);
}

.visual-queue b.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.visual-empty-row {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.visual-bottom-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  gap: 12px;
  padding: 12px;
}

.visual-bars {
  height: 132px;
  padding: 12px;
  display: grid;
  align-content: stretch;
}

.visual-bars > div {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 10px;
  min-height: 76px;
  margin-top: 10px;
}

.visual-bar-item {
  height: 92px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 6px;
  min-width: 0;
}

.visual-bar-item i {
  display: block;
  min-height: 8px;
  width: 100%;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #ffffff, #f9d889 46%, #58a775);
  box-shadow: 0 10px 18px rgba(10, 18, 28, 0.14);
}

.visual-bar-item small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visual-bar-item.empty {
  opacity: 0.36;
}

.visual-rank {
  display: grid;
  align-content: start;
  gap: 8px;
}

.visual-bars > span,
.visual-rank > span {
  color: rgba(255, 255, 255, 0.9);
}

.visual-rank p {
  margin: 0;
  min-height: 40px;
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.visual-rank b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
}

.visual-rank strong {
  color: var(--green);
  font-size: 13px;
}

.visual-rank p span {
  overflow: hidden;
  color: var(--slate);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-trend {
  padding: 3px 7px;
  border-radius: 999px;
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
  background: var(--blue-soft);
  color: var(--blue);
}

.rank-trend.up {
  background: var(--green-soft);
  color: var(--green);
}

.rank-trend.down {
  background: var(--amber-soft);
  color: var(--amber);
}

.login-panel {
  align-self: center;
  justify-self: center;
  width: min(480px, calc(100% - 44px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--blue);
  flex: 0 0 auto;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

.login-panel h1 {
  font-size: 34px;
  line-height: 1.1;
}

.muted {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 24px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  margin-bottom: 14px;
}

input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #7ca9d7;
  box-shadow: 0 0 0 3px rgba(40, 93, 156, 0.12);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #eef2f6;
  color: #7b8795;
  cursor: not-allowed;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

.check-label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.check-label input {
  width: 18px;
  height: 18px;
  padding: 0;
  flex: 0 0 auto;
}

textarea {
  width: 100%;
  min-height: 330px;
  resize: vertical;
  padding: 14px;
  line-height: 1.5;
}

.primary-action,
.secondary-action {
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  white-space: nowrap;
}

.primary-action {
  background: var(--blue);
  color: white;
  box-shadow: 0 10px 22px rgba(40, 93, 156, 0.18);
}

.primary-action:hover {
  background: #234f85;
}

.primary-action.success {
  background: var(--green);
  box-shadow: 0 10px 22px rgba(35, 116, 84, 0.18);
}

.primary-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.secondary-action {
  background: #fff;
  color: var(--slate);
  border-color: var(--line);
}

.secondary-action:hover {
  background: var(--surface-soft);
}

.secondary-action.danger {
  color: var(--red);
  border-color: #f2b7b1;
}

.full-width {
  width: 100%;
}

.error-text {
  min-height: 20px;
  color: var(--red);
  font-weight: 800;
}

.login-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.workspace {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, var(--slate-2), var(--slate));
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 14px 0 36px rgba(23, 32, 42, 0.12);
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-block .brand-icon {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.brand-block strong {
  display: block;
  font-size: 20px;
}

.brand-block span {
  color: #bfd5ef;
  font-size: 13px;
}

.sidebar-domain-expiry {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-domain-expiry.hidden {
  display: none;
}

.domain-expiry-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #d8fff0;
  background: rgba(107, 224, 165, 0.16);
  flex: 0 0 auto;
}

.sidebar-domain-expiry small,
.sidebar-domain-expiry span {
  display: block;
  color: #bfd5ef;
  font-size: 12px;
  line-height: 1.35;
}

.sidebar-domain-expiry strong {
  display: block;
  margin: 2px 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
}

.sidebar-domain-expiry.warning {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.12);
}

.sidebar-domain-expiry.danger {
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.14);
}

nav {
  display: grid;
  gap: 8px;
}

.nav-button {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #dce6f2;
  min-height: 44px;
  padding: 0 12px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-button.active,
.nav-button:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.nav-button span {
  font-weight: 800;
}

.sidebar-status {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-status span {
  color: #bfd5ef;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-logout {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}

.content-shell {
  padding: 24px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar h2 {
  font-size: 30px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.health-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.account-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  box-shadow: var(--shadow-soft);
}

.account-pill span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.account-pill small {
  display: block;
  color: var(--muted);
}

.password-action {
  min-height: 40px;
  white-space: nowrap;
}

.password-panel {
  margin: -6px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.password-change-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.password-change-form h3 {
  margin: 2px 0 4px;
  font-size: 19px;
}

.password-change-form span,
.password-change-form label {
  color: var(--muted);
  font-weight: 800;
}

.password-change-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.password-change-form input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 800;
}

.password-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.password-change-form .form-note {
  grid-column: 1 / -1;
  margin: 0;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.command-strip,
.panel,
.drop-panel,
.result-panel,
.report-header,
.user-toolbar,
.status-box,
.detected-grid article,
.metric-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.command-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  margin-bottom: 16px;
}

.command-strip h3 {
  font-size: 24px;
  margin-bottom: 6px;
}

.command-strip span {
  color: var(--muted);
}

.command-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.start-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.start-card {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 10px;
  text-align: left;
}

.start-card:hover,
.start-card:focus {
  border-color: #9bb9d9;
  box-shadow: 0 16px 38px rgba(40, 93, 156, 0.16);
}

.start-card svg {
  width: 34px;
  height: 34px;
  color: var(--blue);
}

.start-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.start-card strong {
  font-size: 28px;
}

.start-card small {
  color: var(--muted);
  line-height: 1.5;
}

.start-card.main-task {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.start-card.main-task svg,
.start-card.main-task span,
.start-card.main-task small {
  color: rgba(255, 255, 255, 0.88);
}

.detail-drawer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}

.detail-drawer summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.detail-drawer .metric-grid,
.detail-drawer .workflow-band {
  box-shadow: none;
  margin: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
}

.metric-grid.compact article {
  padding: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-grid article {
  padding: 18px;
  display: grid;
  gap: 7px;
}

.metric-grid article > svg {
  width: 24px;
  height: 24px;
  color: var(--blue);
}

.metric-grid span,
.detected-grid span,
.status-box span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.metric-grid strong,
.detected-grid strong,
.status-box strong {
  display: block;
  font-size: 21px;
}

.metric-grid small,
.status-box small {
  color: var(--muted);
  line-height: 1.45;
}

.workflow-band {
  margin: 16px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.workflow-band.compact {
  padding: 12px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.flow-step b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 50%;
}

.flow-step.complete b {
  background: var(--green-soft);
  color: var(--green);
}

.dashboard-layout,
.upload-layout,
.account-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 16px;
}

.domain-expiry-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #b9dac9;
  border-radius: var(--radius);
  background: #effaf4;
}

.domain-expiry-notice.warning {
  border-color: #f2cf88;
  background: #fff7df;
}

.domain-expiry-notice.danger {
  border-color: #ffb1a7;
  background: #fff0ed;
}

.domain-expiry-notice > svg {
  width: 34px;
  height: 34px;
  color: var(--green);
}

.domain-expiry-notice.warning > svg {
  color: #a66200;
}

.domain-expiry-notice.danger > svg {
  color: var(--red);
}

.domain-expiry-notice h3 {
  font-size: 18px;
  margin: 2px 0;
}

.domain-expiry-notice span {
  color: var(--muted);
  font-weight: 850;
}

.owner-sheet-banner {
  background: linear-gradient(135deg, #eef8ff, #eefaf4);
  border-color: #c7dff1;
}

.owner-sheet-panel {
  max-width: 1120px;
  margin: 0 auto;
}

.owner-sheet-open {
  text-decoration: none;
}

.owner-sheet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.owner-sheet-card,
.owner-sheet-link-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 16px;
}

.owner-sheet-card {
  display: grid;
  gap: 8px;
}

.owner-sheet-card span,
.owner-sheet-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.owner-sheet-card b {
  font-size: 24px;
}

.owner-sheet-card small,
.owner-sheet-link-card small {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.5;
}

.owner-sheet-card.source {
  background: #eff6ff;
  border-color: #c4dbf5;
}

.owner-sheet-card.summary {
  background: #effaf4;
  border-color: #bddfcb;
}

.owner-sheet-link-card {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  background: #fff8e6;
  border-color: #f2d994;
}

.owner-sheet-link-card svg {
  width: 34px;
  height: 34px;
  color: var(--amber);
}

.owner-sheet-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #f2d994;
  border-radius: var(--radius);
  background: #fff8e6;
}

.owner-sheet-note svg {
  color: var(--amber);
  margin-top: 2px;
}

.owner-sheet-note span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.55;
}

.owner-sheet-form {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.compact-head {
  margin-bottom: 12px;
}

.owner-sheet-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.owner-sheet-field-grid label {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 900;
}

.owner-sheet-field-grid label > span {
  width: max-content;
  min-width: 26px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.owner-sheet-field-grid input,
.owner-sheet-field-grid select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.owner-sheet-quality-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #bddfcb;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #effaf4, #f7fbff);
}

.owner-sheet-quality-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.owner-sheet-quality-head span,
.owner-sheet-quality-head small {
  color: var(--muted);
  font-weight: 900;
}

.owner-sheet-quality-head b {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 34px;
  line-height: 1;
}

.owner-sheet-quality-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce7f2;
}

.owner-sheet-quality-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #237454, #34a36f);
  transition: width 180ms ease;
}

.owner-sheet-quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.owner-sheet-quality-grid span {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.owner-sheet-quality-card p {
  margin: 0;
  color: var(--green);
  font-weight: 900;
  line-height: 1.45;
}

.owner-sheet-form-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 850;
  line-height: 1.5;
}

.owner-sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.owner-sheet-meta span {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

#accountsPage .account-workspace {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1120px;
  margin: 0 auto;
}

#accountsPage .account-guide {
  display: none;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sheet-settings-panel {
  grid-column: 1 / -1;
}

.domain-settings-panel {
  grid-column: 1 / -1;
}

.panel,
.drop-panel,
.result-panel,
.report-header,
.user-toolbar {
  padding: 18px;
}

.panel-head,
.report-header,
.user-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head span,
.report-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.ai-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.85;
}

.drop-panel {
  display: grid;
  gap: 14px;
}

.simple-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.simple-steps article {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.simple-steps b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.simple-steps article.active b {
  background: var(--green-soft);
  color: var(--green);
}

.simple-steps span {
  font-weight: 900;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.drop-zone {
  min-height: 150px;
  border: 2px dashed #98abc0;
  border-radius: var(--radius);
  background: #f8fbff;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  position: relative;
}

.drop-zone > svg {
  width: 34px;
  height: 34px;
  color: var(--blue);
  margin-bottom: 8px;
}

.drop-zone.dragging {
  border-color: var(--green);
  background: var(--green-soft);
}

.drop-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop-zone strong,
.drop-zone span,
.drop-zone svg {
  pointer-events: none;
}

.drop-zone span {
  color: var(--muted);
  margin-top: 4px;
}

.result-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.status-box {
  padding: 18px;
  display: grid;
  gap: 7px;
  box-shadow: none;
}

.status-box.waiting {
  background: var(--amber-soft);
  border-color: #f2cf88;
}

.status-box.ready {
  background: var(--green-soft);
  border-color: #a9dfbf;
}

.status-box.danger {
  background: var(--red-soft);
  border-color: #f3b7b0;
}

.detected-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.detected-grid article {
  padding: 14px;
  display: grid;
  gap: 6px;
  box-shadow: none;
}

.summary-section {
  max-height: 380px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.log-summary-table {
  min-width: 1040px;
}

.log-summary-table th,
.log-summary-table td {
  text-align: right;
  white-space: nowrap;
}

.log-summary-table th:first-child,
.log-summary-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  text-align: left;
}

.log-summary-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}

.log-summary-table th:first-child {
  z-index: 3;
}

.work-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #a9dfbf;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green);
  box-shadow: var(--shadow-soft);
}

.work-banner.admin-only {
  border-color: #f2cf88;
  background: var(--amber-soft);
  color: var(--amber);
}

.work-banner svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.work-banner strong {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
}

.work-banner span {
  color: inherit;
  line-height: 1.5;
}

.ranking-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.report-board {
  display: grid;
  gap: 0;
  border: 1px solid #aeb9c5;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.report-title-band {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 84px;
  padding: 16px;
  background: #2f6e70;
  color: #fff;
  text-align: center;
}

.report-title-band h3 {
  font-size: 24px;
}

.report-title-band span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 900;
  font-style: italic;
}

.report-toolbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #c8d1dc;
  background: #eef7f5;
}

.report-toolbar h3 {
  font-size: 18px;
}

.report-toolbar select {
  min-width: 128px;
  background: #fff;
}

.report-add-person,
.report-account-score {
  border-bottom: 1px solid #c8d1dc;
  background: #f8fbff;
}

.report-account-score {
  background: #fffaf0;
}

.upload-account-score {
  margin: 12px 0;
  border: 1px solid #d8caa7;
  border-radius: 8px;
  background: #fffbef;
  overflow: hidden;
}

.upload-account-score summary {
  background: #fff7dd;
}

.report-add-person summary,
.report-account-score summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: var(--blue);
  font-weight: 950;
  cursor: pointer;
}

.report-add-person summary svg,
.report-account-score summary svg {
  width: 20px;
  height: 20px;
}

.report-add-grid,
.report-account-score-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(96px, 0.36fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 0 16px 14px;
}

.report-account-score-grid {
  grid-template-columns: minmax(150px, 0.7fr) minmax(200px, 1fr) minmax(100px, 0.4fr) auto;
}

.report-add-grid label,
.report-account-score-grid label {
  margin-bottom: 0;
}

.report-person-notice {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--muted);
  font-weight: 850;
}

.report-person-notice.danger {
  color: var(--red);
}

.report-table-wrap {
  overflow-x: auto;
}

.report-table {
  min-width: 1320px;
  font-size: 13px;
}

.report-table th,
.report-table td {
  padding: 7px 8px;
  border: 1px solid #cfd6de;
  text-align: center;
  white-space: nowrap;
}

.report-table th {
  background: #173d46;
  color: #fff;
  font-size: 12px;
  text-transform: none;
}

.report-table td:nth-child(2) {
  text-align: left;
}

.report-table .top-rank-row:nth-child(1) td {
  background: #fff1bf;
}

.report-table .top-rank-row:nth-child(2) td {
  background: #eef2f6;
}

.report-table .top-rank-row:nth-child(3) td {
  background: #fbe6c7;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 950;
  text-decoration: underline;
}

.report-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  gap: 4px;
  padding-top: 34px;
  background: #fff;
}

.report-chart-panel {
  min-height: 320px;
  padding: 16px;
  border: 1px solid #aeb9c5;
  background: #fff;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.chart-head strong,
.chart-head span {
  display: block;
}

.chart-head strong {
  font-size: 17px;
  color: #263f46;
}

.chart-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.chart-legend {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 2px;
}

.horizontal-chart,
.stacked-chart {
  display: grid;
  gap: 9px;
}

.chart-row,
.stacked-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 10px;
}

.chart-row > span,
.stacked-row > span {
  color: #263f46;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.chart-track,
.stacked-track {
  height: 21px;
  background:
    repeating-linear-gradient(90deg, transparent 0 24%, rgba(128, 144, 160, 0.18) 24% 24.5%, transparent 24.5% 25%),
    #f4f7fa;
  border-left: 1px solid #cfd6de;
  overflow: hidden;
}

.chart-track i {
  min-width: 34px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  background: #168aa0;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
}

.stacked-track {
  display: flex;
}

.stacked-track i {
  height: 100%;
  display: block;
}

.chart-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed #b8c6d5;
  background: #f7fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  line-height: 1.65;
}

.brand-n789 {
  background: #2f7ed8;
}

.brand-nov {
  background: #f28a2e;
}

.brand-n68 {
  background: #3daf6b;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 1fr 128px minmax(180px, 0.8fr);
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  box-shadow: var(--shadow-soft);
}

.rank-row b {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.rank-row:nth-child(1) b {
  background: var(--amber-soft);
  color: var(--amber);
}

.rank-row:nth-child(2) b,
.rank-row:nth-child(3) b {
  background: var(--green-soft);
  color: var(--green);
}

.rank-bar {
  height: 11px;
  border-radius: 8px;
  background: #dce4ee;
  overflow: hidden;
}

.rank-bar i {
  display: block;
  height: 100%;
  background: var(--green);
}

.permission-strip,
.account-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.account-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.account-quick-entry {
  display: grid;
  gap: 12px;
  padding: 16px;
  margin: 16px 0;
  border: 1px solid #b8d8f5;
  border-radius: var(--radius);
  background: #f8fbff;
}

#accountsPage .account-quick-entry {
  gap: 16px;
  padding: 22px;
  border-color: #93bee7;
  background: #fff;
  box-shadow: 0 14px 34px rgba(40, 93, 156, 0.11);
}

.account-ai-head h3 {
  font-size: 28px;
}

.account-sheet-details {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

#accountsPage .account-sheet-details,
#accountsPage .account-target-preview {
  display: none;
}

.account-sheet-details summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 950;
  cursor: pointer;
}

.account-sheet-details summary svg {
  color: var(--blue);
}

.account-sheet-details .sheet-preview,
.account-sheet-details .action-row {
  margin-left: 14px;
  margin-right: 14px;
}

.account-sheet-details .action-row {
  margin-bottom: 14px;
}

.quick-entry-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.quick-entry-head svg {
  width: 27px;
  height: 27px;
  color: var(--blue);
  flex: 0 0 auto;
}

.quick-entry-head span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.quick-entry-head strong {
  display: block;
  margin: 2px 0 4px;
  font-size: 20px;
}

.quick-entry-head small {
  color: var(--muted);
  line-height: 1.45;
}

.difference-lock {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid #f2b7b1;
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--red);
  line-height: 1.5;
  font-weight: 850;
}

.difference-lock svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.difference-lock b {
  font-weight: 950;
}

.month-auto-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #b7dfd0;
  border-radius: var(--radius);
  background: #eefaf5;
  color: #1f6d54;
  line-height: 1.45;
  font-weight: 850;
}

.month-auto-note svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.month-auto-note b {
  font-weight: 950;
}

.entry-only-notice {
  padding: 11px 13px;
  border: 1px solid #d7e3ef;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 900;
  line-height: 1.45;
}

.account-compact-rules {
  border: 1px solid #d7e3ef;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.account-compact-rules summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--blue);
  font-weight: 950;
  list-style: none;
}

.account-compact-rules summary::-webkit-details-marker {
  display: none;
}

.account-compact-rules summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-compact-rules summary svg {
  width: 18px;
  height: 18px;
}

.account-compact-rules summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.compact-rule-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.account-compact-rules .difference-lock,
.account-compact-rules .month-auto-note,
.account-compact-rules .entry-only-notice {
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.account-compact-rules .difference-lock svg,
.account-compact-rules .month-auto-note svg {
  width: 17px;
  height: 17px;
}

.account-quick-entry textarea {
  min-height: 180px;
  background: var(--surface);
}

#accountsPage .account-quick-entry textarea {
  min-height: 315px;
  font-size: 16px;
  line-height: 1.65;
  border-color: #b8d8f5;
}

.slip-drop {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px dashed #88aacd;
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.slip-drop:hover {
  border-color: var(--blue);
  background: #f4f9ff;
}

.slip-drop.dragging {
  border-color: var(--green);
  background: #effaf5;
  box-shadow: 0 0 0 4px rgba(33, 133, 91, 0.12);
}

.slip-drop input {
  display: none;
}

.slip-drop svg {
  width: 26px;
  height: 26px;
  color: var(--blue);
  flex: 0 0 auto;
}

.slip-drop b,
.slip-drop small {
  display: block;
}

.slip-drop small {
  color: var(--muted);
  line-height: 1.45;
}

.slip-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
}

.slip-preview.hidden {
  display: none;
}

.slip-preview-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px 1fr 34px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #d8e6f2;
  border-radius: 8px;
  background: #f8fbff;
}

.slip-preview-thumb {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: #e7f0f8;
  color: var(--blue);
}

.slip-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slip-preview-thumb svg {
  width: 22px;
  height: 22px;
}

.slip-preview-detail {
  min-width: 0;
}

.slip-preview-detail b,
.slip-preview-detail small {
  display: block;
}

.slip-preview-detail b {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slip-preview-detail small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.slip-remove-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #f0c9c4;
  border-radius: 8px;
  background: #fff6f5;
  color: #b53d33;
  cursor: pointer;
}

.slip-remove-button:hover {
  background: #ffe8e5;
}

.slip-remove-button svg {
  width: 16px;
  height: 16px;
}

.advanced-account-details {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.advanced-account-details summary,
.account-tool-details summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 950;
  cursor: pointer;
}

.advanced-account-details summary svg,
.account-tool-details summary svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.account-tool-details {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.account-tool-details[open] {
  padding-bottom: 12px;
}

.account-tool-details[open] summary {
  color: var(--ink);
}

.account-tool-details .sheet-map,
.account-tool-details .account-rule-result,
.account-history-list {
  margin: 0 12px;
}

.account-history-list {
  display: grid;
  gap: 8px;
}

.account-history-empty {
  display: block;
  padding: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.account-history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.account-history-item b,
.account-history-item small {
  display: block;
}

.account-history-item small {
  color: var(--muted);
  line-height: 1.45;
}

.account-history-item .account-history-note {
  margin-top: 6px;
  padding: 7px 9px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
}

.account-history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-history-readonly {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.ledger-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 12px 12px;
}

.ledger-tabs button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--slate);
  font-weight: 950;
}

.ledger-tabs button.active {
  border-color: #2f6e70;
  background: #e2f2ec;
  color: #1f6f50;
}

.account-ledger-board {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(620px, 1.08fr);
  gap: 12px;
  align-items: start;
  margin: 0 12px;
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-gutter: stable;
}

.ledger-panel {
  min-width: 560px;
  border: 1px solid #bfc7d1;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.ledger-panel h3 {
  margin: 0;
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 4px 10px;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0;
  border-bottom: 1px solid #cfd6de;
}

.ledger-panel.income h3 {
  background: #dcefd8;
}

.ledger-panel.expense h3 {
  background: #f5cccc;
}

.ledger-report-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  min-height: 30px;
  padding: 4px 12px;
  border-bottom: 1px solid #d7dde5;
  font-size: 12px;
  font-weight: 900;
}

.ledger-expense-total {
  background: #fff8f8;
}

.ledger-top {
  min-height: 238px;
  display: grid;
  grid-template-columns: minmax(270px, 0.95fr) minmax(190px, 0.75fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-bottom: 1px solid #d7dde5;
}

.ledger-income-top {
  align-items: stretch;
}

.ledger-visual-stack {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  min-width: 0;
}

.ledger-income-disc {
  width: 150px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #4d8df7 0%, #3f7fe4 72%, #2863bd 100%);
  box-shadow: 0 12px 0 #2f5fa9, 0 18px 18px rgba(31, 67, 123, 0.2);
  color: #fff;
  text-align: center;
  font-size: 11px;
  font-weight: 950;
}

.ledger-breakdown {
  width: 100%;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.ledger-pie {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(#f4716c 0 calc(var(--expense) * 1%), #43b7aa 0 100%);
  box-shadow: inset -9px -10px 0 rgba(21, 41, 73, 0.17), 0 12px 18px rgba(15, 23, 42, 0.12);
}

.ledger-pie span {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  text-align: center;
  font-size: 11px;
  font-weight: 950;
}

.ledger-chart-labels {
  display: grid;
  gap: 4px;
  font-size: 11px;
}

.ledger-chart-labels div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #e5e7eb;
  padding: 2px 0;
}

.ledger-summary-box {
  display: grid;
  align-content: center;
  gap: 0;
  min-width: 0;
}

.ledger-summary-box div,
.ledger-summary-wide,
.ledger-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 26px;
  align-items: center;
  padding: 4px 8px;
  font-size: 12px;
}

.ledger-summary-box div:nth-child(1),
.ledger-summary-row:nth-child(odd) {
  background: #dff0db;
}

.ledger-summary-box div:nth-child(2),
.ledger-summary-row:nth-child(even) {
  background: #fde2da;
}

.ledger-summary-box div:nth-child(3) {
  background: #d8e6f5;
}

.ledger-summary-row.is-zero {
  color: #6b7280;
}

.ledger-summary-box span,
.ledger-summary-wide span,
.ledger-summary-row span {
  color: #111827;
}

.ledger-summary-box b,
.ledger-summary-wide b,
.ledger-summary-row b {
  font-weight: 950;
}

.expense-top {
  grid-template-columns: 1fr;
  align-content: start;
  gap: 10px;
  padding-top: 10px;
}

.ledger-summary-wide {
  justify-content: flex-end;
  background: #fff;
  gap: 40px;
  font-weight: 900;
}

.ledger-expense-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.ledger-expense-breakdown {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.ledger-expense-pie {
  width: 128px;
  height: 128px;
  justify-self: center;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset -9px -10px 0 rgba(21, 41, 73, 0.16), 0 12px 18px rgba(15, 23, 42, 0.12);
}

.ledger-expense-pie span {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  text-align: center;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.25;
}

.ledger-expense-category-list {
  max-height: 172px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.ledger-category-row {
  display: grid;
  grid-template-columns: 10px minmax(78px, 1fr) 44px 74px;
  grid-template-rows: auto 5px;
  align-items: center;
  gap: 3px 8px;
  font-size: 11px;
}

.ledger-category-row b,
.ledger-category-row small {
  text-align: right;
  white-space: nowrap;
}

.ledger-category-row small {
  color: #64748b;
  font-weight: 800;
}

.ledger-category-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--cat-color);
}

.ledger-category-name {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-category-row i {
  grid-column: 2 / 5;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--cat-color) 0 calc(var(--cat-percent) * 1%), #e2e8f0 0 100%);
}

.ledger-mini-table {
  height: clamp(220px, 30vh, 320px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  background: #fff;
  border-top: 1px solid #d7d7d7;
}

.ledger-table-caption {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 24px;
  display: flex;
  align-items: center;
  padding: 3px 8px;
  background: #fff2bf;
  border-bottom: 1px solid #d6d6d6;
  color: #111827;
  font-size: 12px;
  font-weight: 950;
}

.ledger-mini-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 11px;
}

.ledger-mini-table th,
.ledger-mini-table td {
  padding: 4px 7px;
  border: 1px solid #d7d7d7;
  line-height: 1.35;
}

.ledger-mini-table th {
  position: sticky;
  top: 24px;
  z-index: 1;
  background: #fff2bf;
  color: #111827;
  text-transform: none;
}

.ledger-mini-table tr:nth-child(even) td {
  background: #fafafa;
}

.ledger-mini-table td:nth-child(3),
.ledger-mini-table td:nth-child(5) {
  text-align: right;
  white-space: nowrap;
}

.ledger-mini-table td:nth-child(2) {
  min-width: 360px;
}

.account-ledger-board::-webkit-scrollbar,
.ledger-mini-table::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.account-ledger-board::-webkit-scrollbar-track,
.ledger-mini-table::-webkit-scrollbar-track {
  background: #eef2f6;
  border-radius: 999px;
}

.account-ledger-board::-webkit-scrollbar-thumb,
.ledger-mini-table::-webkit-scrollbar-thumb {
  background: #8aa0b7;
  border: 3px solid #eef2f6;
  border-radius: 999px;
}

.account-ledger-board::-webkit-scrollbar-thumb:hover,
.ledger-mini-table::-webkit-scrollbar-thumb:hover {
  background: #657d96;
}

.advanced-account-details[open] {
  padding-bottom: 14px;
}

.advanced-account-details[open] summary {
  color: var(--ink);
}

.advanced-account-details .account-mode-tabs,
.advanced-account-details .account-form-grid {
  margin-left: 14px;
  margin-right: 14px;
}

.quick-result {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

#accountsPage .quick-result {
  padding: 16px;
}

.quick-result.ready {
  border-color: #a9dfbf;
  background: var(--green-soft);
}

.quick-result.warning {
  border-color: #f2cf88;
  background: var(--amber-soft);
}

.quick-result strong {
  display: block;
  font-size: 17px;
}

.quick-result span {
  color: var(--muted);
  line-height: 1.45;
}

.quick-item-list {
  display: grid;
  gap: 8px;
}

.quick-item-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.quick-item-button:hover {
  border-color: #a9dfbf;
  background: #fff;
}

.quick-item-button.needs-attention {
  border-color: #f2cf88;
  background: #fffaf0;
}

.quick-item-button b {
  display: block;
  margin-bottom: 3px;
}

.quick-item-button small {
  color: var(--muted);
  line-height: 1.4;
}

.quick-item-button em {
  min-width: 90px;
  font-style: normal;
  font-weight: 950;
  text-align: right;
  color: var(--blue);
}

.sheet-submit-status {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #a9dfbf;
  border-radius: var(--radius);
  background: #fff;
}

.sheet-submit-status.warning {
  border-color: #f2cf88;
  background: #fffaf0;
}

.sheet-submit-status b {
  color: var(--ink);
}

.sheet-submit-status small {
  color: var(--muted);
  line-height: 1.45;
}

.account-mode-tabs button {
  min-height: 92px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.account-mode-tabs button:hover,
.account-mode-tabs button.active {
  border-color: #a9dfbf;
  background: var(--green-soft);
}

.account-mode-tabs svg {
  width: 23px;
  height: 23px;
  color: var(--blue);
}

.account-mode-tabs button.active svg {
  color: var(--green);
}

.account-mode-tabs span {
  font-weight: 950;
}

.account-mode-tabs small {
  color: var(--muted);
  font-weight: 800;
}

.sheet-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.account-field {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.account-field.hidden-field {
  display: none;
}

.account-field .field-code {
  width: fit-content;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.account-field b {
  display: block;
}

.account-field small {
  color: var(--muted);
  line-height: 1.4;
}

.account-field input,
.account-field select {
  width: 100%;
}

.account-field.check-label {
  min-height: 96px;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
}

.account-field.check-label input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.sheet-map {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin: 2px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
}

.sheet-map-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.sheet-map-head svg {
  width: 26px;
  height: 26px;
  color: var(--blue);
}

.sheet-map-head span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.sheet-map-head strong {
  display: block;
  font-size: 18px;
}

.sheet-column-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sheet-column-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.sheet-column-card b {
  display: block;
  margin-bottom: 4px;
}

.sheet-column-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 8px;
}

.sheet-column-card ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.75;
  color: var(--ink);
}

.staff-helper {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid #b8d8f5;
  border-radius: var(--radius);
  background: var(--blue-soft);
}

.staff-helper-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.staff-helper-head svg {
  width: 25px;
  height: 25px;
  color: var(--blue);
}

.staff-helper-head span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.staff-helper-head strong {
  display: block;
  font-size: 18px;
}

.staff-step-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: staff-step;
}

.staff-step-list li {
  counter-increment: staff-step;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  line-height: 1.45;
  font-weight: 850;
}

.staff-step-list li::before {
  content: counter(staff-step);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.staff-stop-rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border: 1px solid #f2cf88;
  border-radius: var(--radius);
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 900;
  line-height: 1.45;
}

.staff-stop-rule svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.permission-strip article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.permission-strip b,
.module-list b {
  display: block;
  margin-bottom: 5px;
}

.permission-strip span,
.module-list span {
  color: var(--muted);
  line-height: 1.45;
}

.user-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.user-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.user-form-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.user-form .form-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.user-form .form-note.danger {
  color: var(--red);
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.table-action {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.table-action.danger {
  color: var(--red);
  border-color: #ffc7c1;
  background: var(--red-soft);
}

.table-action.hard-danger {
  color: #ffffff;
  border-color: #b42318;
  background: #b42318;
}

.table-action.hard-danger:disabled {
  color: var(--red);
  border-color: #ffc7c1;
  background: var(--red-soft);
}

.table-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.role-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.role-pill {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.inactive {
  background: var(--red-soft);
  color: var(--red);
}

.account-guide {
  align-content: start;
}

.account-hidden-actions {
  display: none;
}

.account-rule-result {
  display: grid;
  gap: 7px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--amber-soft);
}

.account-rule-result span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.account-rule-result strong {
  font-size: 20px;
}

.account-rule-result small {
  color: var(--muted);
  line-height: 1.45;
}

.account-rule-result.ready {
  border-color: #a9dfbf;
  background: var(--green-soft);
}

.account-rule-result.danger {
  border-color: #f3b7b0;
  background: var(--red-soft);
}

.account-rule-result ul {
  margin: 6px 0 0;
  padding-left: 18px;
  line-height: 1.75;
}

.rule-list article {
  background: #fff;
}

.module-list {
  display: grid;
  gap: 10px;
}

.module-list article {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.module-list svg {
  color: var(--blue);
  flex: 0 0 auto;
}

.sheet-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin: 2px 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.sheet-preview svg {
  width: 26px;
  height: 26px;
  color: var(--green);
}

.sheet-preview b {
  display: block;
  margin-bottom: 4px;
}

.sheet-preview span {
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
}

.account-target-preview {
  margin-bottom: 12px;
  border-color: #a9dfbf;
  background: var(--green-soft);
}

.disabled-link {
  opacity: 0.5;
  pointer-events: none;
}

.permission-note {
  margin: 0 0 16px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
  line-height: 1.45;
}

.permission-note.locked {
  background: var(--amber-soft);
  color: var(--amber);
}

.retention-timeline {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.retention-step,
.security-grid article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.retention-step span,
.security-grid span,
.security-note {
  color: var(--muted);
  line-height: 1.5;
}

.retention-step.active {
  border-color: #a9dfbf;
  background: var(--green-soft);
}

.retention-step.archive {
  border-color: #f2cf88;
  background: var(--amber-soft);
}

.security-grid {
  display: grid;
  gap: 10px;
}

.security-note {
  margin: 14px 0 0;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

@media (max-width: 1120px) {
  .metric-grid,
  .start-cards,
  .settings-grid,
  .account-mode-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-layout,
  .upload-layout,
  .account-workspace,
  .owner-sheet-grid,
  .owner-sheet-field-grid,
  .owner-sheet-quality-grid {
    grid-template-columns: 1fr;
  }

  .report-chart-grid {
    grid-template-columns: 1fr;
  }

  .report-add-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .password-change-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .password-change-form > div:first-child,
  .password-change-form .form-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .login-screen,
  .workspace {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 420px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-button {
    justify-content: center;
  }
}

@media (max-width: 680px) {
  .content-shell {
    padding: 14px;
  }

  .topbar,
  .topbar-actions,
  .command-strip,
  .panel-head,
  .report-header,
  .user-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid,
  .start-cards,
  .workflow-band,
  .simple-steps,
  .settings-grid,
  .permission-strip,
  .account-form-grid,
  .account-mode-tabs,
  .owner-sheet-grid,
  .owner-sheet-field-grid,
  .owner-sheet-quality-grid,
  .sheet-column-cards,
  .detected-grid,
    .visual-command-grid,
  .visual-bottom-grid,
  .user-form,
  .password-change-form {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 1fr;
  }

  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .report-add-grid {
    grid-template-columns: 1fr;
  }

  .chart-row,
  .stacked-row {
    grid-template-columns: 68px 1fr;
  }
}
