/* Scroll suave */
html { scroll-behavior: smooth; }

/* Remove outline padrão no Safari */
input, select, textarea, button { -webkit-appearance: none; }

/* Line clamp para descrições */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* Animação de fade para o toast */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.2s ease-out; }

/* Tabela responsiva */
@media (max-width: 640px) {
  .font-mono { font-size: 0.75rem; }
}

/* ── Calendar layout ──────────────────────────────────────────────────────── */
.cal-main      { height: calc(100vh - 56px); overflow: hidden; }
@media (min-width: 1024px) { .cal-main { height: 100vh; } }
.cal-container { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.cal-grid      { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.cal-header-row  { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid #f3f4f6; flex-shrink: 0; }
.cal-header-cell { padding: 8px 4px; text-align: center; font-size: 11px; font-weight: 700; color: #9ca3af; letter-spacing: .05em; }

.cal-month-body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(6, 1fr); flex: 1; }

.cal-day         { min-width: 0; overflow: hidden; border-right: 1px solid #f3f4f6; border-bottom: 1px solid #f3f4f6; padding: 5px; cursor: pointer; }
.cal-day-other   { opacity: .3; }
.cal-day-today   { background: var(--navy-50); }
.cal-day-num     { margin-bottom: 3px; }
.cal-day-num-today   { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy-600); color: #fff; font-size: 11px; font-weight: 700; }
.cal-day-num-regular { font-size: 12px; font-weight: 600; color: #374151; }
.cal-day-num-other   { font-size: 12px; font-weight: 600; color: #c4c4c4; }
.cal-more        { font-size: 10px; color: #9ca3af; padding: 1px 2px; }

.cal-ev      { padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; cursor: pointer; margin-bottom: 2px; line-height: 1.6; }
.cal-ev-time { opacity: .6; margin-right: 3px; font-size: 10px; }

.cal-week-grid       { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); flex: 1; }
.cal-week-col        { min-width: 0; overflow: hidden; border-right: 1px solid #f3f4f6; padding: 12px 8px; }
.cal-week-col-today  { background: var(--navy-50); }
.cal-week-col-header { text-align: center; margin-bottom: 10px; }
.cal-week-day-label  { font-size: 11px; color: #9ca3af; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.cal-week-day-today  { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy-600); color: #fff; font-size: 13px; font-weight: 700; }
.cal-week-day-num    { font-size: 16px; font-weight: 700; color: #374151; }
.cal-week-empty      { text-align: center; color: #e5e7eb; margin-top: 20px; font-size: 18px; }

.cal-day-view      { padding: 20px; max-width: 640px; }
.cal-day-empty     { padding: 64px 24px; text-align: center; color: #9ca3af; }
.cal-day-empty-icon { width: 40px; height: 40px; margin: 0 auto 12px; opacity: .35; }
.cal-day-empty-text { font-size: 14px; }
.cal-day-ev        { background: white; border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; }
.cal-day-ev-header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cal-day-ev-title  { font-weight: 600; color: #111827; font-size: 14px; }
.cal-day-ev-desc   { font-size: 13px; color: #6b7280; margin-top: 4px; }
.cal-day-ev-local  { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.cal-day-badge     { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.cal-day-time      { font-size: 12px; color: #6b7280; }

/* ── Holiday indicators ────────────────────────────────────────────────────── */
.cal-holiday-label  { font-size: 9px; font-weight: 600; color: #dc2626; line-height: 1.2; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-week-holiday   { font-size: 10px; font-weight: 600; color: #dc2626; text-align: center; margin-top: 3px; line-height: 1.3; }
.cal-holiday-banner { display: flex; align-items: center; gap: 8px; margin: 14px 20px 0; padding: 9px 14px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; font-size: 13px; font-weight: 600; color: #dc2626; }

/* ── Legend dots ──────────────────────────────────────────────────────────── */
.legend-dot          { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.legend-dot-pending  { background: #f59e0b; }
.legend-dot-overdue  { background: #ef4444; }
.legend-dot-done     { background: #22c55e; }
.legend-dot-hearing  { background: #8b5cf6; }
.legend-dot-birthday { background: #ec4899; }
.legend-dot-outlook  { background: #0078d4; }
.legend-dot-google   { background: #34a853; }

/* ── Description tooltip ──────────────────────────────────────────────────── */
.desc-tooltip-inner { position: relative; margin-top: 8px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.13)); }
.desc-tooltip-arrow { position: absolute; top: -5px; left: 20px; width: 10px; height: 10px; background: #fafaf9; border-top: 1px solid #e7e5e4; border-left: 1px solid #e7e5e4; transform: rotate(45deg); }

/* ── WhatsApp modals ──────────────────────────────────────────────────────── */
.wa-modal-inner { max-height: 88vh; }
.wa-messages    { background-color: #e5ddd5; min-height: 180px; }
.wa-msg-sent    { background: #dcf8c6; }
.wa-msg-empty   { text-align: center; color: #888; font-size: 14px; padding: 2rem 0; }
