:root {
  color-scheme: dark;
  --bg: #07100d;
  --panel: #0d1a15;
  --panel-2: #10231b;
  --line: #20362d;
  --text: #edf8f2;
  --muted: #93aa9e;
  --green: #8bd3a6;
  --green-strong: #43b977;
  --gold: #e5c176;
  --red: #f38d8d;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 0%, rgba(67,185,119,.12), transparent 30%), var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 70px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 28px; }
.brand { display: flex; align-items: center; gap: 14px; }
.mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(145deg, #a6e7bb, #388c5e); color: #062213; font-weight: 900; letter-spacing: -.04em; box-shadow: 0 10px 32px rgba(67,185,119,.2); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 20px; letter-spacing: -.02em; }
h2 { margin-bottom: 10px; font-size: clamp(28px, 4vw, 48px); line-height: 1.04; letter-spacing: -.045em; }
h3 { font-size: 22px; margin-bottom: 7px; }
.eyebrow { margin-bottom: 7px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); }
.lede { max-width: 720px; color: #b4c8be; font-size: 17px; line-height: 1.65; }
.hidden { display: none !important; }
.hero { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; padding: 54px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(135deg, rgba(22,53,40,.96), rgba(9,24,18,.95)); box-shadow: var(--shadow); }
.hero-actions { display: flex; flex-direction: column; gap: 10px; min-width: 190px; }
.button { appearance: none; border: 1px solid transparent; border-radius: 12px; padding: 12px 16px; color: var(--text); text-decoration: none; font-weight: 800; cursor: pointer; text-align: center; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.primary { background: var(--green); color: #092116; }
.primary:hover { background: #a3e5ba; }
.secondary { background: #183427; border-color: #2f5744; }
.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.card, .panel, .login-card { border: 1px solid var(--line); background: rgba(13,26,21,.92); border-radius: 20px; padding: 24px; box-shadow: 0 14px 40px rgba(0,0,0,.16); }
.muted-card { opacity: .78; }
.card-heading, .panel-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.service-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #256b44; color: white; font-weight: 900; }
.service-icon.sheet { background: #385b49; }
.service-icon.qb { background: #276d4b; }
.badge { border: 1px solid #315443; background: #163326; border-radius: 999px; padding: 6px 9px; color: #a9dfbd; font-size: 12px; font-weight: 800; }
.badge.warn { color: var(--gold); background: rgba(229,193,118,.08); border-color: rgba(229,193,118,.3); }
.badge.error { color: var(--red); background: rgba(243,141,141,.08); border-color: rgba(243,141,141,.3); }
.badge.planned { color: #9fb1a8; background: #15231d; }
dl { margin: 24px 0 0; }
dl div, .activity-stat { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
dt { color: var(--muted); } dd { margin: 0; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.panel { margin-top: 18px; }
.panel h2 { font-size: 28px; }
.score { color: var(--green); font-size: 20px; font-weight: 900; }
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 20px; margin-top: 20px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.check::before { content: ""; width: 20px; height: 20px; flex: 0 0 auto; border: 2px solid #4d665a; border-radius: 7px; }
.check.done { color: var(--text); border-color: #315641; background: rgba(67,185,119,.06); }
.check.done::before { content: "✓"; display: grid; place-items: center; color: #092116; background: var(--green); border-color: var(--green); font-size: 13px; font-weight: 900; }
.two-column { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.workflow { list-style: none; padding: 0; margin: 22px 0 0; }
.workflow li { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.workflow li > span { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; background: #183a2a; color: var(--green); font-weight: 900; }
.workflow p { color: var(--muted); margin: 4px 0 0; line-height: 1.45; }
.empty-state { padding: 22px; border: 1px dashed #315044; border-radius: 14px; color: var(--muted); background: #0b1712; }
.notice { margin-top: 18px; padding: 14px 16px; border: 1px solid #315443; border-radius: 13px; background: #10281d; color: #c7ead4; }
.notice.error { border-color: rgba(243,141,141,.35); color: #ffc1c1; background: rgba(94,28,28,.2); }
.login-card { width: min(520px, 100%); margin: 70px auto; padding: 36px; }
.login-card h2 { font-size: 34px; }
form { display: grid; gap: 10px; margin-top: 24px; }
label { color: var(--muted); font-size: 13px; font-weight: 700; }
input { width: 100%; border: 1px solid #315044; border-radius: 12px; padding: 13px 14px; background: #07120d; color: var(--text); outline: none; }
input:focus { border-color: var(--green-strong); box-shadow: 0 0 0 3px rgba(67,185,119,.12); }
.error { min-height: 20px; color: var(--red); margin: 12px 0 0; }
@media (max-width: 850px) { .hero { align-items: stretch; flex-direction: column; padding: 32px; } .hero-actions { flex-direction: row; } .hero-actions > * { flex: 1; } .cards, .two-column { grid-template-columns: 1fr; } .checklist { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .shell { width: min(100% - 20px, 1180px); padding-top: 14px; } .brand .eyebrow { display: none; } h1 { font-size: 17px; } .hero { padding: 24px; border-radius: 20px; } .hero-actions { flex-direction: column; } .card, .panel { padding: 20px; } }
/* MVOS Finance Dashboard */

#financePanel {
  margin-top: 28px;
  padding: 30px;
  background:
    linear-gradient(
      145deg,
      rgba(18, 43, 32, .96),
      rgba(10, 25, 19, .96)
    );
  border-color: #2c4c3d;
}

#financePanel > .panel-title {
  align-items: flex-start;
}

#financePanel > .panel-title h2 {
  margin-bottom: 8px;
  font-size: 34px;
}

#financeDateRange {
  margin-bottom: 0;
  line-height: 1.5;
}

.finance-controls {
  display: grid;
  grid-template-columns:
    minmax(180px, 1fr)
    minmax(180px, 1fr)
    auto;
  gap: 14px;
  align-items: end;
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(7, 16, 13, .55);
}

.finance-controls > div {
  display: grid;
  gap: 7px;
}

.finance-controls .button {
  min-height: 45px;
}

select {
  width: 100%;
  min-height: 45px;
  border: 1px solid #315044;
  border-radius: 12px;
  padding: 0 38px 0 13px;
  background: #07120d;
  color: var(--text);
  font: inherit;
  outline: none;
  cursor: pointer;
}

select:focus {
  border-color: var(--green-strong);
  box-shadow:
    0 0 0 3px
    rgba(67, 185, 119, .12);
}

select:disabled {
  cursor: wait;
  opacity: .6;
}

.finance-kpis {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.finance-kpis .card {
  min-height: 150px;
  background:
    linear-gradient(
      145deg,
      rgba(17, 38, 29, .96),
      rgba(11, 25, 19, .96)
    );
}

.finance-kpis .card h2 {
  margin: 12px 0 8px;
  font-size: 34px;
  line-height: 1;
}

.finance-kpis .card .muted {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.45;
}

#financePanel .two-column {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
}

#financePanel .two-column .panel {
  background:
    rgba(8, 20, 15, .62);
}

#financePanel dl {
  margin-top: 18px;
}

#financePanel dt {
  font-size: 14px;
}

#financePanel dd {
  color: var(--text);
}

#financeBankAccounts {
  padding: 0 18px;
}

#financeBankAccounts .activity-stat:first-child {
  border-top: 0;
}

#financeBankAccounts .activity-stat {
  align-items: center;
}

#financeBankAccounts strong {
  text-align: right;
}

@media (max-width: 850px) {
  .finance-controls {
    grid-template-columns: 1fr 1fr;
  }

  .finance-controls > div:last-child {
    grid-column: 1 / -1;
  }

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

  #financePanel .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  #financePanel {
    padding: 20px;
  }

  #financePanel > .panel-title {
    flex-direction: column;
  }

  .finance-controls {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .finance-controls > div:last-child {
    grid-column: auto;
  }

  .finance-kpis {
    grid-template-columns: 1fr;
  }

  .finance-kpis .card h2 {
    font-size: 30px;
  }
}
