:root {
  --brand: #014034;
  --brand-deep: #102c25;
  --sand: #d9c196;
  --gold: #ab8a5f;
  --canvas: #f5f5f1;
  --ink: #17231f;
  --muted: #69756f;
  --line: #dfe4df;
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 16px; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.login-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(380px, 43%) minmax(0, 57%); }
.brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(32px, 5vw, 72px);
  color: #fff;
  background: linear-gradient(145deg, #015246 0%, var(--brand) 45%, var(--brand-deep) 100%);
}
.brand-panel::before, .brand-panel::after { content: ""; position: absolute; z-index: -1; border: 1px solid rgba(217,193,150,.13); border-radius: 50%; }
.brand-panel::before { width: 480px; height: 480px; inset: -210px -150px auto auto; box-shadow: inset 0 0 0 54px rgba(217,193,150,.025), inset 0 0 0 108px rgba(217,193,150,.025); }
.brand-panel::after { width: 390px; height: 390px; inset: auto auto -240px -120px; box-shadow: inset 0 0 0 44px rgba(255,255,255,.02); }
.brand-lockup { display: flex; align-items: center; gap: 15px; }
.brand-lockup img { width: 50px; height: 58px; object-fit: contain; }
.brand-lockup div { display: grid; }
.brand-lockup strong { font-size: 20px; line-height: 1.35; }
.brand-lockup span { color: rgba(255,255,255,.57); font-size: 13px; }
.brand-copy { max-width: 510px; margin-block: auto; padding-block: 70px; }
.brand-kicker { display: inline-flex; align-items: center; min-height: 30px; border: 1px solid rgba(217,193,150,.24); border-radius: 999px; background: rgba(217,193,150,.08); padding: 0 12px; color: var(--sand); font-size: 12px; font-weight: 700; }
.brand-copy h1 { margin: 19px 0 16px; font-size: clamp(35px, 4vw, 54px); line-height: 1.28; letter-spacing: -1.4px; }
.brand-copy p { max-width: 450px; margin: 0; color: rgba(255,255,255,.66); font-size: 16px; line-height: 1.95; }
.brand-status { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.58); font-size: 13px; }
.brand-status i { width: 8px; height: 8px; border-radius: 50%; background: #58d39c; box-shadow: 0 0 0 5px rgba(88,211,156,.1); }

.login-panel { display: grid; place-items: center; align-content: center; min-height: 100%; padding: 42px clamp(24px, 7vw, 100px); background: radial-gradient(circle at 10% 0%, rgba(217,193,150,.15), transparent 31rem), var(--canvas); }
.mobile-brand { display: none; }
.login-card { width: min(100%, 450px); border: 1px solid rgba(21,42,35,.09); border-radius: 26px; background: rgba(255,255,255,.95); padding: clamp(26px, 4vw, 40px); box-shadow: 0 24px 70px rgba(21,42,35,.09); }
.login-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 13px; }
.secure-icon { width: 49px; height: 49px; display: grid; place-items: center; flex: none; border-radius: 15px; background: #edf5f1; color: var(--brand); }
.login-heading > div { display: grid; }
.login-heading span { color: var(--gold); font-size: 12px; font-weight: 700; }
.login-heading h2 { margin: 1px 0 0; color: var(--brand-deep); font-size: 27px; line-height: 1.3; }
.login-description { margin: 0 0 27px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.login-card > label { display: block; margin: 0 2px 8px; color: #33413c; font-size: 14px; font-weight: 600; }
.input-wrap { height: 52px; display: flex; align-items: center; gap: 10px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; padding-inline: 14px; transition: .18s ease; }
.input-wrap:focus-within { border-color: rgba(1,64,52,.58); box-shadow: 0 0 0 4px rgba(1,64,52,.075); }
.input-wrap > svg { flex: none; color: #87928d; }
.input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.input-wrap input::placeholder { color: #a3aca7; }
.code-wrap input { direction: ltr; text-align: center; letter-spacing: .28em; font-weight: 700; }
.reveal-code { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border: 0; border-radius: 9px; background: transparent; color: #7d8983; }
.reveal-code:hover { background: #f0f3f0; color: var(--brand); }
.login-error { margin: 0 0 14px; border: 1px solid #eccaca; border-radius: 12px; background: #fff5f5; padding: 10px 12px; color: #9b3434; font-size: 13px; line-height: 1.65; }
.login-submit { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 15px; background: linear-gradient(135deg, #015347, var(--brand)); color: #fff; font-weight: 700; box-shadow: 0 12px 28px rgba(1,64,52,.2); transition: .18s ease; }
.login-submit:hover { transform: translateY(-1px); background: linear-gradient(135deg, #016052, #013b32); }
.login-submit:disabled { cursor: wait; opacity: .68; transform: none; }
.login-submit svg { width: 18px; }
.session-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 17px 0 0; color: #84908a; font-size: 12px; }
.session-note svg { width: 16px; height: 16px; }
.login-footer { margin: 22px 0 0; color: #8b958f; font-size: 12px; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(1,64,52,.2); outline-offset: 2px; }
[hidden] { display: none !important; }

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .login-panel { align-content: center; min-height: 100vh; min-height: 100dvh; padding: 26px 18px max(26px, env(safe-area-inset-bottom)); }
  .mobile-brand { display: flex; align-items: center; gap: 12px; width: min(100%, 450px); margin-bottom: 22px; padding-inline: 6px; }
  .mobile-brand img { width: 40px; height: 46px; }
  .mobile-brand div { display: grid; }
  .mobile-brand strong { color: var(--brand-deep); font-size: 17px; }
  .mobile-brand span { color: var(--muted); font-size: 12px; }
  .login-card { border-radius: 22px; padding: 27px 22px; }
  .login-heading h2 { font-size: 24px; }
  .login-footer { margin-top: 18px; }
}

@media (max-width: 380px) {
  .login-panel { padding-inline: 12px; }
  .login-card { padding-inline: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
