/* ==================== AUTH (login / register) ==================== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --error: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
}

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

.auth-body {
  font-family: 'Times New Roman', Times, serif;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #ede9fe 100%);
  min-height: 100vh;
  display: flex; flex-direction: column;
  color: var(--gray-900);
}

.auth-header {
  padding: 18px 28px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}
.auth-header .brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--gray-900);
}
.auth-header .brand-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  box-shadow: 0 2px 6px rgba(5,150,105,.15);
  object-fit: contain;
  display: block;
}
.auth-header .brand-text { font-size: 20px; font-weight: 800; }

.auth-main {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 30px 18px;
}

.auth-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.15), 0 4px 12px -4px rgba(0,0,0,0.05);
  padding: 36px 36px;
  width: 100%; max-width: 420px;
}
.auth-card-wide { max-width: 720px; }

.auth-title { text-align: center; margin-bottom: 26px; }
.auth-title h1 {
  font-size: 28px; font-weight: 800; margin-bottom: 6px;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.auth-title p { color: var(--gray-500); font-size: 14px; }
.auth-title a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-title a:hover { text-decoration: underline; }

.alert {
  padding: 11px 14px; border-radius: 10px; font-size: 14px;
  margin-bottom: 14px; border-left: 4px solid;
}
.alert-error   { background: #fef2f2; color: #991b1b; border-color: var(--error); }
.alert-success { background: #f0fdf4; color: #14532d; border-color: var(--success); }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: var(--primary); }

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

.auth-section {
  margin-top: 6px; margin-bottom: -2px;
  font-size: 13px; font-weight: 700; color: var(--gray-700);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding-bottom: 8px; border-bottom: 1px solid var(--gray-200);
}

.auth-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .auth-grid2 { grid-template-columns: 1fr; } }

.form-cell { display: flex; flex-direction: column; gap: 6px; }
.form-cell label {
  font-size: 13px; font-weight: 600; color: var(--gray-700);
}
.form-cell label .req { color: var(--error); }
.form-cell input, .form-cell select {
  padding: 11px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 10px;
  font: inherit; font-size: 14px;
  transition: all 0.2s;
  background: #fff;
}
.form-cell input:focus, .form-cell select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-cell small { color: var(--gray-500); font-size: 12px; }

.btn-auth {
  margin-top: 8px; padding: 13px;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  color: #fff; border: none; border-radius: 12px;
  font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: transform 0.1s, box-shadow 0.2s;
}
.btn-auth:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(37,99,235,0.4); }
.btn-auth:active { transform: translateY(0); }

.auth-divider {
  margin: 22px 0 18px;
  display: flex; align-items: center; gap: 10px;
  color: var(--gray-500); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--gray-200);
}

.auth-admin-link {
  display: block; text-align: center;
  padding: 11px;
  border: 1.5px solid var(--gray-300); border-radius: 10px;
  text-decoration: none; color: var(--gray-700);
  font-size: 14px; font-weight: 600;
  transition: all 0.2s;
}
.auth-admin-link:hover { border-color: var(--gray-500); background: var(--gray-50); }

.auth-back {
  display: block; text-align: center; margin-top: 18px;
  color: var(--gray-500); font-size: 13px; text-decoration: none;
}
.auth-back:hover { color: var(--gray-700); }

.auth-note {
  margin-top: 14px;
  padding: 11px 14px;
  background: #eff6ff;
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  font-size: 13px; color: #1e40af;
  line-height: 1.5;
}


/* ====== Parol ko'rsatish (eye toggle) ====== */
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input { width: 100%; padding-right: 44px; }
.pwd-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  background: transparent; border: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: #6b7280; cursor: pointer; padding: 0;
  border-radius: 8px;
}
.pwd-eye:hover { color: #374151; background: rgba(0,0,0,.04); }
.pwd-eye svg { width: 20px; height: 20px; }

.auth-hint {
  text-align: center; margin: 18px 0 6px;
  color: #6b7280; font-size: 13px;
}

/* ====== Rol tanlash kartochkalari ====== */
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 8px;
}
@media (max-width: 700px) {
  .role-grid { grid-template-columns: 1fr; }
}
.role-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 18px;
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: 16px;
  text-decoration: none;
  color: var(--gray-900);
  transition: all .2s;
  text-align: center;
  cursor: pointer;
}
.role-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -10px rgba(0,0,0,.12);
}
.role-icon {
  font-size: 42px;
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  background: var(--gray-50);
}
.role-name { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.role-desc { font-size: 13px; color: var(--gray-500); line-height: 1.4; }
.role-card.role-user   { border-color: #93c5fd; }
.role-card.role-user .role-icon   { background: #eff6ff; }
.role-card.role-user:hover        { border-color: #2563eb; background: #f0f7ff; }
.role-card.role-doctor { border-color: #86efac; }
.role-card.role-doctor .role-icon { background: #f0fdf4; }
.role-card.role-doctor:hover      { border-color: #16a34a; background: #f3fdf6; }
.role-card.role-admin  { border-color: #c4b5fd; }
.role-card.role-admin .role-icon  { background: #f5f3ff; }
.role-card.role-admin:hover       { border-color: #7c3aed; background: #faf7ff; }

.auth-role-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700;
  margin-bottom: 14px;
}
.auth-role-badge.role-user   { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }
.auth-role-badge.role-doctor { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.auth-role-badge.role-admin  { background: #f5f3ff; color: #6b21a8; border: 1px solid #c4b5fd; }
.role-badge-ico { font-size: 16px; }

.auth-forgot {
  display: block; text-align: center;
  margin: 14px 0 4px;
  color: var(--primary); font-size: 14px; font-weight: 600;
  text-decoration: none;
}
.auth-forgot:hover { text-decoration: underline; }

/* ============= AUTH HEADER LANGUAGE SWITCHER ============= */
.auth-header { position: relative; }
.auth-lang {
  position: absolute;
  top: 14px;
  right: 18px;
  display: inline-flex;
  gap: 4px;
}
.auth-lang a {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  transition: background .12s;
}
.auth-lang a:hover { background: #e2e8f0; }
.auth-lang a.active {
  background: #16a34a;
  color: #fff;
  border-color: #15803d;
}
