:root {
  color-scheme: dark;
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  color: #edf4fb;
  background: #070c14;
  --muted: #a6b6c9;
  --line: #35485a;
  --bright: #bdddf4;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100svh; isolation: isolate; }
body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  content: "";
  background:
    radial-gradient(ellipse at 50% 28%, #162333 0%, transparent 55%),
    radial-gradient(ellipse at 9% 0%, #1c2b3b 0%, transparent 36%),
    linear-gradient(155deg, #0b111b 3%, #060a12 58%, #0b1521);
}
body::after {
  content: "";
  position: fixed;
  z-index: -2;
  width: 99vw;
  height: 84vh;
  top: -50vh;
  left: -32vw;
  transform: rotate(-27deg);
  border-radius: 48%;
  border-bottom: 1px solid #9bc6e21e;
  background: linear-gradient(176deg, #6385a12c, #2f455b17 83%, #739ab715);
  pointer-events: none;
}
button, input { font: inherit; }
a { color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:enabled { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid #afd9fb; outline-offset: 4px; }
[hidden] { display: none !important; }
svg { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.waves { position: fixed; z-index: -1; inset: auto -4% -2px; height: clamp(100px, 24vh, 290px); pointer-events: none; }
.waves svg { width: 100%; height: 100%; overflow: visible; }
.wave-tide { animation: tide 18s ease-in-out infinite alternate; }
.wave-drift { animation: tide 23s ease-in-out infinite alternate-reverse; }
.wave-highlight { filter: drop-shadow(0 0 5px #92caff); }
@keyframes tide { from { transform: translate(-1.6%, 1%); } to { transform: translate(1.6%, -2.1%); } }

.auth-frame { min-height: 100svh; display: grid; place-items: center; padding: 36px 24px; }
.auth-panel { width: min(100%, 428px); text-align: center; position: relative; }
.brand { color: #f2f7fc; }
.brand .boat { width: min(100%, 253px); margin: 0 auto 17px; filter: drop-shadow(0 0 10px #b3dfff25); }
.brand h1 { margin: 0; }
.brand .wordmark { width: clamp(132px, 34vw, 194px); margin: 0 auto; }
.brand p {
  margin: 18px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 2vw, 16px);
  font-size: clamp(.62rem, 2.7vw, .76rem);
  text-transform: uppercase;
  letter-spacing: .32em;
  font-weight: 600;
  white-space: nowrap;
}
.brand p::before, .brand p::after { content: ""; width: min(9vw, 43px); height: 1px; background: linear-gradient(90deg, transparent, #c8dfefb3); }
.brand p::after { transform: scaleX(-1); }
.auth-form { display: grid; gap: 13px; margin-top: 39px; }
.field {
  position: relative;
  min-height: 52px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  padding-left: 15px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(115deg, #111d29e8, #0c141fc9 78%);
  box-shadow: inset 0 1px 0 #c0d7ea0e, 0 8px 22px #02040828;
  transition: border-color 150ms, box-shadow 150ms;
}
.field:focus-within { border-color: #8eaec9; box-shadow: 0 0 0 3px #8eaec91a; }
.field > svg { width: 20px; color: #c1d1e1; pointer-events: none; }
.field input {
  width: 100%;
  min-height: 51px;
  border: 0;
  border-radius: 12px;
  outline: 0;
  padding: 0 14px;
  background: transparent;
  color: #f4f8fe;
  font-size: 1rem;
}
.field input::placeholder { color: #b5c3d3; opacity: 1; }
.field input:disabled { opacity: 1; }
.field:has(.reveal:not([hidden])) input { padding-right: 55px; }
.field input:autofill { color-scheme: dark; }
.reveal { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center; color: #a7b9cd; }
.reveal:hover { color: #eff7ff; background: #c1dbf510; }
.reveal svg { width: 19px; }

.primary {
  margin-top: 7px;
  min-height: 53px;
  border-radius: 12px;
  border: 1px solid #62849f;
  background: linear-gradient(168deg, #253b4f 0%, #172535 47%, #111b28 100%);
  box-shadow: inset 0 1px 0 #d8edff29, 0 10px 28px #01030866;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #f5f8fc;
  font-size: 1.05rem;
  font-weight: 600;
  transition: border-color 150ms, background-color 150ms, box-shadow 150ms;
}
.primary svg { width: 22px; transition: transform 150ms; }
.primary:enabled:hover { border-color: #a2c9e7; box-shadow: inset 0 0 22px #89b9e21f, 0 10px 28px #01030866; }
.primary:enabled:hover svg { transform: translateX(3px); }
.primary:disabled { border-color: #425c72; color: #d0dce8; }
.private { margin-top: 25px; color: #ccdae8; }
.private > div { display: flex; justify-content: center; align-items: center; gap: 12px; }
.private > div::before, .private > div::after { content: ""; width: min(16vw, 74px); height: 1px; background: linear-gradient(90deg, transparent, #8099af9c); }
.private > div::after { transform: scaleX(-1); }
.private svg { width: 23px; color: #d5e4f0; }
.private p { margin: 9px 0 0; text-transform: uppercase; font-size: .61rem; letter-spacing: .23em; font-weight: 600; }
.private p span { color: #86add0; margin: 0 2px; }
.notice { margin: 0; font-size: .82rem; line-height: 1.45; color: #b6c8db; }
.notice.error { padding: 8px 10px; border: 1px solid #834e57; background: #351a25b8; color: #ffd3d8; border-radius: 8px; }
.notice.success { color: #b6e0d3; }
.setup-form h2, .simple-message h2 { margin: 0; font-size: 1.35rem; font-weight: 600; }
.setup-copy, .simple-message p { margin: 0; color: var(--muted); font-size: .9rem; }
.simple-message { display: grid; gap: 12px; margin-top: 36px; }
.back { display: inline-flex; align-items: center; justify-content: center; gap: 8px; justify-self: center; min-height: 44px; text-decoration: none; font-size: .86rem; color: #b9cce0; }
.back:hover { color: #f5faff; }
.back svg { width: 17px; }

.director .waves { opacity: .58; }
.workspace { width: min(100% - 48px, 1120px); min-height: 100svh; margin: auto; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 76px; border-bottom: 1px solid #34465880; }
.top-brand, .top-account { display: flex; align-items: center; gap: 11px; }
.top-brand { text-decoration: none; }
.top-brand .boat { width: 68px; }
.top-brand .wordmark { width: 38px; }
.top-account { gap: 17px; }
.account-name { color: #b3c3d3; font-size: .86rem; }
.signout { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 1px solid #374b5d; border-radius: 9px; background: #121e2c; font-size: .8rem; }
.signout:hover { background: #1e3142; }
.signout svg { width: 17px; }
.workspace-main { flex: 1; padding: 43px 0 55px; }
.workspace-heading { text-align: center; margin: 10px auto 34px; }
.workspace-heading .eyebrow { margin: 0 0 12px; text-transform: uppercase; font-size: .7rem; font-weight: 600; letter-spacing: .26em; color: #9ab7d1; }
.workspace-heading h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 550; letter-spacing: -.045em; line-height: 1.1; }
.workspace-heading p { color: var(--muted); margin: 13px 0 0; font-size: .96rem; }
.sections, .finance-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-card, .finance-card, .section-empty {
  position: relative;
  padding: 18px;
  text-decoration: none;
  border: 1px solid #34495d;
  border-radius: 13px;
  background: linear-gradient(150deg, #172636db, #0e1723f0 76%);
  box-shadow: inset 0 1px 0 #b2d1ee0c, 0 12px 30px #02060b30;
}
.section-card { display: grid; gap: 7px; min-height: 140px; align-content: start; transition: border-color 150ms, transform 150ms, background 150ms; }
.section-card:hover { transform: translateY(-2px); border-color: #7493ad; background: linear-gradient(150deg, #21354a, #111d2b 80%); }
.section-card:last-child { grid-column: span 2; }
.card-icon { display: grid; place-items: center; width: 35px; height: 35px; color: #b8d5ec; border: 1px solid #39556e; border-radius: 9px; background: #233c532e; }
.card-icon svg { width: 20px; }
.card-name { font-size: 1rem; font-weight: 600; margin-top: 3px; }
.card-detail, .finance-card p, .section-empty p { color: var(--muted); font-size: .83rem; line-height: 1.45; }
.card-arrow { position: absolute; top: 21px; right: 16px; color: #9cbad4; }
.card-arrow svg { width: 17px; }
.workspace-footer { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 16px 0; border-top: 1px solid #34465880; color: #a8b9cc; font-size: .74rem; }
.workspace-footer span:first-child { display: flex; align-items: center; gap: 7px; }
.workspace-footer svg { width: 15px; }
.section-heading { margin-top: 8px; }
.finance-grid { padding: 0; margin: 0; list-style: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.finance-card h2, .section-empty h2 { margin: 12px 0 0; font-size: 1.05rem; font-weight: 600; }
.finance-card p, .section-empty p { margin: 7px 0 0; }
.empty-label { color: #a9c5de; font-size: .69rem; letter-spacing: .09em; text-transform: uppercase; }
.section-empty { max-width: 540px; margin: auto; padding: 28px; text-align: center; }
.section-empty .card-icon { margin: auto; }

@media (max-width: 820px) {
  .sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
  .auth-frame { padding-inline: 20px; }
  .brand .boat { width: min(65vw, 222px); margin-bottom: 14px; }
  .auth-form { margin-top: 30px; }
  .private { margin-top: 22px; }
  .private p { letter-spacing: .14em; }
  .workspace { width: calc(100% - 32px); }
  .topbar { min-height: 65px; }
  .top-account { gap: 9px; }
  .workspace-main { padding: 25px 0 32px; }
  .workspace-heading { margin-bottom: 23px; }
  .section-card, .finance-card { padding: 12px; }
  .section-card { min-height: 126px; }
  .card-arrow { top: 15px; right: 10px; }
  .card-name { font-size: .9rem; }
  .card-detail, .finance-card p { font-size: .78rem; }
  .finance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 570px) {
  .auth-frame { padding-block: 24px; }
  .auth-form { margin-top: 22px; }
  .brand .boat { width: 183px; margin-bottom: 9px; }
  .brand .wordmark { width: 138px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
