:root {
  /* promptfence.io brand palette (light) */
  --bg: #FDFBF8;          /* warm off-white body */
  --panel: #FFFFFF;       /* cards / raised surfaces */
  --panel-2: #F2F0EB;     /* warm surface / active states */
  --line: #E5E2DD;        /* subtle border */
  --line-strong: #D1CEC8; /* stronger border */
  --text: #111111;
  --muted: #555555;
  --faint: #888888;
  --accent: #FF5500;      /* signature orange */
  --accent-dark: #CC4400;
  --accent-glow: rgba(255, 85, 0, 0.15);
  --accent-ink: #FFFFFF;  /* text on the orange accent */
  --safe: #10B981;
  --warn: #F59E0B;
  --block: #DC2626;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 12px 32px rgba(0,0,0,0.08);
  --font-head: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-family: var(--font-head); letter-spacing: -0.01em; }
.pf-logo { display: block; flex: none; }
.brand-suffix { color: var(--muted); font-weight: 600; font-size: 14px; }
.brand-mark { color: var(--accent); }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; }

/* Login (shared with workspace look) */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-md); }
.login-sub { color: var(--muted); margin: 12px 0 24px; font-size: 14px; }
.login-card form { display: flex; flex-direction: column; gap: 6px; }
.login-card label { font-size: 13px; color: var(--muted); margin-top: 10px; }
.login-card input { background: var(--bg); border: 1px solid var(--line-strong); color: var(--text); border-radius: 8px; padding: 11px 12px; transition: border-color .12s, box-shadow .12s; }
.login-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
#login-btn { margin-top: 18px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 9px; padding: 12px; font-weight: 700; font-size: 14px; transition: background .12s; }
#login-btn:hover { background: var(--accent-dark); }
.error { color: var(--block); font-size: 13px; }

/* Shell */
.shell { display: grid; grid-template-columns: 240px 1fr; height: 100%; }
.sidebar { border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 20px; background: var(--bg); }
.sidebar .brand { font-size: 17px; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav a { color: var(--muted); text-decoration: none; padding: 9px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; transition: background .12s, color .12s; }
#nav a:hover { background: var(--panel-2); color: var(--text); }
#nav a.active { background: var(--accent-glow); color: var(--accent-dark); font-weight: 650; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }

.content { padding: 34px 40px; overflow-y: auto; max-width: 1180px; }
.content h1 { font-size: 27px; margin: 0 0 5px; font-family: var(--font-head); font-weight: 800; letter-spacing: -0.025em; }
.content .sub { color: var(--muted); margin: 0 0 26px; font-size: 14.5px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 22px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.tile .n { font-size: 32px; font-weight: 800; font-family: var(--font-head); letter-spacing: -0.03em; line-height: 1.05; }
.tile .l { color: var(--muted); font-size: 12.5px; margin-top: 4px; font-weight: 500; }
.tile.flag .n { color: var(--warn); }
.tile.block .n { color: var(--block); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 4px; }
th:last-child, td:last-child { padding-right: 4px; }
th { color: var(--faint); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; }
tbody tr:hover td { background: var(--panel-2); }
tbody tr:last-child td { border-bottom: 0; }
/* status pills — tinted, not outlined */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; }
.pill.block { color: var(--block); background: rgba(220,38,38,.10); }
.pill.warn, .pill.redact { color: #B45309; background: rgba(245,158,11,.16); }
.pill.monitor { color: var(--muted); background: var(--panel-2); }
.pill.allow { color: var(--faint); background: var(--panel-2); }

/* Toolbar */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
select, input[type="text"], input[type="email"], input[type="password"] { background: var(--panel); border: 1px solid var(--line-strong); color: var(--text); border-radius: 8px; padding: 8px 11px; font: inherit; font-size: 13.5px; transition: border-color .12s, box-shadow .12s; }
select:hover, input[type="text"]:hover { border-color: var(--faint); }
select:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* Forms / panels */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
/* chart/section layout + headers (dashboard polish) */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.grid2 > .card { margin-bottom: 0; }
.card-h { font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: -0.015em; margin-bottom: 14px; color: var(--text); }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
/* horizontal bar charts — labelled, separated rows, stacked value+sub */
.bars { margin-top: 2px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 84px; align-items: center; gap: 14px; padding: 9px 0; }
.bar-row + .bar-row { border-top: 1px solid var(--line); }
.bar-label { font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 16px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 6px; min-width: 3px; }
.bar-val { text-align: right; line-height: 1.1; }
.bar-val b { font-family: var(--font-head); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.bar-sub { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .name { font-size: 13.5px; font-weight: 500; }
.row input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); }
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 9px; padding: 9px 15px; font-weight: 600; font-size: 13.5px; transition: background .12s, transform .03s, box-shadow .12s; }
.btn:hover { background: var(--accent-dark); box-shadow: 0 2px 8px var(--accent-glow); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); box-shadow: none; }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--faint); }
.note { color: var(--muted); font-size: 13px; }
.saved { color: var(--safe); font-size: 13px; }
.prov { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.empty-state { color: var(--faint); padding: 28px 0; text-align: center; font-size: 13.5px; }

/* data-app niceties: aligned numerals, branded checkboxes, quiet scrollbars */
.tile .n, .bar-val b, .bar-sub, table td { font-variant-numeric: tabular-nums; }
input[type="checkbox"] { accent-color: var(--accent); }
.content::-webkit-scrollbar { width: 11px; height: 11px; }
.content::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; border: 3px solid var(--bg); }
.content::-webkit-scrollbar-thumb:hover { background: var(--faint); }
.content::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  #nav { flex-direction: row; flex-wrap: wrap; }
}
