.home-content .news-grid article {
  height: 128px;
  min-height: 128px;
}

/* Programação adicional e gadgets laterais */
@media (min-width: 801px) {
  .schedule-section .schedule-grid > article:nth-child(n + 5) {
    display: none;
  }
}

.sidebar-widgets {
  display: grid;
  gap: 4px;
}

.sidebar-gadget-title {
  margin-top: 28px !important;
}

.sidebar-schedule-list {
  display: grid;
  gap: 10px;
}

.sidebar-schedule-card {
  min-height: 132px;
  width: 100%;
}

.widget-card {
  overflow: hidden;
  border: 1px solid #ffffff12;
  border-radius: 7px;
  background: #172d43;
  color: #fff;
}

.widget-loading,
.widget-error {
  margin: 0;
  padding: 18px;
  color: #afbfcc;
  font-size: 12px;
  line-height: 1.5;
}

.weather-card {
  padding: 16px;
}

.weather-city {
  display: block;
  overflow: hidden;
  margin-bottom: 12px;
  color: #c8d7e3;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-current {
  display: flex;
  align-items: center;
  gap: 13px;
}

.weather-icon {
  font-size: 42px;
  line-height: 1;
}

.weather-current > div {
  display: grid;
}

.weather-current strong {
  font-size: 30px;
  line-height: 1.1;
}

.weather-current small,
.weather-credit,
.horoscope-note {
  color: #9eb0bf;
  font-size: 10px;
}

.weather-credit {
  text-decoration: none;
}

.weather-days {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 15px 0 12px;
}

.weather-days > div {
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 8px 3px;
  border-radius: 5px;
  background: #0d2338;
}

.weather-days span,
.weather-days small {
  color: #b7c5d0;
  font-size: 9px;
}

.weather-days b {
  font-size: 20px;
}

.horoscope-card {
  display: grid;
  gap: 11px;
  padding: 16px;
  text-align: center;
}

.horoscope-card select {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #395168;
  border-radius: 6px;
  background: #0d2338;
  color: #fff;
}

.horoscope-symbol {
  color: #ffb238;
  font-size: 45px;
  line-height: 1;
}

.horoscope-card p {
  margin: 0;
  color: #c1cfda;
  font-size: 12px;
  line-height: 1.65;
}

.poll-card {
  padding: 16px;
}

.poll-card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.45;
}

.poll-card form {
  display: grid;
  gap: 8px;
}

.poll-card form label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 5px;
  background: #0e253a;
  color: #c8d4de;
  cursor: pointer;
  font-size: 11px;
}

.poll-card input {
  accent-color: #ff9f1a;
}

.poll-card form button {
  min-height: 40px;
  margin-top: 5px;
  border: 0;
  border-radius: 6px;
  background: #0b9d59;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.poll-card form button:disabled {
  opacity: .55;
}

.poll-message {
  margin: 3px 0 0;
  color: #adc1d0;
  font-size: 10px;
  line-height: 1.45;
}

.poll-results {
  display: grid;
  gap: 12px;
}

.poll-results > div > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: #c8d4de;
  font-size: 10px;
}

.poll-result-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 5px;
  background: #0d2134;
}

.poll-result-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ff9f1a;
}

.poll-results > small {
  color: #8fa4b4;
  font-size: 9px;
}

/* Administração dos gadgets */
.gadget-admin-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  border-top: 4px solid #ff9f1a;
}

.gadget-admin-intro,
.poll-admin-header,
.poll-admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.gadget-admin-intro {
  align-items: flex-start;
}

.gadget-admin-icon {
  display: grid;
  width: 58px;
  height: 50px;
  flex: 0 0 58px;
  place-items: center;
  border-radius: 10px;
  background: #fff1dc;
  color: #b96600;
  font-size: 9px;
  font-weight: 900;
}

.gadget-admin-intro h2,
.gadget-admin-intro p,
.poll-admin h3,
.poll-admin p,
.gadget-admin-message {
  margin: 0;
}

.gadget-admin-intro h2 {
  color: #173b54;
  font-size: 19px;
}

.gadget-admin-intro p,
.poll-admin-header p {
  color: #6b7f8f;
  font-size: 12px;
  line-height: 1.5;
}

.gadget-settings-grid {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.gadget-toggle {
  display: flex !important;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #d9e1e8;
  border-radius: 7px;
}

.gadget-toggle input {
  width: auto !important;
  accent-color: #0b9d59;
}

.gadget-save-button,
.poll-secondary-button,
.poll-close-button {
  min-height: 42px;
  padding: 9px 15px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
}

.gadget-save-button {
  width: max-content;
  background: #0b9d59;
  color: #fff;
}

.poll-secondary-button {
  background: #e7eef4;
  color: #31556f;
}

.poll-close-button {
  background: #ff9f1a;
  color: #fff;
}

.gadget-admin-panel button:disabled {
  cursor: wait;
  opacity: .55;
}

.gadget-admin-message {
  min-height: 18px;
  color: #617789;
  font-size: 12px;
}

.gadget-admin-message.success { color: #087545; }
.gadget-admin-message.error { color: #af2938; }

.poll-admin {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid #e1e8ed;
}

.poll-admin-status {
  width: max-content;
  padding: 5px 9px;
  border-radius: 5px;
  background: #eef4f8;
  color: #46667d;
  font-size: 11px;
  font-weight: 700;
}

.poll-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.poll-admin-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.poll-admin-results {
  display: grid;
  gap: 7px;
}

.poll-admin-results h4 {
  margin: 6px 0 2px;
}

.poll-admin-results > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 5px;
  background: #f1f5f8;
  color: #496276;
  font-size: 12px;
}

@media (max-width: 800px) {
  /* No mobile, play e programa no ar ficam lado a lado. */
  .hero-player {
    height: 106px;
    grid-template-columns: 58px minmax(0, 1fr) 76px;
    grid-template-rows: 1fr;
  }

  .listen-callout {
    bottom: 124px;
  }

  .audio-controls {
    grid-column: 1;
    grid-row: 1;
    height: 100%;
    gap: 0;
  }

  .audio-controls > svg,
  .audio-controls > input {
    display: none;
  }

  .round-play {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
  }

  .on-air {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 8px;
  }

  .on-air img {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .on-air div {
    min-width: 0;
  }

  .on-air strong,
  .on-air small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .on-air strong {
    font-size: 13px;
  }

  .on-air small {
    font-size: 9px;
  }

  .tv-button {
    grid-column: 3;
    grid-row: 1;
    height: 100%;
    padding: 6px 3px;
    font-size: 10px;
  }

  .sidebar-extra-schedule {
    display: none;
  }

  .gadget-settings-grid,
  .poll-options-grid {
    grid-template-columns: 1fr;
  }

  .gadget-admin-intro,
  .poll-admin-header,
  .poll-admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .gadget-save-button,
  .poll-secondary-button,
  .poll-close-button {
    width: 100%;
  }
}

.home-content .news-grid img {
  width: 180px;
  height: 128px;
  min-height: 0;
  max-height: 128px;
  object-fit: cover;
  object-position: center;
}

.home-content .news-grid article > div {
  min-width: 0;
  max-height: 128px;
  overflow: hidden;
}

.home-content .news-grid p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rss-news-grid article {
  cursor: pointer;
}

.news-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #dfe6eb;
}

.news-detail-meta span {
  color: #0b8b50;
  font-size: 13px;
  font-weight: 800;
}

.news-detail-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 7px;
  background: #e7eef4;
  color: #26536f;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.rss-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.rss-settings[hidden] {
  display: none !important;
}

.news-sources-manager {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
  border-top: 4px solid #0b9d59;
}

.news-sources-intro,
.news-sources-toolbar,
.news-source-heading,
.news-source-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.news-sources-intro {
  align-items: flex-start;
}

.news-sources-icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  place-items: center;
  border-radius: 12px;
  background: #e6f7ef;
  color: #087545;
  font-size: 12px;
  font-weight: 900;
}

.news-sources-intro h2,
.news-sources-intro p,
.news-source-card p,
.news-sources-message,
.news-cron p {
  margin: 0;
}

.news-sources-intro h2 {
  color: #173b54;
  font-size: 19px;
}

.news-sources-intro p,
.news-sources-toolbar small,
.news-source-footer small,
.news-source-url,
.news-cron p {
  color: #6b7f8f;
  font-size: 12px;
  line-height: 1.55;
}

.news-source-form {
  display: grid;
  grid-template-columns: minmax(180px, .65fr) minmax(260px, 1.35fr) auto;
  gap: 12px;
  align-items: end;
}

.news-source-form label {
  display: grid;
  gap: 7px;
}

.news-source-form label span {
  color: #385368;
  font-size: 12px;
  font-weight: 700;
}

.news-source-form input,
.news-cron-row input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d4dee6;
  border-radius: 7px;
  background: #fff;
  color: #263f52;
}

.news-source-save,
.news-sources-execute,
.news-cron-copy,
.news-cron-rotate,
.news-source-delete {
  min-height: 42px;
  padding: 9px 15px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}

.news-source-save,
.news-sources-execute {
  background: #0b9d59;
  color: #fff;
}

.news-sources-manager button:disabled,
.news-sources-manager input:disabled {
  cursor: wait;
  opacity: .58;
}

.news-sources-message {
  min-height: 18px;
  color: #617789;
  font-size: 13px;
}

.news-sources-message.success { color: #087545; }
.news-sources-message.error { color: #af2938; }
.news-sources-message.working { color: #2b638a; }

.news-sources-toolbar {
  padding-top: 4px;
  border-top: 1px solid #e2e9ee;
}

.news-sources-toolbar > div {
  display: grid;
  gap: 3px;
}

.news-sources-list {
  display: grid;
  gap: 11px;
}

.news-sources-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed #cbd8e1;
  border-radius: 8px;
  color: #6b7f8f;
  text-align: center;
}

.news-source-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #dae4ea;
  border-left: 4px solid #0b9d59;
  border-radius: 8px;
  background: #fff;
}

.news-source-card.status-error { border-left-color: #c53b49; }

.news-source-heading > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.news-source-heading strong {
  overflow: hidden;
  color: #203f55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-source-status {
  color: #0b8650;
  font-size: 11px;
  font-weight: 700;
}

.status-error .news-source-status { color: #af2938; }

.news-source-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4e6678;
  font-size: 12px;
  font-weight: 700;
}

.news-source-url {
  overflow-wrap: anywhere;
}

.news-source-footer {
  align-items: flex-end;
  padding-top: 6px;
  border-top: 1px solid #edf1f4;
}

.news-source-delete {
  min-height: 34px;
  padding: 6px 11px;
  background: #fbe9eb;
  color: #aa2836;
}

.news-cron {
  border-top: 1px solid #e2e9ee;
}

.news-cron summary {
  padding: 14px 0 0;
  cursor: pointer;
  color: #274c65;
  font-weight: 800;
}

.news-cron-body {
  display: grid;
  gap: 11px;
  padding-top: 13px;
}

.news-cron-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.news-cron-row input {
  background: #f5f8fa;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.news-cron-copy,
.news-cron-rotate {
  background: #e5edf4;
  color: #31556f;
}

.rss-settings > .wide {
  grid-column: auto;
}

.rss-import {
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 7px;
  background: #0b9d59;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.rss-import:disabled {
  cursor: wait;
  opacity: .65;
}

.rss-status {
  grid-column: 1 / -1;
  margin: 0;
  color: #087545;
  font-size: 13px;
}

.news-editor {
  grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr) auto;
}

.news-editor > .upload-field {
  grid-column: 1;
  grid-row: 1 / 4;
}

.news-editor > label:nth-child(2) {
  grid-column: 2 / 4;
  grid-row: 1;
}

.news-editor > label:nth-child(3) {
  grid-column: 2 / 4;
  grid-row: 2;
}

.news-editor > label:nth-child(4) {
  grid-column: 2;
  grid-row: 3;
}

.news-editor > label:nth-child(5) {
  grid-column: 3;
  grid-row: 3;
}

.news-editor > .delete {
  grid-column: 4;
  grid-row: 3;
}

.update-manager {
  margin-top: 24px;
}

.admin-card input.protected-identity {
  cursor: not-allowed;
  background: #eef2f5;
  color: #738391;
}

.update-manager-title {
  margin-bottom: 18px;
  font-size: 18px;
  font-weight: 800;
  color: #183047;
}

.update-content {
  display: grid;
  gap: 18px;
}

.update-version-row,
.update-block-header,
.update-card-header,
.update-upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.update-version {
  padding: 5px 11px;
  border-radius: 999px;
  background: #e6f7ee;
  color: #087545;
  font-size: 12px;
  font-weight: 800;
}

.update-upload-block,
.update-available-block {
  padding: 18px;
  border: 1px solid #e0e7ed;
  border-radius: 10px;
  background: #f8fafc;
}

.update-upload-block h3,
.update-available-block h3 {
  margin: 0 0 13px;
  font-size: 15px;
}

.update-block-header h3 {
  margin: 0;
}

.update-upload-row input[type="file"] {
  min-width: 0;
  flex: 1;
  padding: 8px;
  border: 1px solid #d4dee6;
  border-radius: 7px;
  background: #fff;
  color: #31475a;
}

.update-upload-button,
.update-apply,
.update-refresh {
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}

.update-upload-button,
.update-apply {
  min-height: 41px;
  padding: 10px 17px;
  background: #0b9d59;
  color: #fff;
}

.update-refresh {
  padding: 8px 11px;
  background: #e5edf4;
  color: #31556f;
  font-size: 12px;
}

.update-upload-button:disabled,
.update-apply:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.update-hint,
.update-empty,
.update-warning,
.update-message {
  margin: 11px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6e8191;
}

.update-hint code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #e6edf3;
  color: #23445d;
}

.update-warning,
.update-message.error {
  color: #aa2836;
}

.update-message.success {
  color: #087545;
}

.update-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dce5eb;
  border-left: 4px solid #0b9d59;
  border-radius: 8px;
  background: #fff;
}

.update-card-header > div {
  display: grid;
  gap: 3px;
}

.update-card-header span,
.update-history small {
  color: #738595;
  font-size: 11px;
}

.update-details,
.update-history {
  margin-top: 12px;
  color: #344e63;
  font-size: 13px;
}

.update-details summary,
.update-history summary {
  cursor: pointer;
  font-weight: 700;
}

.update-description {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #607586;
  line-height: 1.55;
}

.update-history article {
  display: grid;
  gap: 4px;
  padding: 13px 0;
  border-bottom: 1px solid #e4eaee;
}

@media (max-width: 800px) {
  .home-content .news-grid article {
    height: 118px;
    min-height: 118px;
  }

  .home-content .news-grid img {
    width: 130px;
    height: 118px;
    max-height: 118px;
  }

  .home-content .news-grid article > div {
    max-height: 118px;
  }

  .news-detail-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .news-detail-meta a {
    justify-content: center;
  }

  .rss-settings,
  .news-editor {
    grid-template-columns: 1fr;
  }

  .news-source-form {
    grid-template-columns: 1fr;
  }

  .news-source-save,
  .news-sources-execute,
  .news-cron-copy,
  .news-cron-rotate {
    width: 100%;
  }

  .news-sources-toolbar,
  .news-source-footer,
  .news-cron-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .news-sources-toolbar,
  .news-source-footer {
    flex-direction: column;
  }

  .rss-settings > .wide,
  .rss-status,
  .news-editor > .upload-field,
  .news-editor > label:nth-child(2),
  .news-editor > label:nth-child(3),
  .news-editor > label:nth-child(4),
  .news-editor > label:nth-child(5),
  .news-editor > .delete {
    grid-column: auto;
    grid-row: auto;
  }

  .update-upload-row,
  .update-card-header,
  .update-block-header {
    align-items: stretch;
    flex-direction: column;
  }

  .update-upload-button,
  .update-apply,
  .update-refresh {
    width: 100%;
  }
}
