/* ═══════════════════════════════════════════════════════════════════
   auth.css — shared styles for the standalone auth pages
   (native common/login.twig, forgotten.twig, forgotten_reset.twig).

   Extracted from the owner's prototype, where each auth page carried an
   identical inline <style> block; single-sourced here instead so the
   three templates cannot drift apart.
   Loaded AFTER uix.min.css (renamed Tabler build) — it themes Tabler's
   .form-floating / .input-group primitives, it does not replace them.
   ═══════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: -apple-system, 'Inter', Roboto, sans-serif; background: #f0f4ff; }
/* uix.min.css ships `a:hover { text-decoration: underline }` — suppress it so
   auth-page links/buttons don't flash an underline on click/tap (same global
   override as app.css; auth pages load auth.css instead of app.css). */
a, a:hover, a:focus, a:active { text-decoration: none; }

/* Page frame: phone-width column, gradient hero above a rounded card */
.auth-page { display: flex; flex-direction: column; max-width: 430px; margin: 0 auto; min-height: 100vh; }
.auth-header { background: linear-gradient(135deg, #0f766e, #047857, #065f46); background-size: 300% 300%; animation: gradShift 6s ease infinite; padding: 52px 24px 72px; text-align: center; position: relative; overflow: hidden; flex-shrink: 0; }
@keyframes gradShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.auth-header .ring { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.07); animation: ringPulse ease-in-out infinite alternate; }
.auth-header .ring-1 { width: 180px; height: 180px; top: -50px; right: -30px; animation-duration: 5s; }
.auth-header .ring-2 { width: 110px; height: 110px; bottom: 10px; left: -20px; animation-duration: 7s; animation-delay: -3s; }
.auth-header .ring-3 { width: 70px; height: 70px; top: 20px; left: 30%; animation-duration: 4s; animation-delay: -1.5s; }
@keyframes ringPulse { from { transform: scale(1); opacity: 0.5; } to { transform: scale(1.18); opacity: 0.9; } }
.auth-logo { width: 64px; height: 64px; background: rgba(255,255,255,0.18); border: 2px solid rgba(255,255,255,0.30); border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 12px; position: relative; z-index: 1; }
.auth-app-name { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.3px; position: relative; z-index: 1; }
.auth-app-sub  { font-size: 12px; color: rgba(255,255,255,0.90); margin-top: 3px; position: relative; z-index: 1; }
.auth-body { flex: 1; background: #fff; border-radius: 24px 24px 0 0; margin-top: -24px; padding: 28px 22px 32px; position: relative; z-index: 2; box-shadow: 0 -2px 20px rgba(0,0,0,0.06); }
.auth-heading    { font-size: 20px; font-weight: 800; color: #0f172a; letter-spacing: -0.3px; margin-bottom: 3px; }
.auth-subheading { font-size: 13px; color: #64748b; margin-bottom: 22px; line-height: 1.4; }

/* Icon-prefixed floating inputs */
.fi-group { position: relative; margin-bottom: 14px; }
.fi-group .input-group-text { background: #f8fafc; border-color: #e2e8f0; border-right: none; color: #64748b; font-size: 18px; border-radius: 12px 0 0 12px; }
.fi-group .form-floating { flex: 1; }
.fi-group .form-floating .form-control, .fi-group .form-floating .form-select { border-left: none; border-color: #e2e8f0; border-radius: 0 12px 12px 0; background: #fff; font-size: 14px; color: #0f172a; box-shadow: none; padding-left: 14px; }
.fi-group .form-floating .form-control:focus, .fi-group .form-floating .form-select:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,0.10); }
.fi-group:focus-within .input-group-text { border-color: #0f766e; color: #0f766e; }
.fi-group .form-floating label { padding-left: 14px; color: #94a3b8; font-size: 13px; }
.pwd-toggle { border-left: none !important; cursor: pointer; border-radius: 0 12px 12px 0 !important; background: #f8fafc; }

/* Inline alerts (server-rendered and JS-inserted share these) */
.auth-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; border: 1px solid; line-height: 1.5; }
.auth-alert-error   { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }
.auth-alert-success { background: #f0fdf4; border-color: #86efac; color: #16a34a; }

/* Primary action button */
.btn-auth { width: 100%; height: 50px; background: linear-gradient(135deg, #0d9488 0%, #059669 100%); color: #fff; border: none; border-radius: 13px; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 6px 20px rgba(5,150,105,0.42); margin-top: 8px; transition: opacity 0.15s, transform 0.15s; }
.btn-auth:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.btn-auth:not(:disabled):active { opacity: 0.86; transform: scale(0.98); }

/* OTP code boxes + resend button (authorize 2FA screens) */
.otp-group { display: flex; gap: 9px; justify-content: center; margin-bottom: 16px; }
.otp-input { width: 46px; height: 56px; border: 2px solid #e2e8f0; border-radius: 14px; text-align: center; font-size: 22px; font-weight: 700; color: #0f172a; background: #fff; outline: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s; -webkit-appearance: none; }
.otp-input:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,0.12); transform: scale(1.05); }
.otp-input.filled { border-color: #99f6e4; background: #f0fdfa; }
.btn-send { width: 100%; height: 42px; background: #f1f5f9; color: #0f766e; border: 1.5px solid #99f6e4; border-radius: 11px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 16px; transition: background 0.15s; }
.btn-send:hover { background: #ccfbf1; }
.btn-send:disabled { opacity: 0.55; cursor: not-allowed; }

/* Info note + success status box (authorize reset / unlock screens) */
.note { padding: 14px 16px; border-radius: 12px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.note-info { background: #f0fdfa; border: 1px solid #99f6e4; }
.note-text { font-size: 13px; color: #0f766e; line-height: 1.5; }
.status-box { padding: 18px; border-radius: 14px; background: #f0fdf4; border: 1px solid #86efac; display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; }
.status-box-text { font-size: 14px; color: #15803d; line-height: 1.5; font-weight: 500; }

/* Per-field validation message + password strength meter (forgotten_reset) */
.field-error { font-size: 12px; color: #dc2626; margin: -8px 0 10px 4px; }
.strength-wrap { height: 4px; border-radius: 4px; background: #e2e8f0; margin: -6px 0 16px; overflow: hidden; }
.strength-wrap > div { height: 100%; width: 0; transition: width 0.2s, background 0.2s; }

/* Secondary links row under the form */
.auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 20px; padding: 14px 0 0; }
.auth-links a { font-size: 13px; color: #0f766e; font-weight: 600; text-decoration: none; }

/* ── Tablet / desktop (>=768px): one native page serves every device ──
   The mobile layout is an edge-to-edge, full-height phone frame. On larger
   screens the SAME markup becomes a centered floating card: the brand
   gradient moves to the page background, the hero + form become the card's
   top and bottom halves. No template changes — layout only. */
@media (min-width: 768px) {
  body { background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #ede9fe 100%); }
  .auth-page { max-width: 460px; min-height: 100vh; justify-content: center; padding: 48px 24px; }
  .auth-header { border-radius: 24px 24px 0 0; padding: 44px 24px 64px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18); }
  .auth-body { flex: 0 0 auto; border-radius: 0 0 24px 24px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18); }
}
