/* ===========================================================================
 * Dijiwa Back Office: sign-in extras
 * ---------------------------------------------------------------------------
 * The sign-in page is the design kit's login.css as shipped. This file holds
 * only the pieces this app has that the kit's template does not: the logo
 * image, the rotating tagline, the "sending your code" state, text links and
 * the code countdown. Load it after login.css.
 * =========================================================================== */

[x-cloak] { display: none !important; }
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

.login-logo img { display: block; height: 34px; width: auto; }

/* Rotating tagline: decorative, typed by a few lines of script in the layout. */
.login-tagline { display: flex; align-items: center; min-height: 1.5em; }
.login-tagline-cursor { display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; background: var(--brand); animation: login-blink 1s step-end infinite; }
@keyframes login-blink { 50% { opacity: 0; } }

/* A text link or text button: the brand colour, as for any link. */
.login-link {
  display: inline-flex; align-items: center; min-height: 24px; padding: 6px 4px;
  background: none; border: 0; border-radius: var(--radius-sm);
  color: var(--brand); font-family: inherit; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.login-link:hover { text-decoration: underline; }

.login-welcome { margin: 0 4px; font-size: 14px; color: var(--muted); }
.login-welcome strong { color: var(--ink); font-weight: 600; }
.login-remember { display: inline-flex; align-items: center; gap: 8px; margin: 0 4px; font-size: 14px; color: var(--muted-strong); cursor: pointer; }
.login-remember input { width: 16px; height: 16px; accent-color: var(--ink); }
.login-success { color: var(--pos); }

/* "Sending your code" and "could not send": centred, no panel. */
.login-sending { display: grid; gap: 14px; justify-items: center; padding: 8px 0; text-align: center; }
.login-sending h2,
.otp-heading h2 { font-size: var(--h3-size); font-weight: var(--h3-weight); letter-spacing: var(--h3-track); line-height: 1.25; }
.login-sending p,
.otp-heading p { font-size: 14px; color: var(--muted); }
.otp-heading { display: grid; gap: 6px; margin: 0 4px 4px; }
.otp-heading strong { color: var(--ink); font-weight: 600; }
.login-spinner { width: 32px; height: 32px; border: 3px solid var(--fill-3); border-top-color: var(--brand); border-radius: 50%; animation: login-spin 0.8s linear infinite; }
@keyframes login-spin { to { transform: rotate(360deg); } }

/* Code countdown inside the grey panel. */
.otp-timer .count { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.otp-timer .count.expired { color: var(--neg); }
.code-input:disabled { color: var(--faint); }

/* The stage shows one tile per module, so there can be more than the kit's
 * eight: give the extra ones a lean and an entrance slot of their own. */
.login-tile:nth-child(9)  { --tilt: -2deg;   --dx: -6px; }
.login-tile:nth-child(10) { --tilt:  2.5deg; --dx:  6px; }
.login-tile:nth-child(11) { --tilt:  1.5deg; --dx:  8px; }
.login-tile:nth-child(12) { --tilt: -3deg;   --dx: -4px; }
@media (prefers-reduced-motion: no-preference) {
  .login-tile:nth-child(9)  { --i: 11; }
  .login-tile:nth-child(10) { --i: 12; }
  .login-tile:nth-child(11) { --i: 13; }
  .login-tile:nth-child(12) { --i: 14; }
}
@media (min-width: 1024px) and (max-height: 780px) {
  .login-stage { padding-block: 28px; }
  .login-tiles { gap: 14px 24px; }
  .login-tile { padding: 12px 16px; }
}

@media (max-width: 639.98px) {
  .login-link { min-height: 44px; padding: 10px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-tagline-cursor { animation: none; opacity: 0; }
  .login-spinner { animation-duration: 2s; }
}
.login-turnstile { margin: 0 0 12px; min-height: 0; }
