/**
 * UWNS / أسهل — صفحات المصادقة فقط (`html[data-auth-light]`)
 * مصدر التوكنات: docs مرجعية UWNS-design-system.md + uwns-landing.html
 */
html[data-auth-light] {
  color-scheme: only light;
}

html[data-auth-light] {
  --cf-orange: #f6821f;
  --cf-orange-dark: #e05d00;
  --cf-orange-light: #ffa44d;
  --cf-orange-subtle: #fff3e8;

  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-tertiary: #f0f0f0;
  --bg-overlay: rgba(0, 0, 0, 0.04);

  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --text-inverse: #ffffff;

  --border-light: #e8e8e8;
  --border-mid: #d1d1d6;
  --border-dark: #aeaeb2;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  --font-auth: "IBM Plex Sans Arabic", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* جسر لـ dashboard.css على صفحات auth */
  --color-bg: var(--bg-secondary);
  --color-surface: var(--bg-primary);
  --color-surface-container-low: var(--bg-secondary);
  --color-border: var(--border-light);
  --color-border-strong: var(--border-mid);
  --color-text-1: var(--text-primary);
  --color-text-2: var(--text-secondary);
  --color-text-3: var(--text-tertiary);
  --color-primary: var(--cf-orange);
  --color-primary-hover: var(--cf-orange-dark);
  --color-primary-muted: var(--cf-orange-subtle);
  --color-danger: #b42318;
  --color-danger-bg: #fdecec;
}

html[data-auth-light] body.auth-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 5rem;
  box-sizing: border-box;
  font-family: var(--font-auth);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* بطاقة Hero-style (حد علوي برتقالي + ظل) */
html[data-auth-light] .auth-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  padding: 2.25rem 1.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  border-top: 3px solid var(--cf-orange);
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
}

html[data-auth-light] .auth-logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

html[data-auth-light] .auth-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  background: var(--cf-orange);
  color: var(--text-inverse);
  font-size: 1.375rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

html[data-auth-light] .auth-logo-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

html[data-auth-light] .auth-card__title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.05rem;
  line-height: 1.25;
  text-align: center;
  color: var(--text-primary);
  margin: 0 0 0.375rem;
}

html[data-auth-light] .auth-card__subtitle {
  font-size: 0.9375rem;
  line-height: 1.65;
  text-align: center;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
}

html[data-auth-light] .auth-card__role-pill {
  display: inline-flex;
  align-self: center;
  margin: 0 auto 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

html[data-auth-light] .auth-card--platform-admin {
  border-top-color: #4f46e5;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(79, 70, 229, 0.06);
}

html[data-auth-light] .auth-card__footer .auth-card__footer-sep {
  margin: 0 0.35rem;
  color: var(--text-tertiary);
}

html[data-auth-light] .auth-form .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

html[data-auth-light] .auth-form .input,
html[data-auth-light] .auth-form input.input-block {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html[data-auth-light] .auth-form .input::placeholder,
html[data-auth-light] .auth-form input.input-block::placeholder {
  color: var(--text-tertiary);
}

html[data-auth-light] .auth-form .input:focus,
html[data-auth-light] .auth-form input.input-block:focus {
  outline: none;
  border-color: var(--cf-orange);
  box-shadow: 0 0 0 3px var(--cf-orange-subtle);
}

html[data-auth-light] .auth-form .btn-primary {
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  border: none;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-auth);
  cursor: pointer;
  background: var(--cf-orange);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

html[data-auth-light] .auth-form .btn-primary:hover {
  background: var(--cf-orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(246, 130, 31, 0.35);
}

html[data-auth-light] .auth-card__footer {
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 14px;
}

html[data-auth-light] .auth-card__footer a {
  color: var(--cf-orange);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

html[data-auth-light] .auth-card__footer a:hover {
  color: var(--cf-orange-dark);
  text-decoration: underline;
}

html[data-auth-light] .auth-page-footer {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 12px;
}

html[data-auth-light] .auth-page-footer a {
  color: var(--text-tertiary);
  transition: color 0.15s ease;
}

html[data-auth-light] .auth-page-footer a:hover {
  color: var(--cf-orange);
}

html[data-auth-light] .auth-card__error {
  border-radius: var(--r-md);
  border: 1px solid rgba(180, 35, 24, 0.25);
}

html[data-auth-light] .auth-theme-fab {
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  background: var(--bg-primary);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

html[data-auth-light] .auth-theme-fab:hover {
  border-color: var(--border-dark);
  background: var(--bg-overlay);
  color: var(--text-primary);
}
