/* Direction: fine Indian stationery — blush-white paper, rounded geometric headings, one deep marigold accent */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #fdf6f1;
  --surface: #fffdfb;
  --surface-2: #f7ebe3;
  --border: #ebd9ce;
  --border-strong: #b9b1aa;
  --ink: #2a1d18;
  --muted: #765d51;
  --accent: #bf6d12;
  --accent-hover: #a25d0f;
  --accent-ink: #1b0f03;
  --accent-text: #9c530a;
  --accent-strong: #7d3e09;
  --accent-soft: #fbe7cf;
  --accent-border: #e1b88d;
  --success: #1c7349;
  --success-ink: #ffffff;
  --success-soft: #e2e6dd;
  --success-strong: #1c7349;
  --warning: #92640a;
  --warning-ink: #ffffff;
  --warning-soft: #f0e4d5;
  --warning-strong: #865c09;
  --danger: #a3301f;
  --danger-ink: #ffffff;
  --danger-soft: #f2ded8;
  --danger-strong: #a3301f;
  --chart-1: #bf6d12;
  --chart-2: #819824;
  --chart-3: #177e6f;
  --chart-4: #1f95d7;
  --chart-5: #7854ad;
  --chart-6: #d56b8e;

  --font-display: "Baloo 2", "Trebuchet MS", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --display-weight: 700;
  --display-tracking: -0.015em;
  --radius-card: 20px;
  --radius-btn: 12px;
  --radius-input: 12px;
  --card-pad: 1.5rem;
  --shadow-card: 0 1px 2px rgba(42, 29, 24, 0.04), 0 16px 34px -24px rgba(42, 29, 24, 0.3);
  --x-on-dark: #ffffff;
  --gradient-marigold: linear-gradient(135deg, #bf6d12, #e3a048);
  --font-sans: "Inter", system-ui, sans-serif;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #110903;
  --surface: #29221c;
  --surface-2: #1d1510;
  --border: #322b26;
  --border-strong: #58534f;
  --ink: #fdf6f1;
  --muted: #9f9792;
  --accent: #bf6d12;
  --accent-hover: #c98336;
  --accent-ink: #1b0f03;
  --accent-text: #c47925;
  --accent-strong: #c98436;
  --accent-soft: #371f06;
  --accent-border: #5f360a;
  --success: #1c7349;
  --success-ink: #ffffff;
  --success-soft: #132012;
  --success-strong: #4e9271;
  --warning: #92640a;
  --warning-ink: #ffffff;
  --warning-soft: #2d1d05;
  --warning-strong: #aa8641;
  --danger: #a3301f;
  --danger-ink: #ffffff;
  --danger-soft: #311209;
  --danger-strong: #c2776b;
  --chart-1: #bf6d12;
  --chart-2: #95ac3d;
  --chart-3: #069583;
  --chart-4: #34a3e6;
  --chart-5: #8e6ac6;
  --chart-6: #e07599;
}

/* Bahi — paper texture, quiet motion, the print sheet */

body {
  background-image:
    radial-gradient(circle at 12% -4%, var(--accent-soft), transparent 42%),
    radial-gradient(circle at 92% 4%, var(--surface-2), transparent 38%);
  background-repeat: no-repeat;
}

/* page fade-in: settles from a small offset, never from invisible */
@keyframes bahi-in {
  from { opacity: 0.55; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.page-in { animation: bahi-in 0.5s cubic-bezier(0.22, 0.75, 0.3, 1) both; }
html.reduced-motion .page-in { animation: none; }

/* figures: rupees line up */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* rows lift on hover */
.lift { transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease; }
.lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -20px rgba(42, 29, 24, 0.55);
  background-color: var(--surface-2);
}
html.reduced-motion .lift:hover { transform: none; }

/* ruled stationery dots */
.rule-dots {
  background-image: radial-gradient(var(--border) 1.1px, transparent 1.2px);
  background-size: 10px 10px;
}

.month-bar {
  background: var(--gradient-marigold);
  border-radius: 10px 10px 4px 4px;
  min-height: 8px;
  width: 100%;
}

/* top customers: a horizontal marigold bar per buyer */
.customer-bar {
  background: var(--gradient-marigold);
  min-width: 7.5rem;
  transition: width 0.4s cubic-bezier(0.22, 0.75, 0.3, 1);
}
.customer-row:hover .customer-bar { filter: saturate(1.08); }

.invoice-sheet { box-shadow: var(--shadow-card); }

/* wide tables scroll inside their card, never the page */
main { overflow-x: clip; }
.table-scroll {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.stamp {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

@media print {
  .no-print { display: none !important; }
  body { background: none; }
  .invoice-sheet { box-shadow: none; border: 0; border-radius: 0; margin: 0; max-width: none; }
  .page-in { animation: none; }
}
