:root {
  --primary: #0ea5e9; /* sky blue */
  --primary-dark: #0284c7;
  --secondary: #10b981; /* emerald */
  --accent: #f59e0b; /* amber */
  --dark: #0f172a;
  --light: #f8fafc;
  --white: #ffffff;
  --text: #334155;
  --text-light: #64748b;
  --border: #e2e8f0;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius: 0.75rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: var(--light);
  line-height: 1.6;
}

/* RTL Support */
[dir="rtl"] body { direction: rtl; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 1rem 0;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.logo { display: flex; align-items: center; gap: 0.5rem; color: var(--white); text-decoration: none; font-weight: 700; font-size: 1.25rem; }
.logo img { height: 40px; width: auto; border-radius: var(--radius); }
.nav-menu { display: flex; gap: 1.25rem; align-items: center; list-style: none; flex-wrap: wrap; }
.nav-menu a { color: var(--white); text-decoration: none; font-weight: 500; opacity: 0.9; transition: opacity .2s; }
.nav-menu a:hover, .nav-menu a.active { opacity: 1; text-decoration: underline; }
.lang-switch { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); color: var(--white); padding: .25rem .75rem; border-radius: 999px; cursor: pointer; font-size: .85rem; }

/* Mobile nav */
.menu-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-menu { display: none; width: 100%; flex-direction: column; align-items: flex-start; background: var(--primary-dark); padding: 1rem; border-radius: var(--radius); }
  .nav-menu.open { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1.2rem; border-radius: var(--radius); border: none; cursor: pointer;
  font-weight: 600; text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-warning { background: var(--warning); color: var(--dark); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-sm { padding: .35rem .75rem; font-size: .875rem; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.1rem; }

/* Cards */
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; border: 1px solid var(--border); transition: transform .2s;
}
.card:hover { transform: translateY(-3px); }
.card-img { width: 100%; height: 200px; object-fit: cover; background: linear-gradient(135deg, #0ea5e922, #10b98122); display: block; }
.card-body { padding: 1.25rem; }
.card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; color: var(--dark); }
.card-text { color: var(--text-light); font-size: .95rem; margin-bottom: .75rem; }
.card-footer { padding: .75rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }

/* Grid */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

/* Forms */
.form-group { margin-bottom: 1rem; }
label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; }
input, select, textarea {
  width: 100%; padding: .6rem .9rem; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 1rem; background: var(--white); color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,0.15); }

/* Alerts */
.alert { padding: 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
th, td { padding: .85rem 1rem; text-align: start; border-bottom: 1px solid var(--border); }
th { background: var(--primary); color: var(--white); font-weight: 600; }
tr:hover { background: #f1f5f9; }

/* Dashboard Layout */
.dashboard { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; background: var(--dark); color: var(--white); flex-shrink: 0;
  display: flex; flex-direction: column;
}
.sidebar-brand { padding: 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: .75rem; }
.sidebar-brand img { height: 36px; border-radius: var(--radius); }
.sidebar-menu { list-style: none; padding: .75rem 0; flex: 1; }
.sidebar-menu li a {
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1.25rem;
  color: rgba(255,255,255,0.8); text-decoration: none; font-size: .95rem; transition: background .2s;
}
.sidebar-menu li a:hover, .sidebar-menu li a.active { background: rgba(255,255,255,0.08); color: var(--white); }
.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: .8rem; color: rgba(255,255,255,0.5); }
.dashboard-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.dashboard-header {
  background: var(--white); padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.dashboard-body { padding: 1.5rem; overflow-y: auto; flex: 1; }

@media (max-width: 768px) {
  .sidebar { position: fixed; left: -260px; top: 0; bottom: 0; z-index: 1100; transition: left .3s; }
  .sidebar.open { left: 0; }
  .sidebar-toggle { display: block; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
}
@media (min-width: 769px) { .sidebar-toggle { display: none; } }

/* Stats */
.stats-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 1.5rem; }
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 1.25rem;
  border-left: 4px solid var(--primary); box-shadow: var(--shadow);
}
.stat-card h3 { font-size: 1.75rem; color: var(--primary-dark); margin-bottom: .25rem; }
.stat-card p { font-size: .9rem; color: var(--text-light); }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0f172a 100%);
  color: var(--white); padding: 4rem 1rem; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><path d=\"M20,50 Q40,20 50,50 T80,50\" fill=\"none\" stroke=\"rgba(255,255,255,0.08)\" stroke-width=\"2\"/></svg>');
  background-size: 120px; opacity: .6;
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero p { font-size: 1.15rem; opacity: .9; margin-bottom: 1.5rem; }

/* WhatsApp Float */
.whatsapp-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1200;
  background: #25d366; color: var(--white); width: 56px; height: 56px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.1); }
[dir="rtl"] .whatsapp-float { right: auto; left: 1.5rem; }

/* Footer */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 2rem 1rem; margin-top: 3rem; }
.site-footer a { color: rgba(255,255,255,0.9); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.d-flex { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.badge { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: capitalize; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-completed { background: #dbeafe; color: #1e40af; }

/* Star rating */
.stars { color: #f59e0b; font-size: 1.1rem; letter-spacing: .1rem; }

/* Auth pages */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e0f2fe, #f0fdf4); padding: 1rem; }
.auth-card { background: var(--white); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 420px; }
.auth-card .logo { justify-content: center; margin-bottom: 1.5rem; color: var(--primary-dark); }
.auth-card .logo img { height: 56px; }

/* Filters bar */
.filters { background: var(--white); padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem; display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.filters .form-group { margin-bottom: 0; flex: 1; min-width: 160px; }
