/* WorkTime — auth pages (login, reset, …) */

:root {
  --wt-primary: #4f46e5;
  --wt-primary-hover: #4338ca;
  --wt-primary-soft: rgba(79, 70, 229, 0.12);
  --wt-surface: #ffffff;
  --wt-bg: #f1f5f9;
  --wt-text: #0f172a;
  --wt-muted: #64748b;
  --wt-border: #e2e8f0;
  --wt-danger: #ef4444;
  --wt-radius: 14px;
  --wt-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.12);
  --wt-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.auth-body {
  min-height: 100%;
  margin: 0;
  font-family: var(--wt-font);
  color: var(--wt-text);
  background: var(--wt-bg);
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .auth-shell {
    grid-template-columns: minmax(320px, 42%) 1fr;
  }
}

/* Brand panel */
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 45%, #4f46e5 100%);
  color: #fff;
  overflow: hidden;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.35) 0%, transparent 40%);
  pointer-events: none;
}

.auth-brand > * {
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.auth-logo-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-size: 1.1rem;
}

.auth-brand-copy {
  max-width: 22rem;
  margin-top: auto;
  padding-top: 2rem;
}

.auth-brand-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.auth-brand-copy p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.auth-brand-footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Form area */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  box-shadow: var(--wt-shadow);
}

.auth-card-header {
  margin-bottom: 1.75rem;
}

.auth-card-header h2 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-card-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--wt-muted);
  line-height: 1.5;
}

/* Form controls */
.auth-field {
  margin-bottom: 1.15rem;
}

.auth-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wt-text);
}

.auth-input-wrap {
  position: relative;
}

.auth-input {
  display: block;
  width: 100%;
  padding: 0.72rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--wt-text);
  background: #fff;
  border: 1.5px solid var(--wt-border);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--wt-primary);
  box-shadow: 0 0 0 3px var(--wt-primary-soft);
}

.auth-input-wrap .auth-input {
  padding-right: 2.75rem;
}

.auth-toggle-pw {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--wt-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.auth-toggle-pw:hover {
  color: var(--wt-text);
  background: var(--wt-bg);
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.35rem;
}

.auth-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--wt-primary);
  cursor: pointer;
}

.auth-check label {
  margin: 0;
  font-size: 0.88rem;
  color: var(--wt-muted);
  cursor: pointer;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.78rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--wt-primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.auth-btn:hover {
  background: var(--wt-primary-hover);
}

.auth-btn:active {
  transform: scale(0.99);
}

.auth-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--wt-text);
  text-decoration: none;
  background: transparent;
  border: 1.5px solid var(--wt-border);
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}

.auth-btn-outline:hover {
  background: var(--wt-bg);
  border-color: #cbd5e1;
  color: var(--wt-text);
}

.auth-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--wt-primary);
  text-decoration: none;
  transition: color 0.15s;
}

.auth-link:hover {
  color: var(--wt-primary-hover);
}

.auth-footer-link {
  margin-top: 1.35rem;
  text-align: center;
  font-size: 0.88rem;
}

.auth-validation,
.field-validation-error,
.validation-summary-errors {
  font-size: 0.82rem;
  color: var(--wt-danger);
}

.validation-summary-errors ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.auth-alert {
  padding: 0.75rem 0.9rem;
  margin-bottom: 1.15rem;
  font-size: 0.85rem;
  line-height: 1.45;
  border-radius: 10px;
}

.auth-alert-warning {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.auth-alert-info {
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.auth-alert-success {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.auth-success-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  background: var(--wt-primary-soft);
  border-radius: 50%;
  color: var(--wt-primary);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
}

/* Mobile: compact brand strip */
@media (max-width: 991.98px) {
  .auth-brand {
    min-height: auto;
    padding: 1.25rem 1.5rem;
  }

  .auth-brand-copy,
  .auth-brand-footer {
    display: none;
  }

  .auth-main {
    align-items: flex-start;
    padding-top: 1.5rem;
  }

  .auth-card {
    box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.1);
  }
}
