:root {
  color-scheme: light;
  --bg: hsl(40 25% 98%);
  --ink: hsl(153 17% 22%);
  --primary: hsl(153 20% 35%);
  --accent: hsl(135 16% 94%);
  --line: #e1e7e0;
  --muted: #52675c;
  --surface: #fff;
  --gold: #f3e8c4;
  font-family: Lato,sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1,h2,h3,strong { font-family: Manrope,sans-serif; }
h1 { margin: 0; font-size: clamp(1.7rem,4vw,2.35rem); letter-spacing: -.045em; }
h2 { margin: 0; font-size: 1.13rem; }
p { color: var(--muted); line-height: 1.55; }
button,input,select,textarea { font: inherit; }
button { cursor: pointer; border: 1px solid transparent; border-radius: 9px; padding: .67rem .95rem; background: var(--primary); color: white; font-weight: 700; }
button:hover { filter: brightness(.94); }
button:disabled { opacity: .6; cursor: wait; }
button.secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
:focus-visible { outline: 3px solid #987626; outline-offset: 2px; }
a { color: inherit; }
label { display: grid; gap: .38rem; font-size: .9rem; font-weight: 700; }
input,select,textarea { width: 100%; min-width: 0; border: 1px solid #cdd9cf; padding: .65rem .72rem; border-radius: 8px; color: var(--ink); background: white; }
textarea { min-height: 7rem; resize: vertical; }
.login { display: grid; grid-template-columns: 1fr 1fr; min-height: 100dvh; }
.login-brand,.login-content { display: grid; place-items: center; padding: 2rem; }
.login-brand { background: #e8eee6; border-right: 1px solid var(--line); }
.login-brand img { width: min(590px,100%); display: block; border-radius: 20px; box-shadow: 0 12px 36px #304a3520; }
.login-content form { width: min(100%,390px); display: grid; gap: 1.1rem; }
.login-content p { margin: -.65rem 0 .75rem; }
.shell { display: grid; grid-template-columns: 246px minmax(0,1fr); min-height: 100dvh; }
.shell.collapsed { grid-template-columns: 80px minmax(0,1fr); }
aside { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 1rem; background: white; border-right: 1px solid var(--line); }
aside img { width: 100%; height: 90px; object-fit: contain; }
nav { display: grid; align-content: start; gap: .33rem; flex: 1; margin-top: 1.15rem; }
nav a,.nav-button { display: flex; align-items: center; gap: .76rem; padding: .72rem .68rem; text-decoration: none; border-radius: 9px; color: var(--muted); font-weight: 700; }
nav a:hover,nav a[aria-current] { background: var(--accent); color: var(--ink); }
nav a[aria-current] { box-shadow: inset -3px 0 var(--primary); }
nav i { width: 1.3rem; text-align: center; font-style: normal; font-size: 1.2rem; }
.collapsed nav span,.collapsed #collapse span { display: none; }
.collapsed nav a,.collapsed #collapse { justify-content: center; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 69px; padding: .7rem clamp(1rem,3vw,2.5rem); border-bottom: 1px solid var(--line); background: white; }
.top-label { font-weight: 700; }
.account { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: .88rem; }
#menu { display: none; }
main { max-width: 1560px; margin: auto; padding: clamp(1rem,3vw,2.5rem); }
.heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.heading p { margin: .35rem 0 0; }
.panel,.metric { background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 3px 10px #20302406; padding: 1.1rem; }
.filters { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filters label { flex: 1 1 120px; }
.metrics,.charts { display: grid; gap: 1rem; margin-bottom: 1rem; }
.metrics { grid-template-columns: repeat(auto-fit,minmax(135px,1fr)); }
.charts { grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr)); }
.metric span { display: block; color: var(--muted); margin-bottom: .45rem; }
.metric strong { font-size: 1.7rem; }
.bar-row { display: grid; grid-template-columns: minmax(90px,1fr) minmax(75px,2fr) 2rem; gap: .55rem; align-items: center; margin-top: .85rem; }
.bar-track { background: var(--accent); border-radius: 4px; height: .8rem; }
.bar { background: var(--primary); border-radius: inherit; height: 100%; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .91rem; text-align: left; }
th,td { padding: .8rem .65rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); }
tr:last-child td { border: 0; }
.tag { display: inline-block; border-radius: 20px; padding: .24rem .55rem; background: var(--accent); font-weight: 700; font-size: .8rem; }
.tag.agendado { background: var(--gold); }
.tag.cancelado,.tag.faltou,.tag.inativo { background: #f6e8e4; color: #803d31; }
.search { max-width: 360px; margin-bottom: .8rem; }
dialog { width: min(680px,calc(100% - 1.4rem)); max-height: 90dvh; border: 1px solid var(--line); border-radius: 15px; padding: 0; color: var(--ink); }
dialog::backdrop { background: #182e26aa; }
dialog header,dialog footer { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--surface); }
dialog footer { justify-content: flex-end; border: 0; border-top: 1px solid var(--line); }
.edit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; padding: 1.25rem; }
.edit-grid .wide { grid-column: 1 / -1; }
.swal-parent { z-index: 2000 !important; }
@media(max-width: 800px) {
  .shell,.shell.collapsed { display: block; }
  aside { display: none; position: fixed; z-index: 10; top: 69px; width: min(265px,100%); height: calc(100dvh - 69px); box-shadow: 8px 0 32px #14291d20; }
  .menu-open aside { display: flex; }
  #menu { display: block; }
  #collapse,.top-label { display: none; }
  .collapsed nav span { display: inline; }
  .collapsed nav a { justify-content: start; }
}
@media(max-width: 570px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-brand { border-right: 0; }
  .login-brand img { width: min(310px,100%); }
  .edit-grid { grid-template-columns: 1fr; }
  .heading { align-items: start; flex-direction: column; }
}
.password-form { display: grid; gap: 1rem; max-width: 420px; }
.password-form button { justify-self: start; }
.next-meeting { margin-bottom: 1rem; }
.next-meeting p { margin-bottom: 0; }
.password-input { position: relative; display: block; }
.password-input input { padding-right: 3rem; }
.password-toggle {
  position: absolute;
  inset: auto 3px 3px auto;
  display: grid;
  width: 2.5rem;
  height: 2.15rem;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
}
.password-toggle:hover { color: var(--ink); background: var(--accent); }
.password-toggle svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.row-actions { display: flex; align-items: center; gap: .45rem; }
.action-link { display: inline-block; padding: .67rem .95rem; border: 1px solid var(--line); border-radius: 9px; background: white; font-weight: 700; text-decoration: none; }
.action-link:hover { background: var(--accent); }
.back-link { display: inline-block; margin-bottom: .8rem; }
