@charset "UTF-8";

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius: 18px;
  --shadow: 0 20px 60px -15px rgba(15, 23, 42, 0.08);
  --error: #ef4444;
  --error-bg: #fef2f2;
  --success: #10b981;
  --success-bg: #ecfdf5;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Vazirmatn", "Shabnam", Tahoma, Arial, sans-serif;
  background: radial-gradient(circle at 50% 0%, #e0f2fe 0%, #f8fafc 55%), #f8fafc;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  direction: rtl;
}

.auth-wrapper {
  width: 100%;
  max-width: 460px;
}

.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 12px;
}

.auth-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 24px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 11px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-icon-box {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  right: 14px;
  font-size: 16px;
  pointer-events: none;
  opacity: 0.8;
}

input {
  width: 100%;
  padding: 13px 44px 13px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  background: #f8fafc;
  color: var(--text-main);
}

input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.btn-toggle-pass {
  position: absolute;
  left: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  opacity: 0.6;
}
.btn-toggle-pass:hover {
  opacity: 1;
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px -4px rgba(2, 132, 199, 0.35);
  margin-top: 6px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(2, 132, 199, 0.45);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.btn-link:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

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

.link-muted {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
}
.link-muted:hover {
  color: var(--primary);
}

/* Footer & Alerts */
.form-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.alert-banner {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.alert-banner.error {
  background: var(--error-bg);
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.alert-banner.success {
  background: var(--success-bg);
  color: #047857;
  border: 1px solid #a7f3d0;
}

.otp-notify-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.otp-timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-top: 4px;
}

.timer-badge {
  color: var(--text-muted);
}

.auth-trust {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.section-title-box {
  text-align: center;
  margin-bottom: 6px;
}
.sub-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}
.sub-desc {
  font-size: 12px;
  color: var(--text-muted);
}

[hidden] {
  display: none !important;
}
