:root {
  color-scheme: light;
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
  --ink: #1b1b1d;
  --graphite: #27272a;
  --muted: #5a5a60;
  --line: #dcdce0;
  --line-strong: #85858e;
  --canvas: #f6f6f7;
  --surface: #fff;
  --brand: #ad2831;
  --brand-hover: #911d29;
  --brand-soft: #fcf1f2;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
.wrap { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
.mast { background: var(--surface); border-bottom: 1px solid var(--line); }
.mast-inner, .identity, .page-title { display: flex; align-items: center; gap: 16px; }
.mast-inner, .page-title { justify-content: space-between; }
.mast-inner { min-height: 74px; padding-block: 9px; }
.mast-logo { display: block; width: 142px; max-width: 42%; height: auto; }
.identity { color: var(--graphite); font-size: .94rem; font-weight: 600; }
.identity span { overflow-wrap: anywhere; }
.login-card { position: relative; max-width: 460px; margin: clamp(40px, 10vh, 110px) auto; padding: clamp(28px, 4.5vw, 46px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 46px rgb(27 27 29 / 6%); }
.login-brand { border-bottom: 1px solid var(--line); padding-bottom: 23px; margin-bottom: 27px; }
.login-brand img { display: block; width: 180px; max-width: 75%; height: auto; }
.entry-options { display: grid; gap: 12px; margin-top: 24px; }
.entry-options a { display: grid; place-items: center; min-height: 48px; padding: 12px; border-radius: 7px; text-align: center; text-decoration: none; font-weight: 620; }
h1, h2 { color: var(--ink); line-height: 1.14; }
h1 { margin: 0; font-size: clamp(1.8rem, 3.3vw, 2.55rem); font-weight: 660; letter-spacing: -.047em; }
.login-card h1 { font-size: clamp(1.65rem, 3vw, 2.05rem); }
h2 { margin: 0; font-size: clamp(1.12rem, 2vw, 1.45rem); font-weight: 650; letter-spacing: -.035em; }
p { color: var(--muted); line-height: 1.55; }
#introAuth { margin: 10px 0 0; }
form { margin-top: 24px; }
label { display: block; color: var(--ink); font-size: .89rem; line-height: 1.45; font-weight: 620; }
input, select, button, a { font: inherit; }
input, select { display: block; width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background-color: var(--surface); font-size: 1rem; font-weight: 450; }
input::placeholder { color: #66666d; }
select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-position: right 16px center, right 11px center; background-size: 5px 5px; background-repeat: no-repeat; }
.login-card input { margin: 6px 0 17px; }
button, .file-link { min-height: 44px; padding: 10px 15px; border-radius: 7px; cursor: pointer; font-size: .94rem; font-weight: 620; line-height: 1.3; }
.primary { width: 100%; color: #fff; background: var(--brand); border: 1px solid var(--brand); }
.primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); }
.secondary, .signout { color: var(--graphite); border: 1px solid #ababaf; background: var(--surface); }
.secondary:hover:not(:disabled), .signout:hover:not(:disabled) { background: #eeeef0; border-color: var(--graphite); }
.text-btn { background: transparent; color: var(--brand-hover); border: 0; padding: 12px 0 5px; text-decoration: underline; text-underline-offset: 3px; }
.file-link { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-hover); border: 1px solid #d8b6ba; background: #fff; text-decoration: none; white-space: nowrap; }
.file-link:hover { border-color: var(--brand); background: var(--brand-soft); }
button:disabled, input:disabled, select:disabled { opacity: .63; cursor: default; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.toolbar nav { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; }
.toolbar nav button { color: #444449; border: 1px solid transparent; background: transparent; }
.toolbar nav button:not(:disabled):hover { background: #e9e9ec; }
.toolbar nav button[aria-current="page"] { color: var(--brand-hover); background: var(--brand-soft); border-color: #dec1c5; box-shadow: inset 0 -3px var(--brand); }
.toolbar nav button:disabled { opacity: 1; color: #68686f; }
.toolbar nav button:disabled::after { content:""; display:inline-block; width:9px; height:7px; margin-left:8px; border:1.5px solid currentColor; border-radius:2px; box-shadow:0 -4px 0 -2px currentColor; }
.page { padding: 30px 0 48px; }
.page h1 { margin-bottom: 18px; }
.page h1:focus:not(:focus-visible) { outline: 0; }
.portfolio-name { margin: -8px 0 20px; }
.page-title, .panel-head { flex-wrap: wrap; }
.overview-grid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(260px,1fr); gap: 18px; margin: 22px 0 24px; }
.metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.metric { display: flex; flex-flow: column; align-items: flex-start; justify-content: space-between; gap: 12px; padding: clamp(16px,2vw,24px); background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 12px; text-align: left; }
.metric:hover:not(:disabled) { background: #fffafb; border-color: var(--brand); }
.metric span { font-size: .96rem; font-weight: 600; }
.metric strong { font-size: clamp(2.1rem,4.5vw,3.35rem); font-weight: 620; line-height: 1; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.metric small { font-size: .875rem; font-weight: 450; color: var(--muted); }
.metric:disabled { opacity: 1; }
.schedule { background: var(--graphite); border-radius: 12px; color: #fff; padding: 22px 24px; }
.schedule h2 { color: #f2f2f4; font-size: 1rem; font-weight: 560; letter-spacing: -.015em; }
.schedule>strong { display: block; margin: 9px 0 5px; color: #fff; font-size: clamp(1.28rem,2vw,1.7rem); letter-spacing: -.035em; }
.schedule p { margin: 0 0 13px; color: #dadade; font-size: .9rem; }
.connection { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid #56565b; font-size: .875rem; }
.connection b { text-align: right; font-weight: 650; }
.panel { min-width: 0; padding: clamp(16px,2.2vw,26px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.empty { margin: 14px 0 0; }
.details { margin: 18px 0 0; }
.details div { display:grid; grid-template-columns:minmax(115px,10em) minmax(0,1fr); gap:16px; padding:12px 0; border-top:1px solid var(--line); }
.details dt { color: var(--muted); }
.details dd { margin:0; overflow-wrap:anywhere; }
.request-fields { display:grid; gap:14px; grid-template-columns:minmax(190px,1.4fr) minmax(150px,.65fr) minmax(160px,1fr); margin-top:14px; }
.request-panel input[type="search"] { max-width:32rem; margin-top:6px; }
.request-fields select, .request-fields input { margin-top:6px; }
.request-panel .primary { width:auto; padding-inline:20px; margin-top:8px; }
.request-panel form { margin-top:16px; }
#requestResult:not(:empty) { margin-top:10px; }
#requestHelp:empty, .message:empty { display:none; }
.message { font-size:.94rem; }
#requestMessage { margin-bottom:0; }
:is(#panelMessage,#requestMessage,#authMessage,#reportsZipMessage):not(:empty) { padding:11px 14px; color:var(--message-ink,var(--graphite)); background:var(--message-bg,#f0f0f2); border-inline-start:3px solid var(--message-line,#606068); border-radius:4px; }
.message[data-state="error"] { --message-ink:#7b1722; --message-bg:#fff0f1; --message-line:var(--brand); }
.message[data-state="success"] { --message-line:#333337; }
.filters { display:flex; align-items:end; flex-wrap:wrap; gap:16px; margin:20px 0; }
.filters label:first-child { flex:1 1 260px; }
.filters input, .filters select { margin-top:6px; }
.filters select { min-width:160px; }
#downloadReportsZip { width:auto; }
.table-box { position:relative; max-width:100%; overflow-x:auto; border:1px solid var(--line); border-radius:10px; background:#fff; }
table { border-collapse:collapse; width:100%; text-align:left; }
th, td { padding:14px 16px; vertical-align:middle; }
th { background:#eeeef0; color:#404045; font-weight:650; font-size:.875rem; }
td { border-top:1px solid var(--line); font-size:.94rem; }
td small { display:block; margin-top:4px; color:var(--muted); font-size:.82rem; font-variant-numeric:tabular-nums; }
td:last-child { text-align:right; }
.table-box tbody tr:hover { background:#fafafa; }
.table-box td:first-child { min-width:170px; }
.table-box td:last-child button { white-space:nowrap; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
@media (max-width: 920px) {
  .overview-grid { grid-template-columns:1fr; }
  .request-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 690px) {
  .wrap { width:calc(100% - 32px); }
  .mast-inner { min-height:61px; }
  .mast-logo { width:115px; }
  .identity { gap:8px; }
  .identity span { max-width:130px; text-align:right; font-size:.875rem; }
  .toolbar { row-gap:8px; padding:10px 0; }
  .toolbar nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; gap:3px; }
  .toolbar nav button { padding:8px 4px; font-size:.89rem; }
  .toolbar>.secondary { margin-inline-start:auto; }
  .page { padding-top:22px; }
  .metrics { grid-template-columns:1fr; gap:7px; }
  .metric { display:grid; grid-template-columns:1fr auto; gap:4px 12px; align-items:center; padding:12px 16px; }
  .metric strong { grid-row:1 / 3; grid-column:2; }
  .request-fields { grid-template-columns:1fr; }
  .filters label, .filters label:first-child { width:100%; flex:1 1 100%; }
  .table-box td:first-child { min-width:145px; }
  th, td { padding:10px; }
}
@media (max-width:400px) {
  .toolbar nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .details div { grid-template-columns:1fr; gap:3px; }
}
@media (forced-colors:active) {
  .toolbar nav button[aria-current="page"] { border:2px solid Highlight; }
  :focus-visible { outline:3px solid Highlight; }
  select { appearance:auto; }
}
