:root {
  /* Local admin-template tokens: sober, compact, and dependency-free for internal dashboards. */
  color-scheme: light;
  --bg: #eef3f8;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e2ec;
  --brand: #116466;
  --brand-2: #2c7a7b;
  --danger: #d92d20;
  --warning: #b54708;
  --success: #087443;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
  --sidebar-bg: #111827;
  --sidebar-active: rgba(45, 212, 191, 0.14);
  --surface-subtle: #f8fafc;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 32px;
  display: grid;
  gap: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 600;
}

input:not(.form-control):not(.form-check-input) {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 44px;
  padding: 10px 12px;
}

button:not(.btn) {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--brand);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.error-text {
  margin: 0;
  color: var(--danger);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar-bg);
  color: white;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar .eyebrow {
  color: #5eead4;
}

.sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 32px;
}

.sidebar a {
  color: #d9e2ec;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
}

.sidebar a.active,
.sidebar a:hover {
  background: var(--sidebar-active);
  color: white;
}

.workspace {
  padding: 28px;
  display: grid;
  gap: 20px;
}

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

#sessionInfo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #f0f9ff;
  color: #075985;
  font-size: 12px;
  font-weight: 850;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warning);
}

.dot.online {
  background: var(--success);
}

.dot.offline {
  background: var(--danger);
}

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

.executive-panel {
  display: grid;
  gap: 16px;
}

.period-chip,
.panel-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.executive-period-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(100%, 330px);
}

.executive-period-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
}

.executive-period-mode {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: #344054;
  font-weight: 900;
}

.executive-period-mode.active {
  background: #116466;
  border-color: #116466;
  color: white;
}

.executive-period-inputs {
  width: 100%;
}

.executive-period-inputs input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 11px;
  background: white;
  color: #0b1f33;
  font-weight: 900;
}

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

.executive-card {
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  align-content: space-between;
  gap: 8px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.executive-card span,
.executive-card small {
  color: var(--muted);
  font-weight: 700;
}

.executive-card strong {
  font-size: 28px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.executive-card.income {
  background: linear-gradient(180deg, #e7f8ef 0%, #d8f1e5 100%);
  border-color: #a8dec4;
}

.executive-card.expense {
  background: linear-gradient(180deg, #fff0e8 0%, #ffe1d2 100%);
  border-color: #ffc29f;
}

.executive-card.net {
  background: linear-gradient(180deg, #edf4ff 0%, #dae9ff 100%);
  border-color: #bad4ff;
}

.executive-card.attention {
  background: linear-gradient(180deg, #fff8e1 0%, #ffefb5 100%);
  border-color: #f7d56f;
}

.executive-card[role="button"] {
  cursor: pointer;
}

.executive-card[role="button"]:hover,
.executive-card[role="button"]:focus {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.14);
  outline: 2px solid rgba(17, 100, 102, 0.18);
}

.attention-panel {
  display: grid;
  gap: 12px;
}

.attention-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.attention-table {
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.attention-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #6b4f00;
  color: white;
  text-align: left;
  font-weight: 900;
}

.attention-table th,
.attention-table td {
  border-right: 1px solid #d7e0e7;
  border-bottom: 1px solid #d7e0e7;
  padding: 10px 12px;
}

.attention-table td {
  background: white;
}

.attention-table tr:nth-child(even) td {
  background: #fffdf5;
}

.attention-table .money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.issue-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff4c2;
  color: #6b4f00;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.table-action-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #0f6b6d;
  border-radius: 6px;
  color: #0f6b6d;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.decision-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
}

.decision-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
}

.decision-grid h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.decision-grid ul {
  margin: 0;
  padding-left: 18px;
  color: #344054;
}

.decision-grid li + li {
  margin-top: 7px;
}

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

.breakdown-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf2f7;
}

.breakdown-list span {
  color: var(--muted);
}

.breakdown-list strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kpi-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.kpi-card {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.kpi-card span {
  color: var(--muted);
}

.kpi-card strong {
  font-size: 32px;
}

.kpi-card.danger strong {
  color: var(--danger);
}

.split-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
}

.period-panel {
  padding: 18px;
}

.period-panel .panel-head {
  align-items: flex-start;
  margin-bottom: 12px;
}

.period-panel .panel-head button {
  min-height: 38px;
  padding: 8px 14px;
}

.period-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.period-mode {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: #344054;
  font-weight: 800;
}

.period-mode.active {
  background: #116466;
  border-color: #116466;
  color: white;
}

.period-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 360px));
  gap: 12px;
  align-items: end;
}

.stay-date-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #d6e0ea;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
}

.stay-date-title {
  color: #102a43;
  font-size: 15px;
  font-weight: 900;
}

.stay-date-copy {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.period-controls input,
.period-controls select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 44px;
  padding: 8px 11px;
  background: white;
  color: #0b1f33;
  font-size: 15px;
  font-weight: 800;
}

.panel {
  min-width: 0;
  padding: 18px;
}

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

.panel-head span {
  color: var(--muted);
  font-size: 14px;
}

.run-list,
.log-list {
  display: grid;
  gap: 10px;
}

.run-item,
.log-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.run-meta,
.log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 700;
  background: #e6f4ea;
  color: var(--success);
}

.badge.error,
.log-item.error .badge {
  background: #fef3f2;
  color: var(--danger);
}

.badge.warning,
.log-item.warning .badge {
  background: #fff7ed;
  color: var(--warning);
}

.table-wrap {
  overflow: auto;
}

.expense-panel table {
  min-width: 980px;
}

.expense-panel .money {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.workbench-panel {
  padding: 0;
}

.workbench-panel .panel-head {
  padding: 18px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
}

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

.toolbar input,
.toolbar select {
  width: min(260px, 100%);
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: white;
}

.download-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #0f6b6d;
  border-radius: 6px;
  background: #0f6b6d;
  color: white;
  font-weight: 900;
  white-space: nowrap;
}

.expense-download {
  background: #6f3f13;
  border-color: #6f3f13;
}

.sheet-wrap {
  overflow: auto;
  max-height: 620px;
  background: #f8fafc;
}

.sheet-table {
  min-width: 1640px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  line-height: 1.35;
}

.sheet-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #194d43;
  color: white;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid #0d362f;
  padding: 9px 10px;
}

.sheet-table td {
  background: white;
  border-right: 1px solid #d7e0e7;
  border-bottom: 1px solid #d7e0e7;
  height: 38px;
  padding: 6px 8px;
}

.sheet-table tr:nth-child(even) td {
  background: #fbfdfc;
}

.sheet-table .money,
.sheet-table .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sheet-table .strong {
  font-weight: 800;
}

.report-table tbody tr:hover td {
  background: #fff7d6;
}

.expense-sheet {
  min-width: 1120px;
}

.expense-sheet th {
  background: #6f3f13;
  border-bottom-color: #4b2b0f;
}

.expense-sheet .money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.cell-select,
.cell-textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #f8fafc;
  padding: 8px;
  min-height: 36px;
}

.cell-textarea {
  min-height: 42px;
  resize: vertical;
}

.cell-textarea.correction {
  min-width: 260px;
  min-height: 76px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.cell-select:focus,
.cell-textarea:focus {
  outline: 2px solid rgba(17, 100, 102, 0.2);
  border-color: var(--brand);
  background: white;
}

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

.row-actions button {
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

.row-actions .secondary {
  background: #344054;
}

.sheet-titlebar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: #f2fbf8;
}

.sheet-titlebar div:first-child {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.sheet-titlebar strong {
  color: #123f39;
  font-size: 22px;
}

.sheet-titlebar span {
  color: #194d43;
  font-weight: 700;
}

.sheet-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}

.omset-summary {
  display: grid;
  grid-template-columns: repeat(11, minmax(128px, 1fr));
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #eaf4f0;
}

.summary-cell {
  min-height: 58px;
  padding: 8px 10px;
  border-right: 1px solid #c8d8d2;
  display: grid;
  align-content: center;
  gap: 4px;
}

.summary-cell span {
  color: #194d43;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-cell strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.summary-cell.total {
  background: #d8ebe5;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #edf7f2;
  color: #126341;
  font-size: 12px;
  font-weight: 800;
}

.sheet-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  overflow-x: auto;
  padding: 0 18px 12px;
  margin-top: -12px;
}

.correction-panel,
.reports-panel {
  display: grid;
  gap: 14px;
}

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

.correction-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.correction-grid span {
  color: var(--muted);
  font-weight: 800;
}

.correction-grid strong {
  font-size: 28px;
}

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

.settings-panel {
  display: grid;
  gap: 16px;
}

.workspace.settings-only > :not(.topbar):not(#settings) {
  display: none !important;
}

.workspace.settings-only #settings {
  display: grid;
}

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

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

.settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.settings-subhead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.settings-subhead.compact {
  padding-top: 0;
  border-top: 0;
}

.settings-subhead h3,
.settings-subhead p {
  margin: 0;
}

.settings-subhead p {
  margin-top: 4px;
}

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

.settings-table {
  min-width: 720px;
}

.settings-table th {
  background: #f8fafc;
  color: #344054;
  font-weight: 900;
}

.settings-table input[type="text"],
.settings-table input:not([type]) {
  min-height: 38px;
}

.settings-table input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
}

.settings-table select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: white;
}

.pill-editor {
  display: grid;
  gap: 8px;
}

.pill-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.pill-row input {
  min-height: 38px;
  font-weight: 800;
}

.tab-button {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #475467;
  font-weight: 700;
}

.tab-button.active {
  background: #dbeafe;
  color: #0b5cab;
  border-color: #bfdbfe;
}

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

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

th {
  color: var(--muted);
  font-size: 14px;
}

.empty {
  color: var(--muted);
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 6px;
}

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

  .sidebar {
    position: static;
    height: auto;
    gap: 18px;
  }

  .kpi-grid,
  .executive-grid,
  .decision-grid,
  .correction-grid,
  .settings-grid,
  .settings-section-grid,
  .split-grid,
  .period-controls {
    grid-template-columns: 1fr;
  }

  .toolbar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .executive-period-tools {
    justify-items: stretch;
    min-width: 0;
  }

  .period-chip {
    justify-content: center;
    width: 100%;
  }
}

/* Professional dashboard polish */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --brand: #0f766e;
  --brand-2: #155e75;
  --danger: #b42318;
  --warning: #b54708;
  --success: #067647;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 14px 34px rgba(16, 24, 40, 0.06);
}

body {
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.07), transparent 34rem),
    linear-gradient(180deg, #f7fafc 0%, var(--bg) 42%);
  color: var(--ink);
}

h1 {
  color: #101828;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  color: #101828;
  font-size: clamp(21px, 1.6vw, 28px);
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  color: #101828;
  letter-spacing: 0;
}

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

input,
select,
textarea {
  border-color: #d0d5dd;
  background: #ffffff;
  color: #101828;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.12);
  border-color: #0f766e;
}

button {
  background: #0f766e;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:hover {
  background: #115e59;
}

.secondary,
.settings-card .secondary,
.settings-table .secondary {
  border: 1px solid #fecdca;
  background: #fff7f6;
  color: #b42318;
  box-shadow: none;
}

.secondary:hover,
.settings-card .secondary:hover,
.settings-table .secondary:hover {
  background: #fee4e2;
  color: #912018;
}

button:active {
  transform: translateY(1px);
}

.app-shell {
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  background: #0f172a;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 18px;
}

.sidebar > div:first-child {
  padding: 0 8px;
}

.sidebar .eyebrow {
  color: #5eead4;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.sidebar h2 {
  color: #ffffff;
  font-size: 25px;
}

.sidebar nav {
  gap: 4px;
  margin-top: 30px;
}

.sidebar a {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 750;
}

.sidebar a.active {
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(94, 234, 212, 0.2);
  color: #ffffff;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar .ghost-button {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.workspace {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 28px clamp(18px, 3vw, 40px) 44px;
  gap: 18px;
}

.topbar {
  min-height: 58px;
  margin-bottom: 2px;
}

.topbar .muted {
  margin: 8px 0 0;
  font-size: 14px;
}

.live-pill {
  min-height: 38px;
  padding: 8px 14px;
  border-color: #d0d5dd;
  background: rgba(255, 255, 255, 0.82);
  color: #475467;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.dot {
  width: 9px;
  height: 9px;
}

.panel,
.kpi-card {
  border-color: #e4e7ec;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(18px, 2vw, 24px);
}

.panel-head {
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head > div:first-child {
  display: grid;
  gap: 6px;
}

.panel-head span {
  color: #667085;
  font-size: 14px;
  line-height: 1.5;
}

.executive-panel {
  gap: 18px;
}

.executive-panel .panel-head {
  align-items: flex-start;
}

.executive-period-tools {
  min-width: min(100%, 360px);
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #f8fafc;
}

.period-chip {
  width: 100%;
  justify-content: center;
  border-color: transparent;
  background: #ffffff;
  color: #344054;
  font-weight: 850;
}

.executive-period-tabs {
  gap: 4px;
  padding: 3px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #ffffff;
}

.executive-period-mode,
.period-mode {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475467;
  box-shadow: none;
  font-size: 13px;
  font-weight: 850;
}

.executive-period-mode:hover,
.period-mode:hover {
  background: #f2f4f7;
  color: #101828;
}

.executive-period-mode.active,
.period-mode.active {
  background: #0f766e;
  color: #ffffff;
}

.executive-period-inputs input {
  min-height: 38px;
  border-radius: 8px;
  font-size: 14px;
}

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

.executive-card {
  min-height: 142px;
  overflow: hidden;
  position: relative;
  padding: 18px;
  border-radius: 10px;
  background: #ffffff;
  border-color: #e4e7ec;
}

.executive-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #98a2b3;
}

.executive-card.income,
.executive-card.expense,
.executive-card.net,
.executive-card.attention {
  background: #ffffff;
  border-color: #e4e7ec;
}

.executive-card.income::before {
  background: #12b76a;
}

.executive-card.expense::before {
  background: #f79009;
}

.executive-card.net::before {
  background: #2e90fa;
}

.executive-card.attention::before {
  background: #fdb022;
}

.executive-card span {
  color: #667085;
  font-size: 14px;
  font-weight: 800;
}

.executive-card strong {
  color: #101828;
  font-size: clamp(26px, 2.2vw, 36px);
  font-weight: 850;
}

.executive-card small {
  color: #667085;
  font-size: 13px;
  line-height: 1.4;
}

.executive-card[role="button"]:hover,
.executive-card[role="button"]:focus {
  transform: translateY(-1px);
  border-color: #99f6e4;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.11);
  outline: 3px solid rgba(20, 184, 166, 0.12);
}

.decision-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
}

.decision-grid article,
.correction-grid article,
.settings-card {
  border-color: #e4e7ec;
  border-radius: 10px;
  background: #fcfcfd;
}

.decision-grid h3 {
  font-size: 14px;
  font-weight: 850;
}

.decision-grid ul {
  color: #475467;
  line-height: 1.55;
}

.breakdown-list div {
  border-bottom-color: #eaecf0;
}

.kpi-grid {
  gap: 12px;
}

.kpi-card {
  min-height: 104px;
  padding: 16px;
}

.kpi-card span {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.kpi-card strong {
  color: #101828;
  font-size: 30px;
}

.period-panel {
  background: #ffffff;
}

.period-panel .panel-head button {
  min-height: 36px;
}

.period-mode-tabs {
  width: fit-content;
  padding: 3px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f8fafc;
}

.period-controls {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
}

.stay-date-card {
  padding: 12px;
  border-color: #e4e7ec;
  border-radius: 10px;
  background: #fcfcfd;
}

.stay-date-title {
  color: #101828;
  font-size: 13px;
}

.stay-date-copy {
  min-height: 0;
  color: #667085;
  font-size: 12px;
}

.period-controls input,
.period-controls select,
.toolbar input,
.toolbar select {
  border-radius: 8px;
  border-color: #d0d5dd;
  font-size: 14px;
  font-weight: 650;
}

.attention-table,
.sheet-table,
.settings-table {
  font-size: 13px;
}

.attention-table th,
.sheet-table th,
.settings-table th {
  background: #f8fafc;
  color: #344054;
  border-bottom: 1px solid #e4e7ec;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.attention-table th {
  background: #fffbeb;
  color: #92400e;
}

.sheet-table th {
  background: #ecfdf3;
  color: #14532d;
}

.expense-sheet th {
  background: #fff7ed;
  color: #9a3412;
}

.expense-panel table,
.expense-sheet {
  min-width: 100%;
}

.attention-table th,
.attention-table td,
.sheet-table td {
  border-color: #eaecf0;
}

.attention-table td,
.sheet-table td {
  color: #101828;
}

.attention-table tr:nth-child(even) td,
.sheet-table tr:nth-child(even) td {
  background: #fcfcfd;
}

.report-table tbody tr:hover td {
  background: #f0fdfa;
}

.sheet-titlebar {
  padding: 14px 18px;
  background: #ffffff;
  border-bottom-color: #e4e7ec;
}

.sheet-titlebar strong {
  color: #101828;
  font-size: 18px;
}

.sheet-titlebar span {
  color: #475467;
  font-size: 13px;
}

.omset-summary {
  background: #f8fafc;
  border-bottom-color: #e4e7ec;
}

.summary-cell {
  min-height: 64px;
  border-right-color: #e4e7ec;
  background: #ffffff;
}

.summary-cell span {
  color: #667085;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.summary-cell strong {
  color: #101828;
  font-size: 15px;
}

.summary-cell.total {
  background: #ecfdf3;
}

.status-pill,
.issue-pill,
.badge {
  border-radius: 999px;
  font-weight: 850;
}

.issue-pill {
  background: #fffaeb;
  color: #b54708;
}

.status-pill {
  background: #ecfdf3;
  color: #067647;
}

.download-button,
.table-action-link {
  border-radius: 8px;
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
  font-weight: 850;
}

.table-action-link {
  min-height: 32px;
}

.download-button:hover,
.table-action-link:hover {
  background: #115e59;
}

.expense-download {
  background: #c2410c;
  border-color: #c2410c;
}

.toolbar {
  flex-wrap: wrap;
}

.workbench-panel,
.expense-panel,
.settings-panel,
.attention-panel {
  overflow: hidden;
}

.workbench-panel .panel-head {
  padding: 20px;
  border-bottom-color: #e4e7ec;
}

.sheet-wrap {
  background: #ffffff;
}

.sheet-tabs {
  margin-top: -8px;
  padding: 0 20px 8px;
}

.tab-button {
  min-height: 34px;
  border-radius: 8px 8px 0 0;
  background: #ffffff;
  font-size: 13px;
}

.tab-button.active {
  background: #eff6ff;
  color: #175cd3;
}

.login-shell {
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 32rem),
    linear-gradient(180deg, #f8fafc 0%, #eef4f8 100%);
}

.login-panel {
  border-radius: 12px;
}

@media (max-width: 1180px) {
  .executive-grid,
  .period-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    margin-top: 18px;
    padding-bottom: 4px;
  }

  .sidebar a {
    flex: 0 0 auto;
  }

  .workspace {
    padding: 18px 14px 34px;
  }

  .topbar {
    gap: 12px;
  }

  .panel {
    padding: 18px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .executive-period-tools {
    justify-items: stretch;
    min-width: 0;
  }

  .executive-grid,
  .decision-grid,
  .kpi-grid,
  .correction-grid,
  .settings-grid,
  .settings-section-grid,
  .split-grid,
  .period-controls {
    grid-template-columns: 1fr;
  }

  .executive-card {
    min-height: 118px;
  }

  .period-mode-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .workspace {
    padding-inline: 10px;
  }

  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 24px;
  }

  .live-pill {
    width: 100%;
    justify-content: center;
  }

  .executive-period-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .executive-period-tools {
    padding: 8px;
  }

  .executive-period-mode {
    padding-inline: 6px;
    font-size: 12px;
  }
}
