*{margin:0;padding:0;box-sizing:border-box;}
:root{
  --brand: rgb(28, 70, 116);
  --bg: #f0f7f5;
  --card: #ffffff;
  --line: rgba(28,70,116,0.25);
  --muted: rgba(0,0,0,0.65);
  --shadow: 0 2px 10px rgba(0,0,0,0.07);
  --sunday: rgba(0,0,0,0.05);
}
body{font-family:Arial,sans-serif;background:var(--bg);color:#111;}
.header{ position:fixed;top:0;width:100%;z-index:999;background:#fff; display:flex; align-items:center; justify-content:space-between;
  padding:8px 18px;border-bottom:1px solid rgba(0,0,0,0.06);
  min-height:58px;
}
.header-brand{display:flex;align-items:center;justify-content:flex-start;}
.header-title{
  text-align:center;
  font-size:24px;
  font-weight:900;
  color:var(--brand);
  letter-spacing:-0.3px;
}
.logo{height:34px;width:auto;}
.page{padding-top:62px;}
.section{padding:8px 20px 20px;max-width:1200px;margin:0 auto;}
.section-head,.section-title,.section-subtitle{display:none;}

.filters{
  display:flex;
  flex-wrap:nowrap;
  gap:10px;
  align-items:end;
  margin: 4px 0 6px;
}
.filter{
  flex:1;
  min-width:110px;
  max-width:160px;
  background:var(--card);
  border:1px solid rgba(0,0,0,0.06);
  border-radius:14px;
  padding:10px;
  box-shadow:var(--shadow);
}
.filter.actions{
  flex:0;
  min-width:140px;
  display:flex;
  align-items:stretch;
  justify-content:center;
}

.filter{background:var(--card);border:1px solid rgba(0,0,0,0.06);border-radius:14px;padding:10px;box-shadow:var(--shadow);}
.filter label{display:block;font-size:12px;color:var(--muted);font-weight:700;margin-bottom:6px;}
.filter select{
  width:100%;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,0.10);
  outline:none;
  font-weight:800;
  color: #1a1a1a;
  background:#fff;
}
.filter.actions{display:flex;align-items:stretch;justify-content:center;}
.btn{
  width:100%;
  border:1px solid var(--line);
  background:var(--card);
  color:var(--brand);
  padding:11px 12px;
  border-radius:12px;
  font-weight:900;
  cursor:pointer;
  transition:transform .05s ease, box-shadow .2s ease, background .2s ease;
  box-shadow:0 2px 8px rgba(0,0,0,0.06);
}
.btn:hover{background:linear-gradient(135deg, rgba(28,70,116,0.08), #ffffff);}
.btn:active{transform:translateY(1px);}
.btn[disabled]{opacity:.6;cursor:not-allowed;}

.meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin: 8px 0 12px;
}
.chosen{
  font-size:12px;
  font-weight:800;
  color: var(--brand);
  background: rgba(28,70,116,0.08);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
}
.status{font-size:12px;color:var(--muted);}

.table-wrap{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  /* Faz a rolagem acontecer dentro do container da tabela (para o cabeçalho ficar "congelado") */
  max-height: calc(100vh - 220px);
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  box-shadow:var(--shadow);
}

table.agenda{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
}
.agenda th,.agenda td{
  padding:6px 6px;
  border-bottom:1px solid rgba(0,0,0,0.06);
  border-right:1px solid rgba(0,0,0,0.06);
  text-align:center;
  font-size:13px;
  white-space:nowrap;
}
.agenda thead th{
  position:sticky;
  top:0;
  background:#1f4e79;
  color:#ffffff;
  z-index:2;
  font-weight:900;
  border-right:1px solid rgba(255,255,255,0.70);
  border-bottom:1px solid rgba(255,255,255,0.70);
}


/* Coluna Dia */
.agenda thead th:first-child{
  position:sticky;
  left:0;
  z-index:4;
  text-align:left;
  background:#1f4e79;
  color:#ffffff;
  font-weight:900;
  font-size:12px;
  padding:6px 8px;
  width:1%;
}
.agenda tbody td:first-child{
  position:sticky;
  left:0;
  z-index:3;
  text-align:left;
  background:#e9f1f8;
  color:#1f4e79;
  font-weight:900;
  font-size:11px;
  padding:6px 8px;
  width:1%;
}

.agenda tr:last-child td{border-bottom:0;}
.agenda th:last-child,.agenda td:last-child{border-right:0;}


.dot{width:14px;height:14px;border-radius:50%;display:inline-block}
.dot.green{background: rgba(46,204,113,0.6)}
.dot.red{background: rgba(231,76,60,0.6)}
.cell-muted{color: rgba(0,0,0,0.50); font-weight:800;}

/* Domingo: linha cinza clara e sem tags */
.agenda tr.sunday-row td{ background: var(--sunday); }
.agenda tr.sunday-row td:first-child{ background: var(--sunday); color: rgba(0,0,0,0.55); }

.hint{margin-top:10px;font-size:12px;color:rgba(0,0,0,0.6);}

@media (max-width: 900px){
  .filters{
    flex-wrap:wrap;
    gap:6px;
  }
  .filter{
    flex:1 1 30%;
    max-width:32%;
    min-width:100px;
    padding:8px;
  }
  .filter select{
    padding:8px 8px;
    font-size:13px;
  }
  .filter.actions{
    flex:1 1 100%;
    max-width:100%;
    order:10;
  }
}

#viewDocumentos .documentos-table th{
  height:46px;
  padding:0 12px;
}

#viewDocumentos .documentos-table td{
  height:42px;
  padding:0 12px;
}

@media (max-width: 520px){
  .header{grid-template-columns:auto 1fr auto;padding:8px 12px;}
  .header-title{font-size:20px;}
  .logo{height:28px;}
  .page{padding-top:58px;}
  .section{padding:6px 14px 14px;}
  .filters{grid-template-columns: 1fr;}
  table.agenda{min-width: 760px;}
}


/* Legenda */
.legend{
  display:flex;
  gap:20px;
  align-items:center;
  flex-wrap:wrap;
  margin: 6px 0 10px;
  font-size:12px;
  font-weight:800;
  color: rgba(0,0,0,0.65);
}
.legend-item{
  display:flex;
  align-items:center;
  gap:8px;
}
.legend-sunday{
  width:14px;
  height:14px;
  border-radius:4px;
  background: rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.20);
}

/* Separadores entre turnos */
.sep-right{border-right:2px solid rgba(28,70,116,0.35) !important;}
.sep-group{border-right:2px solid rgba(28,70,116,0.35) !important;}

/* Colunas de horas: largura ao conteúdo */
.agenda th:not(:first-child), .agenda td:not(:first-child){
  padding:5px 5px;
  width:1%;
}


/* Cabeçalho compacto (turnos + horas encostados) */

.agenda thead tr:first-child th{
  height: 34px;
  line-height: 1.1;
  padding-top: 6px;
  padding-bottom: 6px;
}
.agenda thead tr:nth-child(2) th{
  top: 34px; /* encosta na linha de cima */
}




/* Coluna Dia fixa */
.agenda thead th:first-child,
.agenda tbody td:first-child{
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

/* Colunas de horas: mesma largura e adaptável ao tamanho da tela */
.agenda th:not(:first-child),
.agenda td:not(:first-child){
  width:auto;
  padding: 4px 0;
}

.agenda thead th:last-child{ border-right:0; }

/* Bordas verticais brancas entre os turnos no cabeçalho */
.agenda thead tr:first-child th.sep-group{ border-right:2px solid rgba(255,255,255,0.9); }

/* ======= Ajustes: círculos com letras (F/A/H/D) ======= */
.dot{
  width:18px;
  height:18px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:900;
  color:#ffffff;
  line-height:1;
}
.dot.yellow{background: rgba(241,196,15,0.75);}

/* Quando mostrar iniciais (3 letras) */
.dot.initials{
  width:26px;
  height:26px;
  font-size:9px;
  letter-spacing:0.5px;
}


/* ======= Slots clicáveis ======= */
.slot{
  width:100%;
  border:0;
  background:transparent;
  cursor:pointer;
  padding:2px 0;
}
.slot:focus{ outline:2px solid rgba(28,70,116,0.35); outline-offset:2px; border-radius:10px; }
.slot.disabled{ cursor:not-allowed; }
.slot.readonly{ cursor:default; }
.slot.past-available .dot.green{ background:rgba(112,172,132,0.58); }

/* ======= Modal Reserva ======= */
.modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:2000;
}
.modal.is-open{ display:block; }
.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.45);
}
.modal-card{
  position:relative;
  max-width:520px;
  width:calc(100% - 28px);
  margin: 90px auto 20px;
  background:#fff;
  border-radius:16px;
  border:1px solid rgba(0,0,0,0.10);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  overflow:hidden;
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid rgba(0,0,0,0.08);
}
.modal-title{
  font-size:16px;
  color: var(--brand);
  font-weight:900;
}
.modal-close{
  border:0;
  background:transparent;
  font-size:22px;
  font-weight:900;
  cursor:pointer;
  color: rgba(0,0,0,0.55);
  line-height:1;
}
.modal-body{ padding:14px 16px 6px; }
.modal-meta{
  font-size:12px;
  font-weight:800;
  color: rgba(0,0,0,0.70);
  background: rgba(28,70,116,0.08);
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 12px;
  margin-bottom:12px;
}
.modal-label{ display:block; font-size:12px; font-weight:900; color:rgba(0,0,0,0.65); margin:6px 0; }
.modal-input{
  width:100%;
  border-radius:12px;
  border:1px solid rgba(0,0,0,0.15);
  padding:10px 12px;
  font-weight:800;
  outline:none;
}
.modal-input:focus{ border-color: rgba(28,70,116,0.45); box-shadow: 0 0 0 3px rgba(28,70,116,0.12); }
.modal-hint{ margin-top:10px; font-size:12px; color:rgba(0,0,0,0.55); font-weight:700; }

.modal-actions{
  display:flex;
  gap:10px;
  padding: 12px 16px 16px;
  justify-content:flex-end;
}
.btn.btn-primary{
  background: var(--brand);
  color:#fff;
  border-color: rgba(28,70,116,0.35);
}
.btn.btn-primary:hover{ filter: brightness(0.98); }
.btn.btn-ghost{
  background:#fff;
  color: var(--brand);
}

/* ======= Toast ======= */
.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  background:#111;
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  font-size:13px;
  font-weight:800;
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
  opacity:0;
  pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
  z-index:2500;
  max-width: min(720px, calc(100% - 22px));
}
.toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(-2px);
}


/* ======= Círculo com iniciais do nome ======= */
.nome-circle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  border-radius:50%;
  background:#1f4e79;
  color:#fff;
  font-size:10px;
  font-weight:900;
  margin-left:4px;
}

/* Spinner */
.spinner{
  width:16px;
  height:16px;
  border:2px solid rgba(255,255,255,0.4);
  border-top:2px solid #fff;
  border-radius:50%;
  animation:spin .7s linear infinite;
  display:inline-block;
  margin-right:8px;
  vertical-align:middle;
}
#agendaProcessingClock .spinner,
.menu-item .spinner,
.btn .spinner:only-child{
  margin-right:0;
}
@keyframes spin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}

/* ======= Barra de usuário (Login) ======= */
.userbar{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}
.userbar-text{
  font-weight:900;
  color: var(--brand);
  font-size:12px;
}
.userbar-btn{
  width:auto;
  padding:8px 10px;
  border-radius:10px;
}
@media (max-width: 520px){
  .userbar-text{ display:inline; font-size:11px; }
}


body:not(.app-authenticated) .header,
body:not(.app-authenticated) .page{
  display:none;
}
body:not(.app-authenticated){
  overflow:hidden;
}

.login-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:linear-gradient(135deg, #eef5fb 0%, #f7fbfa 100%);
}
.login-screen__panel{
  width:min(920px, 100%);
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  background:#fff;
  border:1px solid rgba(0,0,0,0.08);
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,0.14);
}
.login-screen__brand{
  padding:42px;
  background:linear-gradient(135deg, rgba(28,70,116,0.98) 0%, rgba(28,70,116,0.86) 100%);
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:24px;
}
.login-screen__logo{
  width:min(360px, 100%);
  height:auto;
  display:block;
  filter:brightness(0) invert(1);
}
.login-screen__text h1{
  font-size:34px;
  line-height:1.1;
  margin-bottom:12px;
}
.login-screen__text p{
  font-size:16px;
  line-height:1.5;
  color:rgba(255,255,255,0.9);
}
.login-screen__form{
  padding:42px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:12px;
}
.login-screen__actions{
  display:flex;
  gap:10px;
  margin-top:10px;
}
.login-screen__actions .btn{
  width:100%;
}
.userbar{ display:flex; }
.userbar[hidden]{ display:none; }
.userbar-btn{ display:inline-flex; align-items:center; justify-content:center; }

@media (max-width: 820px){
  .login-screen__panel{ grid-template-columns: 1fr; }
  .login-screen__brand,
  .login-screen__form{ padding:28px; }
  .login-screen__logo{ width:min(280px, 100%); }
}
@media (max-width: 560px){
  .login-screen{ padding:14px; }
  .login-screen__brand,
  .login-screen__form{ padding:22px; }
  .login-screen__text h1{ font-size:28px; }
  .login-screen__actions{ flex-direction:column; }
}


#loginView[hidden],
#appShell[hidden]{display:none !important;}
#appShell{min-height:100vh;}


/* ======= Modal de sucesso premium ======= */
.modal-success .modal-card-success{
  max-width: 560px;
  border-radius: 22px;
  overflow: hidden;
}
.success-hero{
  display:flex;
  align-items:center;
  gap:16px;
  padding:20px 20px 14px;
  background: linear-gradient(135deg, rgba(28,70,116,0.10), rgba(46,204,113,0.10));
  border-bottom:1px solid rgba(0,0,0,0.06);
}
.success-check{
  width:52px;
  height:52px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  font-weight:900;
  color:#fff;
  background: linear-gradient(135deg, #21a366, #36c275);
  box-shadow:0 10px 24px rgba(33,163,102,0.25);
  flex:0 0 auto;
}
.success-title{
  font-size:22px;
  line-height:1.1;
  color:var(--brand);
  font-weight:900;
  margin:0 0 4px;
}
.success-subtitle{
  font-size:13px;
  color:rgba(0,0,0,0.62);
  margin:0;
  font-weight:700;
}
.success-summary{
  background:#f8fbff;
  border:1px solid rgba(28,70,116,0.10);
  border-radius:16px;
  padding:14px;
  display:grid;
  gap:10px;
}
.success-summary-item{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap:10px;
  align-items:start;
}
.success-summary-label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:rgba(0,0,0,0.5);
  font-weight:900;
}
.success-summary-value{
  font-size:14px;
  color:#111;
  font-weight:800;
  line-height:1.35;
}
.modal-actions-stack{
  flex-direction:column;
}
.modal-actions-stack .btn{
  width:100%;
}
.success-email-notice{
  width:100%;
  background:#f8fbff;
  border:1px solid rgba(28,70,116,0.10);
  color:var(--brand);
  border-radius:14px;
  padding:12px 14px;
  font-size:13px;
  font-weight:800;
  line-height:1.4;
  text-align:center;
}

@media (max-width: 560px){
  .success-hero{padding:18px 16px 12px;}
  .success-title{font-size:20px;}
  .success-summary-item{grid-template-columns: 1fr; gap:4px;}
}


.menu{
  display:flex;
  gap:10px;
  margin-left:20px;
}

.menu-item{
  border:0;
  background:transparent;
  font-weight:900;
  color:var(--brand);
  cursor:pointer;
  padding:6px 10px;
  border-radius:10px;
}

.menu-item.active{
  background:rgba(28,70,116,0.1);
}


#reservasProf{
  min-width:260px;
}

@media (max-width: 520px){
  .menu{
    position:absolute;
    right:12px;
    top:58px;
    background:#fff;
    border:1px solid rgba(0,0,0,0.1);
    border-radius:12px;
    flex-direction:column;
    padding:8px;
    display:none;
    box-shadow:0 10px 30px rgba(0,0,0,0.2);
  }
  .menu.open{
    display:flex;
  }
  .menu-toggle{
    display:block;
    font-size:20px;
    cursor:pointer;
    margin-left:auto;
  }
}


/* Reservas responsivo */
#viewReservas table{
  table-layout:auto;
  font-size:12px;
}

#viewReservas th,
#viewReservas td{
  padding:6px 4px;
  white-space:normal;
}


.menu-toggle{display:none;}

.header-brand{order:1;}
.menu{order:2; margin-left:auto; margin-right:10px;}
.userbar{order:3; margin-left:0; gap:4px; justify-content:flex-end;}
.userbar-text{white-space:nowrap;}

#viewReservas .filter{
  max-width:320px;
}

#viewReservas .table-wrap{
  overflow-x:hidden;
}

.reservas-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}
.reservas-table th,
.reservas-table td{
  border-bottom:1px solid rgba(0,0,0,0.06);
  padding:8px 6px;
  text-align:center;
  font-size:12px;
  white-space:normal;
  word-break:break-word;
}
.reservas-table th{
  background:#1f4e79;
  color:#fff;
  font-weight:900;
}

@media (min-width: 521px){
  .menu{display:flex !important; position:static; box-shadow:none; border:0; padding:0; flex-direction:row; background:transparent;}
  .menu-toggle{display:none !important;}
}

@media (max-width: 520px){
  .header{padding:8px 12px;}
  .header-brand{order:1;}
  .userbar{order:2; margin-left:auto; margin-right:6px; gap:2px; max-width:42vw; overflow:hidden;}
  .userbar-text{font-size:11px; text-overflow:ellipsis; overflow:hidden;}
  .menu-toggle{order:3; display:block; font-size:20px; cursor:pointer; margin-left:0;}
  .menu{left:8px; right:auto; top:52px; z-index:1200; align-items:flex-start; min-width:230px;}
  .menu .menu-item{text-align:left; width:100%;}
  .submenu .submenu-item{padding-left:22px; position:relative;}
  .submenu .submenu-item::before{content:"└"; position:absolute; left:8px; opacity:.65;}
  #viewReservas .section{padding:6px 8px 12px;}
  #viewReservas .filter{max-width:none; min-width:0; width:100%; padding:8px;}
  #reservasProf{min-width:0; width:100%; font-size:12px;}
  .reservas-table th,
  .reservas-table td{padding:6px 3px; font-size:11px;}
  .reservas-table th:nth-child(1), .reservas-table td:nth-child(1){width:34%;}
  .reservas-table th:nth-child(2), .reservas-table td:nth-child(2){width:38%;}
  .reservas-table th:nth-child(3), .reservas-table td:nth-child(3){width:28%;}
}


.filters-reservas{
  margin-bottom: 10px;
}
.filters-historico-reservas{margin-bottom:10px;}
.filters-historico-reservas .filter{flex:1 1 180px;max-width:280px;}
.filters-historico-reservas input[type="month"]{width:100%;min-height:42px;border:1px solid rgba(15,23,42,.16);border-radius:10px;padding:8px 10px;background:#fff;color:var(--text);font:inherit;}
#viewHistoricoReservas .table-wrap{overflow-x:auto;}
.historico-reservas-table{min-width:980px;table-layout:auto;}
.historico-reservas-table th,.historico-reservas-table td{text-align:left;white-space:nowrap;}
@media (min-width:901px){
  #viewHistoricoReservas .section-historico-reservas{
    height:100vh;
    display:flex;
    flex-direction:column;
  }
  #historicoReservasLista{
    flex:1;
    min-height:0;
    max-height:none;
  }
}
@media (max-width:520px){.filters-historico-reservas .filter{max-width:none;min-width:0;width:100%;}.historico-reservas-table th,.historico-reservas-table td{font-size:11px;padding:6px;}}
.filter-reservas-profissional{
  max-width: 320px;
}
.filter-reservas-calendario{
  max-width: 220px;
}
.userbar-text{
  font-size: 11px;
  font-weight: 700;
  color: rgba(0,0,0,0.58);
  letter-spacing: 0.1px;
}
@media (max-width: 520px){
  .userbar-text{
    font-size: 11px;
    font-weight: 800;
    color: var(--brand);
  }
}


.filter-reservas-pdf{
  flex:0 0 160px;
  min-width:160px;
  max-width:160px;
}

.section-disponibilidade{max-width:980px;margin:0 auto;}
.disponibilidade-filters{align-items:flex-end;margin-bottom:12px;}
.disponibilidade-filter-group{min-width:250px;margin:0;padding:0;border:0;}
.disponibilidade-filter-group legend{margin-bottom:6px;font-size:12px;font-weight:800;color:var(--brand);}
.disponibilidade-options{display:flex;flex-wrap:wrap;gap:8px;}
.disponibilidade-options label{display:inline-flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid rgba(15,23,42,.12);border-radius:999px;background:#fff;font-size:.88rem;font-weight:700;cursor:pointer;}
.disponibilidade-options input{width:auto;margin:0;}
.disponibilidade-pdf-action{flex:0 0 160px;min-width:160px;max-width:160px;}
.disponibilidade-table{min-width:0 !important;width:100%;}
.disponibilidade-table th,.disponibilidade-table td{padding:4px 2px;text-align:center;font-size:12px;}
.disponibilidade-table th:first-child,.disponibilidade-table td:first-child{width:64px;min-width:64px;max-width:64px;padding:4px;text-align:left;font-weight:800;}
.disponibilidade-table td:not(:first-child){font-variant-numeric:tabular-nums;letter-spacing:.04em;}
.disponibilidade-empty{padding:20px;text-align:center;color:#55708c;font-weight:700;}
.view-profissionais{height:100vh;}
.profissionais-frame{display:block;width:100%;height:100%;border:0;background:#fff;}
@media (max-width:720px){.disponibilidade-filter-group,.disponibilidade-pdf-action{flex:1 1 100%;min-width:100%;max-width:100%;}}

@media (max-width: 520px){
  .filter-reservas-pdf{
    flex:1 1 100%;
    min-width:100%;
    max-width:100%;
  }
}


/* Em atendimento - reaproveita a identidade visual da seção Atendimento do Front TV */
.section-atendimento{max-width:760px;margin:0 auto;}
.atendimento-panel{background:#fff;border:1px solid rgba(0,0,0,0.08);border-radius:18px;padding:18px;box-shadow:0 14px 40px rgba(28,70,116,0.12);}
.atendimento-panel-title{font-size:18px;font-weight:900;color:var(--brand);margin-bottom:14px;}
.atendimento-professional-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.atendimento-professional-list li{border:1px solid rgba(28,70,116,0.10);border-radius:14px;padding:12px 14px;background:#f8fbff;}
.atendimento-prof-name-row{display:flex;align-items:center;gap:8px;min-width:0;}
.atendimento-prof-name{color:var(--brand);font-size:16px;font-weight:900;line-height:1.2;}
.atendimento-prof-meta{display:block;color:#55708c;font-size:13px;font-weight:800;line-height:1.35;margin-top:3px;}
.atendimento-status-badge{width:12px;height:12px;border-radius:999px;display:inline-block;flex:0 0 auto;box-shadow:0 0 0 3px rgba(255,255,255,0.95),0 0 0 5px rgba(28,70,116,0.08);}
.atendimento-status-badge--green{background:#18a058;}
.atendimento-status-badge--red{background:#d93025;}
@media (max-width:520px){.section-atendimento{padding:6px 8px 12px;}.atendimento-panel{padding:14px;border-radius:16px;}.atendimento-panel-title{font-size:16px;}.atendimento-prof-name{font-size:15px;}.atendimento-prof-meta{font-size:12px;}}

/* CheckIn / CheckOut */
.section-checkin{max-width:860px;margin:0 auto;}
.checkin-panel{background:#fff;border:1px solid rgba(0,0,0,0.08);border-radius:18px;padding:18px;box-shadow:0 14px 40px rgba(28,70,116,0.12);}
.checkin-panel-title{font-size:18px;font-weight:900;color:var(--brand);margin-bottom:14px;}
.checkin-list{display:flex;flex-direction:column;gap:10px;}
.checkin-card{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid rgba(28,70,116,0.10);border-radius:14px;padding:12px 14px;background:#f8fbff;}
.checkin-card-main{min-width:0;}
.checkin-name{color:var(--brand);font-size:16px;font-weight:900;line-height:1.2;}
.checkin-meta{display:block;color:#55708c;font-size:13px;font-weight:800;line-height:1.35;margin-top:3px;}
.checkin-status{display:inline-block;margin-top:8px;padding:5px 8px;border-radius:999px;background:rgba(28,70,116,0.08);color:var(--brand);font-size:12px;font-weight:900;}
.checkin-actions{display:flex;gap:8px;flex:0 0 220px;}
.checkin-actions .btn{padding:10px 12px;}
.checkin-empty{border:1px solid rgba(28,70,116,0.10);border-radius:14px;padding:14px;background:#f8fbff;color:#55708c;font-size:13px;font-weight:800;}
@media (max-width:520px){.section-checkin{padding:6px 8px 12px;}.checkin-panel{padding:14px;border-radius:16px;}.checkin-card{align-items:stretch;flex-direction:column;}.checkin-actions{flex:1 1 auto;width:100%;}.checkin-name{font-size:15px;}.checkin-meta{font-size:12px;}}

/* ======= Evolução do modal de cancelamento / alteração ======= */
.cancel-choice-group{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0 8px;
}
.cancel-choice{
  flex:1 1 190px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,0.10);
  border-radius:12px;
  font-weight:800;
  color:var(--brand);
  background:#fff;
}
.cancel-choice input{ width:auto; }

.cancel-choice-group[hidden]{
  display:none !important;
}
.modal-hint-alert{
  color:#8a1f11;
  background:rgba(231,76,60,0.10);
  border:1px solid rgba(231,76,60,0.22);
  border-radius:12px;
  padding:10px 12px;
}
.change-options-box{ margin-top:10px; }

.change-consultorio-filter{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 10px;}
.change-consultorio-filter label{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid rgba(15,23,42,.12);border-radius:999px;font-size:.88rem;cursor:pointer;}
.change-consultorio-filter input{margin:0;}


/* Meus dados */
.section-meus-dados{max-width:960px;margin:0 auto;}
.meus-dados-panel{background:#fff;border-radius:18px;box-shadow:0 10px 30px rgba(0,0,0,.08);padding:20px;}
.meus-dados-title{font-size:1.25rem;font-weight:800;margin-bottom:16px;color:#0f172a;}
.meus-dados-admin-filter{margin-bottom:16px;}
.meus-dados-form{display:block;}
.meus-dados-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.meus-dados-grid label{display:flex;flex-direction:column;gap:6px;font-weight:700;color:#334155;font-size:.92rem;}
.meus-dados-grid input,.meus-dados-grid select,.meus-dados-grid textarea{width:100%;border:1px solid #d7dee8;border-radius:12px;padding:11px 12px;font:inherit;background:#fff;color:#0f172a;}
.meus-dados-grid textarea{min-height:86px;resize:vertical;line-height:1.35;}
.meus-dados-grid input[readonly]{background:#f5f7fa;color:#64748b;}
.meus-dados-actions{display:flex;justify-content:flex-end;margin-top:18px;}
#meusDadosMsg{margin-top:12px;}
@media (max-width:720px){.meus-dados-grid{grid-template-columns:1fr}.meus-dados-panel{padding:16px}}

/* ======= Tabela de Preço (corpo do documento) ======= */
.section-tabela-preco{
  max-width:980px;
}
.tabela-preco-panel{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.tabela-preco-toolbar{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  padding:10px;
  border-bottom:1px solid rgba(0,0,0,0.08);
  background:#fff;
}
.tabela-preco-pdf{
  width:auto;
  min-width:130px;
}
.tabela-preco-content{
  padding:22px 18px 26px;
  overflow:auto;
}
.tabela-preco-section{
  margin-bottom:24px;
}
.tabela-preco-section h2{
  font-size:18px;
  font-style:italic;
  font-weight:900;
  margin-bottom:8px;
  color:#111;
}
.tabela-preco-table-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.tabela-preco-table{
  width:auto;
  min-width:520px;
  border-collapse:collapse;
  background:#fff;
}
.tabela-preco-table th,
.tabela-preco-table td{
  border:1px solid #d7d7d7;
  padding:7px 8px;
  font-size:14px;
  line-height:1.15;
  text-align:right;
  white-space:nowrap;
}
.tabela-preco-table th{
  background:#f2f2f2;
  font-weight:900;
}
.tabela-preco-table td.tabela-preco-label,
.tabela-preco-table th:first-child{
  text-align:left;
}
.tabela-preco-vigencia{
  margin-top:8px;
  font-size:14px;
  font-style:italic;
}

/* Editor da Tabela de Preço */
.flex-preco-editor{
  margin-top:14px;
}
.flex-preco-editor-shell{
  margin:14px 0 18px;
}
.flex-preco-editor-head{
  margin-bottom:12px;
  color:var(--brand);
}
.flex-preco-main-actions,
.flex-preco-new-box,
.flex-preco-editor-actions{
  flex-wrap:wrap;
}
.flex-preco-main-actions{
  justify-content:flex-start;
}
.flex-preco-new-box{
  align-items:flex-start;
  justify-content:flex-start;
}
.flex-preco-new-box[hidden]{
  display:none !important;
}
.flex-preco-new-field{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:12px;
  font-weight:800;
  color:#555;
}
.flex-preco-new-field input{
  width:150px;
  min-height:34px;
}
.flex-preco-main-actions .btn,
.flex-preco-new-box .btn,
.flex-preco-vigencias .btn{
  width:auto;
  min-width:0;
  min-height:34px;
  padding:8px 12px;
  font-size:12px;
  line-height:1.1;
  white-space:nowrap;
}

/* Lista de vigências */
.flex-preco-list-wrap{
  width:100%;
  max-width:100%;
  max-height:260px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  background:#fff;
  border:1px solid rgba(28,70,116,0.18);
  border-radius:14px;
  box-shadow:0 2px 10px rgba(0,0,0,0.05);
}
.flex-table.flex-preco-vigencias{
  width:100%;
  min-width:0;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
}
.flex-preco-vigencias th,
.flex-preco-vigencias td{
  padding:9px 8px;
  font-size:12px;
  line-height:1.2;
  vertical-align:middle;
  border-bottom:1px solid rgba(0,0,0,0.06);
  border-right:1px solid rgba(0,0,0,0.06);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.flex-preco-vigencias th{
  position:sticky;
  top:0;
  z-index:2;
  background:#1f4e79;
  color:#fff;
  font-weight:900;
}
.flex-preco-vigencias th:nth-child(1),
.flex-preco-vigencias td:nth-child(1){
  width:34%;
  text-align:left;
}
.flex-preco-vigencias th:nth-child(2),
.flex-preco-vigencias td:nth-child(2){
  width:33%;
  text-align:center;
}
.flex-preco-vigencias th:nth-child(3),
.flex-preco-vigencias td:nth-child(3){
  width:33%;
  text-align:center;
}
.flex-preco-vigencias th:last-child,
.flex-preco-vigencias td:last-child{
  border-right:0;
}
.flex-preco-vigencias tr:last-child td{
  border-bottom:0;
}
.flex-preco-vigencias .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  max-width:100%;
}
.flex-preco-vigencias input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:0 auto;
  display:block;
}

/* Grades de edição */
.flex-preco-editor .tabela-preco-table input{
  width:112px;
  border:0;
  background:transparent;
  font:inherit;
  text-align:right;
  padding:0;
  outline:0;
}
.flex-preco-editor .tabela-preco-table input:focus{
  background:#eef6ff;
  box-shadow:inset 0 -2px 0 #1f5a8a;
}
.flex-preco-grade-table{
  table-layout:auto;
}
.flex-preco-editor .tabela-preco-table th:first-child,
.flex-preco-editor .tabela-preco-table td:first-child{
  width:176px;
  min-width:176px;
}
.flex-preco-editor .tabela-preco-table th:not(:first-child),
.flex-preco-editor .tabela-preco-table td:not(:first-child){
  width:112px;
  min-width:112px;
}
.flex-preco-grade-turno_mensal,
.flex-preco-grade-turno{
  min-width:760px;
}
.flex-preco-grade-hora{
  min-width:620px;
}
.flex-preco-pacote-table{
  width:320px;
  min-width:320px;
  table-layout:fixed;
}
.flex-preco-pacote-table th:first-child,
.flex-preco-pacote-table td:first-child{
  width:176px;
  min-width:176px;
}
.flex-preco-pacote-table th:nth-child(2),
.flex-preco-pacote-table td:nth-child(2){
  width:144px;
  min-width:144px;
}
.flex-preco-editor-actions{
  flex-wrap:nowrap;
  gap:8px;
}

@media (max-width: 520px){
  #viewFlexPrecos .section-flex{
    width:100%;
    max-width:none;
    padding-left:8px;
    padding-right:8px;
    overflow-x:hidden;
  }
  #viewFlexPrecos .flex-panel,
  #flexPrecosContent{
    width:100%;
    max-width:100%;
    overflow:hidden;
  }
  .tabela-preco-toolbar{
    justify-content:stretch;
  }
  .tabela-preco-pdf{
    width:100%;
  }
  .tabela-preco-content{
    padding:16px 12px 22px;
  }
  .tabela-preco-section h2{
    font-size:16px;
  }
  .tabela-preco-table{
    min-width:560px;
  }
  .flex-preco-main-actions,
  .flex-preco-new-box{
    flex-wrap:nowrap;
    gap:6px;
  }
  .flex-preco-main-actions .btn,
  .flex-preco-new-box .btn,
  .flex-preco-vigencias .btn{
    padding:7px 6px;
    font-size:11px;
  }
  .flex-preco-new-field{
    flex:0 1 170px;
    min-width:0;
  }
  .flex-preco-new-field input{
    width:100%;
    min-width:0;
  }
  .flex-preco-list-wrap{
    max-height:240px;
  }
  .flex-table.flex-preco-vigencias{
    min-width:0;
  }
  .flex-preco-vigencias th,
  .flex-preco-vigencias td{
    padding:7px 5px;
    font-size:11px;
  }
  .flex-preco-vigencias th:nth-child(1),
  .flex-preco-vigencias td:nth-child(1){
    width:34%;
  }
  .flex-preco-vigencias th:nth-child(2),
  .flex-preco-vigencias td:nth-child(2){
    width:33%;
  }
  .flex-preco-vigencias th:nth-child(3),
  .flex-preco-vigencias td:nth-child(3){
    width:33%;
  }
  .flex-preco-editor .tabela-preco-table input{
    width:112px;
  }
  .flex-preco-pacote-table{
    width:320px;
    min-width:320px;
  }
  .flex-preco-editor-actions{
    flex-wrap:nowrap;
  }
}

/* Menu com subitens de Meus dados */
.menu-group{position:relative;display:inline-flex;align-items:stretch;}
.submenu{display:none;position:absolute;top:100%;right:0;min-width:190px;background:#fff;border:1px solid rgba(0,0,0,0.08);border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,0.16);padding:6px;z-index:1000;}
.menu-group:hover .submenu,.menu-group.open .submenu{display:flex;flex-direction:column;gap:4px;}
.submenu .submenu-item{width:100%;text-align:left;justify-content:flex-start;box-shadow:none;}

/* Documentos */
.section-documentos{max-width:1200px;}
.documentos-panel{background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:14px;}
.documentos-title{font-size:18px;font-weight:900;color:var(--brand);margin-bottom:10px;}
.filtros-documentos{margin-bottom:10px;}
.filter-documentos-profissional{max-width:360px;}
.documentos-wrap{max-height:calc(100vh - 230px);}
.documentos-table{width:100%;border-collapse:separate;border-spacing:0;min-width:760px;}
.documentos-table th,.documentos-table td{padding:10px 8px;border-bottom:1px solid rgba(0,0,0,0.06);border-right:1px solid rgba(0,0,0,0.06);text-align:left;font-size:13px;}
.documentos-table th{position:sticky;top:0;background:#1f4e79;color:#fff;font-weight:900;z-index:2;}
.documentos-table th:last-child,.documentos-table td:last-child{border-right:0;text-align:center;}
.documentos-download{display:inline-block;width:auto;padding:8px 12px;text-decoration:none;}

@media (max-width: 900px){
  .menu-group{display:flex;flex-direction:column;width:100%;}
  .submenu{position:static;box-shadow:none;border:0;padding:0 0 0 12px;background:transparent;min-width:0;width:100%;}
  .menu-group.open .submenu{display:flex;}
  .filter-documentos-profissional{max-width:100%;}
}


@media (max-width: 520px){
  #viewDocumentos .section{padding:6px 8px 12px;}
  .documentos-panel{padding:10px;}
  .filter-documentos-profissional{max-width:none; min-width:0; width:100%;}
  #documentosProf{min-width:0; width:100%;}
  .documentos-wrap{overflow-x:auto; max-height:none;}
  .documentos-table{min-width:680px;}
  .documentos-table th,.documentos-table td{font-size:11px; padding:7px 5px;}
}

/* Integra Flex */
.section-flex{max-width:1200px;}
.flex-panel{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:14px;}
.flex-title{font-size:18px;font-weight:900;color:var(--brand);margin-bottom:10px;}
.flex-filters{margin-bottom:12px;}
.flex-prof-filter{max-width:340px;}
.flex-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px;}
.flex-kpi{border:1px solid rgba(28,70,116,0.12);border-radius:8px;background:#f8fbff;padding:12px;}
.flex-kpi-label{display:block;font-size:11px;font-weight:900;color:rgba(0,0,0,0.58);text-transform:uppercase;}
.flex-kpi-value{display:block;margin-top:5px;font-size:22px;font-weight:900;color:var(--brand);}
.flex-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.flex-box{border:1px solid rgba(28,70,116,0.12);border-radius:8px;padding:12px;background:#fff;}
.flex-box-title{font-size:14px;font-weight:900;color:var(--brand);margin-bottom:10px;}
.flex-bars{display:flex;align-items:end;gap:8px;height:160px;border-bottom:1px solid rgba(0,0,0,0.12);padding-top:8px;}
.flex-bar{flex:1;min-width:22px;background:rgba(28,70,116,0.22);border-radius:6px 6px 0 0;position:relative;}
.flex-bar strong{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);font-size:10px;color:var(--brand);}
.flex-bar span{position:absolute;top:100%;left:50%;transform:translateX(-50%);font-size:10px;color:rgba(0,0,0,0.62);margin-top:4px;}
.flex-table{width:100%;border-collapse:separate;border-spacing:0;min-width:760px;}
.flex-table th,.flex-table td{padding:9px 8px;border-bottom:1px solid rgba(0,0,0,0.06);border-right:1px solid rgba(0,0,0,0.06);font-size:12px;text-align:left;}
.flex-table th{position:sticky;top:0;background:#1f4e79;color:#fff;font-weight:900;z-index:2;}
.flex-table th:last-child,.flex-table td:last-child{border-right:0;}
.flex-nao-utilizada-wrap{
  width:100%;
  max-height:calc(100vh - 260px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid rgba(28,70,116,0.18);
  border-radius:12px;
  background:#fff;
}
.flex-nao-utilizada-table{
  margin:0;
}
.gestao-transacoes-wrap{
  width:100%;
  max-height:calc(100vh - 320px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid rgba(28,70,116,0.18);
  border-radius:12px;
  background:#fff;
}
.gestao-transacoes-table{
  margin:0;
}
.gestao-transacoes-table th:first-child,
.gestao-transacoes-table td:first-child{
  position:sticky;
  left:0;
  min-width:210px;
  background:#fff;
  z-index:3;
}
.gestao-transacoes-table th:first-child{
  background:#1f4e79;
  z-index:4;
}
.gestao-transacao-parent td{
  font-weight:900;
  background:#f4f8fc;
}
.gestao-transacao-parent td:first-child{
  background:#f4f8fc;
}
.gestao-transacao-child{
  padding-left:28px !important;
}
.gestao-transacao-actions{
  justify-content:flex-start;
  gap:8px;
  margin-top:0;
  margin-bottom:10px;
}
.gestao-transacao-form[hidden]{
  display:none !important;
}
.gestao-perfis-wrap{
  width:100%;
  max-height:calc(100vh - 300px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid rgba(28,70,116,0.18);
  border-radius:12px;
  background:#fff;
}
.gestao-perfis-table{
  margin:0;
}
.gestao-perfis-table th:first-child,
.gestao-perfis-table td:first-child{
  position:sticky;
  left:0;
  min-width:90px;
  background:#fff;
  z-index:3;
}
.gestao-perfis-table th:first-child{
  background:#1f4e79;
  z-index:4;
}
.gestao-perfis-table select,
.gestao-perfil-form select{
  width:100%;
  min-height:34px;
  border:1px solid #d7dee8;
  border-radius:10px;
  padding:7px 9px;
  font:inherit;
  background:#fff;
}
.gestao-perfil-actions{
  justify-content:flex-start;
  margin-top:0;
  margin-bottom:10px;
}
.gestao-perfil-form[hidden]{
  display:none !important;
}
.flex-badge{display:inline-flex;align-items:center;border-radius:999px;padding:5px 8px;font-size:11px;font-weight:900;}
.flex-badge--available{background:rgba(46,204,113,0.14);color:#137a3f;}
.flex-badge--reserved{background:rgba(241,196,15,0.18);color:#806000;}
.flex-badge--used{background:rgba(28,70,116,0.14);color:var(--brand);}
.flex-config-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.flex-config-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:900;color:#334155;}
.flex-config-grid input,.flex-config-grid select,.flex-config-grid textarea{border:1px solid #d7dee8;border-radius:12px;padding:10px 12px;font:inherit;background:#fff;}
.flex-config-grid textarea{resize:vertical;line-height:1.4;}
.flex-config-wide{grid-column:1 / -1;}
.gestao-notificacao-perfis{grid-column:1 / -1;border:1px solid #d7dee8;border-radius:12px;padding:10px 12px;display:flex;gap:14px;flex-wrap:wrap;}
.gestao-notificacao-perfis legend{font-size:12px;font-weight:900;color:#334155;padding:0 4px;}
.gestao-notificacao-perfis label{flex-direction:row;align-items:center;}
.gestao-notificacao-check{flex-direction:row !important;align-items:center;gap:8px;width:max-content;max-width:100%;}
.gestao-notificacao-check input{width:auto;margin:0;flex:0 0 auto;}
.gestao-notificacao-check span{line-height:1;white-space:nowrap;}
@media (max-width: 760px){
  .flex-kpis,.flex-grid,.flex-config-grid{grid-template-columns:1fr;}
  .flex-prof-filter{max-width:none;}
}

/* ======= Menu lateral ======= */
:root{
  --sidebar-width: 292px;
  --sidebar-active: #2866a6;
  --sidebar-text: #30445f;
}

.icon-sprite{
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
}

#appShell{
  padding-left:var(--sidebar-width);
}

.header{
  position:fixed;
  inset:0 auto 0 0;
  width:var(--sidebar-width);
  min-height:100vh;
  padding:0;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  background:#fff;
  border-right:1px solid rgba(15,23,42,0.10);
  border-bottom:0;
  box-shadow:8px 0 24px rgba(15,23,42,0.06);
}

.header-brand{
  order:0;
  min-height:132px;
  padding:28px 26px 18px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  border-bottom:1px solid rgba(15,23,42,0.08);
}

.logo{
  width:220px;
  max-width:100%;
  height:auto;
}

.menu-toggle{
  display:none;
  width:38px;
  height:38px;
  border:0;
  border-radius:8px;
  background:rgba(28,70,116,0.08);
  color:var(--brand);
  font-size:22px;
  font-weight:900;
  cursor:pointer;
}

.menu{
  order:1;
  display:flex !important;
  flex:1;
  min-height:0;
  width:100%;
  margin:0;
  padding:14px 0 0;
  flex-direction:column;
  background:#fff;
  border:0;
  box-shadow:none;
  gap:0;
}

.menu-main{
  flex:1;
  overflow-y:auto;
  padding:0 12px 14px;
}

.menu-main::-webkit-scrollbar{
  width:10px;
}

.menu-main::-webkit-scrollbar-thumb{
  background:rgba(15,23,42,0.28);
  border-radius:999px;
  border:3px solid #fff;
}

.menu-item,
.menu-footer-logout{
  width:100%;
  min-height:44px;
  display:flex;
  align-items:center;
  gap:14px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--sidebar-text);
  cursor:pointer;
  font-size:13px;
  font-weight:800;
  line-height:1.2;
  text-align:left;
  padding:10px 14px;
  box-shadow:none;
}

.menu-item:hover,
.menu-footer-logout:hover{
  background:rgba(28,70,116,0.08);
}

.menu-item.active{
  background:var(--sidebar-active);
  color:#fff;
}

.menu-icon{
  width:21px;
  height:21px;
  flex:0 0 21px;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
}

.menu-group{
  position:relative;
  display:flex;
  flex-direction:column;
  width:100%;
}

.menu-parent::after{
  content:"";
  width:8px;
  height:8px;
  margin-left:auto;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  transition:transform .18s ease;
}

.menu-group.open .menu-parent::after{
  transform:rotate(-135deg);
}

.menu-group.open:not(.admin-open) .flex-admin-parent::after{
  transform:rotate(45deg);
}

.menu-group.admin-open .flex-admin-parent::after{
  transform:rotate(-135deg);
}

.submenu{
  position:static;
  display:none;
  min-width:0;
  width:100%;
  padding:4px 0 4px 18px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  gap:4px;
}

.menu-group:hover .submenu,
.menu-group.open .submenu{
  display:flex;
  flex-direction:column;
}

.submenu .submenu-item{
  width:100%;
  min-height:40px;
  justify-content:flex-start;
  padding-left:12px;
  font-size:12px;
}

.submenu .flex-admin-subitem{
  padding-left:34px;
  display:none;
}

.menu-group.admin-open .flex-admin-subitem{
  display:flex;
}

.submenu .submenu-item::before{
  content:none;
}

.menu-footer{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:10px;
  margin:0;
  padding:18px 20px 22px;
  border-top:1px solid rgba(15,23,42,0.10);
}

.menu-footer[hidden]{
  display:none;
}

.userbar-text{
  display:block;
  min-height:40px;
  padding:2px 0 0 54px;
  position:relative;
  color:#051b36;
  font-size:16px;
  font-weight:900;
  line-height:1.2;
  white-space:normal;
}

.userbar-text::before{
  content:attr(data-initial);
  position:absolute;
  left:0;
  top:0;
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:var(--sidebar-active);
  color:#fff;
  font-size:18px;
  font-weight:900;
}

.menu-footer-logout{
  color:#051b36;
  font-size:13px;
  padding-left:0;
}

.avisos-badge{
  position:absolute;
  right:7px;
  top:7px;
  width:10px;
  height:10px;
  border-radius:999px;
  background:#d92d20;
  border:2px solid #fff;
  padding:0;
}

.avisos-lista{
  display:flex;
  flex-direction:column;
  gap:10px;
}

#avisosModal .modal-card{
  max-height:calc(100vh - 80px);
  display:flex;
  flex-direction:column;
}

#avisosModal .modal-body{
  overflow-y:auto;
  font-size:13px;
}

#avisosModal .modal-title{
  font-size:13px;
}

.aviso-item{
  border:1px solid rgba(28,70,116,0.18);
  border-radius:8px;
  padding:12px;
  background:#fff;
  font-size:13px;
}

.aviso-item.unread{
  border-color:rgba(28,70,116,0.5);
  background:#f4f8fc;
}

.aviso-head{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:6px;
  font-weight:900;
  color:var(--primary);
  font-size:13px;
}

.aviso-meta{
  font-size:13px;
  font-weight:800;
  color:rgba(0,0,0,0.55);
}

.aviso-msg{
  white-space:pre-wrap;
  color:var(--text);
  line-height:1.45;
  font-size:13px;
}

.header-avisos{
  position:relative;
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--brand);
  cursor:pointer;
  margin-left:auto;
  margin-right:-8px;
}

.header-avisos:hover{
  background:rgba(28,70,116,0.08);
}

.login-password-toggle,.avisos-filter{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:800;
  color:rgba(0,0,0,0.65);
  margin-top:8px;
}

.login-password-toggle{
  width:max-content;
  max-width:100%;
  flex-direction:row;
  cursor:pointer;
}

.login-password-toggle input{
  width:auto;
  margin:0;
  flex:0 0 auto;
}

.login-password-toggle span{
  display:inline-block;
  line-height:1;
  white-space:nowrap;
}

.avisos-filter{
  margin:0 0 12px;
}

.menu-item:has(.spinner:only-child),
.btn:has(.spinner:only-child){
  justify-content:center;
}

.page{
  padding-top:0;
}

/* ======= Padrao visual baseado na tela Agenda ======= */
body,
input,
select,
textarea,
button{
  font-size:13px;
}

.btn,
.documentos-download{
  min-height:40px;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--card);
  color:var(--brand);
  font-size:13px;
  font-weight:900;
  box-shadow:0 2px 8px rgba(0,0,0,0.06);
}

.btn.btn-primary{
  background:var(--brand);
  color:#fff;
  border-color:rgba(28,70,116,0.35);
}

.btn.btn-ghost,
.documentos-download{
  background:#fff;
  color:var(--brand);
}

.btn-compact,
.flex-preco-main-actions .btn,
.flex-preco-new-box .btn,
.flex-preco-vigencias .btn{
  min-height:34px;
  padding:8px 12px;
  font-size:12px;
  line-height:1.1;
}

.flex-title,
.documentos-title,
.meus-dados-title,
.atendimento-panel-title,
.checkin-panel-title,
.modal-title,
.success-title,
.tabela-preco-section h2{
  font-size:18px;
  font-weight:900;
  color:var(--brand);
  margin-bottom:10px;
}

.filter label,
.modal-label,
.modal-meta,
.modal-hint,
.flex-config-grid label,
.meus-dados-grid label,
.flex-preco-new-field,
.tabela-preco-vigencia,
.success-subtitle,
.success-email-notice{
  font-size:12px;
}

.atendimento-prof-name,
.checkin-name,
.atendimento-prof-meta,
.checkin-meta,
.success-summary-value,
.aviso-head,
.aviso-meta,
.aviso-msg{
  font-size:13px;
}

.filter select,
.modal-input,
.meus-dados-grid input,
.meus-dados-grid select,
.meus-dados-grid textarea,
.flex-config-grid input,
.flex-config-grid select,
.flex-config-grid textarea,
.gestao-perfis-table select,
.gestao-perfil-form select{
  border:1px solid rgba(0,0,0,0.10);
  border-radius:12px;
  padding:10px 12px;
  background:#fff;
  color:#1a1a1a;
  font-weight:800;
}

.documentos-table,
.flex-table,
.reservas-table,
.tabela-preco-table{
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
}

.documentos-table th,
.documentos-table td,
.flex-table th,
.flex-table td,
.reservas-table th,
.reservas-table td,
.tabela-preco-table th,
.tabela-preco-table td{
  padding:6px 6px;
  border-bottom:1px solid rgba(0,0,0,0.06);
  border-right:1px solid rgba(0,0,0,0.06);
  font-size:13px;
  line-height:1.2;
}

.documentos-table th,
.flex-table th,
.reservas-table th,
.tabela-preco-table th{
  position:sticky;
  top:0;
  background:#1f4e79;
  color:#fff;
  font-weight:900;
  z-index:2;
  border-right:1px solid rgba(255,255,255,0.70);
  border-bottom:1px solid rgba(255,255,255,0.70);
}

.documentos-table th:last-child,
.documentos-table td:last-child,
.flex-table th:last-child,
.flex-table td:last-child,
.reservas-table th:last-child,
.reservas-table td:last-child,
.tabela-preco-table th:last-child,
.tabela-preco-table td:last-child{
  border-right:0;
}

.meus-dados-panel,
.atendimento-panel,
.checkin-panel,
.tabela-preco-panel,
.documentos-panel,
.flex-panel{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:14px;
}

@media (max-width: 900px){
  #appShell{
    padding-left:0;
  }

  .header{
    inset:0 0 auto 0;
    width:100%;
    min-height:58px;
    height:58px;
    transform:none;
    z-index:1200;
    border-right:0;
    border-bottom:1px solid rgba(15,23,42,0.10);
    box-shadow:0 8px 24px rgba(15,23,42,0.08);
  }

  .header-brand{
    min-height:58px;
    padding:10px 12px;
    align-items:center;
    border-bottom:0;
  }

  .logo{
    width:168px;
  }

  .menu-toggle{
    display:flex !important;
    align-items:center;
    justify-content:center;
    position:static;
    margin-left:auto;
    box-shadow:none;
  }

  .header-avisos{
    order:4;
    margin-left:8px;
    margin-right:0;
  }

  .menu{
    position:fixed;
    left:0;
    top:58px;
    bottom:0;
    width:min(292px, 86vw);
    min-width:0;
    height:calc(100vh - 58px);
    padding-top:10px;
    transform:translateX(-100%);
    transition:transform .22s ease;
    border-right:1px solid rgba(15,23,42,0.10);
    box-shadow:8px 0 24px rgba(15,23,42,0.12);
  }

  .menu.open{
    transform:translateX(0);
  }

  .menu-footer{
    max-width:none;
    width:100%;
    overflow:visible;
    margin:0;
    gap:10px;
  }

  .menu-footer .userbar-text{
    color:#051b36;
    font-size:16px;
    font-weight:900;
    overflow:visible;
    text-overflow:clip;
    white-space:normal;
  }

  .page{
    padding-top:58px;
  }

  .section{
    padding-left:14px;
    padding-right:14px;
  }
}
