/* نظام إدارة طلبات شركة السمو - تحسينات تصميمية */
:root {
  --primary: #FFA500;
  --primary-light: #FBBF24;
  --primary-dark: #e59400;
  --white: #FFFFFF;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-800: #1F2937;
  --success: #22c55e;
  --danger: #ef4444;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 60px;
  font-family: 'Tajawal', sans-serif;
  color: var(--gray-800);
  background-color: var(--gray-100);
}

/* Typography */
h1, .h1 { letter-spacing: -0.02em; font-weight: 800; }
h2, .h2, .card h2 { font-weight: 700; color: var(--gray-800); border-inline-start: 4px solid var(--primary); padding-inline-start: 0.75rem; }
.page-title { font-weight: 700; color: var(--gray-800); margin-bottom: 1.25rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--gray-200); }

/* Primary buttons and accents */
.btn-primary, .btn-warning {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover, .btn-warning:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--white);
  transform: translateY(-1px);
}
.btn-primary:active, .btn-warning:active, .btn-outline-primary:active {
  transform: translateY(0);
}
.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 165, 0, 0.25);
}

/* Navbar */
.navbar-brand, .nav-link {
  color: var(--gray-800) !important;
}
.navbar {
  background-color: var(--white) !important;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.navbar-brand {
  gap: 0.5rem;
}
.navbar-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin-inline-end: 4px;
}
.nav-link {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}
.nav-link:hover {
  color: var(--primary) !important;
}
.nav-link.active {
  color: var(--primary) !important;
  font-weight: 700;
  position: relative;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0.75rem;
  left: 0.75rem;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* Section headers (استمارة style) */
.section-header {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 0.6rem 1rem;
  margin: 1.25rem 0 0.75rem 0;
  font-weight: 700;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(255, 165, 0, 0.2);
}

/* Cards and forms */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--gray-200);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-md), 0 2px 4px rgba(0, 0, 0, 0.05);
}
.card .card-title,
.card h2 {
  margin-bottom: 1rem;
}
.form-label {
  color: var(--gray-800);
  font-weight: 500;
}
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--gray-200);
}
.form-control:focus {
  border-color: var(--primary-light);
}
.form-control::placeholder {
  color: #9ca3af;
}

/* Alerts */
.alert {
  border-radius: var(--radius-sm);
  border-width: 1px;
  box-shadow: var(--shadow-sm);
}
.alert-success {
  background-color: #dcfce7;
  color: #166534;
  border-color: var(--success);
}
.alert-danger {
  background-color: #fee2e2;
  color: #991b1b;
  border-color: var(--danger);
}
.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
  border-radius: var(--radius-sm);
}

/* Floating action (optional) */
.fab {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  box-shadow: 0 4px 12px rgba(255,165,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.5rem;
}
.fab:hover {
  background: var(--primary-light);
  color: var(--white);
}

/* Home page hero */
.home-hero {
  padding: 2.5rem 1.5rem 3rem;
  background: linear-gradient(165deg, rgba(255, 165, 0, 0.07) 0%, rgba(251, 191, 36, 0.03) 40%, transparent 70%);
  border-radius: var(--radius-lg);
  margin: 0 -0.25rem;
  border: 1px solid rgba(255, 165, 0, 0.12);
  box-shadow: 0 4px 20px rgba(255, 165, 0, 0.06);
  animation: fadeIn 0.5s ease-out;
}
.home-hero .display-5 {
  color: var(--gray-800);
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}
.home-logo-wrap {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-logo {
  max-width: 240px;
  max-height: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.home-logo-fallback {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border: 2px solid #86efac;
  box-shadow: 0 4px 14px rgba(255, 165, 0, 0.25);
}
.home-tagline {
  font-size: 1.05rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin-top: 2.5rem;
}
.hero-btn {
  min-width: 240px;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-btn-card {
  padding: 1.25rem 1.5rem;
  min-width: 260px;
}
.hero-icon {
  font-size: 1.5rem;
  opacity: 0.95;
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.hero-btn.btn-outline-primary {
  border: 2px solid var(--primary);
  background: transparent;
}
.hero-btn.btn-outline-primary:hover {
  border-color: var(--primary-light);
}
.hero-btn .bi {
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 576px) {
  .hero-buttons {
    flex-direction: column;
  }
  .hero-btn {
    width: 100%;
  }
}

/* Tables */
.table-responsive {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.table {
  margin-bottom: 0;
}
.table thead th {
  background: linear-gradient(180deg, var(--gray-200) 0%, #d1d5db 100%);
  color: var(--gray-800);
  font-weight: 700;
  border-bottom: 2px solid var(--gray-200);
  padding: 0.75rem 1rem;
}
.table tbody tr {
  transition: background-color 0.15s ease;
}
.table tbody tr:hover {
  background-color: rgba(255, 165, 0, 0.06);
}
.table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}
.table-items th {
  background: linear-gradient(180deg, var(--gray-200) 0%, #d1d5db 100%);
  color: var(--gray-800);
  font-weight: 700;
  padding: 0.6rem 0.5rem;
}

/* Footer */
.footer {
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-100) 100%);
  color: var(--gray-800);
  border-top: 1px solid var(--gray-200);
  padding: 1.25rem 0;
  margin-top: 2rem;
  font-size: 0.9rem;
}
.footer .container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.main-content-enter {
  animation: fadeIn 0.35s ease-out;
}
