.sdp-wrap {
  max-width: 1320px;
}

.sdp-page-template {
  background: #f5f7fb;
  color: #111827;
  min-height: 70vh;
}

.sdp-hero {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.sdp-hero-inner {
  align-items: center;
  display: flex;
  gap: 32px;
  margin: 0 auto;
  max-width: 1320px;
  padding: 30px 22px 26px;
}

.sdp-logo {
  height: auto;
  max-width: 300px;
  width: min(300px, 42vw);
}

.sdp-hero-copy {
  border-left: 1px solid #e5e7eb;
  padding-left: 28px;
}

.sdp-eyebrow {
  color: #0090f6;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.sdp-hero h1 {
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  margin: 0 0 8px;
}

.sdp-hero p {
  color: #475569;
  font-size: 16px;
  margin: 0;
  max-width: 760px;
}

.sdp-panel-shell {
  margin: 0 auto;
  max-width: 1320px;
  padding: 24px 22px 48px;
}

.sdp-panel {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  margin: 18px 0;
  padding: 18px;
}

.sdp-kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 18px 0;
}

.sdp-kpi {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 16px;
}

.sdp-kpi span {
  color: #475569;
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.sdp-kpi strong {
  color: #0f172a;
  display: block;
  font-size: 34px;
  line-height: 1.1;
  margin: 8px 0 4px;
}

.sdp-kpi small {
  color: #64748b;
  display: block;
  line-height: 1.35;
}

.sdp-dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sdp-ranked,
.sdp-priority-list {
  margin: 0;
  padding-left: 20px;
}

.sdp-ranked li,
.sdp-priority-list li {
  align-items: center;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 0;
}

.sdp-ranked li:last-child,
.sdp-priority-list li:last-child {
  border-bottom: 0;
}

.sdp-priority-list a {
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

.sdp-priority-list span {
  background: #e0f2fe;
  border-radius: 999px;
  color: #075985;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.sdp-client-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.sdp-client-tabs a {
  background: #fff;
  border: 1px solid #dbe6f1;
  border-radius: 999px;
  color: #334155;
  font-weight: 800;
  padding: 10px 14px;
  text-decoration: none;
}

.sdp-client-tabs a:hover {
  border-color: #7dd3fc;
  color: #0369a1;
}

.sdp-client-tabs a.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.sdp-filters {
  align-items: center;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
}

.sdp-filters input,
.sdp-filters select {
  min-height: 36px;
  min-width: 190px;
}

.sdp-calendar-module {
  margin-top: 16px;
}

.sdp-calendar-head {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe6f1;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 16px;
}

.sdp-calendar-head h3 {
  color: #0f172a;
  font-size: 24px;
  line-height: 1.1;
  margin: 0;
}

.sdp-calendar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.sdp-calendar-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: 300px minmax(0, 1fr);
}

.sdp-calendar-layout.is-readonly {
  grid-template-columns: 1fr;
}

.sdp-calendar-backlog {
  background: #fff;
  border: 1px solid #dbe6f1;
  border-radius: 8px;
  max-height: 760px;
  overflow: auto;
  padding: 14px;
  position: sticky;
  top: 46px;
}

.sdp-calendar-backlog-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sdp-calendar-backlog-head strong {
  color: #0f172a;
  font-size: 16px;
}

.sdp-calendar-backlog-head span {
  background: #e0f2fe;
  border-radius: 999px;
  color: #075985;
  font-weight: 800;
  padding: 4px 8px;
}

.sdp-calendar-backlog-list {
  display: grid;
  gap: 8px;
}

.sdp-calendar-grid {
  background: #dbe6f1;
  border: 1px solid #dbe6f1;
  border-radius: 8px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  overflow: hidden;
}

.sdp-calendar-weekday {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  padding: 9px;
  text-align: center;
  text-transform: uppercase;
}

.sdp-calendar-day {
  background: #fff;
  min-height: 132px;
  padding: 8px;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.sdp-calendar-day.is-empty {
  background: #f8fafc;
}

.sdp-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px #0ea5e9;
}

.sdp-calendar-day.is-drop-target {
  background: #eff6ff;
  box-shadow: inset 0 0 0 2px #38bdf8;
}

.sdp-calendar-day-number {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 7px;
}

.sdp-calendar-dropzone {
  display: grid;
  gap: 6px;
  min-height: 82px;
}

.sdp-calendar-chip {
  background: #0f172a;
  border: 1px solid #0f172a;
  border-radius: 7px;
  color: #fff;
  cursor: grab;
  padding: 8px;
}

.sdp-calendar-chip strong {
  display: block;
  font-size: 12px;
  line-height: 1.25;
}

.sdp-calendar-chip span {
  color: #cbd5e1;
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
}

.sdp-calendar-backlog .sdp-calendar-chip {
  background: #fff;
  border-color: #dbe6f1;
  color: #0f172a;
}

.sdp-calendar-backlog .sdp-calendar-chip span {
  color: #64748b;
}

.sdp-calendar-chip.is-dragging {
  opacity: 0.45;
}

.sdp-calendar-chip.is-saving {
  outline: 2px solid #f8e831;
}

.sdp-calendar-chip.has-error {
  outline: 2px solid #dc2626;
}

.sdp-calendar-layout.is-readonly .sdp-calendar-chip {
  cursor: default;
}

.sdp-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.sdp-card {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
  padding: 16px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.sdp-topic-card.is-selected {
  border-color: #38bdf8;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.12);
  transform: translateY(-1px);
}

.sdp-card h3 {
  font-size: 17px;
  line-height: 1.35;
  margin: 10px 0 12px;
}

.sdp-card-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.sdp-score {
  align-items: baseline;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  color: #075985;
  display: inline-flex;
  gap: 2px;
  padding: 5px 8px;
}

.sdp-score strong {
  font-size: 18px;
  line-height: 1;
}

.sdp-score span {
  font-size: 12px;
  font-weight: 700;
}

.sdp-select-topic {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe6f1;
  border-radius: 999px;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  font-weight: 700;
  margin-top: 12px;
  padding: 8px 11px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.sdp-select-topic:hover {
  background: #f8fafc;
  border-color: #bae6fd;
}

.sdp-select-topic input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.sdp-select-topic span {
  align-items: center;
  border: 1.5px solid #94a3b8;
  border-radius: 5px;
  display: inline-flex;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.sdp-select-topic span::after {
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  content: "";
  display: none;
  height: 8px;
  transform: rotate(45deg) translate(-1px, -1px);
  width: 4px;
}

.sdp-select-topic input:checked + span {
  background: #0284c7;
  border-color: #0284c7;
}

.sdp-select-topic input:checked + span::after {
  display: block;
}

.sdp-select-topic input:checked ~ strong {
  color: #0369a1;
}

.sdp-package-bar {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe6f1;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin: 16px 0 18px;
  padding: 16px;
  position: sticky;
  top: 46px;
  z-index: 5;
}

.sdp-package-bar::before {
  background: #0ea5e9;
  border-radius: 999px;
  content: "";
  height: 42px;
  width: 5px;
}

.sdp-package-copy {
  flex: 1 1 420px;
}

.sdp-package-copy strong {
  display: block;
  font-size: 17px;
  margin-bottom: 3px;
}

.sdp-package-copy span {
  color: #64748b;
}

.sdp-package-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.sdp-package-count {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  padding: 8px 12px;
  white-space: nowrap;
}

.sdp-package-count b {
  color: #0284c7;
}

.sdp-package-submit:disabled {
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

.sdp-package-bar.has-selection {
  border-color: #7dd3fc;
}

.sdp-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

.sdp-status-backlog {
  background: #eef2ff;
  color: #3730a3;
}

.sdp-status-ordered {
  background: #fff7ed;
  color: #9a3412;
}

.sdp-status-generated,
.sdp-status-delivered,
.sdp-status-published {
  background: #ecfdf5;
  color: #047857;
}

.sdp-meta {
  display: grid;
  grid-template-columns: 130px 1fr;
  margin: 0 0 12px;
}

.sdp-meta dt {
  color: #646970;
  font-weight: 700;
  padding: 3px 0;
}

.sdp-meta dd {
  margin: 0;
  padding: 3px 0;
}

.sdp-warning {
  background: #fff7ed;
  border-left: 4px solid #f97316;
  margin: 8px 0;
  padding: 8px 10px;
}

.sdp-brief {
  border-top: 1px solid #eef2f7;
  margin: 12px 0;
  padding-top: 10px;
}

.sdp-brief summary {
  cursor: pointer;
  font-weight: 800;
}

.sdp-checklist {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px;
}

.sdp-checklist span {
  border-radius: 6px;
  display: block;
  font-weight: 700;
  padding: 6px 8px;
}

.sdp-checklist .is-ok {
  background: #ecfdf5;
  color: #047857;
}

.sdp-checklist .is-missing {
  background: #fff7ed;
  color: #9a3412;
}

.sdp-button {
  background: #0f172a;
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 14px;
}

.sdp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sdp-actions form {
  margin: 0;
}

.sdp-preview {
  border: 1px solid #dcdcde;
  margin: 12px 0;
  max-height: 420px;
  overflow: auto;
  padding: 14px;
}

.sdp-card textarea {
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  width: 100%;
}

.sdp-muted {
  color: #646970;
}

.sdp-link-modal {
  display: none;
}

.sdp-link-modal.is-open {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: fixed;
  z-index: 100000;
}

.sdp-link-modal-backdrop {
  background: rgba(15, 23, 42, 0.58);
  inset: 0;
  position: absolute;
}

.sdp-link-dialog {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  max-height: min(720px, calc(100vh - 44px));
  max-width: 720px;
  overflow: auto;
  padding: 22px;
  position: relative;
  width: min(720px, 100%);
  z-index: 1;
}

.sdp-link-dialog h4 {
  color: #0f172a;
  font-size: 22px;
  line-height: 1.15;
  margin: 0 0 8px;
}

.sdp-link-dialog p {
  color: #475569;
  margin: 0 0 16px;
}

.sdp-link-options {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}

.sdp-link-options label {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #dbe6f1;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 18px 1fr;
  padding: 10px;
}

.sdp-link-options input {
  margin-top: 3px;
}

.sdp-link-options strong,
.sdp-custom-links strong {
  color: #0f172a;
  display: block;
}

.sdp-link-options small {
  color: #64748b;
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.sdp-custom-links textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-sizing: border-box;
  margin-top: 8px;
  min-height: 100px;
  padding: 10px;
  width: 100%;
}

.sdp-link-modal-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.sdp-prompt-preview {
  border-top: 1px solid #eef2f7;
  margin: 12px 0;
  padding-top: 10px;
}

.sdp-prompt-preview summary {
  cursor: pointer;
  font-weight: 800;
}

.sdp-prompt-preview textarea,
.sdp-prompt-template {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  margin-top: 10px;
  padding: 12px;
  width: 100%;
}

@media (max-width: 760px) {
  .sdp-hero-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .sdp-hero-copy {
    border-left: 0;
    padding-left: 0;
  }

  .sdp-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .sdp-filters input,
  .sdp-filters select,
  .sdp-filters .button {
    width: 100%;
  }

  .sdp-calendar-head,
  .sdp-calendar-layout {
    grid-template-columns: 1fr;
  }

  .sdp-calendar-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .sdp-calendar-backlog {
    max-height: none;
    position: static;
  }

  .sdp-calendar-grid {
    display: block;
  }

  .sdp-calendar-weekday,
  .sdp-calendar-day.is-empty {
    display: none;
  }

  .sdp-calendar-day {
    border-bottom: 1px solid #dbe6f1;
    min-height: 92px;
  }

  .sdp-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sdp-package-bar {
    align-items: stretch;
    flex-direction: column;
    position: static;
  }

  .sdp-package-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sdp-package-count {
    text-align: center;
  }

  .sdp-link-modal.is-open {
    align-items: flex-end;
    padding: 12px;
  }

  .sdp-link-dialog {
    max-height: calc(100vh - 24px);
  }
}
