:root {
  --bg: #f2f2ef;
  --surface: #ffffff;
  --surface-soft: #f3f3ef;
  --surface-warm: #fff7d6;
  --line: #ddddda;
  --line-strong: #b8b8b2;
  --text: #171717;
  --muted: #66665f;
  --brand: #fbb800;
  --brand-hover: #dda300;
  --brand-ink: #000000;
  --brand-2: #805d00;
  --blue: #1d4ed8;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --warning: #a15c07;
  --warning-soft: #fef0c7;
  --success: #067647;
  --success-soft: #dcfae6;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --font: "Gotham", "Avenir Next", "Montserrat", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.loading-screen,
.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #000000 0%, #151515 54%, #fbb800 54%, #fbb800 100%);
}

.loading-card { width: min(520px, 100%); display: grid; gap: 16px; padding: 28px; border-radius: 18px; background: #ffffff; box-shadow: var(--shadow); }
.loading-card h1, .loading-card p { margin: 0; }
.loading-card h1 { font-size: 1.6rem; }
.loading-card p { color: var(--muted); }
.loading-card .primary-button { justify-self: start; }

.login-card {
  display: grid;
  gap: 14px;
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-card h1 {
  font-size: 2rem;
}

.login-card p {
  color: var(--muted);
  line-height: 1.45;
}

.user-migration-status {
  margin: 0;
  color: #ffd45c;
  font-size: 0.78rem;
  line-height: 1.4;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: #000000;
  color: #f8faf7;
}

.brand {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-logo {
  display: block;
  width: min(100%, 210px);
  height: auto;
  object-fit: contain;
}

.brand-logo-primary {
  width: 190px;
}

.brand-logo-dark {
  width: 210px;
}

.login-card .brand-logo {
  margin-bottom: 2px;
}

.brand-kicker,
.eyebrow,
.panel-label,
.section-kicker {
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-kicker {
  color: var(--brand);
}

.login-card .brand-kicker {
  color: #735500;
}

.brand h1,
.topbar h2,
.section-header h3,
.department-header h3,
.minute-card h3 {
  margin: 0;
  line-height: 1.08;
}

.brand h1 {
  font-size: 1.8rem;
  font-weight: 800;
}

.brand p,
.sidebar-panel p {
  margin: 0;
  color: rgba(248, 250, 247, 0.72);
  line-height: 1.45;
}

.nav {
  display: grid;
  gap: 6px;
}

.platform-nav { display: grid; gap: 6px; padding: 12px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--radius); background: rgba(255, 255, 255, 0.05); }
.platform-nav-label { margin-bottom: 3px; color: var(--brand); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.platform-nav-link { display: block; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--radius); color: #f8faf7; font-weight: 800; text-decoration: none; }
.platform-nav-link:hover, .platform-nav-link:focus-visible, .platform-nav-link.is-current { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); outline: none; }

.nav-button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #f8faf7;
  font: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.nav-button:hover,
.nav-button:focus-visible,
.nav-button.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  outline: none;
}

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

.nav-button small {
  color: rgba(248, 250, 247, 0.62);
}

.nav-button:hover small,
.nav-button:focus-visible small,
.nav-button.is-active small {
  color: rgba(0, 0, 0, 0.66);
}

.module-link {
  margin-top: 4px;
  border-color: rgba(251, 184, 0, 0.52);
}

.sidebar-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.user-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(251, 184, 0, 0.48);
  border-radius: var(--radius);
  background: rgba(251, 184, 0, 0.1);
}

.user-panel strong,
.user-panel p {
  margin: 0;
}

.user-panel p {
  color: rgba(248, 250, 247, 0.72);
}

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

.ghost-dark-button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #f8faf7;
  font-size: 0.82rem;
  font-weight: 800;
}

.ghost-dark-button:hover,
.ghost-dark-button:focus-visible {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  outline: none;
}

.sidebar-panel strong {
  font-size: 1rem;
}

.compact-metrics {
  margin-top: auto;
}

.compact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(248, 250, 247, 0.78);
}

.compact-row strong {
  color: #ffffff;
}

.compact-button {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  font: inherit;
  text-align: left;
}

.compact-button:hover,
.compact-button:focus-visible {
  color: #ffffff;
  outline: none;
}

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

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.topbar .eyebrow {
  display: block;
  margin-bottom: 6px;
  padding-left: 8px;
  border-left: 4px solid var(--brand);
  color: #4b4b46;
}

.topbar h2 {
  font-size: 2rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 42px;
  border-radius: var(--radius);
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  padding: 0 14px;
}

.primary-button:hover,
.primary-button:focus-visible {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
  outline: none;
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: var(--line-strong);
  background: #f8faf8;
  outline: none;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 1.35rem;
}

.search-box,
.select-box,
.date-box {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-box input,
.select-box select,
.date-box input,
.field input,
.field select,
.field textarea,
.inline-status {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.field textarea {
  min-height: 96px;
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

.search-box input {
  width: min(360px, 54vw);
  padding: 0 12px;
}

.select-box select {
  min-width: 170px;
  padding: 0 10px;
}

.date-box input {
  min-width: 160px;
  padding: 0 10px;
}

.responsible-filter select {
  min-width: 230px;
}

.responsible-focus {
  display: block;
  color: var(--text);
  font-weight: 800;
}

.responsible-source {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card,
.minute-card,
.view-panel,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  color: var(--text);
  text-align: left;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-card span {
  font-weight: 800;
}

.metric-card strong {
  font-size: 1.65rem;
}

button.metric-card:hover,
button.metric-card:focus-visible,
button.metric-card.is-active {
  border-color: var(--brand);
  background: #fff9e3;
  outline: none;
}

.view-panel {
  padding: 16px;
}

.section-header,
.department-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

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

.section-header.with-margin {
  margin-top: 18px;
}

.section-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
}

.department-header {
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

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

.counter,
.record-id,
.status-pill,
.department-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 800;
}

.counter {
  padding: 0 10px;
  background: var(--brand);
  color: var(--brand-ink);
}

.minute-list {
  display: grid;
  gap: 12px;
}

.minute-card {
  padding: 14px;
  box-shadow: none;
}

.minute-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.minute-date {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
  white-space: nowrap;
}

.minute-date span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.minute-card time {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.record-id {
  margin-bottom: 7px;
  padding: 0 9px;
  background: var(--surface-warm);
  color: var(--brand-2);
}

.minute-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  color: var(--muted);
}

.minute-meta span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.minute-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.minute-status-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.status-pill.is-active {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.compact-toggle {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.minute-card.is-collapsed {
  padding: 11px 12px;
}

.minute-card.is-collapsed header {
  align-items: center;
}

.minute-card.is-collapsed .record-id {
  margin-bottom: 5px;
}

.minute-card.is-collapsed .minute-meta {
  margin: 8px 0;
}

.minute-card.is-collapsed .minute-meta span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.minute-card.is-collapsed .minute-statuses {
  margin-bottom: 0;
}

.minute-card.is-collapsed .minute-columns {
  display: none;
}

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

.minute-columns section {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.minute-columns h4 {
  margin: 0 0 8px;
}

.minute-columns ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 1780px;
  border-collapse: collapse;
  background: #ffffff;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff1b8;
  color: #24200f;
}

td {
  line-height: 1.36;
}

.action-date-cell {
  min-width: 112px;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.table-heading {
  display: grid;
  gap: 3px;
  min-width: 104px;
}

.sort-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.sort-header:hover,
.sort-header:focus-visible,
.sort-header.is-active {
  color: #6d5000;
  outline: none;
}

.sort-arrow {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ffffff;
  color: #6d5000;
  font-weight: 900;
}

.table-heading strong {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.table-heading span {
  color: #6d5000;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.15;
}

.table-heading small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

tbody tr:hover {
  background: #fbfdfb;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.department-pill {
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--accent), white 58%);
  background: color-mix(in srgb, var(--accent), white 88%);
  color: color-mix(in srgb, var(--accent), black 16%);
}

.status-pill {
  padding: 0 9px;
}

.priority-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.priority-low {
  background: #edf3ef;
  color: var(--muted);
}

.priority-medium {
  background: #eaf0ff;
  color: var(--blue);
}

.priority-high {
  background: var(--warning-soft);
  color: var(--warning);
}

.priority-critical {
  background: var(--danger-soft);
  color: var(--danger);
}

.inline-status {
  min-width: 172px;
  padding: 0 8px;
  border-width: 2px;
  font-weight: 800;
}

.edit-row-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #5f4600;
  font-weight: 800;
  padding: 0 12px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 96px;
}

.delete-row-button {
  min-height: 36px;
  border: 1px solid #f3b8b2;
  border-radius: var(--radius);
  background: #fff4f2;
  color: var(--danger);
  font-weight: 800;
  padding: 0 12px;
}

.delete-row-button:hover,
.delete-row-button:focus-visible {
  border-color: var(--danger);
  background: var(--danger-soft);
  outline: none;
}

.completion-date {
  display: block;
  margin-top: 6px;
  color: var(--success);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.edit-row-button:hover,
.edit-row-button:focus-visible {
  border-color: var(--brand);
  background: #fff8d9;
  outline: none;
}

.history-row-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  color: var(--text);
  font-weight: 800;
  padding: 0 12px;
}

.history-row-button:hover,
.history-row-button:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
}

.locked-row {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.inline-status:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.status-planned {
  background: #eaf0ff;
  color: var(--blue);
}

.status-progress {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-waiting {
  background: #f3e8ff;
  color: #7e22ce;
}

.status-overdue {
  background: #fff1f2;
  color: #be123c;
}

.status-blocked {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-done {
  background: var(--success-soft);
  color: var(--success);
}

.status-cancelled {
  background: #f1f3f5;
  color: #495057;
}

.status-duplicate {
  background: #fff4e6;
  color: #b45309;
}

.completed-header {
  align-items: flex-end;
  background: var(--success-soft);
}

.completed-header p {
  max-width: 720px;
  margin: 7px 0 0;
  color: #31624a;
  line-height: 1.45;
}

.empty-state {
  padding: 28px;
  text-align: center;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state p {
  margin-top: 8px;
  color: var(--muted);
}

.compact-empty {
  box-shadow: none;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.modal {
  width: min(840px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: transparent;
}

.inator-modal {
  width: min(1040px, calc(100vw - 28px));
}

.admin-passwords-modal {
  width: min(1200px, calc(100vw - 28px));
}
.admin-passwords-modal .modal-card { max-height: 92dvh; overflow: auto; }

.modal::backdrop {
  background: rgba(15, 23, 18, 0.55);
}

.modal-card {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(31, 41, 51, 0.24);
}

.modal-header,
.modal-footer,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h3 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.modal-footer {
  color: var(--muted);
  font-size: 0.9rem;
}

.modal-actions {
  justify-content: flex-end;
}

.inator-layout {
  display: grid;
  gap: 14px;
}

.json-textarea {
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111a14;
  color: #ecfdf3;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  padding: 14px;
  resize: vertical;
}

.json-textarea::placeholder {
  color: rgba(236, 253, 243, 0.55);
}

.inator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inator-actions .primary-button:disabled {
  border-color: var(--line);
  background: #d9ded8;
  color: var(--muted);
  cursor: not-allowed;
}

.inator-feedback {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf8;
}

.inator-feedback ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.inator-feedback.is-error {
  border-color: #f3b8b2;
  background: #fff4f2;
  color: var(--danger);
}

.inator-feedback.is-success {
  border-color: #acdcbf;
  background: #f0fdf4;
  color: var(--success);
}

.inator-feedback strong {
  color: var(--warning);
}

.inator-preview {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.inator-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.inator-preview-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.inator-preview-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inator-preview-card h4 {
  margin: 0;
  line-height: 1.25;
}

.inator-preview-card dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.inator-preview-card dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.inator-preview-card dt {
  color: var(--muted);
  font-weight: 800;
}

.inator-preview-card dd {
  margin: 0;
}

.preview-warning {
  margin: 0;
  color: var(--warning);
  font-size: 0.9rem;
}

.edits-list {
  display: grid;
  gap: 10px;
  max-height: min(62vh, 560px);
  overflow: auto;
}

.edit-record {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.edit-record header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.edit-record header div {
  display: grid;
  gap: 2px;
}

.edit-record header span,
.edit-record small,
.edit-record time {
  color: var(--muted);
}

.edit-record time {
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 800;
}

.edit-record ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.edit-record li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius);
  background: #ffffff;
}

.edit-record li span {
  color: var(--muted);
  font-weight: 800;
}

.edit-record li em {
  color: var(--danger);
  font-style: normal;
}

.edit-record li strong {
  color: var(--success);
}

.form-error {
  padding: 10px 12px;
  border: 1px solid #f3b8b2;
  border-radius: var(--radius);
  background: #fff4f2;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 800;
}

.form-success,
.security-note {
  padding: 12px;
  border-radius: var(--radius);
  line-height: 1.45;
}

.form-success {
  border: 1px solid #8ed7b5;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 800;
}

.security-note {
  display: grid;
  gap: 4px;
  border: 1px solid #f1d277;
  background: var(--surface-warm);
  color: var(--muted);
  font-size: 0.9rem;
}

.security-note strong {
  color: var(--text);
}

.temporary-password-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  padding: 0 12px;
}

.field-wide {
  grid-column: 1 / -1;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

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

  .compact-metrics {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .main-content,
  .sidebar {
    padding: 14px;
  }

  .topbar,
  .section-header,
  .department-header,
  .minute-card header {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    justify-content: stretch;
  }

  .search-box,
  .select-box,
  .date-box,
  .search-box input,
  .select-box select,
  .date-box input,
  .toolbar .primary-button,
  .toolbar .ghost-button {
    width: 100%;
  }

  .summary-grid,
  .minute-columns,
  .form-grid,
  .inator-preview-list {
    grid-template-columns: 1fr;
  }

  .inator-actions .primary-button,
  .inator-actions .ghost-button {
    width: 100%;
  }

  .summary-actions {
    justify-content: stretch;
  }

  .section-actions {
    justify-content: stretch;
  }

  .section-actions .counter,
  .section-actions .compact-toggle {
    width: 100%;
    justify-content: center;
  }

  .summary-actions .ghost-button,
  .summary-actions .counter {
    width: 100%;
    justify-content: center;
  }

  .field-wide {
    grid-column: auto;
  }

  .modal-header,
  .modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-actions {
    width: 100%;
  }

  .modal-actions .primary-button,
  .modal-actions .ghost-button {
    flex: 1;
  }

  .edit-record header {
    align-items: stretch;
    flex-direction: column;
  }

  .edit-record li {
    grid-template-columns: 1fr;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .topbar h2 {
    font-size: 1.55rem;
  }
}
.admin-access-panel { margin: 1rem 0; padding: 1rem; border: 1px solid #deded8; border-radius: 12px; max-height: 42vh; overflow: auto; }
.admin-access-panel h4 { margin: 0 0 .4rem; }
.admin-access-panel p { color: #67675f; margin: 0 0 .75rem; }
.admin-access-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-top: 1px solid #e5e5df; }
.admin-access-row div { min-width: 0; }
.admin-access-row small { display: block; overflow-wrap: anywhere; color: #67675f; }
.admin-access-row label { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.access-matrix-wrap { overflow: auto; max-height: 48vh; border: 1px solid #deded8; border-radius: 10px; margin-top: .75rem; }
.access-matrix { border-collapse: separate; border-spacing: 0; min-width: max-content; width: 100%; }
.access-matrix th, .access-matrix td { padding: .65rem .7rem; border-bottom: 1px solid #e5e5df; text-align: center; background: #fff; }
.access-matrix thead th { position: sticky; top: 0; z-index: 2; background: #f3f3ed; font-size: .78rem; }
.access-matrix th:first-child { position: sticky; left: 0; z-index: 1; text-align: left; min-width: 195px; max-width: 245px; box-shadow: 1px 0 #deded8; }
.access-matrix thead th:first-child { z-index: 3; }
.access-matrix tbody tr:nth-child(even) th, .access-matrix tbody tr:nth-child(even) td { background: #fafaf7; }
.access-matrix small { display: block; color: #67675f; font-weight: normal; overflow-wrap: anywhere; }
.access-matrix input[type="checkbox"] { width: 22px; height: 22px; accent-color: #0b6942; cursor: pointer; }
.access-matrix input[type="checkbox"]:disabled { cursor: not-allowed; }
.admin-access-panel { max-height: none; overflow: visible; }
@media (max-width: 760px) { .admin-access-row { align-items: flex-start; flex-direction: column; } .admin-passwords-modal .modal-card { max-height: 92dvh; overflow: auto; } }
