:root {
  --auth-bg: #f3f5f8;
  --auth-surface: rgba(255, 255, 255, 0.88);
  --auth-card: #ffffff;
  --auth-text: #111827;
  --auth-muted: #6b7280;
  --auth-border: #e5e7eb;
  --auth-primary: #4f46e5;
  --auth-primary-dark: #4338ca;
  --auth-danger-bg: #fef2f2;
  --auth-danger-text: #b91c1c;
  --auth-success-bg: #ecfdf5;
  --auth-success-text: #15803d;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.10);
  --radius-xl: 28px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.10), transparent 35%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.08), transparent 30%),
    var(--auth-bg);
  color: var(--auth-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}

.auth-shell {
  width: 100%;
  max-width: 430px;
}

.auth-card {
  background: var(--auth-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-top: 35px;
  margin-bottom: 25px;
}

.auth-card__body {
  padding: 24px 20px 22px;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  margin-bottom: 22px;
}

.auth-brand__logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--admin-primary);
  padding: 12px;
  object-fit: contain;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

.auth-brand__eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auth-muted);
}

.auth-title {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
}

.auth-subtitle {
  margin: 8px auto 0;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--auth-muted);
}

.auth-alert {
  border: 0;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

.auth-alert--danger {
  background: var(--auth-danger-bg);
  color: var(--auth-danger-text);
}

.auth-alert--success {
  background: var(--auth-success-bg);
  color: var(--auth-success-text);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-label {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.auth-input {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid var(--auth-border);
  background: #fff;
  padding: 0 16px;
  font-size: 16px;
  color: var(--auth-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

.auth-input:focus {
  border-color: rgba(79, 70, 229, 0.55);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}

.auth-input[disabled] {
  background: #f9fafb;
  color: #6b7280;
}

.auth-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.auth-link {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 700;
}

.auth-link:hover {
  color: var(--auth-primary-dark);
  text-decoration: none;
}

.auth-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: var(--auth-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.22);
  transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.auth-button:hover {
  background: var(--auth-primary-dark);
}

.auth-button:active {
  transform: scale(0.985);
}

.auth-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--auth-muted);
}

.auth-footer small {
  font-size: 14px;
}

.auth-card__bottom {
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
  background: rgba(249, 250, 251, 0.75);
  text-align: center;
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 480px) {
  .auth-screen {
    padding: 14px 12px calc(20px + env(safe-area-inset-bottom));
    align-items: stretch;
  }

  .auth-shell {
    max-width: none;
    display: flex;
    align-items: center;
  }

  .auth-card {
    width: 100%;
    min-height: calc(100vh - 28px);
    border-radius: 28px;
  }

  .auth-card__body {
    padding: 22px 16px 20px;
  }

  .auth-brand {
    margin-bottom: 18px;
  }

  .auth-brand__logo {
    width: 64px;
    height: 64px;
    border-radius: 20px;
  }

  .auth-title {
    font-size: 25px;
  }
}