/* Eclipse: The Awakening — black canvas, antique gold, like the game dialog */
:root {
  --sans: "IBM Plex Sans", "Malgun Gothic", "Apple SD Gothic Neo", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  --display: "Cinzel", "Times New Roman", serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", "Consolas", ui-monospace, monospace;
  --radius: 4px;
  --nav: 232px;
  --gold: #c6a15a;
  --gold-bright: #f0e2b8;
  --gold-deep: #8d6a2e;
  --event: #c6a56a;
}

/* Night theme — the game's charcoal panels and antique gold. */
:root,
[data-theme="black"] {
  --bg: #0c0b0a;
  --bg-sidebar: #100e0c;
  --bg-raised: #1a1814;
  --bg-hover: #26231e;
  --bg-input: #12110e;
  --bg-head: #161410;
  --line: rgba(198, 165, 106, .38);
  --line-strong: #8a7044;
  --ink: #f0e8da;
  --muted: #a89880;
  --faint: #7c7160;
  --accent: #c6a56a;
  --accent-hover: #e4cc96;
  --accent-ink: #1a140c;
  --on-accent: #f6efe2;
  --inverse: #f0e8da;
  --inverse-ink: #0c0b0a;
  --danger: #c45c48;
  --danger-bg: #2a1612;
  --ok: #8fbf86;
  --ok-bg: #142016;
  --warn: #d4a24a;
  --shadow: 0 24px 60px rgba(0, 0, 0, .65);
  --topbar: rgba(12, 11, 10, .86);
  --login-glow: #3a2c16;
  --login-veil: linear-gradient(180deg, rgba(8, 7, 6, .22) 0%, rgba(8, 7, 6, .55) 100%);
  --login-scene: url("../img/eclipse-bg.jpg");
  --dash-scene: url("../img/eclipse-bg.jpg");
  --dash-veil: linear-gradient(180deg, rgba(8, 7, 6, .32) 0%, rgba(8, 7, 6, .74) 100%);
  --login-card: rgba(28, 26, 22, .88);
  --login-card-line: rgba(198, 165, 106, .7);
  --login-field: rgba(12, 11, 10, .72);
  --modal-dim: rgba(0, 0, 0, .78);
}

/* Light theme — same gold metal, on warm stone instead of night */
[data-theme="white"] {
  --bg: #efe6d4;
  --bg-sidebar: #f7f1e4;
  --bg-raised: #fffaf0;
  --bg-hover: #e7dcc6;
  --bg-input: #fffaf0;
  --bg-head: #f3ead8;
  --line: rgba(109, 84, 36, .28);
  --line-strong: #8d6a2e;
  --ink: #1a1408;
  --muted: #6d5c40;
  --faint: #8a7d68;
  --accent: #8d6a2e;
  --accent-hover: #6e5424;
  --accent-ink: #fffaf0;
  --on-accent: #fffaf0;
  --inverse: #1a1408;
  --inverse-ink: #fffaf0;
  --danger: #9c3030;
  --danger-bg: #f6e4e1;
  --ok: #6e5424;
  --ok-bg: #f3e6c8;
  --warn: #c41d5a;
  --shadow: 0 18px 40px rgba(40, 28, 8, .12);
  --topbar: rgba(239, 230, 212, .9);
  --login-glow: #e4d2a4;
  --login-veil: linear-gradient(180deg, rgba(239, 230, 212, .12) 0%, rgba(239, 230, 212, .48) 100%);
  --login-scene: url("../img/eclipse-bg.jpg");
  --dash-scene: url("../img/eclipse-bg.jpg");
  --dash-veil: linear-gradient(180deg, rgba(239, 230, 212, .2) 0%, rgba(239, 230, 212, .68) 100%);
  --login-card: rgba(255, 250, 240, .72);
  --login-card-line: rgba(109, 84, 36, .28);
  --login-field: rgba(255, 250, 240, .6);
  --modal-dim: rgba(40, 28, 8, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
html { color-scheme: dark; }
[data-theme="white"] { color-scheme: light; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.mono {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
}

/* ---------- theme switch ---------- */
.theme-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.theme-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: .02em;
}
.theme-switch button.active {
  background: var(--accent);
  color: var(--on-accent);
}
.chrome-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.lang-select {
  appearance: none;
  background: var(--bg-input);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 28px 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* ---------- login ---------- */
.login-body {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
}
.login-body::before,
.login-body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.login-body::before {
  z-index: 0;
  background: var(--login-scene) top center / cover no-repeat;
}
.login-body::after {
  z-index: 0;
  background: var(--login-veil);
}
.noscript { color: var(--ink); text-align: center; padding: 48px 16px; }
.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.login-card {
  width: 420px;
  max-width: 100%;
  text-align: center;
  background: var(--login-card);
  border: 1px solid var(--login-card-line);
  border-radius: 24px;
  padding: 36px 32px 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
}
.login-mark {
  width: 68px;
  height: 68px;
  display: block;
  object-fit: cover;
  margin: 0 auto 16px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
  background: #0f0f11;
}
.login-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.login-sub {
  color: var(--muted);
  font-size: 15px;
  margin: 8px 0 22px;
}
.login-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 7px;
  text-align: left;
}
.login-input {
  height: 46px;
  font-size: 16px;
  background: var(--login-field) !important;
  border-color: var(--login-card-line) !important;
  backdrop-filter: blur(10px);
}
.login-message {
  min-height: 20px;
  margin: 12px 0 14px;
  color: var(--danger);
  font-size: 14px;
  text-align: left;
}
.login-message:empty { margin-bottom: 8px; }
.login-btn { height: 46px; font-size: 15px; border-radius: 999px; }
.login-ok { text-align: center; padding: 48px 28px; }
.login-ok .login-mark { margin-left: auto; margin-right: auto; }
.login-ok strong { display: block; font-size: 20px; margin-bottom: 8px; }
.login-ok span { color: var(--muted); font-size: 14px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 22px;
  background: var(--login-field);
  border: 1px solid var(--login-card-line);
  border-radius: 999px;
}
.auth-tab {
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
}
.auth-tab.active {
  background: var(--accent);
  color: var(--on-accent);
}
.auth-form { text-align: left; }
.auth-form .login-label { margin-top: 12px; }
.auth-form .login-label:first-of-type { margin-top: 0; }
.login-hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 14px;
}
.login-hint:empty { display: none; }

/* ---------- app chrome ---------- */
.main-body {
  min-height: 100vh;
  background: var(--bg);
}
.nav {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--nav);
  background:
    radial-gradient(180px 120px at 18% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--bg-sidebar);
  border-right: 1px solid var(--line);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 24px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0f0f11;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.brand-text h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}
.brand-text span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.nav-list { list-style: none; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
}
.nav-list a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-list a:hover { color: var(--ink); background: var(--bg-hover); }
.nav-list .active a {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.nav-list .active a svg { opacity: 1; }
.nav-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.nav-user {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.nav-user:hover { background: var(--bg-hover); }
.nav-user-name { display: block; font-size: 14px; font-weight: 600; }
.nav-user-role { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.app {
  position: relative;
  margin-left: var(--nav);
  min-height: 100vh;
  background: var(--bg);
  isolation: isolate;
}
.app::before,
.app::after {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--nav);
  pointer-events: none;
  z-index: 0;
}
.app::before {
  background: var(--dash-scene) top center / cover no-repeat;
}
.app::after {
  background: var(--dash-veil);
}
.topbar,
.main-content {
  position: relative;
  z-index: 1;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 18px 32px;
  background: var(--topbar);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.page-kicker {
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
}
.main-content {
  padding: 24px 32px 56px;
  max-width: 1360px;
}
.view { display: none; }
.view.active { display: block; }

/* ---------- cards / panels ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.card {
  background: color-mix(in srgb, var(--bg-raised) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
}
.card .c-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.card .c-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.03em;
  margin-top: 8px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.panel {
  background: color-mix(in srgb, var(--bg-raised) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}
.panel-heading {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-head) 70%, transparent);
}
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--bg-head);
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
  vertical-align: middle;
}
.table tbody tr:hover td { background: var(--bg-hover); }
.table .empty-row td {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
  white-space: normal;
  font-size: 15px;
}

/* ---------- badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--bg-input);
}
.badge.green, .badge.latest {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: transparent;
}
.badge.red {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: transparent;
}
.badge.yellow {
  background: transparent;
  border: 1px dashed var(--warn);
  color: var(--warn);
}
.badge.blue {
  background: var(--bg-hover);
  color: var(--ink);
  border-color: var(--line-strong);
}
.badge.gray, .badge.none {
  color: var(--faint);
  border-color: var(--line);
  background: transparent;
}

/* ---------- forms / toolbar ---------- */
.toolbar-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar-stack .toolbar { margin-bottom: 0; }
.toolbar-search { width: min(280px, 100%); margin-left: auto; }
.warn-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 280px;
}
.warn-input { flex: 1; min-width: 200px; }
.warn-dur { width: 80px; flex: 0 0 80px; }
.input-text {
  background: var(--bg-input);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  width: 100%;
}
.input-text::placeholder { color: var(--faint); }
.input-text:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
select.input-text { height: 42px; }
label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 7px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px;
}
.field.span2 { grid-column: span 2; }
.field.check { display: flex; align-items: center; align-self: end; }
.field.check label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
}
.field.check input { width: auto; accent-color: var(--accent); }
.form-grid .btn { align-self: end; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-group { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.btn-group.start { justify-content: flex-start; }
.btn-green { background: var(--accent); color: var(--on-accent); }
.btn-green:hover { background: var(--accent-hover); }
.btn-red {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger);
}
.btn-red:hover { background: var(--danger); color: var(--inverse-ink); }
.btn-warn {
  background: var(--bg-input);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-warn:hover { border-color: var(--accent); background: var(--bg-hover); }

.copy-btn {
  cursor: pointer;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  margin-left: 6px;
  padding: 1px 7px;
  line-height: 20px;
}
.copy-btn:hover { color: var(--ink); border-color: var(--accent); }

.bot-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--muted);
  background: var(--bg-input);
}
.bot-stat b { color: var(--ink); font-weight: 600; }

/* ---------- modal / toast ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: var(--modal-dim);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-box {
  width: 520px;
  max-width: 94vw;
  max-height: 88vh;
  overflow: auto;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.modal-box h3 { margin-bottom: 8px; font-size: 20px; font-weight: 600; }
.modal-box label { margin-top: 12px; }
.modal-box .btn-group { margin-top: 18px; }
.modal-box .table { margin: 12px 0; }
.muted-detail { font-size: 14px; color: var(--muted); margin: 6px 0 12px; word-break: break-all; }
.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.key-row:last-of-type { border-bottom: none; }

.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  background: var(--inverse);
  color: var(--inverse-ink);
  border: 1px solid var(--inverse);
  padding: 13px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-width: 400px;
  font-size: 14px;
  font-weight: 500;
}
.toast.error { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ---------- updates ---------- */
.ver-hero {
  display: flex;
  align-items: stretch;
  background: color-mix(in srgb, var(--bg-raised) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}
.ver-hero-left {
  flex: 0 0 240px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ver-hero-label { font-size: 13px; font-weight: 500; opacity: .75; }
.ver-hero-value { font-size: 32px; font-weight: 700; letter-spacing: -.03em; margin: 8px 0 6px; line-height: 1; }
.ver-hero-file { font-size: 13px; font-family: var(--mono); opacity: .75; }
.ver-hero-right { flex: 1; padding: 24px; }
.ver-hero-notes-label { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.ver-hero-notes { font-size: 15px; color: var(--ink); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.ver-hero-badge { display: flex; align-items: center; padding: 0 22px; border-left: 1px solid var(--line); }

.changelog-list { padding: 6px 18px; }
.changelog-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.changelog-item:last-child { border-bottom: none; }
.changelog-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.changelog-item-ver { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--accent); }
.changelog-item-date { font-size: 13px; color: var(--muted); }
.changelog-item-notes { font-size: 14px; color: var(--ink); line-height: 1.6; white-space: pre-wrap; }
.changelog-item-notes .cl-line { display: block; padding: 2px 0; }
.changelog-item-notes .cl-fix { color: var(--ok); }
.changelog-item-notes .cl-add { color: var(--accent); }
.changelog-item-notes .cl-imp { color: var(--warn); }
.changelog-empty { text-align: center; color: var(--muted); padding: 32px; font-size: 15px; }

.ver-notes-area { min-height: 96px; resize: vertical; font-family: var(--mono); font-size: 14px; line-height: 1.5; }
.publish-hint {
  font-size: 14px;
  color: var(--muted);
  background: var(--bg-head);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  line-height: 1.55;
}
.publish-msg { font-size: 14px; padding: 0 18px 16px; color: var(--muted); }
.publish-msg.error { color: var(--danger); }
.publish-msg.ok { color: var(--ok); }
.upload-progress {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 4px 18px 14px;
}
.upload-progress.show { display: flex; }
.up-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-hover);
  border-radius: 99px;
  overflow: hidden;
}
.up-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .15s linear;
}
.up-pct { font-size: 14px; font-weight: 600; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

.mono.ip-warn { color: var(--warn); font-weight: 600; }
.mono.ip-warn::after { content: " !"; }

/* ---------- profile ---------- */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: color-mix(in srgb, var(--bg-raised) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px;
  margin-bottom: 16px;
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--accent);
  background: #0f0f11;
}
.profile-hero h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.profile-hero p { margin-top: 4px; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.setting-row:last-child { border-bottom: none; }
.setting-copy { min-width: 0; }
.setting-label {
  font-size: 15px;
  font-weight: 600;
}
.setting-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.lang-select.setting-lang {
  min-width: 160px;
  padding: 9px 32px 9px 14px;
  font-size: 13px;
  border-radius: 10px;
}

@media (max-width: 900px) {
  .nav {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .brand { padding: 0 6px 0 0; }
  .brand-text span { display: none; }
  .nav-list { flex-direction: row; overflow-x: auto; flex: 1; }
  .nav-list a { padding: 8px 10px; font-size: 14px; }
  .nav-list a svg { display: none; }
  .nav-foot { display: none; }
  .app { margin-left: 0; }
  .app::before,
  .app::after { left: 0; }
  .main-content, .topbar { padding-left: 16px; padding-right: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.span2 { grid-column: auto; }
  .toolbar-search { margin-left: 0; width: 100%; }
  .ver-hero { flex-direction: column; }
  .ver-hero-left { flex: none; }
  .ver-hero-badge { border-left: none; border-top: 1px solid var(--line); padding: 14px 20px; }
}

/* ---------- Eclipse: The Awakening skin ---------- */
.login-kicker,
.brand-text span,
.page-kicker {
  font-family: var(--display);
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--accent);
}
.login-kicker { margin: 0 0 6px; }
.login-title,
.brand-text h2,
.page-title {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  background: none;
  color: #e6d3a4;
  -webkit-text-fill-color: #e6d3a4;
}
[data-theme="white"] .login-title,
[data-theme="white"] .brand-text h2,
[data-theme="white"] .page-title {
  color: #1a1408;
  -webkit-text-fill-color: #1a1408;
}
.login-title { font-size: 34px; margin-bottom: 4px; }
.brand-text h2 { font-size: 14px; letter-spacing: .14em; }
.brand-text span {
  letter-spacing: .16em;
  font-size: 9px;
  white-space: nowrap;
}
.page-title { font-size: 20px; letter-spacing: .16em; }
.login-card { border-radius: 2px; }
.login-mark {
  border-radius: 50%;
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(198, 165, 106, .4);
}
.brand-mark {
  border-radius: 50%;
  border-color: var(--accent);
}
.nav-list a { border-radius: 2px; letter-spacing: .04em; }
.nav-list .active a {
  color: #e6d3a4;
  background: transparent;
  border-color: transparent;
  box-shadow: inset 2px 0 0 var(--accent);
  font-weight: 600;
}
[data-theme="white"] .nav-list .active a { color: #6e5424; }
.btn {
  font-family: var(--display);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  border-radius: 2px;
  border: 1px solid #a89060;
  background: linear-gradient(180deg, #3a3630 0%, #242220 100%);
  color: #f3ead8;
  box-shadow: inset 0 1px 0 rgba(240, 220, 170, .18);
}
.btn:hover {
  background: linear-gradient(180deg, #4a443c 0%, #2e2a26 100%);
  border-color: #d4bc86;
  color: #fff6e6;
}
[data-theme="white"] .btn {
  color: #1a1408;
  background: linear-gradient(180deg, #f3e6c4 0%, #d7c08a 100%);
  border-color: #8d6a2e;
}
[data-theme="white"] .btn:hover {
  background: linear-gradient(180deg, #fff3d4 0%, #e4cc96 100%);
  border-color: #6e5424;
  color: #1a1408;
}
.btn-red {
  font-family: var(--sans);
  letter-spacing: .04em;
  text-transform: none;
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger);
  box-shadow: none;
}
.btn-warn {
  font-family: var(--sans);
  letter-spacing: .04em;
  text-transform: none;
  background: transparent;
  color: var(--event, var(--warn));
  border-color: var(--event, var(--warn));
  box-shadow: none;
}
.card, .panel, .modal-box {
  border-radius: 2px;
  border-color: var(--line);
}
html:not([data-theme="white"]) .login-body::before,
html:not([data-theme="white"]) .app::before {
  filter: sepia(.72) saturate(.55) brightness(.62) contrast(1.2);
}
.card .c-label, .panel-heading {
  font-family: var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 11px;
}
