/* =============================================
   HRDF Authentication Styles
   Modern, Premium Design for Login, Register, OTP
   ============================================= */

:root {
  --auth-blue: #005187;
  --auth-blue-dark: #003d66;
  --auth-blue-light: #e8f2f9;
  --auth-green: #00AC65;
  --auth-orange: #DF7C2E;
  --auth-orange-dark: #c8621e;
  --auth-white: #ffffff;
  --auth-gray: #f8fafc;
  --auth-text: #1a2e44;
  --auth-text-light: #64748b;
  --auth-radius: 20px;
  --auth-shadow: 0 20px 50px rgba(0, 81, 135, 0.1);
  --auth-transition: all 0.3s ease;
}

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

body.auth-body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--auth-gray);
  color: var(--auth-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  direction: rtl;
  background-image: radial-gradient(circle at 0% 0%, rgba(0, 81, 135, 0.05) 0%, transparent 50%),
                    radial-gradient(circle at 100% 100%, rgba(223, 124, 46, 0.05) 0%, transparent 50%);
}

.auth-container {
  width: 100%;
  max-width: 480px;
  animation: authFadeIn 0.6s ease-out;
}

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

.auth-card {
  background: var(--auth-white);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 81, 135, 0.05);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 6px;
  background: linear-gradient(to left, var(--auth-blue), var(--auth-orange));
}

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

.auth-logo {
  height: 64px;
  margin-bottom: 24px;
  transition: transform var(--auth-transition);
}

.auth-logo:hover {
  transform: scale(1.05);
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--auth-blue);
  margin-bottom: 8px;
}

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

/* Form Styles */
.auth-form-group {
  margin-bottom: 24px;
}

.auth-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--auth-text);
  margin-bottom: 10px;
  padding-right: 4px;
}

.auth-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
  background: var(--auth-gray);
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--auth-text);
  transition: var(--auth-transition);
}

.auth-input:focus {
  outline: none;
  background: var(--auth-white);
  border-color: var(--auth-blue-light);
  box-shadow: 0 0 0 4px rgba(0, 81, 135, 0.08);
}

textarea.auth-input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.auth-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 18px;
  padding-left: 40px;
}

/* Buttons */
.auth-btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--auth-blue);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--auth-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-btn-primary:hover {
  background: var(--auth-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 81, 135, 0.2);
}

.auth-btn-secondary {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--auth-blue);
  border: 2px solid var(--auth-blue-light);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--auth-transition);
  margin-top: 12px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.auth-btn-secondary:hover {
  background: var(--auth-blue-light);
  border-color: var(--auth-blue);
}

/* Links & Utilities */
.auth-links {
  margin-top: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-link {
  color: var(--auth-blue);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--auth-transition);
}

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

.auth-alert {
  padding: 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  border-right: 4px solid;
}

.auth-alert-info {
  background: var(--auth-blue-light);
  color: var(--auth-blue);
  border-right-color: var(--auth-blue);
}

.auth-alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border-right-color: #ef4444;
}

.auth-alert-success {
  background: #dcfce7;
  color: #166534;
  border-right-color: #22c55e;
}

/* Back to Home */
.auth-back-home {
  position: absolute;
  top: 40px;
  right: 40px;
}

.auth-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--auth-text-light);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--auth-transition);
}

.auth-back-btn:hover {
  color: var(--auth-blue);
}

/* Responsive */
@media (max-width: 576px) {
  .auth-body { padding: 15px; align-items: flex-start; padding-top: 60px; }
  .auth-card { padding: 32px 24px; }
  .auth-back-home { top: 20px; right: 20px; }
}
