:root {
  --bg: #081019;
  --surface: rgba(15, 27, 40, 0.9);
  --surface-2: rgba(22, 38, 55, 0.92);
  --surface-3: #1f3344;
  --text: #eaf6ff;
  --muted: #8ea5b8;
  --line: rgba(116, 211, 255, 0.16);
  --primary: #28d8ff;
  --primary-2: #00a9d6;
  --primary-soft: rgba(40, 216, 255, 0.12);
  --income: #3ee68f;
  --income-soft: rgba(62, 230, 143, 0.14);
  --expense: #ff695c;
  --expense-soft: rgba(255, 105, 92, 0.15);
  --warning: #ffba3b;
  --warning-soft: rgba(255, 186, 59, 0.15);
  --receivable: #7da7ff;
  --receivable-soft: rgba(125, 167, 255, 0.16);
  --danger: #ff4f66;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.22);
}

body[data-theme="light"] {
  --bg: #eef7fb;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-2: rgba(241, 248, 252, 0.94);
  --surface-3: #d9edf5;
  --text: #0b1822;
  --muted: #52697a;
  --line: rgba(22, 126, 158, 0.18);
  --primary: #008fc2;
  --primary-2: #00bfa5;
  --primary-soft: rgba(0, 143, 194, 0.1);
  --income: #087f4c;
  --income-soft: rgba(8, 127, 76, 0.1);
  --expense: #c0372d;
  --expense-soft: rgba(192, 55, 45, 0.1);
  --warning: #a76500;
  --warning-soft: rgba(167, 101, 0, 0.12);
  --receivable: #225fc4;
  --receivable-soft: rgba(34, 95, 196, 0.12);
  --danger: #c2213c;
  --shadow: 0 22px 70px rgba(26, 64, 87, 0.14);
  --shadow-soft: 0 12px 28px rgba(26, 64, 87, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(rgba(116, 211, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 211, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 18% 6%, rgba(40, 216, 255, 0.2), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(62, 230, 143, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(255, 186, 59, 0.07), transparent 34%),
    var(--bg);
  background-size: 46px 46px, 46px 46px, auto, auto, auto, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: grid;
  grid-template-columns: 264px 1fr;
}

body[data-theme="light"] {
  background:
    linear-gradient(rgba(0, 143, 194, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 143, 194, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 18% 6%, rgba(0, 143, 194, 0.14), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(0, 191, 165, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(220, 239, 247, 0.92)),
    var(--bg);
  background-size: 46px 46px, 46px 46px, auto, auto, auto, auto;
}

html[data-theme="light"] body {
  color: #0b1822;
  background:
    linear-gradient(rgba(0, 143, 194, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 143, 194, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 18% 6%, rgba(0, 143, 194, 0.14), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(0, 191, 165, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(220, 239, 247, 0.92)),
    #eef7fb;
  background-size: 46px 46px, 46px 46px, auto, auto, auto, auto;
}

body.login-page {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 22px;
}

.login-shell {
  width: min(440px, 100%);
}

.login-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(40, 216, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(40, 216, 255, 0.2), transparent) 0 0 / 100% 1px no-repeat,
    linear-gradient(rgba(116, 211, 255, 0.055) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(116, 211, 255, 0.045) 1px, transparent 1px) 0 0 / 34px 34px;
  opacity: 0.72;
}

.login-head,
.login-form {
  position: relative;
  z-index: 1;
}

.login-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 20px;
}

.login-theme-toggle {
  align-self: stretch;
  min-height: 0;
  padding: 8px 10px;
  font-size: 12px;
  border-color: rgba(40, 216, 255, 0.32);
}

.login-brand {
  color: var(--text);
  background: rgba(255, 255, 255, 0.065);
  margin-bottom: 0;
  min-width: 0;
}

.login-brand span {
  color: var(--muted);
}

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

.login-error {
  margin: 0;
  padding: 10px 12px;
  color: var(--expense);
  background: var(--expense-soft);
  border-radius: 7px;
  font-weight: 700;
}

.logo-settings {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.logo-preview {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #28d8ff, #3ee68f);
  color: #081019;
  font-weight: 800;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.sidebar {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(13, 29, 43, 0.98), rgba(7, 14, 23, 0.98));
  color: #f7fafc;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  border-right: 1px solid rgba(40, 216, 255, 0.14);
}

body[data-theme="light"] .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 244, 250, 0.98));
  color: var(--text);
  border-right-color: rgba(0, 143, 194, 0.18);
}

body[data-theme="light"] .brand,
body[data-theme="light"] .topbar,
body[data-theme="light"] .dashboard-hero {
  background: rgba(255, 255, 255, 0.78);
}

body[data-theme="light"] .login-brand {
  background: rgba(0, 143, 194, 0.07);
}

body[data-theme="light"] .login-card {
  background:
    linear-gradient(135deg, rgba(0, 143, 194, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 249, 253, 0.92)),
    var(--surface);
}

body[data-theme="light"] .login-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(0, 143, 194, 0.24), transparent) 0 0 / 100% 1px no-repeat,
    linear-gradient(rgba(0, 143, 194, 0.06) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(0, 143, 194, 0.052) 1px, transparent 1px) 0 0 / 34px 34px;
}

body[data-theme="light"] .nav-item {
  color: #375064;
}

body[data-theme="light"] .nav-item:hover,
body[data-theme="light"] .nav-item.active {
  color: #082033;
  background: rgba(0, 143, 194, 0.11);
}

.mobile-menu-toggle,
.mobile-menu-backdrop {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(40, 216, 255, 0.08);
  border: 1px solid rgba(40, 216, 255, 0.16);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #28d8ff, #3ee68f);
  color: #071018;
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(40, 216, 255, 0.25);
  overflow: hidden;
}

.brand-mark img,
.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #9fb0bf;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px 12px 16px;
  border-radius: 8px;
  color: #c9d5df;
  background: transparent;
  position: relative;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: rgba(40, 216, 255, 0.13);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 3px;
  background: #3ee68f;
}

.app {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px 20px;
  background: rgba(15, 27, 40, 0.72);
  border: 1px solid rgba(40, 216, 255, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
}

h2 {
  font-size: 16px;
  line-height: 1.25;
}

.top-actions,
.filter-row,
.data-actions,
.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 16px;
}

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

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

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

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

.metric {
  padding: 17px;
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 0;
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 78px;
  height: 72px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 255, 255, 0.12) 18% 34%, transparent 34% 42%, rgba(255, 255, 255, 0.12) 42% 60%, transparent 60% 70%, rgba(255, 255, 255, 0.12) 70% 86%, transparent 86%),
    linear-gradient(180deg, transparent 48%, rgba(255, 255, 255, 0.08) 49% 51%, transparent 52%);
  opacity: 0.7;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  max-width: calc(100% - 52px);
}

.metric strong {
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.2;
  word-break: break-word;
  position: relative;
  z-index: 1;
}

.metric.income {
  border-left-color: transparent;
}

.metric.income::after {
  content: "";
}

.metric.expense {
  border-left-color: var(--expense);
}

.metric.expense::after {
  content: "";
}

.metric.warning {
  border-left-color: var(--warning);
}

.metric.warning::after {
  content: "HT";
  background: var(--warning-soft);
  color: var(--warning);
}

.metric.receivable {
  border-left-color: var(--receivable);
}

.metric.receivable::after {
  content: "PT";
  background: var(--receivable-soft);
  color: var(--receivable);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 20px;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(40, 216, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(40, 216, 255, 0.12), rgba(62, 230, 143, 0.06)),
    rgba(12, 22, 34, 0.78);
  box-shadow: var(--shadow-soft);
}

.dashboard-hero h2 {
  font-size: clamp(24px, 4vw, 38px);
}

.hero-status {
  display: grid;
  gap: 4px;
  text-align: right;
}

.hero-status span,
.stat-card small {
  color: rgba(234, 246, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.hero-status strong {
  color: #3ee68f;
}

.dashboard-cards .stat-card {
  min-height: 132px;
  color: #ffffff;
  background: linear-gradient(135deg, #20a95e, #116d46);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-cards .stat-card.blue {
  background: linear-gradient(135deg, #2478c4, #184d82);
}

.dashboard-cards .stat-card.orange {
  background: linear-gradient(135deg, #f28b2f, #bd621b);
}

.dashboard-cards .stat-card.expense {
  background: linear-gradient(135deg, #d75a4b, #9f392f);
}

.dashboard-cards .stat-card.dark {
  background: linear-gradient(135deg, #15191f, #05070a);
}

body[data-theme="light"] .dashboard-cards .stat-card.dark {
  color: #0b1822;
  background: linear-gradient(135deg, #e8f7fc, #cfe9f4);
  border-color: rgba(0, 143, 194, 0.18);
}

body[data-theme="light"] .dashboard-cards .stat-card.dark span,
body[data-theme="light"] .dashboard-cards .stat-card.dark small {
  color: #4c6578;
}

body[data-theme="light"] .dashboard-cards .stat-card.dark strong {
  color: #0b1822;
  text-shadow: none;
}

.dashboard-cards .stat-card span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
}

.dashboard-cards .stat-card strong {
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

.compact-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-main {
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.9fr);
}

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

input,
select {
  width: 100%;
  min-height: 42px;
  color: var(--text);
  background: rgba(7, 16, 26, 0.7);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

body[data-theme="light"] input,
body[data-theme="light"] select {
  color: #0b1822;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(22, 126, 158, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body[data-theme="light"] input::placeholder {
  color: #758796;
}

input:focus,
select:focus {
  outline: 2px solid rgba(31, 111, 120, 0.24);
  border-color: var(--primary);
}

.primary,
.secondary,
.ghost,
.danger,
.file-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 7px;
  white-space: nowrap;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.primary:hover,
.secondary:hover,
.ghost:hover,
.danger:hover,
.file-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #041018;
  box-shadow: 0 10px 22px rgba(30, 116, 127, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.primary:hover {
  background: var(--primary-2);
}

.secondary,
.ghost,
.file-btn {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    linear-gradient(90deg, rgba(40, 216, 255, 0.08), transparent);
  border: 1px solid var(--line);
}

body[data-theme="light"] .secondary,
body[data-theme="light"] .ghost,
body[data-theme="light"] .file-btn {
  color: #0b1822;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 244, 250, 0.9));
  border-color: rgba(22, 126, 158, 0.18);
}

.danger {
  color: #ffffff;
  background: linear-gradient(135deg, var(--danger), #872d2d);
}

.file-btn {
  cursor: pointer;
}

.file-btn input {
  display: none;
}

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

.quick-panel {
  border-left: 5px solid var(--expense);
}

.quick-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
}

.quick-form .primary {
  grid-column: 1 / -1;
  justify-self: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.span-2 {
  grid-column: span 2;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 16, 26, 0.42);
}

body[data-theme="light"] .table-wrap {
  background: rgba(255, 255, 255, 0.9);
}

.table-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(40, 216, 255, 0.05);
}

body[data-theme="light"] .table-filter {
  background: rgba(0, 143, 194, 0.06);
}

.table-filter input {
  max-width: 280px;
  min-width: 180px;
}

.table-filter span,
.table-filter strong {
  color: var(--muted);
  font-size: 13px;
}

.table-filter button[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

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

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 700;
  background: rgba(18, 34, 50, 0.94);
  position: sticky;
  top: 0;
  z-index: 1;
}

body[data-theme="light"] th {
  color: #345064;
  background: linear-gradient(180deg, #eef8fc, #dceef6);
}

body[data-theme="light"] td {
  color: #172635;
}

body[data-theme="light"] tbody tr:hover {
  background: rgba(0, 143, 194, 0.06);
}

tbody tr:hover {
  background: rgba(40, 216, 255, 0.06);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.badge.income,
.badge.receivable,
.positive {
  color: var(--income);
  background: var(--income-soft);
}

.badge.expense,
.badge.payable,
.negative {
  color: var(--expense);
  background: var(--expense-soft);
}

.badge.settled {
  color: var(--receivable);
  background: var(--receivable-soft);
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.row-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 650;
}

body[data-theme="light"] .row-actions button {
  color: #0b1822;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(22, 126, 158, 0.14);
}

body[data-theme="light"] .row-actions button:hover {
  background: rgba(0, 143, 194, 0.11);
}

.row-actions button:hover {
  background: rgba(40, 216, 255, 0.16);
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.list-item strong,
.list-item span {
  display: block;
}

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

.chart {
  display: grid;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.graph-panel {
  min-height: 360px;
}

.chart-title {
  color: var(--text);
  text-align: center;
  font-weight: 800;
  font-size: 17px;
}

.monthly-chart {
  min-height: 255px;
  display: grid;
  grid-template-columns: repeat(12, minmax(28px, 1fr));
  align-items: end;
  gap: 13px;
  padding: 18px 8px 6px 44px;
  background:
    repeating-linear-gradient(to top, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 48px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.month-bars {
  height: 235px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  align-items: end;
}

.month-bars strong {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.bar-pair {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 5px;
}

.vertical {
  width: min(18px, 42%);
  min-height: 3px;
  border-radius: 5px 5px 0 0;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.1);
}

.vertical.income {
  background: linear-gradient(180deg, #9cffbd, var(--income));
}

.vertical.expense {
  background: linear-gradient(180deg, #ff9d93, var(--expense));
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.legend-income,
.legend-expense {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.legend-income {
  background: var(--income);
}

.legend-expense {
  background: var(--expense);
}

.calendar-card {
  color: #ffffff;
  background: linear-gradient(135deg, #62d27a, #2c9d58);
  border-color: rgba(255, 255, 255, 0.14);
}

.calendar-card .panel-head,
.calendar-card h2 {
  color: #ffffff;
}

.mini-calendar {
  display: grid;
  gap: 18px;
}

.calendar-top {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
  font-weight: 800;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 9px;
  text-align: center;
}

.calendar-weekdays b {
  font-size: 13px;
}

.calendar-days span {
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

.calendar-days .muted-day {
  color: rgba(18, 48, 31, 0.32);
}

.calendar-days .has-data {
  background: rgba(255, 255, 255, 0.16);
}

.calendar-days .today {
  color: #092017;
  background: #ffffff;
}

.mini-progress {
  width: 120px;
  height: 8px;
  background: var(--surface-3);
  border-radius: 99px;
  overflow: hidden;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

.mini-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--income));
}

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

dialog {
  width: min(460px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}

body[data-theme="light"] dialog {
  color: #0b1822;
  background: #ffffff;
}

dialog::backdrop {
  background: rgba(20, 33, 43, 0.48);
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

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

  .dashboard-grid,
  .form-grid,
  .quick-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  body {
    grid-template-columns: 1fr;
  }

  body.menu-open {
    overflow: hidden;
  }

  .mobile-menu-toggle {
    position: fixed;
    right: 14px;
    top: 14px;
    z-index: 80;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(40, 216, 255, 0.3);
    border-radius: 8px;
    background: rgba(15, 27, 40, 0.94);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(12px);
  }

  body[data-theme="light"] .mobile-menu-toggle {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(22, 126, 158, 0.24);
  }

  body[data-theme="light"] .mobile-menu-toggle span {
    background: #0b1822;
  }

  .mobile-menu-toggle span {
    width: 22px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: #eaf6ff;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  body.menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    pointer-events: none;
    background: rgba(3, 8, 14, 0);
    transition: background 180ms ease;
  }

  body.menu-open .mobile-menu-backdrop {
    pointer-events: auto;
    background: rgba(3, 8, 14, 0.62);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 70;
    width: min(82vw, 320px);
    min-height: 100vh;
    overflow-y: auto;
    padding: 16px;
    transform: translateX(-105%);
    transition: transform 200ms ease;
    box-shadow: 20px 0 56px rgba(0, 0, 0, 0.42);
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .brand {
    margin-bottom: 16px;
  }

  .app {
    padding: 76px 14px 14px;
  }

	  .topbar,
	  .panel-head,
	  .top-actions,
	  .filter-row,
	  .table-filter,
	  .data-actions {
	    align-items: stretch;
	    flex-direction: column;
	  }

	  .table-filter input {
	    max-width: none;
	    width: 100%;
	  }

  .summary-grid,
  .dashboard-grid,
  .form-grid,
  .quick-form {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .row-actions {
    justify-content: flex-start;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 12mm;
  }

  body {
    display: block;
    background: #ffffff;
    color: #111111;
  }

  .sidebar,
  .topbar,
  .top-actions,
  .nav,
  button,
  form,
  .panel-head .ghost,
  #dashboard,
  #transactions,
  #categories,
  #parties,
  #debts,
  #wallets,
  #budgets,
  #goals,
  #assets,
  #investments,
  #calendar,
  #settings {
    display: none !important;
  }

  .app {
    padding: 0;
  }

  .view {
    display: none !important;
  }

  #reports {
    display: block !important;
  }

  .panel {
    padding: 0;
    box-shadow: none;
    border: 0;
    background: #ffffff;
    break-inside: avoid;
  }

  #reports > .panel:first-child,
  #reports > .dashboard-grid,
  #reports > .panel:last-child {
    display: none !important;
  }

  #reports::before {
    content: "Laporan Transaksi";
    display: block;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 800;
  }

  .report-summary {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
  }

  .metric {
    box-shadow: none;
    border: 1px solid #cccccc;
    background: #ffffff;
    min-height: auto;
    padding: 10px;
  }

  .table-wrap {
    overflow: visible;
    border: 1px solid #cccccc;
  }

  table {
    font-size: 11px;
  }

  th {
    position: static;
    background: #eeeeee;
    color: #111111;
  }

  th,
  td {
    padding: 7px;
    border-color: #cccccc;
  }
}
