/* push.denys.fast — Pushover gateway panel.
   Built on the canonical denys.fast tokens (tokens.css). Implements the
   "Velocity" UI language by hand: skewed plinths, chevron markers, speed-line
   ornament, double-ring focus. transform/opacity only; reduced-motion safe. */
@import url('https://fonts.googleapis.com/css2?family=Saira:ital,wght@1,800&family=Geist:wght@400;500;700&family=Geist+Mono&family=Oxanium:wght@400;500;700&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur-slow), color var(--dur-slow);
}
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--selection-bg); }

.wrap { max-width: 1040px; margin: 0 auto; padding: var(--space-6) var(--space-5) var(--space-9); }

/* ---------- Header ---------- */
.topbar {
  display: flex; align-items: center; gap: var(--space-4);
  padding-bottom: var(--space-5); margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--divider);
}
.brand { display: flex; align-items: center; gap: var(--space-3); }
.brand img { height: 30px; width: auto; display: block; }
.svc-badge {
  font-family: var(--font-brand); font-style: italic; font-weight: 800;
  font-size: var(--fs-h6); letter-spacing: .01em;
  color: var(--on-primary); background: var(--primary);
  padding: 2px 12px 2px 10px; border-radius: var(--radius-sm);
  transform: skewX(-8deg); box-shadow: var(--shadow-sm);
}
.svc-badge > span { display: inline-block; transform: skewX(8deg); }
.topbar .meta { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); }
.ver { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--text-muted); }

/* theme switcher */
.themes { display: flex; gap: 6px; }
.themes button {
  width: 22px; height: 22px; border-radius: var(--radius-full);
  border: 1px solid var(--border-strong); cursor: pointer; padding: 0;
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-base);
}
.themes button:hover { transform: translateY(-1px) scale(1.08); }
.themes button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }
.sw-light { background: #fff; } .sw-cream { background: #F4EDE0; }
.sw-espresso { background: #1A1410; } .sw-obsidian { background: #000; }

/* ---------- Cards ---------- */
.card {
  position: relative; background: var(--surface-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: var(--space-5); box-shadow: var(--shadow-sm); overflow: hidden;
}
.card + .card { margin-top: var(--space-4); }
/* speed-line ornament — three lines top-left */
.card::before {
  content: ""; position: absolute; top: 16px; left: -2px; width: 26px; height: 2px;
  background: var(--primary); border-radius: var(--radius-full);
  box-shadow: 0 6px 0 -.5px var(--accent), 0 12px 0 -1px var(--border-strong);
  opacity: .9;
}
.card-head { display: flex; align-items: baseline; gap: var(--space-3); margin: 0 0 var(--space-4) var(--space-6); }
.card-head h2 { font-size: var(--fs-h5); font-weight: 700; margin: 0; }
.card-head .sub { font-size: var(--fs-caption); color: var(--text-muted); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 780px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- Overline ---------- */
.overline {
  font-size: var(--fs-overline); letter-spacing: var(--ls-overline);
  text-transform: uppercase; color: var(--text-muted); font-weight: 700;
}

/* ---------- Forms ---------- */
label.field { display: block; margin-top: var(--space-4); }
label.field:first-child { margin-top: 0; }
.lbl { display: block; font-size: var(--fs-caption); color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
input, select, textarea {
  font: inherit; width: 100%; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 10px 12px;
  transition: border-color var(--dur-base), box-shadow var(--dur-base), background var(--dur-base);
}
textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring);
}
input::placeholder, textarea::placeholder { color: var(--text-disabled); }
select[multiple] { padding: 4px; min-height: 96px; }
select[multiple] option { padding: 6px 8px; border-radius: var(--radius-sm); }
.mono { font-family: var(--font-mono); }
.hint { font-size: var(--fs-caption); color: var(--text-muted); margin-top: 6px; }

/* checkbox row */
.check { display: flex; align-items: center; gap: 8px; margin-top: var(--space-4); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.check span { font-size: var(--fs-body-sm); color: var(--text-secondary); }

/* ---------- Buttons (velocity plinth) ---------- */
.btn {
  position: relative; font: inherit; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius-md);
  padding: 10px 18px; color: var(--on-primary); background: var(--primary);
  transform: skewX(-8deg);
  transition: background var(--dur-base), transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-base);
  box-shadow: var(--shadow-sm);
}
.btn > span { display: inline-block; transform: skewX(8deg); }
.btn:hover { background: var(--primary-hover); transform: skewX(-8deg) translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { background: var(--primary-active); transform: skewX(-8deg) scale(.97); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: skewX(-8deg); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border-strong); box-shadow: none; }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { background: var(--error); }
.btn.danger:hover { background: var(--error); filter: brightness(1.08); }
.btn.danger:active { background: var(--error); filter: brightness(.92); }
.btn.lg { font-size: var(--fs-h6); padding: 14px 26px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-overline); font-weight: 700; letter-spacing: .02em;
  padding: 3px 10px; border-radius: var(--radius-full);
  border: 1px solid var(--border-strong); color: var(--text-secondary); background: var(--surface);
}
.badge::before { content: "›"; font-weight: 800; opacity: .7; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-full); background: currentColor; }
.badge.ok { color: var(--success); background: var(--success-soft); border-color: transparent; }
.badge.err { color: var(--error); background: var(--error-soft); border-color: transparent; }
.badge.warn { color: var(--warning); background: var(--warning-soft); border-color: transparent; }
.badge.info { color: var(--info); background: var(--info-soft); border-color: transparent; }
.badge.pri { color: var(--primary); background: var(--primary-soft); border-color: transparent; }
.badge.acked { color: var(--success); background: var(--success-soft); border-color: transparent; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: var(--space-1); margin-bottom: var(--space-5); border-bottom: 1px solid var(--divider); }
.tab {
  position: relative; font: inherit; font-weight: 500; cursor: pointer;
  background: none; border: none; color: var(--text-secondary);
  padding: 10px 14px 12px; border-radius: 0;
  transition: color var(--dur-base);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); font-weight: 700; }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px;
  background: var(--primary); border-radius: var(--radius-full);
  animation: tabin var(--dur-base) var(--ease-out);
}
@keyframes tabin { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); } }
.panel[hidden] { display: none; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: var(--fs-overline); letter-spacing: var(--ls-overline);
     text-transform: uppercase; color: var(--text-muted); font-weight: 700;
     padding: 0 10px 10px; border-bottom: 1px solid var(--border); }
td { padding: 11px 10px; border-bottom: 1px solid var(--divider); font-size: var(--fs-body-sm); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--dur-fast); }
tbody tr:hover { background: var(--surface); }
td .num { font-family: var(--font-num); }
.empty { color: var(--text-muted); font-size: var(--fs-body-sm); padding: var(--space-5); text-align: center; }

/* status line */
.statusline { font-size: var(--fs-body-sm); color: var(--text-secondary); margin: var(--space-4) 0 0; min-height: 20px; }
.statusline.ok { color: var(--success); } .statusline.err { color: var(--error); }

.actions { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-5); flex-wrap: wrap; }
code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-sunken);
       padding: 1px 6px; border-radius: var(--radius-sm); }
.tag-app { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--text-secondary); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
