/* =============================================
   AGENTIUM — Auth Pages Styles
   ============================================= */

/* --- Auth Page Layout --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 40px;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  padding: 40px;
  border-radius: var(--radius);
}

@media (max-width: 480px) {
  .auth-card {
    padding: 24px;
  }
  
  .auth-main {
    padding: 80px 16px 24px;
  }
}

/* --- Auth Header --- */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--text-muted);
}

/* --- Form Styles --- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-white);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-family: var(--font-main);
  font-size: 15px;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(134, 102, 255, 0.15);
}

.form-input:invalid:not(:placeholder-shown) {
  border-color: #ff6b6b;
}

.form-input.error {
  border-color: #ff6b6b;
}

.form-input.success {
  border-color: var(--accent-teal);
}

.form-error {
  font-size: 12px;
  color: #ff6b6b;
  min-height: 16px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Password Input --- */
.password-input-wrapper {
  position: relative;
}

.password-input-wrapper .form-input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.3s;
}

.password-toggle:hover {
  color: var(--text-white);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* --- Password Strength --- */
.password-strength {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-fill.weak {
  width: 25%;
  background: #ff6b6b;
}

.strength-fill.fair {
  width: 50%;
  background: #ffa94d;
}

.strength-fill.good {
  width: 75%;
  background: #69db7c;
}

.strength-fill.strong {
  width: 100%;
  background: var(--accent-teal);
}

.strength-text {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 80px;
}

/* --- Form Options --- */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Checkbox --- */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.checkbox-label input:checked + .checkbox-custom {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* --- Links --- */
.forgot-link {
  font-size: 14px;
  color: var(--accent-purple);
  text-decoration: none;
  transition: color 0.3s;
}

.forgot-link:hover {
  color: var(--accent-teal);
}

.link-accent {
  color: var(--accent-purple);
  text-decoration: none;
}

.link-accent:hover {
  color: var(--accent-teal);
  text-decoration: underline;
}

/* --- Buttons --- */
.btn-full {
  width: 100%;
  margin-top: 8px;
}

.btn-loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-loading .btn-text {
  display: none;
}

.btn-loading .btn-loader {
  display: inline-block !important;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.7;
}

/* --- Telegram Button --- */
.btn-telegram {
  width: 100%;
  background: linear-gradient(135deg, #0088cc, #00a0dc);
  color: white;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.btn-telegram:hover {
  background: linear-gradient(135deg, #0077b5, #0088cc);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 136, 204, 0.3);
}

.telegram-login {
  margin-top: 0;
}

/* --- Divider --- */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-glass);
}

.auth-divider span {
  padding: 0 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Messages --- */
.auth-error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #ff6b6b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-success {
  background: rgba(68, 250, 161, 0.1);
  border: 1px solid rgba(68, 250, 161, 0.3);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--accent-teal);
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-success svg {
  flex-shrink: 0;
}

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

.auth-footer a {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  color: var(--accent-teal);
}

/* --- Animations --- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-card {
  animation: fadeIn 0.4s ease-out;
}
.otp-input { font-size: 28px; font-weight: 700; letter-spacing: 0.3em; text-align: center; }
.form-hint { font-size: 12px; color: #64748b; margin-top: 4px; display: block; }
