﻿:root {
  --bg: #f4efe8;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --text: #1f2933;
  --muted: #5f6c7b;
  --border: rgba(31, 41, 51, 0.08);
  --primary: #6c492c;
  --primary-dark: #4f341f;
  --blue: #0f766e;
  --orange: #c2410c;
  --green: #166534;
  --dark: #1e293b;
  --gold: #a8793f;
  --shadow: 0 20px 45px rgba(26, 32, 44, 0.10);
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(168, 121, 63, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(108, 73, 44, 0.10), transparent 28%),
    linear-gradient(180deg, #faf7f2 0%, var(--bg) 100%);
}

.app-navbar {
  backdrop-filter: blur(12px);
  background: rgba(250, 247, 242, 0.94);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--primary-dark);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-size: 1.55rem;
  letter-spacing: 0.08em;
}

.brand-copy small {
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.2rem;
}

.brand-logo {
  width: 3.15rem;
  height: 3.15rem;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 10px 22px rgba(79, 52, 31, 0.2);
}

.brand-emblem {
  position: relative;
  width: 3rem;
  height: 3rem;
  display: inline-block;
}

.brand-emblem::before {
  content: "";
  position: absolute;
  inset: 0.15rem 0.2rem 0.45rem;
  background: repeating-linear-gradient(90deg, transparent 0 8%, var(--primary) 8% 11%, transparent 11% 16%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: 0.92;
}

.brand-core {
  position: absolute;
  left: 50%;
  bottom: 0.05rem;
  transform: translateX(-50%);
  width: 1rem;
  height: 0.65rem;
  border-radius: 1rem 1rem 0.35rem 0.35rem;
  background: var(--primary-dark);
}

.nav-link {
  color: var(--text);
  font-weight: 500;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--primary);
}

.hero-card,
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}

.hero-card { padding: 1.75rem; }
.app-card { padding: 1.5rem; }

.touch-btn {
  min-height: 2.25rem;
  border-radius: 0.95rem;
  font-weight: 600;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.form-control,
.form-select {
  border-radius: 0.95rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  border-color: rgba(31, 41, 51, 0.12);
}

.form-control:focus,
.form-select:focus,
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(108, 73, 44, 0.14);
  border-color: rgba(108, 73, 44, 0.35);
}

.feature-row,
.content-row,
.placeholder-panel,
.demo-note,
.stat-chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 1.1rem;
  padding: 1rem;
}

.feature-row { display: grid; gap: 0.2rem; }

.dashboard-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 10.5rem;
  padding: 1.25rem;
  border-radius: 1.4rem;
  text-decoration: none;
  color: white;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.18);
}

.tile-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
}

.tile-title { font-size: 1.05rem; font-weight: 700; }
.tile-subtitle { font-size: 0.92rem; opacity: 0.88; }

.theme-blue { background: linear-gradient(160deg, #0f766e 0%, #14b8a6 100%); }
.theme-orange { background: linear-gradient(160deg, #c2410c 0%, #fb923c 100%); }
.theme-green { background: linear-gradient(160deg, #166534 0%, #4ade80 100%); }
.theme-dark { background: linear-gradient(160deg, #1e293b 0%, #475569 100%); }
.theme-gold { background: linear-gradient(160deg, #6c492c 0%, #a8793f 100%); }
.theme-slate { background: linear-gradient(160deg, #334155 0%, #64748b 100%); }

.stats-grid { display: grid; gap: 0.75rem; }
.compact-stats { width: 100%; }
.stat-chip { min-width: 8rem; }
.stat-chip span { display: block; color: var(--muted); font-size: 0.84rem; }
.stat-chip strong { font-size: 1.35rem; }
.table { --bs-table-bg: transparent; }
.text-secondary { color: var(--muted) !important; }
.small-tile { min-height: 8.5rem; }
.finance-tabs .btn { border-radius: 999px; min-height: 2.75rem; }
.finance-summary-card { min-height: 100%; }
.finance-income { border-color: rgba(22, 101, 52, 0.14); }
.finance-expense { border-color: rgba(194, 65, 12, 0.14); }
.finance-balance { border-color: rgba(108, 73, 44, 0.18); }
.report-filter { width: min(100%, 19rem); }
.report-filter-wide { width: min(100%, 26rem); }
.report-actions { width: min(100%, 28rem); }

.chart-shell {
  position: relative;
  width: 100%;
  height: 260px;
  min-height: 260px;
  max-height: 260px;
}

.chart-shell.chart-tall {
  height: 300px;
  min-height: 300px;
  max-height: 300px;
}

.chart-shell canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.ai-output {
  white-space: pre-line;
  font-size: 0.98rem;
}

@media (min-width: 576px) {
  .compact-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .brand-copy strong { font-size: 1.25rem; }
  .brand-copy small { font-size: 0.75rem; }
}

@media (max-width: 767.98px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .hero-card, .app-card { border-radius: 1.2rem; }
  .dashboard-tile { min-height: 9.5rem; }
  .chart-shell, .chart-shell.chart-tall { height: 220px; min-height: 220px; max-height: 220px; }
}
