/* Platform administrator sign-in — Cream · Sage · Brown kit (tokens from admin-kit.css / platform-theme.css). */
body.kl-login { margin: 0; min-height: 100svh; display: block; background: var(--d-surface-2); color: var(--d-ink); font-family: 'Tajawal', system-ui, sans-serif; }
.kl-login *, .kl-login *::before, .kl-login *::after { box-sizing: border-box; }
.kl-login svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.kl-tools { position: fixed; inset-block-start: 16px; inset-inline-end: 16px; z-index: 5; }
.kl-page { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; }

.kl-card { width: 100%; max-width: 400px; padding: 32px 28px; background: var(--d-surface); border: 1px solid var(--d-line); border-radius: 10px; box-shadow: var(--d-shadow-3); }

.kl-card-head { text-align: center; margin-bottom: 26px; }
.kl-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; color: var(--d-ink); text-decoration: none; text-align: start; }
.kl-brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: var(--d-sidebar-bg); color: #d9b88a; }
.kl-brand-mark svg { width: 22px; height: 22px; }
.kl-brand strong { display: block; font-size: 1.05rem; letter-spacing: .08em; line-height: 1.2; }
.kl-brand small { display: block; font-size: .72rem; color: var(--d-muted); }
.kl-card-head h1 { margin: 0 0 4px; font-size: 1.5rem; line-height: 1.3; font-weight: 800; }
.kl-card-head h1::before { content: "//"; margin-inline-end: 8px; font: 700 1rem Menlo, ui-monospace, monospace; color: var(--kit-accent); direction: ltr; }
.kl-card-head p { margin: 0; color: var(--d-muted); font-size: .92rem; }

.kl-alert { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; padding: 11px 13px; border: 1px solid var(--d-danger-line); border-radius: 8px; background: var(--d-danger-soft); color: var(--d-danger); }
.kl-alert svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.kl-alert strong { display: block; font-size: .88rem; }
.kl-alert span { font-size: .84rem; }

.kl-form { display: grid; gap: 16px; }
body.kl-login .kl-form .kl-field label { display: block; margin-bottom: 6px; font-size: .85rem; font-weight: 700; color: var(--d-ink-soft); }
.kl-input { position: relative; display: flex; align-items: center; height: 44px; padding: 0; border: 0; border-bottom: 1.5px solid var(--d-line); border-radius: 0; background: transparent; box-shadow: none; transition: border-color .15s; }
.kl-input:hover { border-bottom-color: var(--d-muted-soft); }
.kl-input:focus-within { border-bottom-color: var(--d-primary); box-shadow: none; }
.kl-input > svg { position: absolute; inset-inline-start: 0; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--d-muted); pointer-events: none; }
body.kl-login .kl-form .kl-input input { flex: 1; width: auto; min-width: 0; height: 100%; margin: 0; padding: 0 36px 0 28px; border: 0; border-radius: 0; outline: 0; box-shadow: none; background: transparent; color: var(--d-ink); font: inherit; }
body.kl-login .kl-form .kl-input input::placeholder { color: var(--d-muted-soft); }
.kl-eye { position: absolute; inset-inline-end: 0; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--d-muted); cursor: pointer; }
.kl-eye:hover { background: transparent; color: var(--d-ink); }
.kl-eye svg { width: 18px; height: 18px; }
.kl-eye .password-eye-hide, .kl-eye[aria-pressed="true"] .password-eye-show { display: none; }
.kl-eye[aria-pressed="true"] .password-eye-hide { display: block; }
.kl-caps { margin: 6px 0 0; font-size: .8rem; color: var(--d-warn); }

body.kl-login .kl-form .kl-check { display: flex; flex-direction: row; justify-content: flex-start; margin: 0; align-items: center; gap: 8px; font-size: .88rem; color: var(--d-ink-soft); cursor: pointer; }
body.kl-login .kl-form .kl-check input { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--d-primary); }

.kl-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; border: 0; border-radius: 7px; background: var(--d-primary); color: var(--d-primary-ink); font: 700 1rem 'Tajawal', system-ui, sans-serif; cursor: pointer; transition: background .15s; }
.kl-submit:hover { background: var(--d-primary-2); }
.kl-submit:focus-visible { outline: 3px solid var(--d-ring); outline-offset: 2px; }
.kl-submit-arrow { width: 18px; height: 18px; }
.kl-submit .auth-submit-spinner { display: none; width: 18px; height: 18px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: kl-spin .7s linear infinite; }
.kl-submit.is-submitting .auth-submit-spinner { display: inline-block; }
.kl-submit.is-submitting .kl-submit-arrow { display: none; }
.kl-submit:disabled { opacity: .8; cursor: progress; }
@keyframes kl-spin { to { transform: rotate(360deg); } }

.kl-card-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--d-line); font-size: .78rem; color: var(--d-muted); }
.kl-card-foot svg { width: 15px; height: 15px; color: var(--d-primary); }

/* Browser autofill/focus paints its own box inside the input — keep it invisible so only the underline reacts. */
body.kl-login .kl-form .kl-input input:-webkit-autofill,
body.kl-login .kl-form .kl-input input:-webkit-autofill:hover,
body.kl-login .kl-form .kl-input input:-webkit-autofill:focus,
body.kl-login .kl-form .kl-input input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--d-surface) inset !important;
  -webkit-text-fill-color: var(--d-ink) !important;
  caret-color: var(--d-ink);
  transition: background-color 600000s 0s, color 600000s 0s;
}
body.kl-login .kl-form .kl-input input:focus, body.kl-login .kl-form .kl-input input:focus-visible { outline: 0 !important; box-shadow: none !important; border: 0 !important; background: transparent !important; }
body.kl-login .kl-form .kl-input input::selection { background: var(--d-ring); color: var(--d-ink); }
body.kl-login .kl-form .kl-input { -webkit-tap-highlight-color: transparent; }
