.takeover-panel-daily-extractor {
  box-sizing: border-box;
  margin: 18px 0;
  width: 100%;
}

.tpde-shell {
  background: #0b1018;
  border: 1px solid #2d5f9a;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
  color: #e8eef7;
  padding: 20px;
  width: 100%;
}

.tpde-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tpde-eyebrow {
  color: #8cbdf2;
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.tpde-header h3,
.tpde-status-topline h4 {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
}

.tpde-header p {
  color: #b9c7d8;
  font-size: 14px;
  line-height: 1.45;
  margin: 6px 0 0;
}

.tpde-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tpde-button {
  align-items: center;
  background: #111b2a;
  border: 1px solid #355372;
  border-radius: 6px;
  color: #f2f7ff;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
  white-space: nowrap;
}

.tpde-button:hover {
  background: #17263b;
  border-color: #4b7fb7;
  color: #ffffff;
  text-decoration: none;
}

.tpde-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.tpde-button-primary {
  background: #1c5f9f;
  border-color: #2e87d7;
}

.tpde-button-primary:hover {
  background: #2370bb;
}

.tpde-output {
  min-height: 44px;
}

.tpde-message {
  background: #111b2a;
  border: 1px solid #355372;
  border-radius: 6px;
  color: #e8eef7;
  padding: 12px 14px;
}

.tpde-message-loading {
  background: #0d2136;
  border-color: #2e87d7;
}

.tpde-message-error {
  background: #301218;
  border-color: #e05260;
  color: #ffd5dc;
}

.tpde-status-panel {
  background: #0f1724;
  border: 1px solid #253c5e;
  border-radius: 8px;
  padding: 15px;
}

.tpde-status-topline {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tpde-status-topline h4 {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.tpde-status-pill {
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  padding: 7px 10px;
  text-transform: uppercase;
}

.tpde-status-current {
  background: #063b2a;
  border: 1px solid #2fbf71;
  color: #c8f7dc;
}

.tpde-status-not_final,
.tpde-status-stale {
  background: #3c2a07;
  border: 1px solid #dfa938;
  color: #ffe6a6;
}

.tpde-status-failed {
  background: #3a1219;
  border: 1px solid #e05260;
  color: #ffd5dc;
}

.tpde-status-not_loaded {
  background: #172033;
  border: 1px solid #708097;
  color: #d3deeb;
}

.tpde-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin-bottom: 12px;
}

.tpde-metric {
  background: #0b1018;
  border: 1px solid #253c5e;
  border-radius: 6px;
  padding: 10px 12px;
}

.tpde-metric span,
.tpde-details dt {
  color: #9fb0c6;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.tpde-metric strong {
  color: #ffffff;
  display: block;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tpde-details {
  display: grid;
  gap: 8px;
  margin: 0;
}

.tpde-details div {
  border-top: 1px solid #213551;
  padding-top: 8px;
}

.tpde-details dd {
  color: #e8eef7;
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.tpde-warning,
.tpde-error {
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 12px;
  padding: 9px 10px;
}

.tpde-warning {
  background: #171f2d;
  border-left: 3px solid #dfa938;
  color: #ffe6a6;
}

.tpde-error {
  background: #301218;
  border-left: 3px solid #e05260;
  color: #ffd5dc;
}

@media (max-width: 640px) {
  .tpde-shell {
    padding: 14px;
  }

  .tpde-actions,
  .tpde-status-topline {
    align-items: stretch;
    flex-direction: column;
  }

  .tpde-button,
  .tpde-status-pill {
    justify-content: center;
    width: 100%;
  }
}
