:root {
  color-scheme: dark;
  --page: #10111c;
  --surface: #181a2b;
  --surface-raised: #1e2134;
  --control: #131523;
  --edge: #373b54;
  --text: #f6f5ff;
  --muted: #b5b9d1;
  --accent: #c2b0ff;
  --accent-bright: #d5c8ff;
  --primary-text: #20173b;
  --green: #a0f3c9;
  --orange: #ffcf96;
  --red: #ffb0c0;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--page);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100vh; margin: 0; background: radial-gradient(62rem 32rem at 80% -10%, #2b2348, transparent 70%); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-bright); }
button, input, textarea { font: inherit; }
button, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1[tabindex="-1"]:focus { outline: none; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.3rem); letter-spacing: -.055em; line-height: 1.08; font-weight: 730; }
h2 { font-size: 1.32rem; letter-spacing: -.025em; line-height: 1.25; font-weight: 680; }
.page { width: min(72rem, calc(100% - 3rem)); margin-inline: auto; }
.masthead { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--edge); }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; font-size: 1rem; font-weight: 730; letter-spacing: .08em; line-height: 1.12; }
.brand img { display: block; object-fit: contain; }
.brand small { display: block; margin-top: .25rem; color: var(--muted); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; }
.home-link { font-size: .87rem; }
.account-controls { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.account-name { max-width: min(30vw, 18rem); color: var(--muted); font-size: .87rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); }
.initial-message { margin-top: 2.5rem; color: var(--muted); }
.login-view { display: grid; grid-template-columns: minmax(20rem, 1fr) minmax(13rem, .91fr); width: min(100%, 60rem); margin: clamp(1.75rem, 7vh, 4.6rem) auto; min-height: 31.5rem; overflow: hidden; background: var(--surface); border: 1px solid #474161; border-radius: 1.3rem; box-shadow: 0 1.7rem 6rem #090a16a0; }
.login-content { padding: clamp(2rem, 5.2vw, 4.3rem); align-self: center; }
.login-description { margin-top: .75rem; max-width: 22rem; }
.login-art { display: grid; overflow: hidden; position: relative; isolation: isolate; align-items: end; background: linear-gradient(160deg, #4d3b74, #211c3c 63%, #141626); }
.login-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(145deg, #28224255, #171626e0), url("/assets/robrun-cover.jpg") 55% center / cover; opacity: .62; }
.login-art::after { content: ""; position: absolute; inset: 65% 0 0; background: linear-gradient(transparent, #141323e0); }
.login-art img { position: absolute; display: block; inset: auto 0 0; width: 100%; max-height: 96%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 0 40px #100e2090); }
.login-art span { position: absolute; z-index: 1; right: 1.35rem; bottom: 1.1rem; color: #e5dbff; font-size: .68rem; font-weight: 740; letter-spacing: .18em; }
.registration { margin-top: 1.4rem; font-size: .83rem; }
.form { display: grid; margin-top: 1.25rem; gap: .46rem; }
.form label { color: var(--text); font-size: .91rem; font-weight: 620; }
.form label:not(:first-child) { margin-top: .4rem; }
.form label .muted { font-weight: 400; }
.form input, .form textarea { width: 100%; border: 1px solid var(--edge); border-radius: .55rem; padding: .65rem .75rem; color: var(--text); background: var(--control); }
.form textarea { resize: vertical; min-height: 3.1rem; }
.form ::placeholder { color: #9b9eb8; }
.form button { justify-self: start; margin-top: .5rem; }
.login-content .form button { justify-self: stretch; }
button { min-height: 2.62rem; padding: .53rem .95rem; border: 1px solid transparent; border-radius: .55rem; font-size: .88rem; font-weight: 670; cursor: pointer; }
button.primary { background: var(--accent); color: var(--primary-text); }
button.primary:not(:disabled):hover { background: var(--accent-bright); }
button.secondary { background: var(--surface-raised); color: var(--text); border-color: var(--edge); }
button.secondary:not(:disabled):hover { background: #2c2843; border-color: #726294; }
button:disabled { cursor: wait; opacity: .62; }
.message { padding: .49rem .65rem; border: 1px solid var(--edge); border-radius: .48rem; color: var(--muted); font-size: .87rem; overflow-wrap: anywhere; }
.message.error { color: var(--red); background: #372435; border-color: #744355; }
.message.success { color: var(--green); background: #19342e; border-color: #2f5d51; }
.spaced { margin-bottom: 1rem; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 2.4rem 0 1.25rem; }
.page-head .muted { margin-top: .38rem; }
.surface { border: 1px solid var(--edge); border-radius: .95rem; background: var(--surface); }
.products { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.products:empty { display: none; }
.product { max-width: 35.5rem; overflow: hidden; }
.product-cover { display: block; width: 100%; height: 9.5rem; object-fit: cover; background: linear-gradient(135deg, #201d39, #4a3869); }
.product-body { padding: .86rem 1rem 1rem; }
.product-heading, .panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .55rem .75rem; }
.product-expiry { margin-top: .35rem; color: var(--muted); font-size: .9rem; }
.empty-products { padding: 1.55rem; min-height: 7.8rem; display: grid; justify-items: start; align-content: center; gap: .24rem; }
.empty-title { font-weight: 670; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.2rem 0 3rem; }
.panel { padding: 1.25rem; align-self: start; }
.panel > .muted { margin-top: .52rem; font-size: .9rem; }
.badge { display: inline-flex; align-items: center; gap: .36rem; border: 1px solid #625486; border-radius: 1rem; background: #302746; color: #dacaff; padding: .18rem .56rem; line-height: 1.3; font-size: .76rem; font-weight: 650; }
.badge::before { content: ""; flex: none; width: .38rem; height: .38rem; background: currentColor; border-radius: 50%; }
.badge.green { color: var(--green); background: #1a362e; border-color: #326351; }
.badge.orange { color: var(--orange); background: #3b2d25; border-color: #6e4d36; }
.badge.red { color: var(--red); background: #3a2735; border-color: #744052; }
.badge.neutral { color: var(--muted); background: #24283b; border-color: var(--edge); }
.request-state { margin-top: .8rem; padding: .65rem .7rem; border: 1px solid var(--edge); border-radius: .6rem; background: var(--control); }
.request-state > div { display: flex; flex-wrap: wrap; gap: .4rem .75rem; justify-content: space-between; align-items: center; }
.request-state .muted { font-size: .83rem; }
.request-state p { margin-top: .42rem; overflow-wrap: anywhere; }
@media (max-width: 750px) {
  .page { width: calc(100% - 2rem); }
  .login-view { grid-template-columns: minmax(0, 1fr); }
  .login-art { display: none; }
  .login-content { padding: 2.45rem clamp(1.35rem, 6vw, 3rem); }
  .login-view { min-height: 0; max-width: 31rem; }
}
@media (max-width: 590px) {
  .masthead { min-height: 4.4rem; }
  .actions { grid-template-columns: minmax(0, 1fr); }
  .page-head { align-items: start; flex-direction: column; margin-top: 1.8rem; }
  .page-head button { align-self: start; }
}
