:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070b12;
  color: #f8fafc;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 20% 0%, #172033 0, #0b111d 36%, #070b12 72%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 430px); padding: 42px; border: 1px solid #293448; border-radius: 24px; background: rgba(18, 26, 42, .86); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); backdrop-filter: blur(18px); }
.brand-mark { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 24px; border-radius: 18px; color: white; font-size: 30px; font-weight: 800; background: linear-gradient(135deg, #fb923c, #ea580c); box-shadow: 0 18px 40px rgba(234, 88, 12, .26); }
.brand-mark.small { width: 42px; height: 42px; margin: 0; border-radius: 12px; font-size: 21px; }
.eyebrow { margin: 0 0 8px; color: #fb923c; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(28px, 5vw, 38px); }
h2 { margin-bottom: 0; font-size: 25px; }
.muted { color: #94a3b8; line-height: 1.6; }
.stack { display: grid; gap: 14px; margin-top: 28px; }
label { display: grid; gap: 8px; color: #cbd5e1; font-size: 13px; font-weight: 700; }
input, select { width: 100%; border: 1px solid #334155; border-radius: 11px; padding: 13px 14px; color: #f8fafc; background: #0b1220; outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus { border-color: #fb923c; box-shadow: 0 0 0 3px rgba(251, 146, 60, .14); }
.button { border: 0; border-radius: 11px; padding: 12px 16px; color: #fff; font-weight: 800; transition: transform .15s, opacity .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button.primary { background: linear-gradient(135deg, #fb923c, #ea580c); box-shadow: 0 12px 26px rgba(234, 88, 12, .2); }
.button.ghost { color: #cbd5e1; background: #1e293b; }
.button.danger { color: #fecaca; background: #3f1d27; }
.button.compact { padding: 8px 10px; font-size: 12px; }
.error { margin: 0; color: #fca5a5; font-size: 13px; }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 14px max(24px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid rgba(51, 65, 85, .72); background: rgba(7, 11, 18, .82); backdrop-filter: blur(16px); }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-row strong, .brand-row span { display: block; }
.brand-row span { margin-top: 2px; color: #64748b; font-size: 12px; }
.page { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 64px; }
.panel { margin-bottom: 24px; padding: 28px; border: 1px solid #243047; border-radius: 20px; background: rgba(17, 25, 40, .82); box-shadow: 0 20px 55px rgba(0, 0, 0, .24); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wide { grid-column: 1 / -1; }
.stats { display: grid; grid-template-columns: auto auto auto auto; align-items: baseline; gap: 5px 9px; color: #64748b; font-size: 12px; }
.stats strong { color: #f8fafc; font-size: 22px; }
.search-label { margin-bottom: 18px; }
.links-list { display: grid; gap: 12px; }
.link-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 18px; border: 1px solid #28364d; border-radius: 15px; background: #0b1220; }
.link-code { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: #fb923c; font: 800 15px ui-monospace, SFMono-Regular, Menlo, monospace; text-decoration: none; }
.link-title { margin: 0 0 6px; color: #f8fafc; font-weight: 800; }
.destination { display: block; max-width: 720px; overflow: hidden; color: #94a3b8; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; color: #64748b; font-size: 12px; }
.status { color: #86efac; }
.status:not(.active) { color: #fbbf24; }
.actions { display: flex; flex-wrap: wrap; align-content: center; justify-content: flex-end; gap: 8px; }
.empty { padding: 42px 12px; color: #64748b; text-align: center; }
.notice { margin-bottom: 18px; padding: 13px 16px; border: 1px solid #365314; border-radius: 12px; color: #d9f99d; background: #1a2e12; }
.notice.error { border-color: #7f1d1d; color: #fecaca; background: #2b1218; }

@media (max-width: 720px) {
  .login-card, .panel { padding: 22px; }
  .create-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .list-heading { align-items: flex-start; flex-direction: column; }
  .link-card { grid-template-columns: 1fr; }
  .actions { justify-content: flex-start; }
  .destination { max-width: calc(100vw - 92px); }
}

