:root { color-scheme: light; --navy: #1e242b; --ink: #1e242b; --muted: #66707e; --gold: #e9b724; --line: #e3e7ed; --surface: #f5f6f8; --blue: #2455e6; --green: #227254; --amber: #805c1c; --red: #bd293d; }
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body { margin: 0; background: #fff; color: var(--ink); font: 13px/1.8 'Noto Sans Arabic', Tahoma, Arial, sans-serif; }
html[lang=en] body { font-family: Arial, sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
h1, h2, p, dt, dd, li { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
a { color: var(--blue); }
.container, .header-inner { width: min(1180px, calc(100% - 64px)); margin-inline: auto; min-width: 0; }
.site-header { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; min-height: 76px; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--ink); text-decoration: none; font: 800 39px/1 Arial, sans-serif; }
.brand img { display: none; }
.brand [lang=en]::after { content: "."; color: var(--blue); }
.brand [lang=en] { direction: ltr; unicode-bidi: isolate; }
.brand-caption { border-inline-start: 1px solid var(--line); padding-inline-start: 18px; color: var(--muted); }
.header-tools { display: flex; gap: 8px; margin-inline-start: auto; }
.lucide { width: 18px; height: 18px; stroke-width: 1.7; flex: 0 0 18px; }
.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid #c4cbd5; border-radius: 5px; background: #fff; }
.button { padding: 8px 16px; font-weight: 500; }
.icon-button { width: 44px; height: 44px; padding: 0; flex: 0 0 44px; }
.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: #eef1f6; border-color: #8593a9; }
.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.primary:hover:not(:disabled) { background: #1944c5; }
.site-header .icon-button { background: transparent; color: var(--ink); border-color: var(--line); }
.site-header .icon-button:hover:not(:disabled) { background: #f1f4fb; }
.skip-link { position: fixed; top: 8px; inset-inline-start: 12px; z-index: 10; padding: 10px; background: #fff; opacity: 0; pointer-events: none; }
.skip-link:focus { opacity: 1; pointer-events: auto; }
.access-band { width: min(100%, 420px); margin-inline: auto; padding-block: 52px; }
.access-band h1 { margin-bottom: 12px; }
.access-band > button { margin-top: 18px; }
.field { display: grid; gap: 8px; margin-block: 22px 18px; }
.field label { font-weight: 500; }
input { width: 100%; min-width: 0; height: 46px; padding: 8px 12px; border: 1px solid #a8b2c0; border-radius: 4px; background: #fff; font-family: Arial, sans-serif; font-size: 16px; }
input:disabled { background: var(--surface); }
#code { font-variant-numeric: tabular-nums; }
.form-actions { display: flex; align-items: center; gap: 12px; }
.muted { color: var(--muted); }
.error { color: var(--red); }
#auth-progress, #auth-error { margin-top: 14px; }
.notice { padding-block: 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 26px 20px; border-bottom: 1px solid var(--line); }
.snapshot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 12px; margin-top: 4px; }
time, .number { font-family: Arial, sans-serif; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
#overview-progress, #overview-error { padding-block: 24px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--line); }
.metric { padding: 20px 18px; min-width: 0; border-inline-end: 1px solid var(--line); }
.metric:nth-child(4n) { border-inline-end: 0; }
.metric:nth-child(n+5) { border-top: 1px solid var(--line); }
.metric dt { font-size: 12px; color: var(--muted); min-height: 44px; }
.metric dd { margin-top: 4px; font-size: 28px; line-height: 1.4; font-weight: 600; }
.metric dd.unavailable { font: inherit; font-size: 13px; color: var(--muted); min-height: 40px; display: flex; align-items: center; }
.metric[data-key=pending_requests] dd:not(.unavailable) { color: var(--amber); }
.metric[data-key=published_forecasts] dd:not(.unavailable) { color: var(--green); }
.operations-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 36px; padding-block: 28px 40px; }
.operations-grid > * { min-width: 0; }
.operations-grid h2 { padding-bottom: 14px; border-bottom: 2px solid var(--line); }
.operation-list, .activity-list { padding: 0; margin: 0; list-style: none; }
.operation-row, .activity-row { padding-block: 14px; border-bottom: 1px solid var(--line); }
.operation-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.operation-key { min-width: 0; font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); flex-shrink: 0; font-size: 12px; }
.status::before { content: ''; width: 6px; height: 6px; flex-shrink: 0; background: currentColor; border-radius: 50%; }
.status-available { color: var(--green); }
.activity-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; }
.activity-row time { direction: ltr; color: var(--muted); font-size: 12px; }
.request-states { margin-top: 26px; }
#request-states { margin: 0; }
.request-state { display: flex; justify-content: space-between; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.request-state dd { font-weight: 600; }
.request-state .unavailable { color: var(--muted); font-weight: 400; }
.periods { margin-bottom: 40px; border-block: 1px solid var(--line); }
.periods summary { cursor: pointer; padding-block: 16px; font-weight: 600; font-size: 16px; }
.periods table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.periods th, .periods td { padding: 12px 10px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.periods th { background: var(--surface); font-size: 12px; color: var(--muted); font-weight: 500; }
.periods .unavailable { color: var(--muted); }
.round-id { font-family: Arial, sans-serif; unicode-bidi: isolate; }
.empty { color: var(--muted); padding-block: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.request-work { padding-block: 24px; border-bottom: 1px solid var(--line); }
.request-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.request-toolbar h2 { margin-inline-end: auto; }
.request-toolbar select { min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.request-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; gap: 12px; padding-block: 14px; border-top: 1px solid var(--line); }
.request-row time, .request-id { color: var(--muted); font-size: 12px; }
.request-id { display: block; direction: ltr; text-align: start; overflow-wrap: anywhere; }
#request-more { margin-top: 16px; }
#request-dialog { color: var(--ink); width: min(580px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid var(--line); border-radius: 6px; }
#request-dialog::backdrop { background: rgb(16 35 63 / 42%); }
#request-dialog textarea { min-width: 0; width: 100%; resize: vertical; min-height: 110px; border: 1px solid #a8b2c0; border-radius: 4px; padding: 10px; }
.request-body { white-space: pre-wrap; overflow-wrap: anywhere; padding-block: 18px; border-bottom: 1px solid var(--line); }
.request-history { margin: 0; padding: 0; list-style: none; }
.request-history li { border-bottom: 1px solid var(--line); padding-block: 12px; }
.request-history p { white-space: pre-wrap; overflow-wrap: anywhere; }
#request-detail-error { margin-top: 14px; }
.rights-operations { padding-block: 18px; border-bottom: 1px solid var(--line); }
.rights-operations h3 { font-size: 16px; margin-block: 0 12px; }
.rights-plan { padding-block: 14px; overflow-wrap: anywhere; }
.rights-plan .check-field { display: flex; align-items: flex-start; gap: 10px; margin-block: 14px; }
.rights-plan input[type=checkbox] { flex: 0 0 18px; width: 18px; height: 18px; margin-block-start: 4px; }
.rights-plan .button { max-width: 100%; white-space: normal; }
@media (max-width: 700px) {
  .container, .header-inner { width: calc(100% - 32px); }
  .header-inner { min-height: 68px; gap: 10px; }
  .brand { font-size: 27px; gap: 7px; }
  .brand img { width: 28px; height: 28px; }
  .brand-caption { padding-inline-start: 10px; font-size: 12px; }
  .header-tools { gap: 6px; }
  .access-band { padding-block: 32px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 16px 12px; }
  .metric:nth-child(2n) { border-inline-end: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .operations-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .section-heading { padding-block: 22px 16px; }
  .request-row { grid-template-columns: minmax(0, 1fr) 44px; gap: 4px 10px; }
  .request-row time { grid-column: 1; grid-row: 2; }
  .request-row button { grid-column: 2; grid-row: 1 / 3; }
  #request-dialog { padding: 18px; }
  #request-update .form-actions { flex-wrap: wrap; margin-top: 14px; }
  .periods table, .periods tbody { display: block; }
  .periods thead { display: none; }
  .periods tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 8px; border-bottom: 1px solid var(--line); }
  .periods td { display: block; min-width: 0; border: 0; padding: 8px 10px; }
  .periods td::before { content: attr(data-label); display: block; color: var(--muted); font: 12px/1.8 'Noto Sans Arabic', Tahoma, Arial, sans-serif; margin-bottom: 4px; direction: rtl; }
  html[lang=en] .periods td::before { font-family: Arial, sans-serif; direction: ltr; }
}
