/* ═══════════════════════════════════════════════════════════
   CUSTOMER PORTAL — portal.css
   Design language mirrors the PMS dashboard (same CSS vars,
   same card/table/button system) but adapted for a guest-
   facing "My Account" interface rather than a staff PMS.
   ═══════════════════════════════════════════════════════════ */

:root {
  --cp-bg:        #F8F8F8;
  --cp-surface:   #FFFFFF;
  --cp-sidebar:   #0F0F0F;
  --cp-border:    #E8E8E8;
  --cp-muted:     #94A3B8;
  --cp-gold:      #C9A96E;
  --cp-gold-bg:   rgba(201,169,110,0.08);
  --cp-text:      #0F172A;
  --cp-text2:     #64748B;
  --cp-active:    rgba(201,169,110,0.12);
  --cp-radius:    6px;
  --cp-shadow:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --cp-transition:0.2s ease;
}

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

body.cp-body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cp-bg);
  color: var(--cp-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────
   LAYOUT
───────────────────────────────── */
.cp-app {
  display: flex;
  min-height: 100vh;
}

/* ─────────────────────────────────
   SIDEBAR
───────────────────────────────── */
.cp-sidebar {
  width: 240px;
  background: var(--cp-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.cp-sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.cp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.cp-brand-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cp-gold);
  flex-shrink: 0;
}
.cp-brand-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.cp-brand-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}

.cp-nav {
  flex: 1;
  padding: 14px 10px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cp-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  border-radius: var(--cp-radius);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--cp-transition);
}
.cp-nav a:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
.cp-nav a.active { background: var(--cp-active); color: var(--cp-gold); }
.cp-nav a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.6; }
.cp-nav a.active svg { opacity: 1; }

.cp-sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.cp-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--cp-radius);
  cursor: default;
}
.cp-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cp-gold);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.cp-user-name  { font-size: 0.75rem; font-weight: 500; color: rgba(255,255,255,0.85); }
.cp-user-email { font-size: 0.65rem; color: rgba(255,255,255,0.35); }

.cp-logout-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-top: 4px;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  font-size: 0.75rem;
  border-radius: var(--cp-radius);
  transition: all var(--cp-transition);
}
.cp-logout-link:hover { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.05); }
.cp-logout-link svg { width: 13px; height: 13px; }

/* ─────────────────────────────────
   MAIN CONTENT
───────────────────────────────── */
.cp-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.cp-topbar {
  height: 56px;
  border-bottom: 1px solid var(--cp-border);
  background: var(--cp-surface);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 12px;
}

.cp-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  background: none;
  cursor: pointer;
  color: var(--cp-text2);
  margin-right: 8px;
}
.cp-menu-toggle svg { width: 16px; height: 16px; }

.cp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--cp-muted);
  flex: 1;
}
.cp-breadcrumb a { color: var(--cp-muted); text-decoration: none; }
.cp-breadcrumb a:hover { color: var(--cp-text); }
.cp-breadcrumb .sep { color: var(--cp-border); }
.cp-breadcrumb .current { color: var(--cp-text); font-weight: 500; }

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

.cp-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}
.cp-sidebar-overlay.is-open { display: block; }

/* ─────────────────────────────────
   PAGE HEADER
───────────────────────────────── */
.cp-page-header {
  margin-bottom: 20px;
}
.cp-page-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cp-text);
  margin-bottom: 4px;
}
.cp-page-subtitle {
  font-size: 0.82rem;
  color: var(--cp-muted);
}

/* ─────────────────────────────────
   STAT CARDS
───────────────────────────────── */
.cp-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.cp-stat-card {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 18px 20px;
  transition: box-shadow var(--cp-transition);
}
.cp-stat-card:hover { box-shadow: var(--cp-shadow); }
.cp-stat-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.cp-stat-icon svg { width: 16px; height: 16px; }
.cp-stat-icon.gold   { background: var(--cp-gold-bg);            color: var(--cp-gold); }
.cp-stat-icon.blue   { background: rgba(59,130,246,0.1);         color: #3b82f6; }
.cp-stat-icon.green  { background: rgba(34,197,94,0.1);          color: #22c55e; }
.cp-stat-icon.orange { background: rgba(249,115,22,0.1);         color: #f97316; }
.cp-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--cp-muted);
  margin-bottom: 6px;
}
.cp-stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cp-text);
}

/* ─────────────────────────────────
   PANELS / CARDS
───────────────────────────────── */
.cp-panel {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.cp-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--cp-border);
}
.cp-panel-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cp-text);
}
.cp-panel-action {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--cp-muted);
  text-decoration: none;
  transition: color var(--cp-transition);
}
.cp-panel-action:hover { color: var(--cp-text); }
.cp-panel-action svg { width: 13px; height: 13px; }
.cp-panel-body { padding: 20px; }

/* ─────────────────────────────────
   STATUS BADGES
───────────────────────────────── */
.cp-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.cp-status-pending    { background: #fef3c7; color: #b45309; }
.cp-status-confirmed  { background: #d1fae5; color: #065f46; }
.cp-status-checked-in { background: #dbeafe; color: #1e40af; }
.cp-status-checked-out{ background: #f1f5f9; color: #475569; }
.cp-status-cancelled  { background: #fee2e2; color: #991b1b; }
.cp-status-approved   { background: #d1fae5; color: #065f46; }
.cp-status-rejected   { background: #fee2e2; color: #991b1b; }
.cp-status-paid       { background: #d1fae5; color: #065f46; }
.cp-status-unpaid     { background: #fef3c7; color: #b45309; }
.cp-status-partial    { background: #dbeafe; color: #1e40af; }

/* ─────────────────────────────────
   TABLE
───────────────────────────────── */
.cp-table-wrap { overflow-x: auto; }
.cp-table {
  width: 100%;
  border-collapse: collapse;
}
.cp-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cp-muted);
  border-bottom: 1px solid var(--cp-border);
  white-space: nowrap;
}
.cp-table td {
  padding: 12px 16px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--cp-border);
  color: var(--cp-text);
}
.cp-table tbody tr:last-child td { border-bottom: none; }
.cp-table tbody tr:hover td { background: #fafafa; }
.cp-table td.muted { color: var(--cp-muted); }

/* ─────────────────────────────────
   BUTTONS
───────────────────────────────── */
.cp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--cp-radius);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--cp-transition);
  white-space: nowrap;
}
.cp-btn svg { width: 14px; height: 14px; }
.cp-btn-primary { background: var(--cp-text); color: #fff; }
.cp-btn-primary:hover { background: #1e293b; }
.cp-btn-gold    { background: var(--cp-gold); color: #fff; border-color: var(--cp-gold); }
.cp-btn-gold:hover { background: #a07c3a; }
.cp-btn-ghost   { background: transparent; color: var(--cp-text2); border-color: var(--cp-border); }
.cp-btn-ghost:hover { background: var(--cp-bg); color: var(--cp-text); }
.cp-btn-danger  { background: #fee2e2; color: #991b1b; border-color: transparent; }
.cp-btn-danger:hover { background: #fecaca; }
.cp-btn-sm { padding: 5px 10px; font-size: 0.75rem; }
.cp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─────────────────────────────────
   FORMS
───────────────────────────────── */
.cp-form-group {
  margin-bottom: 16px;
}
.cp-form-group label {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--cp-text2);
  margin-bottom: 6px;
}
.cp-form-group input,
.cp-form-group select,
.cp-form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  color: var(--cp-text);
  background: var(--cp-surface);
  transition: border-color var(--cp-transition);
}
.cp-form-group input:focus,
.cp-form-group select:focus,
.cp-form-group textarea:focus { outline: none; border-color: var(--cp-gold); }
.cp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cp-form-hint { font-size: 0.72rem; color: var(--cp-muted); margin-top: 5px; }

/* ─────────────────────────────────
   MODAL
───────────────────────────────── */
.cp-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.cp-modal-overlay.is-open { display: flex; }
.cp-modal {
  background: var(--cp-surface);
  border-radius: 10px;
  width: 100%;
  max-width: 440px;
  margin: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.cp-modal-overlay.is-open .cp-modal { transform: scale(1); }
.cp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cp-border);
}
.cp-modal-title { font-size: 0.95rem; font-weight: 600; }
.cp-modal-close {
  width: 28px; height: 28px;
  border: none;
  border-radius: var(--cp-radius);
  background: transparent;
  cursor: pointer;
  color: var(--cp-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cp-modal-close:hover { background: var(--cp-bg); color: var(--cp-text); }
.cp-modal-close svg { width: 14px; height: 14px; }
.cp-modal-body    { padding: 20px; }
.cp-modal-footer  {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--cp-border);
}

/* ─────────────────────────────────
   ALERTS
───────────────────────────────── */
.cp-alert {
  padding: 10px 14px;
  border-radius: var(--cp-radius);
  font-size: 0.8rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.cp-alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.cp-alert-success { background: #d1fae5; color: #065f46; }
.cp-alert-error   { background: #fee2e2; color: #991b1b; }
.cp-alert-info    { background: #dbeafe; color: #1e40af; }

/* ─────────────────────────────────
   EMPTY STATE
───────────────────────────────── */
.cp-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--cp-muted);
}
.cp-empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.4; }
.cp-empty-state p { font-size: 0.875rem; max-width: 280px; }
.cp-empty-state a { color: var(--cp-gold); text-decoration: none; }

/* ─────────────────────────────────
   BOOKING DETAIL CARD
───────────────────────────────── */
.cp-booking-hero {
  background: linear-gradient(135deg, #0F0F0F 0%, #1e293b 100%);
  border-radius: var(--cp-radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  color: #fff;
}
.cp-booking-hero-ref { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.6px; color: rgba(255,255,255,0.45); margin-bottom: 6px; }
.cp-booking-hero-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 600; margin-bottom: 14px; }
.cp-booking-hero-meta { display: flex; flex-wrap: wrap; gap: 20px; }
.cp-booking-hero-meta-item { display: flex; flex-direction: column; gap: 3px; }
.cp-booking-hero-meta-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.4px; color: rgba(255,255,255,0.4); }
.cp-booking-hero-meta-value { font-size: 0.9rem; font-weight: 500; color: rgba(255,255,255,0.9); }
.cp-booking-hero-amount { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--cp-gold); }

/* ─────────────────────────────────
   LOGIN PAGE
───────────────────────────────── */
.cp-login-body {
  background: var(--cp-sidebar);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cp-login-wrap { width: 100%; max-width: 400px; }
.cp-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.cp-login-brand-name { font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.85); }
.cp-login-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}
.cp-login-tab {
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--cp-transition);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: 'Inter', sans-serif;
}
.cp-login-tab.active { color: var(--cp-gold); border-bottom-color: var(--cp-gold); }
.cp-login-form-section { display: none; }
.cp-login-form-section.active { display: block; }
.cp-login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cp-login-field label { font-size: 0.75rem; font-weight: 500; color: rgba(255,255,255,0.5); }
.cp-login-field input {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--cp-radius);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
}
.cp-login-field input:focus { outline: none; border-color: var(--cp-gold); }
.cp-login-field input::placeholder { color: rgba(255,255,255,0.2); }
.cp-login-btn {
  width: 100%;
  padding: 11px;
  background: var(--cp-gold);
  color: #fff;
  border: none;
  border-radius: var(--cp-radius);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  margin-top: 6px;
  transition: background var(--cp-transition);
}
.cp-login-btn:hover { background: #a07c3a; }
.cp-login-alert {
  padding: 10px 14px;
  border-radius: var(--cp-radius);
  font-size: 0.8rem;
  margin-bottom: 16px;
}
.cp-login-alert.error   { background: rgba(239,68,68,0.15); color: #fca5a5; }
.cp-login-alert.success { background: rgba(34,197,94,0.15); color: #86efac; }
.cp-login-back {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  justify-content: center;
}
.cp-login-back:hover { color: rgba(255,255,255,0.6); }
.cp-login-back svg { width: 13px; height: 13px; }

/* ─────────────────────────────────
   RESPONSIVE
───────────────────────────────── */
@media (max-width: 1023px) {
  .cp-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .cp-sidebar.is-open { transform: translateX(0); }
  .cp-main { margin-left: 0; }
  .cp-menu-toggle { display: flex; }
  .cp-topbar { padding: 0 16px; }
  .cp-content { padding: 16px; }
}
@media (max-width: 639px) {
  .cp-stats-grid { grid-template-columns: 1fr 1fr; }
  .cp-form-row { grid-template-columns: 1fr; }
  .cp-booking-hero-meta { gap: 12px; }
}

/* ─────────────────────────────────
   UTILITY
───────────────────────────────── */
.cp-divider { height: 1px; background: var(--cp-border); margin: 16px 0; }
.cp-text-muted { color: var(--cp-muted); font-size: 0.82rem; }
.cp-text-gold  { color: var(--cp-gold); }

/* Toast */
@keyframes cpToastIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ─────────────────────────────────
   TOAST NOTIFICATIONS (portal.js)
───────────────────────────────── */
#cp-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.cp-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--cp-radius);
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  font-size: 0.82rem;
  color: var(--cp-text);
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cp-toast.show  { opacity: 1; transform: translateY(0); }
.cp-toast.hide  { opacity: 0; transform: translateY(8px); }
.cp-toast svg   { width: 16px; height: 16px; flex-shrink: 0; }
.cp-toast span  { flex: 1; }
.cp-toast-close { background: none; border: none; padding: 0; cursor: pointer; color: var(--cp-muted); display: flex; }
.cp-toast-close:hover { color: var(--cp-text); }
.cp-toast-success svg { color: #4ade80; }
.cp-toast-error   svg { color: #f87171; }
.cp-toast-info    svg { color: var(--cp-primary); }
.cp-toast-warning svg { color: var(--cp-gold); }

/* ─────────────────────────────────
   REQUEST TYPE LABEL
───────────────────────────────── */
.cp-request-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
}
.cp-request-type svg { width: 13px; height: 13px; color: var(--cp-muted); }

/* ─────────────────────────────────
   INFO BANNER
───────────────────────────────── */
.cp-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
}
.cp-info-banner svg { width: 18px; height: 18px; margin-top: 1px; }

/* ─────────────────────────────────
   TAB BAR
───────────────────────────────── */
.cp-tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cp-tab {
  padding: 6px 16px;
  border-radius: calc(var(--cp-radius) - 2px);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--cp-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.cp-tab:hover  { color: var(--cp-text); }
.cp-tab.active { background: var(--cp-primary); color: #fff; }

/* ─────────────────────────────────
   MODAL
───────────────────────────────── */
.cp-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cp-modal-overlay.open { display: flex; }
.cp-modal {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.cp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cp-border);
}
.cp-modal-title { font-weight: 600; font-size: 0.9rem; }
.cp-modal-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--cp-muted);
  display: flex;
  border-radius: 6px;
}
.cp-modal-close:hover { background: var(--cp-border); color: var(--cp-text); }
.cp-modal-close svg { width: 16px; height: 16px; }
.cp-modal-body {
  padding: 20px;
}
.cp-modal-body .cp-form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--cp-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cp-modal-body textarea {
  width: 100%;
  background: var(--cp-bg);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  color: var(--cp-text);
  font-size: 0.85rem;
  padding: 10px 12px;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.cp-modal-body textarea:focus {
  outline: none;
  border-color: var(--cp-primary);
}
.cp-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--cp-border);
}

/* Spinning animation for loader icon */
@keyframes cpSpin { to { transform: rotate(360deg); } }
.cp-spin { animation: cpSpin 0.8s linear infinite; display: inline-block; }

/* Mobile sidebar open class (portal.js uses .open not .is-open on small screens) */
@media (max-width: 1023px) {
  .cp-sidebar.open { transform: translateX(0) !important; }
  .cp-sidebar-overlay.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
  }
}

/* Link style */
.cp-link { color: var(--cp-primary); text-decoration: none; }
.cp-link:hover { text-decoration: underline; }

/* Empty state */
.cp-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}
