/* ==========================================================================
   ESSd — camada administrativa (pages/admin/ e header.adm.html)
   --------------------------------------------------------------------------
   Folha ÚNICA das páginas administrativas. Não depende do css/style.css
   público (e o style.css não é carregado no admin), então mexer aqui não
   afeta o site nem a compatibilidade mobile das páginas públicas.

   Origem: administrativo do 13º BPM/M (css/13bpmm.css seções 1 e 12 +
   css/admin.css), com a cor institucional trocada pela da ESSd.

   Organização:
   A. Fundamentos (reset e base tipográfica)
   B. Login e painel administrativo compartilhado
   C. Módulos administrativos (estrutura, formulários, banners, usuários,
      aniversariantes, agenda, estados, responsivo)
   D. Módulos desabilitados (aviso "em preparação") — próprio da ESSd
   ========================================================================== */

:root{
  --carmim:#b91c1c;
  --preto:#0E0E0E;
  --grafite:#1A1A1A;
  --texto-claro:#B7B7B7;
}

/* ==========================================================================
   A. FUNDAMENTOS
   ========================================================================== */
/* ---- reset e base tipográfica ---- */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html{
  min-height:100%;
  min-height:-webkit-fill-available;
  overflow-x:clip;
  background:#fff;
}

body{
  font-family:'Segoe UI', Arial, sans-serif;
  color:#222;
  background:#f5f5f5;
  min-height:100vh;
  min-height:-webkit-fill-available;
  overflow-x:hidden;
}

a{
  text-decoration:none;
  color:inherit;
}

ul,li{
  list-style:none;
}

img{
  max-width:100%;
  display:block;
}

/* ---- área segura (notch/home indicator) ---- */
:root{
  --safe-area-top:env(safe-area-inset-top,0px);
  --safe-area-right:env(safe-area-inset-right,0px);
  --safe-area-bottom:env(safe-area-inset-bottom,0px);
  --safe-area-left:env(safe-area-inset-left,0px);
}

@media (max-width:768px){
  body{
    padding-bottom:var(--safe-area-bottom);
  }
}

/* ==========================================================================
   B. LOGIN E PAINEL ADMINISTRATIVO COMPARTILHADO
   --------------------------------------------------------------------------
   pages/admin/admin-login.html e pages/admin/painel.html.
   O painel vermelho institucional pertence somente à tela de login.
   ========================================================================== */

.admin-login-page,
.admin-panel-page{
  min-height:100vh;
  background:#f3f3f1;
  color:#25282b;
}

/* ---- login: composição institucional em duas áreas ---- */
.admin-login-layout{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(350px,30%) minmax(0,1fr);
}

.admin-login-brand{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:clamp(50px,6vw,84px) clamp(38px,4.3vw,58px) 42px;
  background:var(--carmim);
  color:#fff;
}

.admin-login-brasao{
  width:350px;
  height:166px;
  object-fit:contain;
  margin-bottom:25px;
  filter:drop-shadow(0 7px 10px rgba(0,0,0,.12));
}

.admin-login-marca-legenda{
  margin-bottom:12px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.21em;
  line-height:1.2;
}

.admin-login-brand-title{
  font-family:"Segoe UI Variable Display","Segoe UI",Arial,sans-serif;
  font-size:clamp(48px,4vw,56px);
  font-weight:760;
  line-height:1;
  letter-spacing:-.045em;
}

.admin-login-brand-subtitle{
  margin-top:19px;
  font-size:17px;
  line-height:1.45;
}

.admin-login-brand-rule{
  width:54px;
  height:3px;
  margin:29px 0 18px;
  background:#fff;
}

.admin-login-brand-copy{
  color:rgba(255,255,255,.82);
  font-size:13px;
  line-height:1.55;
}

.admin-login-brand-footer{
  display:flex;
  align-items:flex-end;
  gap:34px;
  font-size:13px;
  font-weight:700;
  line-height:1.05;
  letter-spacing:.18em;
}

.admin-login-content{
  min-width:0;
  min-height:100vh;
  display:flex;
  align-items:center;
  padding:42px clamp(42px,8vw,132px);
  background:#f3f3f1;
}

.admin-login-panel{
  width:min(100%,500px);
  margin:0 auto;
}

.admin-login-legenda{
  display:block;
  margin-bottom:8px;
  color:var(--carmim);
  font-size:11px;
  font-weight:600;
  letter-spacing:.19em;
}

.admin-login-panel h1{
  color:#25282b;
  font-family:"Segoe UI Variable Display","Segoe UI",Arial,sans-serif;
  font-size:30px;
  font-weight:720;
  line-height:1.08;
  letter-spacing:-.035em;
}

.admin-login-lead{
  max-width:420px;
  margin:12px 0 24px;
  color:#697078;
  font-size:14px;
  line-height:1.6;
}

.admin-login-divider{
  height:1px;
  margin-bottom:27px;
  background:#d6d9dc;
}

.admin-login-form{
  display:grid;
  gap:17px;
}

.admin-login-field label{
  display:block;
  margin-bottom:7px;
  color:#33383c;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.admin-login-input{
  width:100%;
  min-height:50px;
  padding:13px 15px;
  border:1px solid #cfd3d7;
  border-radius:0;
  background:#fff;
  color:#25282b;
  font:inherit;
  font-size:15px;
  transition:border-color .2s ease,box-shadow .2s ease;
}

.admin-login-input:focus{
  outline:none;
  border-color:var(--carmim);
  box-shadow:0 0 0 2px rgba(185,28,28,.10);
}

.admin-login-recovery{
  display:grid;
  justify-items:start;
  gap:9px;
  margin-top:4px;
}

.admin-forgot-password{
  padding:0 0 3px;
  border:0;
  border-bottom:1px solid var(--carmim);
  border-radius:0;
  background:transparent;
  color:var(--carmim);
  font:inherit;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}

.admin-forgot-password:hover{
  color:#111;
  border-bottom-color:#111;
}

.admin-forgot-password:focus-visible,
.admin-login-back:focus-visible,
.admin-panel-site-link:focus-visible,
.admin-panel-option:focus-visible,
.admin-panel-logout:focus-visible{
  outline:2px solid var(--carmim);
  outline-offset:4px;
}

.admin-forgot-password:disabled{
  opacity:.55;
  cursor:wait;
}

.admin-login-recovery span{
  color:#858c92;
  font-size:11px;
  line-height:1.45;
}

.admin-login-message{
  min-height:19px;
  color:#b51522;
  font-size:12px;
  font-weight:700;
  line-height:1.45;
}

.admin-login-message.is-success{
  color:#0d6b34;
}

.admin-login-submit{
  min-height:50px;
  margin-top:5px;
  border:0;
  border-radius:0;
  background:#17191b;
  color:#fff;
  font:inherit;
  font-size:11px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
  cursor:pointer;
  transition:background .2s ease;
}

.admin-login-submit:hover{
  background:var(--carmim);
}

.admin-login-submit:disabled{
  opacity:.58;
  cursor:wait;
}

.admin-login-note{
  margin-top:25px;
  padding-top:18px;
  border-top:1px solid #d6d9dc;
  color:#7b8389;
  font-size:12px;
  line-height:1.5;
}

.admin-login-back{
  display:inline-block;
  margin-top:44px;
  color:#626a71;
  font-size:11px;
  font-weight:700;
}

/* ---- painel: mesma linguagem, sem painel vermelho lateral ---- */
.admin-panel-layout{
  min-height:100vh;
  padding:34px clamp(28px,4vw,58px) 24px;
}

.admin-panel-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:28px;
  padding-bottom:19px;
  border-bottom:1px solid #d6d9dc;
}

.admin-panel-brand{
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:17px;
}

.admin-panel-brasao{
  width:54px;
  height:82px;
  flex:0 0 auto;
  object-fit:contain;
  filter:drop-shadow(0 5px 8px rgba(0,0,0,.10));
}

.admin-panel-heading{
  min-width:0;
}

.admin-painel-legenda{
  display:block;
  margin-bottom:7px;
  color:var(--carmim);
  font-size:11px;
  font-weight:700;
  letter-spacing:.18em;
}

.admin-panel-heading h1{
  color:#25282b;
  font-family:"Segoe UI Variable Display","Segoe UI",Arial,sans-serif;
  font-size:36px;
  font-weight:760;
  line-height:1.04;
  letter-spacing:-.04em;
}

.admin-panel-heading p{
  margin-top:10px;
  color:#6d747b;
  font-size:14px;
  line-height:1.55;
}

.admin-panel-head-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:16px;
  padding-top:8px;
}

.admin-panel-site-link{
  color:#626a71;
  font-size:11px;
  font-weight:700;
  white-space:nowrap;
}

.admin-panel-logout{
  min-width:80px;
  min-height:40px;
  padding:0 20px;
  border:0;
  border-radius:0;
  background:#17191b;
  color:#fff;
  font:inherit;
  font-size:10px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
  cursor:pointer;
}

.admin-panel-logout:hover{
  background:var(--carmim);
}

.admin-panel-content{
  margin-top:22px;
  padding:18px 22px 16px;
  border:1px solid rgba(36,40,44,.09);
  background:rgba(255,255,255,.56);
}

.admin-panel-session{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding-bottom:16px;
  border-bottom:1px solid #d6d9dc;
}

.admin-panel-user{
  display:flex;
  align-items:baseline;
  gap:10px;
  min-width:0;
  color:#7a8187;
  font-size:10px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.admin-panel-user strong{
  overflow:hidden;
  color:#3a3f43;
  font-size:13px;
  font-weight:700;
  letter-spacing:0;
  text-overflow:ellipsis;
  text-transform:none;
  white-space:nowrap;
}

.admin-panel-status{
  display:flex;
  align-items:center;
  gap:7px;
  color:#748087;
  font-size:11px;
  white-space:nowrap;
}

.admin-panel-status-dot{
  width:7px;
  height:7px;
  flex:0 0 auto;
  border-radius:50%;
  background:#3f8b58;
  box-shadow:0 0 0 4px rgba(63,139,88,.08);
}

.admin-panel-modules{
  margin-top:17px;
}

.admin-panel-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:13px;
}

.admin-panel-section-head strong{
  color:#4c5358;
  font-size:10px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.admin-panel-section-head span{
  color:#98a0a7;
  font-size:10px;
}

.admin-panel-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.admin-panel-option{
  position:relative;
  min-height:100px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 18px;
  align-items:center;
  gap:14px;
  padding:15px 15px 15px 16px;
  border:1px solid #d6d9dc;
  background:rgba(255,255,255,.62);
  color:#25282b;
  text-decoration:none;
  transition:border-color .2s ease,background .2s ease;
}

.admin-panel-option::before{
  content:"";
  position:absolute;
  top:-1px;
  bottom:-1px;
  left:-1px;
  width:3px;
  background:var(--carmim);
}

.admin-panel-option:hover,
.admin-panel-option:focus-visible{
  border-color:#c6cacf;
  background:#fff;
}

.admin-panel-option--pending{
  cursor:default;
}

.admin-panel-option--pending:hover{
  border-color:#d6d9dc;
  background:rgba(255,255,255,.62);
}

.admin-panel-index{
  align-self:start;
  padding-top:4px;
  color:var(--carmim);
  font-size:10px;
  font-weight:800;
  letter-spacing:.10em;
}

.admin-panel-option-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:5px;
}

.admin-panel-option-copy strong{
  color:#292d30;
  font-size:14px;
  font-weight:720;
  line-height:1.2;
}

.admin-panel-option-copy span{
  color:#70777d;
  font-size:11px;
  line-height:1.4;
}

.admin-panel-arrow{
  color:#a4aab0;
  font-size:15px;
  line-height:1;
}

.admin-panel-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-top:18px;
  padding-top:13px;
  border-top:1px solid #d6d9dc;
  color:#8e959b;
  font-size:9px;
  letter-spacing:.03em;
}

@media (max-width:980px){
  .admin-login-layout{
    grid-template-columns:minmax(300px,37%) minmax(0,1fr);
  }

  .admin-login-brand{
    padding:48px 34px 34px;
  }

  .admin-login-content{
    padding:36px 38px;
  }

  .admin-panel-layout{
    padding:28px 24px 22px;
  }

  .admin-panel-heading h1{
    font-size:32px;
  }

  .admin-panel-option{
    min-height:96px;
  }
}

@media (max-width:980px) and (max-height:680px){
  .admin-login-brand{
    padding-top:30px;
    padding-bottom:26px;
  }

  .admin-login-brasao{
    width:78px;
    height:118px;
    margin-bottom:14px;
  }

  .admin-login-brand-title{
    font-size:44px;
  }

  .admin-login-brand-subtitle{
    margin-top:10px;
    font-size:15px;
  }

  .admin-login-brand-rule{
    margin:18px 0 12px;
  }

  .admin-login-content{
    padding-top:22px;
    padding-bottom:22px;
  }

  .admin-login-lead{
    margin:9px 0 15px;
  }

  .admin-login-divider{
    margin-bottom:17px;
  }

  .admin-login-form{
    gap:11px;
  }

  .admin-login-input,
  .admin-login-submit{
    min-height:44px;
  }

  .admin-login-note{
    margin-top:15px;
    padding-top:13px;
  }

  .admin-login-back{
    margin-top:20px;
  }
}

@media (max-width:720px){
  .admin-login-layout{
    display:block;
  }

  .admin-login-brand{
    min-height:auto;
    padding:30px 24px 26px;
  }

  .admin-login-brasao{
    width:64px;
    height:92px;
    margin-bottom:15px;
  }

  .admin-login-brand-title{
    font-size:42px;
  }

  .admin-login-brand-subtitle{
    margin-top:12px;
    font-size:15px;
  }

  .admin-login-brand-rule{
    margin:20px 0 14px;
  }

  .admin-login-brand-footer{
    margin-top:28px;
  }

  .admin-login-content{
    min-height:auto;
    padding:34px 24px 40px;
  }

  .admin-login-back{
    margin-top:32px;
  }

  .admin-panel-layout{
    padding:24px 16px 20px;
  }

  .admin-panel-top,
  .admin-panel-session,
  .admin-panel-section-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .admin-panel-head-actions{
    width:100%;
    justify-content:space-between;
    padding-top:0;
  }

  .admin-panel-content{
    padding:16px;
  }

  .admin-panel-grid{
    grid-template-columns:1fr;
  }

  .admin-panel-footer{
    align-items:flex-start;
    flex-direction:column;
    gap:6px;
  }
}

/* ==========================================================================
   C. MÓDULOS ADMINISTRATIVOS
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ESTRUTURA DOS MÓDULOS
   -------------------------------------------------------------------------- */

.admin-module-page{
  min-height:100vh;
  background:#f4f4f2;
  color:#202428;
}

.admin-module-layout{
  min-height:100vh;
}

.admin-module-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  padding:20px 0 16px;
}

.admin-modulo-legenda{
  margin-bottom:6px;
  color:var(--carmim);
  font-size:10px;
  font-weight:800;
  letter-spacing:.17em;
  text-transform:uppercase;
}

.admin-module-title{
  margin:0;
  color:#202428;
  font-size:24px;
  font-weight:740;
  letter-spacing:-.025em;
  line-height:1.15;
}

.admin-module-desc{
  margin:6px 0 0;
  color:#6f767c;
  font-size:12px;
  line-height:1.45;
}

.admin-workspace{
  min-height:508px;
  padding:18px;
  border:1px solid #dde0e2;
  background:rgba(255,255,255,.60);
}

.agenda-admin-page{
  min-height:100vh;
  padding:28px 16px 40px;
  background:#f4f4f2;
}

.agenda-admin-container{
  max-width:1260px;
  margin:0 auto;
}

.agenda-admin-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:20px;
}

.agenda-admin-top h1{
  margin:0 0 6px;
  color:#202428;
  font-size:30px;
}

.agenda-admin-top p{
  margin:0;
  color:#6f767c;
  line-height:1.5;
}

.agenda-admin-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.admin-users-grid{
  grid-template-columns:.76fr 1.24fr;
}

.admin-birthday-grid{
  grid-template-columns:.68fr 1.32fr;
}

.admin-form-one{
  grid-template-columns:1fr;
}

/* --------------------------------------------------------------------------
   2. PAINÉIS, FORMULÁRIOS E AÇÕES
   -------------------------------------------------------------------------- */

.agenda-admin-panel{
  position:relative;
  min-width:0;
  padding:18px;
  border:1px solid #d9dde0;
  border-radius:0;
  background:#fff;
  box-shadow:none;
}

.admin-panel-accent{
  border-left:3px solid var(--carmim);
}

.admin-panel-tag{
  float:right;
  padding-top:2px;
  color:var(--carmim);
  font-size:9px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.agenda-admin-panel h2{
  margin:0 0 4px;
  color:#2b2f33;
  font-size:16px;
  font-weight:750;
}

.agenda-admin-panel > p{
  margin:0 0 14px;
  color:#727980;
  font-size:11px;
  line-height:1.4;
}

.agenda-admin-form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:11px 12px;
}

.agenda-admin-form > .agenda-admin-field:has(textarea),
.agenda-admin-form > .agenda-admin-photo-preview,
.agenda-admin-form > .agenda-admin-photo-actions,
.agenda-admin-form > .agenda-admin-message,
.agenda-admin-form > .agenda-admin-actions{
  grid-column:1 / -1;
}

.agenda-admin-field label{
  display:block;
  margin-bottom:5px;
  color:#4e555b;
  font-size:9px;
  font-weight:800;
  letter-spacing:.11em;
  text-transform:uppercase;
}

.agenda-admin-input,
.agenda-admin-textarea{
  width:100%;
  min-height:38px;
  padding:8px 10px;
  border:1px solid #cfd4d8;
  border-radius:0;
  background:#fff;
  color:#282d31;
  font:inherit;
  font-size:12px;
  transition:border-color .2s ease,box-shadow .2s ease;
}

.agenda-admin-input:focus,
.agenda-admin-textarea:focus{
  outline:none;
  border-color:var(--carmim);
  box-shadow:0 0 0 2px rgba(185,28,28,.10);
}

.agenda-admin-textarea{
  min-height:74px;
  resize:vertical;
  line-height:1.4;
}

.agenda-admin-actions,
.agenda-admin-photo-actions,
.agenda-admin-item-actions,
.banner-admin-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.agenda-admin-btn,
.agenda-admin-link,
.agenda-admin-mini{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 13px;
  border:0;
  border-radius:0;
  background:#17191b;
  color:#fff;
  font:inherit;
  font-size:9px;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease,color .2s ease;
}

.agenda-admin-btn:hover,
.agenda-admin-link:hover,
.agenda-admin-mini:hover{
  background:var(--carmim);
  transform:none;
}

.agenda-admin-btn.secondary{
  border:1px solid #cfd4d8;
  background:#fff;
  color:#545b61;
}

.agenda-admin-btn.secondary:hover{
  border-color:var(--carmim);
  background:#fff;
  color:var(--carmim);
}

.agenda-admin-btn:focus-visible,
.agenda-admin-link:focus-visible,
.agenda-admin-mini:focus-visible{
  outline:2px solid var(--carmim);
  outline-offset:3px;
}

.agenda-admin-btn:disabled,
.agenda-admin-mini:disabled{
  opacity:.55;
  cursor:wait;
}

.agenda-admin-message{
  min-height:18px;
  color:#0d6b34;
  font-size:11px;
  font-weight:700;
  line-height:1.4;
}

.agenda-admin-message.is-error{
  color:#a51414;
}

.agenda-admin-photo-preview{
  display:block;
  width:106px;
  max-width:100%;
  height:112px;
  margin:0;
  object-fit:cover;
  object-position:center top;
  border:1px solid #d4d8dc;
  border-radius:0;
  background:#eef0f2;
  box-shadow:none;
}

.agenda-admin-photo-actions{
  margin-top:0;
}

.agenda-admin-photo-note{
  color:#7a8187;
  font-size:10px;
  line-height:1.4;
}

.agenda-date-hint{
  margin-top:6px;
  color:#7c8389;
  font-size:10px;
  line-height:1.45;
}

/* Seletor de data da agenda (calendário em popover) */
.agenda-date-picker{
  position:relative;
}

.agenda-date-display{
  width:100%;
  min-height:44px;
  padding:4px 6px 4px 12px;
  border:1px solid #d7d9dd;
  border-radius:10px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  transition:border-color .18s ease, box-shadow .18s ease;
}

.agenda-date-display:hover,
.agenda-date-display:focus-within,
.agenda-date-display.is-open{
  border-color:var(--carmim);
  box-shadow:0 0 0 3px rgba(185,28,28,.10);
}

.agenda-date-display-text{
  flex:1;
  min-width:0;
  width:100%;
  border:none;
  outline:none;
  background:transparent;
  color:#222;
  font:inherit;
  font-weight:600;
  font-size:14px;
}

.agenda-date-display-icon{
  flex:0 0 auto;
  width:34px;
  height:34px;
  border:none;
  border-radius:8px;
  background:var(--carmim);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.agenda-date-display-icon:hover{
  background:#111;
}

.agenda-date-popover{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  width:min(320px,100%);
  background:#fff;
  border:1px solid #e1e4e8;
  border-radius:14px;
  box-shadow:0 22px 44px rgba(0,0,0,.14);
  padding:14px;
  z-index:30;
  display:none;
}

.agenda-date-popover.open{
  display:block;
}

.agenda-date-popover-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}

.agenda-date-popover-month{
  flex:1;
  text-align:center;
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.8px;
  color:#111;
}

.agenda-date-nav{
  width:32px;
  height:32px;
  border:none;
  border-radius:50%;
  background:#111;
  color:#fff;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}

.agenda-date-nav:hover{
  background:var(--carmim);
}

.agenda-date-weekdays,
.agenda-date-days{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:5px;
}

.agenda-date-weekdays{
  margin-bottom:6px;
}

.agenda-date-weekdays span{
  text-align:center;
  font-size:10px;
  font-weight:800;
  color:#888;
  text-transform:uppercase;
}

.agenda-date-day,
.agenda-date-empty{
  aspect-ratio:1;
  border-radius:8px;
}

.agenda-date-day{
  padding:0;
  border:none;
  background:#f2f3f5;
  color:#222;
  font:inherit;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}

.agenda-date-day:hover{
  background:#111;
  color:#fff;
}

.agenda-date-day.is-today{
  box-shadow:inset 0 0 0 2px #111;
}

.agenda-date-day.is-selected{
  background:var(--carmim);
  color:#fff;
}

/* --------------------------------------------------------------------------
   3. BANNERS
   -------------------------------------------------------------------------- */

.banner-admin-panel{
  grid-column:1 / -1;
}

.banner-admin-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}

.banner-admin-card{
  position:relative;
  min-width:0;
  min-height:195px;
  padding:10px;
  border:1px solid #d9dde0;
  border-radius:0;
  background:#fff;
}

.banner-admin-card::before{
  content:"";
  position:absolute;
  top:-1px;
  bottom:-1px;
  left:-1px;
  width:2px;
  background:var(--carmim);
}

.banner-admin-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:7px;
}

.banner-admin-card-head strong{
  font-size:12px;
}

.banner-admin-status{
  flex-shrink:0;
  color:#758087;
  font-size:8px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.banner-admin-status.is-active{
  color:#368754;
}

.banner-admin-preview-box{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:78px;
  padding:0;
  overflow:hidden;
  border:1px solid #d9dde0;
  border-radius:0;
  background:#eef0f2;
  cursor:pointer;
}

.banner-admin-preview{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.banner-admin-preview[hidden],
.banner-admin-placeholder[hidden]{
  display:none;
}

.banner-admin-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  padding:12px;
  color:#9aa0a5;
  font-size:9px;
  text-align:center;
}

.banner-admin-check{
  display:flex;
  align-items:center;
  gap:6px;
  margin:7px 0;
  color:#666e74;
  font-size:9px;
}

.banner-admin-actions{
  gap:5px;
  margin-top:0;
}

.banner-admin-actions .agenda-admin-btn{
  min-height:28px;
  padding:0 8px;
  font-size:8px;
}

.banner-admin-message{
  margin-top:7px;
  font-size:9px;
}

/* --------------------------------------------------------------------------
   4. USUÁRIOS
   -------------------------------------------------------------------------- */

.admin-users-current{
  margin:5px 0 0;
  color:#747c82;
  font-size:10px;
}

.admin-users-current strong{
  color:#34393d;
}

.admin-users-create-btn{
  align-self:start;
  justify-self:start;
  min-width:132px;
  min-height:38px;
  height:38px;
  margin-top:18px;
  padding:0 18px;
}

.admin-users-message{
  margin-top:8px;
}

.admin-users-list,
.agenda-admin-list{
  display:grid;
  gap:9px;
  margin-top:8px;
}

.agenda-admin-item{
  padding:11px 12px;
  border:1px solid #d9dde0;
  border-radius:0;
  background:#fff;
}

.agenda-admin-item-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.agenda-admin-date{
  margin-bottom:3px;
  color:var(--carmim);
  font-size:8px;
  font-weight:800;
  letter-spacing:.11em;
  text-transform:uppercase;
}

.agenda-admin-title{
  margin-bottom:3px;
  color:#202428;
  font-size:12px;
  font-weight:740;
}

.agenda-admin-text{
  color:#757d83;
  font-size:10px;
  line-height:1.4;
}

.admin-users-status{
  flex-shrink:0;
  padding:0;
  background:transparent;
  color:#8e444c;
  font-size:9px;
  font-weight:800;
  letter-spacing:0;
  text-transform:none;
}

.admin-users-status.is-active{
  background:transparent;
  color:#368754;
}

.admin-users-item .agenda-admin-item-actions{
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid #eceeef;
}

.agenda-admin-mini{
  min-height:28px;
  padding:0 8px;
  font-size:8px;
}

.agenda-admin-empty{
  padding:16px 0;
  color:#777;
  font-size:12px;
  line-height:1.5;
}

/* --------------------------------------------------------------------------
   5. ANIVERSARIANTES ADMINISTRATIVOS
   -------------------------------------------------------------------------- */

.admin-birthday-upload{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:178px;
  margin-top:12px;
  padding:20px;
  border:1px dashed #bbc1c5;
  background:#fafafa;
  text-align:center;
}

.admin-birthday-upload strong{
  display:block;
  margin-bottom:6px;
  font-size:13px;
}

.admin-birthday-upload span{
  display:block;
  color:#7b8288;
  font-size:10px;
  line-height:1.45;
}

.admin-birthday-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.admin-birthday-empty{
  grid-column:1 / -1;
  margin:0;
  color:#7b8288;
  font-size:11px;
  line-height:1.5;
}

.admin-photo-card{
  min-width:0;
  padding:8px;
  border:1px solid #d9dde0;
  background:#fff;
}

.admin-photo-card img{
  display:block;
  width:100%;
  height:110px;
  object-fit:contain;
  background:#f1f2f2;
}

.admin-photo-card-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:7px;
}

.admin-photo-card-footer strong{
  color:var(--carmim);
  font-size:9px;
  font-weight:800;
}

.admin-photo-remove{
  padding:0;
  border:0;
  background:transparent;
  color:#687078;
  font:inherit;
  font-size:9px;
  font-weight:700;
  cursor:pointer;
}

.admin-photo-remove:hover{
  color:var(--carmim);
}

.admin-birthday-note{
  margin-top:10px;
  color:#7c8389;
  font-size:9px;
  line-height:1.45;
}

/* --------------------------------------------------------------------------
   6. AVISOS DA HOME
   -------------------------------------------------------------------------- */

.admin-notice-grid{
  display:grid;
  grid-template-columns:minmax(0,.95fr) minmax(0,1.15fr);
  gap:12px;
  align-items:start;
}

.admin-notice-editor-panel{
  grid-row:span 2;
}

.admin-notice-form{
  grid-template-columns:1fr 1fr;
}

.admin-notice-title-field,
.admin-notice-editor-field,
.admin-notice-form-actions,
#homeNoticeAdminMessage{
  grid-column:1 / -1;
}

.admin-notice-editor-label-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
}

.admin-notice-editor{
  min-height:210px;
  max-height:360px;
  padding:12px;
  overflow:auto;
  border:1px solid #cfd4d8;
  background:#fff;
  color:#30353a;
  font-size:12px;
  line-height:1.6;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.admin-notice-editor:focus{
  outline:none;
  border-color:var(--carmim);
  box-shadow:0 0 0 2px rgba(185,28,28,.10);
}

.admin-notice-editor:empty::before{
  content:attr(data-placeholder);
  color:#969da2;
  pointer-events:none;
}

.admin-notice-editor a{
  color:var(--carmim);
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:2px;
}

.admin-notice-editor-help{
  margin:7px 0 0;
  color:#7c8389;
  font-size:9px;
  line-height:1.45;
}

.admin-notice-list{
  display:grid;
  gap:9px;
  margin-top:10px;
}

.admin-notice-card{
  padding:11px 12px;
  border:1px solid #d9dde0;
  background:#fff;
}

.admin-notice-card.is-archived{
  background:#f8f8f7;
}

.admin-notice-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.admin-notice-card-head > div{
  min-width:0;
}

.admin-notice-card-head strong,
.admin-notice-card > strong{
  display:block;
  color:#202428;
  font-size:12px;
  line-height:1.35;
}

.admin-notice-order{
  display:block;
  margin-bottom:3px;
  color:var(--carmim);
  font-size:8px;
  font-weight:800;
  letter-spacing:.10em;
}

.admin-notice-status{
  flex-shrink:0;
  color:#9a7218;
  font-size:8px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.admin-notice-status.is-active{
  color:#368754;
}

.admin-notice-period,
.admin-notice-archived-at{
  margin:6px 0 0;
  color:#727a80;
  font-size:9px;
  line-height:1.45;
}

.admin-notice-preview{
  display:-webkit-box;
  margin:7px 0 0;
  overflow:hidden;
  color:#626b71;
  font-size:10px;
  line-height:1.45;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
}

.admin-notice-actions{
  margin-top:9px;
  padding-top:8px;
  border-top:1px solid #eceeef;
}

.admin-link-dialog[hidden]{
  display:none;
}

.admin-link-dialog{
  position:fixed;
  inset:0;
  z-index:100100;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(18,21,23,.42);
}

.admin-link-dialog-panel{
  width:min(520px,100%);
  padding:20px;
  border:1px solid #ccd1d4;
  background:#fff;
  box-shadow:0 22px 54px rgba(0,0,0,.22);
}

.admin-link-dialog-head{
  margin-bottom:16px;
}

.admin-link-dialog-head h2{
  margin:7px 0 0;
  color:#202428;
  font-size:18px;
}

.admin-link-dialog-panel .agenda-admin-field + .agenda-admin-field{
  margin-top:12px;
}

.admin-link-dialog-actions{
  justify-content:flex-end;
  margin-top:16px;
}

.agenda-admin-btn.danger{
  border:1px solid #d6b6bb;
  background:#fff;
  color:#962c38;
}

.agenda-admin-btn.danger:hover{
  border-color:#962c38;
  background:#962c38;
  color:#fff;
}

/* --------------------------------------------------------------------------
   7. ESTADOS COMPARTILHADOS
   -------------------------------------------------------------------------- */

.admin-shared-header-error{
  margin:0;
  padding:16px;
  border:1px solid #d7b7bd;
  background:#fff;
  color:#8e2833;
  font-size:12px;
  font-weight:700;
}

/* --------------------------------------------------------------------------
   8. RESPONSIVO
   -------------------------------------------------------------------------- */

@media (max-width:980px){
  .agenda-admin-grid,
  .admin-users-grid,
  .admin-birthday-grid,
  .admin-notice-grid{
    grid-template-columns:1fr;
  }

  .banner-admin-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .admin-workspace{
    min-height:0;
  }
}

@media (max-width:720px){
  .admin-module-head{
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }

  .agenda-admin-form{
    grid-template-columns:1fr;
  }

  .agenda-admin-form > .agenda-admin-field{
    grid-column:1;
  }

  .admin-users-create-btn{
    margin-top:0;
  }

  .banner-admin-grid{
    grid-template-columns:1fr 1fr;
  }

  .admin-birthday-list{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:480px){
  .banner-admin-grid,
  .admin-birthday-list{
    grid-template-columns:1fr;
  }
}

/* ==========================================================================
   D. MÓDULOS DESABILITADOS — própria da ESSd
   --------------------------------------------------------------------------
   js/admin-modules.js define quais módulos estão ativos. No painel, o card
   de um módulo desabilitado fica apagado e sem link; a página do módulo,
   se aberta direto pela URL, mostra só o aviso abaixo.
   ========================================================================== */

.admin-panel-option.is-disabled{
  opacity:.55;
  cursor:not-allowed;
  filter:grayscale(1);
}

.admin-panel-option.is-disabled:hover,
.admin-panel-option.is-disabled:focus-visible{
  transform:none;
  box-shadow:none;
}

.admin-panel-badge{
  display:inline-block;
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  background:#e7e7e4;
  color:#55595d;
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  vertical-align:middle;
}

.admin-module-disabled{
  max-width:640px;
  margin:48px auto;
  padding:32px 28px;
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  text-align:center;
}

.admin-module-disabled h2{
  margin-bottom:12px;
  font-size:22px;
  color:#202428;
}

.admin-module-disabled p{
  margin-bottom:20px;
  color:#55595d;
  line-height:1.5;
}

.admin-module-disabled a{
  display:inline-block;
  padding:10px 18px;
  border-radius:10px;
  background:var(--carmim);
  color:#fff;
  font-weight:700;
}
