/*
 * JimmyD Shared Theme — "Editorial Warm"
 * A light, sharp, modern theme. No glassmorphism, no gradient text,
 * no purple-blue AI palette. Just clean typography and warm tones.
 *
 * Usage: <link rel="stylesheet" href="jimmyd-theme.css">
 * Then override only app-specific styles in a <style> block after it.
 */

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

:root {
  /* Palette */
  --bg:       #faf8f5;   /* warm off-white */
  --surface:  #ffffff;   /* pure white cards/panels */
  --border:   #e2ddd6;   /* warm gray border */
  --border-d: #d0c8bd;   /* darker border for emphasis */
  --text:     #2c2824;   /* near-black with warm undertone */
  --text-dim: #7a736b;  /* muted warm gray */
  --accent:   #b45309;   /* warm amber/ochre — single accent */
  --accent-h: #92400e;   /* darker amber for hover */
  --accent-l: #fef3c7;   /* pale amber for backgrounds/chips */
  --danger:   #c62828;
  --danger-l: #fce8e8;
  --success:   #2e7d32;
  --success-l: #e8f5e9;
  --info:     #1565c0;
  --info-l:   #e3f2fd;

  /* Typography */
  --font-sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;

  /* Spacing / Radius */
  --r: 4px;         /* sharp corners — no pillowy rounding */
  --r-sm: 2px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}

/* ─── Typography ────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; color: var(--text); }
h1 { font-size: 1.5rem; letter-spacing: -0.01em; }
h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); font-family: var(--font-sans); font-weight: 600; }
h3 { font-size: 1.1rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

.muted { color: var(--text-dim); }
.small  { font-size: 0.8rem; }

/* ─── Layout ────────────────────────────────────────────── */
.wrap { max-width: 1400px; margin: 0 auto; padding: 24px; }

/* ─── Header ────────────────────────────────────────────── */
/* Clean, flat, no glassmorphism */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 20px;
}

header .title {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  /* NO gradient text — just solid color */
}

/* ─── Panels / Cards ────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel .head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 600;
}

.panel .body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ─── Form Controls ─────────────────────────────────────── */
input[type=text],
input[type=password],
input[type=number],
input[type=date],
input[type=time],
select,
textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}

input[type=text]:focus,
input[type=password]:focus,
input[type=number]:focus,
input[type=date]:focus,
input[type=time]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.12);
}

input[type=text]::placeholder,
textarea::placeholder {
  color: var(--text-dim);
  opacity: 0.7;
}

textarea { resize: vertical; min-height: 80px; }

input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }

label {
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
label.inline { flex-direction: row; align-items: center; gap: 8px; cursor: pointer; user-select: none; }

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--bg); border-color: var(--border-d); }

.btn.accent,
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.accent:hover,
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); }

.btn.danger {
  border-color: rgba(198, 40, 40, 0.3);
}
.btn.danger:hover {
  background: var(--danger-l);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-sm { padding: 4px 8px; font-size: 0.75rem; }

/* ─── Chips / Tags ──────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-l);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--r);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.chip:hover { border-color: var(--border-d); }

/* ─── Stat / KPI Boxes ──────────────────────────────────── */
.stat-card,
.kpi-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
}
.stat-card .value,
.kpi-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}
.stat-card .label,
.kpi-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 600;
}

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background-color: var(--border-d); border-radius: 3px; }
