:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --background: #0a0c10;
  --panel: #12161d;
  --panel-alt: #181d25;
  --border: #2b323d;
  --border-strong: #596576;
  --text: #f4f7fa;
  --muted: #c4ccd6;
  --accent: #f4de35;
  --blue: #52a8ff;
  --green: #39c77a;
  --red: #f05252;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

button, input { font: inherit; }

a { color: var(--blue); }
a:hover { color: var(--text); }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
}

.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 5vw, 5rem);
  border-right: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(82, 168, 255, 0.08), transparent 48%),
    radial-gradient(circle at 18% 82%, rgba(244, 222, 53, 0.08), transparent 30%),
    var(--panel);
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
}

.wordmark {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  text-decoration: none;
}

.wordmark img {
  display: block;
  width: 224px;
  max-width: min(100%, 224px);
  height: auto;
}

.signal {
  position: relative;
  z-index: 1;
  height: 160px;
  margin: auto 0 1.5rem;
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.7vw, 10px);
  opacity: 0.85;
}

.signal span {
  width: 5px;
  height: 20%;
  border-radius: 999px;
  background: linear-gradient(to top, var(--blue), var(--accent));
  animation: pulse 2.4s ease-in-out infinite;
}

.signal span:nth-child(3n) { height: 52%; animation-delay: -0.8s; }
.signal span:nth-child(4n) { height: 86%; animation-delay: -1.6s; }
.signal span:nth-child(5n) { height: 36%; animation-delay: -0.35s; }

@keyframes pulse {
  0%, 100% { transform: scaleY(0.58); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .signal span { animation: none; }
  .spinner { animation: none !important; }
}

.brand-copy, .assurances { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-copy h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.brand-copy > p:last-child {
  max-width: 600px;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

.assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.3rem;
  margin: 2rem 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
  font-size: 1rem;
}

.assurances span { color: var(--green); }

.account-panel {
  display: grid;
  min-width: 0;
  grid-template-rows: 1fr auto;
  padding: clamp(1.25rem, 5vw, 4rem);
  background: var(--background);
}

.account-card {
  align-self: center;
  width: min(100%, 500px);
  margin: auto;
  padding: clamp(1.4rem, 4vw, 2.25rem);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: rgba(18, 22, 29, 0.96);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.34);
}

.account-card h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.65rem, 4vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lead { margin: 0 0 1.4rem; color: var(--muted); font-size: 1rem; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 1.3rem;
  padding: 0.3rem;
  border-radius: 10px;
  background: var(--background);
}

.tab {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.tab[aria-selected="true"] { background: var(--panel-alt); color: var(--text); }

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: 0.38rem; font-size: 0.95rem; font-weight: 700; }
.hint { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.875rem; }

input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  background: var(--panel-alt);
  color: var(--text);
}

input:hover { border-color: var(--border-strong); }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(82, 168, 255, 0.16); }

.button-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.3rem; }

button.action {
  min-height: 48px;
  padding: 0.72rem 1rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-alt);
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
}

button.action:hover { border-color: var(--border-strong); background: #202630; }
button.action.primary { flex: 1 1 190px; border-color: var(--accent); background: var(--accent); color: #111318; }
button.action.primary:hover { background: #ffe94b; }
button.action.danger { color: #ff9c9c; border-color: #7d3434; }
button.action.link { min-height: auto; padding: 0; border: 0; color: var(--blue); background: transparent; }
button.action:disabled { cursor: wait; opacity: 0.58; }

.message {
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-alt);
  color: var(--muted);
}

.message.error { border-color: #7d3434; color: #ffb5b5; }
.message.success { border-color: #276c46; color: #a8edc5; }

.status-card, .permission-list {
  margin: 1.2rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel-alt);
}

.status-line { display: flex; align-items: center; gap: 0.7rem; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.status-dot.pending { background: var(--accent); }
.status-dot.approved { background: var(--green); }
.status-dot.rejected { background: var(--red); }
.metadata { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.permission-list ul { margin: 0.55rem 0 0; padding-left: 1.25rem; }

.loading { display: grid; justify-items: center; gap: 0.7rem; color: var(--muted); }
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

footer {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

noscript {
  position: fixed;
  inset: auto 1rem 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: var(--red);
  color: white;
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: auto; padding: 1.25rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .signal, .assurances, .brand-copy > p:last-child { display: none; }
  .brand-copy { margin-top: 1rem; }
  .brand-copy h1 { font-size: 1.5rem; letter-spacing: -0.025em; }
  .wordmark img { width: 190px; }
  .account-panel { min-height: calc(100vh - 170px); }
}

@media (max-width: 480px) {
  .account-panel { padding: 1rem; }
  .account-card { padding: 1.2rem; border-radius: 13px; }
  .button-row { flex-direction: column; }
  button.action { width: 100%; }
}
