/* Safary Sigiriya — Premium Styles */

:root {
  --gold-50: #fdf8ee;
  --gold-100: #faf0d7;
  --gold-200: #f5e0ae;
  --gold-300: #edc97a;
  --gold-400: #e4b24a;
  --gold-500: #c9a84c;
  --gold-600: #a0781e;
  --gold-700: #7d5a15;
  --sand-100: #f5f0e8;
  --sand-200: #ebe0cc;
  --dark-800: #1a1a2e;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--sand-100);
  color: #333;
  min-height: 100vh;
}

/* Typography */
.font-serif { font-family: 'Playfair Display', Georgia, serif; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--sand-100); }
::-webkit-scrollbar-thumb { background: var(--gold-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-500); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse-gold { 0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4); } 50% { box-shadow: 0 0 0 8px rgba(201, 168, 76, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { animation: fadeIn 0.4s ease-out; }
.slide-in { animation: slideIn 0.3s ease-out; }
.animate-spin { animation: spin 1s linear infinite; }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #c9a84c 0%, #a0781e 100%);
  color: white;
  padding: 12px 28px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(201, 168, 76, 0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: transparent;
  color: var(--gold-600);
  padding: 11px 28px;
  border-radius: 30px;
  border: 2px solid var(--gold-500);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-secondary:hover { background: var(--gold-50); transform: translateY(-1px); }

.btn-dark {
  background: var(--dark-800);
  color: white;
  padding: 12px 28px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-dark:hover { background: #16213e; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
.btn-success { background: linear-gradient(135deg, #22c55e, #16a34a); }

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.card-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 20px 24px;
}
.card-body { padding: 24px; }

/* Form elements */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e8d5a3;
  border-radius: 10px;
  font-size: 15px;
  color: #333;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}
.form-input:focus { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15); }
.form-input::placeholder { color: #aaa; }
.form-input:disabled { background: #f9f9f9; color: #999; }

select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9a84c' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

textarea.form-input { resize: vertical; min-height: 100px; }

/* Navigation */
.navbar {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.navbar-logo {
  font-family: 'Playfair Display', serif;
  color: var(--gold-500);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-logo span { color: white; font-size: 14px; font-family: Inter; font-weight: 300; letter-spacing: 1px; }
.navbar-links { display: flex; align-items: center; gap: 8px; }
.navbar-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
}
.navbar-link:hover { color: var(--gold-400); background: rgba(255,255,255,0.05); }
.navbar-link.active { color: var(--gold-400); background: rgba(201, 168, 76, 0.1); }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-new { background: #dbeafe; color: #1d4ed8; }
.badge-confirmed { background: #d1fae5; color: #065f46; }
.badge-invoice { background: #fef9c3; color: #854d0e; }
.badge-prepaid { background: #e0e7ff; color: #3730a3; }
.badge-progress { background: #fce7f3; color: #9d174d; }
.badge-completed { background: #dcfce7; color: #14532d; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: white; border-radius: 20px; width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
}
.modal-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 1;
}
.modal-title { color: var(--gold-400); font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 600; }
.modal-close {
  color: rgba(255,255,255,0.6); background: none; border: none;
  cursor: pointer; font-size: 20px; padding: 4px; transition: color 0.2s;
}
.modal-close:hover { color: white; }
.modal-body { padding: 24px; }

/* Toast notifications */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: white; border-radius: 12px; padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 10px;
  min-width: 280px; max-width: 400px; animation: slideIn 0.3s ease;
  border-left: 4px solid var(--gold-500);
}
.toast.success { border-color: #22c55e; }
.toast.error { border-color: #ef4444; }
.toast.info { border-color: #3b82f6; }

/* Section headers */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: #1a1a2e;
  margin-bottom: 6px;
}
.section-subtitle { color: #888; font-size: 15px; margin-bottom: 28px; }

/* Service cards */
.service-card {
  background: white; border-radius: 16px; padding: 24px;
  border: 2px solid transparent; cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  text-align: center;
}
.service-card:hover { border-color: var(--gold-400); box-shadow: 0 8px 30px rgba(201, 168, 76, 0.2); transform: translateY(-3px); }
.service-card.selected { border-color: var(--gold-500); background: var(--gold-50); box-shadow: 0 8px 30px rgba(201, 168, 76, 0.25); }
.service-icon { font-size: 36px; margin-bottom: 12px; display: block; }
.service-name { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 600; color: #1a1a2e; }
.service-desc { font-size: 13px; color: #888; margin-top: 6px; line-height: 1.5; }

/* Hero section */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-title { font-family: 'Playfair Display', serif; font-size: clamp(28px, 5vw, 48px); color: white; margin-bottom: 12px; position: relative; }
.hero-title span { color: var(--gold-400); }
.hero-subtitle { color: rgba(255,255,255,0.7); font-size: clamp(14px, 2.5vw, 18px); max-width: 600px; margin: 0 auto 32px; position: relative; line-height: 1.6; }

/* Table */
.table-container { overflow-x: auto; border-radius: 12px; border: 1px solid var(--sand-200); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--gold-50); }
th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--gold-700); text-transform: uppercase; letter-spacing: 0.5px; }
td { padding: 14px 16px; border-bottom: 1px solid #f0ead8; font-size: 14px; color: #333; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gold-50); }

/* Admin sidebar */
.admin-layout { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar {
  width: 250px; min-width: 250px; background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  padding: 24px 16px; display: flex; flex-direction: column; gap: 4px;
}
.sidebar-item {
  color: rgba(255,255,255,0.6); padding: 12px 16px; border-radius: 10px;
  cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 12px;
  transition: all 0.2s; border: none; background: none; width: 100%; text-align: left;
}
.sidebar-item:hover { color: var(--gold-400); background: rgba(201, 168, 76, 0.1); }
.sidebar-item.active { color: var(--gold-400); background: rgba(201, 168, 76, 0.15); border-left: 3px solid var(--gold-500); }
.sidebar-item i { width: 18px; text-align: center; }
.admin-content { flex: 1; padding: 30px; overflow-x: hidden; }

/* Stat cards */
.stat-card {
  background: white; border-radius: 16px; padding: 20px 24px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}
.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  flex-shrink: 0;
}
.stat-value { font-size: 26px; font-weight: 700; color: #1a1a2e; line-height: 1; }
.stat-label { font-size: 12px; color: #888; margin-top: 4px; }

/* Calendar */
.calendar { background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 20px rgba(0,0,0,0.06); }
.calendar-header { background: linear-gradient(135deg, #1a1a2e, #16213e); padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-day-header { padding: 12px 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--gold-600); background: var(--gold-50); text-transform: uppercase; }
.calendar-cell { min-height: 90px; padding: 8px; border: 1px solid #f0ead8; vertical-align: top; }
.calendar-cell.today { background: #fffbf0; }
.calendar-cell.other-month { background: #f9f9f9; opacity: 0.5; }
.calendar-date { font-size: 13px; font-weight: 600; color: #555; margin-bottom: 4px; }
.calendar-booking { font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-bottom: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Loading spinner */
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--sand-200);
  border-top-color: var(--gold-500); border-radius: 50%; animation: spin 0.8s linear infinite;
}

/* Divider */
.divider { height: 1px; background: linear-gradient(to right, transparent, var(--sand-200), transparent); margin: 24px 0; }

/* Alert */
.alert { padding: 14px 18px; border-radius: 10px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert-warning { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #14532d; }
.alert-error { background: #fef2f2; border: 1px solid #fca5a5; color: #7f1d1d; }
.alert-info { background: #eff6ff; border: 1px solid #93c5fd; color: #1e3a8a; }

/* Progress steps */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 32px; overflow-x: auto; padding-bottom: 4px; }
.step { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.step-circle {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--sand-200);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  color: #aaa; background: white; flex-shrink: 0; transition: all 0.3s;
}
.step.active .step-circle { border-color: var(--gold-500); color: var(--gold-600); background: var(--gold-50); }
.step.done .step-circle { border-color: #22c55e; background: #22c55e; color: white; }
.step-label { font-size: 13px; color: #aaa; transition: color 0.3s; }
.step.active .step-label { color: var(--gold-600); font-weight: 600; }
.step.done .step-label { color: #16a34a; }
.step-line { flex: 1; height: 2px; background: var(--sand-200); min-width: 20px; }
.step-line.done { background: #22c55e; }

/* Responsive */
@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-sidebar.mobile-open { display: flex; position: fixed; inset-y: 0; left: 0; z-index: 200; width: 260px; }
  .admin-content { padding: 16px; }
  .navbar-links .hidden-mobile { display: none; }
  .modal { margin: 10px; max-height: 95vh; }
  .hero { padding: 40px 16px; }
  .stat-card { padding: 14px 16px; }
}

@media (max-width: 480px) {
  .btn-primary, .btn-secondary { padding: 10px 20px; font-size: 14px; }
  .section-title { font-size: 22px; }
}

/* Booking detail */
.detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--sand-200); }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: #888; font-size: 13px; }
.detail-value { font-weight: 500; font-size: 14px; color: #333; text-align: right; max-width: 60%; }

/* Message bubble */
.message-tourist { background: var(--gold-50); border: 1px solid var(--gold-200); border-radius: 12px 12px 12px 4px; padding: 12px 16px; margin-bottom: 12px; }
.message-admin { background: #1a1a2e; color: white; border-radius: 12px 12px 4px 12px; padding: 12px 16px; margin-bottom: 12px; margin-left: auto; max-width: 80%; }
.message-time { font-size: 11px; color: #aaa; margin-top: 4px; }
.message-admin .message-time { color: rgba(255,255,255,0.5); }

/* ============================================================
   Language + Currency selectors (navbar)
   ============================================================ */
.currency-select, .lang-select {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: background 0.2s;
}
.currency-select:hover, .lang-select:hover {
  background: rgba(255,255,255,0.18);
}
.currency-select option, .lang-select option {
  background: #1a1a2e;
  color: white;
}

/* ============================================================
   RTL support (Arabic)
   ============================================================ */
[dir="rtl"] .navbar-inner { flex-direction: row-reverse; }
[dir="rtl"] .navbar-links { flex-direction: row-reverse; }
[dir="rtl"] .form-group { text-align: right; }
[dir="rtl"] .card-body { text-align: right; }
[dir="rtl"] .admin-layout { flex-direction: row-reverse; }
[dir="rtl"] .detail-row { flex-direction: row-reverse; }
[dir="rtl"] .detail-value { text-align: left; }
[dir="rtl"] .message-tourist { border-radius: 18px 18px 4px 18px; }
[dir="rtl"] .message-admin  { border-radius: 18px 18px 18px 4px; margin-left: 0; margin-right: auto; }

/* ============================================================
   Non-Latin font families (applied via <html lang="...">)
   ============================================================ */
:lang(ar) { font-family: 'Noto Sans Arabic', sans-serif; }
:lang(hi) { font-family: 'Noto Sans Devanagari', sans-serif; }
:lang(zh) { font-family: 'Noto Sans SC', sans-serif; }
:lang(ja) { font-family: 'Noto Sans JP', sans-serif; }
:lang(ta) { font-family: 'Noto Sans Tamil', sans-serif; }
:lang(si) { font-family: 'Noto Sans Sinhala', sans-serif; }
