/* Design tokens */
:root {
  --blurple: #5865f2;
  --blurple-soft: rgba(88, 101, 242, 0.18);
  --cyan: #00cfff;
  --cyan-soft: rgba(0, 207, 255, 0.14);
  --dark: #313338;
  --darker: #1e1f22;
  --surface: rgba(49, 51, 56, 0.64);
  --surface-strong: rgba(49, 51, 56, 0.88);
  --border: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #b5bac1;
  --muted-strong: #dbdee1;
  --success: #23a55a;
  --danger: #ff6b6b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --glow: 0 0 28px rgba(0, 207, 255, 0.26);
  --radius: 8px;
  --container: min(1120px, calc(100% - 32px));
}

/* Global base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(120deg, rgba(88, 101, 242, 0.16), transparent 34%, rgba(0, 207, 255, 0.11), transparent 72%),
    linear-gradient(180deg, #1e1f22 0%, #232428 52%, #1a1b1f 100%);
  background-size: 160% 160%, auto;
  animation: backgroundFlow 18s ease-in-out infinite;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 84%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(30, 31, 34, 0), rgba(30, 31, 34, 0.82));
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

::selection {
  color: var(--text);
  background: rgba(88, 101, 242, 0.8);
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--darker);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--blurple), var(--cyan));
  border: 3px solid var(--darker);
  border-radius: 999px;
}

/* Shared layout and glass surfaces */
.container {
  width: var(--container);
  margin-inline: auto;
}

.section {
  padding: 88px 0;
}

.section--surface {
  background: linear-gradient(180deg, rgba(49, 51, 56, 0.28), rgba(30, 31, 34, 0.12));
}

.glass-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(49, 51, 56, 0.68), rgba(30, 31, 34, 0.48));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 1.25em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 24;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--cyan);
  color: #061015;
  font-weight: 800;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Loading and navigation */
.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: rgba(30, 31, 34, 0.96);
  transition: opacity 360ms ease, visibility 360ms ease;
}

.no-js .loader,
.loader.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loader__mark {
  width: 64px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blurple), var(--cyan));
  box-shadow: 0 0 32px rgba(88, 101, 242, 0.5);
  animation: loaderPulse 1s ease-in-out infinite alternate;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: rgba(30, 31, 34, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.site-header.is-scrolled {
  border-color: var(--border);
  background: rgba(30, 31, 34, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  color: var(--text);
  background: linear-gradient(135deg, var(--blurple), var(--cyan));
  box-shadow: var(--glow);
}

.brand__text {
  letter-spacing: 0;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(88, 101, 242, 0.22);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.nav-menu {
  position: fixed;
  inset: 76px 16px auto 16px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(30, 31, 34, 0.96);
  box-shadow: var(--shadow);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.nav-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius);
  color: var(--muted-strong);
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active,
.nav-link[aria-current="page"] {
  color: var(--text);
  background: rgba(88, 101, 242, 0.18);
}

.nav-link--ghost {
  border: 1px solid var(--border);
}

.nav-separator {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-weight: 900;
  padding: 0 2px;
  user-select: none;
}

.nav-menu [hidden] {
  display: none !important;
}

.language-control {
  position: relative;
  min-height: 44px;
  display: inline-block;
}

.language-control__button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.language-flag {
  flex: 0 0 auto;
  width: 28px;
  height: 20px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 8px 18px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.language-control__value {
  min-width: 5.8ch;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1;
}

.language-control__chevron {
  color: var(--muted);
  font-size: 1.15rem;
  transition: transform 180ms ease, color 180ms ease;
}

.language-control__button:hover,
.language-control__button:focus-visible,
.language-control.is-open .language-control__button {
  border-color: rgba(0, 207, 255, 0.4);
  background: rgba(88, 101, 242, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.language-control.is-open .language-control__chevron {
  color: var(--cyan);
  transform: rotate(180deg);
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 700;
  min-width: 178px;
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(30, 31, 34, 0.98);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38), var(--glow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.language-menu[hidden] {
  display: none;
}

.language-menu__option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-strong);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.language-menu__option:hover,
.language-menu__option:focus-visible {
  border-color: rgba(0, 207, 255, 0.32);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.language-menu__option.is-active {
  border-color: rgba(0, 207, 255, 0.38);
  color: var(--text);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.24), rgba(0, 207, 255, 0.08));
}

/* Hero */
.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  padding-top: 44px;
}

.hero__grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero__media {
  position: relative;
  display: grid;
  place-items: center;
}

.profile-frame {
  position: relative;
  width: min(72vw, 360px);
  isolation: isolate;
}

.profile-frame img {
  aspect-ratio: 1;
  object-fit: contain;
  padding: 8%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #000000;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.44), 0 0 44px rgba(88, 101, 242, 0.24);
}

.profile-frame__ring {
  position: absolute;
  inset: -12px;
  z-index: -1;
  border-radius: 50%;
  border: 2px solid rgba(0, 207, 255, 0.32);
  animation: profileRing 6s ease-in-out infinite;
}

.status-card {
  position: absolute;
  right: 0;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--muted-strong);
  font-size: 0.92rem;
  font-weight: 700;
}

.status-card__dot {
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(35, 165, 90, 0.16);
}

.hero__content {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 10ch;
  font-size: clamp(3rem, 14vw, 5.7rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(2.1rem, 8vw, 4rem);
  font-weight: 900;
}

h3 {
  font-size: 1.25rem;
  font-weight: 850;
}

.hero__lead,
.section-heading p,
.project-card p,
.portfolio-card p,
.legal-shell p,
.error-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero__lead {
  margin: 22px 0 0;
  max-width: 62ch;
  font-size: 1.05rem;
}

/* Buttons and ripple */
.hero__actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.chip {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  gap: 9px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-weight: 850;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button {
  padding: 0 18px;
}

.button--primary {
  color: var(--text);
  background: linear-gradient(135deg, var(--blurple), #3d9cff 52%, var(--cyan));
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 32px rgba(88, 101, 242, 0.28);
}

.button--secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.button--discord {
  width: 100%;
  color: #fff;
  background: #5865f2;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 34px rgba(88, 101, 242, 0.32);
}

.button--discord:hover,
.button--discord:focus-visible {
  background: #4752c4;
}

.discord-logo {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.chip {
  min-height: 40px;
  padding: 0 12px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.92rem;
}

.button:hover,
.button:focus-visible,
.chip:hover,
.chip:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 207, 255, 0.46);
  box-shadow: var(--glow);
}

.button:disabled,
.chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ripple__circle {
  position: absolute;
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.44);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 620ms ease-out;
  pointer-events: none;
  z-index: -1;
}

/* Project and portfolio cards */
.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading p {
  margin: 16px 0 0;
}

.project-grid,
.portfolio-grid {
  display: grid;
  gap: 18px;
}

.project-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.project-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  min-height: 100%;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.project-card::before,
.portfolio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.18), rgba(0, 207, 255, 0.12));
  transition: opacity 220ms ease;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-8px);
  border-color: rgba(0, 207, 255, 0.34);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), var(--glow);
}

.project-card:hover::before,
.project-card:focus-within::before,
.portfolio-card:hover::before,
.portfolio-card:focus-within::before {
  opacity: 1;
}

.project-card > * {
  position: relative;
}

.project-card__logo {
  width: 62px;
  height: 62px;
  padding: 5px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  object-fit: contain;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.project-card h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.project-card p {
  margin-top: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.project-card .button-row {
  gap: 8px;
  margin-top: 0;
}

.project-card .chip {
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.84rem;
}

.role {
  margin: 0;
  color: var(--muted-strong);
}

.portfolio-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}

.portfolio-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: 74px 2.4em min-content 1fr;
  align-content: stretch;
  gap: 0;
  min-height: 248px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(49, 51, 56, 0.68), rgba(30, 31, 34, 0.5)),
    linear-gradient(135deg, rgba(88, 101, 242, 0.12), rgba(0, 207, 255, 0.05));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.portfolio-card > * {
  position: relative;
}

.portfolio-card img {
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
  padding: 5px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  object-fit: contain;
  transition: transform 220ms ease;
}

.portfolio-card h3 {
  display: -webkit-box;
  min-height: 2.4em;
  overflow: hidden;
  font-size: 1em;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.portfolio-card p {
  margin: 0;
  min-height: 1.35em;
  line-height: 1.35;
}

.portfolio-card a {
  align-self: start;
  justify-self: start;
  line-height: 1.35;
  color: var(--cyan);
  font-weight: 850;
}

.portfolio-card:hover,
.portfolio-card:focus-within {
  transform: translateY(-8px);
  border-color: rgba(88, 101, 242, 0.48);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), 0 0 34px rgba(88, 101, 242, 0.24);
}

.portfolio-card:hover img,
.portfolio-card:focus-within img {
  transform: scale(1.08);
}

/* Contact */
.contact-layout {
  display: grid;
  gap: 20px;
}

.contact-layout--compact {
  max-width: 980px;
}

.contact-cards {
  display: grid;
  gap: 14px;
}

.contact-layout--compact .contact-cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.contact-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 18px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(0, 207, 255, 0.36);
  box-shadow: var(--shadow), var(--glow);
}

.contact-card > .material-symbols-rounded,
.contact-card > .discord-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(0, 207, 255, 0.1);
}

.contact-card > .discord-logo {
  padding: 10px;
}

.contact-card strong,
.contact-card small {
  display: block;
}

.contact-card small {
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Footer and utility controls */
.site-footer {
  padding: 26px 0;
  border-top: 1px solid var(--border);
  background: rgba(30, 31, 34, 0.78);
}

.footer-grid {
  display: grid;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.footer-grid p {
  margin: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: var(--muted-strong);
  font-weight: 700;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--cyan);
}

.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Reveal animation and secondary pages */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.reveal--delay {
  transition-delay: 120ms;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.legal-page,
.error-page {
  min-height: calc(100vh - 76px);
}

.legal-shell {
  padding: 24px;
}

.legal-shell {
  max-width: 920px;
}

.legal-shell h1 {
  max-width: 100%;
  font-size: clamp(2.4rem, 9vw, 4.5rem);
  margin-bottom: 22px;
}

.legal-shell h2 {
  margin-top: 34px;
  font-size: clamp(1.4rem, 5vw, 2rem);
}

.legal-shell a {
  color: var(--cyan);
  font-weight: 800;
}

.legal-shell address {
  color: var(--muted-strong);
  font-style: normal;
  line-height: 1.7;
}

.error-page {
  display: grid;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-block: 72px;
}

.error-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(88, 101, 242, 0.18), transparent),
    linear-gradient(180deg, transparent, rgba(0, 207, 255, 0.08), transparent);
  opacity: 0.8;
}

.error-card {
  position: relative;
  overflow: hidden;
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(26px, 7vw, 58px);
  text-align: center;
}

.error-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blurple), var(--cyan));
}

.error-card > * {
  position: relative;
}

.error-card__mark {
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border-radius: var(--radius);
  color: var(--text);
  background: linear-gradient(135deg, var(--blurple), var(--cyan));
  box-shadow: var(--glow);
  font-size: 1.45rem;
  font-weight: 950;
}

.error-number {
  margin: 12px 0 8px;
  color: transparent;
  background: linear-gradient(135deg, var(--text), var(--cyan) 45%, var(--blurple));
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 18px 34px rgba(0, 207, 255, 0.16));
  font-size: clamp(5.5rem, 27vw, 12rem);
  font-weight: 950;
  line-height: 0.86;
}

.error-card h1 {
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(2rem, 7vw, 4.25rem);
}

.error-card p:not(.eyebrow) {
  max-width: 58ch;
  margin: 18px auto 0;
  color: var(--muted);
  line-height: 1.7;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

/* Dashboard */
code {
  color: var(--muted-strong);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.dashboard-page {
  min-height: calc(100vh - 76px);
  padding: 72px 0;
}

.dashboard-shell {
  display: grid;
  gap: 20px;
}

.login-view {
  min-height: min(620px, calc(100vh - 220px));
  display: grid;
  place-items: center;
}

.login-card {
  width: min(100%, 420px);
  padding: clamp(24px, 6vw, 38px);
  text-align: center;
}

.login-card__mark {
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border: 1px solid rgba(88, 101, 242, 0.45);
  border-radius: 18px;
  color: var(--cyan);
  background: rgba(88, 101, 242, 0.14);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.login-card__mark .material-symbols-rounded {
  font-size: 30px;
}

.login-card h1 {
  width: 100%;
  margin: 6px auto 0;
  font-size: 2rem;
  line-height: 1.08;
  text-align: center;
}

.login-card__actions {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.login-card__link {
  justify-self: center;
  color: var(--muted-strong);
  font-size: 0.92rem;
  font-weight: 800;
  transition: color 180ms ease;
}

.login-card__link:hover,
.login-card__link:focus-visible {
  color: var(--cyan);
}

.dashboard-hero,
.dashboard-card {
  padding: clamp(22px, 5vw, 34px);
}

.dashboard-hero h1,
.dashboard-title h1 {
  max-width: 100%;
  font-size: 2.45rem;
  line-height: 1.05;
}

.dashboard-hero p,
.dashboard-title p,
.dashboard-empty,
.customer-product p,
.admin-table small {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.58;
}

.dashboard-flashes {
  display: grid;
  gap: 10px;
}

.dashboard-flash,
.setup-warning {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  font-weight: 750;
}

.dashboard-flash--success {
  border-color: rgba(35, 165, 90, 0.38);
  background: rgba(35, 165, 90, 0.12);
}

.dashboard-flash--error,
.setup-warning {
  border-color: rgba(255, 107, 107, 0.42);
  background: rgba(255, 107, 107, 0.11);
}

.setup-warning {
  margin-top: 20px;
}

.dashboard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-title h1 {
  overflow: hidden;
  font-size: 2.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-title p {
  max-width: 62ch;
  margin-top: 8px;
}

.dashboard-avatar {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  object-fit: cover;
  box-shadow: var(--glow);
}

.dashboard-stats,
.admin-grid,
.customer-product-grid {
  display: grid;
  gap: 14px;
}

.dashboard-stats {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dashboard-stat {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.dashboard-stat .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(0, 207, 255, 0.1);
}

.dashboard-stat small,
.customer-product small {
  color: var(--muted);
  font-weight: 800;
}

.dashboard-stat strong {
  font-size: 1.18rem;
}

.dashboard-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 15px 16px;
  border-color: rgba(255, 107, 107, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 107, 107, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(30, 31, 34, 0.72);
}

.dashboard-warning > .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  color: #ffb1b1;
  background: rgba(255, 107, 107, 0.14);
}

.dashboard-warning strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.dashboard-warning p {
  margin: 5px 0 0;
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.55;
}

.dashboard-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-card__head p:not(.eyebrow) {
  max-width: 58ch;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.admin-card-head {
  align-items: flex-start;
}

.topup-card {
  background:
    linear-gradient(145deg, rgba(49, 51, 56, 0.78), rgba(30, 31, 34, 0.58)),
    radial-gradient(circle at 92% 8%, rgba(255, 95, 162, 0.15), transparent 34%);
}

.topup-code {
  display: grid;
  gap: 7px;
  padding: 13px 14px;
  border: 1px solid rgba(0, 207, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
}

.topup-code span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.topup-code code {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 900;
}

.topup-actions {
  margin-top: 14px;
}

.admin-card-head p {
  max-width: 62ch;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.admin-accounts-card {
  background:
    linear-gradient(145deg, rgba(49, 51, 56, 0.78), rgba(30, 31, 34, 0.54)),
    radial-gradient(circle at 92% 8%, rgba(0, 207, 255, 0.12), transparent 34%);
}

.admin-card-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.admin-card-action {
  color: var(--cyan);
  background: rgba(0, 207, 255, 0.09);
}

.admin-card-action .material-symbols-rounded {
  font-size: 1.35rem;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-overview-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
}

.admin-overview-item .material-symbols-rounded {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(0, 207, 255, 0.1);
}

.admin-overview-item small {
  color: var(--muted);
  font-weight: 800;
}

.admin-overview-item strong {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
  line-height: 1.2;
}

.account-list {
  display: grid;
  gap: 10px;
}

.account-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.account-row:hover,
.account-row:focus-visible {
  border-color: rgba(0, 207, 255, 0.34);
  background: linear-gradient(145deg, rgba(88, 101, 242, 0.16), rgba(0, 207, 255, 0.055));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.account-row__avatar {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border: 1px solid rgba(0, 207, 255, 0.3);
  border-radius: var(--radius);
  color: var(--text);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.92), rgba(0, 207, 255, 0.48));
  font-weight: 950;
  box-shadow: 0 0 22px rgba(88, 101, 242, 0.24);
}

.account-row__content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-row__content strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
}

.account-row__content small,
.modal-product small {
  color: var(--muted);
  font-weight: 800;
}

.account-row__meta,
.account-row__badges,
.modal-status-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.account-row__badges {
  min-width: max-content;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.mini-pill.is-active {
  border-color: rgba(35, 165, 90, 0.42);
  color: #7ee6a1;
  background: rgba(35, 165, 90, 0.12);
}

.mini-pill.is-expired {
  border-color: rgba(255, 107, 107, 0.42);
  color: #ff9b9b;
  background: rgba(255, 107, 107, 0.11);
}

.account-row__arrow {
  color: var(--muted);
  transition: color 180ms ease, transform 180ms ease;
}

.account-row:hover .account-row__arrow,
.account-row:focus-visible .account-row__arrow {
  color: var(--cyan);
  transform: translateX(2px);
}

.dashboard-card h2,
.admin-form h2 {
  font-size: 1.38rem;
}

.customer-product-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.customer-product {
  display: grid;
  align-content: start;
  min-height: 0;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.customer-product h3 {
  margin-top: 9px;
  font-size: 0.98rem;
}

.customer-product p {
  margin: 6px 0 0;
}

.customer-product p a,
.modal-product p a {
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.customer-product p a:hover,
.customer-product p a:focus-visible,
.modal-product p a:hover,
.modal-product p a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.spoiler-text {
  display: inline;
  padding: 0 0.28em;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

.spoiler-text:not(.is-revealed) {
  background: rgba(10, 11, 15, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  user-select: none;
}

.spoiler-text:not(.is-revealed) .spoiler-text__content {
  color: transparent;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
}

.spoiler-text:not(.is-revealed) a {
  color: transparent;
  pointer-events: none;
}

.spoiler-text.is-revealed {
  background: rgba(88, 101, 242, 0.18);
}

.spoiler-text:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.customer-product__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.customer-product__footer strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(0, 207, 255, 0.28);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(0, 207, 255, 0.09);
  font-size: 0.82rem;
  font-weight: 900;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
}

.status-pill.is-active {
  border-color: rgba(35, 165, 90, 0.42);
  color: #7ee6a1;
  background: rgba(35, 165, 90, 0.12);
}

.status-pill.is-pending {
  border-color: rgba(0, 207, 255, 0.38);
  color: var(--cyan);
  background: rgba(0, 207, 255, 0.1);
}

.status-pill.is-expired {
  border-color: rgba(255, 107, 107, 0.42);
  color: #ff9b9b;
  background: rgba(255, 107, 107, 0.11);
}

.admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-form {
  display: grid;
  gap: 14px;
}

.form-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(0, 207, 255, 0.24);
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: rgba(0, 207, 255, 0.075);
  line-height: 1.5;
  font-weight: 800;
}

.form-note .material-symbols-rounded {
  flex: 0 0 auto;
  color: var(--cyan);
}

.admin-form label,
.product-edit-form label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-weight: 800;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.inline-form input,
.inline-form select,
.product-edit-form input,
.product-edit-form textarea,
.product-edit-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
  padding: 11px 12px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.admin-form select,
.inline-form select,
.product-edit-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--cyan) 50%),
    linear-gradient(135deg, var(--cyan) 50%, transparent 50%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%,
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat: no-repeat;
  padding-right: 42px;
  color-scheme: dark;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 750;
}

.admin-form select::-ms-expand,
.inline-form select::-ms-expand,
.product-edit-form select::-ms-expand {
  display: none;
}

.admin-form select:hover,
.inline-form select:hover,
.product-edit-form select:hover {
  border-color: rgba(0, 207, 255, 0.36);
  background-image:
    linear-gradient(45deg, transparent 50%, #7ee9ff 50%),
    linear-gradient(135deg, #7ee9ff 50%, transparent 50%),
    linear-gradient(145deg, rgba(88, 101, 242, 0.13), rgba(0, 207, 255, 0.055));
}

.admin-form select option,
.inline-form select option,
.product-edit-form select option {
  color: var(--text);
  background: #1e1f22;
}

.admin-form textarea,
.product-edit-form textarea {
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.inline-form input:focus,
.inline-form select:focus,
.product-edit-form input:focus,
.product-edit-form textarea:focus,
.product-edit-form select:focus {
  border-color: rgba(0, 207, 255, 0.55);
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(0, 207, 255, 0.1);
}

.customer-picker {
  display: grid;
  gap: 10px;
  max-height: 290px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 207, 255, 0.42) rgba(255, 255, 255, 0.08);
}

.customer-picker legend {
  margin-bottom: 8px;
  color: var(--muted-strong);
  font-weight: 900;
}

.customer-choice {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.customer-choice:hover,
.customer-choice:focus-within {
  border-color: rgba(0, 207, 255, 0.38);
  background: linear-gradient(145deg, rgba(88, 101, 242, 0.16), rgba(0, 207, 255, 0.06));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.customer-choice.is-selected {
  border-color: rgba(0, 207, 255, 0.5);
  background:
    linear-gradient(145deg, rgba(88, 101, 242, 0.2), rgba(0, 207, 255, 0.09)),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(0, 207, 255, 0.12);
}

.customer-choice input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.customer-choice__avatar {
  display: grid;
  place-items: center;
  width: 40px;
  aspect-ratio: 1;
  border: 1px solid rgba(0, 207, 255, 0.28);
  border-radius: var(--radius);
  color: var(--text);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.95), rgba(0, 207, 255, 0.46));
  font-weight: 950;
}

.customer-choice__content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-choice__content strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.98rem;
}

.customer-choice__content small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.customer-choice__check {
  color: var(--muted);
  transition: color 180ms ease, transform 180ms ease;
}

.customer-choice input:checked ~ .customer-choice__check {
  color: var(--cyan);
  transform: scale(1.04);
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 24;
}

.customer-choice input:checked ~ .customer-choice__avatar {
  box-shadow: 0 0 24px rgba(0, 207, 255, 0.22);
}

.admin-form__split {
  display: grid;
  gap: 12px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted-strong);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.admin-table small {
  display: block;
  margin-top: 6px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.inline-form--billing {
  grid-template-columns: minmax(92px, 0.7fr) minmax(132px, 1fr) auto;
  min-width: 310px;
}

.has-open-modal {
  overflow: hidden;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  font: inherit;
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(86vh, 920px);
  overflow: auto;
  padding: clamp(18px, 4vw, 28px);
  border-color: rgba(255, 255, 255, 0.16);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 207, 255, 0.45) rgba(255, 255, 255, 0.08);
}

.modal.is-open .modal__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal__panel--wide {
  width: min(1040px, 100%);
}

.modal__head,
.account-modal-title,
.modal-section__head,
.modal-product__head,
.modal-product__actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal__head {
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal__head h2 {
  font-size: 1.72rem;
  line-height: 1.08;
}

.modal-status-row {
  justify-content: flex-start;
  margin-bottom: 16px;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
  gap: 14px;
}

.modal-grid > .modal-section {
  min-height: 258px;
}

.modal-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.032));
}

.modal-section + .modal-section,
.modal-grid + .modal-section {
  margin-top: 14px;
}

.modal-section__head {
  align-items: center;
}

.modal-section__head .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(0, 207, 255, 0.1);
}

.modal-section h3 {
  font-size: 1.02rem;
}

.account-spoiler {
  align-content: start;
  grid-template-rows: auto 1fr;
}

.account-spoiler__summary {
  width: 100%;
  cursor: pointer;
  list-style: none;
  text-align: left;
}

.account-spoiler__summary::-webkit-details-marker {
  display: none;
}

.account-spoiler__summary:focus-visible {
  outline: 3px solid rgba(0, 207, 255, 0.85);
  outline-offset: 4px;
}

.account-spoiler__label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-spoiler__title {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 900;
}

.account-spoiler__label small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
}

.account-spoiler__chevron {
  margin-left: auto;
  color: var(--muted);
  transition: color 180ms ease, transform 180ms ease;
}

.account-spoiler__summary:hover .account-spoiler__chevron,
.account-spoiler__summary:focus-visible .account-spoiler__chevron {
  color: var(--cyan);
}

.account-spoiler[open] .account-spoiler__chevron {
  color: var(--cyan);
  transform: rotate(180deg);
}

.account-spoiler[open] .account-detail-grid {
  margin-top: 14px;
}

.account-spoiler .account-detail-grid {
  grid-template-columns: 1fr;
}

.account-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.account-detail-grid div {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.12);
  text-align: left;
}

.account-detail-grid dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-detail-grid dd {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted-strong);
}

.account-detail-grid dd small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.modal-action-form {
  margin-top: 4px;
}

.modal-product-list {
  display: grid;
  gap: 12px;
}

.modal-product {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0.035));
}

.modal-product__head {
  justify-content: space-between;
}

.modal-product h4 {
  margin-top: 10px;
  font-size: 1rem;
}

.modal-product p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.modal-product__head strong {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(0, 207, 255, 0.28);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(0, 207, 255, 0.09);
  font-size: 0.86rem;
}

.modal-product__actions {
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.product-edit-form {
  display: grid;
  gap: 11px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.product-edit-form__grid,
.product-edit-form__billing {
  display: grid;
  gap: 10px;
}

.product-edit-form__footer {
  display: grid;
  gap: 10px;
}

.product-edit-form .chip {
  justify-content: center;
  min-height: 42px;
}

.product-edit-form .material-symbols-rounded {
  font-size: 1.05rem;
}

.modal-product__actions > form:not(.product-edit-form) {
  margin-left: auto;
}

.chip--danger {
  border-color: rgba(255, 107, 107, 0.35);
  color: #ffb1b1;
  background: rgba(255, 107, 107, 0.1);
}

:focus-visible {
  outline: 3px solid rgba(0, 207, 255, 0.85);
  outline-offset: 3px;
}

/* Responsive layout */
@media (min-width: 680px) {
  :root {
    --container: min(1120px, calc(100% - 48px));
  }

  .hero__grid {
    grid-template-columns: 0.92fr 1.08fr;
  }

  .hero__content {
    order: 2;
  }

  .hero__media {
    order: 1;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }

  .footer-grid {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    text-align: left;
  }

  .footer-grid > :nth-child(2) {
    text-align: center;
  }

  .footer-links {
    justify-content: flex-end;
  }

  .admin-form__split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-edit-form__billing {
    grid-template-columns: minmax(110px, 0.65fr) minmax(160px, 1fr);
  }

  .product-edit-form__footer {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

@media (min-width: 940px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .portfolio-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

}

@media (max-width: 680px) {
  .dashboard-hero h1,
  .dashboard-title h1 {
    font-size: 2rem;
  }

  .dashboard-card h2,
  .admin-form h2,
  .modal__head h2 {
    font-size: 1.24rem;
  }

  .admin-card-head,
  .modal__head,
  .modal-product__head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-card-actions {
    justify-content: flex-start;
  }

  .account-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .account-row__badges {
    grid-column: 2;
    justify-content: flex-start;
  }

  .account-row__arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .modal {
    align-items: end;
    padding: 10px;
  }

  .modal__panel {
    max-height: 92vh;
  }

  .modal-grid > .modal-section {
    min-height: 0;
  }

  .modal-product__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-form--billing {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .dashboard-warning {
    grid-template-columns: 1fr;
  }

  .dashboard-title h1 {
    font-size: 1.7rem;
  }

  .hero__actions .button,
  .error-actions .button,
  .button-row .chip,
  .modal-action-form .button {
    width: 100%;
  }

  .admin-card-actions {
    width: 100%;
  }

  .admin-card-action {
    flex: 1 1 0;
  }

  .status-card {
    left: 0;
    right: 0;
    justify-content: center;
  }
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@keyframes backgroundFlow {
  0%,
  100% {
    background-position: 0% 50%, center;
  }
  50% {
    background-position: 100% 50%, center;
  }
}

@keyframes loaderPulse {
  from {
    transform: rotate(0deg) scale(0.9);
    border-radius: var(--radius);
  }
  to {
    transform: rotate(45deg) scale(1.08);
    border-radius: 50%;
  }
}

@keyframes profileRing {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.78;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(22);
    opacity: 0;
  }
}
