@font-face {
  font-family: "Albert Sans";
  src: url("/assets/AlbertSans-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --indigo: #090446;
  --indigo-hover: #211b66;
  --indigo-60: #78789b;
  --indigo-30: #bcbbd0;
  --indigo-10: #e1e0ed;
  --gold: #ffbf46;
  --ink: #211e42;
  --muted: #595572;
  --paper: #f8f7fb;
  --surface: #fff;
  --danger: #9b252e;
  --radius: 16px;
  --gutter: clamp(20px, 4vw, 56px);
  --shell: 1280px;
  font-family: "Albert Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--indigo-hover); }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
a { color: inherit; }
p { line-height: 1.55; }

.shell {
  width: 100%;
  max-width: var(--shell);
  padding-inline: var(--gutter);
  margin-inline: auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--indigo-10);
}
.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  width: fit-content;
  color: var(--indigo);
  text-decoration: none;
}
.brand img { display: block; width: 136px; height: auto; }
.brand span {
  padding-left: 16px;
  border-left: 1px solid var(--indigo-30);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.1;
}

.test-banner {
  margin: 0;
  background: var(--indigo-10);
  color: var(--indigo);
  font-size: .8125rem;
}
.test-banner[hidden] { display: none; }
.test-banner .shell {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-block: 9px;
}
.test-banner strong { flex: none; }
.test-banner strong::before, .eyebrow-marker::before, .stat-label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--gold);
  border: 1px solid #865900;
}

#identity {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: .875rem;
  min-width: 0;
}
#identity:empty { display: none; }
.identity-name { min-width: 0; }
.identity-name strong, .identity-name small { display: block; overflow-wrap: anywhere; }
.identity-name small { color: var(--muted); margin-top: 3px; }
.avatar {
  width: 34px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex: none;
  color: var(--indigo);
  background: var(--indigo-10);
  font-size: .75rem;
  font-weight: 750;
}

#app { flex: 1; padding-block: clamp(32px, 6vw, 78px); }
#app:has(.ca-auth) { padding-block: clamp(32px, 6vw, 72px); }
#app:has(.heading) { padding-block: clamp(32px, 4vw, 56px); }
.initial-status { color: var(--muted); margin: 0; }
.site-footer { border-top: 1px solid var(--indigo-10); color: var(--muted); }
.site-footer .shell {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-block: 20px;
  font-size: .8125rem;
}
.site-footer strong { color: var(--indigo); font-weight: 700; }

h1, h2, h3 { color: var(--indigo); margin: 0; }
h1 {
  font-size: clamp(2.6rem, 5.7vw, 5rem);
  font-weight: 250;
  line-height: .99;
  letter-spacing: -.049em;
}
h2 { font-size: 1.5rem; font-weight: 750; letter-spacing: -.029em; }
h3 { font-size: 1.0625rem; font-weight: 750; }
.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .105em;
  line-height: 1.4;
  text-transform: uppercase;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  min-height: 500px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--indigo-10);
  background: var(--surface);
  box-shadow: 0 20px 60px #0904460c;
}
.login-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  padding: clamp(30px, 5.4vw, 76px);
  color: var(--indigo-10);
  background:
    radial-gradient(ellipse at 95% 120%, #49418f 0%, #221967 38%, transparent 67%),
    var(--indigo);
}
.login-story h1 { color: var(--surface); max-width: 11ch; }
.login-story .eyebrow { color: var(--indigo-10); }
.login-story .eyebrow-marker::before { border: none; }
.login-story .intro { font-size: clamp(1rem, 1.3vw, 1.25rem); margin: 24px 0 0; max-width: 32ch; }
.login-motif {
  position: absolute;
  z-index: -1;
  inset: auto -9% -49% auto;
  width: clamp(300px, 39vw, 590px);
  aspect-ratio: 1;
  border: 1px solid #bcbbe24a;
  border-radius: 10% 50% 50% 10%;
  transform: rotate(-31deg);
  pointer-events: none;
}
.login-motif::before, .login-motif::after {
  position: absolute;
  content: "";
  border: 1px solid #bcbbe239;
  border-radius: inherit;
  inset: 9%;
}
.login-motif::after { inset: 18%; border-top-color: #ffbf4680; }

.login-form {
  align-self: center;
  padding: clamp(30px, 5.4vw, 76px);
}
.login-form h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.login-form p:not(.error) { color: var(--muted); margin: 8px 0 26px; }
.login-form button { width: 100%; margin-top: 8px; justify-content: space-between; }

label { display: block; font-size: .875rem; font-weight: 700; color: var(--indigo); margin-bottom: 7px; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--indigo-30);
  border-radius: 8px;
  padding: 11px 13px;
}
select { padding-right: 30px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 100px; resize: vertical; }
.login-form input, .login-form select { margin-bottom: 18px; }
.login-form input:focus-visible, .login-form select:focus-visible { outline-offset: 2px; }

.primary, .secondary, .quiet, .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.35;
}
.primary { background: var(--indigo); color: var(--surface); }
.primary:hover { background: var(--indigo-hover); }
.secondary, .quiet { color: var(--indigo); background: var(--surface); border-color: var(--indigo-30); }
.secondary:hover, .quiet:hover { background: var(--paper); }
.danger { color: var(--danger); border-color: #f1c6cb; background: var(--surface); }
.danger:hover { background: #fff1f3; }
.error { color: var(--danger); margin: 12px 0 0; font-size: .875rem; }
.error:empty { display: none; }

.heading { margin-bottom: 28px; }
.heading h1 { font-size: clamp(2.45rem, 5vw, 4.5rem); }
.heading .eyebrow { margin-bottom: 10px; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 28px;
}
.stats div {
  min-width: 0;
  padding: clamp(13px, 2vw, 22px);
  background: var(--surface);
  border: 1px solid var(--indigo-10);
  border-radius: var(--radius);
}
.stat-label {
  font-size: .875rem;
  color: var(--muted);
  font-weight: 650;
}
.stat-label::before { background: var(--indigo-30); border: none; }
.stats .new .stat-label::before { background: var(--gold); border: 1px solid #865900; }
.stats .accepted .stat-label::before { background: var(--indigo-hover); }
.stats .completed .stat-label::before { background: #357552; }
.stats strong {
  display: block;
  color: var(--indigo);
  margin-top: 8px;
  font-size: clamp(1.7rem, 4.3vw, 2.65rem);
  line-height: 1;
  font-weight: 450;
  font-variant-numeric: tabular-nums;
}

.panel { background: var(--surface); border: 1px solid var(--indigo-10); border-radius: var(--radius); }
.list-panel { overflow: hidden; }
.list-heading {
  padding: clamp(16px, 2.4vw, 26px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 20px;
}
.list-heading h2 { display: flex; align-items: center; gap: 10px; }
.count {
  color: var(--indigo);
  background: var(--indigo-10);
  min-width: 28px;
  padding: 4px 7px;
  border-radius: 5px;
  text-align: center;
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: 0;
}
.filters { display: grid; grid-template-columns: minmax(0, 285px) minmax(164px, 180px); gap: 10px; }
.table-wrap { overflow-x: auto; }
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: .9375rem;
}
th, td { padding: 13px clamp(12px, 2vw, 24px); vertical-align: middle; }
th {
  background: var(--paper);
  border-block: 1px solid var(--indigo-10);
  color: var(--muted);
  font-weight: 650;
  font-size: .8125rem;
}
td { border-bottom: 1px solid var(--indigo-10); overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
td small { display: block; font-size: .8125rem; color: var(--muted); margin-top: 3px; }
td .case-number { margin: 0 0 5px; font-size: .75rem; letter-spacing: .025em; font-variant-numeric: tabular-nums; }
.case-link, .arrow {
  color: var(--indigo);
  background: transparent;
  padding: 0;
  border: 0;
}
.case-link { text-align: left; font-weight: 750; font-size: inherit; }
.case-link:hover { text-decoration: underline; }
.arrow {
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--indigo-10);
  font-size: 1.2rem;
  line-height: 1;
}
.arrow:hover { background: var(--paper); }
.mobile-label { display: none; }
.empty { margin: 0; padding: 28px 24px; color: var(--muted); }
.badge {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 5px;
  background: var(--indigo-10);
  color: var(--indigo);
  font-size: .75rem;
  font-weight: 750;
  line-height: 1.3;
}
.badge.new { background: #fff1d0; color: #623e01; }
.badge.accepted { background: #eae5ff; color: #432884; }
.badge.rejected, .badge.cancelled { background: #fcebed; color: #8a2530; }
.badge.completed { background: #e5f2e9; color: #25573c; }

.detail {
  margin-top: 30px;
  scroll-margin-top: 20px;
  padding: clamp(16px, 2.8vw, 32px);
  border-radius: var(--radius);
  border: 1px solid var(--indigo-10);
  background: #efedf7;
}
.detail-title { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 20px; }
.detail-title h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.detail-title .eyebrow { margin-bottom: 8px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.57fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.detail-grid > .panel { min-width: 0; padding: clamp(16px, 2vw, 24px); }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--muted); font-size: .875rem; }
.detail h3 { margin-bottom: 10px; }
dl { display: grid; grid-template-columns: minmax(100px, 37%) minmax(0, 1fr); gap: 10px 14px; margin: 0 0 24px; font-size: .9rem; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.description { margin: 0 0 24px; white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding-block: 12px; border-top: 1px solid var(--indigo-10); overflow-wrap: anywhere; }
.timeline small { display: block; color: var(--muted); margin-top: 4px; }
.timeline p { margin: 7px 0 0; white-space: pre-wrap; }
.internal { padding: 3px 5px; font-size: .7rem; background: var(--indigo-10); color: var(--indigo); border-radius: 4px; margin-left: 4px; }
.action-panel .eyebrow { margin-bottom: 8px; }
.action-panel > p:not(.eyebrow) { color: var(--muted); margin: 8px 0 16px; font-size: .9rem; }
.action-panel form > button { display: flex; width: 100%; margin-top: 10px; }
.action-panel .hint { display: block; color: var(--muted); font-size: .78rem; margin: 7px 0 12px; }
.action-panel hr { border: 0; border-top: 1px solid var(--indigo-10); margin: 20px 0; }
#notice {
  position: fixed;
  z-index: 10;
  bottom: 18px;
  right: 18px;
  max-width: min(400px, calc(100% - 36px));
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--indigo);
  color: var(--surface);
  font-size: .875rem;
  box-shadow: 0 12px 28px #09044630;
}
#notice:empty { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 820px) {
  .login-layout { min-height: 0; }
  .login-form, .login-story { padding: 28px; }
  .login-story h1 { font-size: clamp(2.3rem, 6.6vw, 4rem); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #app { padding-block: 28px; }
  .header-inner { min-height: 62px; gap: 8px; }
  .brand { gap: 8px; }
  .brand img { width: 106px; }
  .brand span { padding-left: 8px; font-size: 15px; }
  #identity { justify-content: flex-end; gap: 7px; }
  .avatar, .identity-name small { display: none; }
  .identity-name { font-size: .75rem; text-align: right; }
  #logout { padding: 6px 8px; min-height: 36px; font-size: .78rem; }
  .test-banner .shell { gap: 3px 8px; flex-wrap: wrap; }
  .login-layout { grid-template-columns: 1fr; border-radius: 16px; }
  .login-story { min-height: 214px; padding: 24px 28px; }
  .login-story h1 { max-width: none; font-size: clamp(2rem, 8.6vw, 2.6rem); }
  .login-story .intro { margin-top: 12px; font-size: .9375rem; }
  .login-motif { inset: auto -12% -50% auto; }
  .stats { gap: 7px; margin-bottom: 18px; }
  .stats div { padding: 12px 9px; border-radius: 10px; }
  .stat-label { display: block; min-height: 2.6em; font-size: .75rem; }
  .stat-label::before { display: none; }
  .stats strong { margin-top: 0; }
  .list-heading { gap: 12px; }
  .filters { width: 100%; grid-template-columns: minmax(0, 1fr); gap: 8px; }

  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
    padding: 15px 16px;
    border-top: 1px solid var(--indigo-10);
  }
  td { display: block; padding: 0; border: 0; }
  td:nth-child(2) { grid-column: 1 / -1; }
  td:nth-child(3) { grid-row: 1; grid-column: 2; justify-self: end; }
  td:nth-child(4) { grid-row: 3; grid-column: 1; align-self: center; }
  td:nth-child(5) { grid-row: 3; grid-column: 2; justify-self: end; }
  .mobile-label { display: block; margin-bottom: 4px; font-size: .75rem; font-weight: 650; color: var(--muted); }
  .detail-title { flex-wrap: wrap-reverse; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
