:root {
  --navy: #00183f;
  --navy-soft: #102b54;
  --teal: #00b7b0;
  --teal-dark: #008f8a;
  --paper: #ffffff;
  --page: #f4f7f8;
  --line: #dce4ea;
  --muted: #657184;
  --amber-bg: #fff7e8;
  --amber: #8d5c00;
  --green-bg: #e9f8f2;
  --green: #16664a;
  font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--navy); }
button, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }

.topbar {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(42px, calc((100vw - 1196px) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.brand img { display: block; width: 360px; max-width: 48vw; height: auto; }
.account { display: flex; align-items: center; gap: 18px; }
.account-identity { display: grid; gap: 3px; text-align: right; }
.account-identity strong { font-size: 13px; }
.account-identity small { color: var(--muted); font-size: 11px; }

.shell { width: min(1196px, calc(100% - 84px)); margin: 0 auto; padding: 78px 0 92px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 36px; }
.eyebrow { margin: 0 0 10px; color: var(--teal-dark); font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(42px, 5vw, 58px); font-weight: 750; letter-spacing: -2.8px; line-height: 1.07; }
.lead { margin: 18px 0 0; color: var(--muted); font-size: 19px; }
.primary, .secondary, .text-button { border: 0; border-radius: 3px; font-weight: 800; }
.primary { min-height: 50px; padding: 0 24px; background: var(--navy); color: white; box-shadow: 0 10px 28px rgba(0,24,63,.12); }
.primary:hover { background: var(--navy-soft); }
.primary.new-request { background: var(--teal-dark); box-shadow: 0 8px 22px rgba(0,183,176,.2); }
.primary.new-request:hover { background: #007d79; }
.primary.compact { min-height: 42px; padding-inline: 18px; }
.secondary { min-height: 42px; padding: 0 17px; background: #edf3f6; color: var(--navy); }
.invoice-link { display: inline-flex; align-items: center; text-decoration: none; font-size: 12px; }
.text-button { padding: 8px 0; background: transparent; color: var(--navy); }

.summary { display: grid; grid-template-columns: repeat(3, 1fr); margin: 52px 0 68px; background: var(--navy); color: white; }
.summary article { padding: 25px 30px; border-right: 1px solid rgba(255,255,255,.2); }
.summary article:last-child { border-right: 0; }
.summary span { display: block; color: #c7d6e7; font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.summary strong { display: block; margin-top: 8px; font-size: 34px; }

.section-title { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 18px; }
h2 { margin: 0; font-size: 28px; letter-spacing: -.5px; }
.filter { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.filter select, dialog select, textarea { border: 1px solid #bccbd3; border-radius: 3px; background: white; color: var(--navy); }
.filter select { min-height: 42px; padding: 0 34px 0 12px; }

.orders { display: grid; gap: 14px; }
.order-card { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 22px 36px; padding: 30px; background: white; border: 1px solid var(--line); transition: border-color .18s, box-shadow .18s; }
.order-card:hover { border-color: #adc5cf; box-shadow: 0 14px 30px rgba(0,24,63,.06); }
.order-main { display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: start; }
.order-number { padding-top: 3px; color: var(--teal-dark); font-size: 16px; font-weight: 800; }
.order-card h3 { margin: 0; font-size: 21px; line-height: 1.25; }
.order-card p { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.order-state { display: flex; align-items: center; justify-content: flex-end; gap: 13px; flex-wrap: wrap; text-align: right; }
.order-state strong { font-size: 20px; }
.status { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-left: 3px solid currentColor; border-radius: 1px; font-size: 11px; font-weight: 800; letter-spacing: .25px; text-transform: uppercase; white-space: nowrap; }
.status-wait { color: var(--amber); background: var(--amber-bg); }
.status-work { color: var(--navy); background: #eaf1f7; }
.status-ready { color: var(--green); background: var(--green-bg); }
.quiet { max-width: 230px; color: var(--muted); font-size: 13px; }
.retention-note { grid-column: 1/-1; margin-top: -4px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--amber); font-size: 13px; }
.retention-note.success { color: var(--green); }
.empty-orders { padding: 44px 30px; background: white; border: 1px solid var(--line); text-align: center; }
.empty-orders h3 { margin: 0; font-size: 22px; }
.empty-orders p:not(.eyebrow) { margin: 12px auto 22px; color: var(--muted); font-size: 14px; }

dialog { width: min(620px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 4px; color: var(--navy); box-shadow: 0 30px 90px rgba(0,24,63,.25); }
dialog::backdrop { background: rgba(0,18,48,.58); }
dialog form { padding: 32px; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.close { border: 0; background: transparent; color: var(--muted); font-size: 34px; line-height: 1; }
.dialog-lead { color: var(--muted); line-height: 1.55; }
dialog label:not(.consent) { display: grid; gap: 8px; margin-top: 20px; font-size: 13px; font-weight: 800; }
dialog select, textarea { width: 100%; padding: 13px; }
textarea { resize: vertical; }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin-top: 23px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.consent input { width: 18px; height: 18px; accent-color: var(--teal); }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 22px; margin-top: 28px; }
.form-message { min-height: 20px; margin: 14px 0 0; color: #a02525; font-size: 13px; }

.preview-upload-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.preview-upload-card { width: min(620px, 100%); padding: 44px; background: white; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,24,63,.08); }
.preview-upload-card img { width: 300px; max-width: 100%; margin-bottom: 42px; }
.preview-upload-card h1 { font-size: 42px; }
.preview-upload-card > p:not(.eyebrow) { color: var(--muted); font-size: 17px; line-height: 1.6; }
.preview-request { font-weight: 800; }
.preview-back { display: inline-flex; align-items: center; margin-top: 12px; text-decoration: none; }

.site-footer { padding: 54px max(42px, calc((100% - 1196px) / 2)); display: grid; grid-template-columns: 1.2fr .8fr .8fr; align-items: start; gap: 42px; background: #fff; border-top: 1px solid var(--line); color: var(--muted); }
.footer-brand img { display: block; width: 245px; max-width: 100%; height: auto; }
.footer-brand p { max-width: 360px; margin: 15px 0 0; font-size: 12px; line-height: 1.6; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.footer-links a { color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--teal-dark); }
.footer-legal { margin: 0; font-size: 11px; line-height: 1.6; }

@media (max-width: 760px) {
  .topbar { min-height: 78px; padding: 12px 18px; }
  .brand img { width: 224px; max-width: 68vw; }
  .account-identity { display: none; }
  .shell { width: min(100% - 32px, 620px); padding: 42px 0 66px; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 24px; }
  .page-heading .primary { width: 100%; }
  h1 { font-size: 42px; letter-spacing: -2px; }
  .lead { font-size: 16px; }
  .summary { grid-template-columns: 1fr; margin: 34px 0; }
  .summary article { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.2); }
  .summary article:last-child { border-bottom: 0; }
  .summary strong { margin: 0; font-size: 27px; }
  .section-title { align-items: stretch; flex-direction: column; }
  .filter { justify-content: space-between; }
  .filter select { flex: 1; }
  .order-card { grid-template-columns: 1fr; padding: 23px 20px; }
  .order-main { grid-template-columns: 1fr; gap: 8px; }
  .order-state { justify-content: flex-start; text-align: left; }
  .retention-note { grid-column: 1; }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; gap: 8px; }
  .dialog-actions .primary, .dialog-actions .text-button { width: 100%; }
  .site-footer { grid-template-columns: 1fr; padding: 42px 18px; gap: 28px; }
}
