/* ==========================================================
   FONTES
========================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================
   VARIÁVEIS
========================================================== */

:root {
  --color-background: #05070a;
  --color-panel: rgba(18, 24, 33, 0.62);
  --color-panel-alt: rgba(255, 255, 255, 0.045);

  --color-panel-border: rgba(255, 255, 255, 0.18);
  --color-border-soft: rgba(255, 255, 255, 0.08);
  --color-divider: rgba(255, 255, 255, 0.12);

  --color-primary: #ffc247;
  --color-text: #ffffff;
  --color-secondary: #b9d4ff;
  --color-secondary-light: #d8e6ff;
  --color-description: #d0d8e8;
  --color-muted: #718096;
  --color-other-month: #4f5d70;
  --color-sabbath: #ff9f1c;
  --color-temperature-max: #ff7b72;
  --color-temperature-min: #79c0ff;

  --panel-radius: 18px;
  --panel-gap: 12px;
  --panel-blur: 1px;
  --panel-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);

  --ticker-height: 42px;
  --background-transition-duration: 2s;
}

/* ==========================================================
   RESET E BASE
========================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-width: 0;
  height: 100%;
}

body {
  position: relative;
  background: var(--color-background);
  color: var(--color-text);
  font-family: "Inter", Arial, sans-serif;
  cursor: none;
  overflow: hidden;
}

/* ==========================================================
   FUNDO COM SLIDESHOW
========================================================== */

.background-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--color-background);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--background-transition-duration) ease-in-out;
}

.background-layer-visible {
  opacity: 1;
}


/* ==========================================================
   BARRA SUPERIOR
========================================================== */

.top-ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--ticker-height);
  display: flex;
  align-items: center;
  background: rgba(125, 0, 0, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.top-ticker-track {
  width: max-content;
  display: flex;
  align-items: center;
  color: #ffffff;
  font-size: clamp(15px, 1.15vw, 21px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}

.top-ticker-content {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 28px;
  padding-right: 28px;
}

.ticker-separator {
  color: var(--color-primary);
}

.ticker-buy {
  color: #34d399;
  font-weight: 800;
}

.ticker-sell {
  color: #facc15;
  font-weight: 800;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* ==========================================================
   LAYOUT PRINCIPAL
========================================================== */

.dashboard {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: calc(100vh - var(--ticker-height));
  margin-top: var(--ticker-height);
  padding: clamp(8px, 0.8vw, 16px);
  display: grid;
  grid-template-columns:
    minmax(0, 2fr)
    minmax(290px, 1fr)
    minmax(230px, 0.55fr);
  grid-template-rows: repeat(12, minmax(0, 1fr));
  gap: clamp(7px, 0.7vw, var(--panel-gap));
}

.panel {
  min-width: 0;
  min-height: 0;
  background: var(--color-panel);
  border: 1px solid var(--color-panel-border);
  border-radius: var(--panel-radius);
  color: var(--color-secondary);
  backdrop-filter: blur(var(--panel-blur));
  -webkit-backdrop-filter: blur(var(--panel-blur));
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

.main-panel {
  grid-column: 1;
  grid-row: 1 / 9;
}

.weather-panel {
  grid-column: 1;
  grid-row: 9 / 13;
}

.calendar-panel {
  grid-column: 2;
  grid-row: 1 / 7;
}

.events-panel {
  grid-column: 2;
  grid-row: 7 / 13;
}

.family-panel {
  grid-column: 3;
  grid-row: 1 / 13;
}

/* ==========================================================
   PAINEL PRINCIPAL
========================================================== */

.main-panel {
  padding: clamp(12px, 1.2vw, 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  text-align: center;
}

.weekday {
  color: var(--color-primary);
  font-size: clamp(22px, 2vw, 40px);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.date-area {
  min-height: 0;
  display: grid;
  grid-template-columns:
    minmax(120px, 1fr)
    minmax(220px, 1.7fr)
    minmax(120px, 1fr);
  align-items: start;
  gap: clamp(8px, 1vw, 18px);
}

.sun-box {
  min-width: 0;
  margin-top: clamp(20px, 3vh, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: var(--color-secondary-light);
  font-size: clamp(14px, 1.25vw, 24px);
}

.sun-icon {
  width: clamp(40px, 4vw, 72px);
  height: clamp(40px, 4vw, 72px);
  margin-bottom: clamp(4px, 0.5vw, 9px);
  display: block;
  object-fit: contain;
}

.sun-box strong {
  display: block;
  margin-top: clamp(4px, 0.6vw, 10px);
  color: var(--color-text);
  font-size: clamp(24px, 2.5vw, 46px);
  font-weight: 800;
  line-height: 1;
}

.date-center {
  min-width: 0;
  min-height: 0;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.clock-time {
  margin-bottom: clamp(8px, 0.8vw, 14px);
  color: var(--color-secondary-light);
  font-size: clamp(34px, 3.4vw, 66px);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
}

.day-number {
  color: var(--color-text);
  font-size: clamp(130px, 15vw, 270px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.74;
}

.month-name {
  margin-top: clamp(14px, 1.3vw, 24px);
  color: var(--color-primary);
  font-size: clamp(40px, 4.5vw, 82px);
  font-weight: 800;
  line-height: 1;
}

/* ==========================================================
   FAIXA DEVOCIONAL DO PAINEL PRINCIPAL
========================================================== */

.main-devotional-row {
  width: 100%;
  display: grid;
  grid-template-columns:
    minmax(150px, 1fr)
    minmax(260px, 1.5fr)
    minmax(180px, 1fr);
  align-items: end;
  gap: clamp(14px, 1.5vw, 28px);
}

.main-rpsp,
.main-lesson {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.main-rpsp {
  text-align: left;
}

.main-lesson {
  text-align: right;
}

.main-devotional-label {
  color: var(--color-primary);
  font-size: clamp(14px, 1.2vw, 21px);
  font-weight: 800;
}

.main-rpsp strong {
  color: var(--color-text);
  font-size: clamp(20px, 1.8vw, 32px);
  font-weight: 800;
}

.main-lesson strong {
  color: var(--color-text);
  font-size: clamp(15px, 1.35vw, 24px);
  font-weight: 800;
  line-height: 1.15;
}

.main-lesson > span:last-child {
  color: var(--color-secondary);
  font-size: clamp(13px, 1.15vw, 20px);
  line-height: 1.15;
}

.bible-promise {
  max-width: 100%;
  margin: 0;
  color: var(--color-secondary-light);
  font-size: clamp(16px, 1.5vw, 28px);
  font-style: italic;
  line-height: 1.3;
  text-align: center;
}

.promise-text,
.promise-reference {
  display: block;
}

.promise-reference {
  margin-top: 6px;
  color: var(--color-primary);
  font-size: 0.72em;
  font-style: normal;
  font-weight: 700;
}

/* ==========================================================
   CALENDÁRIO
========================================================== */

.calendar-panel {
  padding: clamp(12px, 1.2vw, 24px);
}

.calendar-panel h2 {
  margin-bottom: clamp(8px, 1vw, 18px);
  color: var(--color-primary);
  text-align: center;
  font-size: clamp(24px, 2.3vw, 42px);
  font-weight: 800;
  line-height: 1.1;
}

.calendar-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(7, minmax(0, auto));
  gap: clamp(3px, 0.45vw, 9px);
  text-align: center;
  font-size: clamp(16px, 1.55vw, 28px);
  font-weight: 700;
}

.calendar-weekday,
.calendar-day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.calendar-day-number {
  position: relative;
  z-index: 2;
}

.calendar-event-indicator {
  position: absolute;
  top: -2px;
  right: -2px;
  z-index: 3;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4caf78;
  border: 2px solid rgba(18, 24, 33, 0.9);
  border-radius: 999px;
  color: #ffffff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}

.calendar-today .calendar-event-indicator {
  background: #d94343;
  border-color: var(--color-primary);
  color: #ffffff;
}

.calendar-other-month .calendar-event-indicator {
  opacity: 0.45;
}

/* ==========================================================
   CLIMA
========================================================== */

.weather-panel {
  padding: clamp(7px, 0.8vw, 14px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(3px, 0.45vw, 7px);
}

.weather-summary {
  display: grid;
  grid-template-columns: minmax(185px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(8px, 1vw, 18px);
}

.weather-current {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.8vw, 14px);
}

.weather-current-content {
  min-width: 0;
}

.weather-icon {
  width: clamp(44px, 4vw, 74px);
  height: clamp(44px, 4vw, 74px);
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.weather-temp {
  color: var(--color-text);
  font-size: clamp(34px, 3.4vw, 64px);
  font-weight: 800;
  line-height: 1;
}

.weather-desc {
  margin-top: 3px;
  color: var(--color-description);
  font-size: clamp(13px, 1.35vw, 24px);
  line-height: 1.2;
}

.weather-details {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: clamp(6px, 0.8vw, 14px);
  color: var(--color-secondary);
  font-size: clamp(11px, 1.15vw, 20px);
}

.weather-detail {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(3px, 0.4vw, 7px);
  white-space: nowrap;
}

.weather-detail-icon {
  width: clamp(17px, 1.7vw, 30px);
  height: clamp(17px, 1.7vw, 30px);
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.weather-hourly-chart {
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  color: var(--color-muted);
  font-size: 12px;
}

.weather-chart-svg {
  width: 100%;
  height: 100%;
  min-height: clamp(72px, 8vh, 120px);
  display: block;
  overflow: visible;
}

.weather-chart-temperature {
  fill: var(--color-secondary);
  font-family: "Inter", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.weather-chart-hour {
  fill: var(--color-muted);
  font-family: "Inter", Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
}

.weather-forecast {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(2px, 0.35vw, 6px);
  padding-top: clamp(3px, 0.4vw, 6px);
  border-top: 1px solid var(--color-divider);
}

.weather-day {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.weather-day-name {
  color: var(--color-primary);
  font-size: clamp(9px, 0.9vw, 14px);
  font-weight: 800;
}

.weather-day-icon {
  width: clamp(20px, 2vw, 34px);
  height: clamp(20px, 2vw, 34px);
  display: block;
  object-fit: contain;
}

.weather-day-temp {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: clamp(10px, 1vw, 15px);
  line-height: 1;
}

.weather-day-temp strong {
  color: var(--color-temperature-max);
  font-weight: 800;
}

.weather-day-temp span {
  color: var(--color-temperature-min);
  font-size: 0.84em;
  font-weight: 700;
}

/* ==========================================================
   EVENTOS
========================================================== */

.events-panel {
  padding: clamp(10px, 1vw, 18px);
}

.events-panel h2 {
  margin-bottom: clamp(6px, 0.7vw, 12px);
  color: var(--color-primary);
  font-size: clamp(18px, 1.8vw, 32px);
  font-weight: 800;
  line-height: 1.1;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: clamp(5px, 0.55vw, 10px);
}

.event-card {
  min-width: 0;
  padding: clamp(6px, 0.65vw, 12px);
  display: grid;
  grid-template-columns: clamp(68px, 6vw, 110px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(7px, 0.7vw, 12px);
  background: var(--color-panel-alt);
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
}

.event-date {
  color: var(--color-primary);
  font-size: clamp(11px, 1vw, 17px);
  font-weight: 800;
}

.event-info {
  min-width: 0;
}

.event-info strong {
  display: block;
  color: var(--color-text);
  font-size: clamp(13px, 1.25vw, 22px);
  font-weight: 700;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.event-info span {
  display: block;
  margin-top: 3px;
  color: var(--color-secondary);
  font-size: clamp(10px, 1vw, 17px);
  font-weight: 400;
  line-height: 1.15;
  overflow-wrap: anywhere;
}


/* ==========================================================
   ANIVERSÁRIOS
========================================================== */

.family-panel {
  min-height: 0;
  padding: clamp(10px, 0.9vw, 18px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.family-panel h2 {
  margin-bottom: clamp(8px, 0.8vw, 14px);
  color: var(--color-primary);
  text-align: center;
  font-size: clamp(20px, 1.9vw, 34px);
  font-weight: 800;
  line-height: 1.1;
}

.family-list {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: clamp(7px, 0.65vw, 12px);
}

.family-card {
  min-height: 0;
  padding: clamp(9px, 0.9vw, 16px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border-soft);
  border-radius: 14px;
  overflow: hidden;
}

.family-name {
  color: var(--color-secondary);
  font-size: clamp(22px, 1.9vw, 36px);
  font-weight: 800;
  line-height: 1;
}

.family-date {
  margin-top: clamp(6px, 0.5vw, 9px);
  color: var(--color-primary);
  font-size: clamp(15px, 1.25vw, 23px);
  line-height: 1.1;
}

.family-days {
  margin-top: clamp(7px, 0.55vw, 10px);
  color: var(--color-secondary);
  font-size: clamp(14px, 1.15vw, 21px);
  line-height: 1.1;
}

.family-age {
  margin-top: clamp(5px, 0.45vw, 8px);
  color: #7dd3fc;
  font-size: clamp(13px, 1.05vw, 19px);
  line-height: 1.1;
}

/* ==========================================================
   TELAS HORIZONTAIS COM POUCA ALTURA
========================================================== */

@media (min-width: 769px) and (max-height: 700px) {
  .dashboard {
    padding: 7px;
    gap: 7px;
  }

  .panel {
    border-radius: 12px;
  }

  .main-panel {
    padding: 10px 14px;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .sun-box {
    margin-top: 28px;
  }

  .date-center {
    padding-top: 12px;
  }

  .main-devotional-row {
    grid-template-columns:
      minmax(100px, 1fr)
      minmax(220px, 1.5fr)
      minmax(130px, 1fr);
    gap: 10px;
  }

  .main-devotional-label {
    font-size: 12px;
  }

  .main-rpsp strong {
    font-size: 17px;
  }

  .main-lesson strong {
    font-size: 13px;
  }

  .main-lesson > span:last-child {
    font-size: 11px;
  }

  .bible-promise {
    max-width: 280px;
    margin: 0;
    font-size: 14px;
  }

  .weekday {
    font-size: 21px;
  }

  .clock-time {
    margin-bottom: 8px;
    font-size: 28px;
  }

  .day-number {
    font-size: 100px;
  }

  .month-name {
    margin-top: 12px;
    font-size: 31px;
  }

  .sun-box {
    font-size: 14px;
  }

  .sun-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 4px;
  }

  .sun-box strong {
    margin-top: 4px;
    font-size: 23px;
  }

  .calendar-panel {
    padding: 10px 13px;
  }

  .calendar-panel h2 {
    margin-bottom: 8px;
    font-size: 22px;
  }

  .calendar-grid {
    gap: 3px;
    font-size: 16px;
  }

  .calendar-weekday,
  .calendar-day {
    padding: 3px 0;
  }

  .weather-panel {
    padding: 7px 9px;
    gap: 3px;
  }

  .weather-summary {
    grid-template-columns: 175px 1fr;
    gap: 8px;
  }

  .weather-current {
    gap: 7px;
  }

  .weather-icon {
    width: 42px;
    height: 42px;
  }

  .weather-temp {
    font-size: 32px;
  }

  .weather-desc {
    margin-top: 2px;
    font-size: 13px;
  }

  .weather-details {
    gap: 6px;
    font-size: 11px;
  }

  .weather-detail {
    gap: 3px;
  }

  .weather-detail-icon {
    width: 16px;
    height: 16px;
  }

  .weather-chart-svg {
    min-height: 72px;
  }

  .weather-chart-temperature {
    font-size: 11px;
  }

  .weather-chart-hour {
    font-size: 9px;
  }

  .weather-forecast {
    gap: 2px;
    padding-top: 3px;
  }

  .weather-day {
    gap: 1px;
  }

  .weather-day-name {
    font-size: 9px;
  }

  .weather-day-icon {
    width: 19px;
    height: 19px;
  }

  .weather-day-temp {
    gap: 2px;
    font-size: 10px;
  }

  .weather-day-temp span {
    font-size: 8px;
  }

  .events-panel {
    padding: 7px 9px;
  }

  .events-panel h2 {
    margin-bottom: 5px;
    font-size: 16px;
  }

  .events-list {
    gap: 4px;
  }

  .event-card {
    padding: 4px 6px;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 6px;
  }

  .event-date {
    font-size: 10px;
  }

  .event-info strong {
    font-size: 12px;
  }

  .event-info span {
    font-size: 9px;
  }
  .calendar-event-indicator {
    top: -1px;
    right: -1px;
    min-width: 13px;
    height: 13px;
    border-width: 1px;
    font-size: 7px;
  }

  .family-panel {
    padding: 7px;
  }

  .family-panel h2 {
    margin-bottom: 6px;
    font-size: 18px;
  }

  .family-list {
    gap: 5px;
  }

  .family-card {
    padding: 7px;
    border-radius: 10px;
  }

  .family-name {
    font-size: 18px;
  }

  .family-date {
    margin-top: 4px;
    font-size: 12px;
  }

  .family-days {
    margin-top: 4px;
    font-size: 11px;
  }

  .family-age {
    margin-top: 3px;
    font-size: 10px;
  }

}

/* ==========================================================
   TELAS GRANDES E TVs
========================================================== */

@media (min-width: 1400px) and (min-height: 750px) {
  .dashboard {
    padding: clamp(14px, 1vw, 22px);
    grid-template-columns:
      minmax(0, 2.2fr)
      minmax(380px, 1fr)
      minmax(260px, 0.62fr);
    gap: clamp(12px, 0.9vw, 18px);
  }

  .panel {
    border-radius: 22px;
  }

  .event-card {
    border-radius: 14px;
  }
}

/* ==========================================================
   CELULARES E TELAS VERTICAIS
========================================================== */

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    min-height: 100%;
    height: auto;
  }

  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .dashboard {
    width: 100%;
    min-height: 100vh;
    height: auto;
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .panel {
    width: 100%;
    height: auto;
    border-radius: 16px;
  }

  .main-panel {
    order: 1;
  }

  .weather-panel {
    order: 2;
  }

  .events-panel {
    order: 3;
  }

  .calendar-panel {
    order: 4;
  }

  .family-panel {
    order: 5;
  }

  .main-panel {
    padding: 18px 14px 22px;
    grid-template-rows: auto auto auto;
  }

  .weekday {
    margin-bottom: 16px;
    font-size: clamp(24px, 7vw, 31px);
    letter-spacing: 0.05em;
  }

  .date-area {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "date date"
      "sunrise sunset";
    gap: 22px 10px;
  }

  .date-center {
    grid-area: date;
  }

  .sunrise-box {
    grid-area: sunrise;
  }

  .sunset-box {
    grid-area: sunset;
  }

  .clock-time {
    margin-bottom: 12px;
    font-size: clamp(31px, 9vw, 42px);
  }

  .day-number {
    font-size: clamp(100px, 30vw, 138px);
  }

  .month-name {
    margin-top: 16px;
    font-size: clamp(35px, 11vw, 48px);
  }

  .main-devotional-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 16px;
    margin-top: 20px;
  }

  .main-rpsp,
  .main-lesson {
    text-align: center;
  }

  .main-devotional-label {
    font-size: 15px;
  }

  .main-rpsp strong {
    font-size: 23px;
  }

  .main-lesson strong {
    font-size: 18px;
  }

  .main-lesson > span:last-child {
    font-size: 15px;
  }

  .bible-promise {
    max-width: 92%;
    margin: 0 auto;
    font-size: clamp(17px, 4.8vw, 22px);
  }

  .sun-box {
    font-size: clamp(14px, 4vw, 18px);
  }

  .sun-icon {
    width: 48px;
    height: 48px;
  }

  .sun-box strong {
    font-size: clamp(24px, 7vw, 31px);
  }

  .weather-panel {
    min-height: 440px;
    padding: 16px 12px;
    grid-template-rows: auto 165px auto;
    gap: 14px;
  }

  .weather-summary {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .weather-current {
    justify-content: center;
    gap: 14px;
  }

  .weather-icon {
    width: 68px;
    height: 68px;
  }

  .weather-temp {
    font-size: 48px;
  }

  .weather-desc {
    max-width: 230px;
    margin-top: 5px;
    font-size: 18px;
  }

  .weather-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    font-size: 14px;
  }

  .weather-detail {
    justify-content: center;
  }

  .weather-detail-icon {
    width: 23px;
    height: 23px;
  }

  .weather-hourly-chart {
    min-height: 165px;
  }

  .weather-chart-svg {
    height: 165px;
    min-height: 165px;
  }

  .weather-forecast {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 4px;
    padding-top: 12px;
  }

  .weather-day {
    min-height: 74px;
  }

  .weather-day-name {
    font-size: 11px;
  }

  .weather-day-icon {
    width: 30px;
    height: 30px;
  }

  .weather-day-temp {
    font-size: 13px;
  }

  .events-panel {
    padding: 16px 12px;
  }

  .events-panel h2 {
    margin-bottom: 12px;
    font-size: 24px;
  }

  .events-list {
    gap: 8px;
  }

  .event-card {
    min-height: 68px;
    padding: 10px 12px;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
    border-radius: 12px;
  }

  .event-date {
    font-size: 13px;
  }

  .event-info strong {
    font-size: 17px;
  }

  .event-info span {
    margin-top: 4px;
    font-size: 13px;
  }

  .calendar-panel {
    padding: 18px 12px 24px;
  }

  .calendar-panel h2 {
    margin-bottom: 16px;
    font-size: 29px;
  }

  .calendar-grid {
    gap: 5px 2px;
    font-size: 18px;
  }

  .calendar-weekday,
  .calendar-day {
    padding: 7px 1px;
    border-radius: 9px;
  }

  .calendar-event-indicator {
    top: 0;
    right: 0;
    min-width: 15px;
    height: 15px;
    font-size: 8px;
  }


  .family-panel {
    padding: 16px 12px;
  }

  .family-panel h2 {
    margin-bottom: 12px;
    font-size: 25px;
  }

  .family-list {
    grid-template-rows: none;
    gap: 8px;
  }

  .family-card {
    min-height: 120px;
    padding: 14px;
  }

  .family-name {
    font-size: 25px;
  }

  .family-date {
    font-size: 17px;
  }

  .family-days {
    font-size: 16px;
  }

  .family-age {
    font-size: 15px;
  }

}

/* ==========================================================
   CELULARES MUITO ESTREITOS
========================================================== */

@media (max-width: 420px) {
  .dashboard {
    gap: 8px;
  }

  .event-card {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .calendar-grid {
    gap: 4px 1px;
    font-size: 16px;
  }

  .calendar-weekday,
  .calendar-day {
    padding: 6px 0;
  }
}

.ticker-quote[hidden] {
  display: none !important;
}
