/* Site Fuel Admin — editorial/industrial dashboard theme.
   Pure CSS, tag-selector driven: templates emit plain semantic HTML
   (h1/h2/h3, table, form, label, input, textarea, button, p, ul), so
   this file styles those directly rather than requiring class hooks. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
  --ink:        #1c1a17;
  --ink-soft:   #4a463f;
  --paper:      #f5efe4;
  --paper-raised: #fffdf8;
  --line:       #e3d9c4;
  --rust:       #c1501f;
  --rust-dark:  #9c3d16;
  --amber:      #e8a23a;
  --shadow:     0 1px 2px rgba(28, 26, 23, 0.06), 0 8px 24px -12px rgba(28, 26, 23, 0.18);
  --radius:     10px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:  'Public Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(193, 80, 31, 0.08), transparent 60%),
    var(--paper);
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Top nav ---------- */

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  align-items: center;
  background: var(--ink);
  color: #f1ece0;
  padding: 0.9rem 2rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}

nav a:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: #fff;
  margin-right: 0.75rem;
  text-decoration: none;
}

nav a:first-child::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  background: var(--rust);
  border-radius: 2px;
  margin-right: 0.5em;
  transform: rotate(45deg);
}

nav a {
  color: #d8d2c4;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

nav a:hover { color: #fff; border-color: var(--rust); }

nav span {
  margin-left: auto;
  color: #9c9584;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

nav form { margin: 0; }

nav button {
  background: transparent;
  color: #d8d2c4;
  border: 1px solid #4a463f;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  border-radius: 6px;
  margin-top: 0;
}
nav button:hover { border-color: var(--rust); color: #fff; background: transparent; }

/* ---------- Layout ---------- */

main {
  display: block;
  max-width: 880px;
  margin: 2.5rem auto 5rem;
  padding: 2.5rem 3rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.flash {
  max-width: 880px;
  margin: 1.5rem auto -1rem;
  background: #fdf1de;
  border: 1px solid #edc98a;
  border-left: 4px solid var(--amber);
  color: #6b4a12;
  padding: 0.75rem 1.1rem;
  border-radius: 6px;
  font-size: 0.92rem;
}

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 2.1rem;
  margin: 0 0 1.5rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.35rem;
  margin: 2.75rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

h3 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--ink-soft);
}

p { color: var(--ink-soft); }
strong { color: var(--ink); }

a { color: var(--rust-dark); }
a:hover { color: var(--rust); }

/* ---------- Forms ---------- */

form { margin: 0.25rem 0; }

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 1rem 0 0.35rem;
}
label:has(input[type="checkbox"]) {
  text-transform: none;
  font-weight: 500;
  letter-spacing: normal;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  max-width: 480px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea { max-width: 560px; font-family: ui-monospace, 'JetBrains Mono', monospace; font-size: 0.85rem; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(193, 80, 31, 0.15);
}

input[type="checkbox"] { width: auto; max-width: none; accent-color: var(--rust); }

button, input[type="submit"] {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: 0.55rem 1.15rem;
  margin-top: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
button:hover, input[type="submit"]:hover { background: var(--rust-dark); border-color: var(--rust-dark); }
button:active, input[type="submit"]:active { transform: translateY(1px); }

/* ---------- Tables ---------- */

table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5rem 0 1.5rem;
  font-size: 0.9rem;
}

th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
  padding: 0.5rem 0.75rem;
}

td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
  vertical-align: top;
}

tr:hover td { background: #faf5ea; }

/* ---------- Dashboard tiles ---------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.35rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tile:hover {
  transform: translateY(-3px);
  border-color: var(--rust);
  box-shadow: 0 4px 6px rgba(28, 26, 23, 0.06), 0 14px 28px -12px rgba(193, 80, 31, 0.35);
}

.tile-icon {
  color: var(--rust);
  font-size: 1.1rem;
  line-height: 1;
}

.tile-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}

.tile-desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ---------- Misc components ---------- */

.chip {
  display: inline-block;
  background: #f2e4cf;
  color: var(--rust-dark);
  border: 1px solid #e6cfa4;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.1rem 0.15rem 0.1rem 0;
}

pre {
  background: #241f19;
  color: #e8dfcd;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
}

ul { padding-left: 1.25rem; color: var(--ink-soft); }
li { margin: 0.3rem 0; }

/* ---------- Login page ---------- */

body:has(main form[action^="/login"]) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  flex-direction: column;
  gap: 2rem;
}
body:has(main form[action^="/login"]) main {
  margin: 0;
  width: 100%;
  max-width: 380px;
}
