:root {
  --ink: #eef4fb;
  --muted: #a6b2c1;
  --page: #070b12;
  --page-end: #0d2037;
  --card: rgba(24, 40, 60, 0.82);
  --card-line: rgba(255, 255, 255, 0.14);
  --gold: #e5bd3d;
  --gold-soft: rgba(229, 189, 61, 0.12);
  --input: rgba(4, 11, 20, 0.42);
  --shadow: rgba(0, 0, 0, 0.24);
}

html[data-theme="light"] {
  --ink: #0a1a2d;
  --muted: #5e6c7d;
  --page: #f7f8fa;
  --page-end: #e3edf7;
  --card: rgba(255, 255, 255, 0.82);
  --card-line: rgba(8, 24, 44, 0.14);
  --input: rgba(255, 255, 255, 0.78);
  --shadow: rgba(8, 24, 44, 0.12);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(118deg, rgba(229, 189, 61, 0.07), transparent 34%),
    linear-gradient(122deg, var(--page), var(--page-end));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button, input { font: inherit; }

button { cursor: pointer; }

.access-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.venetian-lines {
  position: absolute;
  inset: 58px 0 auto;
  height: 116px;
  pointer-events: none;
  opacity: 0.48;
}

.venetian-lines span {
  position: absolute;
  left: -4%;
  width: 108%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(229, 189, 61, 0.62), rgba(74, 128, 184, 0.38), transparent);
  transform-origin: center;
}

.venetian-lines span:nth-child(1) { top: 25px; transform: rotate(2.5deg); }
.venetian-lines span:nth-child(2) { top: 61px; transform: rotate(-2deg); opacity: 0.65; }
.venetian-lines span:nth-child(3) { top: 91px; transform: rotate(1deg); opacity: 0.38; }

.access-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--card-line);
  background: linear-gradient(90deg, rgba(229, 189, 61, 0.11), rgba(8, 15, 25, 0.5) 45%, rgba(8, 15, 25, 0.72));
  backdrop-filter: blur(18px);
}

html[data-theme="light"] .access-header {
  background: linear-gradient(90deg, rgba(229, 189, 61, 0.16), rgba(255, 255, 255, 0.58) 48%, rgba(255, 255, 255, 0.78));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(229, 189, 61, 0.58);
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 24px;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; }
.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--card-line);
  border-radius: 50%;
  color: var(--gold);
  background: var(--input);
}

.access-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  align-items: center;
  gap: clamp(38px, 7vw, 96px);
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 62px);
  margin: 0 auto;
  padding: 70px 0 54px;
}

.access-story { max-width: 570px; }

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1, h2 { margin: 0; }

h1 {
  max-width: 640px;
  margin-top: 19px;
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 1.02;
  font-weight: 650;
}

.access-story > p:not(.eyebrow) {
  max-width: 600px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 34px;
}

.trust-grid article {
  min-height: 84px;
  padding: 15px;
  border: 1px solid var(--card-line);
  background: rgba(255, 255, 255, 0.035);
}

.trust-grid strong, .trust-grid span { display: block; }
.trust-grid strong { font-size: 13px; }
.trust-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-card {
  width: 100%;
  max-width: 540px;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid var(--card-line);
  border-radius: 5px;
  background: var(--card);
  box-shadow: 0 26px 70px var(--shadow);
  backdrop-filter: blur(22px);
}

#auth-panel, #workspace-panel { padding: 34px; }

.auth-card h2 {
  margin-top: 10px;
  font-size: 29px;
}

.card-copy {
  margin: 10px 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid var(--card-line);
  border-radius: 3px;
  outline: none;
  color: var(--ink);
  background: var(--input);
}

input:focus {
  border-color: rgba(229, 189, 61, 0.78);
  box-shadow: 0 0 0 2px rgba(229, 189, 61, 0.13);
}

.primary-button, .secondary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 15px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.primary-button {
  color: #07101e;
  background: var(--gold);
}

.primary-button:disabled { cursor: wait; opacity: 0.6; }

.secondary-button {
  border-color: var(--card-line);
  color: var(--ink);
  background: transparent;
}

.form-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-message.error { color: #ff9c9c; }
.form-message.success { color: #79dab7; }

.sent-note {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.secondary-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.secondary-actions button {
  padding: 3px 0;
  border: 0;
  color: var(--muted);
  background: none;
  font-size: 12px;
}

.grant-list { display: grid; gap: 10px; }

.grant {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 15px;
  border: 1px solid var(--card-line);
  background: rgba(255, 255, 255, 0.035);
}

.grant strong, .grant span { display: block; }
.grant span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.grant a, .grant .pending {
  padding: 9px 12px;
  border: 1px solid rgba(229, 189, 61, 0.48);
  border-radius: 3px;
  color: var(--gold);
  background: var(--gold-soft);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.grant .pending { border-color: var(--card-line); color: var(--muted); }

.auth-card footer {
  padding: 14px 34px;
  border-top: 1px solid var(--card-line);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

[hidden] { display: none !important; }

@media (max-width: 860px) {
  .access-layout {
    grid-template-columns: 1fr;
    width: min(680px, calc(100% - 32px));
    padding-top: 82px;
  }

  .access-story { margin: 0 auto; text-align: center; }
  .access-story > p:not(.eyebrow) { margin-inline: auto; }
  .auth-card { margin: 0 auto; }
}

@media (max-width: 520px) {
  .access-layout { width: min(100% - 24px, 440px); padding: 70px 0 24px; }
  .access-story { text-align: left; }
  h1 { font-size: 38px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-grid article { min-height: 0; }
  #auth-panel, #workspace-panel { padding: 24px 20px; }
  .auth-card footer { padding-inline: 20px; }
  .grant { grid-template-columns: 1fr; }
  .grant a, .grant .pending { text-align: center; }
}
