:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #162033;
  --muted: #667085;
  --line: #d8deea;
  --blue: #2557d6;
  --green: #0e8a68;
  --red: #d43f3a;
  --shadow: 0 18px 40px rgba(22, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

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

.topbar {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.actions {
  display: flex;
  gap: 10px;
}

.actions a,
.actions button,
.login-panel button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

.actions button,
.login-panel button {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

.login-panel {
  width: min(420px, 100%);
  margin: 72px auto 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.login-panel input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
}

.login-panel button {
  width: 100%;
  margin-top: 18px;
}

.error {
  margin: 12px 0 0;
  color: var(--red);
  font-weight: 700;
}

.branch-grid,
.summary-grid,
.panel-grid {
  display: grid;
  gap: 14px;
}

.branch-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-bottom: 28px;
}

.branch-card,
.empty-card,
.summary-grid article,
.panel,
.table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.branch-card,
.empty-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.branch-card.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 87, 214, 0.14), var(--shadow);
}

.branch-card span,
.empty-card strong {
  font-weight: 800;
}

.branch-card small,
.empty-card span,
.section-title span,
.panel-title span,
.muted {
  color: var(--muted);
}

.section-title {
  margin: 22px 0 14px;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 14px;
}

.summary-grid article {
  padding: 16px;
}

.summary-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.summary-grid strong {
  font-size: 26px;
}

.panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.panel,
.table-panel {
  padding: 18px;
}

.bar-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(84px, 1fr) minmax(120px, 2fr) 48px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.bar-row i {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf3;
}

.bar-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 14px;
}

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

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

@media (max-width: 920px) {
  .summary-grid,
  .panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .topbar,
  .section-title,
  .panel-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-grid,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .table-panel {
    overflow-x: auto;
  }

  table {
    min-width: 920px;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .actions,
  .branch-grid {
    display: none;
  }

  .shell {
    width: 100%;
    padding: 0;
  }

  .panel,
  .table-panel,
  .summary-grid article {
    box-shadow: none;
  }
}
