/* Craftrader Design System */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Caveat:wght@400;600&family=Geist:wght@400;500;600;700&display=swap');

:root {
  --brand: #6B8169;
  --brand-deep: #3D4F3C;
  --brand-soft: #8FA28C;
  --brand-tint: #E5EBE3;
  --clay: #C49A6C;
  --bone: #F5F1E8;
  --bone-soft: #FAF7F0;
  --ink: #2B2E27;
  --ink-2: #5F665B;
  --line: rgba(43,46,39,0.10);
  --paper: #FFFCF5;
  --success: #5A7A4C;
  --danger: #B83C3C;
  --warning: #C28E1A;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Geist', -apple-system, sans-serif;
  background: var(--bone);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
em { font-style: italic; font-family: 'Fraunces', serif; }
.serif { font-family: 'Fraunces', serif; font-weight: 500; letter-spacing: -0.02em; }
.handwritten { font-family: 'Caveat', cursive; font-weight: 500; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* === NAV === */
.nav {
  background: rgba(245,238,227,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 16px 32px;
  position: sticky; top: 0; z-index: 50;
}
.nav-in {
  max-width: 1440px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px;
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 26px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.03em;
  display: flex; align-items: center; gap: 8px;
}
.logo-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--bone), 0 0 0 4px var(--brand);
}
.nav-mid { display: flex; gap: 28px; }
.nav-mid a { color: var(--ink-2); font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-mid a:hover { color: var(--brand); }
.nav-r { display: flex; gap: 8px; align-items: center; }

/* === BUTTONS === */
.btn { padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: all .2s; border: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(0,0,0,0.04); }
.btn-dark { background: var(--ink); color: var(--bone); }
.btn-dark:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: white; padding: 10px 20px; }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(184,90,60,0.35); }
.btn-outline { background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* === CARDS === */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}
.card-lg { padding: 32px; border-radius: 24px; }

/* === FORM === */
.field { margin-bottom: 18px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.field-input, .field-select, .field-textarea {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bone-soft);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  transition: all .2s;
}
.field-input:focus, .field-select:focus, .field-textarea:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(184,90,60,0.1);
}
.field-input::placeholder, .field-textarea::placeholder { color: #b8a690; }
.field-textarea { min-height: 120px; resize: vertical; line-height: 1.5; }

/* === SECTION === */
.container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.section { padding: 60px 32px; max-width: 1440px; margin: 0 auto; }
.sec-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  color: var(--brand);
  text-transform: uppercase; letter-spacing: 0.15em;
  margin-bottom: 12px;
}
.sec-tag::before { content: '✦'; }
.sec-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin-bottom: 12px;
}
.sec-title em { color: var(--brand); font-style: italic; }
.sec-sub { color: var(--ink-2); font-size: 15px; }

/* === BADGE === */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge-success { background: rgba(45,122,79,0.12); color: var(--success); }
.badge-danger { background: rgba(184,60,60,0.12); color: var(--danger); }
.badge-warning { background: rgba(194,142,26,0.12); color: var(--warning); }
.badge-brand { background: var(--brand-tint); color: var(--brand-deep); }
.badge-neutral { background: var(--bone); color: var(--ink-2); }

/* === STAT === */
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}
.stat-card .label {
  font-size: 12px; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.stat-card .value {
  font-family: 'Fraunces', serif;
  font-size: 32px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.stat-card .meta { font-size: 13px; color: var(--success); }
.stat-card .meta.neg { color: var(--danger); }

/* === SIDEBAR LAYOUT === */
.app-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 73px); }
.sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 20px 0;
}
.sidebar-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  padding: 0 24px;
  margin: 16px 0 8px;
  font-weight: 700;
}
.sidebar-title:first-child { margin-top: 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px;
  color: var(--ink-2);
  font-size: 14px; font-weight: 500;
  transition: all .15s;
}
.nav-item:hover { background: var(--bone-soft); color: var(--brand); }
.nav-item.active {
  background: var(--brand-tint);
  color: var(--brand-deep);
  border-right: 3px solid var(--brand);
}
.nav-item .ic { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.main { padding: 32px; }

/* === TABLE === */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 16px; font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.5px; background: var(--bone-soft); border-bottom: 1px solid var(--line); }
td { padding: 16px; font-size: 14px; border-bottom: 1px solid var(--line); }
tr:hover { background: var(--bone-soft); }

/* === FOOTER === */
.footer-simple {
  background: var(--ink);
  color: var(--bone);
  padding: 40px 32px;
  text-align: center;
  font-size: 13px;
}
.footer-simple a { color: var(--brand-soft); margin: 0 12px; }
.footer-simple a:hover { color: var(--clay); }

footer {
  background: var(--ink);
  color: var(--bone);
  padding: 80px 32px 40px;
}
.f-in { max-width: 1440px; margin: 0 auto; }
.f-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.f-brand .logo { color: var(--bone); margin-bottom: 16px; }
.f-brand p { color: rgba(245,238,227,0.6); font-size: 14px; max-width: 280px; line-height: 1.6; }
.f-col h5 { font-size: 13px; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.12em; }
.f-col a { display: block; color: rgba(245,238,227,0.6); padding: 6px 0; font-size: 14px; transition: color .2s; }
.f-col a:hover { color: var(--brand-soft); }
.f-bot { padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: rgba(245,238,227,0.5); }

/* === HEADINGS === */
h1, h2, h3, h4 { font-family: 'Fraunces', serif; font-weight: 500; letter-spacing: -0.02em; }

/* === UTILS === */
.flex { display: flex; }
.grid { display: grid; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.text-center { text-align: center; }
.text-ink-2 { color: var(--ink-2); }
.text-brand { color: var(--brand); }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; }

@media (max-width: 900px) {
  .nav-mid { display: none; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .f-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .f-brand { grid-column: span 2; }
  .nav, .main, .section { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 600px) {
  .f-top { grid-template-columns: 1fr; }
  .f-brand { grid-column: auto; }
}
