/*
 * Authentication identity layer
 * -----------------------------
 * This file is intentionally self-contained. Remove its <link> from the auth
 * views (or delete this file) to remove the refreshed authentication styling.
 */
:root {
  --auth-navy: #145b9f;
  --auth-brand: #2275ce;
  --auth-accent: #5684eb;
  --auth-ink: #103c67;
  --auth-muted: #7890aa;
  --auth-line: #d8e5f1;
  --auth-surface: #fff;
  --auth-canvas: #f5f9fd;
  --auth-danger: #b42318;
  --auth-success: #17633a;
  --auth-warning: #805b10;
  --auth-radius: 16px;
  --auth-font: Inter, "IBM Plex Sans Arabic", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.auth-page {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--auth-ink);
  font-family: var(--auth-font);
  background:
    radial-gradient(circle at 0 100%, rgba(60, 122, 218, .12), transparent 28%),
    radial-gradient(circle at 100% 0, rgba(43, 103, 205, .15), transparent 26%),
    var(--auth-canvas);
}
body.auth-page::before,
body.auth-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  background: rgba(78, 125, 219, .1);
}
body.auth-page::before { width: 330px; height: 330px; inset: -180px -120px auto auto; }
body.auth-page::after { width: 240px; height: 240px; inset: auto auto -150px -90px; }

.auth-shell {
  width: min(840px, 100%);
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(285px, .84fr) minmax(370px, 1.16fr);
  direction: ltr;
  overflow: hidden;
  border: 1px solid #d8e6f2;
  border-radius: 21px;
  background: var(--auth-surface);
  box-shadow: 0 20px 52px rgba(27, 66, 105, .13);
}
.auth-brand-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 24px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: linear-gradient(145deg, var(--auth-navy), var(--auth-brand) 52%, var(--auth-accent));
}
.auth-brand-panel::before,
.auth-brand-panel::after { content: ""; position: absolute; width: 310px; height: 310px; border-radius: 50%; background: rgba(255,255,255,.1); }
.auth-brand-panel::before { top: -175px; left: -100px; }
.auth-brand-panel::after { right: -150px; bottom: -190px; }
.auth-brand-content { position: relative; z-index: 1; width: min(340px, 100%); }
.auth-brand-logo { width: min(270px, 92%); height: 56px; object-fit: contain; margin-bottom: 20px; padding: 7px 13px; border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: 0 10px 24px rgba(5,43,91,.14); }
.auth-brand-panel h1 { margin: 0 0 8px; font-size: clamp(25px, 2.3vw, 34px); line-height: 1.25; }
.auth-brand-panel p { margin: 0 auto; max-width: 340px; color: rgba(255,255,255,.86); font-size: 14px; line-height: 1.65; }
.auth-brand-divider { width: 160px; height: 2px; margin: 22px auto; background: rgba(255,255,255,.65); }
.auth-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.auth-feature { padding: 9px 4px; border: 1px solid rgba(255,255,255,.22); border-radius: 11px; background: rgba(255,255,255,.08); }
.auth-feature i { display: block; margin-bottom: 4px; font-size: 19px; }
.auth-feature span { font-size: 10px; font-weight: 600; }

.auth-form-panel { position: relative; display: flex; align-items: center; justify-content: center; padding: 36px clamp(28px, 4vw, 44px); }
.auth-content { width: min(360px, 100%); }
.auth-language { position: absolute; top: 17px; inset-inline-end: 19px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid var(--auth-line); border-radius: 9px; color: var(--auth-navy); background: #fff; text-decoration: none; font-size: 12px; font-weight: 600; }
.auth-language:hover { border-color: var(--auth-brand); color: var(--auth-brand); }
.auth-icon { width: 60px; height: 60px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 18px; color: var(--auth-brand); background: linear-gradient(145deg, #edf5ff, #f0efff); }
.auth-icon i { font-size: 30px; }
.auth-heading { margin: 0; text-align: center; font-size: clamp(25px, 2.4vw, 33px); line-height: 1.25; }
.auth-subtitle { margin: 7px 0 20px; color: var(--auth-muted); text-align: center; font-size: 13px; line-height: 1.55; }
.auth-group { margin-bottom: 13px; }
.auth-label-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.auth-page label { display: block; margin-bottom: 6px; color: var(--auth-ink); font-size: 13px; font-weight: 700; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > i { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); color: #8399ae; font-size: 19px; pointer-events: none; }
.auth-control { width: 100%; height: 48px; padding-inline: 45px 39px; border: 2px solid var(--auth-line); border-radius: 11px; outline: 0; color: var(--auth-ink); background: #fff; font: inherit; font-size: 14px; transition: .2s; }
.auth-control::placeholder { color: #96a5b5; }
.auth-control:focus { border-color: #4b8bd5; box-shadow: 0 0 0 3px rgba(47,123,209,.12); }
.auth-password-toggle { position: absolute; top: 50%; inset-inline-end: 12px; transform: translateY(-50%); border: 0; color: #8399ae; background: transparent; cursor: pointer; font-size: 19px; }
.auth-link { color: var(--auth-brand); text-decoration: none; font-size: 12px; font-weight: 600; }
.auth-link:hover { text-decoration: underline; }
.auth-error { display: block; margin-top: 5px; color: var(--auth-danger); font-size: 12px; }
.auth-alert { margin-bottom: 11px; padding: 9px 11px; border-radius: 9px; font-size: 12px; line-height: 1.5; }
.auth-alert--danger { color: #8b1e17; border: 1px solid #f5c2bd; background: #fff1f0; }
.auth-alert--success { color: var(--auth-success); border: 1px solid #bde6cd; background: #effbf4; }
.auth-alert--warning { color: var(--auth-warning); border: 1px solid #f4dda5; background: #fff8e7; }
.auth-remember { display: flex; align-items: center; gap: 8px; margin: 2px 0 16px; color: var(--auth-muted); }
.auth-remember input { width: 16px; height: 16px; accent-color: var(--auth-brand); }
.auth-remember label { margin: 0; color: var(--auth-muted); font-size: 12px; cursor: pointer; }
.auth-button { width: 100%; min-height: 48px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; border: 0; border-radius: 11px; color: #fff; background: linear-gradient(100deg, #176bc0, #4a88e5); box-shadow: 0 10px 21px rgba(35,111,196,.21); cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; transition: .2s; }
.auth-button:hover { transform: translateY(-1px); box-shadow: 0 13px 25px rgba(35,111,196,.27); }
.auth-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.auth-button--outline { color: var(--auth-brand); border: 1px solid var(--auth-brand); background: #fff; box-shadow: none; }
.auth-footer { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--auth-line); color: #8a9caf; text-align: center; font-size: 10px; }

.auth-card { position: relative; width: min(590px, 100%); overflow: hidden; border: 1px solid #d8e6f2; border-radius: 28px; background: #fff; box-shadow: 0 28px 70px rgba(27,66,105,.16); }
.auth-card::before { content: ""; display: block; height: 8px; background: linear-gradient(90deg, var(--auth-navy), var(--auth-brand), var(--auth-accent)); }
.auth-card-body { padding: 70px 58px 44px; text-align: center; }
.auth-card-logo { width: min(330px, 82%); height: 68px; object-fit: contain; margin-bottom: 28px; padding: 9px 16px; border: 1px solid #edf2f7; border-radius: 14px; background: #fff; }
.auth-card .auth-language { top: 27px; }
.auth-card .auth-subtitle { max-width: 450px; margin-inline: auto; }
.auth-card form, .auth-card .auth-copy { text-align: start; }
.auth-actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.auth-actions > * { flex: 1; }
.auth-center-link { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 22px; }
.auth-email { display: block; margin-top: 5px; color: var(--auth-navy); font-weight: 700; overflow-wrap: anywhere; }
.auth-otp { display: flex; direction: ltr; justify-content: center; gap: 11px; margin: 0 0 25px; }
.auth-otp-input { width: 57px; height: 66px; border: 2px solid var(--auth-line); border-radius: 14px; outline: 0; color: var(--auth-ink); background: #fff; text-align: center; font: 700 25px Inter, sans-serif; caret-color: var(--auth-brand); transition: .2s; }
.auth-otp-input:focus { border-color: #4b8bd5; box-shadow: 0 0 0 4px rgba(47,123,209,.12); }
.auth-resend { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--auth-line); color: var(--auth-muted); text-align: center; font-size: 14px; }
.auth-countdown { display: block; min-height: 25px; margin: 5px 0 12px; color: var(--auth-navy); font-weight: 600; }
.auth-note { display: flex; align-items: flex-start; justify-content: center; gap: 7px; margin-top: 22px; color: #91a0af; font-size: 12px; line-height: 1.6; }

@media (max-width: 840px) {
  body.auth-page { padding: 14px; }
  .auth-shell { min-height: auto; grid-template-columns: 1fr; border-radius: 20px; }
  .auth-brand-panel { min-height: 205px; padding: 28px 24px; }
  .auth-brand-logo { height: 54px; margin-bottom: 16px; }
  .auth-brand-panel h1 { font-size: 26px; }
  .auth-brand-panel p { font-size: 13px; }
  .auth-brand-divider, .auth-features { display: none; }
  .auth-form-panel { padding: 62px 26px 34px; }
}
@media (max-width: 600px) {
  body.auth-page { display: block; padding: 0; background: #fff; }
  .auth-shell, .auth-card { width: 100%; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .auth-brand-panel { min-height: 185px; padding: 28px 20px; }
  .auth-brand-logo { width: 280px; max-width: 90%; height: 52px; margin-bottom: 14px; }
  .auth-brand-panel h1 { font-size: 23px; }
  .auth-brand-panel p { display: none; }
  .auth-form-panel { padding: 66px 20px 30px; }
  .auth-card-body { padding: 74px 22px 34px; }
  .auth-language { top: 20px; inset-inline-end: 20px; }
  .auth-icon { width: 58px; height: 58px; border-radius: 18px; }
  .auth-heading { font-size: 27px; }
  .auth-subtitle { margin-bottom: 22px; font-size: 14px; }
  .auth-actions { flex-direction: column; }
  .auth-actions > * { width: 100%; }
  .auth-otp { gap: 7px; }
  .auth-otp-input { width: 44px; height: 58px; font-size: 22px; }
}
