/* =========================================
   VARIÁVEIS GERAIS
========================================= */
:root {
  --bg: #0b1020;
  --bg-card: #151a2c;
  --bg-card-alt: #1b2338;
  --primary: #1d9d08;
  --primary-soft: rgba(255, 202, 40, 0.2);
  --secondary: #26c6da;
  --secondary-soft: rgba(38, 198, 218, 0.15);
  --text: #f5f5f5;
  --muted: #9ea5c6;
  --border: #2b3553;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
}

/* =========================================
   RESET BÁSICO
========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1e2742 0, #050712 55%, #010108 100%);
  color: var(--text);
  min-height: 100vh;
  padding: 24px;
}

.page {
  max-width: 1300px;
  margin: 0 auto 40px auto;
}

/* =========================================
   TOPO / MENU PRINCIPAL (TOPBAR)
========================================= */

.topbar {
  background: transparent;
  padding: 6px 0 24px;
}

.topbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 28px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(32, 36, 54, 0.95),
    rgba(40, 45, 70, 0.95)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.topbar-greeting {
  color: #ccc;
}

.topbar-logout {
  color: #ff6b6b;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: 0.2s;
}

.topbar-logout:hover {
  color: #ff8585;
  text-decoration: underline;
}



/* Alertas gerais */
.alert-banner {
  max-width: 1300px;
  margin: 6px auto 0;           /* centraliza na mesma largura */
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffc857, #1d9d08, #117201);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.alert-banner + .alert-banner {
  margin-top: 6px;              /* espaço só entre um alerta e outro */
}

.alert-icon {
  font-size: 18px;
}

.alert-text {
  text-align: center;
}
/* =========================================
   BANNER DE ANIVERSÁRIO + CONFETES
========================================= */

.birthday-banner {
  max-width: 1300px;
  margin: 10px auto 0;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #ffb74d, #ff4081, #7e57c2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.birthday-emoji {
  font-size: 18px;
}

.birthday-text {
  font-size: 13px;
}

/* Confetes na tela inteira */
#confetti-container {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 999;
}

/* Partículas de confete */
.confetti {
  position: absolute;
  width: 8px;
  height: 14px;
  background: hsl(var(--hue), 90%, 60%);
  top: -20px;
  border-radius: 2px;
  opacity: 0.95;
  animation-name: confetti-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(var(--x-start), 0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--x-end), 110vh, 0) rotate(360deg);
    opacity: 0;
  }
}

/* =========================================
   HERO / CABEÇALHO DO CALENDÁRIO
========================================= */

header.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 22px;
  margin-bottom: 28px;
  align-items: stretch;
}

.hero-main {
  flex: 2 1 280px;
  background: linear-gradient(135deg, #202744, #101526);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.hero-main::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 202, 40, 0.12), transparent 70%);
  top: -80px;
  right: -40px;
  pointer-events: none;
}

.hero-logo {
  height: 38px;
  margin-bottom: 10px;
}

.badge-year {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(5, 8, 20, 0.9);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #66bb6a;
  box-shadow: 0 0 12px rgba(102, 187, 106, 0.9);
}

.hero-title {
  margin-top: 14px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.hero-highlight {
  color: var(--primary);
  font-weight: 600;
}

.hero-subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
  max-width: 480px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-pill {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 8, 20, 0.75);
  color: var(--muted);
  backdrop-filter: blur(8px);
}

.hero-pill strong {
  color: var(--primary);
  font-weight: 600;
}

/* Lado direito (legendas / campanhas âncora) */
.hero-side {
  flex: 1.2 1 230px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.card-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--muted);
  margin-bottom: 8px;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.legend-color.major {
  background: var(--primary-soft);
}

.legend-color.secondary {
  background: var(--secondary-soft);
}

.legend-color.aniversario {
  background: rgba(156, 39, 176, 0.35);
}

.legend-color.food {
  background: rgba(255, 255, 255, 0.15);
}

.anchor-list {
  list-style: none;
  font-size: 12px;
  color: var(--muted);
  padding-left: 0;
}

.anchor-list li + li {
  margin-top: 3px;
}

.anchor-label {
  font-weight: 600;
  color: var(--text);
}

/* =========================================
   CALENDÁRIO – GRADE DE MESES
========================================= */

.months-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 12px;
}

.month {
  background: var(--bg-card-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 10px 12px 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.month-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.month-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.month-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.month-tag strong {
  color: var(--primary);
}

table.month-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
}

.month-table thead th {
  text-align: center;
  padding: 2px 0 4px;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.month-table tbody td {
  height: 26px;
  text-align: right;
  vertical-align: top;
  padding: 3px 4px;
  border-radius: 6px;
  position: relative;
  cursor: default;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.08s ease;
  overflow: hidden;
}

.month-table tbody td.empty {
  cursor: default;
}

.month-table tbody td:not(.empty):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.day-number {
  font-size: 10px;
  opacity: 0.9;
}

.date-label {
  margin-top: 2px;
  font-size: 9px;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tipos de datas */
.major-date {
  background: var(--primary-soft);
  border: 1px solid rgba(255, 202, 40, 0.65);
  cursor: pointer;
}

.secondary-date {
  background: var(--secondary-soft);
  border: 1px solid rgba(38, 198, 218, 0.5);
  cursor: pointer;
}

.food-date {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

/* Campanhas especiais */
.campaign-aniversario {
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.4), rgba(103, 58, 183, 0.45));
  border: 1px solid rgba(186, 104, 200, 0.9);
}

.campaign-junina {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.45), rgba(255, 87, 34, 0.35));
  border: 1px solid rgba(255, 202, 40, 0.9);
}

.campaign-natal {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.4), rgba(255, 202, 40, 0.3));
  border: 1px solid rgba(129, 199, 132, 0.9);
}

.campaign-blackfriday {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(255, 202, 40, 0.35));
  border: 1px solid rgba(255, 202, 40, 0.9);
}

.campaign-pascoa {
  background: linear-gradient(135deg, rgba(255, 202, 40, 0.35), rgba(255, 112, 67, 0.45));
  border: 1px solid rgba(255, 202, 40, 0.9);
}

.campaign-maes,
.campaign-pais {
  background: linear-gradient(135deg, rgba(255, 138, 128, 0.38), rgba(244, 143, 177, 0.5));
  border: 1px solid rgba(244, 143, 177, 0.95);
}

.month-note {
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
}

/* Dia atual em vermelho (se ano corrente = 2026) */
.today-current {
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.9);
  border-color: rgba(244, 67, 54, 0.95) !important;
  background: rgba(244, 67, 54, 0.22);
}

/* =========================================
   MODAL DE ESTRATÉGIA
========================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 20, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 18px 20px 16px;
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.modal-title {
  font-size: 15px;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 4px;
}

/* =========================================
   FOOTER
========================================= */

.app-footer {
  margin-top: 24px;
  padding: 14px 0 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  opacity: 0.9;
}

.app-footer .page {
  max-width: 1300px;
  margin: 0 auto;
}

.app-footer .footer-name {
  color: var(--primary);
  font-weight: 600;
}

/* =========================================
   LOGIN – PAINEL VIANENSE
========================================= */

.login-body {
  background: radial-gradient(circle at top, #0d101f, #03050a);
  color: #e8ebf7;
  font-family: 'Inter', Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
}

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.login-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  padding: 48px 40px;
  width: 360px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.login-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 0.9rem;
  color: #9ea5c6;
  margin-bottom: 30px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  text-align: left;
}

.login-field label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 6px;
  color: #b7bdd3;
}

.login-field input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border 0.3s;
}

.login-field input:focus {
  border-color: #42ff89;
}

.login-button {
  background: linear-gradient(90deg, #42ff89, #00d4ff);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  padding: 10px 0;
  cursor: pointer;
  font-size: 1rem;
  transition: opacity 0.2s;
}

.login-button:hover {
  opacity: 0.85;
}

.login-error {
  background: rgba(255, 87, 87, 0.1);
  border: 1px solid rgba(255, 87, 87, 0.3);
  color: #ff7676;
  border-radius: 8px;
  padding: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.login-hint {
  margin-top: 20px;
  font-size: 0.8rem;
  color: #7f859c;
  line-height: 1.4;
}

/* =========================================
   RESPONSIVO
========================================= */

@media (max-width: 720px) {
  body {
    padding: 16px;
  }

  .topbar-inner {
    padding: 10px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  header.hero {
    margin-top: 16px;
  }

  .hero-main {
    padding: 18px;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-logo {
    height: 32px;
  }
}
