/* ============================================================
   Escape2Kashmir - Admin Panel CSS
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --sidebar-bg: #0a1628;
  --sidebar-hover: #1a2f4e;
  --sidebar-active: #1e6aeb;
  --sidebar-width: 260px;
  --topbar-height: 65px;
  --primary: #1e6aeb;
  --primary-dark: #0a2342;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --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 25px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #2d4a6e; border-radius: 4px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
}

.sidebar-brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
}

.sidebar-brand span {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.3);
  padding: 12px 10px 6px;
  margin-top: 4px;
}

.nav-section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.nav-section-toggle .nav-section-arrow {
  width: 12px;
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  transition: transform var(--transition), color var(--transition);
}

.nav-section-toggle.open .nav-section-arrow {
  transform: rotate(90deg);
}

.nav-section-toggle:hover {
  color: rgba(255,255,255,0.78);
}

.nav-section-toggle:hover .nav-section-arrow {
  color: rgba(255,255,255,0.78);
}

.nav-section-items.is-collapsed {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all var(--transition);
  position: relative;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}

.nav-item .badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.badge-warning { background: var(--warning); color: #fff; }
.badge-success { background: var(--success); color: #fff; }
.badge-info    { background: var(--info); color: #fff; }
.badge-danger  { background: var(--danger); color: #fff; }

.nav-logout {
  color: rgba(239,68,68,0.8);
  margin-top: 8px;
}
.nav-logout:hover { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   TOP BAR
   ============================================================ */

.top-bar {
  background: var(--card-bg);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: none;
}

.sidebar-toggle:hover { background: var(--bg); color: var(--text); }

.top-bar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.top-bar-right { display: flex; align-items: center; gap: 16px; }

.admin-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg);
  border-radius: var(--radius);
  cursor: pointer;
}

.admin-profile i { font-size: 24px; color: var(--primary); }

.admin-profile span {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.admin-profile small {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */

.content-area { padding: 24px; flex: 1; }

/* ============================================================
   ALERT / FLASH
   ============================================================ */

.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin: 16px 24px 0;
  position: relative;
}

.alert button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  margin-left: auto;
  opacity: 0.6;
}

.alert button:hover { opacity: 1; }

.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ============================================================
   STATS CARDS
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}

.stat-icon.blue    { background: linear-gradient(135deg, #1e6aeb, #0891b2); }
.stat-icon.green   { background: linear-gradient(135deg, #10b981, #059669); }
.stat-icon.yellow  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon.purple  { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stat-icon.red     { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stat-icon.cyan    { background: linear-gradient(135deg, #06b6d4, #0891b2); }

.stat-info {}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.card-body { padding: 24px; }

/* ============================================================
   TABLES
   ============================================================ */

.table-responsive { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--bg);
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: rgba(30,106,235,0.03); }

/* ============================================================
   STATUS BADGES
   ============================================================ */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending  { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.status-confirmed{ background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.status-cancelled{ background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.status-completed{ background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.status-active   { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.status-inactive { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.status-approved { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.status-rejected { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.status-new      { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.status-read     { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: #1558d0; }
.btn-success  { background: var(--success); color: #fff; }
.btn-success:hover  { background: #059669; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover   { background: #dc2626; }
.btn-warning  { background: var(--warning); color: #fff; }
.btn-warning:hover  { background: #d97706; }
.btn-info     { background: var(--info); color: #fff; }
.btn-info:hover     { background: #2563eb; }
.btn-secondary{ background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover{ background: var(--border); }
.btn-sm       { padding: 5px 10px; font-size: 12px; }
.btn-icon     { padding: 8px; border-radius: var(--radius-sm); }

.action-buttons { display: flex; gap: 6px; flex-wrap: nowrap; }

/* ============================================================
   FORMS
   ============================================================ */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-label .req { color: var(--danger); }

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

.form-control.error { border-color: var(--danger); }

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

select.form-control { cursor: pointer; }

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

/* ============================================================
   IMAGE UPLOAD
   ============================================================ */

.image-upload-box {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.image-upload-box:hover { border-color: var(--primary); background: rgba(30,106,235,0.03); }

.image-upload-box i { font-size: 40px; color: var(--text-muted); margin-bottom: 12px; }

.image-upload-box p { font-size: 14px; color: var(--text-muted); }

.image-preview img { max-width: 200px; border-radius: var(--radius-sm); margin-top: 12px; }

/* ============================================================
   PAGE HEADER
   ============================================================ */

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

.page-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.page-header p { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   FILTER BAR
   ============================================================ */

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
  background: var(--card-bg);
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.filter-bar .form-control { max-width: 200px; }

.search-input {
  padding: 10px 16px 10px 40px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  position: relative;
  flex: 1;
  max-width: 300px;
}

.search-input:focus { outline: none; border-color: var(--primary); }

.search-wrap { position: relative; }
.search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* ============================================================
   GALLERY GRID
   ============================================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.gallery-item-admin {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}

.gallery-item-admin img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.gallery-item-admin .gallery-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item-admin:hover .gallery-actions { opacity: 1; }

.gallery-caption {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   STARS RATING
   ============================================================ */

.star-rating { color: #f59e0b; font-size: 13px; }

/* ============================================================
   CHART PLACEHOLDER
   ============================================================ */

.chart-container { height: 280px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .form-control, .search-input { max-width: 100%; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .action-buttons { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .content-area { padding: 16px; }
  .card-body { padding: 16px; }
}

/* ============================================================
   UTILITIES
   ============================================================ */

.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.fw-bold { font-weight: 700; }
.fw-600 { font-weight: 600; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }

.overlay-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  display: none;
}
.overlay-bg.show { display: block; }

/* ============================================================
   MODAL
   ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.show { display: flex; }

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.modal-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.modal-box p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.page-btn {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================
   BOOKING DETAIL
   ============================================================ */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-item label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-item p {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }
