body{font-family:var(--app-font,Arial),sans-serif;font-size:var(--app-size,16px);color:var(--app-text,var(--ink))}.hero{background:linear-gradient(120deg,var(--app-accent,#7e0d1b),var(--app-hero,#d8293b))}.banner-preview{display:block;width:100%;max-height:180px;object-fit:cover;border:1px solid var(--line);border-radius:8px;margin-top:10px}.theme-tvk{--app-accent:#b5121b!important;--app-hero:#d5ad32!important;--app-text:#201a1a!important;--red:#b5121b;--red-dark:#780b12;--canvas:#fffaf0}.theme-tvk .topbar{border-bottom:4px solid #d5ad32}.theme-tvk .brand span{background:#b5121b;border:2px solid #d5ad32}.theme-tvk .card,.theme-tvk .table-wrap{border-color:#e2cf92}.theme-tvk footer{border-top:4px solid #d5ad32}@media(min-width:801px) and (max-width:1024px){.nav-toggle{display:block;position:absolute;right:22px;top:13px}.topbar{position:relative;padding:12px 22px;align-items:flex-start;flex-direction:row}.topbar nav{display:none;width:100%;flex-direction:column;align-items:flex-start;gap:11px;padding:10px 0 2px}.topbar nav.nav-open{display:flex}.topbar .brand{max-width:calc(100% - 70px)}}
/* Keep the responsive navigation row visible even when a theme is active. */
@media (max-width:1024px){
  .topbar{display:grid;grid-template-columns:1fr;align-items:center;gap:10px;padding:12px 22px;position:relative}
  .topbar .brand{max-width:none;min-width:0}
  .nav-toggle{display:none!important}
  .topbar nav{display:flex!important;width:100%;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;padding:10px 0 0;border-top:1px solid var(--line);flex-wrap:wrap}
  .topbar nav a,.topbar nav .logout-form button{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:999px;background:var(--surface,#fff);color:var(--ink);padding:7px 11px;font-size:13px;line-height:1.25;text-decoration:none;white-space:nowrap}
  .topbar nav a:hover,.topbar nav .logout-form button:hover{border-color:var(--app-accent,var(--red));color:var(--app-accent,var(--red));background:var(--surface,#fff)}
  .topbar nav .logout-form{margin:0}
  .theme-midnight .topbar nav a,.theme-midnight .topbar nav .logout-form button{color:#edf2ff;border-color:#455271;background:#182136}
  .theme-forest .topbar nav a,.theme-forest .topbar nav .logout-form button{color:#18352c;border-color:#cce0d4;background:#f2f7f3}
  .theme-royal .topbar nav a,.theme-royal .topbar nav .logout-form button{color:#31234c;border-color:#ded4f0;background:#f7f4fc}
}
@media (max-width:600px){
  .topbar{padding:10px 15px}
  .topbar nav{gap:6px;padding-top:9px}
  .topbar nav a,.topbar nav .logout-form button{padding:7px 9px;font-size:12px}
}
/* Theme templates override saved appearance variables so the selected template changes the complete interface. */
.theme-tvk{--app-accent:#b5121b!important;--app-hero:#d5ad32!important;--app-text:#201a1a!important;--ink:#201a1a!important;--canvas:#fffaf0!important;--surface:#fffdf5!important;--line:#e2cf92!important;--red:#b5121b!important;--red-dark:#780b12!important}
.theme-midnight{--app-accent:#6f86f5!important;--app-hero:#394da9!important;--app-text:#edf2ff!important;--ink:#edf2ff!important;--canvas:#131927!important;--surface:#202a3e!important;--line:#34415f!important;--red:#5b70d6!important;--red-dark:#394da9!important;--muted:#b7c1dc!important}
.theme-forest{--app-accent:#1f8066!important;--app-hero:#125944!important;--app-text:#18352c!important;--ink:#18352c!important;--canvas:#f2f7f3!important;--surface:#ffffff!important;--line:#cce0d4!important;--red:#1f8066!important;--red-dark:#125944!important;--muted:#5a7067!important}
.theme-royal{--app-accent:#6c3bb8!important;--app-hero:#4d258d!important;--app-text:#31234c!important;--ink:#31234c!important;--canvas:#f7f4fc!important;--surface:#ffffff!important;--line:#ded4f0!important;--red:#6c3bb8!important;--red-dark:#4d258d!important;--muted:#756b86!important}
.theme-tvk .topbar,.theme-tvk .card,.theme-tvk .table-wrap,.theme-tvk footer,.theme-midnight .topbar,.theme-midnight .card,.theme-midnight .table-wrap,.theme-midnight footer,.theme-forest .topbar,.theme-forest .card,.theme-forest .table-wrap,.theme-forest footer,.theme-royal .topbar,.theme-royal .card,.theme-royal .table-wrap,.theme-royal footer{background:var(--surface)!important;color:var(--app-text)}
.theme-tvk input,.theme-tvk select,.theme-tvk textarea,.theme-forest input,.theme-forest select,.theme-forest textarea,.theme-royal input,.theme-royal select,.theme-royal textarea{background:var(--surface)!important;color:var(--app-text);border-color:var(--line)}
.theme-midnight input,.theme-midnight select,.theme-midnight textarea{background:#182136!important;color:var(--app-text);border-color:#455271}
.theme-tvk .table th,.theme-forest .table th,.theme-royal .table th{background:#faf9f4;color:var(--app-text)}
.theme-midnight .table th{background:#182136;color:#c9d3ef}
.theme-midnight .table td,.theme-midnight .details div{border-color:var(--line)}
.theme-tvk nav a,.theme-tvk .logout-form button{color:#5b3333}.theme-forest nav a,.theme-forest .logout-form button{color:#255847}.theme-royal nav a,.theme-royal .logout-form button{color:#543b75}
.theme-tvk .btn,.theme-midnight .btn,.theme-forest .btn,.theme-royal .btn{background:var(--app-accent);border-color:var(--app-accent)}
.theme-tvk .btn-outline,.theme-midnight .btn-outline,.theme-forest .btn-outline,.theme-royal .btn-outline{background:transparent;color:var(--app-accent)}
.theme-tvk .btn-outline:hover,.theme-midnight .btn-outline:hover,.theme-forest .btn-outline:hover,.theme-royal .btn-outline:hover{background:var(--app-accent);color:#fff}
.theme-tvk .nav-toggle,.theme-midnight .nav-toggle,.theme-forest .nav-toggle,.theme-royal .nav-toggle,
.theme-tvk .mobile-topbar-logout button,.theme-midnight .mobile-topbar-logout button,.theme-forest .mobile-topbar-logout button,.theme-royal .mobile-topbar-logout button,
.theme-tvk .sidebar-collapse,.theme-midnight .sidebar-collapse,.theme-forest .sidebar-collapse,.theme-royal .sidebar-collapse{border-color:var(--app-accent);color:var(--app-accent);background:var(--surface)}
.theme-tvk .builder-palette-item,.theme-midnight .builder-palette-item,.theme-forest .builder-palette-item,.theme-royal .builder-palette-item{border-color:var(--app-accent);color:var(--app-accent)}
.theme-tvk .voice-on-behalf,.theme-midnight .voice-on-behalf,.theme-forest .voice-on-behalf,.theme-royal .voice-on-behalf{border-color:var(--app-accent)}

/* Theme overrides load after the dashboard stylesheet. Keep the responsive
   admin drawer controls visible instead of letting the public navigation rule
   hide them on themed installations. */
@media(max-width:1024px){
  .admin-shell .topbar{display:flex;align-items:center;position:sticky;min-height:65px}
  .admin-shell .topbar nav{display:none!important}
  .admin-shell .topbar nav.nav-open{display:none!important}
  .admin-shell .nav-toggle{display:inline-flex!important;align-items:center;gap:5px;position:absolute;right:15px;top:14px;z-index:25}
  .admin-shell .mobile-topbar-logout{display:block;position:absolute;right:82px;top:13px;z-index:25}
  .admin-shell .topbar-tools{margin-left:auto;margin-right:150px}
}
@media(min-width:701px) and (max-width:1024px){
  .admin-shell .topbar{margin-left:0;padding:10px 22px}
  .admin-shell .nav-toggle{right:22px}
  .admin-shell .mobile-topbar-logout{right:90px}
}
.theme-tvk .brand .brand-name{display:inline!important;width:auto!important;height:auto!important;border-radius:0!important;background:transparent!important;color:inherit!important;font-size:inherit!important;line-height:inherit!important}
