:root {
  --dubc-primary: #0284c7;
  --dubc-primary-hover: #0369a1;
  --dubc-bg-card: #ffffff;
  --dubc-border: #e2e8f0;
  --dubc-text: #1e293b;
  --dubc-muted: #64748b;
  --dubc-success: #16a34a;
  --dubc-warning: #b45309;
  --dubc-danger: #dc2626;
  --dubc-hero-bg: #f0fdf4;
  --dubc-hero-border: #bbf7d0;
  --dubc-hero-text: #15803d;
}

.dubc-main {
  padding: 1.5rem 1rem 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--dubc-text);
  font-family: inherit;
}

.dubc-wrap {
  width: 100%;
}

.dubc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .dubc-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.dubc-card {
  background: var(--dubc-bg-card);
  border: 1px solid var(--dubc-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.dubc-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dubc-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--dubc-text);
}

.dubc-sub-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.65rem 0;
  color: var(--dubc-text);
}

.dubc-head-btns {
  display: flex;
  gap: 0.5rem;
}

.dubc-activities-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dubc-activity-row {
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid var(--dubc-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.dubc-activity-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.dubc-activity-name {
  font-weight: 600;
  color: var(--dubc-text);
}

.dubc-activity-rate {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dubc-muted);
}

.dubc-slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dubc-slider {
  flex: 1;
  cursor: pointer;
}

.dubc-slider-val {
  min-width: 80px;
  text-align: right;
  font-size: 0.825rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--dubc-primary);
}

.dubc-form-group {
  margin-bottom: 1.25rem;
}

.dubc-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--dubc-text);
}

.dubc-select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--dubc-border);
  border-radius: 6px;
  background: transparent;
  color: var(--dubc-text);
  font-family: inherit;
  font-size: 0.9rem;
}

.dubc-select:focus {
  outline: none;
  border-color: var(--dubc-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Hero Box */
.dubc-hero-box {
  background: var(--dubc-hero-bg);
  border: 1px solid var(--dubc-hero-border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
}

.dubc-hero-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dubc-muted);
  margin-bottom: 0.25rem;
}

.dubc-hero-gb {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--dubc-hero-text);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.dubc-hero-status {
  font-size: 0.85rem;
  font-weight: 700;
}

.dubc-status-safe {
  color: var(--dubc-success);
}

.dubc-status-warn {
  color: var(--dubc-warning);
}

.dubc-status-danger {
  color: var(--dubc-danger);
}

/* Meter */
.dubc-meter-wrap {
  margin-bottom: 1.25rem;
}

.dubc-meter-track {
  width: 100%;
  height: 10px;
  background: var(--dubc-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.dubc-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.dubc-meter-safe {
  background-color: var(--dubc-success);
}

.dubc-meter-warn {
  background-color: var(--dubc-warning);
}

.dubc-meter-danger {
  background-color: var(--dubc-danger);
}

.dubc-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--dubc-muted);
  font-weight: 600;
}

/* Distribution Box */
.dubc-distribution-box {
  border: 1px solid var(--dubc-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.dubc-stacked-bar {
  width: 100%;
  height: 12px;
  background: var(--dubc-border);
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  margin-bottom: 0.85rem;
  gap: 1px;
}

.dubc-bar-seg {
  height: 100%;
}

.dubc-seg-4k { background: #ef4444; }
.dubc-seg-hd { background: #3b82f6; }
.dubc-seg-calls { background: #10b981; }
.dubc-seg-web { background: #f59e0b; }
.dubc-seg-other { background: #8b5cf6; }

.dubc-legend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.825rem;
}

.dubc-legend-table td {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--dubc-border);
}

.dubc-legend-table tr:last-child td {
  border-bottom: none;
}

.dubc-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.4rem;
}

.dubc-dot-4k { background: #ef4444; }
.dubc-dot-hd { background: #3b82f6; }
.dubc-dot-calls { background: #10b981; }
.dubc-dot-web { background: #f59e0b; }
.dubc-dot-other { background: #8b5cf6; }

.dubc-text-right {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Action Buttons */
.dubc-btn-ghost {
  background: transparent;
  color: var(--dubc-text);
  border: 1px solid var(--dubc-border);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.dubc-btn-ghost:hover {
  background: var(--dubc-border);
}

.dubc-btn-action {
  background: var(--dubc-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}

.dubc-btn-action:hover {
  background: var(--dubc-primary-hover);
}

.dubc-action-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dubc-status-msg {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dubc-success);
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --dubc-primary: #81bcda;
  --dubc-primary-hover: #69aed4;
  --dubc-bg-card: var(--tf-surface);
  --dubc-border: var(--tf-surface);
  --dubc-text: var(--tf-ink);
  --dubc-muted: var(--tf-ink-faint);
  --dubc-success: #7ad89d;
  --dubc-warning: #d9a57d;
  --dubc-danger: #da8181;
  --dubc-hero-bg: var(--tf-surface);
  --dubc-hero-border: #81daa0;
  --dubc-hero-text: #5ed089;
}
