/* ---------- OuroNova Design Tokens ---------- */
:root {
  /* Warm neutrals */
  --bg: oklch(0.985 0.008 85);
  --bg-2: oklch(0.965 0.012 85);
  --bg-3: oklch(0.94 0.014 85);
  --ink: oklch(0.18 0.012 60);
  --ink-2: oklch(0.36 0.012 60);
  --ink-3: oklch(0.55 0.012 60);
  --line: oklch(0.88 0.012 80);
  --line-2: oklch(0.92 0.01 80);

  /* Logo-derived deep forest green */
  --moss: #2d5040;
  --moss-2: #3d6b56;
  --moss-deep: #1f3a2e;
  --moss-soft: #e3ebe5;
  --moss-mist: #f0f3ef;
  --moss-ink: #1a3328;

  /* Functional */
  --warn: oklch(0.55 0.13 55);
  --warn-soft: oklch(0.94 0.05 70);

  /* Type */
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Manrope', -apple-system, system-ui, sans-serif;
  --mono: 'Manrope', ui-monospace, monospace;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; letter-spacing: -0.005em; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.mono { font-family: var(--mono); font-size: 0.82em; letter-spacing: 0.04em; font-weight: 500; }

/* ---------- App Shell ---------- */
.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 8px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.brand img.sidebar-logo {
  height: 30px;
  width: auto;
  display: block;
}
.brand-mark {
  width: 32px; height: 32px;
  background: url('assets/ouronova-logo.png') no-repeat left center;
  background-size: auto 100%;
  flex-shrink: 0;
}
.brand-mark::after { content: none; }
img.brand-logo-full {
  height: 56px !important;
  width: auto !important;
  max-width: 320px;
  display: block;
}
img.sidebar-logo {
  height: 60px !important;
  width: auto !important;
  max-width: 200px;
  display: block;
}
.brand-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--moss-deep);
  font-style: italic;
}
.nav-section {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 16px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--bg-3); color: var(--ink); }
.nav-item.active { background: var(--moss); color: white; }
.nav-item.active .nav-dot { background: var(--moss-soft); }
.nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.4;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
.topbar-crumb { font-size: 12.5px; color: var(--ink-3); }
.topbar-crumb b { color: var(--ink); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--moss);
  color: white;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 500;
}

.page {
  padding: 40px 48px 80px;
  max-width: 1180px;
  width: 100%;
}

/* ---------- Common ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--moss);
  background: var(--moss);
  color: white;
  transition: transform 0.05s, opacity 0.15s, background 0.15s;
}
.btn:hover { background: var(--moss-deep); border-color: var(--moss-deep); opacity: 1; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--moss-deep); border-color: var(--moss-deep); }
.btn.secondary:hover { background: var(--moss-soft); }
.btn.moss { background: var(--moss); border-color: var(--moss); color: white; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.dark:hover { background: var(--ink); opacity: 0.85; }
.btn.ghost { border-color: var(--line); background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--moss-mist); border-color: var(--moss); color: var(--moss-deep); }
.btn.lg { padding: 14px 24px; font-size: 14.5px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  background: var(--bg-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.chip.moss { background: var(--moss-soft); color: var(--moss-ink); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px;
}
.card.flush { padding: 0; overflow: hidden; }

.label {
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

.divider { height: 1px; background: var(--line); margin: 24px 0; }
.hr-dot { height: 1px; background: repeating-linear-gradient(to right, var(--line) 0 4px, transparent 4px 8px); }

.kbd {
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-2);
}

/* Photo placeholder using real Unsplash imagery */
.ph-img {
  background-color: var(--moss-mist);
  background-size: cover;
  background-position: center;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: white;
  font-family: var(--mono);
  font-size: 10.5px;
  text-align: center;
  padding: 12px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.ph-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(31,58,46,0.35));
}
.ph-img > * { position: relative; z-index: 1; }
.ph-img.kitchen { background-image: url('uploads/kitchen_photo.webp'); }
.ph-img.oak { background-image: url('https://images.unsplash.com/photo-1644931551533-02906718127f?w=1200&q=80'); }
.ph-img.copper { background-image: url('https://images.unsplash.com/photo-1758038097288-3ab26c5421aa?w=1200&q=80'); }
.ph-img.marble { background-image: url('https://images.unsplash.com/photo-1566041510394-cf7c8fe21800?w=1200&q=80'); }
.ph-img.steel { background-image: url('https://images.unsplash.com/photo-1680206491374-f95d8458ffb8?w=1200&q=80'); }
.ph-img.terracotta { background-image: url('https://images.unsplash.com/photo-1776803801817-c640ebe2be48?w=1200&q=80'); }
.ph-img.radiator { background-image: url('https://images.unsplash.com/photo-1761061079418-e7b9fde0707c?w=1200&q=80'); }
.ph-img.pine { background-image: url('https://images.unsplash.com/photo-1772669179338-86db9d24d08f?w=1200&q=80'); }
.ph-img.demo { background-image: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?w=1200&q=80'); }
.ph-img.hero { background-image: url('https://images.unsplash.com/photo-1600566753190-17f0baa2a6c3?w=1600&q=80'); }
.ph-img.craft { background-image: url('https://images.unsplash.com/photo-1504148455328-c376907d081c?w=1600&q=80'); }
.ph-img.house { background-image: url('https://images.unsplash.com/photo-1600585154526-990dced4db0d?w=1200&q=80'); }

input.txt, textarea.txt, select.txt {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: 13.5px;
  outline: none;
  transition: border 0.15s;
}
input.txt:focus, textarea.txt:focus, select.txt:focus { border-color: var(--ink); }
textarea.txt { resize: vertical; min-height: 80px; font-family: var(--sans); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; color: var(--ink-2); font-weight: 500; }

/* Utility */
.row { display: flex; gap: 12px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 12px; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.center { display: grid; place-items: center; }

/* Page hero header */
.page-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 32px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 500;
  line-height: 1.02;
  max-width: 720px;
  letter-spacing: -0.015em;
}
.page-hero .sub { color: var(--ink-3); font-size: 14px; max-width: 540px; margin-top: 8px; }

/* Stat */
.stat-num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--moss-deep);
}
.stat-num small { font-size: 18px; color: var(--ink-3); margin-left: 4px; }

/* Spinner */
.dot-loader { display: inline-flex; gap: 4px; }
.dot-loader span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--moss);
  animation: dot 1.4s infinite;
}
.dot-loader span:nth-child(2) { animation-delay: 0.2s; }
.dot-loader span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* Fade in */
.fade-in { animation: fadeIn 0.4s ease-out both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Simple bar */
.bar { height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--moss); }
