﻿/* Sylvarion palette, with readable text and controls in both themes. */
:root {
  color-scheme: dark;
  --background: #10141d;
  --panel: #171e2a;
  --field: #111722;
  --line: #354258;
  --text: #f5f6fa;
  --muted: #bac4d4;
  --accent: #95c9fe;
  --cyan: #24aae1;
  --footer: #0d111a;
  --incoming: #8bdfbc;
  --error: #ffabab;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
}
:root[data-theme="light"] {
  color-scheme: light;
  --background: #f1f5fb;
  --panel: #fff;
  --field: #f5f8fd;
  --line: #bac9df;
  --text: #17243b;
  --muted: #465773;
  --accent: #254091;
  --footer: #e8eef8;
  --incoming: #176647;
  --error: #a01b28;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.shell { width: min(72rem, calc(100% - 3rem)); margin-inline: auto; }
main { flex: 1; padding-block: clamp(2rem, 6vw, 5rem); }
a { color: var(--accent); text-underline-offset: .2em; }
p { line-height: 1.6; color: var(--muted); margin: .6rem 0 0; }
h1, h2 { margin: 0; line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h2 { font-size: 1.3rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 2; background: var(--panel); padding: .75rem; transform: translateY(-160%); }
.skip:focus { transform: none; }

.site-header, .site-footer { background: var(--footer); }
.site-header { border-bottom: 1px solid var(--line); }
.site-footer { border-top: 1px solid var(--line); }
.header-inner, .header-actions, .brand, .player, .footer-inner {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.header-inner { min-height: 4.75rem; justify-content: space-between; padding-block: .65rem; }
.brand { color: var(--text); text-decoration: none; font-size: 1.35rem; font-weight: 800; line-height: 1.05; }
.brand small { display: block; margin-top: .3rem; color: var(--muted); font-size: .75rem; font-weight: 600; }
.accent { color: var(--accent); }
.server-link, .footer-inner a { font-size: .875rem; font-weight: 650; }
.theme { width: 2.75rem; font-size: 1.45rem; padding: 0; }
.moon, [data-theme="light"] .sun { display: none; }
[data-theme="light"] .moon { display: inline; }
.avatar { display: grid; place-items: center; width: 2rem; height: 2rem; background: var(--field); border-radius: .35rem; overflow: hidden; color: var(--accent); font-size: .8rem; }
.avatar > * { grid-area: 1 / 1; }
.avatar img { image-rendering: pixelated; }
.footer-inner { padding-block: 1.3rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; font-size: .875rem; }
.footer-inner a { margin-left: auto; }

.login-layout { display: grid; grid-template-columns: 1.38fr 1fr; gap: 1.25rem; }
.city {
  position: relative;
  isolation: isolate;
  min-height: 30rem;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 1.2rem;
  border: 1px solid #40506a;
  background: #17243b url("../img/sylvarion-skyline.jpg") center / cover;
  color: #f5f6fa;
}
.city::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #10141d13 15%, #0d1425a0 50%, #0d1425 100%); }
.city-copy { padding: clamp(1.5rem, 4vw, 3.1rem); }
.eyebrow { color: #aee2fc; font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero-title { color: inherit; font-size: clamp(2.5rem, 6vw, 5.4rem); line-height: .93; font-weight: 900; letter-spacing: -.07em; margin-block: 1rem; }
.hero-title em { color: #8ad5fa; font-style: normal; }
.city-copy > :last-child { max-width: 33ch; color: #d9e7f6; }
.panel, dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.login-panel { align-content: center; }
form { display: grid; gap: 1rem; margin-top: 1.5rem; }
label { display: block; font-weight: 650; font-size: .9rem; }
input, button { font: inherit; }
input {
  display: block;
  margin-top: .45rem;
  width: 100%;
  min-height: 2.85rem;
  padding: .65rem .8rem;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: .55rem;
  font-size: 1rem;
}
input::placeholder { color: var(--muted); opacity: .85; }
.code { font-family: ui-monospace, monospace; letter-spacing: .18em; }
code { padding: .15em .35em; border-radius: .3rem; color: var(--accent); background: var(--field); }
button {
  min-height: 2.75rem;
  padding: .55rem .9rem;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: .55rem;
  font-weight: 700;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { cursor: default; opacity: .55; }
button.primary { background: var(--cyan); color: #081521; border-color: transparent; }
button.primary:hover:not(:disabled) { background: #59c6f2; }
form .primary { margin-top: .25rem; }

.dashboard-intro, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: .85rem; }
.dashboard-intro { margin-bottom: 1.5rem; }
.account-column { display: grid; gap: 1.25rem; }
.vault {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #426991;
  border-radius: 1.2rem;
  color: #f5f6fa;
  background: linear-gradient(95deg, #14223a 35%, #172e49d9), url("../img/sylvarion-skyline.jpg") center 46% / cover;
}
.vault button { color: #f5f6fa; background: #14223a; border-color: #6786aa; }
.vault :focus-visible { outline-color: #95c9fe; }
.vault p { color: #c8d9ee; font-size: .875rem; }
.vault .balance { color: #fff; font-size: clamp(1.8rem, 4.7vw, 3.35rem); line-height: 1.12; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.04em; overflow-wrap: anywhere; }
.optional { color: var(--muted); font-weight: 400; }
.activity-filters { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .85rem; }
.activity-filters button { min-width: 3rem; }
.activity-filters button[aria-pressed="true"] { background: var(--field); border-color: var(--accent); color: var(--accent); }
.amount-field { display: flex; align-items: center; gap: .6rem; }
.amount-field > span { color: var(--muted); overflow-wrap: anywhere; }
.amount-field input { min-width: 0; }
.transactions { list-style: none; margin: 0; padding: 0; }
.transactions li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .25rem .75rem;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-block: .9rem;
}
.transactions li:last-child { padding-bottom: 0; }
.transactions li:first-child { margin-top: .9rem; }
.transactions time, .transactions .memo { color: var(--muted); font-size: .875rem; }
.transactions time { grid-column: 1 / -1; }
.transactions .memo { overflow-wrap: anywhere; }
.transaction-amount { font-variant-numeric: tabular-nums; text-align: right; }
.transaction-amount.incoming { color: var(--incoming); }
.transaction-amount.outgoing { color: var(--error); }

dialog { width: min(29rem, calc(100% - 2rem)); color: var(--text); }
dialog::backdrop { background: #070d19b8; }
.review > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .65rem; border-bottom: 1px solid var(--line); }
.review dt { color: var(--muted); }
.review dd { margin: 0; text-align: right; font-weight: 650; overflow-wrap: anywhere; min-width: 0; }
.dialog-actions { display: flex; gap: .6rem; justify-content: flex-end; }
.notifications { position: fixed; bottom: 1rem; right: 1rem; width: min(24rem, calc(100% - 2rem)); z-index: 3; }
.toast:empty { display: none; }
.toast { background: var(--panel); padding: .9rem 1rem; border: 1px solid var(--line); border-left: 3px solid var(--incoming); border-radius: .65rem; box-shadow: 0 .65rem 1.8rem #0005; }
.toast[role="alert"] { border-left-color: var(--error); color: var(--error); }

@media (max-width: 48rem) {
  .login-layout { grid-template-columns: 1fr; }
  .city { min-height: 19rem; }
}
@media (max-width: 34rem) {
  .shell { width: calc(100% - 1.5rem); }
  .header-inner, .header-actions, .player { gap: .45rem; flex-wrap: wrap; }
  .header-actions { justify-content: flex-end; }
  .server-link { display: none; }
  .footer-inner a { margin-left: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .login-layout, #dashboard { animation: appear .24s ease-out; }
  @keyframes appear { from { opacity: 0; transform: translateY(5px); } }
}

/* The banking navigation stays visible while moving between account tools. */
.bank-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.bank-nav { display: grid; gap: .35rem; padding: .55rem; background: var(--panel); border: 1px solid var(--line); border-radius: .85rem; }
.bank-nav button { text-align: left; border-color: transparent; font-size: .9rem; }
.bank-nav button[aria-current] { background: var(--field); color: var(--accent); border-color: var(--line); }
.bank-page { min-width: 0; }
.link-code { display: block; margin-block: .65rem; padding: .7rem; overflow-wrap: anywhere; }
.link-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
textarea { display: block; width: 100%; margin-top: .45rem; padding: .65rem .8rem; resize: vertical; border: 1px solid var(--line); border-radius: .55rem; background: var(--field); color: var(--text); font: inherit; font-size: 1rem; }
textarea::placeholder { color: var(--muted); }
@media (max-width: 48rem) {
  .bank-layout { grid-template-columns: minmax(0, 1fr); }
  .bank-nav { display: flex; flex-wrap: wrap; }
}



/* Conversation list and thread share a panel on larger screens. */
.dm-layout { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(0, 2.2fr); gap: 1rem; margin-top: 1rem; }
.dm-sidebar { padding: .75rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--field); }
.dm-sidebar > button { width: 100%; }
.dm-sidebar form { margin-block: .75rem; gap: .5rem; }
.chat-list, .message-list { list-style: none; padding: 0; margin: 0; }
.chat-list li { margin-top: .45rem; }
.chat-list button { width: 100%; text-align: left; overflow-wrap: anywhere; }
.chat-list button, .dm-thread h3 { display: flex; align-items: center; gap: .55rem; }
.chat-list .avatar, .dm-thread .avatar { flex: 0 0 2rem; }
.chat-list button[aria-current] { border-color: var(--accent); color: var(--accent); }
.dm-thread { min-width: 0; min-height: 13rem; border: 1px solid var(--line); border-radius: .8rem; padding: 1rem; }
.dm-thread h3 { margin: 0 0 .75rem; overflow-wrap: anywhere; }
.message-list { display: flex; flex-direction: column; gap: .65rem; max-height: 22rem; overflow-y: auto; }
.message-list li { align-self: flex-start; max-width: min(88%, 30rem); padding: .55rem .8rem; border-radius: .75rem; background: var(--field); border: 1px solid var(--line); }
.message-list li.outgoing { align-self: flex-end; border-color: var(--accent); }
.message-list p { margin: 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.message-list time { display: block; margin-top: .2rem; color: var(--muted); font-size: .875rem; }
.dm-thread form { margin-top: 1rem; }
.dm-thread form button { justify-self: end; }
@media (max-width: 40rem) {
  .dm-layout { grid-template-columns: minmax(0, 1fr); }
  .chat-list { display: flex; flex-wrap: wrap; gap: .45rem; }
}
