:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #333;
  background: #e9edf1;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #e9edf1; color: #333; font-size: 14px; }
button, input { font: inherit; }
a { color: inherit; }

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background: #e6e9ed;
}
.auth-shell { width: min(100%, 430px); }
.auth-card {
  background: #fff;
  border: 1px solid #bfc5cc;
  border-radius: 3px;
  padding: 28px;
  box-shadow: 0 2px 7px rgba(0,0,0,.14);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 3px;
  background: #2d5f8b;
  border: 1px solid #244d70;
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px rgba(255,255,255,.18);
}
.brand-mark.small { width: 38px; height: 38px; border-radius: 2px; margin: 0; font-size: 12px; }
.eyebrow { margin: 0 0 6px; color: #777; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; font-weight: bold; }
h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 600; color: #333; }
.auth-intro { color: #666; line-height: 1.5; margin: 12px 0 22px; }
.auth-form { display: grid; gap: 15px; }
.auth-form label { display: grid; gap: 6px; font-size: 13px; font-weight: bold; color: #444; }
.auth-form input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #aaa;
  border-radius: 2px;
  background: #fff;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}
.auth-form input:focus { border-color: #5b9bd5; box-shadow: 0 0 3px rgba(91,155,213,.5), inset 0 1px 2px rgba(0,0,0,.08); }
.alert { padding: 10px 12px; margin-bottom: 15px; border: 1px solid #d6a7a7; border-radius: 2px; background: #f8dddd; color: #8c2f2f; font-size: 13px; }
.primary-button, .secondary-button {
  border-radius: 2px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: bold;
  border: 1px solid transparent;
  box-shadow: inset 0 1px rgba(255,255,255,.15);
}
.primary-button { background: #337ab7; border-color: #2e6da4; color: #fff; }
.primary-button:hover { background: #286090; }
.secondary-button { background: #f5f5f5; border-color: #ccc; color: #333; }
.secondary-button:hover { background: #e6e6e6; }
.full { width: 100%; }
.link-button { display: inline-block; text-decoration: none; text-align: center; }

.app-shell { display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 0;
  background: #2f4050;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #253746;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 15px; background: #263746; border-bottom: 1px solid #1f2f3c; }
.sidebar-brand strong { display: block; font-size: 15px; }
.sidebar-brand span { display: block; color: #aeb8c2; font-size: 11px; margin-top: 2px; }
.nav-list { display: block; padding: 10px 0; }
.nav-list a, .nav-list span {
  display: block;
  padding: 10px 16px;
  border-radius: 0;
  border-left: 3px solid transparent;
  text-decoration: none;
  color: #d5dce2;
  font-size: 13px;
}
.nav-list a:hover { background: #293a49; color: #fff; }
.nav-list .active { background: #263746; border-left-color: #5bc0de; color: #fff; font-weight: bold; }
.nav-list span { opacity: .55; }
.sidebar form { padding: 14px; border-top: 1px solid #253746; }
.sidebar .secondary-button { width: 100%; }
.main-content { padding: 22px 24px 34px; min-width: 0; }
.page-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.page-header p:not(.eyebrow) { color: #666; margin: 7px 0 0; }
.period-chip { background: #fff; border: 1px solid #ccc; border-radius: 2px; padding: 7px 10px; font-size: 12px; font-weight: bold; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric-card {
  background: #fff;
  border: 1px solid #cfd4d9;
  border-radius: 2px;
  padding: 15px;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  border-top: 3px solid #5b9bd5;
}
.metric-card.emphasized { border-top-color: #5cb85c; }
.metric-card span { display: block; color: #777; font-size: 12px; margin-bottom: 8px; }
.metric-card strong { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; color: #333; }
.metric-card small { display: block; color: #999; line-height: 1.4; margin-top: 8px; font-size: 11px; }
.panel {
  background: #fff;
  border: 1px solid #cfd4d9;
  border-radius: 2px;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 12px 14px; background: #f5f5f5; border-bottom: 1px solid #ddd; }
.panel h2 { margin: 0; font-size: 16px; font-weight: 600; }
.panel > .table-wrap, .panel > .empty-state { margin: 0; }
.empty-state { padding: 28px 18px; border: 0; border-radius: 0; text-align: center; color: #777; }
.empty-state strong { display: block; color: #444; margin-bottom: 5px; }
.empty-state p { margin: 0; line-height: 1.5; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 10px; border-bottom: 1px solid #ddd; text-align: left; white-space: nowrap; }
th { background: #f5f5f5; color: #555; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; border-top: 0; }
tbody tr:nth-child(even) { background: #fafafa; }
tbody tr:hover { background: #f1f7fb; }
.amount { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; }
  .sidebar > div { width: 100%; }
  .sidebar form { margin-top: 0; }
  .sidebar-brand { padding: 12px 14px; }
  .nav-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 5px; }
  .nav-list a, .nav-list span { border-left: 0; border-bottom: 2px solid transparent; padding: 9px 10px; }
  .nav-list .active { border-bottom-color: #5bc0de; }
  .main-content { padding: 16px 12px 26px; }
  .page-header { display: block; }
  .period-chip { display: inline-block; margin-top: 12px; }
  .metric-grid { grid-template-columns: 1fr; gap: 9px; }
  .auth-card { padding: 22px 18px; }
}
