/* Reparos do tema escuro: componentes legíveis sem alterar as regras de acesso. */
body.tema-cinemateca .main-content { min-width:0; }
body.tema-cinemateca .main-content a:where(:not([class]):not([style])),
body.tema-cinemateca .main-content a:where(:not([class]):not([style])):visited { color:#f2d1a6; text-underline-offset:4px; }
body.tema-cinemateca .main-content a:where(:not([class]):not([style])):hover { color:#fff7e9; }
body.tema-cinemateca .main-content a:focus-visible,
body.tema-cinemateca .main-content button:focus-visible,
body.tema-cinemateca .ui-table-scroll:focus-visible { outline:3px solid #edc695; outline-offset:4px; }
body.tema-cinemateca .main-content input:where([type=number],[type=date],[type=datetime-local],[type=url],[type=tel]) {
  box-sizing:border-box; max-width:100%; min-height:44px; padding:.65rem .75rem;
  background:#28261f; color:#f7f3ec; border:1px solid #8c8270; border-radius:8px; font:inherit; color-scheme:dark;
}
body.tema-cinemateca .main-content input:disabled { color:#d6cfc3; opacity:1; }
body.tema-cinemateca .main-content input[type=checkbox] { accent-color:#dfbd8d; }
/* Perfil: campos em uma coluna legível e upload sem rótulo espremido. */
body.tema-cinemateca .profile-edit-page form.box { box-sizing:border-box; width:100%; max-width:760px; padding:1.5rem; border-radius:12px; border:1px solid #736a5a; background:#292720; }
body.tema-cinemateca .profile-edit-page .profile-badges-help { color:#e0d8cc; font-size:.88rem; line-height:1.65; margin:.75rem 0 1.4rem; }
body.tema-cinemateca .profile-edit-page .profile-avatar-preview { align-items:center; gap:1rem; }
body.tema-cinemateca .avatar-upload-fields { flex:1; min-width:200px; }
body.tema-cinemateca .avatar-upload-fields label { display:block; margin:0 0 .5rem; }
body.tema-cinemateca .avatar-upload-fields input { width:100%; max-width:100%; font:inherit; font-size:.85rem; line-height:1.5; }
body.tema-cinemateca .avatar-upload-fields input::file-selector-button { margin:0 .65rem .4rem 0; padding:.65rem .8rem; border:1px solid #9f917b; border-radius:7px; background:#403b31; color:#fff6e7; font:inherit; cursor:pointer; }
body.tema-cinemateca .profile-edit-page fieldset { min-width:0; border-radius:9px; }
body.tema-cinemateca .profile-header { align-items:flex-start; }
body.tema-cinemateca .profile-header > div { min-width:0; }
body.tema-cinemateca .profile-header h1 { overflow-wrap:anywhere; line-height:1.25; }
body.tema-cinemateca .profile-header .profile-area { color:#e3dbce; line-height:1.7; }
/* Etapas de integração: todos os estados compartilham o mesmo tema. */
body.tema-cinemateca .onboarding-progress,
body.tema-cinemateca .onboarding-step { background:#292720; border:1px solid #756c5b; border-radius:12px; color:#f7f3ec; }
body.tema-cinemateca .onboarding-step.is-done { background:#30382c; border-color:#829275; }
body.tema-cinemateca .onboarding-progress strong,
body.tema-cinemateca .onboarding-step h2 { color:#f7f3ec; }
body.tema-cinemateca .onboarding-step p { color:#e1d9cd; line-height:1.65; }
body.tema-cinemateca .onboarding-step-number { border-color:#b7c4a8; color:#f7f3ec; }
body.tema-cinemateca .is-done .onboarding-step-number { background:#cad8b9; color:#283025; }
body.tema-cinemateca .onboarding-done { color:#d4e6c1; }
body.tema-cinemateca .onboarding-progress-bar { background:#555a4c; border-radius:8px; overflow:hidden; }
body.tema-cinemateca .onboarding-progress-bar span { background:#cad8b9; }
body.tema-cinemateca .onboarding-step a.button-link,
body.tema-cinemateca .onboarding-step a.button-link:visited { background:#f7f3ec; color:#26241f; border-radius:7px; padding:.7rem 1rem; min-height:44px; box-sizing:border-box; text-align:center; }
/* Avisos da conta: manter leitura e hierarquia no mesmo fundo escuro. */
body.tema-cinemateca .notification-item { background:#292720; border:1px solid #756c5b; border-radius:10px; color:#f7f3ec; }
body.tema-cinemateca .notification-item.is-unread { border-left:4px solid #c7d6b6; }
body.tema-cinemateca .notification-item strong { color:#fff6e8; }
body.tema-cinemateca .notification-item p { color:#e3dbce; line-height:1.65; }
body.tema-cinemateca .notification-item span { color:#d8cfbf; }
body.tema-cinemateca .notification-item a,
body.tema-cinemateca .notification-item a:visited { color:#f2d1a6; text-decoration:underline; text-underline-offset:4px; }
/* Botões com fundo claro sempre recebem texto escuro, inclusive os downloads do admin. */
body.admin-interface.tema-cinemateca .main-content a.btn,
body.admin-interface.tema-cinemateca .main-content a.btn:visited { display:inline-flex; justify-content:center; align-items:center; min-height:44px; box-sizing:border-box; background:#f7f3ec; color:#26241f; border:1px solid #f7f3ec; border-radius:8px; padding:.7rem 1rem; text-decoration:none; }
body.tema-cinemateca .btn-acao-verde,
body.tema-cinemateca .btn-acao-verde:visited { background:#3c4a39; border-color:#9ba98c; color:#fff7e9; }
body.tema-cinemateca .btn-acao-verde:hover { background:#4a5c44; color:#fff7e9; }
body.tema-cinemateca .verification-card { padding:1.4rem; border-radius:12px; }
body.tema-cinemateca .verification-card .btn { margin:.4rem .5rem .3rem 0; }
/* Tabelas largas ficam contidas; formulários não empurram a página lateralmente. */
body.tema-cinemateca .ui-table-scroll { max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch; margin:1rem 0; border:1px solid #736b5c; border-radius:10px; }
body.tema-cinemateca .ui-table-scroll table { min-width:600px; margin:0; }
body.tema-cinemateca .admin-recording,
body.tema-cinemateca .admin-attachments { flex-wrap:wrap; gap:.75rem; }
body.tema-cinemateca .admin-attachments label { flex:1 1 100%; }
body.tema-cinemateca .admin-attachments input { min-width:0; }
body.tema-cinemateca .cases-admin-page .nota,
body.tema-cinemateca .cases-admin-page .resumo span { color:#e0d6c8; }
body.tema-cinemateca .cases-admin-page .resumo div { background:#292720; border:1px solid #736b5c; }
body.tema-cinemateca .cases-admin-page .resumo strong,
body.tema-cinemateca .cases-admin-page details summary { color:#f2d1a6; }
body.tema-cinemateca .cases-admin-page .ja { opacity:1; }
body.tema-cinemateca .cases-admin-page .ja td { color:#d6cebf; }
@media(max-width:760px) {
  body.tema-cinemateca .profile-edit-page form.box { padding:1rem; }
  body.tema-cinemateca .onboarding-step { gap:.8rem; padding:1rem; }
  body.tema-cinemateca .notification-item { align-items:flex-start; }
  body.tema-cinemateca .admin-table-wrap:has(.mobile-stack-table) { border:0; overflow:visible; }
  body.admin-interface.tema-cinemateca .mobile-stack-table { display:block; width:100%; min-width:0; background:transparent; }
  body.admin-interface.tema-cinemateca .mobile-stack-table tbody { display:block; }
  body.admin-interface.tema-cinemateca .mobile-stack-table tr { display:grid; gap:.8rem; padding:1rem; margin:0 0 .85rem; background:#292720; border:1px solid #736b5c; border-radius:10px; }
  body.admin-interface.tema-cinemateca .mobile-stack-table tr:has(> th) { display:none; }
  body.admin-interface.tema-cinemateca .mobile-stack-table td { display:block; padding:0; width:auto; min-width:0; border:0; overflow-wrap:anywhere; }
  body.admin-interface.tema-cinemateca .mobile-stack-table td[data-label]::before { content:attr(data-label); display:block; color:#f2d1a6; font-size:.78rem; font-weight:700; margin-bottom:.3rem; }
  body.admin-interface.tema-cinemateca .mobile-stack-table .admin-attachment-row td { background:transparent; }
  body.admin-interface.tema-cinemateca .mobile-stack-table .admin-attachments,
  body.admin-interface.tema-cinemateca .mobile-stack-table .admin-recording { display:flex; flex-direction:column; align-items:stretch; }
  body.admin-interface.tema-cinemateca .mobile-stack-table input,
  body.admin-interface.tema-cinemateca .mobile-stack-table button { width:100%; min-width:0; box-sizing:border-box; }
  body.admin-interface.tema-cinemateca .mobile-stack-table ul { padding-left:1.2rem; }
}
body.tema-cinemateca .onboarding-step.is-done .onboarding-step-number { background:#cad8b9; color:#283025; border-color:#cad8b9; }
/* Ajustes específicos para toque e leitura em celulares (320–760px). */
.mobile-explore-hint { display:none; }
@media(max-width:760px) {
  body.tema-cinemateca .main-content:not(.cin-main) { padding-left:1rem; padding-right:1rem; }
  body.tema-cinemateca .main-content input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]),
  body.tema-cinemateca .main-content textarea,
  body.tema-cinemateca .main-content select { font-size:16px; }
  body.tema-cinemateca .main-content select { min-height:48px; max-width:100%; padding:.7rem .75rem; box-sizing:border-box; border-radius:8px; line-height:1.4; }
  body.tema-cinemateca .profile-edit-page form.box select { display:block; width:100%; }
  body.tema-cinemateca .profile-edit-page .directory-optin { padding:.8rem; }
  body.tema-cinemateca .profile-edit-page .checkbox-label { min-height:44px; padding:.35rem 0; box-sizing:border-box; line-height:1.5; }
  body.tema-cinemateca .profile-edit-page .checkbox-label input[type=checkbox] { flex:0 0 20px; width:20px; height:20px; }
  body.tema-cinemateca .avatar-upload-fields { min-width:0; flex-basis:100%; }
  body.tema-cinemateca .avatar-upload-fields input::file-selector-button { min-height:44px; font-size:16px; }
  body.tema-cinemateca .profile-badges-help a { display:inline-flex; align-items:center; min-height:44px; }
  body.tema-cinemateca .main-content .like-btn,
  body.tema-cinemateca .main-content .subtle-action,
  body.tema-cinemateca .main-content .session-back { display:inline-flex; align-items:center; justify-content:center; min-height:44px; box-sizing:border-box; padding:.6rem .8rem; line-height:1.4; font-size:.9rem; margin:.25rem .25rem .25rem 0; }
  body.tema-cinemateca .author-link { min-height:44px; }
  body.tema-cinemateca .notification-item a { display:inline-flex; align-items:center; justify-content:center; min-width:60px; min-height:44px; border:1px solid #8b7960; border-radius:7px; padding:0 .8rem; box-sizing:border-box; }
  body.tema-cinemateca .directory-page .directory-profile-link,
  body.tema-cinemateca .directory-page .directory-filter-actions a { display:inline-flex; align-items:center; min-height:44px; }
  body.tema-cinemateca .directory-page .directory-filters select { font-size:16px; }
  body.tema-cinemateca .app-layout > .sidebar a { min-height:44px; box-sizing:border-box; }
  body.tema-cinemateca .cin-fila-head { flex-wrap:wrap; gap:.5rem; }
  body.tema-cinemateca .mobile-explore-hint { display:block; flex-basis:100%; margin:0; font-size:.82rem; color:#e4dbcd; }
  body.tema-cinemateca .cin-tira { scroll-padding-inline:1.25rem; overscroll-behavior-inline:contain; padding-bottom:.8rem; }
  body.tema-cinemateca .cin-tira::-webkit-scrollbar-thumb { background:#b4a58b; border-radius:6px; }
  body.tema-cinemateca .profile-header .avatar { flex-shrink:0; }
}
@media(max-width:360px) {
  body.tema-cinemateca .profile-edit-page form.box { padding:.85rem; }
  body.tema-cinemateca .profile-header { flex-wrap:wrap; }
  body.tema-cinemateca .onboarding-step { grid-template-columns:26px minmax(0,1fr); gap:.6rem; padding:.85rem; }
  body.tema-cinemateca .onboarding-step h2 { font-size:1.15rem; }
}
@media(max-width:760px) {
  body.tema-cinemateca .main-content button { min-height:44px; box-sizing:border-box; line-height:1.4; }
  body.admin-interface.tema-cinemateca button.mobile-nav-toggle { width:44px; height:44px; min-height:44px; background:transparent; border:1px solid #a59a85; color:#f7f3ec; }
  body.admin-interface.tema-cinemateca button.mobile-nav-toggle:hover { background:#403b31; }
}
@media(max-width:760px) {
  body.admin-interface.tema-cinemateca #mobileNavToggle { background:transparent; border-color:#a59a85; color:#f7f3ec; }
  body.admin-interface.tema-cinemateca #mobileNavToggle:hover { background:#403b31; }
}
/* Preservar largura útil: respiro lateral curto e sem somar grandes recuos. */
@media(max-width:760px) {
  body.tema-cinemateca .main-content:not(.cin-main) { padding-left:10px; padding-right:10px; }
  body.tema-cinemateca .profile-edit-page form.box { padding:12px; }
  body.tema-cinemateca .profile-edit-page fieldset { margin-left:0; margin-right:0; padding-left:10px; padding-right:10px; }
  body.tema-cinemateca .profile-edit-page .directory-optin { padding-left:10px; padding-right:10px; }
  body.tema-cinemateca .directory-page .directory-filters,
  body.tema-cinemateca .directory-page .directory-card { padding-left:12px; padding-right:12px; }
  body.tema-cinemateca .onboarding-step,
  body.tema-cinemateca .onboarding-progress,
  body.tema-cinemateca .notification-item,
  body.tema-cinemateca .verification-card,
  body.tema-cinemateca .thread-post,
  body.tema-cinemateca .thread-reply { padding-left:12px; padding-right:12px; }
  body.tema-cinemateca .hub-onboarding { margin-left:10px; margin-right:10px; padding-left:12px; padding-right:12px; }
  body.tema-cinemateca .cin-retomada,
  body.tema-cinemateca .cin-fila-head,
  body.tema-cinemateca .cin-tira { padding-left:10px; padding-right:10px; }
  body.tema-cinemateca .cin-tira { scroll-padding-inline:10px; }
  body.tema-cinemateca .aviso-banner-acao { padding-left:12px; padding-right:12px; }
  body.admin-interface.tema-cinemateca .mobile-stack-table tr { padding-left:12px; padding-right:12px; }
}
/* O padding do body vinha do formulário de login e somava 16px por lado às telas internas. */
@media(max-width:760px) {
  body.tema-cinemateca { padding:0; margin:0; }
  body.tema-cinemateca .app-layout { width:100%; margin:0; }
  body.tema-cinemateca .main-content { width:100%; max-width:none; }
}
/* A moderação é uma ação principal da equipe, com aviso contextual e contador. */
body.tema-cinemateca .sidebar a.nav-moderation { display:flex; align-items:center; gap:.6rem; margin:.75rem 0; padding:.75rem; border:1px solid #bda079; border-radius:8px; background:#463d2e; color:#fff4df; font-weight:700; }
body.tema-cinemateca .moderation-count { display:inline-flex; align-items:center; justify-content:center; min-width:25px; height:25px; padding:0 .4rem; border-radius:20px; background:#f4d1a0; color:#28231a; font-size:.8rem; font-weight:700; }
body.tema-cinemateca .moderation-count[hidden], body.tema-cinemateca .moderation-notice[hidden] { display:none; }
body.tema-cinemateca .moderation-notice { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem; padding:1rem 1.15rem; margin:0 0 1.25rem; background:#423b2e; border:1px solid #c2a171; border-radius:10px; color:#fff5e5; }
body.tema-cinemateca .moderation-notice strong { color:#fff5e5; }
body.tema-cinemateca .moderation-notice p { margin:.35rem 0 0; color:#efe0cb; line-height:1.5; font-size:.9rem; }
body.tema-cinemateca .moderation-notice a, body.tema-cinemateca .moderation-notice a:visited { display:inline-flex; gap:.5rem; align-items:center; justify-content:center; min-height:44px; padding:.65rem 1rem; border-radius:7px; background:#f7eddb; color:#28231a; font-weight:700; text-decoration:none; }
body.tema-cinemateca .cin-main > .moderation-notice { margin:1rem; }
body.tema-cinemateca .moderation-notification { margin:1rem 0; }
@media(max-width:760px) { body.tema-cinemateca .moderation-notice { padding:12px; } body.tema-cinemateca .cin-main > .moderation-notice { margin:10px; } body.tema-cinemateca .moderation-notice a { width:100%; } }
body.tema-cinemateca [data-staff-notification-count][hidden] { display:none; }
