/* Thunder EV — Customer Portal (marketplace header + account sidebar) */

:root {
  --tev-bg: #f8fafc;
  --tev-card: #ffffff;
  --tev-border: rgba(37, 99, 235, 0.2);
  --tev-text: #0f172a;
  --tev-muted: #64748b;
  --tev-accent: #2563eb;
  --tev-accent-2: #0ea5e9;
  --tev-orange: #f97316;
  --tev-glow: 0 4px 20px rgba(37, 99, 235, 0.08);
}

body.tev-customer-portal {
  font-family: 'Poppins', 'Orbitron', system-ui, sans-serif;
  color: var(--tev-text);
  background: var(--tev-bg);
}

body.tev-customer-portal.tev-marketplace-page {
  background: #f8fafc;
}

/* Sidebar — customer account nav (same shell as marketplace) */
body.tev-customer-portal #sidebar-nav .tev-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  padding: 0 0.35rem;
}

body.tev-customer-portal #sidebar-nav a.tab.v-tab {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

body.tev-customer-portal .tev-cpo-logout-tab {
  color: #b91c1c !important;
}

body.tev-customer-portal .tev-cpo-logout-tab:hover {
  background: rgba(239, 68, 68, 0.08) !important;
  color: #dc2626 !important;
}

/* Header extras */
.tev-cpo-nav-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex-shrink: 0;
}

.tev-cpo-menu-btn {
  display: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #1e3a8a;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 0.35rem;
}

.tev-cpo-welcome {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tev-icon-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #2563eb;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.tev-icon-btn:hover {
  background: #eff6ff;
}

.tev-cpo-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9999;
}

.tev-cpo-main {
  min-height: 0;
}

.tev-cpo-demo-banner {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  color: #92400e;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 1px solid #fcd34d;
}

.tev-cpo-loading {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(241, 245, 249, 0.92);
  backdrop-filter: blur(6px);
}

.tev-cpo-loading.tev-hidden {
  display: none !important;
}

.tev-cpo-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(37, 99, 235, 0.2);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: tev-cpo-spin 0.75s linear infinite;
}

@keyframes tev-cpo-spin {
  to { transform: rotate(360deg); }
}

.tev-cpo-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.tev-hidden {
  display: none !important;
}

.tev-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tev-kpi {
  background: var(--tev-card);
  border: 1px solid var(--tev-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--tev-glow);
  position: relative;
  overflow: hidden;
}

.tev-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--tev-accent);
}

.tev-kpi .num,
.tev-kpi .val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--tev-accent);
  font-family: 'Courier New', monospace;
  text-shadow: none;
}

.tev-kpi .lbl {
  font-size: 0.75rem;
  color: var(--tev-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

button.tev-kpi.tev-kpi--click {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

button.tev-kpi.tev-kpi--click:hover {
  border-color: var(--tev-accent);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.12);
}

.cpo-orders-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.cpo-order-search {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
}

.cpo-order-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cpo-filter-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.cpo-filter-count {
  display: inline-block;
  min-width: 1.1rem;
  margin-left: 0.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
.cpo-filter-btn.cpo-filter--active .cpo-filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.cpo-filter-btn.cpo-filter--active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.cpo-orders-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.cpo-page-btn {
  min-width: 2rem;
  height: 2rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.cpo-page-btn--active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.tev-order-card--click {
  cursor: pointer;
}

.tev-order-card--click:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.cpo-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.cpo-detail-grid section h3 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.cpo-detail-grid section p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.tev-panel {
  background: var(--tev-card);
  border: 1px solid var(--tev-border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.03);
  backdrop-filter: blur(10px);
}

.tev-panel h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  color: var(--tev-text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--tev-border);
  padding-bottom: 8px;
}

.tev-panel-nested {
  background: #f1f5f9;
  border: 1px dashed rgba(37, 99, 235, 0.3);
}

.tev-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.hint {
  color: var(--tev-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.tev-mb {
  margin-bottom: 12px;
}

.tev-order-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tev-order-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--tev-border);
  border-radius: 14px;
  background: #fff;
}

.tev-order-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: #e2e8f0;
}

.tev-order-card h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.tev-order-card .meta {
  font-size: 0.82rem;
  color: var(--tev-muted);
}

.tev-order-card .actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tev-order-cancel-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.tev-info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 700;
  font-style: normal;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1;
  cursor: help;
  box-shadow: 0 0 0 1px #e2e8f0;
}

.tev-info-tip:hover {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 0 0 1px #93c5fd;
}

.tev-cpo-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tev-cpo-dialog.tev-hidden {
  display: none;
}

.tev-cpo-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.tev-cpo-dialog-card--wide {
  width: min(520px, 100%);
}

.cpo-return-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  max-height: 220px;
  overflow-y: auto;
}

.cpo-return-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.86rem;
  color: #334155;
  cursor: pointer;
}

.cpo-return-check input {
  margin-top: 3px;
}

.cpo-return-alt-actions {
  flex-direction: column;
  align-items: stretch;
}

.cpo-return-alt-actions .tev-btn {
  width: 100%;
  justify-content: center;
}

.tev-btn--linkish {
  font-size: 0.78rem;
  padding: 0.25rem 0.5rem;
}

.tev-cpo-dialog-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 1.25rem 1.35rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.tev-cpo-dialog-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.tev-cpo-dialog-card p {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: #334155;
}

.tev-cpo-dialog-meta {
  padding: 10px 12px;
  margin-bottom: 0.75rem !important;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  line-height: 1.5;
}

.tev-cpo-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
  justify-content: flex-end;
}

.tev-btn-cancel {
  border-color: #fdba74 !important;
  color: #c2410c !important;
  background: #fff7ed !important;
}

.tev-btn-cancel--prominent {
  font-weight: 700 !important;
  padding: 0.45rem 1rem !important;
  box-shadow: 0 1px 0 #fdba74;
}

.tev-btn-cancel:hover {
  background: #ffedd5 !important;
  border-color: #f97316 !important;
}

.cpo-address-defaults-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 640px) {
  .cpo-address-defaults-grid {
    grid-template-columns: 1fr;
  }
}

.cpo-address-snippet {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.45;
  margin-top: 4px;
}

.cpo-address-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.cpo-address-card {
  border: 1px solid var(--tev-border, #e2e8f0);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.cpo-address-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.cpo-address-card__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cpo-address-card__body {
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.45;
}

.cpo-address-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tev-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  text-transform: capitalize;
}

.tev-pill.green {
  background: #dcfce7;
  color: #166534;
}

.tev-pill.orange {
  background: #ffedd5;
  color: #c2410c;
}

.tev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.tev-btn.primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-color: transparent;
  color: #fff;
}

.tev-empty-state {
  text-align: center;
  padding: 2rem 1rem;
}

.tev-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.tev-product-mini-grid,
.tev-rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.tev-rec-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.tev-rec-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.tev-rec-head h3 {
  margin: 0;
}

.tev-rec-sub {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.tev-rec-block {
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 14px;
  padding: 12px 12px 14px;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--tev-glow);
}

.tev-rec-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: var(--tev-card);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tev-rec-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.tev-rec-card--oos {
  opacity: 0.88;
}

.tev-rec-card--compact {
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
}

.tev-rec-card__link {
  text-decoration: none;
  color: inherit;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tev-rec-card__img {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #f1f5f9;
  overflow: hidden;
}

.tev-rec-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tev-rec-card__tags {
  position: absolute;
  left: 8px;
  top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tev-rec-tag {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.tev-rec-card__body {
  padding: 10px 12px 8px;
}

.tev-rec-card__title {
  margin: 0 0 4px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--tev-text);
}

.tev-rec-card__vendor {
  margin: 0 0 6px;
  font-size: 0.72rem;
  color: var(--tev-muted);
}

.tev-rec-card__reason {
  margin: 0 0 6px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #1d4ed8;
}

.tev-rec-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--tev-muted);
}

.tev-rec-card__meta span {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 6px;
}

.tev-rec-oos {
  color: #b91c1c !important;
  background: #fef2f2 !important;
  font-weight: 700;
}

.tev-rec-card__price {
  margin: 8px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--tev-accent);
}

.tev-rec-card__actions {
  display: flex;
  gap: 6px;
  padding: 0 10px 10px;
}

.tev-rec-btn {
  flex: 1;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--tev-text);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
}

.tev-rec-btn:hover {
  border-color: var(--tev-accent);
  color: var(--tev-accent);
}

.tev-rec-btn--ghost {
  background: #f8fafc;
}

.tev-rec-empty {
  text-align: center;
  padding: 1.25rem 0.75rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

.tev-rec-empty__icon {
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
}

.tev-product-mini {
  display: block;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.tev-product-mini img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
}

.tev-product-mini .t {
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}

.tev-track-picker {
  margin-bottom: 14px;
}

.tev-track-picker select {
  width: 100%;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
}

.tev-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.tev-timeline-compact {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tev-timeline-compact .tev-timeline-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  min-width: 0;
  max-width: none;
  padding: 0;
}

.tev-timeline-compact .tev-timeline-dot {
  width: 12px;
  height: 12px;
  margin-bottom: 0;
  margin-top: 4px;
  font-size: 0.65rem;
  box-shadow: none;
}

/* Logistics Radar — horizontal shipment progress */
.tev-timeline--horizontal {
  flex-direction: column;
  gap: 0;
}

.tev-timeline-radar {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 12px 16px;
  overflow: hidden;
}

.tev-timeline-radar-hint {
  margin: 0 0 12px;
  font-size: 0.78rem;
  text-align: center;
}

.tev-timeline-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding: 8px 4px 12px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.tev-timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  min-width: 108px;
  max-width: 150px;
  text-align: center;
  padding: 0 4px;
}

.tev-timeline-body {
  width: 100%;
}

.tev-timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 8px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.tev-timeline-label {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
}

.tev-timeline-meta {
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.35;
  word-break: break-word;
}

.tev-timeline-item.done .tev-timeline-dot {
  background: #22c55e;
  color: #fff;
}

.tev-timeline-item.current .tev-timeline-dot {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
}

.tev-timeline-item.pending .tev-timeline-dot {
  background: #f1f5f9;
  color: #94a3b8;
}

.tev-timeline-connector {
  flex: 0 0 28px;
  min-width: 20px;
  height: 3px;
  background: #e2e8f0;
  margin-top: 15px;
  border-radius: 2px;
}

.tev-timeline-connector.done {
  background: linear-gradient(90deg, #22c55e, #86efac);
}

.tev-timeline-connector.current {
  background: linear-gradient(90deg, #22c55e, #cbd5e1);
}

.tev-timeline--horizontal .tev-ol-tracking {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

@media (min-width: 900px) {
  .tev-timeline-track {
    flex-wrap: wrap;
    justify-content: space-between;
    overflow-x: visible;
  }
  .tev-timeline-connector {
    flex: 1 1 24px;
    max-width: 48px;
    min-width: 16px;
  }
}

.tev-timeline-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tev-timeline-step .tev-timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  margin-bottom: 0;
  font-size: inherit;
  box-shadow: none;
}

.tev-timeline-step.done .tev-timeline-dot {
  background: #22c55e;
}

.tev-timeline-step.current .tev-timeline-dot {
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.tev-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tev-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.tev-field input,
.tev-field textarea,
.tev-field select {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 10px 12px;
  font-family: inherit;
}

.tev-field textarea {
  min-height: 96px;
  resize: vertical;
}

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

.tev-table th,
.tev-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.tev-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.tev-cpo-modal {
  position: fixed;
  inset: 0;
  z-index: 40000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tev-cpo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.tev-cpo-modal-card {
  position: relative;
  width: min(640px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
}

.tev-cpo-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.tev-cpo-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tev-profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tev-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tev-trust-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.tev-trust-badge--ok {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

/* Mobile — collapse pinned sidebar, show menu */
@media (max-width: 820px) {
  .tev-cpo-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.tev-customer-portal.tev-sidebar-pinned #sidebar-nav {
    transform: translateX(-100%) !important;
    z-index: 10050;
  }

  body.tev-customer-portal.tev-sidebar-pinned #sidebar-nav.tev-open {
    transform: translateX(0) !important;
  }

  body.tev-customer-portal.tev-sidebar-pinned .tev-mp-header,
  body.tev-customer-portal.tev-sidebar-pinned .tev-mp-main,
  body.tev-customer-portal.tev-sidebar-pinned #tev-shared-footer {
    margin-left: 0 !important;
    width: auto !important;
  }

  .tev-cpo-welcome {
    display: none;
  }

  .tev-form {
    grid-template-columns: 1fr;
  }

  .tev-kpi-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .tev-order-card {
    grid-template-columns: 56px 1fr;
  }

  .tev-order-card .actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}
