/* Shared controls: override older page styles without disabling browser zoom. */
.topbar { transform:none !important; will-change:auto !important; }
.topbar.topbar-hidden { transform:none !important; opacity:1 !important; }
.topbar button, .pw-toggle, .cs-chatbot button {
  -webkit-appearance:none; appearance:none;
}
.topbar button svg, .pw-toggle svg, .cs-chatbot button svg {
  flex-shrink:0; overflow:visible;
}
.topbar .nav-icon-btn, .topbar .profile-menu-btn, .topbar .mobile-nav-btn {
  min-width:44px !important; min-height:44px !important;
  width:44px !important; height:44px !important; padding:0 !important;
  align-items:center; justify-content:center;
}
.topbar .nav-icon-btn svg { width:20px; height:20px; }
.topbar #navChatDropdown, .topbar #navBellDropdown {
  position:fixed !important; top:calc(var(--topbar-offset, 78px) + 8px) !important;
  bottom:auto !important; left:auto !important; right:16px !important;
  width:min(360px, calc(100vw - 32px)) !important; max-width:none !important;
  max-height:calc(100vh - var(--topbar-offset, 78px) - 24px);
  max-height:calc(100dvh - var(--topbar-offset, 78px) - 24px);
  overflow:auto; border-radius:16px !important;
}
.pw-toggle { width:44px !important; height:44px !important; padding:0 !important; display:inline-flex; align-items:center; justify-content:center; }
.pw-toggle svg { width:18px !important; height:18px !important; }
.pw-wrap input, .password-wrap input, .password-wrapper input { padding-right:56px !important; min-height:46px; }
.cs-theme-toggle .cs-theme-label { display:none; }
.cs-mobile-menu-icon { display:none; }
.cs-theme-in-menu {
  width:100% !important; min-height:44px; height:auto !important;
  justify-content:flex-start !important; padding:10px 14px !important;
  border:0 !important; border-radius:8px !important;
  background:transparent !important; color:var(--cs-ink-334155,#334155) !important;
  font:inherit; font-weight:600;
}
.cs-theme-in-menu .cs-theme-label { display:inline; margin-left:10px; }
.cs-theme-in-menu:hover { background:var(--cs-surface-eff6ff,#eff6ff) !important; }
.topbar .profile-dropdown a[aria-current="page"], .topbar .mobile-nav-menu a[aria-current="page"] {
  background:var(--cs-surface-eff6ff,#eff6ff); color:var(--cs-ink-0a3d91,#0a3d91); font-weight:700;
  box-shadow:inset 3px 0 #1b63c6;
}
.topbar .profile-dropdown, .topbar .mobile-nav-menu {
  max-height:calc(100vh - var(--topbar-offset, 78px) - 16px);
  max-height:calc(100dvh - var(--topbar-offset, 78px) - 16px);
  overflow-y:auto;
}
@media (max-width:768px) {
  .topbar .topbar-inner { min-height:66px; padding:8px 12px !important; }
  .topbar .nav-right { gap:4px !important; }
  .topbar .logo-text { display:none; }
  .topbar #profileMenuBtn { display:none; }
  .topbar #adBtn .profile-avatar { display:none; }
  .topbar #adBtn .cs-mobile-menu-icon { display:block; width:22px; height:22px; color:#fff; }
  .topbar .nav-icon-btn[href="worker_calendar.php"] { display:none; }
  .topbar .mobile-nav-menu { top:100%; padding:8px 12px; }
  .topbar .mobile-nav-menu a { min-height:44px; display:flex; align-items:center; }
  .topbar .profile-dropdown {
    padding:8px !important;
    position:fixed !important; top:calc(var(--topbar-offset, 66px) + 8px) !important;
    bottom:auto !important; left:auto !important; right:8px !important;
    width:min(320px, calc(100vw - 16px)) !important; max-width:none !important;
  }
  .topbar .profile-dropdown a { min-height:44px; padding:10px 14px; box-sizing:border-box; }
  .topbar .profile-dropdown .menu-sep { margin:6px 0; }
  /* Inputs remain readable when the software keyboard opens. */
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), textarea, select {
    font-size:16px !important;
  }
}
/* Edge supplies its own password reveal icon; use the labelled site control. */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display:none; }
dialog.cs-action-dialog{box-sizing:border-box;width:min(820px,calc(100% - 24px));max-width:none;max-height:calc(100dvh - 32px);margin:auto;padding:24px;border:1px solid var(--cs-line-dbe3f1,#dbe3f1);border-radius:16px;background:var(--cs-surface-ffffff,#fff);color:var(--cs-ink-334155,#334155);overflow:auto;overscroll-behavior:contain}
dialog.cs-action-dialog:not([open]){display:none}
dialog.cs-action-dialog::backdrop{background:rgba(15,23,42,.6)}
.cs-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.cs-dialog-heading h2{margin:0;font-size:22px}
.cs-dialog-heading button{min-width:44px;min-height:44px}
#bookingFormStatus:not([hidden]){padding:12px;border-radius:10px;border:1px solid var(--cs-line-bfdbfe,#bfdbfe);background:var(--cs-surface-eff6ff,#eff6ff);color:var(--cs-ink-1e40af,#1e40af)}
.subscription-more-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:24px;padding:18px 0;border-top:1px solid var(--cs-line-dbe3f1,#dbe3f1)}
.document-request-card{margin-bottom:16px}.document-request-button,.document-resubmit-form button{min-height:44px;padding:10px 16px;border:0;border-radius:9px;background:#0a3d91;color:#fff;font:inherit;cursor:pointer}
.document-resubmit-form .doc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:12px}
.document-resubmit-form .doc-field{min-width:0;padding:12px;border:1px dashed var(--cs-line-94a3b8,#94a3b8);border-radius:10px;font-weight:600}
.document-resubmit-form .doc-field small{display:block;font-size:12px;font-weight:400;margin:5px 0;color:var(--cs-ink-64748b,#64748b)}
.document-resubmit-form input[type=file]{display:block;width:100%;max-width:100%;font-size:13px}
@media(max-width:520px){dialog.cs-action-dialog{padding:16px}.subscription-more-actions button{flex:1 1 130px}}
