.analytics-period {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
#analytics-root button:not(.primary) {
  border: 1px solid #d7dde7;
  border-radius: 8px;
  padding: 9px 12px;
  color: #26394f;
  background: #fff;
  cursor: pointer;
}
#analytics-root button:disabled {
  cursor: default;
  opacity: 0.5;
}
#analytics-root .analytics-drill {
  border: 0;
  padding: 0;
  color: #5140b9;
  background: transparent;
}
.analytics-period label {
  display: grid;
  gap: 5px;
  font-size: 12px;
}
.analytics-period input,
.analytics-period select {
  min-height: 40px;
  max-width: 240px;
}
.analytics-period button {
  min-height: 40px;
}
.analytics-period label:has(#analytics-week) {
  flex: 1;
  min-width: 220px;
}
.analytics-period #analytics-week {
  width: 100%;
  max-width: none;
}
.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.analytics-kpis article {
  background: #fff;
  border: 1px solid #e0e5ed;
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 10px;
}
.analytics-kpis strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}
.analytics-kpis small,
.analytics-kpis span {
  color: #637086;
  font-size: 12px;
}
.analytics-two,
.analytics-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.analytics-settings-grid {
  padding: 20px 0;
  border-bottom: 1px solid #e4e8ee;
}
.analytics-check {
  display: flex !important;
  align-items: start;
  gap: 8px !important;
  font-size: 13px;
}
.analytics-check input {
  width: 16px;
  min-height: 16px;
  margin: 2px 0;
}
.analytics-service-list > div {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #edf0f4;
}
.analytics-service-list strong {
  white-space: nowrap;
}
.analytics-service-list small {
  display: block;
  font-size: 11px;
  color: #68758a;
}
.analytics-reconcile {
  padding: 12px 0;
  border-bottom: 1px solid #edf0f4;
}
.analytics-reconcile > small {
  display: block;
}
.analytics-message {
  background: #edf3fa;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
}
.analytics-message.error,
.analytics-warnings {
  background: #fff8ec;
}
.analytics-warning {
  color: #92540d;
}
.analytics-warnings ul {
  margin-bottom: 0;
  line-height: 1.6;
}
.analytics-table {
  max-height: 640px;
}
.analytics-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fc;
}
.analytics-table td {
  white-space: nowrap;
}
.analytics-table td:first-child {
  white-space: normal;
  min-width: 220px;
}
.analytics-drill {
  text-align: left;
  white-space: normal;
}
.analytics-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 14px;
}
.analytics-toolbar .button {
  display: inline-block;
  text-decoration: none;
  border: 1px solid #dbe2eb;
  padding: 10px 14px;
  border-radius: 8px;
  color: #26394f;
  font-size: 13px;
}
.analytics-settings-grid > *,
.analytics-two > * {
  min-width: 0;
}
#analytics-settings summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
}
#analytics-settings h3 {
  margin-top: 8px;
}
.analytics-return-dialog {
  max-width: 520px;
}
.analytics-return-dialog p {
  line-height: 1.5;
}
.cost-bulk {
  border-block: 1px solid #e4e8ee;
  margin: 20px 0;
  padding: 8px 0 18px;
}
.cost-bulk-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.cost-bulk-fieldset > * {
  min-width: 0;
  max-width: 100%;
}
.cost-bulk-fieldset textarea,
.cost-bulk-fieldset select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #ccd4e0;
  border-radius: 8px;
  background: #fff;
}
.cost-bulk-fieldset label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.cost-bulk-settings,
.cost-bulk-filters {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 14px;
}
.cost-bulk-filters {
  grid-template-columns: 2fr 1fr;
}
.cost-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.cost-bulk-actions label {
  max-width: 300px;
}
.cost-bulk-actions span {
  align-self: center;
  color: #637086;
  font-size: 13px;
}
.cost-bulk-table {
  max-height: 480px;
}
.cost-bulk-table table {
  width: 100%;
  min-width: 650px;
}
.cost-bulk-table thead th {
  position: sticky;
  top: 0;
  background: #f7f9fc;
  z-index: 1;
}
.cost-bulk-table td:nth-child(2) {
  min-width: 230px;
}
.cost-bulk-table .bulk-select {
  width: 18px;
  min-height: 18px;
  margin: 0;
}
.cost-bulk-table .bulk-amount {
  min-width: 130px;
  max-width: 200px;
}
.cost-paste {
  border-radius: 8px;
  background: #f7f9fc;
  padding: 0 14px 14px;
}
.cost-paste label {
  margin-bottom: 12px;
}
.cost-paste textarea {
  resize: vertical;
  min-height: 110px;
  font-family: monospace;
}
.cost-preview {
  padding: 16px;
  border: 1px solid #d9d2f2;
  border-radius: 10px;
  background: #faf9ff;
}
.cost-bulk-message {
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 13px;
}
@media (max-width: 600px) {
  .cost-bulk-settings,
  .cost-bulk-filters {
    grid-template-columns: 1fr;
  }
  .cost-preview {
    padding: 10px;
  }
}
@media (max-width: 1100px) {
  .analytics-two,
  .analytics-settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .analytics-period label {
    flex: 1;
    min-width: 130px;
  }
  .analytics-period label input,
  .analytics-period label select {
    width: 100%;
  }
  .analytics-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analytics-kpis article {
    padding: 12px;
  }
  .analytics-kpis strong {
    font-size: 18px;
  }
}
