:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #14233a;
  background: #f1f5fa;
  --ink: #14233a;
  --muted: #52627a;
  --line: #dce5f0;
  --brand: #174db7;
  --navy: #111f3a;
  --white: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
a { color: var(--brand); }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.055em; line-height: 1.1; }
h2 { font-size: 1.18rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
:focus-visible { outline: 3px solid #438af0; outline-offset: 3px; }
[hidden] { display: none !important; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  min-height: 44px; padding: .64rem 1rem; border-radius: 9px; border: 1px solid transparent;
  font-weight: 650; font-size: .94rem; text-decoration: none; line-height: 1.35; text-align: center;
}
.primary { background: #1955c8; color: white; }
.primary:hover { background: #1348ae; }
.secondary { background: white; border-color: #c9d5e6; color: #233a5d; }
.secondary:hover { background: #f0f5fc; }
.brand { display: inline-flex; align-items: center; gap: .78rem; color: white; }
.brand strong { display: block; font-size: 1.34rem; letter-spacing: -.035em; line-height: 1.1; }
.brand small { display: block; color: #b8cbe9; margin-top: .31rem; font-size: .84rem; }
.mark {
  inline-size: 2.55rem; block-size: 2.55rem; display: inline-flex; align-items: end; justify-content: center;
  gap: 3px; padding-bottom: .62rem; border-radius: 11px; background: #2262d1; flex: none;
}
.mark span { width: 4px; height: 7px; background: #fff; border-radius: 2px; }
.mark span:nth-child(2) { height: 12px; }
.mark span:nth-child(3) { height: 18px; }
.login-screen { display: grid; min-height: 100svh; place-items: center; padding: 32px; }
.login-wrap {
  width: min(100%, 1000px); display: grid; grid-template-columns: 1.18fr 1fr; min-height: 535px;
  border-radius: 24px; overflow: hidden; background: white; border: 1px solid var(--line);
  box-shadow: 0 24px 68px #172f5921;
}
.login-hero {
  background: radial-gradient(ellipse at 105% 85%, #2359a9, transparent 64%), var(--navy);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  gap: 56px; padding: clamp(32px, 5vw, 58px); color: white;
}
.login-hero h1 { font-size: clamp(3rem, 6.5vw, 5.1rem); line-height: .99; margin: .55rem 0 1rem; }
.login-hero p { color: #d2e0f8; line-height: 1.55; max-width: 28ch; }
.login-stages { display: flex; flex-wrap: wrap; gap: 8px; }
.login-stages span { background: #ffffff12; border: 1px solid #b3cbf04a; border-radius: 7px; padding: 6px 10px; font-size: .875rem; }
.login-card { display: grid; align-items: center; padding: clamp(28px, 6vw, 64px); }
.login-card h2 { font-size: 1.95rem; line-height: 1.12; margin: .55rem 0 .8rem; }
.login-card p { color: var(--muted); line-height: 1.55; }
.login-card .ms, .login-card .notice, .login-card .error { width: 100%; margin-top: 1.2rem; }
.kicker, .context { font-size: .81rem; font-weight: 700; letter-spacing: .10em; }
.login-card .kicker { color: #2156ab; }
.windows { display: grid; grid-template-columns: repeat(2, 7px); gap: 2px; }
.windows i { width: 7px; height: 7px; background: #fff; }
.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100svh; }
.sidebar { background: var(--navy); padding: 26px 16px; color: white; display: flex; flex-direction: column; gap: 30px; }
.sidebar > a { margin: 3px 9px; text-decoration: none; width: fit-content; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a {
  color: #c3d2ec; text-decoration: none; border-radius: 8px; display: flex; align-items: center;
  font-size: .94rem; font-weight: 600; padding: .65rem .7rem; gap: .65rem; min-height: 43px;
}
.sidebar nav a:hover, .sidebar nav a[aria-current] { color: white; background: #244576; }
.sidebar nav span { width: 20px; font-size: 1.14rem; text-align: center; flex: none; }
.account { margin-top: auto; border-top: 1px solid #36496b; padding: 18px 6px 0; display: flex; gap: .65rem; align-items: center; overflow-wrap: anywhere; }
.account strong { font-size: .94rem; }
.avatar { border-radius: 50%; background: #304e7e; padding: .61rem; font-size: .88rem; font-weight: 700; flex: none; }
.link { border: 0; background: transparent; color: #c3d2ec; padding: 4px 0 0; text-decoration: underline; font-size: .875rem; }
.main { width: min(100%, 1360px); padding: clamp(22px, 4vw, 56px); margin: 0 auto; }
.context { color: #33517b; margin-bottom: 1.25rem; }
.context span { color: #647b9d; margin: 0 .35rem; }
.pagehead { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.7rem; }
.pagehead p { color: var(--muted); margin-top: .55rem; line-height: 1.6; }
.pagehead .button { flex: none; }
.panel { background: white; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric { display: flex; align-items: center; gap: .9rem; padding: 19px; text-decoration: none; color: var(--ink); }
.metric:hover { border-color: #8aa9da; }
.metric div > span { color: var(--muted); font-size: .9rem; display: block; }
.metric strong { display: block; margin-top: 4px; font-size: 1.7rem; line-height: 1.05; }
.metric-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; font-size: 1.15rem; font-weight: 700; flex: none; }
.blue { background: #e9f1ff; color: #1d50a5; }
.amber { background: #fff1d3; color: #775018; }
.green { background: #def5eb; color: #0b6849; }
.section-head { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 20px 22px; }
.text-action, .protocol { font-size: .94rem; font-weight: 650; text-decoration: none; }
.text-action:hover, .protocol:hover { text-decoration: underline; }
.empty { text-align: center; color: var(--muted); border-top: 1px solid var(--line); padding: 3rem 1rem; }
.empty span { color: #3e639e; font-size: 1.65rem; }
.empty p { margin-top: .5rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .85rem 1.1rem; border-top: 1px solid var(--line); }
th { background: #f7f9fd; font-size: .875rem; font-weight: 700; color: #435775; }
td { font-size: .94rem; overflow-wrap: anywhere; }
.value, .protocol, .badge { white-space: nowrap; }
.badge { display: inline-block; border-radius: 20px; padding: .28rem .65rem; font-size: .875rem; font-weight: 650; }
.badge.review { background: #fff2d6; color: #77501a; }
.badge.payment { background: #e5efff; color: #214f9a; }
.badge.returned { background: #fce6e7; color: #8d303d; }
.badge.paid { background: #e2f4ed; color: #17664a; }
.stack, .request-form { display: grid; align-content: start; gap: 16px; }
.form-panel { padding: clamp(18px, 3vw, 26px); }
.form-panel > h2 { margin-bottom: 1rem; }
.form-panel p { color: var(--muted); line-height: 1.5; }
.form-panel > p + .button { margin-top: .8rem; }
.choices, .fields, .data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.choice { display: flex; align-items: flex-start; gap: .7rem; padding: 14px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.choice:has(:checked) { border-color: #5381cb; background: #edf4ff; }
.choice input { margin-top: .3rem; accent-color: var(--brand); }
.choice small { display: block; margin-top: .3rem; color: var(--muted); font-size: .875rem; line-height: 1.35; }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.field span, .filter label, legend { font-size: .94rem; font-weight: 650; }
input:not([type=checkbox], [type=radio]), select {
  width: 100%; min-width: 0; min-height: 43px; color: var(--ink); background: white;
  border: 1px solid #b9c9dd; border-radius: 8px; padding: .55rem .65rem;
}
select {
  appearance: none; padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, #405875 50%), linear-gradient(135deg, #405875 50%, transparent 50%);
  background-position: calc(100% - 16px) 51%, calc(100% - 11px) 51%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
input[type=file] { background: #f7faff; }
input[type=file]::file-selector-button { border: 1px solid #bfcee2; background: white; padding: .3rem .5rem; border-radius: 5px; color: var(--ink); }
.conditional { min-width: 0; padding: 0; margin: 1.2rem 0 0; border: 0; }
legend { padding: 0; margin-bottom: .72rem; color: #3d5680; }
.conditional p { margin-top: .8rem; }
.check { display: block; margin-top: .6rem; }
.upload { margin-top: .8rem; }
.upload small { color: var(--muted); font-size: .875rem; }
.form-actions, .pagination { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; justify-content: flex-end; }
.pagination { padding: 16px; border-top: 1px solid var(--line); }
.filter { display: flex; align-items: center; gap: .6rem; }
.filter select { width: auto; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.data-grid { margin: 1rem 0 0; }
.data-grid dt { color: var(--muted); font-size: .875rem; margin-bottom: .25rem; }
.data-grid dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.attachments { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.attachments a { display: grid; padding: .7rem .75rem; border: 1px solid var(--line); border-radius: 7px; gap: .25rem; overflow-wrap: anywhere; }
.attachments span, .history li span { font-size: .875rem; color: var(--muted); }
.history ol { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; gap: .4rem; padding: .75rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.action-form { display: grid; gap: .7rem; }
.action-form button { justify-self: start; }
details { margin-top: 1rem; }
summary { cursor: pointer; color: var(--brand); font-weight: 600; }
details form { margin-top: .6rem; }
.notice, .error, .success { padding: .75rem 1rem; border-radius: 8px; line-height: 1.5; }
.notice { color: #2b4770; background: #e6effb; }
.error { color: #831d31; background: #ffe7eb; margin-bottom: .75rem; }
.success { color: #175b41; background: #e3f5eb; }
.simple { max-width: 600px; margin: 5vh auto; padding: 1rem; }
.simple .button { margin-top: 1rem; }
.settings-tabs { display: flex; gap: .55rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.settings-tabs a { padding: .65rem .8rem; border-bottom: 3px solid transparent; text-decoration: none; color: var(--muted); }
.settings-tabs a[aria-current] { border-bottom-color: var(--brand); color: var(--brand); font-weight: 650; }
.settings-tabs a span { margin-right: .35rem; }
.user-email { display: block; margin-top: .3rem; color: var(--muted); font-size: .875rem; }
.field-help { margin-top: .7rem; font-size: .94rem; }
.setup-panel { margin-bottom: 1rem; }
.setup-panel .button { margin: .8rem .35rem 0 0; }
.profile-options { border: 0; padding: 0; margin: 0 0 1.1rem; display: grid; gap: .5rem; }
.profile-options label { width: fit-content; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1060px) {
  .shell { grid-template-columns: 230px minmax(0, 1fr); }
  .metric { padding: 14px; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .shell, .login-wrap { grid-template-columns: 1fr; }
  .sidebar { gap: 14px; padding: 14px 12px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 3px; }
  .sidebar nav a { padding: .4rem .6rem; }
  .account { padding: 10px 6px 0; }
  .login-screen { padding: 16px; }
  .login-hero { gap: 26px; }
}
@media (max-width: 530px) {
  .metrics { grid-template-columns: 1fr; gap: 8px; }
  .choices, .fields, .data-grid { grid-template-columns: 1fr; }
  .pagehead { align-items: flex-start; flex-direction: column; gap: .7rem; }
  .filter { flex-wrap: wrap; }
}
