/* ── DATE RANGE PICKER ── */

.date-range {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px;
}

.dr-btn {
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.dr-btn:hover { background: var(--hover); color: var(--text); }

.dr-btn.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.dr-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
}

.dr-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.dr-custom:hover { background: var(--hover); color: var(--text); }
.dr-custom svg { width: 12px; height: 12px; }
.dr-custom.active { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* ── DATE RANGE LABEL ── */

.date-range-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 8px;
  white-space: nowrap;
  display: none;
}

/* ── CUSTOM DATE DROPDOWN ── */

.date-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 16px;
  z-index: 100;
  min-width: 280px;
}

.date-dropdown.open { display: block; }

[data-theme="dark"] .date-dropdown {
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.date-dropdown label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.date-dropdown label:last-of-type { margin-top: 10px; }

.date-dropdown input[type="date"] {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.date-dropdown input[type="date"]:focus {
  border-color: var(--blue);
}

.date-dropdown .dd-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.date-dropdown .dd-apply {
  flex: 1;
  padding: 7px 0;
  border: none;
  border-radius: 5px;
  background: var(--text);
  color: var(--bg);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.date-dropdown .dd-apply:hover { opacity: 0.85; }

.date-dropdown .dd-cancel {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.date-dropdown .dd-cancel:hover { background: var(--hover); }

.date-dropdown .dd-error {
  font-size: 11px;
  color: var(--red);
  margin-top: 6px;
  display: none;
}

/* ── REPORT TABS ── */

.report-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  margin-top: 8px;
}

.report-tab {
  position: relative;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.15s;
}

.report-tab:hover {
  color: var(--text);
}

.report-tab.active {
  color: var(--text);
  font-weight: 600;
}

/* Triangle caret pointing down on active tab */
.report-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--text);
}
