/* ============================================================
   App "Bastidores" — design inspirado no jw.org
   Paleta: azul JW #4a6da7 + brancos e cinzas claros (calmo, limpo)
   ============================================================ */
:root {
  --jw:        #4a6da7;   /* azul JW principal */
  --jw-dark:   #3c5a8c;   /* azul mais escuro (cabeçalho/hover) */
  --jw-2:      #5f80b6;   /* azul claro */
  --jw-tint:   #e6ecf5;   /* fundo azul bem claro */
  --jw-tint-2: #f0f4fa;
  --fundo:     #eef1f6;
  --branco:    #ffffff;
  --texto:     #2b2f36;   /* charcoal (não preto puro) */
  --texto-suave: #6b7280;
  --borda:     #e4e9f1;
  --linha:     #eef1f6;
  --ambar-bg:  #f6ead0;
  --ambar-tx:  #8a6a1e;
  --verde-wpp: #25a35a;   /* verde WhatsApp (um pouco mais sóbrio) */
  --sombra:    0 1px 2px rgba(35, 55, 90, 0.06), 0 1px 3px rgba(35, 55, 90, 0.05);
  --sombra-md: 0 4px 14px rgba(35, 55, 90, 0.10);
  --raio:      12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

.app { padding-bottom: 88px; min-height: 100dvh; }

/* ================= Ícones ================= */
.ic { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }
[data-icon] { display: inline-flex; align-items: center; }

/* ================= Tela de login ================= */
.login {
  position: relative; overflow: hidden;
  min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(160deg, #4d70aa 0%, #33507e 100%);
}
/* Imagem de fundo desfocada (arquivo: public/bg-login.png) */
.login::before {
  content: ""; position: absolute; inset: -30px; z-index: 0;
  background: url("bg-login.png") center 22%/cover no-repeat;
  filter: blur(4px) brightness(0.94) saturate(1.05);
  transform: scale(1.08);
}
/* Camada azul por cima da foto, para manter a identidade e a legibilidade */
.login::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(170deg, rgba(77,112,170,0.55) 0%, rgba(41,63,104,0.72) 100%);
}
.login__box {
  position: relative; z-index: 1; overflow: hidden;
  /* céu estrelado (estrelinhas) + brilho no topo + azul claro do app */
  background:
    radial-gradient(1.6px 1.6px at 12% 18%, rgba(255,255,255,0.95), transparent 60%),
    radial-gradient(1.3px 1.3px at 82% 12%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1px 1px at 45% 8%, rgba(255,255,255,0.85), transparent 60%),
    radial-gradient(1.8px 1.8px at 68% 26%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.4px 1.4px at 90% 45%, rgba(255,255,255,0.8), transparent 60%),
    radial-gradient(1px 1px at 8% 62%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.6px 1.6px at 55% 57%, rgba(255,255,255,0.75), transparent 60%),
    radial-gradient(1px 1px at 78% 70%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.3px 1.3px at 35% 82%, rgba(255,255,255,0.75), transparent 60%),
    radial-gradient(1px 1px at 92% 88%, rgba(255,255,255,0.65), transparent 60%),
    radial-gradient(1.5px 1.5px at 18% 92%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 62% 94%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 5% 30%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 48% 34%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(130% 95% at 50% -12%, rgba(255,255,255,0.22), transparent 55%),
    linear-gradient(165deg, #5480c8 0%, #3a63a8 55%, #315693 100%);
  width: 100%; max-width: 380px; border-radius: 24px; padding: 36px 28px 30px;
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow: 0 28px 64px rgba(10,22,55,0.5), 0 3px 10px rgba(10,22,55,0.28);
  text-align: center;
}
.login__logo {
  width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 19px;
  background: #fff; color: var(--jw-dark);
  font-weight: 800; font-size: 2.05rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 22px rgba(0,0,0,0.28);
}
.login__title { margin: 4px 0 2px; font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: 0.2px; }
.login__congress { margin: 10px 0 4px; color: #eaf1fd; font-size: 0.95rem; font-weight: 700; line-height: 1.45; text-shadow: 0 1px 2px rgba(10,22,55,0.25); }
.login__sub { margin: 10px 0 24px; color: rgba(255,255,255,0.82); font-size: 0.88rem; }
.login .field { text-align: left; margin-bottom: 16px; }
.login .field span { font-size: 0.82rem; font-weight: 700; color: rgba(255,255,255,0.92); display: block; margin-bottom: 6px; }
.login .field input {
  background: #fff; color: var(--texto);
  border-radius: 13px; border: 1.5px solid rgba(255,255,255,0.35); padding: 13px 15px; transition: border-color .15s, box-shadow .15s;
}
.login .field input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.25); outline: none; }
.login #login-btn {
  color: var(--jw-dark);
  background: linear-gradient(100deg, #ffffff 20%, #dce8ff 50%, #ffffff 80%);
  background-size: 240% 100%; background-position: 130% 0;
  border-radius: 13px; padding: 14px; font-size: 1rem; font-weight: 800;
  box-shadow: 0 8px 20px rgba(6,14,40,0.35);
  transition: background-position .7s ease, transform .18s ease, box-shadow .18s ease;
}
.login #login-btn:hover {
  background-position: -30% 0;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(10,22,55,0.45);
}
.login #login-btn:active {
  background-position: -30% 0;
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 5px 14px rgba(10,22,55,0.32);
}
.login__error { color: #ffd0cb; font-size: 0.88rem; margin: 12px 0 0; }

/* ===== Overlay "Login realizado com sucesso" ===== */
.login-success {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #5480c8 0%, #315693 100%);
  animation: ls-in 0.25s ease;
}
.login-success.hidden { display: none; }
.login-success.ls-out { animation: ls-out 0.38s ease forwards; }
.ls-card { text-align: center; color: #fff; padding: 24px; }
.ls-badge { width: 108px; height: 108px; margin: 0 auto 20px; filter: drop-shadow(0 10px 22px rgba(0,0,0,0.28)); }
.ls-badge svg { width: 100%; height: 100%; overflow: visible; }
.ls-c {
  fill: #22c55e; transform: scale(0); transform-box: fill-box; transform-origin: center;
  animation: ls-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.5) forwards;
}
.ls-t {
  fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48; animation: ls-draw 0.34s 0.42s ease forwards;
}
.ls-text {
  font-size: 1.15rem; font-weight: 800; opacity: 0; transform: translateY(6px);
  animation: ls-text 0.3s 0.6s ease forwards; text-shadow: 0 1px 3px rgba(10, 22, 55, 0.3);
}
@keyframes ls-pop { to { transform: scale(1); } }
@keyframes ls-draw { to { stroke-dashoffset: 0; } }
@keyframes ls-text { to { opacity: 1; transform: translateY(0); } }
@keyframes ls-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ls-out { to { opacity: 0; } }

/* ================= Avatar / menu ================= */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.18); color: #fff; font-weight: 800; font-size: 1rem; cursor: pointer; border: 1px solid rgba(255,255,255,0.45); }
.avatar:active { transform: scale(0.94); }
.menu { position: absolute; top: calc(100% + 8px); right: 0; background: #fff; border: 1px solid var(--borda); border-radius: 12px; box-shadow: var(--sombra-md); padding: 6px; min-width: 210px; z-index: 50; }
.menu__user { padding: 9px 12px; font-size: 0.82rem; color: var(--texto-suave); border-bottom: 1px solid var(--linha); margin-bottom: 4px; font-weight: 600; }
.menu__item { display: block; width: 100%; text-align: left; background: none; border: none; padding: 10px 12px; font-size: 0.92rem; border-radius: 8px; cursor: pointer; color: var(--texto); }
.menu__item:hover { background: var(--linha); }

/* ================= Cabeçalho (azul JW) ================= */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, #4d70aa 0%, #43639a 100%);
  color: #fff;
  padding: calc(12px + env(safe-area-inset-top)) 16px 14px;
  display: flex; flex-direction: column; gap: 7px;
  box-shadow: 0 2px 10px rgba(47, 71, 116, 0.25);
}
.topbar__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.topbar__label { font-size: 0.74rem; letter-spacing: 0.3px; color: rgba(255,255,255,0.85); min-width: 0; }
.topbar__greeting { font-size: 1.55rem; font-weight: 800; color: #fff; margin: 10px 0 10px; line-height: 1.12; letter-spacing: 0.2px; }
.topbar__greeting:empty { display: none; }
.topbar__hello { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.dept-label { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.9px; text-transform: uppercase; color: rgba(255,255,255,0.72); }
.dept-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.32);
  padding: 5px 13px 5px 11px; border-radius: 999px;
  font-size: 1.02rem; font-weight: 800; color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.dept-chip .ic { width: 17px; height: 17px; }
.topbar__admin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.access-badge {
  display: inline-block;
  background: rgba(255,255,255,0.22); color: #fff; border: 1px solid rgba(255,255,255,0.4);
  font-size: 0.68rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.admin-drive {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  background: #fff; color: var(--jw-dark); border: 1px solid rgba(255,255,255,0.6);
  font-size: 0.72rem; font-weight: 800; padding: 5px 12px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.admin-drive:active { transform: scale(0.97); }
.admin-drive .ic { width: 15px; height: 15px; }
.topbar__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; position: relative; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.45); background: rgba(255,255,255,0.12);
  font-size: 1.15rem; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.iconbtn:active { transform: scale(0.94); }
.iconbtn.spin { animation: spin 0.6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.iconbtn .ic { width: 20px; height: 20px; }
#edit-btn { background: #fff; color: var(--jw-dark); box-shadow: none; display: inline-flex; align-items: center; gap: 6px; }
#edit-btn .ic { width: 16px; height: 16px; }
#edit-btn:active { transform: scale(0.97); }

/* ================= Toggle de departamento ================= */
.dept-toggle {
  display: flex; gap: 8px; max-width: 900px; margin: 0 auto;
  padding: 14px 14px 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.dept-toggle::-webkit-scrollbar { display: none; }
.dept-toggle__btn {
  flex: 0 0 auto; padding: 9px 16px; border: 1px solid var(--borda); background: #fff;
  border-radius: 999px; font-weight: 600; font-size: 0.9rem; color: var(--texto-suave); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.dept-toggle__btn:active { transform: scale(0.98); }
.dept-toggle__btn.is-active { background: var(--jw); color: #fff; border-color: var(--jw); }

/* ================= Seções ================= */
.tab { max-width: 900px; margin: 0 auto; padding: 16px 14px; }
.block { margin-bottom: 26px; }
.block__title {
  font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--texto-suave); margin: 0 0 12px; padding: 0 2px;
  display: flex; align-items: center; gap: 7px;
}
.block__title .ic { width: 16px; height: 16px; color: var(--jw); }
.empty { color: var(--texto-suave); text-align: center; padding: 22px; font-size: 0.92rem; }

/* ================= Seletor de dias ================= */
.day-selector { display: flex; gap: 8px; margin-bottom: 20px; }
.day-btn {
  flex: 1; padding: 13px 6px; border: 1px solid var(--borda); background: #fff;
  border-radius: var(--raio); cursor: pointer; text-align: center; box-shadow: var(--sombra);
  transition: background .15s, border-color .15s;
}
.day-btn:active { transform: scale(0.98); }
.day-btn__d { display: block; font-weight: 700; font-size: 1rem; color: var(--texto); }
.day-btn__date { font-size: 0.74rem; color: var(--texto-suave); }
.day-btn.is-active { background: var(--jw); border-color: var(--jw); box-shadow: var(--sombra-md); }
.day-btn.is-active .day-btn__d, .day-btn.is-active .day-btn__date { color: #fff; }

/* ================= Lembrete (banner do topo) ================= */
.reminder {
  background: #fff6e3; border: 1px solid #f0d9a8; color: #7a5714;
  border-radius: var(--raio); padding: 14px 16px; margin-bottom: 18px;
  display: flex; gap: 11px; align-items: flex-start;
  font-size: 0.93rem; line-height: 1.5; font-weight: 500; box-shadow: var(--sombra);
}
.reminder .ic { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; color: #c08a1e; }

/* ===== Tarja pessoal "Sua designação" — um bloco verde por designação ===== */
.my-shift { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.ms-card {
  background: linear-gradient(135deg, #1aa85e, #0e7a45); color: #fff;
  border-radius: var(--raio); padding: 12px 15px;
  display: flex; gap: 12px; align-items: center;
  box-shadow: 0 4px 14px rgba(14, 122, 69, 0.24);
}
.ms-card__ic {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.18); display: grid; place-items: center;
}
.ms-card__ic .ic { width: 21px; height: 21px; color: #fff; }
.ms-card__main { min-width: 0; }
.ms-card__label {
  font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 800; opacity: 0.92; margin-bottom: 2px;
}
.ms-card__when { font-size: 1.02rem; font-weight: 700; line-height: 1.3; }
.ms-card__when b { font-weight: 800; }

/* ================= Programa da assembleia (card) ================= */
.programa {
  background: #fff; border: 1px solid var(--borda); border-radius: var(--raio);
  box-shadow: var(--sombra); padding: 14px 16px; margin-bottom: 18px;
}
.programa__head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--texto-suave);
}
.programa__head .ic { width: 16px; height: 16px; color: var(--jw); }
.programa__row { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px; }
.programa__lbl { font-weight: 700; color: var(--texto); }
.programa__time { font-weight: 700; color: var(--jw-dark); font-size: 1.02rem; }
.programa__int {
  text-align: center; color: var(--texto-suave); font-size: 0.76rem; font-style: italic;
  text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 0; margin: 2px 0;
  border-top: 1px dashed var(--borda); border-bottom: 1px dashed var(--borda);
}
.programa__link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; text-decoration: none; background: var(--jw); color: #fff;
  font-weight: 700; font-size: 0.95rem; padding: 11px; border-radius: 12px;
  box-shadow: 0 4px 12px rgba(74,109,167,0.3);
}
.programa__link:active { transform: scale(0.99); }
.programa__link .ic { width: 17px; height: 17px; }

/* ================= Botão Orientações + lista ================= */
.ori-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff; border: 1px solid var(--borda); color: var(--jw-dark);
  font-weight: 700; font-size: 0.95rem; padding: 14px; border-radius: var(--raio);
  box-shadow: var(--sombra); cursor: pointer; margin-bottom: 20px;
}
.ori-btn:active { transform: scale(0.99); }
.ori-btn .ic { width: 18px; height: 18px; }
.ori-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 13px; }
.ori-list li { line-height: 1.55; color: #333a44; font-size: 0.95rem; }

/* ================= Timeline (cronograma) ================= */
.timeline { position: relative; }
.tl-group + .tl-group { margin-top: 10px; }
.tl-session {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 800; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.6px;
  padding: 7px 15px; border-radius: 999px; margin: 2px 0 12px;
}
.tl-session .ic { width: 16px; height: 16px; }
.tl-session--manha { background: #fbe6c2; color: #93611a; }
.tl-session--tarde { background: #d5e2f6; color: #33507e; }
.tl-session--noite { background: #ded9f0; color: #493a78; }
.tl-item { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.tl-rail { position: relative; }
.tl-rail::before { content: ""; position: absolute; left: 9px; top: 0; bottom: -12px; width: 2px; background: #d5deec; }
.tl-item:last-child .tl-rail::before { display: none; }
.tl-dot {
  position: absolute; left: 2px; top: 17px; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: 4px solid var(--jw); box-shadow: 0 0 0 2px #fff;
}
.tl-card {
  background: #fff; border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 13px 15px; margin-bottom: 12px; box-shadow: var(--sombra);
}
.tl-times { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--jw-dark); font-weight: 600; font-size: 0.96rem; }
.tl-arrow { color: var(--texto-suave); }
.tl-name { font-weight: 700; font-size: 1.1rem; margin-top: 5px; letter-spacing: 0.2px; }
.tl-sub { color: var(--texto-suave); font-size: 0.85rem; margin-top: 2px; }
.tl-check { margin-top: 7px; font-size: 0.82rem; color: var(--jw-dark); background: var(--jw-tint); display: inline-block; padding: 3px 10px; border-radius: 999px; }
.tl-check b { font-weight: 700; }

.badge {
  font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.badge--alterada { background: var(--ambar-bg); color: var(--ambar-tx); }

/* ================= Coordenadores ================= */
.coord {
  background: #fff; border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 13px 16px; box-shadow: var(--sombra); display: flex; align-items: center; gap: 13px; margin-bottom: 10px;
}
.coord__ava {
  width: 38px; height: 38px; border-radius: 50%; background: var(--jw);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; font-weight: 700; flex-shrink: 0;
}
.coord__name { font-weight: 600; flex: 1; min-width: 0; }
.coord__wpp {
  color: var(--verde-wpp); font-weight: 700; text-decoration: none; font-size: 0.9rem;
  border: 1px solid #bfe6cd; padding: 7px 13px; border-radius: 999px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.coord__wpp .ic { width: 15px; height: 15px; }
.coord__wpp.is-disabled { color: var(--texto-suave); border-color: var(--borda); }
.coord-group {
  display: flex; align-items: center; gap: 7px; margin: 6px 2px 10px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--texto-suave);
}
.coord-group .ic { width: 15px; height: 15px; color: var(--jw); }
.note__link { color: var(--jw); font-weight: 700; text-decoration: underline; word-break: break-all; }

/* ===== Banner "Instale o app" (PWA) ===== */
.install-banner {
  display: flex; align-items: center; gap: 12px; margin: 12px 14px 0; padding: 12px 14px;
  border-radius: var(--raio); color: #fff;
  background: linear-gradient(135deg, #5480c8 0%, #385f9f 100%);
  box-shadow: 0 6px 16px rgba(35, 55, 90, 0.22);
}
.install-banner__ic { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.2); display: grid; place-items: center; }
.install-banner__ic .ic { width: 19px; height: 19px; color: #fff; }
.install-banner__txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.install-banner__txt b { font-size: 0.95rem; }
.install-banner__txt span { font-size: 0.8rem; opacity: 0.9; }
.install-banner__btn {
  flex: 0 0 auto; background: #fff; color: var(--jw-dark); border: none; cursor: pointer;
  font-weight: 800; font-size: 0.9rem; padding: 9px 16px; border-radius: 999px;
}
.install-banner__btn:active { transform: scale(0.97); }
.install-banner__x {
  flex: 0 0 auto; background: none; border: none; color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem; cursor: pointer; padding: 4px 2px; line-height: 1;
}
.note__btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 6px;
  background: var(--jw); color: #fff; text-decoration: none; font-weight: 700; font-size: 0.95rem;
  padding: 11px 18px; border-radius: 12px; box-shadow: 0 4px 12px rgba(74,109,167,0.32);
}
.note__btn:active { transform: scale(0.98); }
.note__btn .ic { width: 17px; height: 17px; }

/* ================= Anúncios / Orientações ================= */
.note {
  background: #fff; border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 15px 16px; box-shadow: var(--sombra); margin-bottom: 12px;
  border-left: 4px solid var(--jw);
}
.note__title { font-weight: 700; margin: 0 0 5px; font-size: 1.02rem; }
.note__body { color: #444a52; font-size: 0.94rem; margin: 0; line-height: 1.55; white-space: pre-wrap; }
.note__date { color: var(--texto-suave); font-size: 0.76rem; margin-top: 8px; }

/* ================= Barra de abas inferior ================= */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: #fff; border-top: 1px solid var(--borda); display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(35, 55, 90, 0.05);
}
.tabbar__btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  padding: 9px 4px; color: var(--texto-suave); font-size: 0.74rem; font-weight: 600;
}
.tabbar__ic { display: flex; }
.tabbar__btn .ic { width: 23px; height: 23px; }
.tabbar__btn.is-active { color: var(--jw); }

/* ================= Painel de edição ================= */
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.admin-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; }
.chip {
  border: 1px solid var(--borda); background: #fff; border-radius: 999px;
  padding: 8px 15px; font-size: 0.85rem; white-space: nowrap; cursor: pointer; color: var(--texto-suave);
}
.chip.is-active { background: var(--jw); color: #fff; border-color: var(--jw); }
.admin-list { margin-top: 12px; }
.arow {
  background: #fff; border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 13px 15px; margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.arow__info { min-width: 0; }
.arow__title { font-weight: 600; }
.arow__sub { color: var(--texto-suave); font-size: 0.82rem; margin-top: 2px; }
.arow__tools { display: flex; gap: 5px; flex-shrink: 0; }
.admin-group-dept { font-weight: 800; color: var(--jw-dark); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.5px; margin: 18px 2px 4px; }
.admin-group-day { font-weight: 600; color: var(--texto-suave); font-size: 0.8rem; margin: 10px 2px 6px; }

/* ================= Botões ================= */
.btn { border: none; border-radius: 10px; padding: 12px 18px; font-size: 0.92rem; font-weight: 600; cursor: pointer; }
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--jw); color: #fff; }
.btn--primary:hover { background: var(--jw-dark); }
.btn--ghost { background: var(--jw-tint); color: var(--jw-dark); }
.btn--block { width: 100%; margin-top: 6px; }
.btn--sm { padding: 9px 14px; font-size: 0.85rem; }
.icon-btn {
  border: 1px solid var(--borda); background: #fff; border-radius: 9px;
  padding: 7px 9px; font-size: 0.82rem; cursor: pointer; color: var(--texto-suave);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn .ic { width: 16px; height: 16px; }
.icon-btn[disabled] { opacity: 0.3; cursor: default; }
.icon-btn--danger { color: #c0392b; border-color: #f0c9c2; }

/* ================= Campos / Modal ================= */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 0.82rem; font-weight: 600; color: var(--texto-suave); }
.field input, .field textarea, .field select {
  border: 1px solid var(--borda); border-radius: 10px; padding: 12px;
  font-size: 1rem; font-family: inherit; width: 100%; background: #fff; color: var(--texto);
}
.field textarea { resize: vertical; min-height: 74px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--jw-tint); border-color: var(--jw); }

.modal {
  position: fixed; inset: 0; background: rgba(30, 45, 75, 0.5);
  display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 60;
}
.modal__box {
  background: #fff; border-radius: 16px; width: 100%; max-width: 440px;
  padding: 22px; box-shadow: 0 24px 60px rgba(20, 35, 70, 0.35); max-height: 90dvh; overflow-y: auto;
}
.modal__title { margin: 0 0 16px; font-size: 1.2rem; color: var(--jw-dark); }
.modal__body { display: flex; flex-direction: column; gap: 13px; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ================= Toast ================= */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: var(--texto); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 0.88rem; z-index: 80; box-shadow: var(--sombra-md);
}
.toast--erro { background: #c0392b; }

/* ===== Desktop: coluna de app centralizada e proporcional ===== */
@media (min-width: 760px) {
  body { background: #d7dded; }
  .app {
    max-width: 600px; margin: 0 auto; min-height: 100dvh;
    background: var(--fundo);
    box-shadow: 0 0 0 1px rgba(35, 55, 90, 0.06), 0 18px 60px rgba(20, 35, 70, 0.18);
  }
  /* barra inferior acompanha a coluna (vem depois da regra base, então vence a cascata) */
  .tabbar {
    left: 50%; right: auto; transform: translateX(-50%);
    width: 100%; max-width: 600px;
    border-left: 1px solid var(--borda); border-right: 1px solid var(--borda);
  }
}

/* ================= Programa completo (pop-up) ================= */
button.programa__link { width: 100%; border: 0; font: inherit; cursor: pointer; }
.programa__link + .programa__link { margin-top: 8px; }
.prog { display: flex; flex-direction: column; gap: 6px; }
.prog__head { margin-top: 10px; font-weight: 800; color: var(--jw-dark); letter-spacing: 0.02em; }
.prog__head:first-child { margin-top: 0; }
.prog__row { display: flex; gap: 12px; line-height: 1.45; color: var(--texto); font-size: 0.95rem; }
.prog__time { flex: 0 0 44px; font-weight: 700; color: var(--jw); font-variant-numeric: tabular-nums; }
.prog__sub { padding-left: 56px; color: var(--texto-suave); font-size: 0.92rem; line-height: 1.4; }
.prog__sub::before { content: "• "; }

/* ================= Escala: edição direta (coordenador) e destaque "Você" ================= */
.tl-hint {
  display: flex; gap: 9px; align-items: flex-start; margin: 0 0 14px;
  background: var(--jw-tint); color: var(--jw-dark); border-radius: 10px;
  padding: 10px 12px; font-size: 0.86rem; line-height: 1.4;
}
.tl-hint .ic { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.tl-session__time { margin-left: 4px; font-weight: 600; letter-spacing: 0; text-transform: none; opacity: 0.85; font-variant-numeric: tabular-nums; }
.tl-session--sem { background: #f6dcd7; color: #9b3426; }
.tl-warn { margin: -4px 0 12px; font-size: 0.84rem; color: #9b3426; }
.tl-card { display: flex; align-items: center; gap: 10px; }
.tl-card__main { flex: 1; min-width: 0; }
.tl-role { font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--jw); }
.tl-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 2px; }
.tl-tbd { color: var(--texto-suave); font-weight: 600; font-style: italic; }
.tl-time { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.86rem; font-weight: 600; color: var(--jw-dark); }
.tl-time .ic { width: 14px; height: 14px; }
.badge--voce { background: var(--jw); color: #fff; }
.tl-card--me { border-color: var(--jw); box-shadow: 0 0 0 2px rgba(74, 109, 167, 0.22), var(--sombra); }
.tl-card--edit { cursor: pointer; transition: border-color 0.15s; }
.tl-card--edit:hover { border-color: var(--jw); }
.tl-card--edit:active { transform: scale(0.99); }
.tl-card--edit:focus-visible { outline: 2px solid var(--jw); outline-offset: 2px; }
.tl-tools { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.tl-mv {
  width: 36px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--borda); background: #fff; border-radius: 8px; color: var(--texto-suave); cursor: pointer;
}
.tl-mv .ic { width: 16px; height: 16px; }
.tl-mv[disabled] { opacity: 0.3; cursor: default; }
.tl-add {
  display: block; width: calc(100% - 34px); margin: 0 0 10px 34px; padding: 13px;
  border: 2px dashed #c3d0e6; border-radius: var(--raio); background: transparent;
  color: var(--jw); font: inherit; font-weight: 700; font-size: 0.92rem; cursor: pointer;
}
.tl-add:hover, .tl-add:active { background: var(--jw-tint); border-color: var(--jw); }
.tl-empty { margin: 0 0 10px 34px; color: var(--texto-suave); font-size: 0.86rem; font-style: italic; }
.admin-note { margin: -4px 0 14px; font-size: 0.86rem; color: var(--texto-suave); line-height: 1.45; }

/* ================= Formulários (folha de edição) ================= */
.field__hint { font-size: 0.78rem; color: var(--texto-suave); }
.field__opt { font-weight: 500; opacity: 0.8; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg__btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px;
  border: 1.5px solid var(--borda); background: #fff; border-radius: 12px;
  font: inherit; font-weight: 700; color: var(--texto); cursor: pointer;
}
.seg__btn .ic { width: 18px; height: 18px; color: var(--texto-suave); }
.seg__btn small { font-size: 0.76rem; font-weight: 500; color: var(--texto-suave); font-variant-numeric: tabular-nums; }
.seg__btn.is-active { border-color: var(--jw); background: var(--jw-tint); color: var(--jw-dark); }
.seg__btn.is-active .ic { color: var(--jw); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.check { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 0.92rem; color: var(--texto); cursor: pointer; line-height: 1.35; }
.check input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--jw); }
.checks { display: flex; flex-wrap: wrap; gap: 2px 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.more { border-top: 1px solid var(--borda); padding-top: 8px; }
.more summary { cursor: pointer; padding: 6px 0; font-size: 0.9rem; font-weight: 600; color: var(--jw-dark); }
.more__body { display: flex; flex-direction: column; gap: 13px; margin-top: 8px; }
.btn--danger { background: #fbeae7; color: #b03a2e; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.modal__spacer { flex: 1; }

/* Modal: título e botões sempre à vista, só o meio rola. No celular sobe de baixo, como folha. */
.modal__box { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.modal__title { padding: 20px 20px 0; }
.modal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 20px 16px; }
.modal__actions {
  margin-top: 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--borda); background: #fff;
}
@media (max-width: 600px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal__box { max-width: none; max-height: 92dvh; border-radius: 18px 18px 0 0; }
}
.tl-quick { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.tl-quick__btn {
  display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--borda); background: #fff; font: inherit; font-size: 0.8rem; font-weight: 700; color: var(--jw-dark); cursor: pointer;
}
.tl-quick__btn .ic { width: 14px; height: 14px; }
.tl-quick__btn[data-turno="Manhã"] { background: #fdf3e1; border-color: #f1d9ad; color: #93611a; }
.tl-quick__btn[data-turno="Tarde"] { background: #e9f0fa; border-color: #c9d8ef; color: #33507e; }
.tl-session--tbd { background: #e8eaee; color: #555d6b; }
