/* Sign-in pages (templates/signin/base.html): staff pages and client portal. A company panel beside the card on
   wide screens, a short band above it on phones. Right to left and left to right, light and dark. */
:root {
  --bg: #f3f6f9; --card: #fff; --fg: #1f2933; --quiet: #5f6b77; --line: #d9e1e8;
  --brand: #0f2537; --brand-2: #1b5e85; --gold: #f5b041; --accent: #1b5e85; --accent-soft: #e7f0fb;
  --red: #b42318; --red-soft: #fdecea; --amber: #8a5300; --amber-soft: #fff4dc; --green: #18794e;
  color-scheme: light;
}
/* dark: as the device unless light is chosen (html data-theme, includes/theme_switcher.html), or when dark is chosen */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #11161c; --card: #1a2129; --fg: #e6ebf0; --quiet: #9aa7b4; --line: #2f3a46;
  --accent: #6fb3e3; --accent-soft: #1d3346; --red: #f2857a; --red-soft: #3a1f1d; --amber-soft: #3a2f16; --amber: #f0c040;
  color-scheme: dark; }
}
:root[data-theme="dark"] {
  --bg: #11161c; --card: #1a2129; --fg: #e6ebf0; --quiet: #9aa7b4; --line: #2f3a46;
  --accent: #6fb3e3; --accent-soft: #1d3346; --red: #f2857a; --red-soft: #3a1f1d; --amber-soft: #3a2f16; --amber: #f0c040;
  color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body.signin { margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.55 "Segoe UI", "Noto Sans Arabic", "Noto Sans", Tahoma, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.signin-shell { display: flex; min-height: 100vh; }

/* the company panel */
.signin-brand {
  flex: 0 0 42%; max-width: 560px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 48px 44px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 15% 85%, rgba(245, 176, 65, .18), transparent 45%),
              linear-gradient(160deg, var(--brand) 0%, #13324a 55%, var(--brand-2) 100%);
}
.signin-brand::after { /* soft rings, purely decorative */
  content: ""; position: absolute; inset-inline-end: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%;
  border: 60px solid rgba(255, 255, 255, .04); pointer-events: none;
}
.brand-top { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.brand-top .logo { max-height: 56px; max-width: 150px; background: #fff; border-radius: 10px; padding: 6px 8px; }
.brand-top .company { font-size: 1.35rem; font-weight: 700; color: var(--gold); }
.brand-text { position: relative; z-index: 1; }
.brand-text h1 { font-size: 1.9rem; line-height: 1.3; margin: 0 0 12px; }
.brand-text p { margin: 0 0 22px; color: rgba(255, 255, 255, .82); font-size: 1.02rem; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.features li { display: flex; align-items: flex-start; gap: 12px; color: rgba(255, 255, 255, .92); }
.features svg { flex: 0 0 auto; width: 36px; height: 36px; padding: 8px; border-radius: 10px;
  background: rgba(255, 255, 255, .1); color: var(--gold); }
.features strong { display: block; color: #fff; }
.features span { font-size: .9rem; color: rgba(255, 255, 255, .72); }
.brand-contact { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; font-size: .92rem;
  padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85); }
.brand-contact .contact-title { font-weight: 600; color: #fff; margin-bottom: 4px; }
[dir="rtl"] .brand-contact .ltr { text-align: right; }
.brand-contact a { color: #fff; }

/* the card */
.signin-main { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; position: relative; }
/* language and light / dark: one small bar lined up with the card, just above it */
.signin-top { width: 100%; max-width: 420px; display: flex; justify-content: flex-end; margin-bottom: 12px; }
.signin-tools { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card); box-shadow: 0 1px 2px rgba(15, 37, 55, .05); }
.signin-tools form { margin: 0; }
.signin-tools select { height: 34px; padding: 0 10px; border: none; border-radius: 9px; background: transparent;
  color: var(--fg); font: inherit; font-size: .9rem; cursor: pointer; }
.signin-tools select:hover, .signin-tools select:focus-visible { background: var(--accent-soft); outline: none; }
.tools-divider { width: 1px; height: 20px; background: var(--line); }
.signin-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 34px 32px; box-shadow: 0 10px 30px rgba(15, 37, 55, .08); }
.signin-card h2 { margin: 0 0 6px; font-size: 1.5rem; }
.signin-card .lead { margin: 0 0 22px; color: var(--quiet); }
.signin-form { display: flex; flex-direction: column; gap: 6px; }
.signin-form label { font-weight: 600; font-size: .9rem; margin-top: 8px; }
.signin-form input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); font: inherit;
  font-size: 1rem; background: var(--card); color: var(--fg); transition: border-color .15s, box-shadow .15s; }
.signin-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.password-box { position: relative; }
.password-box input { padding-inline-end: 46px; }
.password-box .peek { position: absolute; top: 50%; inset-inline-end: 6px; transform: translateY(-50%); width: 36px; height: 36px;
  border: none; border-radius: 8px; background: none; color: var(--quiet); cursor: pointer; display: grid; place-items: center; }
.password-box .peek:hover, .password-box .peek[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.caps { margin: 2px 0 0; font-size: .82rem; color: var(--amber); background: var(--amber-soft); padding: 4px 8px; border-radius: 6px; }
.caps[hidden] { display: none; }
.signin-submit { margin-top: 18px; padding: 13px 16px; border: none; border-radius: 10px; background: var(--accent); color: #fff;
  font: inherit; font-size: 1.02rem; font-weight: 700; cursor: pointer; transition: filter .15s; }
.signin-submit:hover { filter: brightness(1.08); }
.signin-submit.is-busy { opacity: .7; cursor: progress; }
.signin-submit.as-link { display: block; text-align: center; text-decoration: none; }
.signin-error { margin: 0 0 6px; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red);
  font-size: .92rem; }
.signin-note { margin: 0 0 6px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  font-size: .92rem; }
.signin-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 16px; font-size: .92rem; }
.signin-foot { margin: 18px 0 0; font-size: .85rem; color: var(--quiet); text-align: center; }

/* phones and narrow tablets: the panel becomes a short band above the card */
@media (max-width: 860px) {
  .signin-shell { flex-direction: column; }
  .signin-brand { flex: 0 0 auto; max-width: none; padding: 22px 20px; gap: 14px; }
  .signin-brand::after { display: none; }
  .brand-text h1 { font-size: 1.25rem; margin-bottom: 4px; }
  .brand-text p { margin-bottom: 0; font-size: .95rem; }
  .features, .brand-contact { display: none; }
  .signin-main { justify-content: flex-start; padding: 20px 16px 28px; }
  .signin-card { padding: 24px 20px; border-radius: 14px; }
}

/* the light / dark switch (includes/theme_switcher.html) beside the language */
.theme-switch { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 9px;
  border: none; background: transparent; color: var(--fg); cursor: pointer; }
.theme-switch:hover, .theme-switch:focus-visible { background: var(--accent-soft); color: var(--accent); outline: none; }
.theme-icon { width: 18px; height: 18px; display: none; }
.theme-switch[data-current="auto"] .theme-icon--auto, .theme-switch[data-current="light"] .theme-icon--light,
.theme-switch[data-current="dark"] .theme-icon--dark { display: block; }

/* signed out (registration/logged_out.html) */
.signin-done { text-align: center; }
.signin-done .done-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); }
.signin-done .done-icon svg { width: 30px; height: 30px; }
.signin-done .lead { margin-bottom: 4px; }
.signin-done .signin-links { justify-content: center; }
