.obs-oc-bar-premium {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 6px 16px rgba(0, 0, 0, 0.06);
  padding: 1.5rem 1.5rem 1.25rem;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, border-color 0.2s ease;
}

.obs-oc-bar-premium:hover {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.08);
  border-color: rgba(203, 213, 225, 0.9);
}

.obs-oc-bar-header {
  margin-bottom: 1rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.obs-oc-bar-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.obs-oc-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  color: #f1f5f9;
  flex-shrink: 0;
}

.obs-oc-bar-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary, #0f172a);
  line-height: 1.3;
}

.obs-oc-bar-subtitle {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.45;
  padding-left: 52px;
}

/* Dark theme: match dashboard chart card background and fix all colors */
body.night-mode .obs-oc-bar-premium,
.night-mode .obs-oc-bar-premium {
  background: #3a3838;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body.night-mode .obs-oc-bar-premium:hover,
.night-mode .obs-oc-bar-premium:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.night-mode .obs-oc-bar-header,
.night-mode .obs-oc-bar-header {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

body.night-mode .obs-oc-bar-title,
.night-mode .obs-oc-bar-title {
  color: rgba(255, 255, 255, 0.98);
}

body.night-mode .obs-oc-bar-subtitle,
.night-mode .obs-oc-bar-subtitle {
  color: rgba(255, 255, 255, 0.75);
}

body.night-mode .obs-oc-bar-icon,
.night-mode .obs-oc-bar-icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  color: rgba(255, 255, 255, 0.95);
}

/* Time period filter – dark theme */
body.night-mode .obs-oc-bar-time-filter,
.night-mode .obs-oc-bar-time-filter {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

body.night-mode .obs-oc-bar-time-filter-label,
.night-mode .obs-oc-bar-time-filter-label {
  color: rgba(255, 255, 255, 0.8);
}

body.night-mode .obs-oc-bar-time-select,
.night-mode .obs-oc-bar-time-select {
  color: rgba(255, 255, 255, 0.95);
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e2e8f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem 1rem;
}

body.night-mode .obs-oc-bar-time-select:hover,
.night-mode .obs-oc-bar-time-select:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background-color: rgba(255, 255, 255, 0.1);
}

body.night-mode .obs-oc-bar-time-select:focus,
.night-mode .obs-oc-bar-time-select:focus {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2);
}

body.night-mode .obs-oc-bar-time-select option,
.night-mode .obs-oc-bar-time-select option {
  background: #3a3838;
  color: rgba(255, 255, 255, 0.95);
}

/* Chart axes and grid – dark theme */
body.night-mode .obs-oc-bar-container .recharts-text,
body.night-mode .obs-oc-bar-container .recharts-cartesian-axis-tick-value,
.night-mode .obs-oc-bar-container .recharts-text,
.night-mode .obs-oc-bar-container .recharts-cartesian-axis-tick-value {
  fill: rgba(255, 255, 255, 0.9) !important;
}

body.night-mode .obs-oc-bar-container .recharts-xAxis .recharts-line,
body.night-mode .obs-oc-bar-container .recharts-yAxis .recharts-line,
.night-mode .obs-oc-bar-container .recharts-xAxis .recharts-line,
.night-mode .obs-oc-bar-container .recharts-yAxis .recharts-line {
  stroke: rgba(255, 255, 255, 0.35) !important;
}

body.night-mode .obs-oc-bar-container .recharts-cartesian-grid line,
.night-mode .obs-oc-bar-container .recharts-cartesian-grid line {
  stroke: rgba(255, 255, 255, 0.15) !important;
}

/* Tooltip – dark theme */
body.night-mode .obs-oc-tooltip,
.night-mode .obs-oc-tooltip {
  background: #3a3838;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.night-mode .obs-oc-tooltip-label,
.night-mode .obs-oc-tooltip-label {
  color: rgba(255, 255, 255, 0.7);
}

body.night-mode .obs-oc-tooltip-value,
.night-mode .obs-oc-tooltip-value {
  color: rgba(255, 255, 255, 0.98);
}

body.night-mode .obs-oc-tooltip-hint,
.night-mode .obs-oc-tooltip-hint {
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 640px) {
  .obs-oc-bar-subtitle {
    padding-left: 0;
  }
}

.obs-oc-bar-chart-wrap {
  flex: 1;
  min-height: 220px;
}

.obs-oc-bar-time-filter {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.obs-oc-bar-time-filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
}

.obs-oc-bar-time-select {
  min-width: 140px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary, #0f172a);
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem 1rem;
}

.obs-oc-bar-time-select:hover {
  border-color: #cbd5e1;
}

.obs-oc-bar-time-select:focus {
  outline: none;
  border-color: var(--primary-color, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.obs-oc-tooltip {
  background: #ffffff;
  border-radius: 12px;
  padding: 0.65rem 1rem;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.08),
    0 10px 20px -4px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(226, 232, 240, 0.9);
  min-width: 120px;
}

.obs-oc-tooltip-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.15rem;
}

.obs-oc-tooltip-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.obs-oc-tooltip-hint {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 0.3rem;
}

.obs-oc-bar-premium {
  cursor: pointer;
}

@media (max-width: 768px) {
  .obs-oc-bar-premium {
    padding: 1.25rem 1rem 1rem;
    min-height: 300px;
  }
  .obs-oc-bar-title {
    font-size: 1.05rem;
  }
  .obs-oc-bar-icon {
    width: 36px;
    height: 36px;
  }
  .obs-oc-bar-icon svg {
    width: 20px;
    height: 20px;
  }
}
