/* Sumer Operation Center: login page.
   SOC-P01 (2026-11-04): first design. SOC-P08 (2026-11-16): owner design, one card for every screen.
   Wide screens: background bg-desktop, top bar, card below the gold band.
   Phones and portrait tablets: background bg-mobile, card below the winged bulls, no top bar.
   The previous files are kept in assets/archive/. */
:root {
  --bg: #030915;
  --text: #eef3fa;
  --muted: #aebdd0;
  --cyan: #38d6ff;
  --gold: #d9a04a;
  --gold2: #e2a94f;
  /* Wide screens: 1px at 1920x1080, never below 0.78px. */
  --u: max(0.78px, calc(min(100vh, 56.28vw) / 1080));
  --c: calc(26 * var(--u));
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans Arabic", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.corners { position: absolute; width: 0; height: 0; overflow: hidden; }
.sm { display: none; }

/* Background (bg-desktop: gold band bottom = image row 205 of 941; "cover" + "center top") */
.bg { position: fixed; inset: 0; background: url(bg-desktop.webp) center top / cover no-repeat; }
.bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2, 8, 20, .10) 0%, rgba(2, 8, 20, 0) 30%, rgba(2, 8, 20, .18) 100%); }

/* Top bar */
.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center;
  height: calc(42 * var(--u)); padding: 0 6.9vw; color: #e9eef6; font-size: calc(14 * var(--u)); }
.topbar::after { content: ""; position: absolute; left: 6vw; right: 6vw; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 160, 74, .55) 12%, rgba(217, 160, 74, .55) 88%, transparent); }
.tb-side { display: flex; align-items: center; gap: calc(14 * var(--u)); }
.tb-mark { width: calc(30 * var(--u)); aspect-ratio: 4 / 3; background: linear-gradient(180deg, #f7d48a, #c48a35);
  -webkit-mask: url(../brand/sumer_mark.png) center / contain no-repeat; mask: url(../brand/sumer_mark.png) center / contain no-repeat; }
.tb-co { font-weight: 600; letter-spacing: .14em; }
.tb-bar { width: 1px; height: calc(18 * var(--u)); background: rgba(233, 238, 246, .45); }
.tb-dot { width: calc(9 * var(--u)); height: calc(9 * var(--u)); border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px #3ddc84; }
.tb-lock { width: calc(20 * var(--u)); height: calc(20 * var(--u)); fill: none; stroke: var(--gold2); stroke-width: 1.7; stroke-linecap: round; }

/* Local-trial notice (only on 127.0.0.1:8770) */
.trial { position: fixed; top: calc(52 * var(--u)); left: 50%; z-index: 3; transform: translateX(-50%); margin: 0;
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(40, 24, 0, .72); border: 1px solid rgba(245, 180, 70, .6); color: #ffd58a; font-size: 13px; }

/* Stage and card */
.stage { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh;
  padding: calc(max(12.26vw, 21.79vh) + 18 * var(--u)) 24px calc(24 * var(--u)); }
/* The card is 25% smaller than the reference size (owner, 2026-11-16): its own --u is 0.75 of the page's,
   with a floor so the text stays readable on small laptops. */
.card { --u: max(0.62px, calc(.75 * max(0.78px, calc(min(100vh, 56.28vw) / 1080)))); --c: calc(26 * var(--u)); --b: 1.5px;
  position: relative; isolation: isolate; width: min(calc(758 * var(--u)), 100%); margin: 0 auto;
  padding: calc(14 * var(--u)) calc(72 * var(--u)) calc(18 * var(--u)); text-shadow: 0 1px 3px rgba(0, 8, 20, .55); }
/* Glass: the background shows through, blurred (owner, 2026-11-16). */
.glass { position: absolute; inset: 0; z-index: -2;
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)),
                     calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
  background: linear-gradient(160deg, rgba(120, 200, 255, .14) 0%, rgba(20, 60, 100, .10) 35%, rgba(4, 14, 28, .30) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.25); backdrop-filter: blur(14px) saturate(1.25); }
/* Glowing cyan outline: a ring (outer chamfered shape minus the inner one, even-odd). */
.frame { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  filter: drop-shadow(0 0 calc(6 * var(--u)) rgba(70, 220, 255, .75)) drop-shadow(0 0 calc(16 * var(--u)) rgba(56, 214, 255, .4)); }
.frame::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(120, 232, 255, .95), rgba(40, 165, 225, .8));
  clip-path: polygon(evenodd,
    var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)),
    calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c), var(--c) 0,
    var(--c) var(--b), var(--b) var(--c), var(--b) calc(100% - var(--c)), var(--c) calc(100% - var(--b)),
    calc(100% - var(--c)) calc(100% - var(--b)), calc(100% - var(--b)) calc(100% - var(--c)),
    calc(100% - var(--b)) var(--c), calc(100% - var(--c)) var(--b), var(--c) var(--b)); }
.corner { position: absolute; z-index: 1; width: calc(90 * var(--u)); height: calc(90 * var(--u)); overflow: visible;
  fill: none; stroke: #f0c46e; stroke-width: 2.2; filter: drop-shadow(0 0 4px rgba(240, 190, 100, .8)); }
.corner.tl { top: 0; left: 0; }
.corner.tr { top: 0; right: 0; transform: scaleX(-1); }
.corner.bl { bottom: 0; left: 0; transform: scaleY(-1); }
.corner.br { bottom: 0; right: 0; transform: scale(-1, -1); }

/* Brand */
.brand { display: flex; flex-direction: column; align-items: center; gap: calc(6 * var(--u)); }
/* Sumer Operation Center logo (owner, 2026-11-25), in place of the Sumer mark and word. */
.logo { display: block; width: calc(160 * var(--u)); height: auto; aspect-ratio: 1; border-radius: calc(16 * var(--u));
  box-shadow: 0 0 0 1px rgba(240, 196, 110, .5), 0 0 calc(18 * var(--u)) rgba(70, 170, 255, .3); }
.names { text-align: center; }
.names .en { font-size: calc(36 * var(--u)); font-weight: 600; line-height: 1.15; color: #f3f6fb; }
.names .ar { font-size: calc(36 * var(--u)); font-weight: 700; line-height: 1.25; color: var(--gold2); }

/* Gold rule with three diamonds */
.rule2 { display: flex; align-items: center; gap: calc(10 * var(--u)); width: 72%; margin: calc(12 * var(--u)) auto calc(10 * var(--u)); }
.rule2 .ln { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.rule2 .ln.r { background: linear-gradient(270deg, transparent, var(--gold)); }
.rule2 .dms { display: flex; gap: calc(4 * var(--u)); }
.rule2 i { width: calc(9 * var(--u)); height: calc(9 * var(--u)); border: 1.4px solid var(--gold); transform: rotate(45deg); }

h1 { margin: 0 0 calc(18 * var(--u)); text-align: center; font-weight: 500; font-size: calc(21 * var(--u)); line-height: 1.35; color: var(--text); }
h1 .sub { display: block; font-size: calc(19 * var(--u)); color: var(--gold2); }

/* Fields: English label on the left, Arabic on the right */
.field { position: relative; display: flex; align-items: center; height: calc(50 * var(--u)); margin-bottom: calc(16 * var(--u));
  border: 1px solid rgba(140, 215, 245, .55); border-radius: calc(8 * var(--u)); background: rgba(6, 18, 32, .32);
  transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(56, 214, 255, .18); }
.field > svg { flex: none; width: calc(24 * var(--u)); height: calc(24 * var(--u)); margin: 0 calc(12 * var(--u)) 0 calc(18 * var(--u));
  fill: none; stroke: #d4dfeb; stroke-width: 1.6; stroke-linecap: round; }
.field input { flex: 1; min-width: 0; height: 100%; padding: 0 12px 0 4px; border: 0; outline: 0;
  background: transparent; color: #f1f5fb; font: inherit; font-size: max(16px, calc(16 * var(--u))); }
.field input::placeholder { color: transparent; }
.ph { position: absolute; left: calc(56 * var(--u)); right: calc(18 * var(--u)); top: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; white-space: nowrap;
  font-size: calc(16.5 * var(--u)); color: #e3ebf4; }
.ph > span:last-child { color: #c3d1e0; }
.field:has(.eye) .ph { right: calc(58 * var(--u)); }
.field input:not(:placeholder-shown) ~ .ph { display: none; }
.eye { flex: none; display: grid; place-items: center; width: calc(46 * var(--u)); height: calc(46 * var(--u)); margin-right: calc(6 * var(--u));
  border: 0; border-radius: 8px; background: transparent; color: #d5e0ec; cursor: pointer; }
.eye svg { width: calc(24 * var(--u)); height: calc(24 * var(--u)); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.eye .i-hide, .eye[aria-pressed="true"] .i-show { display: none; }
.eye[aria-pressed="true"] .i-hide { display: block; }
.eye:hover { color: #fff; }
.eye:focus-visible { outline: 2px solid var(--cyan); outline-offset: 0; }

/* Remember me / Forgot password */
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin: calc(2 * var(--u)) 0 calc(24 * var(--u)); }
.remember { position: relative; display: inline-flex; align-items: center; gap: calc(12 * var(--u)); color: #eef3fa;
  font-size: calc(16 * var(--u)); cursor: pointer; user-select: none; }
.remember input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.remember .box { display: grid; place-items: center; width: calc(19 * var(--u)); height: calc(19 * var(--u));
  border: 1.5px solid #c3d0df; border-radius: 3px; transition: background .15s, border-color .15s; }
.remember .box::after { content: ""; width: 5px; height: 10px; margin-top: -2px;
  border: solid #04121c; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0; }
.remember input:checked + .box { background: var(--cyan); border-color: var(--cyan); }
.remember input:checked + .box::after { opacity: 1; }
.remember input:focus-visible + .box { outline: 2px solid var(--cyan); outline-offset: 2px; }
.forgot { display: inline-flex; align-items: center; gap: calc(10 * var(--u)); margin-left: auto; padding: 0; border: 0; background: none;
  color: #6fdcff; font: inherit; font-size: calc(16 * var(--u)); cursor: pointer; }
.forgot span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.forgot:hover { color: #9be7ff; }
.forgot:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.fb { width: 1px; height: calc(15 * var(--u)); background: rgba(200, 215, 230, .45); }

/* Gold Sign In */
.signin { display: flex; align-items: center; justify-content: center; gap: calc(28 * var(--u));
  width: calc(100% - 20 * var(--u)); height: calc(54 * var(--u)); margin: 0 auto;
  border: 1px solid rgba(250, 228, 170, .9); border-radius: calc(8 * var(--u));
  background: linear-gradient(180deg, #f7e0a4 0%, #e6bd6c 45%, #c58f40 100%); color: #1d1406;
  font: 700 calc(23 * var(--u))/1 "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans Arabic", sans-serif; cursor: pointer;
  box-shadow: 0 0 calc(20 * var(--u)) rgba(232, 178, 82, .45), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: filter .15s, box-shadow .15s; }
.signin:hover { filter: brightness(1.04); box-shadow: 0 0 calc(28 * var(--u)) rgba(232, 178, 82, .65), inset 0 1px 0 rgba(255, 255, 255, .6); }
.signin:active { filter: brightness(.96); }
.signin:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.signin:disabled { opacity: .65; cursor: progress; filter: saturate(.7); }
.signin span[lang="ar"] { font-size: calc(21 * var(--u)); }
.sb { width: 1px; height: calc(26 * var(--u)); background: rgba(40, 26, 6, .45); }
.si { width: calc(26 * var(--u)); height: calc(26 * var(--u)); margin-left: calc(-12 * var(--u)); fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.status { margin: 12px 0 0; text-align: center; font-size: max(13px, calc(14 * var(--u))); color: #ffd58a; }
.status:empty { display: none; }

/* Footer */
.foot { margin-top: calc(22 * var(--u)); padding-top: calc(16 * var(--u)); border-top: 1px solid rgba(150, 195, 235, .28); }
.foot p { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px calc(14 * var(--u));
  margin: 0; font-size: calc(17 * var(--u)); color: #e6edf5; }
.shield { width: calc(28 * var(--u)); height: calc(28 * var(--u)); fill: none; stroke: var(--gold2); stroke-width: 1.5; stroke-linejoin: round; }

/* ===== Phones and portrait tablets =====
   Background bg-mobile (941x1672): the card starts below the winged bulls (image row 362, "cover" + "center top").
   Sizes in px; the top bar is hidden. */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  .card { --c: 14px; --b: 1.5px; }
  .bg { background-image: url(bg-mobile.webp); }
  .bg::after { background: linear-gradient(180deg, rgba(2, 8, 20, 0) 40%, rgba(2, 8, 20, .25) 100%); }
  .topbar { display: none; }
  .trial { top: 10px; }

  .stage { padding: calc(max(38.47vw, 21.65vh) + 6px) 16px max(20px, env(safe-area-inset-bottom)); }
  /* 25% smaller than the first phone card (owner, 2026-11-16); text stays at 12px or more. */
  .card { width: min(420px, 88%); padding: 12px 16px 12px; }
  .corner { width: 48px; height: 48px; stroke-width: 2; }
  .frame { filter: drop-shadow(0 0 5px rgba(70, 220, 255, .75)) drop-shadow(0 0 14px rgba(56, 214, 255, .4)); }

  .brand { gap: 4px; }
  .logo { width: 96px; border-radius: 12px; }
  .names .en { font-size: 17px; }
  .names .ar { font-size: 17px; }
  .rule2 { width: 80%; gap: 8px; margin: 6px auto 6px; }
  .rule2 .dms { gap: 3px; }
  .rule2 i { width: 7px; height: 7px; }
  h1 { margin-bottom: 10px; font-size: 15px; }
  h1 .sub { font-size: 13px; }

  .field { height: 40px; margin-bottom: 10px; border-radius: 7px; }
  .field > svg { width: 18px; height: 18px; margin: 0 8px 0 11px; }
  .ph { left: 37px; right: 10px; font-size: 12.5px; }
  .field:has(.eye) .ph { right: 44px; }
  .eye { width: 38px; height: 38px; margin-right: 2px; }
  .eye svg { width: 19px; height: 19px; }

  .row { margin: 2px 0 12px; gap: 8px 10px; }
  .remember { gap: 8px; font-size: 12.5px; }
  .remember .box { width: 16px; height: 16px; }
  .forgot { gap: 7px; font-size: 12.5px; }
  .fb { height: 12px; }

  .signin { width: 100%; height: 42px; gap: 14px; border-radius: 7px; font-size: 17px;
    box-shadow: 0 0 14px rgba(232, 178, 82, .45), inset 0 1px 0 rgba(255, 255, 255, .6); }
  .signin span[lang="ar"] { font-size: 15px; }
  .sb { height: 18px; }
  .si { width: 19px; height: 19px; margin-left: -6px; }

  .foot { margin-top: 12px; padding-top: 10px; }
  .foot p { gap: 4px 8px; font-size: 12px; }
  .foot .fb { display: none; }
  .shield { width: 19px; height: 19px; }
}
/* Narrow phones: the shorter Arabic field label */
@media (max-width: 520px) {
  .lg { display: none; }
  .sm { display: inline; }
}
/* Short phones: a more compact card */
@media (max-height: 700px) and (max-width: 760px) {
  .logo { width: 72px; border-radius: 10px; }
  .names .en, .names .ar { font-size: 16px; }
  h1 { margin-bottom: 8px; }
  .field { height: 38px; margin-bottom: 8px; }
  .row { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
