/* ===== GLOBAL STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a56db;
  --primary-dark: #1e429f;
  --primary-light: #e8f0fe;
  --success: #0e9f6e;
  --error: #e02424;
  --error-light: #fde8e8;
  --warning: #ff8a00;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

html {
  direction: rtl;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', 'Arial Hebrew', Arial, sans-serif;
  background-color: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  line-height: 1.5;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.form-label .required {
  color: var(--error);
  margin-right: 2px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--gray-800);
  background-color: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  direction: ltr;
  text-align: right;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}

.form-input.error {
  border-color: var(--error);
  background-color: var(--error-light);
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(224, 36, 36, 0.15);
}

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

.field-error {
  font-size: 13px;
  color: var(--error);
  display: flex;
  align-items: center;
  gap: 4px;
}

.field-error::before {
  content: '⚠';
}

/* ===== ALERT ===== */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-error {
  background-color: var(--error-light);
  color: #9b1c1c;
  border: 1px solid #f8b4b4;
}

.alert-success {
  background-color: #def7ec;
  color: #03543f;
  border: 1px solid #84e1bc;
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* ===== UTILITY ===== */
.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
