/* ==============================================================================
   Greenta Super Admin - Design System & Stylesheet (Emerald Luxury Theme)
   ============================================================================== */

:root {
  --bg-dark: #060e0a;
  --bg-card: rgba(12, 25, 18, 0.82);
  --bg-card-hover: rgba(16, 33, 24, 0.92);
  --bg-input: rgba(6, 17, 11, 0.75);
  
  --primary: #10b981;
  --primary-light: #34d399;
  --primary-dark: #059669;
  --primary-glow: rgba(16, 185, 129, 0.35);

  --accent-gold: #f59e0b;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  
  --text-main: #f3fdf8;
  --text-muted: #8ca397;
  --text-dim: #546b5e;
  
  --border-light: rgba(52, 211, 153, 0.18);
  --border-focus: rgba(52, 211, 153, 0.6);
  --border-glass: rgba(255, 255, 255, 0.08);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --shadow-card: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 35px rgba(16, 185, 129, 0.15);
  --shadow-btn: 0 10px 25px -5px rgba(16, 185, 129, 0.45);

  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-en: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-ar);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* ------------------------------------------------------------------------------
   خلفية الملعب المعشب والتأثيرات الحركية
   ------------------------------------------------------------------------------ */
.stadium-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 50% 10%, rgba(16, 185, 129, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(5, 150, 105, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #07150e 0%, #040806 100%);
  overflow: hidden;
}

/* توهجات النيون الحركية */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  animation: floatOrb 16s ease-in-out infinite alternate;
}
.glow-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.05) 70%, transparent 100%);
  top: -150px;
  left: -150px;
}
.glow-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.18) 0%, rgba(16, 185, 129, 0.03) 70%, transparent 100%);
  bottom: -100px;
  right: -100px;
  animation-delay: -8s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.1); }
  100% { transform: translate(-30px, -20px) scale(0.95); }
}

/* خطوط تكتيكات ملعب كرة القدم */
.pitch-tactics-lines {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: 
    radial-gradient(circle at center, transparent 150px, rgba(52, 211, 153, 0.4) 151px, transparent 153px),
    linear-gradient(to right, rgba(52, 211, 153, 0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(52, 211, 153, 0.25) 1px, transparent 1px);
  background-size: 100% 100%, 120px 120px, 120px 120px;
}

/* ------------------------------------------------------------------------------
   الحاوية والبطاقة الرئيسية (Glass Card)
   ------------------------------------------------------------------------------ */
.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 510px;
  padding: 24px 18px;
  margin: auto;
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.login-card {
  padding: 40px 36px 30px;
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px 22px;
  }
}

/* ------------------------------------------------------------------------------
   ترويسة البطاقة والشعار
   ------------------------------------------------------------------------------ */
.card-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-badge-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.brand-logo-wrapper {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  box-shadow: 0 10px 30px -4px rgba(16, 185, 129, 0.4), 0 0 15px rgba(52, 211, 153, 0.2);
  border: 1.5px solid rgba(52, 211, 153, 0.35);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #081a11;
}

.brand-logo-wrapper:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 35px -3px rgba(16, 185, 129, 0.55), 0 0 22px rgba(52, 211, 153, 0.4);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title {
  font-size: 1.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.brand-title span {
  font-family: var(--font-en);
  font-weight: 700;
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.4rem;
  margin-right: 6px;
}

.brand-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 6px;
}

/* ------------------------------------------------------------------------------
   الحقول والنموذج
   ------------------------------------------------------------------------------ */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.field-hint {
  font-size: 0.78rem;
  color: var(--primary-light);
  font-weight: 400;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
}

.input-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(8, 22, 15, 0.9);
}

.input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 13px 44px 13px 14px;
  color: #ffffff;
  font-family: var(--font-ar);
  font-size: 0.98rem;
}

.phone-wrapper {
  direction: ltr;
}

.phone-wrapper input {
  padding: 13px 14px;
  font-family: var(--font-en);
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-align: center;
}

.phone-wrapper input::placeholder {
  text-align: center;
  letter-spacing: 1px;
}

#password,
#newPassword,
#confirmNewPassword {
  text-align: center;
  letter-spacing: 2.5px;
  padding: 13px 44px 13px 0;
}

#password::placeholder,
#newPassword::placeholder,
#confirmNewPassword::placeholder {
  text-align: center;
  letter-spacing: 1.5px;
}

.phone-wrapper .country-prefix {
  border-left: none;
  border-right: 1px solid var(--border-light);
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding: 0 14px;
}

.input-wrapper input::placeholder {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-family: var(--font-ar);
  letter-spacing: normal;
}

.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color 0.2s ease;
}
.input-wrapper:focus-within .input-icon {
  color: var(--primary-light);
}
.input-icon svg {
  width: 19px;
  height: 19px;
}

/* رمز كود ليبيا في حقل الهاتف */
.country-prefix {
  padding: 0 14px;
  border-left: 1px solid var(--border-light);
  color: var(--primary-light);
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.95rem;
  direction: ltr;
  user-select: none;
  display: flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.08);
  height: 100%;
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

/* زر إظهار وإخفاء كلمة المرور */
.toggle-password-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.toggle-password-btn:hover {
  color: var(--text-main);
}
.toggle-password-btn svg {
  width: 20px;
  height: 20px;
}

/* ------------------------------------------------------------------------------
   خيارات تذكرني واستعادة كلمة المرور
   ------------------------------------------------------------------------------ */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
  font-size: 0.88rem;
}

.remember-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.remember-checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}
.custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.custom-checkbox svg {
  width: 14px;
  height: 14px;
  color: #ffffff;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset 0.25s ease;
}
.remember-checkbox-label input:checked ~ .custom-checkbox {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}
.remember-checkbox-label input:checked ~ .custom-checkbox svg {
  stroke-dashoffset: 0;
}
.label-text {
  color: var(--text-muted);
  transition: color 0.2s;
}
.remember-checkbox-label:hover .label-text {
  color: var(--text-main);
}

.forgot-link {
  background: none;
  border: none;
  color: var(--primary-light);
  font-family: var(--font-ar);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  text-decoration: none;
}
.forgot-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ------------------------------------------------------------------------------
   الأزرار التفاعلية
   ------------------------------------------------------------------------------ */
.btn-submit {
  position: relative;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  font-family: var(--font-ar);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -3px rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
}
.btn-submit:active {
  transform: translateY(0);
}
.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.btn-content {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}
.btn-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
}
.btn-submit:hover .btn-arrow {
  transform: translateX(-5px);
}

.btn-secondary {
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-family: var(--font-ar);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* مؤشر التحميل Spinner */
.btn-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ------------------------------------------------------------------------------
   التذييل ومعلومات الأمان
   ------------------------------------------------------------------------------ */
.card-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.security-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}
.security-indicator svg {
  width: 14px;
  height: 14px;
  color: var(--primary-light);
}

/* ------------------------------------------------------------------------------
   النوافذ المنبثقة (Modals)
   ------------------------------------------------------------------------------ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: all 0.3s ease;
}
.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  padding: 32px 28px;
  position: relative;
  transform: translateY(0);
  transition: transform 0.3s ease;
}
.modal-overlay.hidden .modal-card {
  transform: translateY(20px);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  left: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}
.modal-close-btn svg {
  width: 18px;
  height: 18px;
}

.modal-header {
  text-align: center;
  margin-bottom: 22px;
}
.modal-icon {
  width: 50px;
  height: 50px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}
.modal-icon svg {
  width: 24px;
  height: 24px;
}
.modal-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.modal-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-form.hidden {
  display: none;
}

.otp-notice-box {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--primary-light);
  text-align: center;
}
.otp-input {
  letter-spacing: 6px;
  font-size: 1.25rem !important;
  font-family: var(--font-en) !important;
  text-align: center;
  font-weight: 700;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  color: #fff;
  width: 100%;
}

.otp-timer-wrapper {
  text-align: center;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.otp-timer-notice {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.timer-digits {
  font-family: var(--font-en);
  font-size: 1rem;
  color: #34d399;
  letter-spacing: 1px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.resend-btn {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-light);
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.resend-btn:hover {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.12);
  text-decoration: underline;
}

/* بطاقة الترحيب بعد الدخول */
.welcome-card {
  text-align: center;
}
.success-checkmark {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin: 0 auto 16px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.45);
}
.success-checkmark svg {
  width: 34px;
  height: 34px;
}
.welcome-card h2 {
  font-size: 1.55rem;
  margin-bottom: 6px;
}
.welcome-greeting {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}
.admin-details-card {
  background: rgba(6, 17, 11, 0.85);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: right;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}
.detail-label {
  color: var(--text-muted);
}
.detail-val {
  font-weight: 700;
  color: #ffffff;
}
.role-highlight {
  color: var(--primary-light);
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}
.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ------------------------------------------------------------------------------
   إشعارات التوست (Toast Notifications)
   ------------------------------------------------------------------------------ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  animation: slideToastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.toast-error {
  background: rgba(36, 11, 14, 0.92);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.toast.toast-success {
  background: rgba(8, 28, 18, 0.92);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}
.toast.toast-info {
  background: rgba(11, 23, 38, 0.92);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}
.toast svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
@keyframes slideToastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hidden {
  display: none !important;
}
