:root {
  --header-height: 112px;
  --ink: #2c241d;
  --muted: #736a61;
  --sun: #f6a800;
  --sun-dark: #e77a00;
  --cream: #fffaf1;
  --surface: #ffffff;
  --surface-soft: #fff2d2;
  --surface-warm: #fffaf1;
  --line: #eee4d5;
  --deep: #302a23;
  --deep-muted: #d7cfc4;
  --shadow: #5739000d;
  --field-bg: #fffcf7;
  --field-line: #dfd3c3;
}

html[data-theme="dark"] {
  --ink: #f7efe3;
  --muted: #c9bcae;
  --cream: #17120e;
  --surface: #241f1a;
  --surface-soft: #33291f;
  --surface-warm: #1d1712;
  --line: #594637;
  --deep: #100d0a;
  --deep-muted: #cbbba9;
  --shadow: #0000004d;
  --field-bg: #1b1612;
  --field-line: #5a4737;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, "Segoe UI", Tahoma, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid #1473e6;
  outline-offset: 3px;
}

.hidden { display: none !important; }

.brand-mark img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  display: block;
}

.brand-mark:has(img) {
  width: 62px;
  height: 62px;
  background: transparent;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
}

.brand-mark:has(img)::before,
.brand-mark:has(img)::after {
  display: none;
}

.site-header {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 6vw;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background: color-mix(in srgb, var(--cream) 90%, var(--surface));
  position: relative;
  z-index: 10;
}

.brand-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  direction: ltr;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--sun);
  border-radius: 50%;
  box-shadow: 0 0 0 7px #f6a8001f;
  position: relative;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  width: 56px;
  height: 2px;
  background: var(--sun);
  transform: rotate(45deg);
  z-index: -1;
}

.brand-mark::after {
  transform: rotate(-45deg);
}

.brand strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 26px;
  line-height: 1;
}

.brand small {
  display: block;
  color: var(--sun-dark);
  font-size: 9px;
  letter-spacing: 1px;
  margin-top: 4px;
}

.theme-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 10px 22px var(--shadow);
}

.theme-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.theme-switch button.active {
  background: linear-gradient(135deg, var(--sun), var(--sun-dark));
  color: #ffffff;
}

nav {
  display: flex;
  gap: 36px;
  font-size: 14px;
  font-weight: 700;
}

nav a {
  padding: 32px 0;
  position: relative;
}

nav a:first-child::after {
  content: "";
  position: absolute;
  bottom: 20px;
  right: 0;
  width: 24px;
  height: 3px;
  border-radius: 3px;
  background: var(--sun);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.order-link,
.primary,
.secondary,
.back,
.login,
.submit {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.order-link:hover,
.primary:hover,
.secondary:hover,
.back:hover,
.login:hover,
.submit:hover {
  transform: translateY(-1px);
}

.order-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--sun), var(--sun-dark));
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 25px #e77a0035;
  white-space: nowrap;
}

.order-link.current {
  box-shadow: inset 0 0 0 2px #ffffff55, 0 12px 25px #e77a0035;
}

.lang {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.login,
.back {
  border: 1px solid var(--field-line);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface);
  color: var(--ink);
}

.dashboard-pill {
  display: none;
  border: 0;
  background: var(--surface-soft);
  color: var(--sun-dark);
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
}

body:has(#loginBtn) .dashboard-pill { display: inline-flex; }

.mobile-menu {
  display: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 24px;
}

.menu-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: var(--surface);
  padding: 20px;
  box-shadow: 0 15px 30px #0002;
}

.menu-panel.open {
  display: grid;
  gap: 18px;
}

.en {
  display: none;
}

html.lang-en .ar {
  display: none;
}

html.lang-en .en {
  display: initial;
}

html.lang-en {
  direction: ltr;
}

html.lang-en main {
  direction: ltr;
}

.hero {
  min-height: calc(100vh - var(--header-height));
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 40px;
  padding: 60px 8vw 72px;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffc13640, transparent 70%);
  left: -150px;
  top: 10px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 670px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sun-dark);
  background: var(--surface-soft);
  border: 1px solid color-mix(in srgb, var(--sun) 40%, var(--line));
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.eyebrow span:first-child {
  color: var(--sun);
  font-size: 17px;
}

h1 {
  font-family: "Times New Roman", "Noto Naskh Arabic", serif;
  font-size: clamp(44px, 5vw, 76px);
  line-height: 1.14;
  letter-spacing: 0;
  margin: 24px 0 22px;
  font-weight: 700;
}

h1 em {
  font-style: normal;
  color: var(--sun-dark);
}

.hero-copy > p {
  max-width: 590px;
  color: var(--muted);
  font-size: 17px;
  line-height: 2;
  margin: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.primary,
.secondary {
  min-height: 51px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 23px;
  font-weight: 800;
  font-size: 14px;
}

.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--sun), var(--sun-dark));
  box-shadow: 0 12px 26px #e77a0040;
}

.primary span {
  font-size: 20px;
}

.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
}

.play {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--sun-dark);
  font-size: 9px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 12px;
}

.trust-row b {
  color: var(--sun-dark);
  margin-left: 4px;
}

.hero-visual {
  min-height: 580px;
  position: relative;
  display: grid;
  place-items: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff3ce, #ffe3a4);
  box-shadow: inset 0 0 80px #ffffffcc;
}

html[data-theme="dark"] .hero-visual::before {
  background: linear-gradient(145deg, #44341f, #1b1511);
  box-shadow: inset 0 0 70px #f6a8001a;
}

.sun-orbit {
  position: absolute;
  border: 1px solid #e3910a38;
  border-radius: 50%;
}

.orbit-one {
  width: 560px;
  height: 560px;
}

.orbit-two {
  width: 650px;
  height: 650px;
}

.device {
  width: 230px;
  height: 410px;
  border-radius: 38px 38px 30px 30px;
  background: linear-gradient(155deg, #ffffff, #e9e6df);
  box-shadow: -35px 45px 70px #5e461e38, inset -10px -10px 20px #0000000f;
  position: relative;
  z-index: 2;
  padding-top: 30px;
  text-align: center;
  transform: perspective(900px) rotateY(-8deg);
}

.device-top {
  direction: ltr;
  font-family: Georgia, serif;
  font-size: 18px;
  color: #2c241d;
}

.mini-sun {
  color: var(--sun);
  margin-right: 6px;
}

.device-screen {
  width: 174px;
  height: 122px;
  margin: 25px auto 0;
  border-radius: 13px;
  background: linear-gradient(160deg, #272f2d, #18201f);
  color: white;
  padding: 14px;
  text-align: right;
  box-shadow: inset 0 0 22px #000;
}

.device-screen small {
  color: #d2a84b;
  font-size: 7px;
  display: block;
  letter-spacing: 1px;
}

.device-screen b {
  font-size: 13px;
  display: block;
  margin: 7px 0;
}

.device-screen > span {
  color: #bdc9c3;
  font-size: 8px;
}

.screen-bars {
  display: flex;
  gap: 4px;
  height: 30px;
  align-items: flex-end;
  direction: ltr;
}

.screen-bars i {
  display: block;
  width: 28%;
  height: 75%;
  background: linear-gradient(#f7bd36, #e57b08);
  border-radius: 2px;
}

.screen-bars i:nth-child(2) {
  height: 45%;
}

.screen-bars i:nth-child(3) {
  height: 92%;
}

.device-nozzle {
  width: 60px;
  height: 46px;
  position: absolute;
  bottom: 108px;
  left: 85px;
  background: #d7d3cb;
  border-radius: 8px 8px 20px 20px;
  box-shadow: inset 0 -8px 10px #0000001f;
}

.device-nozzle::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 15px;
  background: #8b8b85;
  bottom: -8px;
  left: 18px;
  border-radius: 0 0 10px 10px;
}

.bottle {
  position: absolute;
  width: 68px;
  height: 82px;
  bottom: 15px;
  left: 81px;
  background: linear-gradient(90deg, #ece3d8, #fff8ef);
  border-radius: 8px 8px 15px 15px;
  box-shadow: 0 10px 14px #0000001f;
  display: grid;
  place-items: center;
}

.bottle span {
  color: #e89500;
  font-family: Georgia, serif;
  font-size: 24px;
}

.float-card {
  position: absolute;
  z-index: 4;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  border-radius: 15px;
  padding: 12px 16px;
  box-shadow: 0 18px 35px #5b401e21;
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 152px;
}

.float-card > span {
  color: var(--sun-dark);
  font-size: 24px;
}

.float-card b,
.float-card small {
  display: block;
}

.float-card b {
  font-size: 15px;
}

.float-card small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}

.card-one {
  top: 23%;
  right: 2%;
}

.card-two {
  bottom: 22%;
  left: 0;
}

.section {
  padding: 95px 8vw;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.kicker {
  color: var(--sun-dark);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .5px;
}

.section h2 {
  font-size: clamp(32px, 4vw, 50px);
  margin: 12px 0 16px;
}

.section-head p,
.lead {
  color: var(--muted);
  line-height: 1.9;
}

.how,
.team {
  background: var(--surface);
}

.steps,
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1100px;
  margin: auto;
}

.step,
.service,
.team-card,
.contact-card,
.order-form,
.order-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 14px 45px var(--shadow);
}

.step-no {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--sun-dark);
  font-weight: 900;
}

.step h3,
.service h3 {
  font-size: 20px;
  margin: 20px 0 10px;
}

.step p,
.service p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.analysis-link,
.analysis-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 25px;
  background: var(--deep);
  color: #ffffff;
}

.analysis-link {
  max-width: 1100px;
  margin: 45px auto 0;
  padding: 28px 34px;
}

.analysis-box {
  margin-bottom: 26px;
  padding: 22px 24px;
}

.analysis-link p,
.analysis-box p {
  margin: 5px 0 0;
  color: var(--deep-muted);
  line-height: 1.7;
}

.analysis-link a,
.analysis-box a {
  white-space: nowrap;
  background: var(--sun);
  color: #2b2218;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 900;
}

.analysis-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.capture-button {
  border: 1px solid #ffffff66;
  background: transparent;
  color: #fff;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}

.analysis-box small {
  display: block;
  color: var(--deep-muted);
  margin-top: 8px;
  line-height: 1.6;
}

.services {
  background: var(--surface-warm);
}

.service {
  overflow: hidden;
  position: relative;
}

.service-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff2cf, #ffd881);
  color: #3a2b1e;
  font-size: 26px;
}

.service ul {
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}

.service li::before {
  content: "✓";
  color: var(--sun-dark);
  font-weight: bold;
  margin-left: 8px;
}

.team-list {
  max-width: 1050px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.team-card {
  text-align: center;
  padding: 22px 12px;
}

.avatar {
  width: 66px;
  height: 66px;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--sun-dark);
  font-size: 24px;
  font-weight: 900;
}

.team-card b {
  display: block;
  margin-top: 14px;
}

.team-card small {
  color: var(--muted);
}

.supervisor {
  max-width: 760px;
  margin: 0 auto 34px;
  padding: 24px;
  text-align: center;
  border-radius: 20px;
  background: var(--surface-soft);
  border: 1px solid color-mix(in srgb, var(--sun) 35%, var(--line));
  font-size: 18px;
}

.supervisor strong {
  display: block;
  margin-top: 8px;
  font-size: 3rem;
  line-height: 1.2;
  color: var(--sun-dark);
}

.contact {
  background: var(--deep);
  color: white;
}

.contact .section-head p {
  color: var(--deep-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 920px;
  margin: auto;
}

.contact-card {
  color: var(--ink);
}

.contact-card h3 {
  margin-top: 0;
}

.contact-card a {
  color: var(--sun-dark);
  font-weight: 800;
}

.footer {
  padding: 26px 8vw;
  background: #251f1a;
  color: #bdb3a8;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: #19130dbf;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
}

.modal.open {
  display: grid;
}

.modal-card {
  width: min(430px, 100%);
  background: var(--surface);
  border-radius: 24px;
  padding: 30px;
  position: relative;
}

.close {
  position: absolute;
  left: 18px;
  top: 16px;
  border: 0;
  background: var(--surface-soft);
  color: var(--ink);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
}

.tabs {
  display: flex;
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 4px;
  margin: 20px 0;
}

.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px;
  border-radius: 9px;
  cursor: pointer;
}

.tabs button.active {
  background: var(--surface);
  box-shadow: 0 4px 12px #00000012;
}

.notice {
  display: none;
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: #e9f8ed;
  color: #28763c;
  font-weight: 800;
  text-align: center;
}

.notice.show {
  display: block;
}

.dashboard {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 60;
  display: none;
  overflow: auto;
  padding: 35px;
}

.dashboard.open {
  display: block;
}

.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1000px;
  margin: auto;
}

.orders {
  max-width: 1000px;
  margin: 30px auto;
  display: grid;
  gap: 14px;
}

.order-card {
  background: var(--surface);
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.status {
  background: var(--surface-soft);
  color: var(--sun-dark);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.order-body {
  min-height: 100vh;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface-soft) 65%, var(--cream)), var(--cream));
}

.order-page {
  min-height: calc(100vh - var(--header-height));
  display: grid;
  place-items: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}

.order-page::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: #ffc84925;
  top: -230px;
  left: -170px;
}

.order-wrap {
  width: min(860px, 100%);
  position: relative;
  z-index: 2;
}

.order-heading {
  text-align: center;
  margin-bottom: 32px;
}

.order-heading .kicker {
  color: var(--sun-dark);
  font-weight: 900;
  font-size: 12px;
}

.order-heading h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin: 12px 0;
}

.order-heading p {
  color: var(--muted);
  line-height: 1.9;
  max-width: 650px;
  margin: auto;
}

.order-form {
  border-radius: 28px;
  padding: 36px;
  box-shadow: 0 25px 70px #71450017;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 800;
  font-size: 13px;
}

.field label span,
.hint {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--field-line);
  background: var(--field-bg);
  border-radius: 13px;
  padding: 14px;
  color: var(--ink);
  outline: none;
}

.field input[type="file"] {
  min-height: 51px;
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--sun);
  box-shadow: 0 0 0 3px #f6a80018;
}

.submit {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 999px;
  margin-top: 22px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--sun), var(--sun-dark));
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 12px 25px #e77a0035;
}

.hint {
  font-size: 11px;
  margin-top: 1px;
}

.order-footer {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .site-header {
    gap: 16px;
  }

  nav {
    gap: 20px;
  }

  .theme-switch button {
    padding-inline: 7px;
  }
}

@media (max-width: 900px) {
  .site-header {
    min-height: auto;
    flex-wrap: wrap;
    padding: 10px 5vw;
  }

  .site-header nav {
    display: none;
  }

  .header-actions .login {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 45px;
    text-align: center;
  }

  .hero-copy {
    margin: auto;
  }

  .hero-copy > p {
    margin: auto;
  }

  .hero-actions,
  .trust-row {
    justify-content: center;
  }

  .hero-visual {
    min-height: 520px;
  }

  h1 {
    font-size: 48px;
  }

  .section {
    padding: 70px 6vw;
  }

  .steps,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .team-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .analysis-link,
  .analysis-box {
    flex-direction: column;
    text-align: center;
  }

  .analysis-link a,
  .analysis-box a {
    white-space: normal;
    width: 100%;
    text-align: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }
}

@media (max-width: 650px) {
  .brand small {
    display: none;
  }

  .brand-mark img,
  .brand-mark:has(img) {
    width: 54px;
    height: 54px;
  }

  .theme-switch button {
    font-size: 9px;
    padding: 5px 7px;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
  }

  .order-link,
  .back,
  .login,
  .dashboard-pill {
    min-height: 40px;
    padding-inline: 13px;
  }

  .order-form {
    padding: 25px;
  }

  .order-page {
    padding-top: 38px;
  }
}

@media (max-width: 540px) {
  .site-header {
    align-items: flex-start;
  }

  .brand-area {
    align-items: flex-start;
  }

  .hero {
    padding: 38px 20px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary,
  .secondary {
    width: 100%;
  }

  .hero-visual {
    transform: scale(.78);
    margin: -65px -50px;
  }

  .trust-row {
    gap: 10px;
  }

  h1 {
    font-size: 39px;
  }

  .hero-copy > p {
    font-size: 15px;
  }

  .supervisor strong {
    font-size: 2rem;
  }

  .team-list {
    grid-template-columns: 1fr;
  }

  .footer,
  .dash-head,
  .order-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Accounts, customer portal, and administration */
.auth-body,
.portal-body {
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr);
}

.auth-brand {
  padding: 7vw;
  background: var(--deep);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-brand .brand { position: absolute; top: 38px; }
.auth-brand h1 { max-width: 620px; font-size: clamp(42px, 5vw, 72px); }
.auth-brand p { color: var(--deep-muted); max-width: 540px; line-height: 1.9; }

.auth-card {
  width: min(520px, calc(100% - 40px));
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 38px;
  border-radius: 8px;
  box-shadow: 0 24px 60px var(--shadow);
}

.auth-card h2 { font-size: 32px; margin-bottom: 4px; }
.auth-tools { display: flex; justify-content: flex-end; gap: 6px; }
.auth-tools button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 10px; cursor: pointer; }
.social-auth { display: grid; gap: 10px; }
.social-button { min-height: 48px; border: 1px solid var(--field-line); display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 800; background: var(--surface); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 20px 0; font-size: 12px; }
.divider::before, .divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.auth-card form { display: grid; gap: 14px; }
.privacy-note { text-align: center; color: var(--muted); font-size: 12px; }
.privacy-note a, .consent a { color: var(--sun-dark); text-decoration: underline; }
.form-message { min-height: 22px; color: #a22b2b; text-align: center; }

.portal-header {
  min-height: 88px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 5vw;
  gap: 20px;
}

.portal { width: min(1100px, calc(100% - 32px)); margin: 48px auto; }
.portal.wide { width: min(1380px, calc(100% - 32px)); }
.portal-title { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.portal-title h1 { margin: 4px 0; font-size: 48px; }
.portal-title p { color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters input, .filters select, .admin-table select { border: 1px solid var(--field-line); background: var(--field-bg); color: var(--ink); padding: 12px; min-height: 44px; }
.filters input { min-width: 280px; }

.order-card.detailed { align-items: stretch; border-radius: 8px; }
.order-main { flex: 1; }
.order-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 22px; }
.status-track span { border-top: 4px solid var(--line); padding-top: 9px; color: var(--muted); font-size: 11px; text-align: center; }
.status-track span.done { border-color: var(--sun-dark); color: var(--ink); font-weight: 800; }
.empty-state { text-align: center; padding: 70px 20px; background: var(--surface); border: 1px solid var(--line); }

.review-dialog { width: min(520px, calc(100% - 32px)); border: 0; border-radius: 8px; background: var(--surface); color: var(--ink); padding: 30px; }
.review-dialog::backdrop { background: #0009; }
.rating { display: flex; gap: 14px; border: 0; padding: 20px 0; }
.rating label { display: flex; gap: 4px; }

.admin-table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--line); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.admin-table th, .admin-table td { text-align: right; padding: 15px; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--surface-soft); font-size: 12px; }
.admin-table td small { display: block; color: var(--muted); margin-top: 4px; }

.analysis-fields { border: 1px solid var(--line); padding: 20px; margin: 4px 0; }
.analysis-fields legend { font-weight: 900; padding: 0 8px; }
.analysis-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.image-analysis-row { display: flex; align-items: center; gap: 16px; min-height: 48px; }
.analysis-status { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.analysis-status.working { color: #875600; }
.analysis-status.success { color: #28763c; }
.analysis-status.error { color: #a22b2b; }
.order-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 28px 0; }
.order-details div { border-bottom: 1px solid var(--line); padding: 12px 0; }
.order-details dt { color: var(--muted); font-size: 11px; }
.order-details dd { margin: 5px 0 0; font-weight: 800; }
.result-image { margin: 30px 0; }
.result-image img { display: block; width: min(460px, 100%); max-height: 680px; object-fit: contain; margin: 12px auto; border: 1px solid var(--line); background: #fff; }
.consent { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); line-height: 1.7; font-size: 13px; }
.consent input { width: 20px; height: 20px; flex: 0 0 auto; }
.image-preview img { display: block; width: 120px; height: 120px; object-fit: cover; border: 1px solid var(--line); }
.order-success { background: var(--surface); border: 1px solid var(--line); padding: 40px; text-align: center; }
.order-success img { max-width: 100%; height: auto; background: #fff; padding: 10px; }
.order-success .hero-actions { justify-content: center; }
.share-note { color: var(--muted); font-size: 12px; line-height: 1.8; }
.public-order, .legal-page { width: min(820px, calc(100% - 32px)); margin: 50px auto; }
.public-order > .brand, .legal-page > .brand { margin-bottom: 36px; }
.analysis-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.analysis-list div { background: var(--surface-soft); padding: 16px; }
.analysis-list dt { color: var(--muted); font-size: 12px; }
.analysis-list dd { margin: 4px 0 0; font-weight: 900; font-size: 20px; }
.medical-warning { border-right: 4px solid #bf6a00; background: #fff2cf; color: #563608; padding: 16px; line-height: 1.8; }
.legal-page { background: var(--surface); border: 1px solid var(--line); padding: clamp(24px, 6vw, 64px); line-height: 2; }
.legal-page h1 { font-size: 48px; }

@media (max-width: 820px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { min-height: 330px; padding: 100px 30px 40px; }
  .auth-brand .brand { top: 22px; }
  .auth-card { margin: 28px auto; padding: 26px; }
  .portal-title, .order-card.detailed { flex-direction: column; align-items: stretch; }
  .filters input, .filters select { width: 100%; min-width: 0; }
  .order-actions > * { flex: 1; text-align: center; justify-content: center; }
  .analysis-actions { width: 100%; flex-direction: column; }
  .analysis-actions > * { width: 100%; text-align: center; }
  .analysis-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .portal-header { align-items: flex-start; }
  .portal-header .brand small { display: none; }
  .portal-header .header-actions { width: auto; }
  .portal-title h1, .legal-page h1 { font-size: 38px; }
  .status-track span { font-size: 9px; }
  .analysis-list { grid-template-columns: 1fr; }
  .order-success { padding: 24px 16px; }
  .site-header.compact { align-items: center; }
  .site-header.compact .header-actions { width: auto; }
  .site-header.compact .brand strong { font-size: 21px; }
  .auth-card { width: calc(100% - 20px); padding: 22px 16px; }
  .order-form { padding: 20px 14px; }
  .analysis-fields { padding: 16px 10px; }
  .analysis-metrics, .order-details { grid-template-columns: 1fr; }
  .image-analysis-row { align-items: stretch; flex-direction: column; }
  .portal { width: calc(100% - 20px); margin-block: 28px; }
  .portal-header { padding-inline: 12px; gap: 8px; }
  .portal-header .header-actions { gap: 5px; }
  .portal-header .back, .portal-header .order-link { padding-inline: 9px; font-size: 11px; }
  .admin-table-wrap { border: 0; background: transparent; overflow: visible; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; min-width: 0; width: 100%; }
  .admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .admin-table tr { background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; padding: 10px; }
  .admin-table td { border: 0; padding: 9px 8px; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: center; overflow-wrap: anywhere; }
  .admin-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 800; }
  .admin-table td select { width: 100%; min-width: 0; }
}

@media (max-width: 360px) {
  .brand-mark img, .brand-mark:has(img) { width: 46px; height: 46px; }
  .brand strong { font-size: 19px; }
  .site-header, .portal-header { padding-inline: 8px; }
  .theme-switch { max-width: 160px; }
  .theme-switch button { white-space: normal; line-height: 1.2; }
  h1, .portal-title h1, .legal-page h1 { font-size: 32px; }
  .status-track { grid-template-columns: repeat(2, 1fr); row-gap: 12px; }
  .auth-brand { padding-inline: 20px; }
}

@media (min-width: 1500px) {
  .site-header { padding-inline: max(6vw, calc((100vw - 1450px) / 2)); }
  .hero, .section { padding-inline: max(8vw, calc((100vw - 1450px) / 2)); }
  .hero { min-height: 760px; }
}

@media (max-height: 620px) and (orientation: landscape) {
  .hero { min-height: 680px; }
  .auth-layout { min-height: 680px; }
  .order-page { padding-block: 30px; }
}

img, video, canvas { max-width: 100%; }
body { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
