/* Tabby admin — follows .superpowers/brainstorm/.../admin-screens.html. Pink accent #e8466c. */
:root {
  --accent: #e8466c;
  --accent-dark: #c22a55;
  --accent-soft: #fde3ea;
  --ink: #222;
  --muted: #888;
  --line: #eee;
  --side: #f6f3f0;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--ink); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent-dark); }
h1 { margin: 0 0 4px; font-size: 20px; }
h2 { margin: 0 0 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
h3 { margin: 14px 0 4px; font-size: 14px; }
input, select, textarea, button { font: inherit; }
input:not([type=checkbox]), select, textarea { border: 1px solid #ddd; border-radius: 6px; padding: 5px 8px; max-width: 100%; background: #fff; }
textarea { width: 100%; }

.adm { display: flex; min-height: 100vh; }
.side { width: 190px; flex: none; background: var(--side); padding: 16px 10px; border-right: 1px solid #e7e1db; }
.side .brand { font-weight: 700; color: var(--accent); margin: 0 8px 14px; font-size: 15px; }
.side a.i { display: block; padding: 6px 8px; border-radius: 6px; margin-bottom: 2px; color: #444; text-decoration: none; }
.side a.i:hover { background: #fff; }
.side a.i.on { background: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.side .who { margin: 28px 8px 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.side .who a { color: var(--muted); }
.main { flex: 1; min-width: 0; padding: 20px 24px; max-width: 1100px; }
.adm.bare .main { display: flex; justify-content: center; align-items: flex-start; padding-top: 10vh; }

.sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.inh { color: #999; font-size: 12px; }
.crumb { margin: 0 0 8px; font-size: 13px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }

.scroll { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; padding: 6px 4px; border-bottom: 1px solid var(--line); }
td { padding: 8px 4px; border-bottom: 1px solid #f2f2f2; vertical-align: top; overflow-wrap: anywhere; }
table.cards td { padding: 4px; font-size: 13px; }
table.cards td.url { color: var(--muted); }

.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.pro { background: var(--accent-soft); color: var(--accent-dark); }
.free { background: #eee; color: #555; }
.ok { background: #dff3e4; color: #237a3b; }
.off { background: #f6e0e0; color: #a33; }

.btn, .ghost, button.link { cursor: pointer; text-decoration: none; display: inline-block; }
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 6px 14px; font-size: 13px; font-weight: 600; }
.btn:hover { background: var(--accent-dark); }
.ghost { border: 1px solid #ddd; background: #fff; color: var(--ink); border-radius: 6px; padding: 4px 10px; font-size: 12px; }
.ghost:hover { border-color: var(--accent); }
.ghost.danger { color: #a33; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: 12px; }

.box { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 > .box { margin-bottom: 0; }
.grid2 + .box, .grid2 + section { margin-top: 14px; }
.gapb { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f2f2f2; flex-wrap: wrap; }
.ctl { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
form.stack { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
form.stack label { display: flex; flex-direction: column; gap: 3px; width: 100%; }
form.stack label.row { flex-direction: row; }
form.narrow { max-width: 360px; }
form.row-form { padding: 8px 0; border-bottom: 1px solid #f2f2f2; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pager { display: flex; gap: 8px; margin: 10px 0; }

details.add { position: relative; }
details.add summary { list-style: none; }
details.add summary::-webkit-details-marker { display: none; }
details.add[open] form { position: absolute; right: 0; z-index: 2; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-top: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.meterrow { margin-bottom: 10px; }
progress { display: block; width: 100%; height: 6px; margin-top: 4px; border: 0; border-radius: 3px; background: #eee; appearance: none; -webkit-appearance: none; }
progress::-webkit-progress-bar { background: #eee; border-radius: 3px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 3px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 3px; }
progress.over::-webkit-progress-value { background: #a33; }

/* Switch look for checkboxes (default / lock / smart features). */
input.tog { appearance: none; -webkit-appearance: none; width: 30px; height: 16px; border-radius: 8px; background: #ccc; position: relative; cursor: pointer; vertical-align: middle; margin: 0; flex: none; }
input.tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .15s; }
input.tog:checked { background: var(--accent); }
input.tog:checked::after { left: 16px; }
input.tog:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

.flash { padding: 8px 12px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.flash.ok { background: #dff3e4; color: #1d5e2f; }
.flash.err { background: #f6e0e0; color: #8a2020; }

.login { width: 100%; max-width: 360px; padding: 20px; }
.login h1 { color: var(--accent); }
.login form.stack button { align-self: stretch; }

@media (max-width: 760px) {
  .adm { flex-direction: column; }
  .side { width: auto; border-right: 0; border-bottom: 1px solid #e7e1db; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 10px; }
  .side .brand { width: 100%; margin-bottom: 6px; }
  .side .who { margin: 6px 8px 0; width: 100%; }
  .main { padding: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  details.add[open] form { position: static; width: auto; }
}
