
/* ============================================================
   ALTERO VERO — Shared Design System
   vero-theme.css

   Import this file into any page:
   <link rel="stylesheet" href="vero-theme.css" />

   Google Fonts dependency (add before this stylesheet):
   <link rel="preconnect" href="https://fonts.googleapis.com" />
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
   <link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Mono:wght@300;400&family=Syne:wght@400;500;600&display=swap" rel="stylesheet" />
   ============================================================ */


/* ────────────────────────────────────────────────────────────
   TOKENS
   ──────────────────────────────────────────────────────────── */
:root {
  /* Typography */
  --font-display : 'Cormorant Garamond', Georgia, serif;
  --font-ui      : 'Syne', system-ui, sans-serif;
  --font-mono    : 'DM Mono', 'Courier New', monospace;

  /* Bone palette */
  --bone   : #f4f1eb;
  --bone-2 : #ede9e1;
  --bone-3 : #e4dfd5;

  /* Ink palette */
  --ink   : #0e0d0c;
  --ink-2 : #3a3834;
  --ink-3 : #7a7870;

  /* Accent */
  --gold        : #b8955a;
  --gold-light  : #d4b07a;
  --green       : #2d4a35;
  --green-light : #4a7a58;

  /* Semantic shorthands */
  --bg      : var(--bone);
  --surface : #ffffff;
  --border  : var(--bone-3);

  /* Spacing */
  --radius    : 6px;
  --radius-lg : 10px;
  --ease      : 0.18s ease;
}

html[data-theme="dark"] {
  --bone: #13110f;
  --bone-2: #1a1714;
  --bone-3: #25201b;
  --ink: #f2ece2;
  --ink-2: #d8cfc3;
  --ink-3: #a79d90;
  --gold: #c39a5b;
  --gold-light: #d8b57a;
  --green: #587c62;
  --green-light: #6c9a77;
  --surface: #191613;
  --border: #2b241f;
}


/* ────────────────────────────────────────────────────────────
   RESET & BASE
   ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  max-width: 100%;
  overflow-x: clip;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top right, rgba(195,154,91,0.12), transparent 26%),
    linear-gradient(180deg, #13110f 0%, #171411 52%, #13110f 100%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }


/* ────────────────────────────────────────────────────────────
   LAYOUT HELPERS
   ──────────────────────────────────────────────────────────── */
.vero-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Two-column dashboard shell: sidebar + main */
.vero-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.vero-main {
  padding: 40px 40px 80px;
  min-width: 0; /* prevent grid blowout */
}

@media (max-width: 860px) {
  .vero-shell { grid-template-columns: 1fr; }
  .vero-main  { padding: 28px 20px 64px; }
  .vero-wrap  { padding: 0 20px; }
}


/* ────────────────────────────────────────────────────────────
   NAV  (top bar, used on public / single-column pages)
   ──────────────────────────────────────────────────────────── */
.vero-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 60px;
  display: flex;
  align-items: center;
  background: var(--bone);
  border-bottom: 1px solid var(--bone-3);
}

.vero-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Wordmark */
.vero-nav__brand {
  display: flex;
  align-items: baseline;
  gap: 7px;
  text-decoration: none;
}

.vero-nav__brand-name {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.vero-nav__brand-sub {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.04em;
}

/* Right-side links / actions */
.vero-nav__right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.vero-nav__link {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.01em;
  transition: color var(--ease);
}

.vero-nav__link:hover { color: var(--ink); }

.vero-nav__user {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .vero-nav__inner { padding: 0 18px; }
  .vero-nav__user  { display: none; }
  .vero-nav__right { gap: 14px; }
}


/* ────────────────────────────────────────────────────────────
   SIDEBAR  (dashboard left rail)
   ──────────────────────────────────────────────────────────── */
.vero-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--bone-3);
  display: flex;
  flex-direction: column;
  padding: 28px 0 32px;
}

.vero-sidebar__brand {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 0 22px 28px;
  text-decoration: none;
  border-bottom: 1px solid var(--bone-3);
  margin-bottom: 20px;
}

.vero-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  flex: 1;
}

.vero-sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
  text-decoration: none;
}

.vero-sidebar__item:hover {
  background: var(--bone);
  color: var(--ink-2);
}

.vero-sidebar__item.active {
  background: var(--bone-2);
  color: var(--ink);
  font-weight: 600;
}

.vero-sidebar__item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.6;
}

.vero-sidebar__item.active svg { opacity: 1; }

.vero-sidebar__section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 18px 24px 6px;
}

.vero-sidebar__footer {
  padding: 16px 12px 0;
  border-top: 1px solid var(--bone-3);
  margin-top: auto;
}

/* Sidebar hidden on mobile — use top nav instead */
@media (max-width: 860px) {
  .vero-sidebar { display: none; }
}


/* ────────────────────────────────────────────────────────────
   STAT CARD  (metric tile with colored top rule)
   ──────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--bone-3);
  border-radius: var(--radius-lg);
  padding: 22px 24px 20px;
  position: relative;
  overflow: hidden;
}

/* Colored top rule — set --stat-color per card */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-color, var(--gold));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card--gold   { --stat-color: var(--gold); }
.stat-card--green  { --stat-color: var(--green-light); }
.stat-card--ink    { --stat-color: var(--ink-2); }
.stat-card--bone   { --stat-color: var(--bone-3); }

.stat-card__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.01em;
}

.stat-card__sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
  margin-top: 6px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}


/* ────────────────────────────────────────────────────────────
   FORM CARD
   ──────────────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--bone-3);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
}

.form-card + .form-card { margin-top: 16px; }

.form-card__title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bone-3);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid--single { grid-template-columns: 1fr; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px 20px 20px; }
}


/* ────────────────────────────────────────────────────────────
   FORM LABEL
   ──────────────────────────────────────────────────────────── */
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}


/* ────────────────────────────────────────────────────────────
   FORM INPUT / SELECT / TEXTAREA
   ──────────────────────────────────────────────────────────── */
.form-input {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: var(--bone);
  border: 1px solid var(--bone-3);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  outline: none;
  transition: border-color var(--ease), background var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder { color: var(--ink-3); }

.form-input:focus {
  background: var(--surface);
  border-color: var(--gold);
}

.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.55;
}

/* Select arrow */
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7870' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-field { display: flex; flex-direction: column; }
.form-field--full { grid-column: 1 / -1; }

.form-hint {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 5px;
}

.form-error {
  font-size: 12px;
  color: #b84040;
  margin-top: 6px;
  min-height: 18px;
}

.form-success {
  font-size: 12px;
  color: var(--green-light);
  margin-top: 6px;
  min-height: 18px;
}

.char-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  text-align: right;
  margin-top: 4px;
}


/* ────────────────────────────────────────────────────────────
   BADGES
   ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-pending  {
  background: rgba(184,149,90,0.12);
  color: var(--gold);
  border: 1px solid rgba(184,149,90,0.25);
}

.badge-approved {
  background: rgba(74,122,88,0.1);
  color: var(--green-light);
  border: 1px solid rgba(74,122,88,0.22);
}

.badge-complete,
.badge-completed {
  background: rgba(45,74,53,0.1);
  color: var(--green);
  border: 1px solid rgba(45,74,53,0.2);
}

.badge-rejected {
  background: rgba(184,64,64,0.09);
  color: #b84040;
  border: 1px solid rgba(184,64,64,0.2);
}

.badge-active {
  background: rgba(45,74,53,0.1);
  color: var(--green-light);
  border: 1px solid rgba(74,122,88,0.22);
}

.badge-paused {
  background: rgba(122,120,112,0.1);
  color: var(--ink-3);
  border: 1px solid rgba(122,120,112,0.2);
}


/* ────────────────────────────────────────────────────────────
   SUBMIT BUTTON  (primary action)
   ──────────────────────────────────────────────────────────── */
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 28px;
  background: var(--ink);
  color: var(--bone);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: background var(--ease), transform var(--ease), opacity var(--ease);
  white-space: nowrap;
}

.submit-btn:hover:not(:disabled) {
  background: var(--ink-2);
  transform: translateY(-1px);
}

.submit-btn:active:not(:disabled) { transform: translateY(0); }

.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Gold variant */
.submit-btn--gold {
  background: var(--gold);
  color: #fff;
}

.submit-btn--gold:hover:not(:disabled) {
  background: var(--gold-light);
}

/* Ghost variant */
.submit-btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--bone-3);
}

.submit-btn--ghost:hover:not(:disabled) {
  background: var(--bone-2);
  border-color: var(--bone-3);
  transform: translateY(-1px);
}

/* Danger variant */
.submit-btn--danger {
  background: transparent;
  color: #b84040;
  border: 1px solid rgba(184,64,64,0.25);
}

.submit-btn--danger:hover:not(:disabled) {
  background: rgba(184,64,64,0.06);
}

/* Size modifiers */
.submit-btn--sm  { padding: 7px 18px; font-size: 10px; }
.submit-btn--lg  { padding: 14px 36px; font-size: 12px; }
.submit-btn--full { width: 100%; }


/* ────────────────────────────────────────────────────────────
   SECTION TYPOGRAPHY
   ──────────────────────────────────────────────────────────── */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-title--lg { font-size: 44px; }
.section-title--sm { font-size: 22px; }

.section-sub {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-3);
  line-height: 1.65;
  margin-top: 10px;
}

.section-header {
  margin-bottom: 28px;
}

.section-divider {
  height: 1px;
  background: var(--bone-3);
  margin: 40px 0;
}


/* ────────────────────────────────────────────────────────────
   TABLE
   ──────────────────────────────────────────────────────────── */
.vero-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--bone-3);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

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

.vero-table thead tr {
  border-bottom: 1px solid var(--bone-3);
}

.vero-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
  padding: 13px 20px;
  white-space: nowrap;
}

.vero-table td {
  padding: 15px 20px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-2);
  border-bottom: 1px solid var(--bone-3);
  vertical-align: middle;
}

.vero-table tbody tr:last-child td { border-bottom: none; }

.vero-table tbody tr:hover td {
  background: var(--bone);
}

.vero-table .td-primary { color: var(--ink); font-weight: 500; }
.vero-table .td-mono    { font-family: var(--font-mono); font-size: 12px; }
.vero-table .td-muted   { color: var(--ink-3); font-size: 13px; }


/* ────────────────────────────────────────────────────────────
   EMPTY STATE
   ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
}

.empty-state__icon {
  font-size: 36px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.empty-state__sub {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-3);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}


/* ────────────────────────────────────────────────────────────
   UTILITY CLASSES
   ──────────────────────────────────────────────────────────── */
.u-mono     { font-family: var(--font-mono); }
.u-display  { font-family: var(--font-display); }
.u-ui       { font-family: var(--font-ui); }

.u-ink      { color: var(--ink); }
.u-ink-2    { color: var(--ink-2); }
.u-ink-3    { color: var(--ink-3); }
.u-gold     { color: var(--gold); }
.u-green    { color: var(--green-light); }

.u-uppercase { text-transform: uppercase; }
.u-tracked   { letter-spacing: 0.12em; }

.u-flex       { display: flex; }
.u-flex-center { display: flex; align-items: center; }
.u-between    { justify-content: space-between; }
.u-gap-8      { gap: 8px; }
.u-gap-16     { gap: 16px; }

.u-mt-8  { margin-top: 8px; }
.u-mt-16 { margin-top: 16px; }
.u-mt-24 { margin-top: 24px; }
.u-mt-32 { margin-top: 32px; }
.u-mb-8  { margin-bottom: 8px; }
.u-mb-16 { margin-bottom: 16px; }
.u-mb-24 { margin-bottom: 24px; }
