:root { color-scheme: light; }
body {
  background: #f1eee6;
  color: #1d2922;
  font-family: "Segoe UI", Arial, sans-serif;
}
.app-shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; width: auto; height: 100vh; padding: 28px 20px;
  background: #173b2c; color: #fffdf7; border-right: 6px solid #d5aa52;
}
.brand { color: #fffdf7; font-family: Georgia, serif; font-size: 21px; }
.brand-mark { background: #d5aa52; color: #173b2c; border-radius: 0; }
.nav-list { gap: 2px; }
.nav-item {
  border: 0; border-bottom: 1px solid #456252; border-radius: 0; color: #d6e2da;
  background: transparent; text-align: left; padding: 13px 4px; font-family: Georgia, serif;
}
.nav-item { display: block; width: 100%; text-decoration: none; }
.nav-item:hover, .nav-item.active { background: transparent; color: #fff; box-shadow: inset 4px 0 0 #d5aa52; padding-left: 14px; }
.account-card { border: 1px solid #6f8878; border-radius: 0; background: #0f2b20; }
.workspace { min-width: 0; margin: 0; padding: 30px 34px 48px; }
.topbar { align-items: end; border-bottom: 2px solid #1d2922; padding-bottom: 18px; margin-bottom: 22px; }
.topbar h1, .panel h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: 0; }
.topbar h1 { font-size: clamp(30px, 4vw, 52px); font-weight: 500; }
.topbar p { color: #58645c; max-width: 680px; }
.ghost-button, .primary-button { border-radius: 0; border: 1px solid #1d2922; min-height: 42px; }
.ghost-button { background: transparent; color: #1d2922; }
.primary-button { background: #1d2922; color: #fffdf7; box-shadow: 4px 4px 0 #d5aa52; }
.kpi-grid { gap: 0; border: 1px solid #1d2922; background: #fffdf7; }
.kpi-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0;
  border: 0; border-right: 1px solid #b9b5aa; border-radius: 0; background: transparent; box-shadow: none; padding: 18px;
}
.kpi-card:last-child { border-right: 0; }
.kpi-card strong { max-width: 100%; font-family: Georgia, serif; font-size: clamp(20px, 1.9vw, 25px); white-space: nowrap; }
.kpi-icon { width: auto; height: auto; border-radius: 0; background: transparent !important; color: #a24c31 !important; border-bottom: 3px solid #d5aa52; font-size: 12px; letter-spacing: 0; text-transform: uppercase; }
.content-grid { grid-template-columns: minmax(0, 1.7fr) 330px; gap: 22px; }
.panel { border: 1px solid #1d2922; border-radius: 0; background: #fffdf7; box-shadow: 6px 6px 0 #d5aa52; }
.auth-session { min-height: 42px; }
.panel-header { border-bottom: 1px solid #b9b5aa; }
.receivables-panel .panel-header { align-items: stretch; flex-direction: column; }
.receivables-panel .filters { flex-wrap: wrap; justify-content: flex-start; }
.receivables-panel .filters input { flex: 1 1 220px; }
input, select { border-radius: 0; border: 1px solid #7f887f; background: #fff; }
.filter-button { min-height: 40px; border: 1px solid #7f887f; border-radius: 0; padding: 0 12px; background: #e5e0d4; color: #1d2922; }
th { background: #e5e0d4; color: #1d2922; font-family: Georgia, serif; }
td { border-color: #d7d2c6; }
.empty-state { padding: 28px 18px; text-align: center; }
.empty-state span { display: block; margin-top: 7px; color: #58645c; }
button:disabled { cursor: wait; opacity: .65; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #d5aa52; outline-offset: 3px; }
html { scroll-behavior: smooth; scroll-padding-top: 18px; }
@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 6px solid #d5aa52; }
  .nav-list { display: grid; grid-template-columns: repeat(3, 1fr); }
  .account-card { display: none; }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .workspace { padding: 22px 16px 40px; }
  .topbar { align-items: stretch; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-card:nth-child(2) { border-right: 0; }
  .filters { align-items: stretch; flex-direction: column; width: 100%; }
  .filters > * { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
