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

:root {
  --primary: #D4A574;
  --primary-dark: #B8895A;
  --dark: #1a1a2e;
  --sidebar-bg: #16213e;
  --sidebar-w: 240px;
  --content-bg: #f4f6f9;
  --white: #fff;
  --gray: #6b7280;
  --gray-light: #e5e7eb;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
}

body { font-family: 'Poppins', sans-serif; background: var(--content-bg); color: #1f2937; font-size: 14px; }

/* ── Auth ── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--dark) 0%, #0f3460 100%); }
.auth-card { background: var(--white); border-radius: 16px; padding: 40px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.auth-logo p { font-size: 13px; color: var(--gray); margin-top: 4px; }
.auth-card input { width: 100%; padding: 11px 14px; border: 0.3px solid var(--gray-light); border-radius: var(--radius); font-size: 14px; margin-bottom: 14px; outline: none; transition: border-color .2s; }
.auth-card input:focus { border-color: var(--primary); }
.auth-card button { width: 100%; padding: 12px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); font-size: 15px; font-weight: 700; cursor: pointer; transition: background .2s; }
.auth-card button:hover { background: var(--primary-dark); }
.auth-error   { color: var(--danger);  font-size: 13px; margin-bottom: 12px; text-align: center; }
.auth-success { color: var(--success); font-size: 13px; margin-bottom: 12px; text-align: center; background: #d1fae520; border: 1px solid #6ee7b7; border-radius: 8px; padding: 10px 14px; }
.auth-link    { display: block; text-align: center; margin-top: 14px; font-size: 13px; color: var(--gray); text-decoration: none; transition: color .15s; }
.auth-link:hover { color: var(--primary); }

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar { width: var(--sidebar-w); background: var(--sidebar-bg); color: #cbd5e1; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 100; }
.sidebar-logo { padding: 24px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo h1 { font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.sidebar-logo span { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 1px; }
.sidebar-nav { flex: 1; padding: 16px 0; }
.nav-section { padding: 8px 20px 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: #475569; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: #94a3b8; text-decoration: none; font-size: 13.5px; font-weight: 500; transition: all .15s; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.nav-item.active { background: rgba(212,165,116,.15); color: var(--primary); border-left-color: var(--primary); }
.nav-item svg { flex-shrink: 0; opacity: .8; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer a { display: flex; align-items: center; gap: 8px; color: #64748b; text-decoration: none; font-size: 13px; transition: color .15s; }
.sidebar-footer a:hover { color: var(--danger); }

/* ── Main ── */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
.topbar { background: var(--white); padding: 14px 28px; border-bottom: 1px solid var(--gray-light); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.topbar-title { font-size: 18px; font-weight: 700; color: #1f2937; }
.topbar-sub { font-size: 12px; color: var(--gray); margin-top: 1px; }
.content { padding: 28px; flex: 1; }

/* ── Stats grid ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border-left: 4px solid var(--primary); }
.stat-card.blue  { border-left-color: var(--info); }
.stat-card.green { border-left-color: var(--success); }
.stat-card.red   { border-left-color: var(--danger); }
.stat-card.orange{ border-left-color: var(--warning); }
.stat-label { font-size: 12px; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 28px; font-weight: 800; color: #1f2937; margin-top: 6px; letter-spacing: -1px; }
.stat-sub { font-size: 12px; color: var(--gray); margin-top: 4px; }

/* ── Card ── */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 24px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-light); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 15px; font-weight: 700; color: #1f2937; }
.card-body { padding: 20px; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { background: #f8fafc; color: #6b7280; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--gray-light); white-space: nowrap; }
tbody tr { border-bottom: 1px solid #f1f5f9; transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }
tbody td { padding: 12px 14px; color: #374151; vertical-align: middle; }
.td-muted { color: var(--gray); font-size: 12px; }
.td-bold { font-weight: 700; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #D4A574, #B8895A); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; vertical-align: middle; margin-right: 8px; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-cell { display: flex; align-items: center; }

/* ── Filters ── */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select {
  padding: 9px 13px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  background: #fff;
  color: #374151;
  transition: border-color .18s, box-shadow .18s;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  height: 38px;
}
.filters input:focus, .filters select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212,165,116,.15);
}
.filters input::placeholder { color: #b0b8c4; }
.filters select { padding-right: 32px; 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 d='M1 1l5 5 5-5' stroke='%23b0b8c4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; cursor: pointer; }
.filters input { width: 220px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.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-ghost { background: transparent; color: var(--gray); border: 0.3px solid var(--gray-light); }
.btn-ghost:hover { background: #f9fafb; color: #1f2937; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ── Pagination ── */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding-top: 16px; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; border: 0.3px solid var(--gray-light); color: #374151; transition: all .15s; }
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination span.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination-info { font-size: 13px; color: var(--gray); margin-right: auto; }

/* ── Alert / toast ── */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; font-weight: 600; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* ── Modal ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: 16px; padding: 28px; width: 100%; max-width: 480px; box-shadow: 0 20px 60px rgba(0,0,0,.2); position: relative; }
.modal h2 { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; cursor: pointer; color: var(--gray); font-size: 20px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; font-weight: 600; color: var(--gray); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid #e5e7eb; border-radius: 10px;
  font-size: 14px; outline: none; color: #374151;
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212,165,116,.15);
}
.form-row input::placeholder, .form-row textarea::placeholder { color: #b0b8c4; }
.form-row select {
  appearance: none; cursor: pointer; padding-right: 32px;
  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 d='M1 1l5 5 5-5' stroke='%23b0b8c4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.form-row textarea { resize: vertical; min-height: 80px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ══════════════════════════════════════════════
   DETAIL MODAL — Design System
   ══════════════════════════════════════════════ */

/* Container */
.detail-modal {
  max-width: 700px; max-height: 92vh; overflow-y: auto;
  padding: 0; border-radius: 20px !important;
  animation: dmSlideUp .22s cubic-bezier(.34,1.2,.64,1);
}
.detail-modal::-webkit-scrollbar { width: 4px; }
.detail-modal::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 99px; }
@keyframes dmSlideUp { from { opacity:0; transform:translateY(18px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }

.dh-type-dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; display: inline-block; }

/* Colored banner */
.detail-banner {
  height: 110px; position: relative; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: flex-end; padding: 0 20px 0;
}
.detail-banner::after { content:''; position:absolute; inset:0; background:rgba(0,0,0,.08); }
.db-banner-user    { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.db-banner-prest   { background: linear-gradient(135deg, #D4A574 0%, #8B5E3C 100%); }
.db-banner-booking { background: linear-gradient(135deg, #8b5cf6 0%, #4c1d95 100%); }
.db-banner-payment { background: linear-gradient(135deg, #10b981 0%, #065f46 100%); }
.db-banner-review  { background: linear-gradient(135deg, #f59e0b 0%, #92400e 100%); }
.banner-icon {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 56px; opacity: .15; z-index: 1; line-height: 1;
}
.banner-tag {
  position: absolute; top: 16px; left: 20px; z-index: 1;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px;
  color: rgba(255,255,255,.7);
}

/* Avatar over banner */
.detail-avatar-wrap {
  display: flex; align-items: flex-end; gap: 14px;
  padding: 0 20px; margin-top: -38px; margin-bottom: 14px; position: relative; z-index: 2;
}
.detail-avatar-lg {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, #D4A574, #B8895A);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 28px; font-weight: 800; flex-shrink: 0;
  overflow: hidden; border: 4px solid #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.detail-avatar-lg img { width:100%; height:100%; object-fit:cover; }
.detail-avatar-square {
  width: 76px; height: 76px; border-radius: 16px;
  background: linear-gradient(135deg, #8b5cf6, #4c1d95);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 800; flex-shrink: 0;
  border: 4px solid #fff; box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.detail-name-block { padding-bottom: 6px; }
.detail-name-block h3 { font-size: 19px; font-weight: 800; color: #1f2937; margin: 0 0 6px; line-height: 1.2; }

/* Body */
.detail-body { padding: 0 20px 28px; }
/* Banner rendered inside detail-body: cancel body padding so banner is full-width */
.detail-body .detail-banner { margin: 0 -20px; border-radius: 20px 20px 0 0; }
.detail-body .detail-avatar-wrap { padding: 0; }
/* Close button over colored banner */
.detail-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 30;
  background: rgba(255,255,255,.2); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-size: 16px;
  transition: background .15s;
}
.detail-modal-close:hover { background: rgba(255,255,255,.35); }

/* Badges */
.detail-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.db { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .2px; }
.db-blue   { background: #dbeafe; color: #1d4ed8; }
.db-purple { background: #ede9fe; color: #7c3aed; }
.db-red    { background: #fee2e2; color: #dc2626; }
.db-green  { background: #d1fae5; color: #065f46; }
.db-gray   { background: #f3f4f6; color: #4b5563; }
.db-gold   { background: #fef3c7; color: #b45309; }

/* Stats row */
.detail-stats-row { display: flex; gap: 8px; margin: 0 0 18px; }
.dsr-item {
  flex: 1; text-align: center; padding: 14px 6px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  position: relative; overflow: hidden;
}
.dsr-item::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.dsr-user    .dsr-item::before { background: linear-gradient(90deg,#3b82f6,#60a5fa); }
.dsr-prest   .dsr-item::before { background: linear-gradient(90deg,#D4A574,#f0c896); }
.dsr-booking .dsr-item::before { background: linear-gradient(90deg,#8b5cf6,#a78bfa); }
.dsr-payment .dsr-item::before { background: linear-gradient(90deg,#10b981,#34d399); }
.dsr-review  .dsr-item::before { background: linear-gradient(90deg,#f59e0b,#fbbf24); }
.dsr-item .dv { font-size: 20px; font-weight: 800; color: #1f2937; line-height: 1.1; }
.dsr-item .dl { font-size: 10px; color: #9ca3af; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }

/* Section title */
.detail-section { margin-bottom: 18px; }
.detail-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px;
  color: #9ca3af; margin-bottom: 10px;
}
.detail-section-title::after { content:''; flex:1; height:1px; background:#f1f5f9; }

/* Info grid */
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: #e5e7eb;
  border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; margin-bottom: 18px;
}
.dr { padding: 11px 14px; background: #fff; }
.dr-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #c4cad4; margin-bottom: 3px; }
.dr-value { font-size: 13px; color: #1f2937; font-weight: 600; word-break: break-word; }

/* List items */
.detail-list { display: flex; flex-direction: column; gap: 6px; }
.dli {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 10px; font-size: 13px; transition: border-color .15s, box-shadow .15s;
}
.dli:hover { border-color: #D4A574; box-shadow: 0 2px 8px rgba(212,165,116,.12); }
.dli-left { font-weight: 600; color: #374151; }
.dli-right { font-size: 12px; color: #6b7280; text-align: right; }

/* Stars */
.stars-gold  { color: #f59e0b; letter-spacing: 3px; }
.stars-empty { color: #e5e7eb; letter-spacing: 3px; }

/* Quote/comment block */
.detail-comment {
  background: #fff; border: 1px solid #e5e7eb;
  border-left: 3px solid var(--primary);
  border-radius: 0 12px 12px 0;
  padding: 14px 16px; font-size: 14px; color: #374151;
  line-height: 1.7; white-space: pre-wrap;
}

/* Booking: party cards */
.booking-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.party-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px;
}
.party-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: #c4cad4; margin-bottom: 8px; }
.party-name { font-size: 14px; font-weight: 700; color: #1f2937; margin-bottom: 4px; }
.party-sub { font-size: 12px; color: #6b7280; }

/* Booking: status + date summary bar */
.booking-header-info {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 0 14px; border-bottom: 1px solid #f1f5f9; margin-bottom: 14px;
}

/* Booking: price breakdown */
.price-block {
  background: linear-gradient(135deg, #fafbfc 0%, #f3f4f6 100%);
  border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; margin-bottom: 18px;
}
.price-block-title { padding: 10px 16px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #9ca3af; border-bottom: 1px solid #e5e7eb; background: #fff; }
.price-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 16px; font-size: 13px; }
.price-row + .price-row { border-top: 1px dashed #e5e7eb; }
.price-row.total { background: #fff; border-top: 2px solid #e5e7eb !important; }
.price-row .pl { color: #6b7280; }
.price-row .pv { font-weight: 700; color: #1f2937; }
.price-row.total .pv { font-size: 18px; color: var(--primary); }

/* Payment: amount hero */
.payment-amount-hero {
  text-align: center; padding: 20px; margin-bottom: 18px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0; border-radius: 14px;
}
.payment-amount-hero .amount { font-size: 32px; font-weight: 800; color: #065f46; }
.payment-amount-hero .amt-label { font-size: 12px; color: #6b7280; margin-top: 4px; font-weight: 600; }

/* Review: big stars */
.review-rating-block { text-align: center; padding: 20px 16px; margin-bottom: 18px; background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid #fde68a; border-radius: 14px; }
.review-stars-lg { font-size: 32px; letter-spacing: 4px; color: #f59e0b; }
.review-stars-lg .review-stars-empty { color: #fde68a; }
.review-score { font-size: 28px; font-weight: 800; color: #92400e; margin-top: 6px; }
.review-score span { font-size: 16px; color: #b45309; }

/* Timeline */
.timeline { padding-left: 18px; position: relative; }
.timeline::before { content:''; position:absolute; left:5px; top:10px; bottom:10px; width:2px; background:#f1f5f9; border-radius:99px; }
.tl-item { display:flex; gap:14px; padding:8px 0; position:relative; }
.tl-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary);
  position: absolute; left: -18px; top: 12px; flex-shrink: 0;
}
.tl-item:first-child .tl-dot { background: var(--primary); width:14px; height:14px; left:-19px; top:11px; }
.tl-content { flex:1; padding-bottom:10px; border-bottom:1px solid #f1f5f9; }
.tl-item:last-child .tl-content { border-bottom:none; }
.tl-status { font-size:13px; font-weight:700; color:#1f2937; }
.tl-date { font-size:11px; color:#9ca3af; margin-top:2px; }

/* Loading */
.detail-loading { display:flex; align-items:center; justify-content:center; padding:70px 0; color:#9ca3af; font-size:14px; gap:12px; flex-direction:column; }
.detail-loading p { font-size:13px; }
.spin { width:28px; height:28px; border:3px solid #f1f5f9; border-top-color:var(--primary); border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── Charts row ── */
.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.chart-list li { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.chart-list li:last-child { border-bottom: none; }
.bar-wrap { flex: 1; margin: 0 12px; height: 6px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--primary); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .charts-row { grid-template-columns: 1fr; }
}
