/* ==========================================================================
   COUPER - Authentication & Admin System (Nível 1 & Nível 2)
   Ultra-modern, responsive design adhering to COUPER Luxury Eyewear aesthetic
   ========================================================================== */

/* --- OVERLAY MODALS & CONTAINERS --- */
.cp-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
  overflow-y: auto;
}

.cp-modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

.cp-modal-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: scale(0.95) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.cp-modal-overlay.active .cp-modal-card {
  transform: scale(1) translateY(0);
}

/* Close Button */
.cp-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4b5563;
  transition: all 0.2s;
  z-index: 10;
}

.cp-modal-close:hover {
  background: #000;
  color: #fff;
  transform: rotate(90deg);
}

/* Modal Header */
.cp-modal-header {
  padding: 28px 28px 16px;
  text-align: center;
  border-bottom: 1px solid #f1f2f4;
  position: relative;
}

.cp-modal-logo {
  height: 28px;
  margin-bottom: 12px;
  object-fit: contain;
}

.cp-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.cp-modal-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
}

/* Modal Body */
.cp-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

/* Quick Access / Demo Pills */


/* Tabs Switcher */
.cp-tabs-nav {
  display: flex;
  border-bottom: 2px solid #f1f2f4;
  margin-bottom: 20px;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cp-tabs-nav::-webkit-scrollbar {
  display: none;
}

.cp-tab-btn {
  flex: 1;
  padding: 10px 12px;
  background: none;
  border: none;
  font-size: 0.86rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.cp-tab-btn svg {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.cp-tab-btn:hover {
  color: #0f172a;
}

.cp-tab-btn.active {
  color: #0f172a;
  font-weight: 700;
}

.cp-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #0f172a;
}

/* Forms */
.cp-form-group {
  margin-bottom: 16px;
}

.cp-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.cp-input, .cp-select, .cp-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #111827;
  background: #fff;
  transition: all 0.2s;
  font-family: inherit;
}

.cp-input:focus, .cp-select:focus, .cp-textarea:focus {
  outline: none;
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.cp-textarea {
  resize: vertical;
  min-height: 80px;
}

.cp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cp-btn-primary {
  width: 100%;
  padding: 14px 20px;
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.cp-btn-primary:hover {
  background: #262626;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.cp-btn-secondary {
  padding: 10px 16px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cp-btn-secondary:hover {
  background: #e5e7eb;
  color: #111827;
}

.cp-btn-danger {
  padding: 8px 12px;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cp-btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

/* Badges */
.cp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cp-badge--admin {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.cp-badge--user {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.cp-badge--status-pago {
  background: #dcfce7;
  color: #15803d;
}

.cp-badge--status-separacao {
  background: #fef9c3;
  color: #a16207;
}

.cp-badge--status-enviado {
  background: #e0e7ff;
  color: #4338ca;
}

.cp-badge--status-entregue {
  background: #d1fae5;
  color: #047857;
}

.cp-badge--status-aguardando {
  background: #ffedd5;
  color: #c2410c;
}

.cp-badge--status-cancelado {
  background: #fee2e2;
  color: #b91c1c;
}

/* ==========================================================================
   PAINEL CLIENTE (NÍVEL 1)
   ========================================================================== */
.cp-user-panel-card {
  max-width: 680px;
}

.cp-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
}

.cp-profile-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cp-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.cp-profile-name {
  font-weight: 700;
  font-size: 1rem;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cp-profile-email {
  font-size: 0.82rem;
  color: #6b7280;
}

/* Orders Cards (User view) */
.cp-order-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  background: #fff;
  transition: all 0.2s;
}

.cp-order-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.cp-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f2f4;
  padding-bottom: 10px;
  margin-bottom: 12px;
  font-size: 0.82rem;
}

.cp-order-id {
  font-weight: 700;
  color: #111827;
}

.cp-order-date {
  color: #6b7280;
}

.cp-order-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.cp-order-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cp-order-item-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.cp-order-item-desc {
  flex: 1;
}

.cp-order-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
}

.cp-order-item-variant {
  font-size: 0.75rem;
  color: #64748b;
}

.cp-order-item-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.cp-order-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed #e2e8f0;
  padding-top: 10px;
  font-size: 0.85rem;
}

.cp-tracking-pill {
  font-size: 0.75rem;
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   PAINEL ADMINISTRATIVO (NÍVEL 2 - FULL DASHBOARD)
   ========================================================================== */
.cp-admin-modal-card {
  max-width: 1280px;
  height: 94vh;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  color: #f8fafc;
}

.cp-admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  flex-shrink: 0;
}

.cp-admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cp-admin-brand img {
  height: 24px;
  filter: brightness(0) invert(1);
}

.cp-admin-brand-tag {
  background: #7c3aed;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.cp-admin-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cp-btn-store-preview {
  background: #334155;
  color: #f8fafc;
  border: 1px solid #475569;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.cp-btn-store-preview:hover {
  background: #475569;
}

.cp-admin-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.cp-admin-sidebar {
  width: 250px;
  background: #111827;
  border-right: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  flex-shrink: 0;
  overflow-y: auto;
}

.cp-admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.cp-admin-nav-item:hover {
  background: #1e293b;
  color: #f8fafc;
}

.cp-admin-nav-item.active {
  background: #3b82f6;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.cp-admin-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.cp-admin-nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
}

/* Main Content Area */
.cp-admin-content {
  flex: 1;
  min-height: 0;
  background: #f8fafc;
  color: #0f172a;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.cp-admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.cp-admin-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cp-admin-section-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
}

/* Metrics Cards */
.cp-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.cp-metric-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cp-metric-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.cp-metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.cp-metric-sub {
  font-size: 0.75rem;
  color: #10b981;
  margin-top: 6px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Table Design */
.cp-table-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.cp-table-toolbar {
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.cp-table-search {
  max-width: 320px;
  position: relative;
}

.cp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.cp-table th {
  background: #f8fafc;
  padding: 12px 18px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
}

.cp-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #1e293b;
}

.cp-table tr:hover td {
  background: #f8fafc;
}

.cp-customer-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cp-customer-name {
  font-weight: 700;
  color: #0f172a;
}

.cp-customer-meta {
  font-size: 0.75rem;
  color: #64748b;
}

.cp-order-items-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cp-order-mini-thumb {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: #f1f5f9;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

/* Status Selector inside table */
.cp-status-select {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
}

/* Product & Review Cards Grid in Admin */
.cp-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.cp-admin-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  position: relative;
  transition: all 0.2s;
}

.cp-admin-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.cp-admin-card-img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 12px;
}

.cp-admin-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.cp-admin-card-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 12px;
}

.cp-admin-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

/* Video Preview Box */
.cp-video-preview-box {
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.cp-video-preview-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Switch Toggle */
.cp-switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
}

.cp-switch-input {
  appearance: none;
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 9999px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.cp-switch-input:checked {
  background: #10b981;
}

.cp-switch-input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: all 0.2s;
}

.cp-switch-input:checked::after {
  transform: translateX(20px);
}

/* Order Details Drawer / Modal */
.cp-order-details-card {
  max-width: 600px;
}

.cp-receipt-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  font-family: var(--font-secondary);
}

.cp-receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 6px 0;
  border-bottom: 1px solid #edf2f7;
}

.cp-receipt-row--total {
  border-bottom: none;
  font-size: 1.05rem;
  font-weight: 800;
  padding-top: 10px;
}

/* Quick Checkout Modal */
.cp-checkout-card {
  max-width: 540px;
}

/* Mobile Responsive */
@media (max-width: 860px) {
  .cp-admin-modal-card {
    height: 98vh;
    border-radius: 0;
  }
  .cp-admin-layout {
    flex-direction: column;
  }
  .cp-admin-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid #1f2937;
    padding: 8px;
  }
  .cp-admin-nav-item {
    white-space: nowrap;
    padding: 8px 12px;
  }
  .cp-admin-content {
    padding: 16px;
  }
  .cp-form-row {
    grid-template-columns: 1fr;
  }
}


/* Enhanced User Account & Checkout UI */
.cp-user-panel-card {
  max-width: 740px !important;
}

.cp-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cp-btn-edit-profile {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1f2937;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.cp-btn-edit-profile:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.cp-chk-items-preview {
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 12px;
}

/* Status Badges */
.cp-badge--status-processando {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

.cp-badge--status-em_transito, .cp-badge--status-enviado {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

.cp-badge--status-saiu_entrega {
  background: #ede9fe !important;
  color: #6d28d9 !important;
  border: 1px solid #ddd6fe !important;
}

.cp-badge--status-entregue {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
}

/* Delivery Progress Stepper */
.cp-order-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 12px;
  position: relative;
  padding: 0 8px;
}

.cp-order-stepper::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: #e2e8f0;
  z-index: 0;
}

.cp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  gap: 5px;
}

.cp-step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #cbd5e1;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2.5px solid #ffffff;
  transition: all 0.3s;
}

.cp-step.completed .cp-step-dot {
  background: #10b981;
}

.cp-step.active .cp-step-dot {
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
  animation: pulse-dot 1.8s infinite;
}

.cp-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.cp-step.active .cp-step-label {
  color: #0f172a;
  font-weight: 700;
}

.cp-step.completed .cp-step-label {
  color: #10b981;
}

@keyframes pulse-dot {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.cp-order-status-msg {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 12px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cp-order-status-msg.status-processando, .cp-order-status-msg.status-separacao {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
}

.cp-order-status-msg.status-em_transito, .cp-order-status-msg.status-enviado {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1e40af;
}

.cp-order-status-msg.status-saiu_entrega {
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  color: #5b21b6;
}

.cp-order-status-msg.status-entregue {
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  color: #065f46;
}

.cp-order-status-msg.status-pago {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  color: #15803d;
}

.cp-order-status-msg.status-cancelado {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #991b1b;
}

.cp-tracking-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
}

/* ==========================================================================
   NOTIFICATIONS BELL & DROPDOWN (IMAGE 2 MATCH)
   ========================================================================== */
.cp-notifications-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cp-btn-bell {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.cp-btn-bell:hover {
  background: #334155;
  color: #f8fafc;
  border-color: #475569;
}

.cp-btn-bell.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
}

.cp-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f172a;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
}

.cp-notifications-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 390px;
  max-width: 90vw;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.65), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notifFadeIn 0.18s ease-out;
}

@keyframes notifFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.cp-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid #1e293b;
}

.cp-notif-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.2px;
}

.cp-notif-mark-read-btn {
  background: none;
  border: none;
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.cp-notif-mark-read-btn:hover {
  color: #34d399;
  text-decoration: underline;
}

.cp-notif-filters {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  background: #0b1329;
  border-bottom: 1px solid #1e293b;
  overflow-x: auto;
}

.cp-notif-filter-pill {
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cp-notif-filter-pill:hover {
  background: #334155;
  color: #f8fafc;
}

.cp-notif-filter-pill.active {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

.cp-notif-list-body {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.cp-notif-list-body::-webkit-scrollbar {
  width: 6px;
}
.cp-notif-list-body::-webkit-scrollbar-track {
  background: #0f172a;
}
.cp-notif-list-body::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

.cp-notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #1e293b;
  background: #0f172a;
  transition: background 0.15s;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}

.cp-notif-item:hover {
  background: #172238;
}

.cp-notif-item.unread {
  background: #111e38;
}
.cp-notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: #3b82f6;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
}

.cp-notif-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cp-notif-icon-abandoned {
  background: #ffffff;
  color: #1e293b;
}

.cp-notif-icon-approved {
  background: #10b98120;
  color: #10b981;
  border: 1px solid #10b98140;
}

.cp-notif-icon-rejected {
  background: #ef444420;
  color: #ef4444;
  border: 1px solid #ef444440;
}

.cp-notif-content {
  flex: 1;
  min-width: 0;
}

.cp-notif-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.cp-notif-item-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f8fafc;
}

.cp-notif-item-time {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.cp-notif-item-desc {
  font-size: 0.79rem;
  color: #94a3b8;
  line-height: 1.4;
  margin-bottom: 6px;
  word-break: break-word;
}

.cp-notif-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.cp-notif-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
}

.cp-notif-chip-amt {
  background: #064e3b;
  color: #6ee7b7;
  border-color: #047857;
}

.cp-notif-chip-pix {
  background: #0284c720;
  color: #38bdf8;
  border-color: #0284c750;
}

.cp-notif-chip-card {
  background: #6366f120;
  color: #a5b4fc;
  border-color: #6366f150;
}

/* --- GOOGLE IDENTITY / AUTH STYLES --- */
.cp-auth-divider {
  display: flex;
  align-items: center;
  margin: 18px 0 14px 0;
  text-align: center;
}

.cp-auth-divider span:first-child,
.cp-auth-divider span:last-child {
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.cp-auth-divider-txt {
  padding: 0 12px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cp-google-btn-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  width: 100%;
  margin-bottom: 8px;
}

.cp-google-btn-wrapper iframe {
  margin: 0 auto !important;
}


/* COUPER AUTH & ADMIN MODAL MOBILE RESPONSIVE */
@media screen and (max-width: 600px) {
  .cp-modal-overlay {
    padding: 0 !important;
    align-items: stretch !important;
    background-color: rgba(0, 0, 0, 0.75) !important;
    overflow-y: hidden !important;
    overscroll-behavior: contain !important;
  }
  .cp-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100% !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateY(100%) !important;
    overscroll-behavior: contain !important;
  }
  .cp-modal-overlay.active .cp-modal-card {
    transform: translateY(0) !important;
  }
  .cp-modal-header {
    padding: 14px 18px !important;
    padding-top: max(16px, env(safe-area-inset-top)) !important;
    border-bottom: 1px solid #f1f5f9 !important;
    flex-shrink: 0 !important;
    background: #ffffff !important;
  }
  .cp-modal-body {
    padding: 16px 16px 36px !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
  }
  .cp-user-panel-card {
    max-width: 100% !important;
  }
  .cp-checkout-card {
    max-width: 100% !important;
  }
  .cp-notifications-dropdown {
    width: calc(100vw - 28px) !important;
    right: -10px !important;
  }

  /* Stepper labels clean wrap on mobile (fixes overlapping letters) */
  .cp-order-stepper {
    padding: 0 4px !important;
    margin: 16px 0 14px !important;
  }
  .cp-order-stepper::before {
    left: 20px !important;
    right: 20px !important;
  }
  .cp-step-label {
    font-size: 0.62rem !important;
    white-space: normal !important;
    text-align: center !important;
    max-width: 58px !important;
    line-height: 1.15 !important;
    word-break: break-word !important;
  }
  .cp-step-dot {
    width: 22px !important;
    height: 22px !important;
    font-size: 10px !important;
  }

  /* Mobile User Profile Header: Stack cleanly in column so buttons are fully reachable */
  .cp-profile-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 12px !important;
    margin-bottom: 14px !important;
  }
  .cp-profile-info {
    width: 100% !important;
    gap: 12px !important;
  }
  .cp-profile-info #cp-user-email {
    word-break: break-all !important;
    max-width: calc(100vw - 120px) !important;
  }
  .cp-profile-actions {
    display: flex !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .cp-profile-actions button {
    flex: 1 1 50% !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    touch-action: manipulation !important;
  }
  #cp-user-close {
    top: 12px !important;
    right: 12px !important;
    z-index: 25 !important;
  }
}


.cp-modal-overlay:not(.active) {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
.cp-modal-overlay.active {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}
