:root {
  color-scheme: dark;
  --bg: #0c0b0d;
  --panel: #161418;
  --edge: #342b32;
  --ink: #fff5f6;
  --muted: #c3afb7;
  --red: #fe3b4f;
  --light-red: #ff6b7c;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 290px; min-height: 100vh; background: var(--bg); color: var(--ink); }
.shell { width: min(1150px, calc(100% - 48px)); margin-inline: auto; }
.top { border-bottom: 1px solid var(--edge); background: #100e11; }
.top-inner, nav, .brand, .actions { display: flex; align-items: center; gap: .8rem; }
.top-inner { min-height: 72px; justify-content: space-between; flex-wrap: wrap; padding-block: .65rem; }
nav { flex-wrap: wrap; }
a { color: inherit; text-decoration: none; }
nav a:hover, .text-link:hover { color: var(--light-red); }
.brand { letter-spacing: .11em; font-weight: 840; font-size: .82rem; }
.brand i { color: var(--light-red); font-style: normal; }
.mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--red); color: #1b080e; font-weight: 900; letter-spacing: -.08em; }
main { padding-block: clamp(1.5rem, 4vw, 3.2rem) 5rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); line-height: .98; letter-spacing: -.075em; }
h2 { font-size: 1.32rem; letter-spacing: -.025em; }
p { color: var(--muted); }
.login-grid {
  display: grid; grid-template-columns: 1.28fr 1fr; gap: clamp(.9rem, 2.5vw, 1.6rem);
  align-items: stretch; margin-top: clamp(.7rem, 5vh, 3rem);
}
.login-intro {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column;
  justify-content: center; min-height: 390px; padding: clamp(1.4rem, 4.6vw, 3.7rem);
  background: radial-gradient(ellipse at right top,#6c0d22,transparent 70%), linear-gradient(130deg,#28131c,#140e12 80%);
  border: 1px solid #663443; border-radius: 20px;
}
.login-intro::before {
  pointer-events: none; content: ""; position: absolute; z-index: -1; inset: -35%;
  background: repeating-linear-gradient(125deg,transparent 0 31px,#ff7b9620 32px 33px,transparent 34px 65px);
  mask-image: radial-gradient(ellipse at 75% 27%,black,transparent 62%);
}
.login-intro h1 { max-width: 9ch; }
.login-intro h1 em { font-style: normal; color: var(--light-red); }
.login-intro p { max-width: 34ch; margin-top: 1rem; }
.logo-display {
  align-self: start; border: 1px solid #fb4f65; background: #2d111a; color: #ff6378;
  padding: .25em .4em; border-radius: .3em; font-weight: 900; letter-spacing: -.08em;
  font-size: 2.05rem; margin-bottom: 1.3rem;
}
.logo-display span { color: #ff9aab; margin-left: .3em; font-size: .65em; }
.panel { border: 1px solid var(--edge); background: var(--panel); border-radius: 16px; min-width: 0; }
.login-card { padding: clamp(1.4rem,4vw,2.8rem); align-content: center; border-top: 2px solid #a82c40; }
.login-card h2 { font-size: 1.65rem; }
.fields { display: grid; gap: .95rem; margin-top: 1rem; }
label { display: grid; gap: .35rem; font-weight: 650; font-size: .92rem; }
input, button { font: inherit; }
input:not([type=checkbox]) {
  width: 100%; min-width: 0; min-height: 44px; border: 1px solid #51414b; border-radius: 8px;
  color: var(--ink); background: #0f0d10; padding: .5rem .7rem;
}
input[type=checkbox] { accent-color: var(--red); }
.check { display: flex; align-items: center; gap: .45rem; color: var(--muted); }
button {
  padding: .58rem .8rem; border: 1px solid #fe6172; border-radius: 8px; min-height: 42px;
  display: inline-flex; justify-content: center; align-items: center; gap: .55rem;
  background: var(--red); color: #17080e; cursor: pointer; font-weight: 780;
}
button:hover { background: #ff7a89; }
.quiet { background: #211a20; border-color: #4a3b45; color: var(--ink); }
.quiet:hover { background: #32262e; }
.login-card button { margin-top: .25rem; justify-content: space-between; }
:focus-visible { outline: 2px solid #ffacb4; outline-offset: 3px; }
.page-heading { padding: .55rem 0 1.55rem; }
.page-heading p { margin-top: .65rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,250px),1fr)); gap: 1rem; }
.tile { padding: 1.15rem; min-height: 185px; display: flex; flex-direction: column; gap: .38rem; transition: border-color .15s, background .15s; }
.tile:hover { border-color: var(--light-red); background: #24161d; }
.tile-top { display: flex; justify-content: space-between; align-items: start; margin-bottom: .25rem; }
.tile-icon { display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 .3rem; border-radius: 10px; background: #451521; color: #ffadba; font-weight: 850; }
.up-arrow { color: var(--light-red); font-size: 1.28rem; }
.tile-link { margin-top: auto; padding-top: .65rem; font-size: .84rem; color: var(--light-red); font-weight: 720; }
.admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 1rem; }
.settings, .empty { padding: 1.2rem; }
.empty .text-link { display: inline-block; margin-top: .4rem; }
.split { display: grid; grid-template-columns: 1fr minmax(80px, .42fr); gap: .65rem; }
.settings .fields > button { justify-self: start; }
.actions { flex-wrap: wrap; }
details { border-top: 1px solid var(--edge); margin-top: .8rem; padding: .55rem 0; }
summary { cursor: pointer; overflow-wrap: anywhere; }
.status { color: var(--muted); font-size: .79rem; margin-left: .35rem; }
.narrow { max-width: 520px; }
.notice { border: 1px solid #486b4d; background: #19261d; border-radius: 8px; padding: .65rem .9rem; color: #ddf7e4; margin: .45rem 0 .8rem; }
.notice.error { border-color: #8a3545; background: #35151f; color: #ffbdc7; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 740px) {
  .shell { width: calc(100% - 28px); }
  .login-grid, .admin-grid { grid-template-columns: 1fr; }
  .login-intro { min-height: 250px; }
  nav { font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } }
