html,
body.dsp-layout {
  min-height: 100%;
}

body.dsp-layout {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.dsp-layout main.page-shell.dsp-main-shell {
  flex: 1 0 auto;
  width: 100%;
  margin: 0;
  padding-top: 6px;
}

body.dsp-layout .app-footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.dsp-page {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 4px 4px 32px;
  color: #16315f;
}

.dsp-hero,
.dsp-search-card,
.dsp-selected,
.dsp-summary,
.dsp-error,
.dsp-loading {
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  border: 1px solid rgba(22, 49, 95, 0.08);
  box-shadow: 0 16px 40px rgba(16, 35, 70, 0.08);
  padding: 18px;
  margin-bottom: 14px;
}

.dsp-hero {
  background:
    radial-gradient(circle at top right, rgba(55, 121, 246, 0.18), transparent 42%),
    linear-gradient(135deg, #13356d, #2c5da8);
  color: #ffffff;
  padding: 16px 18px;
  min-height: auto;
  border-radius: 18px;
  margin-bottom: 14px;
}

.dsp-hero--compact {
  margin-top: 10px;
}

.dsp-hero h1,
.dsp-summary-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.15;
}

.dsp-subtitle {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.3;
  opacity: 0.92;
}

.dsp-label,
.dsp-section-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5c7198;
}

.dsp-search-shell {
  position: relative;
}

.dsp-input {
  width: 100%;
  border: 1px solid rgba(22, 49, 95, 0.16);
  border-radius: 14px;
  min-height: 50px;
  padding: 0 14px;
  font-size: 16px;
  color: #16315f;
  background: #ffffff;
}

.dsp-results {
  position: absolute;
  inset: calc(100% + 8px) 0 auto;
  z-index: 20;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(22, 49, 95, 0.12);
  box-shadow: 0 20px 36px rgba(16, 35, 70, 0.14);
  padding: 8px;
}

.dsp-result-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  color: inherit;
}

.dsp-result-item strong,
.dsp-result-item span {
  display: block;
}

.dsp-result-item span,
.dsp-selected span,
.dsp-updated,
.dsp-om-meta,
.dsp-feedback,
.dsp-loading span,
.dsp-status-text {
  color: #667a9f;
}

.dsp-period-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.dsp-day-row {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.dsp-chip {
  border: 1px solid rgba(22, 49, 95, 0.14);
  background: #eef4ff;
  color: #21457e;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 14px;
  font-weight: 700;
}

.dsp-chip.is-active {
  background: #21457e;
  color: #ffffff;
}

.dsp-selected strong {
  display: block;
  font-size: 20px;
}

.dsp-date-input {
  width: min(260px, 100%);
  min-height: 44px;
  border: 1px solid rgba(22, 49, 95, 0.16);
  border-radius: 14px;
  padding: 0 14px;
  background: #ffffff;
  color: #16315f;
}

.dsp-day-message,
.dsp-summary-range {
  margin: 0;
  color: #667a9f;
  font-size: 14px;
}

.dsp-feedback,
.dsp-loading,
.dsp-error {
  text-align: center;
}

.dsp-warning {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #f2cf75;
  border-radius: 12px;
  background: #fff8e6;
  color: #704f00;
  font-size: 13px;
  line-height: 1.35;
}

.dsp-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.dsp-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dsp-card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.dsp-card,
.dsp-adh-card,
.dsp-om-card {
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(22, 49, 95, 0.08);
  padding: 14px;
}

.dsp-card span,
.dsp-adh-head span {
  display: block;
  color: #667a9f;
  font-size: 13px;
}

.dsp-card strong,
.dsp-adh-head strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  color: #16315f;
}

.dsp-adh-card {
  margin-top: 10px;
}

.dsp-adh-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.dsp-bar {
  margin: 12px 0;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #deebff;
}

.dsp-bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #1d4ed8, #10b981);
  border-radius: inherit;
}

.dsp-status-title {
  margin: 0 0 4px;
  font-weight: 700;
  color: #16315f;
}

.dsp-status-text {
  margin: 0;
}

.dsp-primary-btn,
.dsp-secondary-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 0;
  font-weight: 700;
  font-size: 15px;
  margin-top: 14px;
}

.dsp-primary-btn {
  background: linear-gradient(135deg, #13356d, #2c5da8);
  color: #ffffff;
}

.dsp-secondary-btn {
  background: #eef4ff;
  color: #21457e;
}

.dsp-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 3px solid rgba(29, 78, 216, 0.16);
  border-top-color: #1d4ed8;
  animation: dsp-spin 0.9s linear infinite;
}

.dsp-back {
  display: inline-flex;
  margin-bottom: 10px;
  color: #21457e;
  font-weight: 700;
}

.dsp-oms-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.dsp-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.dsp-kpi-card {
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(22, 49, 95, 0.08);
  padding: 10px 12px;
  min-width: 0;
}

.dsp-kpi-card span {
  display: block;
  color: #667a9f;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dsp-kpi-card strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.1;
  color: #16315f;
}

.dsp-om-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.dsp-om-head-main,
.dsp-om-status-wrap {
  min-width: 0;
}

.dsp-om-head-main {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.dsp-om-status-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.dsp-om-label {
  display: inline-block;
  color: #7a8fb3;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dsp-om-title {
  display: inline-block;
  margin-top: 0;
  font-size: 16px;
  line-height: 1.15;
  color: #16315f;
  word-break: break-word;
}

.dsp-om-description {
  margin: 6px 0 8px;
  color: #718096;
  line-height: 1.3;
  font-size: 13px;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dsp-om-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 0 2px;
  border-top: 1px solid rgba(22, 49, 95, 0.08);
}

.dsp-om-stat {
  min-width: 0;
}

.dsp-om-stat span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #667a9f;
}

.dsp-om-stat strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.1;
  color: #16315f;
}

.dsp-om-meta {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.25;
}

.dsp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.dsp-om-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.dsp-om-link:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 3px;
  border-radius: 14px;
}

.dsp-badge--sem_apontamento {
  background: #fee2e2;
  color: #991b1b;
}

.dsp-badge--parcial {
  background: #ffedd5;
  color: #9a3412;
}

.dsp-badge--concluida {
  background: #dcfce7;
  color: #166534;
}

.dsp-badge--acima {
  background: #ede9fe;
  color: #6d28d9;
}

@keyframes dsp-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .dsp-page {
    padding-inline: 0;
  }

  .dsp-hero h1,
  .dsp-summary-head h2 {
    font-size: 22px;
  }

  .dsp-hero {
    padding: 16px 16px;
  }

  .dsp-chip {
    white-space: normal;
  }

  .dsp-summary-head {
    flex-direction: column;
  }

  .dsp-kpi-strip,
  .dsp-om-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dsp-kpi-card,
  .dsp-om-card {
    padding: 10px;
  }

  .dsp-om-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .dsp-om-head-main {
    flex-wrap: nowrap;
    align-items: center;
  }

  .dsp-om-status-wrap {
    justify-content: flex-end;
    align-items: center;
  }
}
