/* ============================================================
   Agenda de Tarefas — tema "escritório clássico": marinho profundo +
   dourado sobre creme, tipografia serifada nos títulos. CSS puro, sem
   passo de build (mesmo princípio do projeto original).
   ============================================================ */

:root {
  /* ---- Paleta nova ---- */
  --night: #0F2038;        /* marinho profundo — sidebar, branding, texto de destaque */
  --night-2: #1B3357;      /* marinho um tom mais claro — hover em superfícies escuras */
  --night-3: #2A4570;      /* marinho ainda mais claro — bordas sutis em superfícies escuras */
  --gold: #B9954C;         /* dourado — accent principal (botão primário, indicador ativo) */
  --gold-deep: #93762E;    /* dourado escuro — hover do botão primário */
  --gold-light: #E4C77A;   /* dourado claro — texto/ícone dourado sobre fundo marinho */
  --gold-soft: #F4EAD3;    /* dourado bem claro — fundos de destaque suave */
  --cream: #F8F6F1;        /* fundo geral das páginas */
  --cream-2: #F1ECE0;      /* fundo levemente mais escuro (cabeçalho de tabela, etc.) */
  --paper: #FFFFFF;        /* fundo dos cards */
  --ink: #171F2E;          /* texto principal */
  --slate: #47536B;        /* texto secundário mais escuro (rótulos) */
  --muted: #667089;        /* texto secundário */
  --muted-2: #97A1B4;      /* texto terciário / placeholder */
  --border: #E3DECF;       /* bordas sutis */
  --border-strong: #D6CFB9;/* bordas de input */

  /* ---- Compatibilidade: nomes antigos usados em estilos inline pontuais ---- */
  --parchment-100: var(--cream-2);
  --parchment-200: var(--border);
  --rose-800: var(--night);
  --stone-500: var(--muted);
  --stone-600: var(--slate);
  --stone-900: var(--ink);

  /* ---- Cores de status (mantidas, discretas) ---- */
  --emerald-50: #ecfdf5;
  --emerald-600: #059669;
  --amber-50: #fffbeb;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --red-600: #dc2626;

  --font-serif: 'Fraunces', ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: .625rem;
  --radius-sm: .4rem;
  --shadow-sm: 0 1px 2px rgba(15,32,56,.07);
  --shadow-md: 0 10px 28px -8px rgba(15,32,56,.18), 0 2px 6px rgba(15,32,56,.06);
  --shadow-lg: 0 24px 56px rgba(15,32,56,.24);
  --ease: cubic-bezier(.22,1,.36,1);
}

* { box-sizing: border-box; }

html { scrollbar-gutter: stable; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-serif); margin: 0; }

/* ============================== Animações ============================== */

@keyframes entrada-suave {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes deslizar-cima {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-entrar {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes modal-entrar {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes backdrop-entrar {
  from { opacity: 0; }
  to { opacity: 1; }
}

.content-inner { animation: entrada-suave .45s var(--ease) both; }
.auth-box { animation: deslizar-cima .5s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ============================== Ícones ============================== */

.icon { width: 1.15rem; height: 1.15rem; flex-shrink: 0; display: inline-block; vertical-align: -.2em; }
.icon-sm { width: .95rem; height: .95rem; }
.icon-lg { width: 1.6rem; height: 1.6rem; }
.icon-xl { width: 1.85rem; height: 1.85rem; }

/* ============================== Layout com sidebar ============================== */

.app-shell { display: flex; min-height: 100vh; flex-direction: column; }
@media (min-width: 768px) {
  .app-shell { flex-direction: row; }
}

.topbar-mobile {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--night-2); background: var(--night);
  color: var(--cream); padding: .6rem .75rem;
}
@media (min-width: 768px) { .topbar-mobile { display: none; } }

.topbar-mobile .brand { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.topbar-mobile .brand-icon {
  display: flex; height: 1.9rem; width: 1.9rem; flex-shrink: 0; align-items: center;
  justify-content: center; border-radius: .375rem; background: var(--night-2); color: var(--gold-light);
}
.topbar-mobile .brand-name {
  font-family: var(--font-serif); font-weight: 600; font-size: .9rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--cream);
}
.icon-btn {
  display: flex; height: 2.75rem; width: 2.75rem; align-items: center; justify-content: center;
  border-radius: .5rem; border: none; background: transparent; color: inherit; cursor: pointer;
  transition: background .15s var(--ease);
}
.topbar-mobile .icon-btn { color: var(--cream); }
.topbar-mobile .icon-btn:hover { background: rgba(255,255,255,.08); }
.sidebar .icon-btn:hover { background: #f5f3ee; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; height: 100%; width: 18rem;
  flex-shrink: 0; flex-direction: column; border-right: 1px solid var(--night-2);
  background: var(--night); color: var(--cream); transform: translateX(-100%);
  transition: transform .25s var(--ease);
}
.sidebar.open { transform: translateX(0); }
@media (min-width: 768px) {
  .sidebar { position: static; width: 16.5rem; transform: none; }
}

.sidebar-backdrop {
  position: fixed; inset: 0; z-index: 40; background: rgba(9,16,28,.5); display: none;
  animation: backdrop-entrar .2s var(--ease) both;
}
.sidebar-backdrop.open { display: block; }
@media (min-width: 768px) { .sidebar-backdrop { display: none !important; } }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  border-bottom: 1px solid var(--night-2); padding: 1.15rem 1.1rem;
}
.sidebar-header .brand { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.sidebar-header .brand > div { min-width: 0; }
.sidebar-header .brand-icon {
  display: flex; height: 2.35rem; width: 2.35rem; flex-shrink: 0; align-items: center;
  justify-content: center; border-radius: .55rem; background: var(--night-2); color: var(--gold-light);
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.sidebar-header .office-name {
  font-family: var(--font-serif); font-weight: 600; font-size: .95rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0;
  color: var(--cream);
}
.sidebar-header .subtitle { font-size: .74rem; color: rgba(248,246,241,.55); margin: .1rem 0 0; }
.sidebar-header .icon-btn:hover { background: rgba(255,255,255,.08); }
.btn-fechar-menu { display: flex; }
@media (min-width: 768px) { .btn-fechar-menu { display: none; } }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .9rem .75rem; display: flex; flex-direction: column; gap: .2rem; }
.nav-link {
  display: flex; align-items: center; gap: .8rem; border-radius: .5rem; padding: .65rem .8rem;
  font-size: .875rem; font-weight: 500; color: rgba(248,246,241,.68);
  border-left: 3px solid transparent; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.nav-link .icon { color: rgba(248,246,241,.5); transition: color .15s var(--ease); }
.nav-link:hover { background: rgba(255,255,255,.06); color: var(--cream); }
.nav-link:hover .icon { color: var(--gold-light); }
.nav-link.active { background: rgba(185,149,76,.14); color: var(--gold-light); border-left-color: var(--gold); }
.nav-link.active .icon { color: var(--gold-light); }

.nav-link-static { cursor: default; }
.nav-link-static:hover { background: transparent; color: rgba(248,246,241,.68); }
.nav-link-static:hover .icon { color: rgba(248,246,241,.5); }

.nav-sublist { display: flex; flex-direction: column; gap: .05rem; margin: .1rem 0 .3rem 2.15rem; }
.nav-sublink {
  padding: .38rem .6rem; border-radius: .4rem; font-size: .8rem; font-weight: 500;
  color: rgba(248,246,241,.5); text-decoration: none; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; border-left: 2px solid transparent;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.nav-sublink:hover { background: rgba(255,255,255,.06); color: var(--cream); }
.nav-sublink.active { background: rgba(185,149,76,.14); color: var(--gold-light); border-left-color: var(--gold); }

.sidebar-footer { border-top: 1px solid var(--night-2); padding: .85rem .75rem; }
.sidebar-footer .profile-link {
  display: flex; align-items: center; gap: .7rem; border-radius: .5rem; padding: .55rem; margin-bottom: .25rem;
  transition: background .15s var(--ease);
}
.sidebar-footer .profile-link:hover { background: rgba(255,255,255,.06); }
.avatar-circle {
  display: flex; height: 2.3rem; width: 2.3rem; flex-shrink: 0; align-items: center; justify-content: center;
  border-radius: 999px; background: rgba(185,149,76,.18); color: var(--gold-light); font-weight: 600; font-size: .875rem;
}
.sidebar-footer .profile-name { font-size: .875rem; font-weight: 500; color: var(--cream); margin: 0; }
.sidebar-footer .profile-role { font-size: .74rem; color: rgba(248,246,241,.55); margin: 0; text-transform: capitalize; }
.logout-btn {
  display: flex; width: 100%; align-items: center; gap: .7rem; border: none; background: transparent;
  border-radius: .5rem; padding: .55rem; font-size: .875rem; color: rgba(248,246,241,.6); cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.logout-btn:hover { background: rgba(255,255,255,.06); color: var(--cream); }

.main-content { flex: 1; min-width: 0; overflow-x: hidden; }
.content-inner { max-width: 1920px; margin: 0 auto; padding: 1rem 1rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) { .content-inner { padding: 1.25rem 1.5rem 2rem; } }
@media (min-width: 1280px) { .content-inner { padding: 1.5rem 2.5rem 2.25rem; } }

.page-title { font-family: var(--font-serif); font-size: 1.65rem; font-weight: 600; color: var(--night); }
.page-subtitle { font-size: .875rem; color: var(--muted); margin: .3rem 0 0; }

/* ============================== Cards ============================== */

.card {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card-header { padding: 1.35rem 1.35rem 0; }
.card-header.row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
}
.card-title { font-size: 1.05rem; font-weight: 600; color: var(--night); font-family: var(--font-serif); }
.card-description { font-size: .8125rem; color: var(--muted); margin: .3rem 0 0; }
.card-content { padding: 1.35rem; }
.card-content.no-top-pad { padding-top: 0; }
.card-footer { padding: 0 1.35rem 1.35rem; }
.card.clickable { cursor: pointer; }
.card.clickable:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; }
.theme-option {
  display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .9rem .6rem;
  border: 1px solid var(--border-strong); border-radius: .65rem; cursor: pointer;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.theme-option:hover { border-color: var(--gold); }
.theme-option.selected { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.theme-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.theme-swatches { display: flex; gap: .3rem; }
.theme-swatch { width: 1.6rem; height: 1.6rem; border-radius: 999px; border: 1px solid rgba(0,0,0,.1); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.theme-nome { font-size: .8125rem; font-weight: 500; color: var(--slate); text-align: center; }
.theme-option.selected .theme-nome { color: var(--ink); font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-card { display: flex; align-items: center; gap: 1.1rem; padding: 1.35rem; }
.stat-icon { display: flex; padding: .8rem; border-radius: .75rem; }
.stat-icon.rose { background: var(--gold-soft); color: var(--gold-deep); }
.stat-icon.emerald { background: var(--emerald-50); color: var(--emerald-600); }
.stat-icon.amber { background: var(--amber-50); color: var(--amber-700); }
.stat-value { font-family: var(--font-serif); font-size: 1.65rem; font-weight: 600; color: var(--night); margin: 0; line-height: 1; }
.stat-label { font-size: .85rem; color: var(--muted); margin: .3rem 0 0; }

.list-divided { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list-divided li { padding: .8rem 0; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; transition: background .15s var(--ease); }
.list-divided li:last-child { border-bottom: none; }
.list-item-title { font-size: .875rem; font-weight: 500; color: var(--ink); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-meta { font-size: .75rem; color: var(--muted); margin: .15rem 0 0; }
.empty-msg { padding: 2rem 0; text-align: center; font-size: .875rem; color: var(--muted); }

/* ============================== Formulários ============================== */

.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
label, .label { font-size: .8125rem; font-weight: 500; color: var(--slate); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="date"], input[type="datetime-local"], input[type="search"],
select, textarea {
  width: 100%; border: 1px solid var(--border-strong); border-radius: .5rem; padding: .55rem .8rem;
  font-size: .875rem; font-family: inherit; background: var(--paper); color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(185,149,76,.22);
}
textarea { resize: vertical; }
.hint { font-size: .75rem; color: var(--muted); margin: 0; }
.password-field { position: relative; }
.password-field input { padding-right: 2.5rem; }
.password-toggle {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; height: 1.75rem; width: 1.75rem;
  border: none; background: none; color: var(--muted); cursor: pointer; padding: 0; border-radius: .35rem;
}
.password-toggle:hover { color: var(--slate); background: var(--gold-soft); }
.password-toggle .eye-hide { display: none; }
.password-toggle.ativo .eye-show { display: none; }
.password-toggle.ativo .eye-hide { display: block; }
.error-msg {
  background: #FBEAEA; border: 1px solid #F2C6C6; color: #9A2E2E;
  border-radius: .5rem; padding: .65rem .9rem; font-size: .8125rem; margin-bottom: 1rem;
}
.success-msg {
  background: var(--emerald-50); border: 1px solid #a7f3d0; color: var(--emerald-600);
  border-radius: .5rem; padding: .65rem .9rem; font-size: .8125rem; margin-bottom: 1rem;
}

/* ============================== Botões ============================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border-radius: .5rem; padding: .6rem 1.1rem; font-size: .8125rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.1;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--gold); color: var(--night); box-shadow: 0 1px 2px rgba(15,32,56,.12); }
.btn-primary:hover:not(:disabled) { background: var(--gold-deep); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { background: var(--paper); border-color: var(--border-strong); color: var(--slate); }
.btn-outline:hover:not(:disabled) { background: var(--cream); border-color: var(--night-3); }
.btn-destructive { background: var(--red-600); color: #fff; }
.btn-destructive:hover:not(:disabled) { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--cream-2); }
.btn-sm { padding: .42rem .8rem; font-size: .75rem; }
.btn-block { width: 100%; }

/* ============================== Badges ============================== */

.badge {
  display: inline-flex; align-items: center; border-radius: 999px; padding: .22rem .65rem;
  font-size: .7rem; font-weight: 500; background: var(--cream-2); color: var(--slate);
}
.badge-secondary { background: var(--cream-2); color: var(--slate); }
.badge-success { background: var(--emerald-50); color: var(--emerald-600); }
.badge-warning { background: var(--amber-50); color: var(--amber-700); }
.badge-info { background: #eff6ff; color: #1d4ed8; }
.badge-gold { background: var(--gold-soft); color: var(--gold-deep); }
.badge-navy { background: var(--night); color: var(--gold-light); }
.badge-outline-rose { background: var(--gold-soft); color: var(--gold-deep); border: 1px solid #E4D4A8; font-family: monospace; font-size: 1rem; letter-spacing: .15em; padding: .5rem 1rem; }

/* ============================== Tela de login/cadastro ============================== */

.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--night);
  background-image: radial-gradient(ellipse 900px 500px at 15% 0%, rgba(185,149,76,.14), transparent 60%),
                     radial-gradient(ellipse 800px 600px at 100% 100%, rgba(185,149,76,.08), transparent 55%);
  padding: 2.5rem 1rem;
}
.auth-box { width: 100%; max-width: 26rem; display: flex; flex-direction: column; align-items: center; gap: 1.75rem; }
.auth-brand { display: flex; align-items: center; gap: .7rem; }
.auth-brand .brand-icon {
  display: flex; height: 2.6rem; width: 2.6rem; align-items: center; justify-content: center;
  border-radius: .7rem; background: rgba(185,149,76,.16); color: var(--gold-light);
  border: 1px solid rgba(185,149,76,.3);
}
.auth-brand .brand-name { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; color: var(--cream); }
.auth-card-wrap { position: relative; width: 100%; }
.card-header { position: relative; }

/* ============================== Tabela ============================== */

table.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data-table th {
  text-align: left; padding: .65rem .8rem; font-weight: 600; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); background: var(--cream-2); border-bottom: 1px solid var(--border);
}
table.data-table td { padding: .7rem .8rem; border-bottom: 1px solid var(--border); }

/* ============================== Modal ============================== */

.modal-backdrop {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(9,16,28,.55); display: none;
  z-index: 100; overflow-y: auto; padding: 1rem; box-sizing: border-box;
}
.modal-backdrop.open { display: block; }
.modal-box {
  background: var(--paper); border-radius: .9rem; width: 100%; max-width: 32rem; max-height: 85vh;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  overflow-y: auto; box-shadow: var(--shadow-lg); border-top: 3px solid var(--gold);
  animation: modal-entrar-central .22s var(--ease) both;
}
/* No desktop a barra lateral fixa (16.5rem) tira espaço da área de
   conteúdo — sem isso, o modal fica centralizado na janela toda e
   sobra mais espaço à esquerda (atrás da barra) que à direita.
   Desloca o centro em metade da largura da barra. */
@media (min-width: 768px) {
  .modal-box { left: calc(50% - 9.25rem); }
}
@keyframes modal-entrar-central {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.97); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.modal-header { padding: 1.35rem 1.35rem 0; }
.modal-title { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; color: var(--night); }
.modal-description { font-size: .8125rem; color: var(--muted); margin: .3rem 0 0; }
.modal-content { padding: 1.35rem; }
.modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; padding: 0 1.35rem 1.35rem; }
.modal-footer .mr-auto { margin-right: auto; }

/* ============================== Toasts (flash messages via JS) ============================== */

#toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 200; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  background: var(--paper); border: 1px solid var(--border); border-left: 4px solid var(--night);
  border-radius: .5rem; padding: .8rem 1.1rem; box-shadow: var(--shadow-lg); font-size: .8125rem;
  max-width: 22rem; animation: toast-entrar .28s var(--ease) both;
}
.toast.success { border-left-color: var(--emerald-600); }
.toast.error { border-left-color: var(--red-600); }

/* ============================== Utilitários ============================== */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.mt-2 { margin-top: .5rem; }
.mb-2 { margin-bottom: .5rem; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--muted); }
.grid-cards { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .grid-cards { grid-template-columns: repeat(4, 1fr); } }

/* ============================== Calendário (FullCalendar) ============================== */

.calendar-wrap {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem;
  box-shadow: var(--shadow-sm);
}
.fc { font-family: var(--font-sans); }
.fc .fc-toolbar { flex-wrap: wrap; row-gap: .6rem; }
.fc .fc-toolbar-title { font-family: var(--font-serif); font-size: 1.15rem !important; color: var(--night); }
.fc .fc-footerToolbar { margin-top: .75rem !important; padding-top: .75rem; border-top: 1px solid var(--border); }
@media (max-width: 640px) {
  .fc .fc-toolbar-title { font-size: .95rem !important; }
  .fc .fc-button { padding: .35rem .55rem !important; font-size: .75rem !important; }
  .fc .fc-toolbar-chunk { display: flex; align-items: center; }
}
.fc .fc-button {
  background: var(--paper) !important; border: 1px solid var(--border-strong) !important; color: var(--slate) !important;
  box-shadow: none !important; text-transform: capitalize; transition: background .15s var(--ease), color .15s var(--ease);
}
.fc .fc-button:hover { background: var(--cream) !important; }
.fc .fc-button-active, .fc .fc-button:active { background: var(--gold-soft) !important; color: var(--gold-deep) !important; border-color: #E4D4A8 !important; }
.fc .fc-col-header-cell { background: transparent; }
.fc .fc-col-header-cell-cushion {
  font-family: var(--font-serif); text-transform: uppercase; font-size: .75rem; color: var(--muted); font-weight: 600;
}
.fc .fc-day-today { background: var(--gold-soft) !important; }
.fc-timegrid-slot-label-cushion { font-family: var(--font-serif); font-size: .75rem; color: var(--muted-2); }
.fc-event { border-radius: 8px !important; border: none !important; box-shadow: 0 1px 2px rgba(15,32,56,.2); }
/* Slots mais altos = compromissos curtos (30min) ganham espaço vertical
   pra caber título com mais de uma palavra sem cortar o texto. */
.fc { --fc-timegrid-slot-height: 2.75em; }
.fc-timegrid-event .fc-event-main { padding: 2px 4px; }
.fc-timegrid-event .fc-event-title, .fc-timegrid-event .fc-event-time {
  white-space: normal; line-height: 1.25; font-size: .75rem;
}
