/*
 * Aurora Console theme.
 * Web glass is a browser approximation built with backdrop-filter and layered borders.
 */

:root {
  --ink: #10213e;
  --muted: #60718d;
  --line: rgba(92, 121, 168, .18);
  --canvas: #eef4ff;
  --card: rgba(255, 255, 255, .78);
  --blue: #1469f5;
  --blue-dark: #0756dc;
  --green: #079768;
  --danger: #dc3c5b;
  --shadow: 0 24px 70px rgba(30, 67, 126, .13);
  --radius: 18px;
  --surface: rgba(255, 255, 255, .82);
  --surface-raised: rgba(255, 255, 255, .94);
  --surface-soft: rgba(244, 248, 255, .76);
  --surface-muted: rgba(226, 236, 250, .78);
  --surface-hover: rgba(237, 244, 255, .92);
  --field: rgba(250, 252, 255, .88);
  --text-soft: #425474;
  --text-faint: #71819a;
  --accent-soft: rgba(20, 105, 245, .10);
  --accent-border: rgba(20, 105, 245, .25);
  --success-soft: rgba(7, 151, 104, .10);
  --danger-soft: rgba(220, 60, 91, .10);
  --topbar: rgba(255, 255, 255, .70);
  --glass-highlight: rgba(255, 255, 255, .72);
  --aurora-a: rgba(20, 105, 245, .22);
  --aurora-b: rgba(0, 177, 210, .16);
  --aurora-c: rgba(90, 86, 222, .11);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink: #edf5ff;
  --muted: #9eb0c9;
  --line: rgba(154, 185, 226, .16);
  --canvas: #07111f;
  --card: rgba(15, 29, 49, .80);
  --blue: #64a0ff;
  --blue-dark: #82b2ff;
  --green: #3bd4a0;
  --danger: #ff738d;
  --shadow: 0 28px 80px rgba(0, 0, 0, .34);
  --surface: rgba(15, 29, 49, .84);
  --surface-raised: rgba(21, 39, 64, .94);
  --surface-soft: rgba(20, 37, 60, .82);
  --surface-muted: rgba(37, 57, 83, .72);
  --surface-hover: rgba(32, 53, 82, .92);
  --field: rgba(16, 32, 54, .88);
  --text-soft: #c7d5e8;
  --text-faint: #8fa2bb;
  --accent-soft: rgba(100, 160, 255, .14);
  --accent-border: rgba(100, 160, 255, .32);
  --success-soft: rgba(59, 212, 160, .12);
  --danger-soft: rgba(255, 115, 141, .12);
  --topbar: rgba(9, 21, 37, .72);
  --glass-highlight: rgba(255, 255, 255, .10);
  --aurora-a: rgba(45, 119, 255, .26);
  --aurora-b: rgba(0, 191, 214, .17);
  --aurora-c: rgba(96, 82, 220, .14);
  color-scheme: dark;
}

html {
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, var(--aurora-a), transparent 30rem),
    radial-gradient(circle at 94% 14%, var(--aurora-b), transparent 28rem),
    radial-gradient(circle at 54% 110%, var(--aurora-c), transparent 34rem),
    var(--canvas);
  font-family: "Segoe UI Variable", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
}

body::before,
body::after {
  position: fixed;
  z-index: 0;
  content: "";
  pointer-events: none;
}

body::before {
  inset: -25vmax;
  background:
    radial-gradient(circle at 30% 34%, var(--aurora-a), transparent 18%),
    radial-gradient(circle at 68% 52%, var(--aurora-b), transparent 20%),
    radial-gradient(circle at 52% 78%, var(--aurora-c), transparent 17%);
  filter: blur(34px);
  opacity: .72;
  animation: aurora-drift 18s ease-in-out infinite alternate;
}

body::after {
  inset: 0;
  opacity: .34;
  background-image:
    linear-gradient(rgba(77, 113, 169, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 113, 169, .05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

.boot-view,
.login-shell,
.app-shell {
  position: relative;
  z-index: 1;
}

.boot-view {
  background: transparent;
}

.boot-logo {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .62),
    0 18px 45px rgba(20, 105, 245, .28);
}

.login-shell {
  min-height: 100dvh;
  grid-template-columns: minmax(500px, 43%) 1fr;
  overflow: hidden;
  background: rgba(238, 244, 255, .54);
}

:root[data-theme="dark"] .login-shell {
  background: rgba(7, 17, 31, .55);
}

.login-panel {
  position: relative;
  width: min(560px, 100%);
  max-width: none;
  max-height: 100dvh;
  margin: auto;
  overflow-y: auto;
  padding: 44px 58px;
  scrollbar-width: thin;
}

.login-panel:has(#registerForm:not(.hidden)) {
  width: min(640px, 100%);
}

.brand-login {
  height: auto;
  margin-bottom: 34px;
}

.brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 14px;
  background: linear-gradient(145deg, #1787ff, #165bea 54%, #4c45d7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    0 14px 30px rgba(20, 105, 245, .28);
}

.brand-mark::after {
  position: absolute;
  inset: -70% -25%;
  content: "";
  transform: rotate(28deg);
  background: linear-gradient(90deg, transparent 38%, rgba(255, 255, 255, .46), transparent 62%);
  animation: brand-sheen 5.5s ease-in-out infinite;
}

.brand strong {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.025em;
}

.brand small {
  color: var(--text-faint);
  font-size: 12px;
}

.auth-mode-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 30px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.auth-mode-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 760;
  transition: color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease;
}

.auth-mode-switch button.active {
  color: #fff;
  background: linear-gradient(135deg, #1678ff, #0b5ce4);
  box-shadow: 0 10px 24px rgba(20, 105, 245, .24);
}

.auth-mode-switch button:active {
  transform: scale(.98);
}

.login-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  color: var(--blue);
  background: var(--accent-soft);
  font-size: 12px;
  letter-spacing: .08em;
}

.login-copy h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 3vw, 43px);
  line-height: 1.12;
  font-weight: 880;
  letter-spacing: -.045em;
}

.login-copy p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.login-form {
  gap: 16px;
  margin-top: 28px;
}

.login-form label span,
.remark-field span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 760;
}

.login-form input {
  min-height: 50px;
  border-radius: 13px;
  font-size: 15px;
}

.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.register-honeypot {
  position: fixed !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.password-strength {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: -8px;
  color: var(--text-faint);
  font-size: 12px;
}

.password-strength::before {
  grid-column: 1;
  grid-row: 1;
  height: 5px;
  border-radius: 999px;
  content: "";
  background: var(--surface-muted);
}

.password-strength i {
  --strength: 0%;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  width: var(--strength);
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--danger), #f2aa23 52%, var(--green));
  transition: width .28s cubic-bezier(.16, 1, .3, 1);
}

.password-strength span {
  grid-column: 2;
  white-space: nowrap;
}

.register-consent {
  display: flex !important;
  align-items: flex-start;
  gap: 9px !important;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.register-consent input {
  width: 17px;
  height: 17px;
  min-height: 17px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.register-consent span {
  line-height: 1.55;
}

.register-plan-note {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.register-plan-note strong,
.register-plan-note span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: 12px;
}

.register-plan-note strong {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #1678ff, #0b5ce4);
}

.security-note {
  margin-top: 22px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
}

.login-art {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, .65), transparent 18rem),
    radial-gradient(circle at 78% 28%, rgba(0, 189, 216, .22), transparent 22rem),
    linear-gradient(145deg, #0c63e7, #153d9c 52%, #102c72);
}

:root[data-theme="dark"] .login-art {
  background:
    radial-gradient(circle at 20% 18%, rgba(100, 160, 255, .20), transparent 18rem),
    radial-gradient(circle at 78% 28%, rgba(0, 189, 216, .18), transparent 22rem),
    linear-gradient(145deg, #071b3c, #0b2554 52%, #0d1b3a);
}

.login-art::before,
.login-art::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.login-art::before {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -90px;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow:
    inset 0 0 90px rgba(255, 255, 255, .08),
    0 0 0 70px rgba(255, 255, 255, .025);
}

.login-art::after {
  width: 240px;
  height: 240px;
  bottom: 9%;
  left: 9%;
  background: linear-gradient(145deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

.art-grid {
  opacity: .34;
  background-size: 46px 46px;
  background-image:
    linear-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .10) 1px, transparent 1px);
}

.art-card {
  color: #f7fbff;
  border: 1px solid rgba(255, 255, 255, .24);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .08)),
    rgba(8, 36, 91, .28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 30px 80px rgba(0, 18, 68, .34);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.art-main {
  width: min(500px, 70%);
  padding: 40px;
}

.art-main .art-label,
.art-float {
  color: rgba(239, 247, 255, .78);
}

.art-main strong {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.18;
}

.art-platforms i {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 19px;
  box-shadow: 0 14px 34px rgba(0, 19, 67, .28);
}

.sidebar {
  inset: 12px auto 12px 12px;
  width: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    var(--shadow);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}

.brand {
  height: 78px;
  padding: 0 20px;
}

.nav {
  padding: 8px 12px 14px;
}

.nav-item {
  min-height: 48px;
  margin: 4px 0;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  transition:
    color .25s ease,
    background .25s ease,
    border-color .25s ease,
    transform .25s cubic-bezier(.16, 1, .3, 1),
    box-shadow .25s ease;
}

.nav-item:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-hover);
  transform: translateX(3px);
}

.nav-item.active {
  color: #fff;
  border-color: rgba(255, 255, 255, .20);
  background: linear-gradient(135deg, #1678ff, #0a5be0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .26),
    0 12px 28px rgba(20, 105, 245, .25);
}

.nav-item.active::before {
  display: none;
}

.nav-item.active svg {
  filter: drop-shadow(0 4px 8px rgba(0, 24, 86, .24));
}

.nav-separator {
  margin: 15px 12px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.mode-toggle,
.server-state {
  border-radius: 12px;
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.main {
  margin-left: 284px;
  padding-top: 12px;
}

.topbar {
  top: 12px;
  height: 72px;
  margin: 0 18px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--topbar);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 16px 42px rgba(27, 59, 113, .10);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.topbar-title h1,
.topbar h1 {
  font-size: 22px;
  font-weight: 860;
}

.breadcrumb {
  color: var(--text-faint);
  font-size: 12px;
}

.theme-toggle-button {
  min-height: 40px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.avatar {
  background: linear-gradient(145deg, #1678ff, #143e96);
  box-shadow: 0 8px 18px rgba(20, 105, 245, .20);
}

.content {
  width: min(1500px, 100%);
  padding: 32px 30px 70px;
}

.section-head h2 {
  font-size: 26px;
}

.section-head p,
.panel-head p {
  color: var(--muted);
  font-size: 13px;
}

.data-panel,
.form-panel,
.accounts-panel,
.provider-card,
.workspace-toolbar,
.directory-tree,
.quick-start-panel,
.operations-strip {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 18px 50px rgba(27, 59, 113, .075);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
}

.data-panel,
.form-panel,
.provider-card,
.dashboard-stat,
.plan-card {
  transition:
    border-color .28s ease,
    background .28s ease,
    box-shadow .28s ease,
    transform .28s cubic-bezier(.16, 1, .3, 1);
}

.provider-card:hover,
.plan-card:hover {
  border-color: var(--accent-border);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 24px 60px rgba(20, 105, 245, .14);
  transform: translateY(-4px);
}

.button {
  min-height: 44px;
  overflow: hidden;
  border-radius: 12px;
  font-size: 14px;
  transition:
    color .22s ease,
    background .22s ease,
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s cubic-bezier(.16, 1, .3, 1);
}

.button.primary {
  color: #fff;
  border-color: rgba(255, 255, 255, .16);
  background: linear-gradient(135deg, #197eff, #0758db);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 12px 28px rgba(20, 105, 245, .26);
}

.button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2588ff, #0955ce);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .32),
    0 16px 34px rgba(20, 105, 245, .32);
  transform: translateY(-2px);
}

.button:active:not(:disabled) {
  transform: scale(.975);
}

.button.subtle,
.icon-button,
.theme-toggle-button {
  color: var(--text-soft);
  border-color: var(--line);
  background: var(--surface-soft);
}

.button.subtle:hover,
.icon-button:hover,
.theme-toggle-button:hover {
  color: var(--blue);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

input,
select,
textarea {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: var(--field);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  font-size: 14px;
  transition:
    border-color .22s ease,
    background .22s ease,
    box-shadow .22s ease,
    transform .22s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  background: var(--surface-raised);
  box-shadow:
    0 0 0 4px var(--accent-soft),
    0 10px 24px rgba(20, 105, 245, .10);
  transform: translateY(-1px);
}

.quick-start-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .18);
  color: #f7fbff;
  background:
    radial-gradient(circle at 92% 20%, rgba(0, 211, 226, .24), transparent 20rem),
    linear-gradient(125deg, #075bd9, #133f9c 58%, #112f75);
  box-shadow: 0 24px 64px rgba(15, 62, 145, .22);
}

.quick-start-panel::before {
  position: absolute;
  width: 320px;
  height: 320px;
  top: -230px;
  right: 12%;
  content: "";
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgba(255, 255, 255, .03);
}

.quick-start-copy,
.quick-start-actions {
  position: relative;
  z-index: 1;
}

.quick-start-copy .eyebrow,
.quick-start-copy p {
  color: rgba(239, 247, 255, .72);
}

.quick-start-actions button {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 15px;
  color: #f8fbff;
  background: rgba(255, 255, 255, .10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .17);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition:
    background .25s ease,
    border-color .25s ease,
    transform .25s cubic-bezier(.16, 1, .3, 1),
    box-shadow .25s ease;
}

.quick-start-actions button:hover {
  border-color: rgba(255, 255, 255, .36);
  background: rgba(255, 255, 255, .17);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .24),
    0 18px 36px rgba(0, 18, 68, .20);
  transform: translateY(-4px);
}

.quick-start-actions small {
  color: rgba(231, 241, 255, .70);
}

.dashboard-stats,
.reliability-grid {
  gap: 14px;
}

.dashboard-stat {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.dashboard-stat::after {
  position: absolute;
  width: 72px;
  height: 72px;
  right: -28px;
  bottom: -30px;
  content: "";
  border-radius: 50%;
  background: var(--accent-soft);
}

.dashboard-stat:nth-child(2n)::after {
  background: color-mix(in srgb, var(--success-soft) 86%, transparent);
}

.dashboard-stat > strong {
  color: var(--ink);
  font-size: 27px;
}

.panel-head {
  border-bottom-color: var(--line);
}

.provider-logo {
  border-color: var(--line);
  background: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 12px 28px rgba(20, 55, 112, .15);
}

.account-row,
.api-key-row,
.admin-user-card,
.admin-drive-row,
.admin-batch-row {
  transition: background .22s ease, transform .22s ease;
}

.account-row:hover,
.api-key-row:hover,
.admin-user-card:hover,
.admin-drive-row:hover,
.admin-batch-row:hover {
  background: var(--surface-hover);
}

.data-table thead,
.data-table th,
.tree-title {
  background: var(--surface-soft);
}

.data-table tbody tr:hover td {
  background: var(--surface-hover);
}

.pathbar,
.search-filter-panel,
.search-duplicate-check,
.plan-card,
.profile-summary > div,
.membership-limit-grid > div,
.feed-item {
  border-color: var(--line);
  background: var(--surface-soft);
}

.search-console,
.transfer-console {
  overflow: visible;
}

.search-bar input,
.search-bar select,
.transfer-link-field textarea {
  border-width: 1px;
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 10px 25px rgba(28, 63, 118, .06);
}

.search-bar input:focus,
.transfer-link-field textarea:focus {
  box-shadow:
    0 0 0 4px var(--accent-soft),
    0 18px 36px rgba(20, 105, 245, .13);
}

.transfer-steps b,
.search-index-badge {
  color: #fff;
  background: linear-gradient(135deg, #197eff, #0758db);
  box-shadow: 0 8px 18px rgba(20, 105, 245, .20);
}

.transfer-steps span {
  color: var(--text-soft);
}

.plan-card.current {
  border-color: var(--accent-border);
  background:
    radial-gradient(circle at 100% 0%, var(--accent-soft), transparent 10rem),
    var(--surface-soft);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 18px 40px rgba(20, 105, 245, .11);
}

.plan-price strong {
  color: var(--blue);
}

.modal-backdrop {
  background: rgba(3, 12, 28, .62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-card,
.danger-auth-card,
.recovery-codes-card,
.detail-drawer {
  border: 1px solid var(--line);
  background: var(--surface-raised);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 30px 90px rgba(3, 20, 54, .30);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}

.toast {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 20px 60px rgba(8, 29, 65, .18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .data-panel,
:root[data-theme="dark"] .form-panel,
:root[data-theme="dark"] .accounts-panel,
:root[data-theme="dark"] .provider-card,
:root[data-theme="dark"] .workspace-toolbar,
:root[data-theme="dark"] .directory-tree,
:root[data-theme="dark"] .operations-strip,
:root[data-theme="dark"] .button.subtle,
:root[data-theme="dark"] .theme-toggle-button,
:root[data-theme="dark"] .icon-button {
  color: var(--ink);
  border-color: var(--line);
}

:root[data-theme="dark"] .provider-logo {
  background: #fff !important;
}

@keyframes aurora-drift {
  0% { transform: translate3d(-2%, -1%, 0) rotate(-2deg) scale(1); }
  50% { transform: translate3d(2%, 1%, 0) rotate(2deg) scale(1.04); }
  100% { transform: translate3d(0, 3%, 0) rotate(-1deg) scale(1.01); }
}

@keyframes brand-sheen {
  0%, 68% { transform: translateX(-130%) rotate(28deg); }
  88%, 100% { transform: translateX(130%) rotate(28deg); }
}

@media (max-width: 1180px) {
  .sidebar {
    width: 236px;
  }

  .main {
    margin-left: 260px;
  }

  .content {
    padding-inline: 22px;
  }

  .topbar {
    margin-inline: 10px;
  }

  .login-shell {
    grid-template-columns: minmax(470px, 48%) 1fr;
  }

  .search-bar,
  .search-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-submit,
  .search-tool-actions {
    width: 100%;
  }
}

@media (max-width: 920px) {
  .sidebar {
    inset: 10px auto 10px 10px;
    width: min(286px, calc(100vw - 24px));
    transform: translateX(calc(-100% - 22px));
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
    padding-top: 8px;
  }

  .topbar {
    top: 8px;
    margin-inline: 10px;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-panel {
    max-height: none;
  }

  .login-art {
    display: none;
  }

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

@media (max-width: 680px) {
  body::after {
    opacity: .18;
    background-size: 32px 32px;
  }

  .login-panel {
    width: 100%;
    min-height: 100dvh;
    padding: 26px 20px 34px;
  }

  .brand-login {
    margin-bottom: 24px;
  }

  .auth-mode-switch {
    margin-bottom: 24px;
  }

  .login-copy h1 {
    font-size: 31px;
  }

  .register-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    height: 66px;
    padding: 0 13px;
    border-radius: 16px;
  }

  .topbar-title h1,
  .topbar h1 {
    font-size: 19px;
  }

  .content {
    padding: 26px 12px 54px;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .data-panel,
  .form-panel,
  .accounts-panel,
  .provider-card,
  .workspace-toolbar,
  .directory-tree,
  .quick-start-panel,
  .operations-strip {
    border-radius: 16px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-stat {
    min-height: 110px;
    padding: 15px;
  }

  .dashboard-stat > strong {
    font-size: 23px;
  }

  .search-bar,
  .search-tools,
  .transfer-form {
    grid-template-columns: 1fr;
  }

  .search-filter-panel {
    margin-inline: 12px;
  }

  .quick-start-actions button:hover,
  .provider-card:hover,
  .plan-card:hover {
    transform: none;
  }
}

@media (max-width: 390px) {
  .login-panel {
    padding-inline: 16px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .register-plan-note span:last-child {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .sidebar,
  .topbar,
  .data-panel,
  .form-panel,
  .accounts-panel,
  .provider-card,
  .workspace-toolbar,
  .directory-tree,
  .quick-start-panel,
  .operations-strip,
  .art-card,
  .modal-card,
  .danger-auth-card,
  .recovery-codes-card,
  .detail-drawer {
    background-color: var(--surface-raised);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
