:root {
  --navy: #16395F;
  --navy-2: #0E2A47;
  --navy-3: #1E4A7A;
  --or: #F5921E;
  --or-hi: #FFA23A;
  --or-deep: #C97300;
  --sand: #F4EEE2;
  --card: #FFFFFF;
  --line: #E2D8C6;
  --line-soft: #EFE8D8;
  --ink: #1C2E44;
  --mut: #54677E;
  --green: #1F6B4A;
  --greenbg: #DCEFE4;
  --greenln: #9ED0B4;
  --amber: #6B4106;
  --amberbg: #FEF0D5;
  --amberln: #EBBB6E;
  --red: #C6402C;
  --disp: 'Baloo 2', 'Nunito Sans', system-ui, sans-serif;
  --body: 'Nunito Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0
}

body {
  font-family: var(--body);
  background: var(--sand);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent
}

button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation
}

input,
select {
  font: inherit;
  color: var(--ink)
}

.btn {
  background: var(--or);
  color: var(--navy-2);
  border: 0;
  border-radius: 11px;
  padding: 11px 18px;
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: 0 2px 6px rgba(201, 115, 0, .25)
}

.btn:hover {
  background: var(--or-hi)
}

.btn.ghost {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--line);
  box-shadow: none
}

.btn.ghost:hover {
  background: #F8F4EA
}

.btn.danger {
  background: #fff;
  color: var(--red);
  border: 1.5px solid #EBC3BA;
  box-shadow: none
}

.btn.danger:hover {
  background: #FDF3F1
}

.btn.sm {
  padding: 7px 13px;
  font-size: 13px;
  border-radius: 9px
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(245, 146, 30, .5);
  outline-offset: 1px
}

/* ---------- Login ---------- */
#login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(90rem 40rem at 15% 115%, rgba(245, 146, 30, .30), transparent 55%),
    linear-gradient(180deg, #0B2138 0%, #16395F 62%, #1E4A7A 100%)
}

.lcard {
  background: #fff;
  border-radius: 22px;
  padding: 42px 34px 30px;
  width: min(400px, 94vw);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45)
}

.lcard img {
  width: 252px;
  max-width: 100%;
  display: block;
  margin: 0 auto 6px
}

.lsub {
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--or-deep);
  margin: 0 0 28px
}

.f {
  margin-bottom: 13px
}

.f label {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mut);
  margin-bottom: 6px
}

.f input,
.f select {
  width: 100%;
  border: 1.5px solid #D8CDB8;
  border-radius: 11px;
  padding: 11px 12px;
  background-color: #fff
}

.f input:focus,
.f select:focus {
  border-color: var(--or)
}

#login .btn {
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  font-size: 15px
}

.lnote {
  font-size: 12.5px;
  color: var(--mut);
  text-align: center;
  margin-top: 18px;
  line-height: 1.5
}

/* ---------- Barra superior ---------- */
header.top {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--navy-2);
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .18)
}

header.top .logo {
  height: 24px;
  filter: brightness(0) invert(1);
  flex: none
}

.hamb {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .1);
  border: 0;
  border-radius: 12px
}

.hamb:hover {
  background: rgba(255, 255, 255, .2)
}

.sect {
  margin-left: auto;
  font-family: var(--disp);
  font-weight: 800;
  font-size: 15.5px;
  color: #C9D6E8;
  letter-spacing: .01em;
  white-space: nowrap
}

/* ---------- Menu lateral ---------- */
#scrim {
  position: fixed;
  inset: 0;
  background: rgba(7, 18, 32, .58);
  z-index: 66;
  opacity: 0;
  pointer-events: none
}

#scrim.open {
  opacity: 1;
  pointer-events: auto
}

#drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(302px, 85vw);
  background: linear-gradient(180deg, #0B2138 0%, #16395F 100%);
  color: #fff;
  z-index: 70;
  transform: translateX(-105%);
  display: flex;
  flex-direction: column;
  box-shadow: 16px 0 48px rgba(0, 0, 0, .4)
}

#drawer.open {
  transform: translateX(0)
}

.dwhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 16px 14px
}

.dwhead img {
  height: 26px;
  filter: brightness(0) invert(1)
}

.dwclose {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 16px;
  font-weight: 800
}

.dwclose:hover {
  background: rgba(255, 255, 255, .2)
}

.dwuser {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 14px 14px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 14px
}

.dwavatar {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 99px;
  background: var(--or);
  color: var(--navy-2);
  font-family: var(--disp);
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center
}

.dwuser b {
  display: block;
  font-size: 14px;
  line-height: 1.2
}

.dwuser span {
  font-size: 12px;
  color: #C9D6E8
}

#dnav {
  flex: 1;
  overflow-y: auto;
  padding: 2px 10px
}

#dnav button {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  background: none;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 12px;
  padding: 13px 13px;
  color: #C9D6E8;
  font-weight: 700;
  font-size: 15px;
  text-align: left;
  margin-bottom: 2px
}

#dnav button svg {
  flex: none
}

#dnav button:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff
}

#dnav button.on {
  background: rgba(245, 146, 30, .17);
  border-left-color: var(--or);
  color: #fff
}

.dwfoot {
  padding: 12px 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, .12)
}

.dwfoot button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: rgba(255, 255, 255, .1);
  border: 0;
  border-radius: 12px;
  padding: 13px;
  color: #fff;
  font-weight: 800
}

.dwfoot button:hover {
  background: rgba(255, 255, 255, .2)
}

.dwver {
  margin: 10px 0 0;
  text-align: center;
  font-size: 11px;
  color: #8FA6C2
}

@media (prefers-reduced-motion:no-preference) {
  #drawer {
    transition: transform .28s cubic-bezier(.2, .72, .3, 1)
  }

  #scrim {
    transition: opacity .24s ease
  }
}

main {
  padding: 18px 16px 40px;
  max-width: 1180px;
  margin: 0 auto
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(22, 57, 95, .06)
}

h1.sec {
  font-family: var(--disp);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--navy);
  margin: 2px 0 4px
}

h2.sub {
  font-family: var(--disp);
  margin: 0 0 6px;
  font-size: 16.5px;
  color: var(--navy);
  font-weight: 700
}

p.secsub {
  margin: 0 0 14px;
  color: var(--mut);
  font-size: 13.5px
}

.secrow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px
}

.secrow .sp {
  flex: 1
}

/* Opção de marcar no cabeçalho da seção ("Mostrar cancelados"). */
.opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mut);
  cursor: pointer;
  user-select: none;
  white-space: nowrap
}

.opt input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--navy);
  cursor: pointer
}

.hint {
  font-size: 12.5px;
  color: var(--mut);
  margin-top: 6px;
  line-height: 1.5
}

/* tarifa cheia riscada ao lado do valor já com o desconto de mensalista */
s.cheio {
  color: var(--mut);
  font-weight: 600;
  margin-right: 2px
}

/* Configurações: desconto do mensalista, embaixo da tabela de faixas */
.cfgdesc {
  margin-top: 12px;
  align-items: end
}

.cfgdesc .f {
  margin-bottom: 0
}

.cfgdesc .hint {
  margin: 0 0 11px
}

/* ---------- Agenda ---------- */
.daybar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(22, 57, 95, .06)
}

.dnav {
  display: flex;
  align-items: center;
  gap: 8px
}

.navb {
  flex: none;
  width: 42px;
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 19px;
  color: var(--navy);
  font-weight: 800
}

.navb:hover {
  background: #F8F4EA
}

.dcenter {
  position: relative;
  flex: 1;
  min-width: 0
}

.dbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 46px;
  background: #FAF7EF;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  font-family: var(--disp);
  font-weight: 800;
  font-size: 16.5px;
  color: var(--navy)
}

.dbtn svg {
  flex: none
}

.dbtn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.dpickov {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0
}

.dlabel {
  font-family: var(--disp);
  font-weight: 800;
  color: var(--navy);
  font-size: 18px;
  letter-spacing: -.01em
}

.wstrip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 10px
}

.wday {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 7px 2px
}

.wday:hover {
  background: #F8F4EA
}

.wday .wd1 {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--mut)
}

.wday .wd2 {
  font-family: var(--disp);
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15
}

.wday.today:not(.sel) {
  border-color: var(--or)
}

.wday.sel {
  background: var(--navy);
  border-color: var(--navy)
}

.wday.sel .wd1 {
  color: #F7B565
}

.wday.sel .wd2 {
  color: #fff
}

.legend {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap
}

.lchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FAF7EF;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink)
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  display: inline-block
}

input[type=date] {
  border: 1.5px solid #D8CDB8;
  border-radius: 11px;
  padding: 10px;
  background: #fff;
  min-height: 46px;
  width: 100%;
  -webkit-appearance: none;
  appearance: none
}

.gridwrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  max-height: 74vh;
  box-shadow: 0 4px 16px rgba(22, 57, 95, .06)
}

#grid {
  position: relative;
  display: grid;
  grid-template-columns: 64px repeat(4, minmax(168px, 1fr));
  min-width: 760px
}

.gh {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--navy);
  border-bottom: 3px solid var(--or);
  padding: 10px 9px;
  font-family: var(--disp);
  font-weight: 800;
  color: #fff;
  font-size: 14.5px;
  line-height: 1.35
}

.gh.corner {
  left: 0;
  z-index: 7;
  font-size: 11px;
  color: #BFD0E4;
  letter-spacing: .08em;
  text-transform: uppercase
}

.gh .b-cob {
  background: rgba(255, 255, 255, .18);
  color: #fff
}

.gh .b-desc {
  background: var(--or);
  color: var(--navy-2)
}

.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 2.5px 8px;
  margin-top: 4px;
  font-family: var(--body)
}

.b-cob {
  background: #E4EBF4;
  color: var(--navy)
}

.b-desc {
  background: #FDE4BE;
  color: #8A5205
}

.tcol {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #FAF7EF;
  border-right: 1px solid var(--line)
}

.tcell {
  height: 32px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--mut);
  padding: 3px 7px 0;
  border-top: 1px solid var(--line-soft);
  position: relative;
  font-weight: 600
}

.tcell.hh {
  border-top-color: #D8CDB6;
  color: var(--navy);
  font-weight: 800;
  font-size: 12.5px
}

/* Nome da faixa logo abaixo da hora em que ela começa.
   A coluna tem 64px: lado a lado, o rótulo cobriria o horário. */
.tcell .bandlab {
  position: absolute;
  left: 7px;
  top: 19px;
  line-height: 1;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #A9700F
}

.col {
  position: relative;
  border-right: 1px solid var(--line)
}

.col:last-child {
  border-right: 0
}

.slot {
  position: absolute;
  left: 0;
  right: 0;
  cursor: pointer;
  z-index: 1
}

.slot:hover {
  background: rgba(245, 146, 30, .12);
  box-shadow: inset 0 0 0 1.5px rgba(245, 146, 30, .55)
}

/* sem borda: quem separa o bloco do fundo é a cor cheia e a sombra */
.blk {
  position: absolute;
  left: 5px;
  right: 5px;
  z-index: 2;
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.32;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(16, 42, 71, .3);
  cursor: pointer
}

.blk:hover {
  filter: brightness(1.04)
}

.blk b {
  display: block;
  font-size: 12.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden
}

.blk .sub {
  font-size: 11px;
  opacity: .9;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-weight: 600
}

.blk .tag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .85
}

.blk.mensal {
  background: var(--navy);
  color: #fff
}

/* avulso tem uma cor só (caramelo, forte para não sumir nas faixas pastel do
   fundo da grade); pago ou em aberto quem diz é o badge R$ */
.blk.avulso {
  background: #9A5A0E;
  color: #fff
}

.nowline {
  position: absolute;
  left: 64px;
  right: 0;
  height: 2px;
  background: #E5484D;
  z-index: 3;
  pointer-events: none
}

.nowline::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -3.5px;
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: #E5484D
}

/* ---------- Modais ---------- */
.ov {
  position: fixed;
  inset: 0;
  background: rgba(10, 26, 45, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 14px
}

.box {
  background: #fff;
  border-radius: 18px;
  padding: 22px 20px;
  width: min(460px, 100%);
  max-height: 92vh;
  overflow: auto;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .45)
}

.box h2 {
  font-family: var(--disp);
  margin: 0 0 16px;
  font-size: 19px;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -.01em
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px
}

.seg {
  display: flex;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  overflow: hidden
}

.seg button {
  flex: 1;
  border: 0;
  background: #fff;
  padding: 10px;
  font-weight: 800;
  color: var(--mut)
}

.seg button.on {
  background: var(--navy);
  color: #fff
}

/* horários do mensalista */
.hrow {
  background: #FAF7EF;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  margin-bottom: 9px;
  position: relative
}

.hrow .row2 {
  margin-bottom: 9px
}

.hrow .row2:last-of-type {
  margin-bottom: 0
}

.hrow select {
  width: 100%;
  border: 1.5px solid #D8CDB8;
  border-radius: 10px;
  padding: 9px 10px;
  background-color: #fff
}

.hdel {
  position: absolute;
  top: -9px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 99px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--red);
  font-weight: 800;
  line-height: 1;
  font-size: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12)
}

.hprice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--navy)
}

.fxchip {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 3px 9px
}

/* cor por posição da faixa no dia (estado.js: chipFaixa); cicla a cada 6 */
.fx-0 {
  background: #FFF3D6;
  color: #8A5E06
}

.fx-1 {
  background: #FDE4BE;
  color: #8A4A05
}

.fx-2 {
  background: #DCE7F5;
  color: var(--navy)
}

.fx-3 {
  background: #DCEFE4;
  color: #1F6B4A
}

.fx-4 {
  background: #EEDFF2;
  color: #6B2D73
}

.fx-5 {
  background: #FBE0DC;
  color: #9F2A1D
}

/* faixa que não existe mais (detalhamento de fatura antiga) */
.fx-x {
  background: #ECECEC;
  color: #666
}

.addh {
  width: 100%;
  background: #fff;
  border: 1.5px dashed #C9BC9F;
  border-radius: 12px;
  padding: 10px;
  font-weight: 800;
  color: var(--navy)
}

.addh:hover {
  background: #F8F4EA;
  border-color: var(--or)
}

.f select,
.hrow select,
select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2316395F' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px
}

.pricebox {
  background: #F6FAFE;
  border: 1px solid #D6E3F2;
  border-radius: 14px;
  padding: 13px 14px;
  margin: 14px 0 0
}

.pl {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: #41546B;
  margin: 3px 0;
  font-weight: 600
}

.pl .plq {
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap
}

.pt {
  display: flex;
  justify-content: space-between;
  font-family: var(--disp);
  font-weight: 800;
  color: var(--navy);
  font-size: 17px;
  border-top: 1.5px dashed #BFD0E4;
  margin-top: 10px;
  padding-top: 10px
}

.pp {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  color: var(--or-deep);
  font-size: 13.5px;
  margin-top: 4px
}

.mbox {
  background: #FFF6E6;
  border: 1px solid #F0D6A6;
  border-radius: 14px;
  padding: 13px 14px;
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.55
}

.mbox b {
  color: var(--navy)
}

.err {
  background: #FDECEA;
  color: #9F2A1D;
  border: 1px solid #F1B8B0;
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin-top: 12px;
  font-weight: 600
}

.acts {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px
}

.kv {
  font-size: 14px;
  margin: 5px 0
}

.kv b {
  color: var(--navy)
}

/* ---------- Tabelas / listas ---------- */
.tbwrap {
  overflow-x: auto
}

.tb {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px
}

.tb th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--mut);
  text-align: left;
  padding: 9px 8px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap
}

.tb td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle
}

.tb tr:hover td {
  background: #FBF8F1
}

.st {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 3.5px 10px
}

.st.paga,
.st.pago {
  background: var(--greenbg);
  color: var(--green)
}

.st.aberta,
.st.pend {
  background: var(--amberbg);
  color: var(--amber)
}

.st.mensal {
  background: #E4EBF4;
  color: var(--navy)
}

.st.avulso {
  background: #F1ECE0;
  color: var(--mut)
}

.st.cancelado {
  background: #ECECEC;
  color: #777
}

/* Data (e hora) embaixo de uma chip de situação: quando o pagamento foi
   marcado (caixa do dia, fatura; para conferir com o extrato), quando o
   contrato foi cancelado (mensalista, turma). */
.quando {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--mut);
  font-variant-numeric: tabular-nums;
  white-space: nowrap
}

.mcard {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
  margin-bottom: 13px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(22, 57, 95, .05)
}

.mcard h3 {
  font-family: var(--disp);
  margin: 0;
  font-size: 17px;
  color: var(--navy);
  font-weight: 800
}

.mline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft);
  flex-wrap: wrap;
  font-weight: 600
}

.mline:last-of-type {
  border-bottom: 0
}

.mline .mv {
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap
}

.mtot {
  display: flex;
  justify-content: space-between;
  font-family: var(--disp);
  font-weight: 800;
  font-size: 16.5px;
  color: var(--navy);
  border-top: 1.5px solid var(--line);
  margin-top: 8px;
  padding-top: 10px
}

.totline {
  display: flex;
  justify-content: space-between;
  font-family: var(--disp);
  font-weight: 800;
  font-size: 16px;
  color: var(--navy);
  padding: 12px 8px 0
}

.cfgtb input[type=time] {
  width: 110px;
  border: 1.5px solid #D8CDB8;
  border-radius: 9px;
  padding: 7px
}

.cfgtb input[type=text] {
  width: 150px;
  min-width: 110px;
  border: 1.5px solid #D8CDB8;
  border-radius: 9px;
  padding: 7px 9px
}

.cfgtb input:focus {
  border-color: var(--or);
  outline: none
}

.cfgtb td .fxchip {
  vertical-align: middle;
  padding: 0 7px
}

.cfgtb input[type=number] {
  width: 96px;
  border: 1.5px solid #D8CDB8;
  border-radius: 9px;
  padding: 7px
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--navy-2);
  border-left: 4px solid var(--or);
  color: #fff;
  padding: 12px 20px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
  z-index: 90;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .4);
  max-width: 92vw;
  text-align: center
}

[hidden] {
  display: none !important
}

@media (max-width:560px) {
  .ov {
    align-items: flex-end;
    padding: 0
  }

  .box {
    border-radius: 20px 20px 0 0;
    width: 100%
  }

  main {
    padding: 12px 10px 40px
  }

  input,
  select {
    font-size: 16px
  }

  .dbtn {
    font-size: 15.5px;
    padding: 0 8px
  }

  .lchip {
    font-size: 12px;
    padding: 5px 10px
  }
}

@media (prefers-reduced-motion:no-preference) {
  .box {
    animation: up .18s ease
  }

  #toast {
    animation: up .18s ease
  }
}

@keyframes up {
  from {
    transform: translateY(14px);
    opacity: .5
  }
}
/* ---------- Turmas ---------- */
.blk.turma {
  background: #0F6E76;
  color: #fff
}

.st.turma {
  background: #D6EFEE;
  color: #0F5C60
}

/* lista de alunos (card da turma e detalhe na agenda) */
.alunos {
  margin-top: 12px;
  border-top: 1.5px solid var(--line);
  padding-top: 10px
}

.ahead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px
}

.ahead .at {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--mut)
}

.ahead .vg {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 15px;
  color: var(--navy);
  white-space: nowrap
}

.ahead .vg.full {
  color: var(--red)
}

.aline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13.5px
}

.aline:last-of-type {
  border-bottom: 0
}

.aline .an {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.aline .an small {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mut);
  margin-left: 7px
}

.aline .ad {
  color: var(--mut);
  font-size: 12px;
  white-space: nowrap
}

.abtn {
  flex: none;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 4px 9px;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--navy)
}

.abtn:hover {
  background: #F8F4EA
}

.abtn.rm {
  color: var(--red)
}

.aadd {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.3fr auto auto;
  gap: 8px;
  margin-top: 10px
}

.aadd input,
.aedit input {
  width: 100%;
  min-width: 0;
  border: 1.5px solid #D8CDB8;
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff
}

.aadd input:focus,
.aedit input:focus {
  border-color: var(--or)
}

.aedit {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.3fr auto auto auto;
  gap: 6px;
  align-items: center;
  flex: 1;
  min-width: 0
}

.aedit input {
  padding: 6px 8px;
  border-radius: 8px
}

.tlot {
  background: #FDECEA;
  color: #9F2A1D;
  border: 1px solid #F1B8B0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 8px
}

/* seletor compacto "Beachville | Professor" na matrícula e na edição do aluno */
.seg.sm {
  border-radius: 10px
}

.seg.sm button {
  padding: 7px 11px;
  font-size: 12px;
  white-space: nowrap
}

/* etiqueta de origem do aluno: de quem ele é, e portanto quem cobra a mensalidade */
.ao {
  flex: none;
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 3px 8px;
  white-space: nowrap
}

.ao-beachville {
  background: #D6EFEE;
  color: #0F5C60
}

.ao-professor {
  background: var(--amberbg);
  color: var(--amber)
}

/* presença baixa no card da turma: faltou a mais da metade das aulas */
.aline .ad.low {
  color: var(--red);
  font-weight: 800
}

/* chamada no detalhe da aula (Agenda): a linha inteira é o botão de presença */
.aline.chk {
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--line-soft);
  border-radius: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 8px 0;
  cursor: pointer
}

.aline.chk:disabled {
  cursor: default;
  opacity: .7
}

.aline.chk .an {
  color: var(--mut)
}

.ck {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #C9BC9F;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: transparent
}

.aline.chk.on .ck {
  background: #1C7A80;
  border-color: #1C7A80;
  color: #fff
}

.aline.chk.on .an {
  color: var(--navy)
}

@media (max-width:900px) {
  /* nome | telefone | CPF em cima; e-mail | seletor | Matricular embaixo */
  .aadd,
  .aedit {
    grid-template-columns: 1fr 1fr 1fr
  }
}

@media (max-width:560px) {
  /* nome | telefone; CPF | e-mail; seletor | Matricular */
  .aadd {
    grid-template-columns: 1fr 1fr
  }

  .aedit {
    grid-template-columns: 1fr 1fr
  }

  .aedit .seg {
    grid-column: 1 / -1
  }

  .cfgdesc {
    grid-template-columns: 1fr
  }
}

/* ---------- Observações e cobrança ---------- */
.f textarea {
  width: 100%;
  border: 1.5px solid #D8CDB8;
  border-radius: 11px;
  padding: 11px 12px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  resize: vertical;
  min-height: 48px
}

.f textarea:focus {
  border-color: var(--or);
  outline: none
}

/* observações do cadastro, no card e no detalhe da agenda */
.obs {
  background: #FAF7EF;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 13px;
  color: var(--mut);
  font-weight: 600;
  margin: 4px 0 8px;
  white-space: pre-wrap
}

/* pilha de selos no canto do card: situação + cobrança */
.stcol {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px
}

/* selo de cobrança clicável (mensalista: abre a tela Faturas) */
button.st {
  border: 0;
  cursor: pointer;
  font-family: inherit
}

button.st:hover {
  filter: brightness(.95)
}

/* mensalidade do aluno na linha da turma: paga, ou botão de receber */
.aline .ad.ok {
  color: var(--green);
  font-weight: 800
}

.abtn.pay {
  border-color: var(--or);
  background: var(--or);
  color: var(--navy-2)
}

.abtn.pay:hover {
  background: var(--or-hi)
}

/* cobrança em aberto: badge com o VALOR (data-devendo) no canto do bloco,
   pílula branca com vermelho: salta aos olhos em qualquer cor de bloco */
.blk.devendo::after {
  content: attr(data-devendo);
  position: absolute;
  top: 3px;
  right: 3px;
  background: #fff;
  color: var(--red);
  border: 1.5px solid var(--red);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  border-radius: 99px;
  padding: 3.5px 7px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3)
}

.lchip .lrs {
  background: #fff;
  color: var(--red);
  border: 1.5px solid var(--red);
  font-size: 10px;
  font-weight: 800;
  border-radius: 99px;
  padding: 2px 6px
}

/* participante do mensalista: mesmos campos da matrícula, sem origem */
.aadd.part {
  grid-template-columns: 1.3fr 1fr 1fr 1.3fr auto
}

.aedit.part {
  grid-template-columns: 1.3fr 1fr 1fr 1.3fr auto auto
}

@media (max-width:900px) {
  .aadd.part,
  .aedit.part {
    grid-template-columns: 1fr 1fr 1fr
  }
}

@media (max-width:560px) {
  .aadd.part,
  .aedit.part {
    grid-template-columns: 1fr 1fr
  }
}


/* ---------- Chamada e recebimento no detalhe da agenda ---------- */
/* ✓ (veio) e ✗ (não veio) na etiqueta dos blocos da grade: cores claras,
   legíveis sobre o navy do mensalista e o teal da turma */
.blk .pv {
  color: #9FF5C2
}

.blk .px {
  color: #FFC4BD
}

/* a mesma dupla na legenda da agenda */
.lchip .lok {
  color: var(--green);
  font-weight: 800
}

.lchip .lno {
  color: var(--red);
  font-weight: 800
}

/* linha da chamada de turma com recebimento: o check é um botão dentro da
   linha, para o Receber da mensalidade morar ao lado */
.aline.mrow {
  padding: 0
}

.chkbtn {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  padding: 8px 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer
}

.chkbtn:disabled {
  cursor: default;
  opacity: .7
}

.chkbtn .an {
  color: var(--mut)
}

.chkbtn.on .ck {
  background: #1C7A80;
  border-color: #1C7A80;
  color: #fff
}

.chkbtn.on .an {
  color: var(--navy)
}

/* veio/não veio do mensalista no detalhe: verde quando veio, vermelho quando não */
.usoseg {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap
}

.uso button.on.ok {
  background: var(--green)
}

.uso button.on.no {
  background: var(--red)
}

/* pagou: valor em cima, data e hora embaixo, na linha da pessoa */
.adp {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex: none;
  white-space: nowrap
}

/* botão de fechar (✕) no canto das caixas de diálogo; sticky para seguir
   visível quando o conteúdo rola (detalhe com muita gente) */
.bxclose {
  position: sticky;
  top: 0;
  float: right;
  margin: -8px -8px 0 10px;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--mut);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  z-index: 3
}

.bxclose:hover {
  background: #F8F4EA;
  color: var(--navy)
}

/* Configurações: grade dos preços de turma por aula (1 a 8 alunos) */
.ptgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 11px;
  margin-bottom: 12px
}

@media (max-width:560px) {
  .ptgrid {
    grid-template-columns: 1fr 1fr
  }
}

/* aula experimental: a contagem em vermelho na etiqueta do bloco (pílula
   branca, legível sobre qualquer cor de bloco) */
.blk .pexp {
  display: inline-block;
  background: #fff;
  color: var(--red);
  border-radius: 99px;
  padding: 1px 6px;
  font-weight: 800;
  letter-spacing: .03em
}

/* formulário do experimental no detalhe da aula: duas linhas com campos
   grandes (nome + telefone; CPF + e-mail) e o botão embaixo, esticado */
.aadd.exp {
  grid-template-columns: 1fr 1fr
}

.aadd.exp .btn {
  grid-column: 1 / -1
}

/* separa a chamada da seção de aula experimental no detalhe da aula */
.expsep {
  border-top: 1.5px solid var(--line);
  margin: 14px 0 10px
}

/* churrasqueira: o botão da barra de dias vira o alerta quando o dia está
   reservado, e a tira da semana ganha o iconezinho no canto do dia */
#dchurras.on {
  background: var(--amberbg);
  border-color: var(--amberln);
  color: var(--amber);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1.15;
  padding-top: 4px;
  padding-bottom: 4px
}

/* segunda linha do alerta: quem reservou e o telefone */
#dchurras .chinfo {
  display: block;
  font-size: 12px;
  font-weight: 700;
  opacity: .9;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.wday {
  position: relative
}

.wdch {
  position: absolute;
  top: -9px;
  right: -6px;
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35))
}

/* aluno/participante inativado: nome, chips e números em cinza, evidente
   que não pertence mais à turma (histórico do mês). O botão Receber fica
   FORA do efeito: dívida do mês continua viva e clicável, sem parecer
   desabilitado. */
.aline.inativa .an,
.aline.inativa .ao,
.aline.inativa .ad {
  opacity: .6;
  filter: grayscale(1)
}

.aline.inativa .an {
  color: var(--mut)
}

/* reposição: sinalização na grade (sem cobrança), cinza-azulado */
.blk.repo {
  background: #56687C;
  color: #fff
}

.st.repo {
  background: #E3E9F0;
  color: #3F5164
}

/* ---------- Logs de uso (admin) ---------- */
.logfiltros {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.1fr 1.6fr auto;
  gap: 11px;
  align-items: end
}

.logfiltros .f {
  margin-bottom: 0
}

.logfiltros .f input,
.logfiltros .f select {
  min-height: 46px
}

.lgacts {
  display: flex;
  gap: 8px
}

.lgacts .btn {
  height: 46px;
  white-space: nowrap
}

@media (max-width:900px) {
  .logfiltros {
    grid-template-columns: 1fr 1fr 1fr
  }

  .logfiltros .lgbusca,
  .lgacts {
    grid-column: 1 / -1
  }
}

@media (max-width:560px) {
  .logfiltros {
    grid-template-columns: 1fr 1fr
  }

  .lgacts .btn {
    flex: 1
  }
}

/* resultado de cada ação: concluída, recusada pelo servidor (4xx) ou erro (5xx) */
.st.ok {
  background: var(--greenbg);
  color: var(--green)
}

.st.recusado {
  background: var(--amberbg);
  color: var(--amber)
}

.st.erro {
  background: #FDECEA;
  color: #9F2A1D
}

.lgrow {
  cursor: pointer
}

.lgrow.aberta td {
  background: #FBF8F1;
  border-bottom-color: transparent
}

.lgquando {
  white-space: nowrap;
  font-variant-numeric: tabular-nums
}

.lgquando b {
  color: var(--navy)
}

.lgquando small {
  display: block;
  color: var(--mut);
  font-size: 12px
}

.lguser {
  white-space: nowrap;
  font-weight: 700
}

.lgacao {
  min-width: 260px
}

.lgacao .lgmotivo {
  display: block;
  color: #9F2A1D;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 2px
}

/* linha de detalhes (dados enviados), aberta ao tocar na linha */
.lgdet td {
  background: #FAF7EF;
  padding: 6px 12px 14px
}

.lgmeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 12.5px;
  color: var(--mut);
  font-weight: 600;
  font-variant-numeric: tabular-nums
}

.lgmeta code {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px 7px;
  font-size: 12px;
  color: var(--navy)
}

.lgdet pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12.5px;
  line-height: 1.45;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 320px;
  overflow: auto
}
