/* admin.css — the licence server's entire stylesheet.
   Compiled into the binary (go:embed in render.go); there is no theme
   directory to deploy. Class names match the CMS admin panel this was
   split out of, so the two panels look and feel like the same tool. */

:root {
  --bg: #fffaf5;
  --bg-alt: #fbf7f2;
  --surface: #ffffff;
  --border: #ece3d8;
  --text: #241c14;
  --text-muted: #5c5145;
  --text-faint: #8a7c6d;
  --text-faintest: #a99884;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-soft-bg: #fff1e6;
  --accent-soft-text: #9a3412;
  --dark-surface: #241a10;
  --dark-text: #f1e9df;
  --dark-text-muted: #c9b8a6;
  --ok: #16a34a;
  --warn: #c07a00;
  --bad: #dc2626;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

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

h1 { font: 700 24px 'Roboto', sans-serif; margin: 0 0 20px; }
h2 { font: 700 19px 'Roboto', sans-serif; margin: 0 0 14px; }
h3 { font: 700 16px 'Roboto', sans-serif; margin: 0 0 12px; }

.mono { font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace; }
.muted { color: var(--text-faint); }
.small { font-size: 12.5px; }

/* ---------- shell ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 230px; flex: none;
  background: var(--dark-surface); color: var(--dark-text);
  padding: 20px 14px;
}
.admin-sidebar a {
  display: block; padding: 8px 10px; border-radius: 6px;
  color: var(--dark-text-muted); font: 500 14px 'Roboto', sans-serif; margin-bottom: 2px;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,.08); color: #fff; text-decoration: none;
}
.admin-brand { font: 900 17px 'Roboto', sans-serif; color: #fff; margin-bottom: 6px; padding: 0 10px; }
.admin-brand-sub { font: 400 11.5px 'Roboto', sans-serif; color: var(--dark-text-muted); margin-bottom: 20px; padding: 0 10px; }
.admin-sidebar-group {
  font: 700 10.5px 'Roboto', sans-serif; letter-spacing: .08em; text-transform: uppercase;
  color: #6f5c46; margin: 18px 10px 6px;
}
.admin-main { flex: 1; padding: 30px 36px; max-width: 1180px; }

/* ---------- buttons ---------- */
.btn-primary, .btn-secondary {
  padding: 11px 22px; border-radius: 8px;
  font: 600 14.5px 'Roboto', sans-serif; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  border: none; text-decoration: none !important;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--bg-alt); color: var(--text); }
.btn-small { padding: 7px 13px; font-size: 13px; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- cards & tables ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.card-pad { padding: 20px 24px; }
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px 4px;
}
.card-head h3 { margin: 0; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  text-align: left; padding: 9px 14px;
  border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: top;
}
.admin-table th {
  color: var(--text-faint); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.admin-table tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }

.tag {
  display: inline-block; padding: 3px 9px;
  background: var(--accent-soft-bg); color: var(--accent-soft-text);
  border-radius: 6px; font: 600 11.5px 'Roboto', sans-serif; white-space: nowrap;
}
.tag-off { background: #f1eee9; color: var(--text-faint); }
.ok  { color: var(--ok); }
.bad { color: var(--bad); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }

/* ---------- forms ---------- */
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block; font: 600 13px 'Roboto', sans-serif;
  margin-bottom: 6px; color: var(--text-muted);
}
.form-row input[type=text], .form-row input[type=password], .form-row input[type=email],
.form-row input[type=date], .form-row input[type=number],
.form-row select, .form-row textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  font: 400 14px 'Roboto', sans-serif; background: var(--surface); color: var(--text);
}
.form-row textarea { font-family: inherit; min-height: 64px; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-row .hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 20px; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form select, .inline-form input {
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px;
  font: 400 12.5px 'Roboto', sans-serif; background: var(--surface); color: var(--text);
}
.inline-form input[type=email] { width: 150px; }

/* ---------- flashes ---------- */
.flash-ok {
  padding: 10px 14px; background: #ecfdf5; border: 1px solid #a7f3d0;
  color: #065f46; border-radius: 8px; margin-bottom: 18px; font-size: 14px;
}
.flash-err {
  padding: 10px 14px; background: #fef2f2; border: 1px solid #fecaca;
  color: #991b1b; border-radius: 8px; margin-bottom: 18px; font-size: 14px;
}

/* ---------- dashboard tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 24px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.tile-label { font: 600 11.5px 'Roboto', sans-serif; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }
.tile-value { font: 800 30px 'Roboto', sans-serif; margin-top: 4px; }
.tile-value.bad { color: var(--bad); }

/* ---------- misc ---------- */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-intro { color: var(--text-faint); font-size: 13.5px; margin: -10px 0 20px; }
.pager { display: flex; gap: 8px; align-items: center; padding: 12px 16px; }
.admin-login-wrap { max-width: 360px; margin: 12vh auto; }
code {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  background: var(--accent-soft-bg); padding: 1px 5px; border-radius: 4px; font-size: .9em;
}
