/* =========================================
   ACCOUNTS - LOGIN PAGE
   ========================================= */

.auth-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    padding: 1.75rem 1.75rem 1.5rem;
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-badge {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.75rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.3rem;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

/* Messages */
.auth-messages {
    margin-bottom: 0.75rem;
}

.auth-alert {
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

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

.auth-alert-error,
.auth-alert-danger {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

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

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4b5563;
}

/* Reuse existing form-control classes from Django widgets */
.form-control {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #111827;
    background-color: #f9fafb;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
}

/* Remember me row */
.form-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row-between {
    justify-content: space-between;
    margin-top: 0.25rem;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}

/* The checkbox widget already has .form-check-input; make it compact */
.form-check-input,
input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    border-radius: 3px;
    border: 1px solid #d1d5db;
}

.checkbox-label {
    white-space: nowrap;
}

.hint-text {
    font-size: 0.78rem;
    color: #9ca3af;
    text-align: right;
}

/* Field errors */
.field-error {
    margin: 0;
    font-size: 0.78rem;
    color: #b91c1c;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-primary {
    background-color: #3498db;
    color: #ffffff;
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-1px);
}

.auth-submit {
    width: 100%;
    margin-top: 0.3rem;
}

/* Footer */
.auth-footer {
    margin-top: 0.85rem;
    text-align: center;
}

.auth-footer-text {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.auth-link {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .auth-page {
        padding-inline: 0.75rem;
    }

    .form-row-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .hint-text {
        text-align: left;
    }
}

/* Password field wrapper */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

/* Give room for the eye icon inside the input */
.password-field .form-control {
  padding-right: 2.5rem;
}

/* Eye toggle button */
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
}

.password-toggle:hover,
.password-toggle:focus {
  color: #111827;
  outline: none;
}

.password-toggle i {
  font-size: 0.95rem;
}
