/* CESOL Agenda - Modern UI (v9.1) - Paleta Amarela CESOL */
:root{
  --y-900:#A98307;   /* dourado escuro */
  --y-800:#DAA202;
  --y-700:#EFB807;
  --y-600:#FDC616;
  --y-500:#FFD03A;

  --brand: var(--y-800);
  --brand-2: var(--y-900);

  --ink:#0f172a;            /* slate-900 (alto contraste) */
  --muted:#475569;          /* slate-600 */
  --bg1:#fffdf5;            /* creme */
  --bg2:#fff7d6;            /* amarelo bem claro */
  --card:#ffffff;
  --ring: rgba(169,131,7,.22);
  --radius:18px;
}

html,body{height:100%}
body{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(253,198,22,.28), transparent 55%),
    radial-gradient(900px 500px at 80% 0%, rgba(255,208,58,.22), transparent 55%),
    linear-gradient(180deg, var(--bg2), var(--bg1) 35%, #fff 100%);
}

.container{max-width:1160px}

.navbar{
  backdrop-filter:saturate(180%) blur(10px);
  background: rgba(15, 23, 42, .86) !important; /* dark for contrast */
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.navbar-brand{
  font-weight:900;
  letter-spacing:-.02em;
}
.navbar .badge{border-radius:999px}
.navbar .btn{border-radius:999px}

.btn{border-radius:999px;font-weight:700}
.btn-primary{
  color:#1f2937;
  background: linear-gradient(135deg, var(--y-500), var(--y-700));
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 10px 24px rgba(239,184,7,.22);
}
.btn-primary:hover{filter:brightness(1.02)}
.btn-success{
  border:none;
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 10px 24px rgba(22,163,74,.18);
}
.btn-light{font-weight:800}
.btn-outline-light{border-color:rgba(255,255,255,.35)}
.btn-outline-light:hover{background:rgba(255,255,255,.12)}

.card{
  border:none;
  border-radius: var(--radius) !important;
  box-shadow: 0 18px 50px rgba(2, 6, 23, .08);
}
.card .card-body{padding: 1.25rem}
.card-title{font-weight:900; letter-spacing:-.02em}

.form-control, .form-select{
  border-radius: 14px;
  border-color: rgba(15,23,42,.12);
  padding: .65rem .85rem;
}
.form-control:focus, .form-select:focus{
  border-color: rgba(169,131,7,.65);
  box-shadow: 0 0 0 .25rem var(--ring);
}
.form-text{color:var(--muted)}

.badge{border-radius:999px}
.table{--bs-table-bg:transparent}
.table thead th{color:var(--muted); font-weight:800; border-bottom:1px solid rgba(15,23,42,.10)}
.table tbody td{border-bottom:1px solid rgba(15,23,42,.08)}
.alert{border-radius:16px; border:none}

.hero{padding: 18px 0 6px;}
.hero h1{font-weight: 950; letter-spacing:-.03em; line-height:1.1;}
.hero p{color:var(--muted)}

.kpi{
  border-radius:16px;
  background: rgba(255,255,255,.78);
  border:1px solid rgba(15,23,42,.08);
  padding:14px 16px;
}
.kpi .label{color:var(--muted); font-size:.9rem; font-weight:800}
.kpi .value{font-size:1.1rem; font-weight:900; letter-spacing:-.02em}

.status-pill{font-size:.82rem;padding:.18rem .55rem;border-radius:999px;font-weight:800}
.pill-free{background:#dcfce7;color:#14532d}
.pill-booked{background:#fee2e2;color:#7f1d1d}
.pill-blocked{background:#e5e7eb;color:#334155}

.fc{
  background: rgba(255,255,255,.78);
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid rgba(15,23,42,.08);
}
.fc .fc-toolbar-title{font-weight:950; letter-spacing:-.02em}
.fc .fc-button{
  border-radius: 999px !important;
  border: 1px solid rgba(15,23,42,.14) !important;
  background: rgba(255,255,255,.78) !important;
  color: var(--ink) !important;
}
.fc .fc-button-primary:not(:disabled).fc-button-active{
  background: linear-gradient(135deg, var(--y-500), var(--y-700)) !important;
  color:#1f2937 !important;
  border: 1px solid rgba(15,23,42,.10) !important;
}

footer{
  color: var(--muted);
  font-size:.92rem;
  padding: 26px 0 30px;
}

/* Logo responsiva do cabeçalho (v9.3) */
.header-logo{
  max-height:64px;
  height:64px;
}
@media (max-width:992px){
  .header-logo{max-height:54px;height:54px;max-width:620px;}
}
@media (max-width:576px){
  .header-logo{max-height:44px;height:44px;max-width:320px;}
}

/* Ajuste fino do navbar para comportar logo maior */
.navbar .btn{padding:.45rem .75rem}


/* FullCalendar premium (v10) */
.fc .fc-toolbar-title{font-weight:950; letter-spacing:-.02em}
.fc .fc-button{border-radius:999px!important; padding:.45rem .85rem!important; font-weight:800!important}
.fc .fc-day-today{background: rgba(255, 208, 58, .14) !important;}
.fc .fc-event{border:0!important; border-radius:12px!important; padding:2px 6px!important; box-shadow:0 10px 20px rgba(2,6,23,.10)}
.fc .fc-event-title{font-weight:850}
.fc .fc-scrollgrid, .fc .fc-scrollgrid-section>td, .fc .fc-scrollgrid-section>th{border-color:rgba(15,23,42,.08)!important}
.fc .fc-col-header-cell{background:rgba(255,255,255,.55)}
.fc .fc-timegrid-slot-label, .fc .fc-timegrid-axis{color:var(--muted); font-weight:700}

/* Tooltip premium */
.tooltip-inner{
  border-radius:12px;
  padding:.5rem .65rem;
  font-weight:700;
}

/* ===== FullCalendar layout fix (v10.1) ===== */
.fc .fc-header-toolbar{
  gap: .6rem;
  flex-wrap: wrap;
}
.fc .fc-toolbar-chunk{
  display:flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items:center;
}
.fc .fc-toolbar-title{
  margin: 0 .25rem;
}

/* Deixa botões alinhados e sem "quebrar" feio */
.fc .fc-button-group{
  display:inline-flex !important;
  flex-wrap: wrap;
  gap: .45rem;
}
.fc .fc-button-group > .fc-button{
  margin: 0 !important;
}

/* Mobile: empilha chunks com boa leitura */
@media (max-width: 768px){
  .fc .fc-header-toolbar{
    flex-direction: column;
    align-items: stretch;
  }
  .fc .fc-toolbar-chunk{
    justify-content: center;
  }
}

/* ===== Contraste dos eventos ===== */
/* Agendado */
.fc .pill-booked{
  background: #e07d0c !important; /* red-600 */
  color: #ffffff !important;
}
.fc .pill-booked .fc-event-title,
.fc .pill-booked .fc-event-time{
  color:#ffffff !important;
}

/* Bloqueado */
.fc .pill-blocked{
  background: #334155 !important; /* slate-700 */
  color: #ffffff !important;
}
.fc .pill-blocked .fc-event-title,
.fc .pill-blocked .fc-event-time{
  color:#ffffff !important;
}

/* Remove transparência que pode deixar "lavado" */
.fc .fc-event{
  opacity: 1 !important;
}

/* Tooltip: melhora contraste */
.tooltip-inner{
  background: rgba(15,23,42,.95);
  color: #fff;
}
