:root {
  --primary: #1e3354;
  --primary-light: #2a4a73;
  --bg: #f4f5fa;
  --white: #ffffff;
  --border: #e4e6ef;
  --text: #2f2b3d;
  --text-muted: #8b8ca0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.auth-layout {
  display: flex;
  min-height: 100vh;
}

.auth-cover {
  position: relative;
  display: none;
  overflow: hidden;
  background: var(--primary);
}

@media (min-width: 768px) {
  .auth-layout {
    flex-direction: row;
  }

  .auth-cover {
    display: block;
    flex: 0 0 65%;
    width: 65%;
    min-width: 0;
  }

  .auth-form-panel {
    flex: 0 0 35%;
    width: 35%;
    max-width: 35%;
  }
}

.auth-cover__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-cover__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
  background: linear-gradient(to top, rgba(30, 51, 84, 0.85) 0%, rgba(30, 51, 84, 0.2) 60%);
}

.auth-cover__overlay h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.auth-cover__overlay p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: var(--white);
}

.auth-form-card {
  width: 100%;
  max-width: 420px;
  padding: 0 0.5rem;
}

.auth-form-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.auth-brand__logo svg,
.auth-brand__logo img,
.auth-brand__logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.auth-brand__name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.auth-form-header h1 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.auth-form-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.auth-alert--error {
  background: #ffe2e3;
  color: #ea5455;
  border: 1px solid #f5c6cb;
}

.auth-alert--success {
  background: #dff7e9;
  color: #28c76f;
  border: 1px solid #b9f0d1;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.auth-field input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30, 51, 84, 0.12);
}

.auth-field input::placeholder {
  color: var(--text-muted);
}

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

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

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.625rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.auth-password-toggle:hover {
  color: var(--primary);
  background: rgba(30, 51, 84, 0.08);
}

.auth-password-toggle .icon-eye-off {
  display: none;
}

.auth-password-toggle.is-visible .icon-eye {
  display: none;
}

.auth-password-toggle.is-visible .icon-eye-off {
  display: block;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: -0.25rem;
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.auth-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.auth-link {
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

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

.auth-back-link {
  text-align: center;
  margin-top: 0.25rem;
}

.auth-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

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

.auth-btn:active {
  background: #172a45;
}
