/* CP Design — shared tokens & components (ported from the Rovv admin panel) */
:root {
  --cp-primary: #8B31C9;
  --cp-primary-rgb: 139, 49, 201;
  --cp-primary-dark: #6f22a6;
  --cp-heading: #1a1d21;
  --cp-body: #495057;
  --cp-muted: #6c757d;
  --cp-faint: #9ca3af;
  --cp-border: #f0f0f0;
  --cp-border-strong: #e5e7eb;
  --cp-bg: #f5f6fa;
  --cp-surface: #fff;
  --cp-surface-alt: #fafbfc;
  --cp-green: #2ab57d;
  --cp-green-rgb: 42, 181, 125;
  --cp-orange: #f59e0b;
  --cp-red: #ef4444;
  --cp-blue: #3b82f6;
  --cp-radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cp-bg); color: var(--cp-body);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--cp-primary); }
img { max-width: 100%; }
h1, h2, h3, h4, h5, h6 { color: var(--cp-heading); margin: 0; }
.hidden { display: none !important; }
.overflow-hidden { overflow: hidden; }
.cp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.cp-muted { color: var(--cp-muted); }
.cp-small { font-size: 12.5px; }
.cp-nowrap { white-space: nowrap; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.cp-animate-card { animation: fadeInUp 0.5s ease both; animation-delay: 0.05s; }

/* ─── Layout ─── */
.cp-container { max-width: 1240px; margin: 0 auto; padding: 24px 16px 48px; }
.cp-topbar { background: var(--cp-surface); border-bottom: 1px solid var(--cp-border); position: sticky; top: 0; z-index: 50; }
.cp-topbar-inner { max-width: 1240px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.cp-brand-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--cp-primary), var(--cp-primary-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; letter-spacing: .5px; }
.cp-brand-name { font-weight: 700; color: var(--cp-heading); font-size: 15px; line-height: 1.2; }
.cp-brand-sub { font-size: 12px; color: var(--cp-muted); }
.cp-topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-brand-logo { height: 28px; width: auto; flex-shrink: 0; }
.cp-brand-divider { padding-left: 12px; border-left: 1px solid var(--cp-border-strong); min-width: 0; }

/* ─── Page Header ─── */
.cp-dash-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; animation: fadeInUp 0.5s ease both; }
.cp-dash-title { font-size: 22px; font-weight: 700; color: var(--cp-heading); margin-bottom: 4px; letter-spacing: -0.3px; }
.cp-dash-subtitle { font-size: 14px; color: var(--cp-muted); margin: 0; }
.cp-dash-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ─── Card ─── */
.cp-card { background: var(--cp-surface); border-radius: var(--cp-radius); border: 1px solid var(--cp-border); overflow: hidden; transition: box-shadow 0.3s ease; }
.cp-card:hover { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04); }
.cp-card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid #f5f5f5; flex-wrap: wrap; gap: 12px; }
.cp-card-header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cp-card-header-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: rgba(var(--cp-primary-rgb), 0.1); color: var(--cp-primary); flex-shrink: 0; }
.cp-card-title { font-size: 15px; font-weight: 600; color: var(--cp-heading); margin: 0; }
.cp-card-subtitle { font-size: 12.5px; color: var(--cp-muted); margin: 2px 0 0; }
.cp-card-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-card-body { padding: 24px; }
.cp-card-body--flush { padding: 0; }
.cp-card-footer { padding: 16px 24px; border-top: 1px solid #f5f5f5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--cp-surface-alt); }
.cp-results-count { font-size: 12px; color: var(--cp-faint); background: #f3f4f6; padding: 3px 10px; border-radius: 20px; font-weight: 500; }

/* ─── Stats ─── */
.cp-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.cp-stat-card { background: var(--cp-surface); border-radius: var(--cp-radius); padding: 20px 22px; position: relative; overflow: hidden; border: 1px solid var(--cp-border); transition: all 0.3s ease; display: flex; flex-direction: column; animation: fadeInUp 0.5s ease both; }
.cp-stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); }
.cp-stat-card--hero { background: linear-gradient(135deg, var(--cp-primary), rgba(var(--cp-primary-rgb), 0.85)); color: #fff; border: none; }
.cp-stat-card--hero .cp-stat-value, .cp-stat-card--hero .cp-stat-label, .cp-stat-card--hero .cp-stat-meta { color: #fff; }
.cp-stat-card--hero .cp-stat-label, .cp-stat-card--hero .cp-stat-meta { opacity: .85; }
.cp-stat-card--hero .cp-stat-icon-wrap { background: rgba(255, 255, 255, 0.2); color: #fff; }
.cp-stat-icon-wrap { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; margin-bottom: 14px; transition: transform .3s ease; }
.cp-stat-card:hover .cp-stat-icon-wrap { transform: scale(1.08); }
.cp-stat-icon--green { background: rgba(var(--cp-green-rgb), 0.1); color: var(--cp-green); }
.cp-stat-icon--primary { background: rgba(var(--cp-primary-rgb), 0.1); color: var(--cp-primary); }
.cp-stat-icon--orange { background: rgba(245, 158, 11, 0.1); color: var(--cp-orange); }
.cp-stat-icon--blue { background: rgba(59, 130, 246, 0.1); color: var(--cp-blue); }
.cp-stat-label { font-size: 12px; color: var(--cp-muted); text-transform: uppercase; font-weight: 600; letter-spacing: 0.3px; display: block; margin-bottom: 6px; }
.cp-stat-value { font-size: 26px; font-weight: 700; color: var(--cp-heading); margin: 0 0 6px; letter-spacing: -0.3px; line-height: 1.15; }
.cp-stat-value--sm { font-size: 18px; }
.cp-stat-meta { font-size: 12.5px; color: var(--cp-muted); }
.cp-stat-pct { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 100px; background: rgba(var(--cp-green-rgb), 0.1); color: var(--cp-green); }

/* ─── Tabs ─── */
.cp-tabs { display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--cp-border); background: var(--cp-surface); border-radius: var(--cp-radius) var(--cp-radius) 0 0; scrollbar-width: none; }
.cp-tabs::-webkit-scrollbar { display: none; }
.cp-tab { display: inline-flex; align-items: center; gap: 7px; padding: 14px 20px; font-size: 13.5px; font-weight: 600; color: var(--cp-muted); background: none; border: none; border-bottom: 3px solid transparent; cursor: pointer; transition: all .2s; white-space: nowrap; font-family: inherit; text-decoration: none; }
.cp-tab:hover { color: var(--cp-heading); background: var(--cp-surface-alt); }
.cp-tab--active { color: var(--cp-primary); border-bottom-color: var(--cp-primary); }
.cp-tab i { font-size: 16px; }
.cp-tab-count { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 20px; background: #f3f4f6; color: var(--cp-muted); }
.cp-tab--active .cp-tab-count { background: rgba(var(--cp-primary-rgb), .1); color: var(--cp-primary); }
.cp-tab-panel { display: none; }
/* opacity-only and no fill-mode: a lingering transform/opacity would trap the panel's modals under the sticky top bar */
@keyframes cpFadeIn { from { opacity: 0; } to { opacity: 1; } }
.cp-tab-panel--active { display: block; animation: cpFadeIn .3s ease; }

/* ─── Forms ─── */
.cp-form-group { display: flex; flex-direction: column; gap: 6px; }
.cp-form-label { font-size: 13px; font-weight: 600; color: var(--cp-body); }
.cp-form-label .cp-req { color: var(--cp-red); }
.cp-form-hint { font-size: 12px; color: var(--cp-muted); margin: 0; }
.cp-form-input, .cp-form-select, .cp-form-textarea {
  padding: 11px 14px; border: 1.5px solid var(--cp-border-strong); border-radius: 10px; font-size: 14px;
  color: var(--cp-body); background: #fff; transition: all 0.2s ease; outline: none; width: 100%; font-family: inherit;
}
.cp-form-textarea { resize: vertical; min-height: 96px; }
.cp-form-input:focus, .cp-form-select:focus, .cp-form-textarea:focus { border-color: var(--cp-primary); box-shadow: 0 0 0 3px rgba(var(--cp-primary-rgb), 0.1); }
.cp-form-input::placeholder, .cp-form-textarea::placeholder { color: #c4c9d2; }
.cp-form-select--sm, .cp-form-input--sm { padding: 7px 10px; font-size: 13px; border-radius: 8px; }
.cp-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cp-form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cp-form-stack { display: flex; flex-direction: column; gap: 18px; }
.cp-input-group { display: flex; align-items: stretch; }
.cp-input-addon { display: flex; align-items: center; padding: 0 12px; background: #f8f9fa; border: 1.5px solid var(--cp-border-strong); border-left: none; border-radius: 0 10px 10px 0; color: var(--cp-muted); font-weight: 600; font-size: 13px; }
.cp-input-group .cp-form-input { border-radius: 10px 0 0 10px; }

/* Choice cards (radio / checkbox) */
.cp-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cp-choices--wide { grid-template-columns: 1fr; }
.cp-choice { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--cp-border-strong); border-radius: 10px; cursor: pointer; transition: all .2s ease; background: #fff; font-size: 14px; color: var(--cp-body); user-select: none; }
.cp-choice:hover { border-color: rgba(var(--cp-primary-rgb), .45); }
.cp-choice input { accent-color: var(--cp-primary); width: 17px; height: 17px; margin: 0; flex-shrink: 0; }
.cp-choice:has(input:checked) { border-color: var(--cp-primary); background: rgba(var(--cp-primary-rgb), 0.05); color: var(--cp-heading); font-weight: 600; box-shadow: 0 0 0 3px rgba(var(--cp-primary-rgb), 0.08); }
.cp-choice-letter { width: 26px; height: 26px; border-radius: 7px; background: #f3f4f6; color: var(--cp-muted); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cp-choice:has(input:checked) .cp-choice-letter { background: var(--cp-primary); color: #fff; }

/* File input */
.cp-file { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed #d8dbe0; border-radius: 12px; background: var(--cp-surface-alt); transition: all .2s; }
.cp-file:hover, .cp-file:focus-within { border-color: var(--cp-primary); background: rgba(var(--cp-primary-rgb), .03); }
.cp-file-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(var(--cp-primary-rgb), .1); color: var(--cp-primary); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.cp-file input[type=file] { font-size: 13px; color: var(--cp-muted); width: 100%; font-family: inherit; }
.cp-file input[type=file]::file-selector-button { border: 1.5px solid var(--cp-border-strong); background: #fff; color: var(--cp-heading); padding: 7px 14px; border-radius: 8px; font-weight: 600; margin-right: 10px; cursor: pointer; font-family: inherit; }

/* Toggle switch */
.cp-toggle-label { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.cp-toggle-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cp-toggle-switch { position: relative; width: 42px; height: 24px; background: #e5e7eb; border-radius: 12px; transition: all 0.25s ease; flex-shrink: 0; }
.cp-toggle-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: all 0.25s ease; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.cp-toggle-input:checked + .cp-toggle-switch { background: var(--cp-green); }
.cp-toggle-input:checked + .cp-toggle-switch::after { transform: translateX(18px); }
.cp-toggle-status { font-size: 13px; font-weight: 600; color: var(--cp-muted); }
.cp-toggle-status--active { color: var(--cp-green); }

/* ─── Buttons ─── */
.cp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none; transition: all 0.25s ease; border: none; cursor: pointer; white-space: nowrap; font-family: inherit; line-height: 1.3; }
.cp-btn i { font-size: 16px; }
.cp-btn--sm { padding: 8px 14px; font-size: 13px; }
.cp-btn--lg { padding: 13px 26px; font-size: 15px; }
.cp-btn--block { width: 100%; }
.cp-btn--primary { background: var(--cp-primary); color: #fff; box-shadow: 0 4px 14px rgba(var(--cp-primary-rgb), 0.25); }
.cp-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(var(--cp-primary-rgb), 0.35); color: #fff; }
.cp-btn--success { background: var(--cp-green); color: #fff; box-shadow: 0 4px 14px rgba(var(--cp-green-rgb), 0.25); }
.cp-btn--success:hover { transform: translateY(-2px); color: #fff; }
.cp-btn--danger { background: var(--cp-red); color: #fff; }
.cp-btn--danger:hover { background: #dc2626; color: #fff; }
.cp-btn--outline { background: #fff; border: 1.5px solid var(--cp-border-strong); color: var(--cp-body); }
.cp-btn--outline:hover { border-color: var(--cp-primary); color: var(--cp-primary); background: rgba(var(--cp-primary-rgb), 0.04); }
.cp-btn--ghost { background: transparent; color: var(--cp-muted); }
.cp-btn--ghost:hover { color: var(--cp-heading); background: #f1f3f5; }
.cp-btn--soft { background: rgba(var(--cp-primary-rgb), .1); color: var(--cp-primary); }
.cp-btn--soft:hover { background: rgba(var(--cp-primary-rgb), .16); color: var(--cp-primary); }
.cp-btn:disabled, .cp-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none; }

.cp-action-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-action-btn { width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; border: none; cursor: pointer; font-size: 16px; transition: all 0.2s ease; text-decoration: none; flex-shrink: 0; }
.cp-action-btn:hover { transform: translateY(-2px); }
.cp-action-btn--info { background: #eff6ff; color: #3b82f6; }
.cp-action-btn--info:hover { background: #dbeafe; }
.cp-action-btn--edit { background: #fff7ed; color: #f59e0b; }
.cp-action-btn--edit:hover { background: #fef3c7; }
.cp-action-btn--success { background: #ecfdf5; color: #10b981; }
.cp-action-btn--success:hover { background: #d1fae5; }
.cp-action-btn--promo { background: #f3e8ff; color: var(--cp-primary); }
.cp-action-btn--promo:hover { background: #ede9fe; }
.cp-action-btn--dark { background: #f3f4f6; color: #374151; }
.cp-action-btn--dark:hover { background: #e5e7eb; }

/* ─── Badges ─── */
.cp-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.cp-badge--green { background: rgba(var(--cp-green-rgb), 0.1); color: var(--cp-green); }
.cp-badge--gray { background: #f1f3f4; color: var(--cp-muted); }
.cp-badge--primary { background: rgba(var(--cp-primary-rgb), 0.1); color: var(--cp-primary); }
.cp-badge--orange { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.cp-badge--blue { background: rgba(59, 130, 246, 0.1); color: var(--cp-blue); }
.cp-badge--red { background: rgba(239, 68, 68, 0.1); color: var(--cp-red); }
.cp-badge--dark { background: #1f2937; color: #fff; }

/* ─── Table ─── */
.cp-table-wrap { overflow-x: auto; }
.cp-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.cp-table thead th { font-size: 11.5px; font-weight: 700; color: var(--cp-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 13px 18px; border-bottom: 1px solid var(--cp-border); white-space: nowrap; text-align: left; background: var(--cp-surface-alt); }
.cp-table tbody td { padding: 14px 18px; font-size: 13.5px; color: var(--cp-body); border-bottom: 1px solid #f6f6f6; vertical-align: middle; transition: background 0.15s ease; }
.cp-table tbody tr:last-child td { border-bottom: none; }
.cp-table tbody tr.cp-row:hover td { background: #f8fafc; }
.cp-table input[type=checkbox] { accent-color: var(--cp-primary); width: 16px; height: 16px; }
.cp-person { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.cp-avatar { position: relative; width: 38px; height: 38px; border-radius: 50%; background: rgba(var(--cp-primary-rgb), .1); color: var(--cp-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; overflow: hidden; }
.cp-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cp-person-name { font-weight: 600; color: var(--cp-heading); line-height: 1.3; }
.cp-person-meta { font-size: 12px; color: var(--cp-muted); line-height: 1.4; }
.cp-ellipsis { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-table .cp-action-buttons { flex-wrap: nowrap; }
.cp-details-row td { background: var(--cp-surface-alt) !important; padding: 0 !important; }
.cp-details { padding: 20px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 28px; }
.cp-detail-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #ebebeb; }
.cp-detail-key { font-size: 12px; color: var(--cp-muted); font-weight: 500; white-space: nowrap; min-width: 92px; }
.cp-detail-val { font-size: 13px; color: var(--cp-heading); font-weight: 500; margin-left: auto; text-align: right; word-break: break-word; }
.cp-details-wide { grid-column: 1 / -1; }

/* ─── Filters / Search ─── */
.cp-search-box { position: relative; }
.cp-search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--cp-faint); pointer-events: none; }
.cp-search-input { padding: 9px 14px 9px 36px; border: 1.5px solid var(--cp-border-strong); border-radius: 10px; font-size: 13px; color: var(--cp-body); background: #fff; outline: none; width: 240px; transition: all 0.2s ease; font-family: inherit; }
.cp-search-input:focus { border-color: var(--cp-primary); box-shadow: 0 0 0 3px rgba(var(--cp-primary-rgb), 0.08); width: 280px; }
.cp-filter-panel { padding: 20px 24px; background: var(--cp-surface-alt); border-bottom: 1px solid var(--cp-border); }
.cp-filter-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.cp-filter-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.cp-bulk-bar { display: flex; align-items: center; gap: 10px; padding: 12px 24px; background: rgba(var(--cp-primary-rgb), .06); border-bottom: 1px solid rgba(var(--cp-primary-rgb), .15); flex-wrap: wrap; }
.cp-bulk-bar strong { color: var(--cp-primary); }

/* ─── Pagination ─── */
.cp-pagination { display: flex; gap: 6px; align-items: center; }
.cp-page-btn { min-width: 34px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--cp-border-strong); background: #fff; color: var(--cp-body); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; text-decoration: none; transition: all .2s; }
.cp-page-btn:hover { border-color: var(--cp-primary); color: var(--cp-primary); }
.cp-page-btn--disabled { opacity: .45; pointer-events: none; }

/* ─── Empty / Alert / Notice ─── */
.cp-empty-state { text-align: center; padding: 56px 16px; }
.cp-empty-icon { width: 76px; height: 76px; background: linear-gradient(135deg, #f3f4f6, #e5e7eb); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; color: var(--cp-faint); margin-bottom: 14px; }
.cp-empty-state h5 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.cp-empty-state p { color: var(--cp-muted); font-size: 14px; margin: 0; }
.cp-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 10px; font-size: 13.5px; }
.cp-alert i { font-size: 18px; flex-shrink: 0; line-height: 1.2; }
.cp-alert--error { background: #fff2f0; border: 1px solid #ffccc7; color: #cf1322; }
.cp-alert--success { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.cp-alert--warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.cp-alert--info { background: rgba(var(--cp-primary-rgb), .05); border: 1px solid rgba(var(--cp-primary-rgb), .18); color: #5b1f86; }
.cp-section-label { font-size: 12px; font-weight: 700; color: var(--cp-faint); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--cp-border); }

/* ─── Modal ─── */
.cp-modal-overlay { position: fixed; inset: 0; background: rgba(17, 12, 28, .5); z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cp-modal { background: #fff; border-radius: var(--cp-radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .18); max-width: 520px; width: 100%; max-height: 92vh; overflow-y: auto; animation: fadeInUp .3s ease both; }
.cp-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--cp-border); }
.cp-modal-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.cp-modal-body { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.cp-modal-footer { padding: 16px 22px; border-top: 1px solid var(--cp-border); display: flex; justify-content: flex-end; gap: 10px; background: var(--cp-surface-alt); }
.cp-modal-close { background: none; border: 1px solid var(--cp-border); border-radius: 8px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; color: var(--cp-muted); transition: all .15s; }
.cp-modal-close:hover { color: var(--cp-heading); background: #f5f5f5; }

/* ─── Toast ─── */
.cp-toast { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); max-width: min(440px, calc(100vw - 40px)); animation: fadeInUp .35s ease both; }
.cp-toast--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.cp-toast--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.cp-toast i:first-child { font-size: 20px; flex-shrink: 0; }
.cp-toast-close { background: none; border: none; cursor: pointer; color: inherit; opacity: .5; font-size: 18px; padding: 0; margin-left: 4px; }
.cp-toast-close:hover { opacity: 1; }

/* ─── Stepper (public form) ─── */
.cp-stepper { display: flex; align-items: center; gap: 6px; }
.cp-step { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.cp-step-dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; background: #f1f3f5; color: var(--cp-faint); flex-shrink: 0; transition: all .25s ease; }
.cp-step-line { height: 3px; border-radius: 3px; background: #eceef1; flex: 1; transition: background .25s ease; }
.cp-step--done .cp-step-dot { background: var(--cp-green); color: #fff; }
.cp-step--done .cp-step-line { background: var(--cp-green); }
.cp-step--active .cp-step-dot { background: var(--cp-primary); color: #fff; box-shadow: 0 0 0 4px rgba(var(--cp-primary-rgb), .15); }
.cp-step:last-child { flex: 0 0 auto; }
.cp-progress { height: 6px; border-radius: 6px; background: #eceef1; overflow: hidden; }
.cp-progress-fill { height: 100%; background: linear-gradient(90deg, var(--cp-primary), #b46be6); border-radius: 6px; transition: width .4s cubic-bezier(.16,1,.3,1); }

/* Timeline list */
.cp-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.cp-timeline li { display: flex; gap: 12px; align-items: flex-start; }
.cp-timeline-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; background: rgba(var(--cp-primary-rgb), .1); color: var(--cp-primary); }
.cp-timeline-title { font-weight: 600; color: var(--cp-heading); font-size: 13.5px; }
.cp-timeline-text { font-size: 12.5px; color: var(--cp-muted); margin: 2px 0 0; }

/* Notice page (success / blocked / etc.) */
.cp-notice-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.cp-notice { max-width: 480px; width: 100%; text-align: center; padding: 36px 28px; }
.cp-notice-icon { width: 72px; height: 72px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 18px; }
.cp-notice-icon--success { background: rgba(var(--cp-green-rgb), .12); color: var(--cp-green); }
.cp-notice-icon--error { background: rgba(239, 68, 68, .1); color: var(--cp-red); }
.cp-notice-icon--info { background: rgba(var(--cp-primary-rgb), .1); color: var(--cp-primary); }
.cp-notice h1 { font-size: 22px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.3px; }
.cp-notice p { color: var(--cp-muted); margin: 0 0 14px; }
.cp-notice-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .cp-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 768px) {
  .cp-container { padding: 16px 16px 40px; }
  .cp-card-header { padding: 14px 16px; }
  .cp-card-body { padding: 18px 16px; }
  .cp-card-footer { padding: 14px 16px; }
  .cp-filter-panel { padding: 16px; }
  .cp-bulk-bar { padding: 12px 16px; }
  .cp-search-input, .cp-search-input:focus { width: 100%; }
  .cp-card-actions, .cp-search-box { width: 100%; }
  .cp-form-grid, .cp-form-grid--3 { grid-template-columns: 1fr; }
  .cp-hide-mobile { display: none !important; }
  .cp-stat-card { padding: 16px; }
  .cp-stat-value { font-size: 22px; }
  .cp-tab { padding: 12px 14px; font-size: 13px; }
  .cp-table thead th, .cp-table tbody td { padding: 11px 12px; }
  .cp-modal-body { padding: 18px; }
}
@media (max-width: 520px) {
  .cp-brand { gap: 8px; }
  .cp-brand-logo { height: 22px; }
  .cp-brand-divider { padding-left: 8px; }
  .cp-brand-divider .cp-brand-name { font-size: 12.5px; white-space: nowrap; }
  .cp-brand-divider .cp-brand-sub, .cp-brand-divider br { display: none; }
  .cp-show-xs { display: inline !important; }
  .cp-hide-xs { display: none !important; }
}
.cp-show-xs { display: none; }
@media (max-width: 360px) {
  .cp-brand-logo { height: 19px; }
  .cp-brand-divider .cp-brand-name { font-size: 12px; }
  .cp-show-xs { display: none !important; }
}
@media (max-width: 480px) {
  .cp-stats-grid { grid-template-columns: 1fr; }
  .cp-step-line { display: none; }
  .cp-stepper { justify-content: space-between; }
  .cp-step { flex: 0 0 auto; }
}
