/* ==========================================================================
   dotgay prototype - design system
   light, restrained, yellow-accented
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg:            #ffffff;
  --bg-soft:       #fbfaf7;
  --panel:         #ffffff;
  --panel-2:       #f7f6f2;
  --panel-3:       #efeee8;
  --line:          rgba(10, 10, 10, .09);
  --line-2:        rgba(10, 10, 10, .17);
  --line-3:        rgba(10, 10, 10, .3);
  --text:          #111110;
  --dim:           #58584f;
  --mute:          #8b8b81;
  --green:         #0f7b45;
  --amber:         #a16207;
  --red:           #b91c1c;
  --blue:          #1d4ed8;
  --violet:        #6d28d9;
  --accent:        #ffd43b;
  --accent-deep:   #f7b500;
  --accent-ink:    #6b4600;
  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     18px;
  --rainbow:       linear-gradient(90deg, #f7b500 0%, #ffd43b 100%);
  --rainbow-soft:  linear-gradient(90deg, rgba(247,181,0,.55), rgba(255,212,59,.55));
  --shadow-1:      0 1px 2px rgba(10, 10, 10, .06);
  --shadow-2:      0 22px 56px -20px rgba(10, 10, 10, .3);
  --mono:          ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans:          -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
                   "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
  --sidebar-w:     252px;
  --topbar-h:      58px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(10, 10, 10, .18); }
:focus-visible { outline: 2px solid rgba(10, 10, 10, .45); outline-offset: 2px; border-radius: 4px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(10, 10, 10, .1); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(10, 10, 10, .2); }

.app-root { min-height: 100dvh; }

/* ---------- boot ---------- */
.boot {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.boot__mark { width: 44px; height: 44px; display: grid; place-items: center; }
.boot__ring {
  width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(from 0deg, #f7b500, #ffd43b, #f7b500);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: spin 1.1s linear infinite;
}
.boot__text { color: var(--mute); font-size: 13px; letter-spacing: .02em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- atoms ---------- */
.ico { width: 16px; height: 16px; flex: none; }
.mono { font-family: var(--mono); font-variant-ligatures: none; }
.rainbow-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: conic-gradient(from 200deg, #f7b500, #ffd43b, #f7b500);
}
.text-dim { color: var(--dim); }
.text-mute { color: var(--mute); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 680; font-size: 16px; letter-spacing: -.02em; color: #111110;
}
.logo__mark {
  width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(from 210deg, #f7b500, #ffd43b, #f7b500);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5.4px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5.4px));
}
.logo__tld { color: var(--dim); font-weight: 500; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 9px;
  background: rgba(10, 10, 10, .04);
  color: var(--text); font-size: 13.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .08s ease, opacity .15s;
}
.btn:hover { background: rgba(10, 10, 10, .085); border-color: var(--line-2); }
.btn:active { transform: translateY(.5px); }
.btn .ico { width: 15px; height: 15px; }
.btn--primary { background: #111110; border-color: #111110; color: #ffffff; font-weight: 600; }
.btn--primary:hover { background: #2b2b26; border-color: #2b2b26; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--dim); }
.btn--ghost:hover { background: rgba(10, 10, 10, .06); color: var(--text); border-color: transparent; }
.btn--outline { background: transparent; }
.btn--danger { color: #b91c1c; border-color: rgba(185, 28, 28, .3); background: rgba(185, 28, 28, .07); }
.btn--danger:hover { background: rgba(185, 28, 28, .12); border-color: rgba(185, 28, 28, .4); }
.btn--sm { height: 29px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn--sm .ico { width: 13px; height: 13px; }
.btn--lg { height: 44px; padding: 0 22px; font-size: 14.5px; border-radius: 11px; }
.btn--block { width: 100%; }
.lang-btn {
  height: 32px; min-width: 46px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--line-2); background: rgba(10, 10, 10, .03);
  color: var(--dim); font: inherit; font-size: 12px; font-weight: 560; letter-spacing: .01em;
  font-family: var(--mono); cursor: pointer; flex: none;
  transition: background .16s, color .16s, border-color .16s;
}
.lang-btn:hover { background: rgba(10, 10, 10, .07); color: var(--text); }
.lang-btn.btn--sm { height: 29px; min-width: 42px; padding: 0 9px; font-size: 11.5px; }
.btn[disabled], .btn.is-disabled { opacity: .42; pointer-events: none; }
.btn__spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3); border-top-color: currentColor;
  animation: spin .7s linear infinite;
}

/* fields */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field__label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12.5px; font-weight: 540; color: var(--dim);
}
.field__label .lnk { font-weight: 500; }
.field__hint { font-size: 12px; color: var(--mute); }
.field__error { font-size: 12px; color: #ff8b8b; display: none; }
.field.is-invalid .field__error { display: block; }
.field.is-invalid .input { border-color: rgba(185, 28, 28, .45); box-shadow: 0 0 0 3px rgba(185, 28, 28, .07); }

.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: #ffffff;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  color: var(--text); font-size: 14px;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: #4f4f5a; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; background: #ffffff;
  border-color: rgba(10, 10, 10, .4);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, .06);
}
.input--mono { font-family: var(--mono); font-size: 13.5px; letter-spacing: .01em; }
.select {
  appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8a96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.select option { background: #ffffff; }

.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1 1 auto; }
.input-group .btn { flex: none; height: 40px; }
.input-affix { position: relative; display: flex; align-items: center; }
.input-affix .input { padding-right: 44px; }
.input-affix__btn {
  position: absolute; right: 6px; width: 30px; height: 30px;
  display: grid; place-items: center; border: 0; border-radius: 6px;
  background: transparent; color: var(--mute); cursor: pointer;
}
.input-affix__btn:hover { background: rgba(10, 10, 10, .07); color: var(--text); }
.input-affix__btn .ico { width: 15px; height: 15px; }

/* card */
.card {
  background: linear-gradient(180deg, rgba(10, 10, 10, .034), rgba(10, 10, 10, .012));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card--flush { background: none; }
.card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.card__title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.card__sub { font-size: 12.5px; color: var(--mute); margin-top: 2px; }
.card__body { padding: 20px; }
.card__body--tight { padding: 14px 20px; }
.card__foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(10, 10, 10, .025); }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 560; letter-spacing: .01em;
  border: 1px solid var(--line-2); color: var(--dim); background: rgba(10, 10, 10, .04);
  white-space: nowrap;
}
.badge .ico { width: 12.5px; height: 12.5px; flex: none; }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { color: var(--green); border-color: rgba(69, 209, 126, .28); background: rgba(69, 209, 126, .1); }
.badge--warn { color: var(--amber); border-color: rgba(180, 120, 0, .26); background: rgba(180, 120, 0, .09); }
.badge--bad { color: var(--red); border-color: rgba(185, 28, 28, .3); background: rgba(185, 28, 28, .08); }
.badge--info { color: var(--blue); border-color: rgba(102, 170, 255, .3); background: rgba(102, 170, 255, .1); }
.badge--plain { background: transparent; }

/* switch */
.switch {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 38px; height: 22px; border-radius: 99px; flex: none;
  background: rgba(10, 10, 10, .12);
  border: 1px solid var(--line-2);
  transition: background .18s, border-color .18s;
  position: relative;
}
.switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #b9b9c4; transition: transform .18s cubic-bezier(.2, .9, .3, 1), background .18s;
}
.switch input:checked + .switch__track { background: rgba(69, 209, 126, .9); border-color: transparent; }
.switch input:checked + .switch__track::after { transform: translateX(16px); background: #ffffff; }
.switch input:focus-visible + .switch__track { outline: 2px solid rgba(10, 10, 10, .45); outline-offset: 2px; }
.switch__label { font-size: 13.5px; }

/* progress */
.progress { height: 6px; border-radius: 99px; background: rgba(10, 10, 10, .08); overflow: hidden; }
.progress__bar { height: 100%; border-radius: 99px; background: var(--rainbow); transition: width .5s cubic-bezier(.2, .8, .3, 1); }
.progress__bar--warn { background: linear-gradient(90deg, #ffb63d, #ff8a3d); }
.progress__bar--bad { background: linear-gradient(90deg, #ff6262, #ff3d6e); }

/* link */
.lnk { color: var(--dim); text-decoration: none; transition: color .14s; cursor: pointer; }
.lnk:hover { color: #111110; }
button.lnk { background: none; border: 0; padding: 0; font: inherit; }
.lnk--accent { color: #111110; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- toast ---------- */
.toast-root {
  position: fixed; top: 16px; right: 16px; z-index: 400;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--line-2); border-radius: 11px;
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(10px);
  font-size: 13px; line-height: 1.45;
  animation: toastIn .22s cubic-bezier(.2, .9, .3, 1);
}
.toast.is-out { animation: toastOut .18s ease forwards; }
.toast__ico { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.toast--ok .toast__ico { color: var(--green); }
.toast--bad .toast__ico { color: var(--red); }
.toast--info .toast__ico { color: var(--blue); }
.toast__body { min-width: 0; }
.toast__title { font-weight: 580; }
.toast__desc { color: var(--dim); font-size: 12.5px; margin-top: 1px; }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(17, 17, 16, .34);
  backdrop-filter: blur(7px);
  animation: fadeIn .16s ease;
}
.modal {
  width: 100%; max-width: 540px; max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  animation: popIn .2s cubic-bezier(.2, .9, .3, 1);
  overflow: hidden;
}
.modal--sm { max-width: 420px; }
.modal--lg { max-width: 640px; }
.modal__head { padding: 18px 20px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal__title { font-size: 16px; font-weight: 620; letter-spacing: -.015em; }
.modal__desc { color: var(--mute); font-size: 12.5px; margin-top: 4px; }
.modal__x {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 7px; background: transparent; color: var(--mute); cursor: pointer;
}
.modal__x:hover { background: rgba(10, 10, 10, .07); color: var(--text); }
.modal__body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; background: rgba(10, 10, 10, .025); }

/* ---------- landing ---------- */
.landing {
  position: relative; min-height: 100dvh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.landing::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: var(--rainbow); z-index: 5; opacity: .9;
}
.landing__glow {
  position: absolute; inset: -10% -10% 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(48% 38% at 50% -4%,  rgba(255, 212, 59, .32), transparent 68%),
    radial-gradient(34% 32% at 16% 8%,   rgba(255, 212, 59, .12), transparent 70%),
    radial-gradient(36% 34% at 84% 12%,  rgba(247, 181, 0, .08), transparent 70%);
}
.landing__grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(10, 10, 10, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 10, 10, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask: radial-gradient(70% 55% at 50% 20%, #000 10%, transparent 78%);
          mask: radial-gradient(70% 55% at 50% 20%, #000 10%, transparent 78%);
}
.nav {
  position: relative; z-index: 3;
  width: 100%; max-width: 1180px; margin: 0 auto;
  height: 70px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav__actions { display: flex; align-items: center; gap: 8px; }

.hero {
  position: relative; z-index: 2;
  flex: 1 0 auto;
  width: 100%; max-width: 960px; margin: 0 auto;
  padding: clamp(56px, 10vh, 116px) 24px 40px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  height: 26px; padding: 0 11px 0 9px; border-radius: 99px;
  border: 1px solid var(--line-2); background: rgba(10, 10, 10, .035);
  font-size: 12px; color: var(--dim); letter-spacing: .01em;
  margin-bottom: clamp(22px, 4vh, 34px);
}
.hero__title {
  font-size: clamp(26px, 4.55vw, 50px);
  line-height: 1.22;
  font-weight: 620;
  letter-spacing: -.035em;
  max-width: 24em;
}
.hero__input {
  display: inline-block; width: 6.2ch; max-width: 62vw;
  font: inherit; color: #111110; text-align: center;
  background: transparent; border: 0;
  border-bottom: 2px solid rgba(10, 10, 10, .22);
  padding: 0 .06em .04em;
  margin: 0 .12em;
  transition: border-color .2s, width .2s cubic-bezier(.2, .8, .3, 1);
  caret-color: #111110;
}
.hero__input:focus { outline: none; border-bottom-color: transparent; }
.hero__input:focus + .hero__underline { transform: scaleX(1); }
.hero__wrap { position: relative; display: inline-block; }
.hero__underline {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--rainbow);
  transform: scaleX(0); transform-origin: left;
  transition: transform .32s cubic-bezier(.2, .8, .3, 1);
  pointer-events: none;
}
.hero__tld {
  background: linear-gradient(180deg, #e0a300, #a16207);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 700;
}
.hero__tail { white-space: nowrap; }
.hero__sub {
  margin-top: 22px;
  font-size: clamp(14px, 1.5vw, 16px); line-height: 1.7;
  color: var(--dim); max-width: 40em;
}
.hero__preview {
  margin-top: 16px; min-height: 30px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px; color: var(--mute);
}
.hero__preview b { font-family: var(--mono); font-weight: 500; color: var(--text); font-size: 13.5px; }
.hero__cta { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.hero__note {
  margin-top: 18px; font-size: 12.5px; color: var(--mute);
  display: flex; align-items: center; gap: 7px;
}
.hero__region {
  margin-top: 26px; max-width: 460px;
  display: none; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 11px;
  border: 1px solid rgba(180, 120, 0, .24);
  background: rgba(180, 120, 0, .07);
  color: #ffce85; font-size: 12.5px; line-height: 1.55; text-align: left;
}
.hero__region .ico { width: 15px; height: 15px; flex: none; margin-top: 2px; }

.features {
  position: relative; z-index: 2;
  width: 100%; max-width: 1000px; margin: 0 auto;
  padding: 20px 24px clamp(48px, 8vh, 80px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.feature {
  padding: 18px 18px 16px;
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 10, 10, .03), rgba(10, 10, 10, .008));
}
.feature__ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: rgba(10, 10, 10, .05);
  color: var(--dim); margin-bottom: 12px;
}
.feature__ico .ico { width: 15px; height: 15px; }
.feature__title { font-size: 13.5px; font-weight: 580; }
.feature__desc { margin-top: 5px; font-size: 12.5px; color: var(--mute); line-height: 1.6; }

.footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  padding: 20px 24px 72px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12px; color: var(--mute);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; }

/* environment switch (prototype aid) */
.env-switch {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: flex; align-items: center; gap: 6px;
  padding: 6px; border-radius: 11px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-2);
  font-size: 11.5px; color: var(--mute);
}
.env-switch__label { padding: 0 4px 0 6px; }
.env-switch__btn {
  height: 26px; padding: 0 9px; border-radius: 7px;
  border: 1px solid transparent; background: transparent;
  color: var(--dim); font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.env-switch__btn:hover { background: rgba(10, 10, 10, .06); color: var(--text); }
.env-switch__btn.is-on { background: #111110; border-color: #111110; color: #ffffff; }

/* ---------- auth ---------- */
.auth {
  position: relative; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: 28px 20px 40px;
  overflow: hidden;
}
.auth::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: var(--rainbow); opacity: .85; z-index: 4;
}
.auth__glow {
  position: absolute; inset: -20% -10% auto; height: 70%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42% 48% at 50% 0%, rgba(255, 212, 59, .45), transparent 70%),
    radial-gradient(36% 42% at 22% 10%, rgba(77, 159, 255, .09), transparent 72%),
    radial-gradient(34% 40% at 80% 6%, rgba(192, 132, 252, .08), transparent 72%);
}
.auth__top {
  position: relative; z-index: 2;
  width: 100%; max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.auth__main {
  position: relative; z-index: 2;
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 36px 0;
}
.auth__card {
  width: 100%; max-width: 424px;
  border: 1px solid var(--line-2); border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 10, 10, .045), rgba(10, 10, 10, .015));
  box-shadow: var(--shadow-2);
  padding: 26px 26px 24px;
  backdrop-filter: blur(12px);
}
.auth__card--wide { max-width: 468px; }
.auth__title { font-size: 21px; font-weight: 640; letter-spacing: -.03em; }
.auth__desc { margin-top: 6px; font-size: 13px; color: var(--mute); line-height: 1.6; }
.auth__form { margin-top: 22px; display: flex; flex-direction: column; gap: 15px; }
.auth__row { display: flex; gap: 10px; }
.auth__foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--mute); }
.auth__foot .lnk { color: var(--dim); }
.auth__foot .lnk:hover { color: #111110; }
.auth__sep {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--mute); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
}
.auth__sep::before, .auth__sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__legal { margin-top: 16px; font-size: 11.5px; color: #55555f; text-align: center; line-height: 1.6; }
.auth__legal a { color: var(--dim); text-decoration: underline; text-underline-offset: 2px; }

.tabs {
  display: flex; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(10, 10, 10, .04);
  margin-top: 18px;
}
.tabs__btn {
  flex: 1; height: 31px; border: 0; border-radius: 7px;
  background: transparent; color: var(--mute);
  font-size: 13px; font-weight: 520; cursor: pointer;
  transition: background .15s, color .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.tabs__btn:hover { color: var(--dim); }
.tabs__btn.is-active { background: #ffffff; color: #111110; border-color: var(--line-2); }
.tabs__btn .ico { width: 14px; height: 14px; }

.oauth-btn {
  width: 100%; height: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: rgba(10, 10, 10, .035);
  color: var(--text); font-size: 13.5px; font-weight: 520; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.oauth-btn:hover { background: rgba(10, 10, 10, .075); border-color: var(--line-3); }
.oauth-btn .ico { width: 16px; height: 16px; }

/* password strength */
.pw-meter { display: flex; gap: 4px; margin-top: 2px; }
.pw-meter__seg { height: 3px; flex: 1; border-radius: 99px; background: rgba(10, 10, 10, .1); transition: background .2s; }
.pw-meter__seg.is-on-1 { background: #ff6262; }
.pw-meter__seg.is-on-2 { background: #ffb63d; }
.pw-meter__seg.is-on-3 { background: #7ddc9a; }
.pw-meter__seg.is-on-4 { background: #45d17e; }
.pw-rules { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.pw-rule {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--mute); transition: color .16s;
}
.pw-rule .ico { width: 12px; height: 12px; opacity: .45; transition: opacity .16s, color .16s; }
.pw-rule.is-ok { color: #8fe0ac; }
.pw-rule.is-ok .ico { opacity: 1; color: var(--green); }

/* captcha placeholder */
.captcha {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 66px; padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: #ffffff;
  transition: border-color .18s, background .18s;
}
.captcha.is-error { border-color: rgba(185, 28, 28, .45); }
.captcha.is-done { border-color: rgba(69, 209, 126, .35); background: rgba(69, 209, 126, .05); }
.captcha__main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.captcha__box {
  width: 22px; height: 22px; flex: none; border-radius: 5px;
  border: 1.5px solid rgba(10, 10, 10, .3); background: rgba(10, 10, 10, .04);
  display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: background .15s, border-color .15s;
}
.captcha__box:hover { border-color: rgba(10, 10, 10, .6); }
.captcha__box .ico { width: 14px; height: 14px; color: #ffffff; opacity: 0; transform: scale(.6); transition: .18s; }
.captcha.is-done .captcha__box { background: var(--green); border-color: var(--green); }
.captcha.is-done .captcha__box .ico { opacity: 1; transform: scale(1); }
.captcha__text { font-size: 13px; color: var(--dim); }
.captcha.is-done .captcha__text { color: var(--text); }
.captcha__brand { text-align: right; font-size: 10px; line-height: 1.35; color: var(--mute); flex: none; }
.captcha__brand b { display: block; color: var(--dim); font-size: 11px; font-weight: 600; }
/* Turnstile mount point */
.captcha-slot {
  min-height: 66px;
  display: flex; align-items: center;
  padding: 4px 0;
  border-radius: 10px;
  transition: box-shadow .16s;
}
.captcha-slot.is-error { box-shadow: 0 0 0 2px rgba(185, 28, 28, .3); }
.captcha-slot__loading { font-size: 12.5px; color: var(--mute); }
.captcha-slot iframe { border-radius: 8px; }
.captcha__spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(10, 10, 10, .15); border-top-color: #111110;
  animation: spin .7s linear infinite;
}

/* ---------- dashboard shell ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: var(--topbar-h) minmax(0, 1fr);
  min-height: 100dvh;
}
.topbar {
  grid-column: 1 / -1;
  position: sticky; top: 0; z-index: 60;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px 0 20px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--rainbow); opacity: .28;
}
.topbar__left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar__crumbs {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--mute); min-width: 0;
}
.topbar__crumbs .ico { width: 13px; height: 13px; opacity: .6; }
.topbar__crumbs b { color: var(--text); font-weight: 520; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar__icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--dim); cursor: pointer;
}
.topbar__icon-btn:hover { background: rgba(10, 10, 10, .07); color: var(--text); }
.topbar__avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #6b4600;
  background: linear-gradient(135deg, #ffe08a, #ffd43b 60%, #f7b500);
  cursor: pointer; user-select: none;
  border: 1px solid rgba(10, 10, 10, .18);
}
.user-menu {
  position: absolute; top: calc(var(--topbar-h) - 6px); right: 14px; z-index: 70;
  width: 232px; padding: 6px;
  background: #ffffff; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow-2);
  animation: popIn .16s ease;
}
.user-menu__head { padding: 9px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.user-menu__mail { font-size: 12.5px; color: var(--dim); margin-top: 2px; word-break: break-all; }
.user-menu__name { font-size: 13.5px; font-weight: 580; }
.user-menu__item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  height: 33px; padding: 0 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--dim); font-size: 13px; text-align: left; cursor: pointer;
}
.user-menu__item:hover { background: rgba(10, 10, 10, .06); color: var(--text); }
.user-menu__item .ico { width: 14px; height: 14px; opacity: .8; }
.user-menu__item--danger { color: #b91c1c; }
.user-menu__item--danger:hover { background: rgba(185, 28, 28, .08); color: #991b1b; }

/* sidebar */
.sidebar {
  position: sticky; top: var(--topbar-h);
  height: calc(100dvh - var(--topbar-h));
  overflow-y: auto; overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background: #fbfaf7;
  padding: 16px 12px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.snav__label {
  padding: 14px 10px 7px;
  font-size: 10.5px; font-weight: 620; letter-spacing: .1em;
  text-transform: uppercase; color: #55555f;
}
.snav__item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 10px; border-radius: 8px;
  color: var(--dim); font-size: 13.5px; cursor: pointer;
  transition: background .13s, color .13s;
  border: 0; background: transparent; width: 100%; text-align: left;
}
.snav__item .ico { width: 15.5px; height: 15.5px; opacity: .78; flex: none; }
.snav__item:hover { background: rgba(10, 10, 10, .05); color: var(--text); }
.snav__item.is-active { background: rgba(10, 10, 10, .06); color: #111110; }
.snav__item.is-active .ico { opacity: 1; }
.snav__item.is-active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 2px; border-radius: 0 2px 2px 0; background: var(--rainbow);
}
.snav__item .badge { margin-left: auto; }
.snav__dot {
  margin-left: auto; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px rgba(69, 209, 126, .14);
}
.snav__divider { height: 1px; background: var(--line); margin: 10px 10px; }
.snav__item--cta {
  margin: 5px 0 3px;
  border: 1px dashed rgba(10, 10, 10, .18);
  color: #b9b9c4;
}
.snav__item--cta:hover { border-color: rgba(10, 10, 10, .34); color: #111110; background: rgba(10, 10, 10, .035); }
.snav__item--cta.is-active::before { display: none; }
.sidebar__foot { margin-top: auto; padding: 10px 10px 0; display: flex; flex-direction: column; gap: 8px; }

.domain-chip {
  display: flex; flex-direction: column; gap: 8px;
  padding: 11px 12px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(10, 10, 10, .028);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.domain-chip:hover { border-color: var(--line-2); background: rgba(10, 10, 10, .045); }
.domain-chip__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.domain-chip__name { font-family: var(--mono); font-size: 12.5px; color: #111110; }
.domain-chip__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--mute); }

/* main content */
.main {
  min-width: 0;
  padding: 26px 30px 72px;
}
.main__inner { max-width: 1060px; margin: 0 auto; }
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 22px;
}
.page-head__title { font-size: 22px; font-weight: 640; letter-spacing: -.03em; }
.page-head__desc { margin-top: 5px; font-size: 13px; color: var(--mute); max-width: 54em; line-height: 1.6; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-stack { display: flex; flex-direction: column; gap: 16px; }

/* overview hero card */
.dom-hero {
  position: relative; overflow: hidden;
  padding: 22px 22px 20px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(255, 212, 59, .16), transparent 62%),
    linear-gradient(180deg, #ffffff, #fbfaf7);
}
.dom-hero__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; }
.dom-hero__name {
  font-family: var(--mono); font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 500; letter-spacing: -.02em; line-height: 1.2;
}
.dom-hero__name .tld { color: var(--mute); }
.dom-hero__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.dom-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dom-hero__bottom {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px;
}
.kv__k { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: #55555f; font-weight: 600; }
.kv__v { margin-top: 4px; font-size: 13.5px; color: var(--text); }
.kv__v.mono { font-size: 13px; }
.kv__sub { font-size: 11.5px; color: var(--mute); margin-top: 2px; }

/* stat grid */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat {
  padding: 15px 16px 14px;
  border: 1px solid var(--line); border-radius: 13px;
  background: linear-gradient(180deg, rgba(10, 10, 10, .03), rgba(10, 10, 10, .01));
}
.stat__k { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--mute); }
.stat__k .ico { width: 13px; height: 13px; opacity: .8; }
.stat__v { margin-top: 8px; font-size: 21px; font-weight: 620; letter-spacing: -.02em; line-height: 1.15; }
.stat__v small { font-size: 12px; font-weight: 500; color: var(--mute); margin-left: 4px; letter-spacing: 0; }
.stat__foot { margin-top: 8px; }

/* dns table */
.dns-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.dns-toolbar__search { position: relative; flex: 1 1 200px; min-width: 160px; }
.dns-toolbar__search .ico {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--mute); pointer-events: none;
}
.dns-toolbar__search .input { height: 34px; padding-left: 33px; font-size: 13px; }
.dns-toolbar .select { height: 34px; font-size: 13px; flex: none; width: auto; min-width: 108px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; height: 38px; padding: 0 16px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase;
  color: #5c5c67; white-space: nowrap;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, .014);
}
.table td { padding: 11px 16px; border-bottom: 1px solid rgba(10, 10, 10, .04); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(10, 10, 10, .026); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.mono, .table th.mono { font-family: var(--mono); font-size: 12.5px; }
.table .cell-actions { text-align: right; white-space: nowrap; }
.table .row-actions { display: inline-flex; gap: 2px; opacity: 0; transition: opacity .14s; }
.table tbody tr:hover .row-actions, .table tbody tr:focus-within .row-actions { opacity: 1; }
.icon-btn {
  width: 27px; height: 27px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: transparent; color: var(--mute); cursor: pointer;
}
.icon-btn:hover { background: rgba(10, 10, 10, .08); color: var(--text); }
.icon-btn--danger:hover { background: rgba(185, 28, 28, .1); color: #b91c1c; }
.icon-btn .ico { width: 14px; height: 14px; }

.type-tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 21px; padding: 0 6px; border-radius: 5px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  border: 1px solid transparent;
}
.type-A     { color: #6fe3a1; background: rgba(69, 209, 126, .12); border-color: rgba(69, 209, 126, .22); }
.type-AAAA  { color: #7fb8ff; background: rgba(102, 170, 255, .12); border-color: rgba(102, 170, 255, .22); }
.type-CNAME { color: #c3a2ff; background: rgba(180, 140, 255, .12); border-color: rgba(180, 140, 255, .22); }
.type-MX    { color: #b45309; background: rgba(180, 120, 0, .1); border-color: rgba(180, 120, 0, .22); }
.type-TXT   { color: #58584f; background: rgba(10, 10, 10, .07); border-color: rgba(10, 10, 10, .13); }
.type-NS    { color: #6fdad9; background: rgba(77, 217, 214, .1);  border-color: rgba(77, 217, 214, .22); }
.type-SRV   { color: #be185d; background: rgba(190, 24, 93, .08); border-color: rgba(190, 24, 93, .2); }
.type-CAA   { color: #d6d67a; background: rgba(214, 214, 122, .1); border-color: rgba(214, 214, 122, .22); }

.proxy-ind {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 24px; border: 0; border-radius: 6px;
  background: transparent; cursor: pointer;
}
.proxy-ind .ico { width: 17px; height: 17px; }
.proxy-ind--on .ico { color: #ff9f45; }
.proxy-ind--off .ico { color: #4a4a55; }
.proxy-ind:hover { background: rgba(10, 10, 10, .07); }
.proxy-ind--off:hover .ico { color: var(--amber); }

/* nameservers / dnssec */
.option-card {
  display: flex; gap: 13px; padding: 15px 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(10, 10, 10, .018);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.option-card:hover { border-color: var(--line-2); background: rgba(10, 10, 10, .035); }
.option-card.is-on { border-color: rgba(10, 10, 10, .34); background: rgba(10, 10, 10, .05); }
.option-card__radio {
  width: 17px; height: 17px; margin-top: 2px; flex: none; border-radius: 50%;
  border: 1.5px solid rgba(10, 10, 10, .3);
  display: grid; place-items: center;
}
.option-card.is-on .option-card__radio { border-color: #111110; }
.option-card.is-on .option-card__radio::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #111110;
}
.option-card__title { font-size: 13.5px; font-weight: 560; display: flex; align-items: center; gap: 8px; }
.option-card__desc { margin-top: 4px; font-size: 12.5px; color: var(--mute); line-height: 1.55; }

.ns-list { display: flex; flex-direction: column; gap: 8px; }
.ns-row { display: flex; align-items: center; gap: 8px; }
.ns-row__index { width: 22px; font-size: 12px; color: var(--mute); font-family: var(--mono); text-align: right; flex: none; }
.ns-row .input { height: 36px; font-family: var(--mono); font-size: 13px; }

.ds-box {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 13px; border-radius: 10px;
  background: rgba(10, 10, 10, .04); border: 1px solid var(--line);
}
.copy-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.copy-row__val { font-family: var(--mono); font-size: 12px; color: var(--dim); word-break: break-all; line-height: 1.5; }

/* register domain */
.reg-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 38px 24px 34px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #ffffff;
}
.reg-input {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  margin-top: 8px;
}
.reg-input .input {
  width: auto; min-width: 120px; max-width: 60vw;
  height: auto; padding: 4px 2px 6px;
  font-family: var(--mono); font-size: clamp(22px, 4vw, 34px); font-weight: 500;
  letter-spacing: -.02em; text-align: right;
  background: transparent; border: 0; border-bottom: 2px solid var(--line-2);
  border-radius: 0;
}
.reg-input .input:focus { box-shadow: none; border-bottom-color: #111110; background: transparent; }
.reg-input__tld {
  font-family: var(--mono); font-size: clamp(22px, 4vw, 34px);
  font-weight: 500; letter-spacing: -.02em; color: var(--mute);
}
.reg-status { min-height: 22px; margin-top: 12px; font-size: 12.5px; display: flex; align-items: center; gap: 7px; justify-content: center; }
.reg-status .ico { width: 14px; height: 14px; }
.reg-status--ok { color: var(--green); }
.reg-status--bad { color: #ff8b8b; }
.reg-status--wait { color: var(--mute); }
.reg-actions { margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.reg-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 18px; }
.reg-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mute); }
.reg-check .ico { width: 12.5px; height: 12.5px; color: var(--green); opacity: .85; }

/* empty state */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 46px 24px 50px;
  border: 1px dashed rgba(10, 10, 10, .13); border-radius: var(--radius-lg);
  background: rgba(10, 10, 10, .012);
}
.empty__ico {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: rgba(10, 10, 10, .04);
  color: var(--dim); margin-bottom: 16px;
}
.empty__ico .ico { width: 20px; height: 20px; }
.empty__title { font-size: 15px; font-weight: 600; }
.empty__desc { margin-top: 6px; font-size: 13px; color: var(--mute); max-width: 34em; line-height: 1.65; }
.empty__actions { margin-top: 18px; display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; }

/* callout */
.callout {
  display: flex; gap: 11px; padding: 13px 14px;
  border: 1px solid var(--line-2); border-radius: 11px;
  background: rgba(10, 10, 10, .03);
  font-size: 12.5px; line-height: 1.6; color: var(--dim);
}
.callout .ico { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--blue); }
.callout--warn { border-color: rgba(180, 120, 0, .24); background: rgba(180, 120, 0, .06); color: #92400e; }
.callout--warn .ico { color: var(--amber); }
.callout--bad { border-color: rgba(185, 28, 28, .26); background: rgba(185, 28, 28, .06); color: #991b1b; }
.callout--bad .ico { color: var(--red); }
.callout__title { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.callout--warn .callout__title { color: #ffe0ad; }
.callout--bad .callout__title { color: #ffd0d0; }

/* record form grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: 1 / -1; }

/* small helpers */
.hstack { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vstack { display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.small { font-size: 12px; }
.hidden { display: none !important; }
.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; }

/* mobile drawer */
.mobile-only { display: none; }
.sidebar-scrim {
  display: none; position: fixed; inset: var(--topbar-h) 0 0; z-index: 55;
  background: rgba(3, 3, 5, .6); backdrop-filter: blur(3px);
  animation: fadeIn .15s ease;
}

/* ---------- animations ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(14px) scale(.98); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.rise { animation: rise .4s cubic-bezier(.2, .8, .3, 1) both; }
.rise-1 { animation-delay: .04s; }
.rise-2 { animation-delay: .09s; }
.rise-3 { animation-delay: .14s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .main { padding: 22px 22px 72px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
    width: 280px; height: auto; z-index: 58;
    transform: translateX(-102%);
    transition: transform .22s cubic-bezier(.2, .8, .3, 1);
    box-shadow: 24px 0 60px -20px rgba(10, 10, 10, .16);
  }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .sidebar-scrim { display: block; }
  .mobile-only { display: grid; }
  .topbar__crumbs { display: none; }
  .features { grid-template-columns: 1fr; }
  .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: auto; }
}
@media (max-width: 600px) {
  .nav { height: 62px; padding: 0 16px; }
  .nav__actions { gap: 6px; }
  .nav .btn--ghost { padding: 0 9px; }
  .hero { padding-top: 48px; }
  .hero__title { font-size: clamp(28px, 8.6vw, 40px); }
  .hero__cta { width: 100%; flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .auth__card { padding: 22px 18px 20px; border-radius: 15px; }
  .main { padding: 18px 16px 64px; }
  .page-head__title { font-size: 19px; }
  .dom-hero { padding: 18px 16px 16px; }
  .table th, .table td { padding-left: 12px; padding-right: 12px; }
  .table .row-actions { opacity: 1; }
  .env-switch { left: 12px; right: 12px; bottom: 12px; justify-content: center; }
  .toast-root { left: 12px; right: 12px; max-width: none; }
  .modal-overlay { padding: 14px; align-items: flex-end; }
  .modal { max-height: calc(100dvh - 28px); }
  .footer { flex-direction: column; align-items: flex-start; }
}
