/* ============================================================
   VACATION RENTAL BOOKING SYSTEM — Main Stylesheet
   ============================================================ */

:root {
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --primary-light: #dbeafe;
  --success:       #16a34a;
  --success-light: #dcfce7;
  --warning:       #d97706;
  --warning-light: #fef3c7;
  --danger:        #dc2626;
  --danger-light:  #fee2e2;
  --info:          #0891b2;
  --info-light:    #cffafe;
  --accent:        #7c3aed;
  --accent-light:  #ede9fe;

  --text:          #111827;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;
  --bg:            #f9fafb;
  --surface:       #ffffff;
  --header-bg:     #1e293b;

  --radius:   8px;
  --radius-lg: 12px;
  --shadow:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);
}

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

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────── */
header {
  background: var(--header-bg);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -.3px;
}

header nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

header nav a {
  color: rgba(255,255,255,.8);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: background .15s, color .15s;
  text-decoration: none;
}

header nav a:hover,
header nav a.active {
  background: rgba(255,255,255,.15);
  color: #fff;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255,255,255,.2);
}

.user-greeting {
  font-size: 0.875rem;
  color: rgba(255,255,255,.85);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Main ────────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--header-bg);
  color: rgba(255,255,255,.6);
  font-size: 0.85rem;
  padding: 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

footer a { color: rgba(255,255,255,.75); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }

.btn-success  { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; text-decoration: none; color: #fff; }

.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; text-decoration: none; color: #fff; }

.btn-warning  { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; text-decoration: none; color: #fff; }

.btn-outline  {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: #9ca3af; background: #f3f4f6; text-decoration: none; }

.btn-ghost    { background: transparent; color: rgba(255,255,255,.8); border: none; }
.btn-ghost:hover { background: rgba(255,255,255,.15); color: #fff; }

.btn-sm  { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Flash Messages ──────────────────────────────────────── */
.flash-container {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
}

.flash-success { background: var(--success-light); color: #14532d; border: 1px solid #bbf7d0; }
.flash-error   { background: var(--danger-light);  color: #7f1d1d; border: 1px solid #fecaca; }
.flash-warning { background: var(--warning-light); color: #78350f; border: 1px solid #fde68a; }
.flash-info    { background: var(--info-light);    color: #164e63; border: 1px solid #a5f3fc; }

.flash-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; opacity: .6; padding: 0 0.25rem;
  line-height: 1;
}
.flash-close:hover { opacity: 1; }

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.subtitle { color: var(--text-muted); margin-top: 0.25rem; }

/* ── Stats Row ───────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .15s, transform .15s;
}

.stat-card-link:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
}

.stat-number { font-size: 2.25rem; font-weight: 800; line-height: 1; }
.stat-label  { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.3rem; }
.stat-cta    { font-size: 0.8rem; color: var(--primary); margin-top: 0.5rem; }

.stat-card-warning .stat-number { color: var(--warning); }
.stat-card-success .stat-number { color: var(--success); }
.stat-card-accent  .stat-number { color: var(--accent); }
.stat-card-info    .stat-number { color: var(--info); }

/* ── Sections ────────────────────────────────────────────── */
.section { margin-bottom: 2.5rem; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-header h2 { font-size: 1.2rem; font-weight: 700; }
.link-more { font-size: 0.875rem; color: var(--primary); }

/* ── Tables ──────────────────────────────────────────────── */
.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table thead tr { background: #f8fafc; }
.table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafafa; }
.table tbody tr.row-highlight { background: #fffbeb; }
.table tbody tr.row-highlight:hover { background: #fef9c3; }

.link-action {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2em 0.65em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: capitalize;
}

.badge-pending   { background: var(--warning-light); color: #92400e; }
.badge-approved  { background: var(--success-light); color: #14532d; }
.badge-rejected  { background: var(--danger-light);  color: #7f1d1d; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }

.badge-status-active    { background: var(--success-light); color: #14532d; }
.badge-status-suspended { background: var(--danger-light);  color: #7f1d1d; }
.badge-status-inactive  { background: #f3f4f6; color: #6b7280; }

.badge-lg { font-size: 0.875rem; padding: 0.3em 0.9em; }

.role-badge { font-size: 0.7rem; background: var(--accent-light); color: var(--accent); padding: 0.15em 0.5em; border-radius: 999px; }
.role-tag   { font-size: 0.8rem; font-weight: 600; }
.role-admin { color: var(--accent); }
.role-customer { color: var(--text-muted); }

/* ── Forms ───────────────────────────────────────────────── */
.form-page {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

.form-page-narrow { grid-template-columns: 1fr; max-width: 640px; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }
.optional   { font-weight: 400; color: var(--text-muted); }
.required   { color: var(--danger); }

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.form-aside { display: flex; flex-direction: column; gap: 1rem; }

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; }
.info-card p  { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.4rem; }

.steps { padding-left: 1.2rem; }
.steps li { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.4rem; }

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h1 { font-size: 1.6rem; font-weight: 800; }
.auth-header p  { color: var(--text-muted); margin-top: 0.3rem; }

.auth-form { display: flex; flex-direction: column; gap: 0.25rem; }

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-demo {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.demo-title { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 0.75rem; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.demo-account  { background: #f8fafc; border-radius: var(--radius); padding: 0.75rem; font-size: 0.8rem; }
.demo-account strong { display: block; margin-bottom: 0.3rem; }
.demo-account code { display: block; background: #e5e7eb; border-radius: 4px; padding: 0.2rem 0.4rem; margin: 0.15rem 0; font-family: monospace; }

/* ── Detail Layout ───────────────────────────────────────── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  align-items: start;
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.detail-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.detail-card-header h2 { font-size: 1.1rem; font-weight: 700; }

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

.detail-item { display: flex; flex-direction: column; gap: 0.2rem; }
.detail-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.detail-value { font-size: 0.95rem; }
.detail-value.price { font-size: 1.1rem; font-weight: 700; color: var(--success); }

.detail-notes {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.detail-notes p { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.4rem; }
.admin-notes    { background: #fffbeb; border-radius: var(--radius); padding: 1rem; }

.action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.detail-sidebar { display: flex; flex-direction: column; gap: 1rem; }

.status-guide    { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.status-guide li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }

.quick-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.quick-links li a { font-size: 0.875rem; }

.success-card { background: var(--success-light); border-color: #bbf7d0; }

/* ── Admin Action Forms ───────────────────────────────────── */
.admin-actions {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.admin-actions h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }

.action-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.action-form { background: #f8fafc; border-radius: var(--radius); padding: 1rem; }

/* ── Filter Tabs ─────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.filter-tab {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius) var(--radius) 0 0;
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -1px;
  transition: color .15s, background .15s;
}

.filter-tab:hover { color: var(--text); text-decoration: none; }
.filter-tab.active {
  color: var(--primary);
  background: var(--surface);
  border-color: var(--border);
  border-bottom-color: var(--surface);
}

/* ── Property Preview ─────────────────────────────────────── */
.property-preview {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.property-preview h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.property-preview p  { font-size: 0.875rem; opacity: .85; }
.price-hint { font-size: 0.9rem; margin-top: 0.5rem; opacity: 1 !important; }

/* ── Price Estimate ───────────────────────────────────────── */
.price-estimate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.price-estimate strong { font-size: 1.1rem; color: var(--primary-dark); }

/* ── Adventures ───────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

.adventure-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow .15s;
}

.adventure-card:hover { box-shadow: var(--shadow-md); }

.adventure-card-header { display: flex; justify-content: space-between; align-items: center; }
.adventure-category { font-size: 0.78rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .05em; }

.adventure-card h3 { font-size: 1.05rem; font-weight: 700; }
.adventure-desc { font-size: 0.875rem; color: var(--text-muted); flex: 1; }

.adventure-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  align-items: center;
}

.adventure-price { color: var(--success); font-weight: 700; font-size: 0.9rem; margin-left: auto; }

.difficulty-easy    { color: var(--success); font-weight: 600; }
.difficulty-moderate{ color: var(--warning); font-weight: 600; }
.difficulty-hard    { color: var(--danger);  font-weight: 600; }
.difficulty-extreme { color: #7c2d12;        font-weight: 600; }

/* ── Star Rating ─────────────────────────────────────────── */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  gap: 0.15rem;
  justify-content: flex-end;
}

.star-rating input { display: none; }

.star-rating label {
  font-size: 2rem;
  color: #d1d5db;
  cursor: pointer;
  transition: color .1s;
  line-height: 1;
  padding: 0 0.05rem;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #f59e0b;
}

/* ── Reviews ─────────────────────────────────────────────── */
.review-list { display: flex; flex-direction: column; gap: 1rem; }

.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.review-pending { border-left: 4px solid var(--warning); }

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.review-meta { font-size: 0.875rem; }
.review-right { display: flex; align-items: center; gap: 0.75rem; }
.stars { color: #f59e0b; font-size: 1rem; letter-spacing: .05em; }
.review-title   { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.review-content { font-size: 0.9rem; color: var(--text-muted); }
.review-actions { margin-top: 1rem; display: flex; gap: 0.5rem; }

/* ── Detail List ─────────────────────────────────────────── */
.detail-list {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-state p  { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Error Pages ─────────────────────────────────────────── */
.error-page {
  text-align: center;
  padding: 5rem 2rem;
}

.error-code { font-size: 6rem; font-weight: 900; color: var(--border); line-height: 1; margin-bottom: 1rem; }
.error-page h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.error-page p  { color: var(--text-muted); margin-bottom: 2rem; }

/* ── Utility ─────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: 0.85rem; }
.text-xs    { font-size: 0.75rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .form-page       { grid-template-columns: 1fr; }
  .detail-layout   { grid-template-columns: 1fr; }
  .action-forms    { grid-template-columns: 1fr; }
  .detail-grid     { grid-template-columns: 1fr; }
  .form-row        { grid-template-columns: 1fr; }
  .stats-row       { grid-template-columns: 1fr 1fr; }
  .demo-accounts   { grid-template-columns: 1fr; }

  header nav a:not(.btn):not(.logo) { display: none; }
  header nav .nav-user { margin-left: 0; padding-left: 0; border: none; }

  .page-header { flex-direction: column; }
  .table th, .table td { padding: 0.6rem 0.75rem; }
}
