.cbrm-dashboard,
.cbrm-dash {
  --cbrm-dash-navy: var(--cbrm-navy, #10233f);
  --cbrm-dash-blue: var(--cbrm-blue, #0e62d0);
  --cbrm-dash-blue-dark: var(--cbrm-blue-dark, #09479a);
  --cbrm-dash-accent: #7c3aed;
  --cbrm-dash-bg: #f4f6fb;
  --cbrm-dash-surface: #ffffff;
  --cbrm-dash-surface-alt: #f8fafc;
  --cbrm-dash-border: var(--cbrm-border, #dde3ee);
  --cbrm-dash-text: var(--cbrm-text, #1a2234);
  --cbrm-dash-muted: #64748b;
  --cbrm-dash-ok: #0f8a4b;
  --cbrm-dash-ok-bg: #e6f7ee;
  --cbrm-dash-warn: #b45309;
  --cbrm-dash-warn-bg: #fef3e2;
  --cbrm-dash-info: #2563eb;
  --cbrm-dash-info-bg: #eaf1ff;
  --cbrm-dash-radius: 16px;
  --cbrm-dash-radius-lg: 22px;
  --cbrm-dash-shadow: 0 20px 45px rgba(16, 35, 63, 0.10);
  --cbrm-dash-shadow-sm: 0 6px 18px rgba(16, 35, 63, 0.07);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--cbrm-dash-text);
}

@media (prefers-color-scheme: dark) {
  .cbrm-dashboard,
  .cbrm-dash {
    --cbrm-dash-bg: #0f1524;
    --cbrm-dash-surface: #161d2e;
    --cbrm-dash-surface-alt: #1c2438;
    --cbrm-dash-border: #2a3450;
    --cbrm-dash-text: #eef1f8;
    --cbrm-dash-muted: #97a2ba;
    --cbrm-dash-ok-bg: rgba(15, 138, 75, 0.18);
    --cbrm-dash-warn-bg: rgba(180, 83, 9, 0.2);
    --cbrm-dash-info-bg: rgba(37, 99, 235, 0.2);
    --cbrm-dash-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  }
}

.cbrm-dash {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 0 48px;
}

.cbrm-dash *,
.cbrm-dash *::before,
.cbrm-dash *::after {
  box-sizing: border-box;
}

.cbrm-dash-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: var(--cbrm-dash-accent);
  margin: 0 0 4px;
}

.cbrm-dash h2,
.cbrm-dash h3 {
  color: var(--cbrm-dash-navy);
  margin: 0 0 8px;
}

@media (prefers-color-scheme: dark) {
  .cbrm-dash h2,
  .cbrm-dash h3 {
    color: var(--cbrm-dash-text);
  }
}

.cbrm-dash-card {
  background: var(--cbrm-dash-surface);
  border: 1px solid var(--cbrm-dash-border);
  border-radius: var(--cbrm-dash-radius-lg);
  box-shadow: var(--cbrm-dash-shadow-sm);
  padding: 26px 28px;
  margin-bottom: 20px;
}

.cbrm-dash-card--hero {
  background: linear-gradient(135deg, var(--cbrm-dash-navy) 0%, var(--cbrm-dash-blue-dark) 55%, var(--cbrm-dash-accent) 130%);
  color: #ffffff;
  box-shadow: var(--cbrm-dash-shadow);
}

.cbrm-dash-card--hero .cbrm-dash-kicker,
.cbrm-dash-card--hero h2 {
  color: #ffffff;
}

.cbrm-dash-card--hero p {
  color: rgba(255, 255, 255, 0.85);
}

/* ---- Sign-in ------------------------------------------------------------ */

.cbrm-dash-signin {
  max-width: 520px;
}

.cbrm-dash-signin form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.cbrm-dash-signin label {
  font-weight: 600;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

.cbrm-dash-signin input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 15px;
}

.cbrm-dash-alert {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 4px;
}

/* ---- Topbar / tabs ------------------------------------------------------- */

.cbrm-dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cbrm-dash-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--cbrm-dash-surface-alt);
  border: 1px solid var(--cbrm-dash-border);
  border-radius: 999px;
  margin-bottom: 22px;
  overflow-x: auto;
}

.cbrm-dash-tab {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--cbrm-dash-muted);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.cbrm-dash-tab.is-active {
  background: var(--cbrm-dash-navy);
  color: #ffffff;
}

.cbrm-dash-panel {
  display: none;
  animation: cbrmDashFadeIn 0.2s ease;
}

.cbrm-dash-panel.is-active {
  display: block;
}

@keyframes cbrmDashFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Buttons -------------------------------------------------------------- */

.cbrm-dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}

.cbrm-dash-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cbrm-dash-btn--primary {
  background: var(--cbrm-dash-blue);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(14, 98, 208, 0.28);
}

.cbrm-dash-btn--primary:hover:not(:disabled) {
  background: var(--cbrm-dash-blue-dark);
  transform: translateY(-1px);
}

.cbrm-dash-btn--secondary {
  background: var(--cbrm-dash-surface-alt);
  border-color: var(--cbrm-dash-border);
  color: var(--cbrm-dash-navy);
}

.cbrm-dash-btn--secondary:hover:not(:disabled) {
  border-color: var(--cbrm-dash-blue);
}

.cbrm-dash-btn--ghost {
  background: transparent;
  color: var(--cbrm-dash-muted);
  padding-left: 8px;
  padding-right: 8px;
}

.cbrm-dash-btn--ghost:hover:not(:disabled) {
  color: var(--cbrm-dash-navy);
}

@media (prefers-color-scheme: dark) {
  .cbrm-dash-btn--ghost:hover:not(:disabled),
  .cbrm-dash-btn--secondary {
    color: var(--cbrm-dash-text);
  }
}

/* ---- Status pills ---------------------------------------------------------- */

.cbrm-dash-status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.cbrm-dash-status-pill--pending {
  background: var(--cbrm-dash-info-bg);
  color: var(--cbrm-dash-info);
}

.cbrm-dash-status-pill--in_progress {
  background: var(--cbrm-dash-warn-bg);
  color: var(--cbrm-dash-warn);
}

.cbrm-dash-status-pill--past {
  background: var(--cbrm-dash-ok-bg);
  color: var(--cbrm-dash-ok);
}

/* ---- Order grid / cards ------------------------------------------------------ */

.cbrm-dash-order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.cbrm-dash-order-card {
  background: var(--cbrm-dash-surface);
  border: 1px solid var(--cbrm-dash-border);
  border-radius: var(--cbrm-dash-radius);
  box-shadow: var(--cbrm-dash-shadow-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cbrm-dash-order-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--cbrm-dash-shadow);
}

.cbrm-dash-order-card--pending {
  border-top: 3px solid var(--cbrm-dash-info);
}

.cbrm-dash-order-card--in_progress {
  border-top: 3px solid var(--cbrm-dash-warn);
}

.cbrm-dash-order-card--past {
  border-top: 3px solid var(--cbrm-dash-ok);
  opacity: 0.85;
}

.cbrm-dash-order-card h3 {
  font-size: 17px;
}

.cbrm-dash-order-card-meta {
  display: grid;
  gap: 6px;
  margin: 10px 0 16px;
  font-size: 13px;
}

.cbrm-dash-order-card-meta div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cbrm-dash-order-card-meta dt {
  color: var(--cbrm-dash-muted);
}

.cbrm-dash-order-card-meta dd {
  margin: 0;
  font-weight: 600;
}

.cbrm-dash-order-card .cbrm-dash-btn {
  margin-top: auto;
}

/* ---- Order detail ------------------------------------------------------------- */

.cbrm-dash-order-detail-inner h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---- Empty state ---------------------------------------------------------------- */

.cbrm-dash-empty {
  text-align: center;
  padding: 56px 24px;
  background: var(--cbrm-dash-surface);
  border: 1px dashed var(--cbrm-dash-border);
  border-radius: var(--cbrm-dash-radius-lg);
  color: var(--cbrm-dash-muted);
}

/* ---- FAQ --------------------------------------------------------------------------- */

.cbrm-dash-faq-item {
  border-bottom: 1px solid var(--cbrm-dash-border);
  padding: 12px 0;
}

.cbrm-dash-faq-item:last-child {
  border-bottom: 0;
}

.cbrm-dash-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cbrm-dash-faq-item summary::-webkit-details-marker {
  display: none;
}

.cbrm-dash-faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--cbrm-dash-muted);
  transition: transform 0.15s ease;
}

.cbrm-dash-faq-item[open] summary::after {
  transform: rotate(45deg);
}

.cbrm-dash-faq-answer {
  padding-top: 8px;
  color: var(--cbrm-dash-muted);
  font-size: 14px;
}

/* ---- Forms ------------------------------------------------------------------------- */

.cbrm-dash form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cbrm-dash-muted);
}

.cbrm-dash form input[type="text"],
.cbrm-dash form input[type="email"],
.cbrm-dash form input[type="number"],
.cbrm-dash form input[type="date"],
.cbrm-dash form select,
.cbrm-dash form textarea {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--cbrm-dash-text);
  background: var(--cbrm-dash-surface-alt);
  border: 1px solid var(--cbrm-dash-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.cbrm-dash form input:focus,
.cbrm-dash form select:focus,
.cbrm-dash form textarea:focus {
  outline: 2px solid var(--cbrm-dash-blue);
  outline-offset: 1px;
}

.cbrm-dash-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.cbrm-dash-form-grid-full {
  grid-column: 1 / -1;
}

.cbrm-dash-addons {
  border: 1px solid var(--cbrm-dash-border);
  border-radius: var(--cbrm-dash-radius);
  padding: 14px 16px;
  margin: 0 0 16px;
}

.cbrm-dash-addons legend {
  font-weight: 700;
  padding: 0 6px;
}

.cbrm-dash-addon-row {
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--cbrm-dash-border);
  font-weight: 400 !important;
  font-size: 14px !important;
  color: var(--cbrm-dash-text) !important;
}

.cbrm-dash-addon-row:last-child {
  border-bottom: 0;
}

.cbrm-dash-addon-row input {
  width: 80px;
}

.cbrm-dash-actions {
  margin: 4px 0 16px;
}

/* ---- Price diff -------------------------------------------------------------------- */

.cbrm-dash-price-diff {
  background: var(--cbrm-dash-surface-alt);
  border: 1px solid var(--cbrm-dash-border);
  border-radius: var(--cbrm-dash-radius);
  padding: 18px 20px;
  margin-top: 12px;
  animation: cbrmDashFadeIn 0.2s ease;
}

.cbrm-dash-price-diff-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 15px;
}

.cbrm-dash-price-diff-note {
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin: 10px 0;
}

.cbrm-dash-price-diff-note--up {
  background: var(--cbrm-dash-warn-bg);
  color: var(--cbrm-dash-warn);
}

.cbrm-dash-price-diff-note--down {
  background: var(--cbrm-dash-ok-bg);
  color: var(--cbrm-dash-ok);
}

.cbrm-dash-accept-row {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 8px !important;
  font-weight: 400 !important;
  font-size: 13px !important;
  color: var(--cbrm-dash-text) !important;
  margin: 10px 0;
}

.cbrm-dash-accept-row input {
  margin-top: 3px;
}

/* ---- Small text / misc --------------------------------------------------------------- */

.cbrm-dash-small {
  font-size: 13px;
  color: var(--cbrm-dash-muted);
}

.cbrm-dash-small.is-error {
  color: #d92d20;
  font-weight: 600;
}

/* ---- Responsive ------------------------------------------------------------------------ */

@media (max-width: 640px) {
  .cbrm-dash-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .cbrm-dash-order-grid {
    grid-template-columns: 1fr;
  }
}
