/* لوحة تحكم الشركاء — نفس ألوان AppColors المستخدمة في تطبيق فلاتر بالحرف، عشان الهوية
   البصرية تفضل واحدة بين الموبايل والويب. */
:root {
  --primary: #101B2D;
  --secondary: #1C2011;
  --light-bg: #F5F6FA;
  --text-white: #FFFFFF;
  --text-medium: #6D7588;
  --text-dark: #1C2011;
  --success: #43A047;
  --error: #D32F2F;
  --warning: #FFA000;
  --border: #E5E7EA;
  --shadow: 0 1px 4px rgba(16, 27, 45, 0.08);

  --cat-hotel: #F2A93B;
  --cat-restaurant: #0E3B3E;
  --cat-activity: #E85D4E;
  --cat-yacht: #1E6E8C;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Cairo', -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--light-bg);
  color: var(--text-dark);
  direction: rtl;
}

a { color: inherit; text-decoration: none; }

/* ---------- Layout: sidebar + content ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--primary);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 0 20px 20px;
  font-size: 18px;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 12px;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  border-right: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-link:hover { background: rgba(255,255,255,0.06); color: var(--text-white); }

.sidebar-link.active {
  background: rgba(255,255,255,0.1);
  color: var(--text-white);
  border-right-color: var(--cat-hotel);
}

.sidebar-footer {
  padding: 12px 20px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.sidebar-logout {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--text-white);
  padding: 10px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sidebar-logout:hover { background: rgba(255,255,255,0.08); }

.content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1100px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.content-header h1 { font-size: 22px; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: var(--text-white);
}

.btn:hover { opacity: 0.92; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-danger { background: var(--error); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ---------- Cards / forms ---------- */
.card {
  background: var(--text-white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-medium);
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-dark);
  background: var(--text-white);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
}

.field-hint { font-size: 12px; color: var(--text-medium); margin-top: 4px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-medium);
  background: var(--text-white);
  cursor: pointer;
}

.chip.selected { background: var(--primary); border-color: var(--primary); color: var(--text-white); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success { background: rgba(67,160,69,0.12); color: var(--success); }
.badge-warning { background: rgba(255,160,0,0.14); color: var(--warning); }
.badge-error { background: rgba(211,47,47,0.12); color: var(--error); }
.badge-neutral { background: rgba(109,117,136,0.12); color: var(--text-medium); }

/* ---------- Lists ---------- */
.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--text-white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.list-row-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--light-bg);
  flex-shrink: 0;
}

.list-row-main { flex: 1; min-width: 0; }
.list-row-title { font-weight: 700; font-size: 15px; }
.list-row-sub { font-size: 13px; color: var(--text-medium); margin-top: 2px; }
.list-row-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* ---------- Photo gallery ---------- */
.photo-grid { display: flex; flex-wrap: wrap; gap: 10px; }

.photo-thumb {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
}

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

.photo-thumb .remove-btn {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(211,47,47,0.9);
  color: #fff;
  border: none;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.photo-add-tile {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  border: 1.5px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--text-medium);
  cursor: pointer;
  background: var(--text-white);
}

/* ---------- Empty state / loader ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-medium); }
.loader { text-align: center; padding: 40px; color: var(--text-medium); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 10px;
  color: var(--text-white);
  font-size: 14px;
  font-weight: 600;
  z-index: 999;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.toast-success { background: var(--success); }
.toast-error { background: var(--error); }

/* ---------- Public landing page (index.html — no sidebar) ---------- */
.public-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: var(--primary);
}

.public-header .brand { color: var(--text-white); font-weight: 800; font-size: 18px; }

.public-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px;
  text-align: center;
}

.public-hero h1 { font-size: 30px; margin-bottom: 12px; }
.public-hero p { color: var(--text-medium); font-size: 15px; line-height: 1.8; }

.public-footer {
  background: var(--secondary);
  color: rgba(255,255,255,0.8);
  padding: 28px 32px;
  text-align: center;
  font-size: 13px;
  margin-top: 40px;
}

.public-footer .btn { margin-top: 12px; }

/* ---------- Auth pages ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--text-white);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(16,27,45,0.12);
  padding: 32px 28px;
}

.auth-card h1 { font-size: 20px; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--text-medium); font-size: 13px; margin-bottom: 24px; }

/* ---------- Dialogs (native <dialog> — إعادة استخدام أسلوب .card/.field نفسه) ---------- */
dialog {
  border: none;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(16, 27, 45, 0.18);
  width: 100%;
  max-width: 440px;
}

dialog::backdrop { background: rgba(16, 27, 45, 0.45); }
dialog h2 { margin-top: 0; font-size: 16px; }
dialog .dialog-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ---------- Gallery strip (شريط أفقي — صورة غلاف/معرض) ---------- */
.gallery-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cover-drop {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  background: var(--light-bg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-medium);
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; overflow-x: auto; padding: 10px; }
  .sidebar-brand { display: none; }
  .sidebar-nav { flex-direction: row; }
  .sidebar-link { border-right: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .sidebar-link.active { border-bottom-color: var(--cat-hotel); }
  .sidebar-footer { border-top: none; padding: 0 0 0 10px; }
  .content { padding: 20px; }
}
