/* ================================================================
   admin/assets/css/admin.css – Admin Panel Stylesheet
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:   #2F6B3E;
  --primary-d: #1a3a2a;
  --gold:      #C8922A;
  --danger:    #dc3545;
  --success:   #28a745;
  --warning:   #ffc107;
  --info:      #17a2b8;
  --light:     #f8f9fa;
  --dark:      #343a40;
  --sidebar-w: 260px;
  --topbar-h:  60px;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f1f4f9;
  color: #333;
  min-height: 100vh;
}

/* ── Layout ───────────────────────────────────────────────── */
.admin-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary-d);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform .25s;
}
.sidebar-logo {
  padding: 1.2rem 1.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
}
.sidebar-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255,255,255,.15);
  padding: 6px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 16px rgba(0,0,0,.25);
}
.sidebar-logo span { color: white; font-weight: 400; font-size: .8rem; display: block; }
.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .92rem;
  transition: background .15s, color .15s;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,.1);
  color: white;
}
.sidebar-nav a i { width: 20px; text-align: center; color: var(--gold); }
.sidebar-section-label {
  padding: 1rem 20px .3rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.4);
}

/* Main content */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top bar */
.topbar {
  height: var(--topbar-h);
  background: white;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-left h2 { font-size: 1.1rem; color: var(--primary-d); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.admin-avatar {
  width: 36px; height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: .85rem;
}
.page-content { padding: 1.5rem; flex: 1; }

/* ── Cards & Stats ─────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: white;
  border-radius: 16px;
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
}
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: white;
  flex-shrink: 0;
}
.stat-icon.green  { background: var(--primary); }
.stat-icon.gold   { background: var(--gold); }
.stat-icon.blue   { background: var(--info); }
.stat-icon.red    { background: var(--danger); }
.stat-icon.purple { background: #7c3aed; }
.stat-num   { font-size: 1.8rem; font-weight: 800; line-height: 1; color: var(--primary-d); }
.stat-label { font-size: .82rem; color: #888; margin-top: 2px; }

/* ── Dashboard ─────────────────────────────────────────────── */
.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  padding: 1.05rem 1.2rem;
  border-radius: 18px;
  border: 1px solid #e6ebf3;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 18px rgba(0,0,0,.04);
}
.dashboard-kicker {
  color: #7a8699;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: .25rem;
}
.dashboard-hero h3 {
  color: var(--primary-d);
  font-size: 1.25rem;
  margin-bottom: .3rem;
}
.dashboard-intro {
  color: #5f6b7a;
  max-width: 720px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.dashboard-bookings-card {
  grid-column: 1 / -1;
}
.table-wrap {
  overflow-x: auto;
}
.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.quick-actions-list .btn {
  justify-content: center;
}

/* ── Data Table ────────────────────────────────────────────── */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.card-header h3 { font-size: 1rem; color: var(--primary-d); }
.card-body { padding: 1.5rem; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead tr { background: #f8f9fa; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { font-weight: 600; color: #555; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
tbody tr:hover { background: #fafafa; }
tbody tr:last-child td { border-bottom: none; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
}
.badge-green  { background: #d4edda; color: #155724; }
.badge-red    { background: #f8d7da; color: #721c24; }
.badge-gold   { background: #fff3cd; color: #856404; }
.badge-blue   { background: #d1ecf1; color: #0c5460; }
.badge-gray   { background: #e2e3e5; color: #383d41; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn-primary { background: var(--primary); color: white; }
.btn-gold    { background: var(--gold); color: white; }
.btn-danger  { background: var(--danger); color: white; }
.btn-light   { background: #e9ecef; color: #333; }
.btn-sm { padding: 5px 10px; font-size: .8rem; border-radius: 8px; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .88rem; color: #444; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #dde2e9;
  border-radius: 10px;
  font-size: .95rem;
  font-family: 'Inter', sans-serif;
  transition: border .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,107,62,.15); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ── Booking Detail UI ───────────────────────────────────── */
.booking-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.booking-hero h3 {
  font-size: 1.35rem;
  color: var(--primary-d);
  margin-bottom: .35rem;
}
.booking-hero p {
  color: #667085;
  font-size: .9rem;
}
.booking-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.booking-summary-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid #e8edf3;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 10px 20px rgba(0,0,0,.04);
}
.booking-summary-card .label {
  display: block;
  color: #7a8699;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .35rem;
}
.booking-summary-card .value {
  color: var(--primary-d);
  font-weight: 700;
  line-height: 1.4;
}
.booking-detail-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.booking-panel {
  background: white;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 10px 20px rgba(0,0,0,.04);
  overflow: hidden;
}
.booking-panel-header {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #eef2f7;
  background: #fbfcfe;
  color: var(--primary-d);
  font-weight: 700;
}
.booking-panel-body {
  padding: 1.1rem;
}
.booking-message {
  background: #f8fafc;
  border: 1px solid #e8edf3;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  color: #4b5563;
  line-height: 1.7;
}
.booking-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1rem;
}
.booking-filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.booking-filters .btn {
  border-radius: 999px;
}
.booking-table-wrap {
  overflow-x: auto;
  border-radius: 0 0 16px 16px;
}
.booking-status-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .78rem;
  text-transform: capitalize;
}
.booking-status-pill.new { background: #fff3cd; color: #856404; }
.booking-status-pill.contacted { background: #d1ecf1; color: #0c5460; }
.booking-status-pill.confirmed { background: #d4edda; color: #155724; }
.booking-status-pill.cancelled { background: #f8d7da; color: #721c24; }

/* ── Newsletter Composer ─────────────────────────────────── */
.newsletter-tabs {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.newsletter-hero-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.newsletter-kicker {
  color: var(--gold);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .35rem;
}
.newsletter-hero-body h3 {
  color: var(--primary-d);
  font-size: 1.45rem;
  margin-bottom: .45rem;
}
.newsletter-intro {
  max-width: 640px;
  color: #667085;
  line-height: 1.7;
}
.newsletter-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: .9rem;
  min-width: min(100%, 480px);
}
.newsletter-summary-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid #e8edf3;
  border-radius: 16px;
  padding: .95rem 1rem;
  box-shadow: 0 10px 20px rgba(0,0,0,.04);
}
.newsletter-summary-card .label {
  display: block;
  color: #7a8699;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .35rem;
}
.newsletter-summary-card strong {
  color: var(--primary-d);
  font-size: 1rem;
}
.newsletter-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.25rem;
}
.newsletter-panel .card-body {
  height: 100%;
}
.newsletter-body {
  min-height: 320px;
}
.newsletter-help {
  display: block;
  margin-top: .55rem;
  color: #7a8699;
  line-height: 1.5;
}
.newsletter-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.newsletter-note {
  background: #f8fafc;
  border: 1px solid #e8edf3;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin-bottom: .9rem;
}
.newsletter-note h4 {
  color: var(--primary-d);
  font-size: .95rem;
  margin-bottom: .45rem;
}
.newsletter-note p,
.newsletter-note li {
  color: #4b5563;
  line-height: 1.65;
  font-size: .92rem;
}
.newsletter-note ul {
  padding-left: 1.1rem;
}
.newsletter-note-soft {
  background: linear-gradient(180deg, #fffaf0 0%, #fffdf8 100%);
  border-color: #f3e5bf;
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .newsletter-layout {
    grid-template-columns: 1fr;
  }
  .newsletter-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 100%;
  }
}

@media (max-width: 640px) {
  .newsletter-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .booking-summary-grid,
  .booking-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .booking-summary-grid,
  .booking-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Alert ─────────────────────────────────────────────────── */
.alert { padding: .9rem 1.2rem; border-radius: 12px; margin-bottom: 1.2rem; font-size: .92rem; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* ── Image preview ─────────────────────────────────────────── */
.img-preview {
  width: 80px; height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
}

/* ── Sidebar toggle (mobile) ───────────────────────────────── */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--primary-d);
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: block; }
}
