/* SmartDyeing — sign-in pages (Account layout). Tokens mirror the Angular app. */
:root {
  --sd-page: #f6f5f8; --sd-card: #ffffff; --sd-ink: #1c1b22; --sd-muted: #6b6878; --sd-border: rgba(20,16,40,.12);
  --sd-primary: #4f46e5; --sd-primary-ink: #ffffff; --sd-focus: rgba(79,70,229,.18); --sd-link: #4338ca;
  --sd-bad: #c62828; --sd-bad-bg: #fdecec;
  --sd-font: 'SD Latin', 'SD Arabic', 'Segoe UI', Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --sd-page: #121117; --sd-card: #1c1b22; --sd-ink: #ecebf2; --sd-muted: #a9a6b6; --sd-border: rgba(255,255,255,.14);
    --sd-primary: #7c75f5; --sd-focus: rgba(124,117,245,.25); --sd-link: #a5a1ff; --sd-bad: #f87171; --sd-bad-bg: rgba(248,113,113,.12); }
}
html, body.sd-auth { height: 100%; }
body.sd-auth { margin: 0; background: var(--sd-page) !important; color: var(--sd-ink); font-family: var(--sd-font) !important;
  -webkit-font-smoothing: antialiased; }
.sd-auth * { font-family: inherit; }
.sd-auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; }

/* brand panel */
.sd-auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 40px 48px; color: #fff;
  background: radial-gradient(120% 80% at 100% 0%, #4338ca 0%, transparent 60%), linear-gradient(160deg, #1e1b4b 0%, #17153a 55%, #0f3b3a 120%); }
.sd-brand-top { display: flex; align-items: center; gap: 12px; direction: ltr; justify-content: flex-end; }
.sd-word { font-size: 22px; letter-spacing: -.2px; direction: ltr; }
.sd-word span { font-weight: 400; opacity: .8; } .sd-word b { font-weight: 700; }
.sd-brand-copy { margin-top: auto; margin-bottom: auto; max-width: 460px; position: relative; z-index: 1; }
.sd-brand-copy h2 { font-size: 30px; line-height: 1.35; font-weight: 700; margin: 0 0 14px; color: #fff; }
.sd-brand-copy p { font-size: 15.5px; line-height: 1.8; color: #c9c6ea; margin: 0 0 26px; }
.sd-brand-copy ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.sd-brand-copy li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: #e9e7fb; }
.sd-brand-copy .dot { width: 8px; height: 8px; border-radius: 50%; background: #5eead4; box-shadow: 0 0 0 4px rgba(94,234,212,.15); flex: none; }
.sd-waves { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 34%; }
.sd-brand-foot { position: relative; z-index: 1; color: #9e9ad0; font-size: 12.5px; }

/* form side */
.sd-auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.sd-auth-mobile-brand { display: none; align-items: center; gap: 10px; direction: ltr; margin-bottom: 24px; color: var(--sd-ink); }
.sd-auth-card { width: 100%; max-width: 420px; }
.sd-auth-help { max-width: 420px; text-align: center; color: var(--sd-muted); font-size: 12.5px; margin-top: 28px; }

/* the account module's own markup (a bootstrap card) → flat, roomy form */
.sd-auth-card .card { background: transparent !important; border: 0 !important; box-shadow: none !important; margin: 0 !important; }
.sd-auth-card .card-body { padding: 0 !important; }
.sd-auth-card h4, .sd-auth-card .card-title { font-size: 28px; font-weight: 700; margin: 0 0 6px; color: var(--sd-ink); }
.sd-auth-card .sd-sub { color: var(--sd-muted); margin: 0 0 28px; font-size: 14.5px; }
.sd-auth-card strong { font-weight: 500; color: var(--sd-muted); }
.sd-auth-card label, .sd-auth-card .form-label { font-size: 13px; font-weight: 500; color: var(--sd-muted); margin-bottom: 6px; }
.sd-auth-card .form-control { height: 48px; border-radius: 12px !important; border: 1px solid var(--sd-border); background: var(--sd-card);
  color: var(--sd-ink); font-size: 15px; padding-inline: 14px; box-shadow: none; }
.sd-auth-card .form-control:focus { border-color: var(--sd-primary); box-shadow: 0 0 0 4px var(--sd-focus); }
.sd-auth-card .input-group { direction: rtl; }
.sd-auth-card .input-group .form-control { border-start-end-radius: 0 !important; border-end-end-radius: 0 !important; }
.sd-auth-card .input-group .btn { border-radius: 0 !important; border-start-end-radius: 12px !important; border-end-end-radius: 12px !important;
  background: var(--sd-card) !important; border: 1px solid var(--sd-border) !important; border-inline-start: 0 !important; color: var(--sd-muted) !important; }
.sd-auth-card .mb-3, .sd-auth-card .form-floating { margin-bottom: 18px !important; }
.sd-auth-card .form-check-input { width: 18px; height: 18px; border-radius: 5px; border-color: var(--sd-border); }
.sd-auth-card .form-check-input:checked { background-color: var(--sd-primary); border-color: var(--sd-primary); }
.sd-auth-card .form-check-label { color: var(--sd-ink); font-size: 14px; }
.sd-auth-card a { color: var(--sd-link); text-decoration: none; font-weight: 500; font-size: 14px; }
.sd-auth-card a:hover { text-decoration: underline; }
.sd-auth-card .btn-primary, .sd-auth-card button[type=submit] { height: 50px; border-radius: 12px !important; border: 0 !important; font-size: 16px; font-weight: 600;
  background: var(--sd-primary) !important; color: var(--sd-primary-ink) !important; margin-top: 8px;
  box-shadow: 0 8px 20px -8px rgba(79,70,229,.6); transition: transform .08s, filter .12s; }
.sd-auth-card .btn-primary:hover { filter: brightness(1.07); }
.sd-auth-card .btn-primary:active { transform: translateY(1px); }
.sd-auth-card .alert { border-radius: 12px; border: 0; font-size: 14px; }
.sd-auth-card .alert-danger { background: var(--sd-bad-bg); color: var(--sd-bad); }
.sd-auth-card .text-danger, .sd-auth-card .field-validation-error { color: var(--sd-bad) !important; font-size: 12.5px; }
.sd-auth-card hr { border-color: var(--sd-border); }

@media (max-width: 900px) {
  .sd-auth-shell { grid-template-columns: 1fr; }
  .sd-auth-brand { display: none; }
  .sd-auth-mobile-brand { display: flex; }
  .sd-auth-main { justify-content: flex-start; padding-top: 56px; }
}
.sd-auth-card .form-check-input:not(:checked) { background-color: var(--sd-card); }
/* passwords are reset by the administrator (imported users have no real e-mail) */
.sd-auth-card a[href*="ForgotPassword"] { display: none; }

/* the verse above the sign-in form */
.sd-verse { box-sizing: border-box; width: 100%; max-width: 420px; margin: 0 0 30px; padding: 18px 20px 14px; text-align: center; position: relative;
  border-radius: 18px; background: linear-gradient(135deg, rgba(79,70,229,.07), rgba(13,148,136,.07)); border: 1px solid rgba(79,70,229,.14); }
.sd-verse::before, .sd-verse::after { content: ""; position: absolute; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: #0d9488; opacity: .55; }
.sd-verse::before { inset-inline-start: 10px; } .sd-verse::after { inset-inline-end: 10px; }
.sd-verse blockquote { margin: 0; font-size: 21px; line-height: 2.1; font-weight: 600; color: var(--sd-ink); letter-spacing: 0; }
.sd-verse figcaption { margin-top: 4px; font-size: 12.5px; color: var(--sd-muted); }
@media (prefers-color-scheme: dark) { .sd-verse { background: linear-gradient(135deg, rgba(139,133,255,.10), rgba(94,234,212,.08)); border-color: rgba(139,133,255,.22); } }
@media (max-width: 480px) { .sd-verse blockquote { font-size: 18px; } }

/* «كود الشركة» — the company this sign-in is for (multi-tenancy) */
.sd-company { margin: 0 0 18px; }
.sd-company-show { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(79,70,229,.08), rgba(13,148,136,.08)); border: 1px solid rgba(79,70,229,.16); }
.sd-company-show .ic { font-size: 22px; line-height: 1; }
.sd-company-show > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sd-company-show small { font-size: 12px; color: var(--sd-muted); }
.sd-company-show b { font-size: 15.5px; color: var(--sd-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-company-show .code { font-size: 12px; color: var(--sd-muted); font-family: ui-monospace, monospace; }
.sd-company-change { border: 0; background: transparent; color: var(--sd-primary); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.sd-company-change:hover { background: rgba(79,70,229,.08); }
.sd-company-edit label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--sd-ink); }
.sd-company-row { display: flex; gap: 8px; }
.sd-company-row input { flex: 1; height: 48px; border-radius: 12px; border: 1.5px solid var(--sd-border-strong, rgba(20,16,40,.16)); padding: 0 14px;
  font: inherit; font-size: 15px; background: var(--sd-card); color: var(--sd-ink); text-align: left; }
.sd-company-row input:focus { outline: none; border-color: var(--sd-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.sd-company-row button { height: 48px; padding: 0 18px; border-radius: 12px; border: 0; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--sd-primary); color: var(--sd-primary-ink, #fff); }
.sd-company-row button:disabled { opacity: .6; cursor: default; }
.sd-company-hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--sd-muted); }
.sd-company-hint.bad { color: var(--sd-bad); font-weight: 600; }
