/* Hammelk Professional UI v5
   White-first, high-clarity, responsive admin experience.
   Loaded after all legacy styles so the interface has one visual language. */
:root{
  --hm5-bg:#f8fafc;
  --hm5-surface:#ffffff;
  --hm5-surface-soft:#f8fafc;
  --hm5-surface-blue:#f5f8ff;
  --hm5-border:#e5eaf0;
  --hm5-border-strong:#d6dde6;
  --hm5-text:#172033;
  --hm5-text-2:#445066;
  --hm5-muted:#7a8699;
  --hm5-primary:#3157d5;
  --hm5-primary-hover:#2948b4;
  --hm5-primary-soft:#eef2ff;
  --hm5-primary-ring:rgba(49,87,213,.14);
  --hm5-danger:#c14747;
  --hm5-danger-soft:#fff4f4;
  --hm5-warning:#b27a1b;
  --hm5-warning-soft:#fff9ed;
  --hm5-success:#2b7a5a;
  --hm5-success-soft:#f1faf6;
  --hm5-blue:#65a9dc;
  --hm5-blue-soft:#f0f8fd;
  --hm5-pink:#df89aa;
  --hm5-pink-soft:#fff2f7;
  --hm5-violet:#8978d8;
  --hm5-violet-soft:#f5f3ff;
  --hm5-occasion:#c59a4d;
  --hm5-occasion-soft:#fff9ed;
  --hm5-radius:14px;
  --hm5-radius-lg:18px;
  --hm5-shadow-sm:0 1px 2px rgba(20,31,51,.035),0 4px 14px rgba(20,31,51,.035);
  --hm5-shadow:0 12px 34px rgba(20,31,51,.07);
  --hm5-sidebar:248px;
  --primary:var(--hm5-primary)!important;
  --primary-dark:var(--hm5-primary-hover)!important;
  --ds-bg:var(--hm5-bg)!important;
  --ds-surface:#fff!important;
  --ds-surface-alt:var(--hm5-surface-soft)!important;
  --ds-border:var(--hm5-border)!important;
  --ds-text:var(--hm5-text)!important;
  --ds-muted:var(--hm5-muted)!important;
  --bg:var(--hm5-bg)!important;
  --surface:#fff!important;
  --surface-2:var(--hm5-surface-soft)!important;
  --text:var(--hm5-text)!important;
  --muted:var(--hm5-muted)!important;
  --line:var(--hm5-border)!important;
}

html{background:var(--hm5-bg)!important;scroll-padding-top:70px!important}
body{background:var(--hm5-bg)!important;background-image:none!important;color:var(--hm5-text)!important}
body::before,body::after{display:none!important}
.app-shell{background:var(--hm5-bg)!important;min-height:100svh}
.app-shell .workspace{background:var(--hm5-bg)!important;margin-right:var(--hm5-sidebar)!important;min-width:0!important}
.app-shell .page-content{background:var(--hm5-bg)!important;width:100%!important;max-width:1540px!important;margin:0 auto!important;padding:22px clamp(18px,2.35vw,36px) 56px!important}

/* ---------------- Sidebar ---------------- */
.app-shell .sidebar{
  width:var(--hm5-sidebar)!important;padding:12px 12px 14px!important;
  background:#fff!important;color:var(--hm5-text)!important;
  border-left:1px solid var(--hm5-border)!important;box-shadow:none!important;
}
.app-shell .brand{min-height:50px!important;padding:2px 8px 12px!important;border-bottom:1px solid var(--hm5-border)!important}
.app-shell .brand-copy-inline{display:flex!important;align-items:center!important;gap:7px!important;white-space:nowrap!important}
.app-shell .brand-copy strong{font-size:1rem!important;color:var(--hm5-text)!important;font-weight:900!important}
.app-shell .brand-copy span{color:var(--hm5-muted)!important;font-size:.66rem!important;font-weight:600!important}
.app-shell .brand-separator{color:#cbd2dc!important;font-size:.52rem!important}

/* Units need to be unmistakably readable. */
.app-shell .sidebar-property.suite-overview{
  margin:12px 0 10px!important;padding:12px!important;border:1px solid var(--hm5-border)!important;
  border-radius:13px!important;background:linear-gradient(180deg,#fff,#fbfcff)!important;box-shadow:none!important;
}
.app-shell .suite-overview-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin-bottom:9px!important}
.app-shell .suite-overview-head small{color:#5f6c80!important;font-size:.68rem!important;font-weight:900!important;opacity:1!important}
.app-shell .property-year{background:#f5f7fa!important;border:1px solid var(--hm5-border)!important;color:#657286!important;border-radius:7px!important;font-size:.64rem!important;font-weight:800!important;padding:3px 7px!important}
.app-shell .suite-overview-list{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
.app-shell .suite-overview-item{
  display:flex!important;align-items:center!important;gap:7px!important;min-height:38px!important;padding:7px 8px!important;
  background:#fff!important;border:1px solid var(--hm5-border)!important;border-radius:10px!important;
  color:#303b4d!important;opacity:1!important;box-shadow:0 1px 1px rgba(23,32,51,.02)!important;
}
.app-shell .suite-overview-item b{font-size:.69rem!important;font-weight:900!important;color:#303b4d!important;opacity:1!important;white-space:nowrap!important}
.app-shell .suite-color-dot{width:8px!important;height:8px!important;flex:0 0 8px!important;border-radius:50%!important;box-shadow:0 0 0 3px rgba(100,116,139,.06)!important}
.app-shell .suite-color-dot.blue{background:var(--hm5-blue)!important}.app-shell .suite-color-dot.pink{background:var(--hm5-pink)!important}.app-shell .suite-color-dot.green{background:#6cb391!important}
.app-shell .suite-overview-empty{color:var(--hm5-muted)!important;font-size:.7rem!important}

.app-shell .sidebar-nav{padding:4px 0 8px!important;gap:3px!important}
.app-shell .organized-menu .menu-section{
  min-height:44px!important;margin:0!important;padding:8px 10px!important;border-radius:10px!important;
  border:1px solid transparent!important;background:#fff!important;color:#465266!important;box-shadow:none!important;transform:none!important;
  transition:background .15s ease,border-color .15s ease,color .15s ease!important;
}
.app-shell .organized-menu .menu-section>.icon{width:18px!important;height:18px!important;color:#8490a3!important}
.app-shell .organized-menu .menu-section span:not(.menu-open-mark){font-weight:800!important}
.app-shell .organized-menu .menu-section:hover{background:#f8fafc!important;border-color:#edf0f4!important;color:var(--hm5-text)!important}
.app-shell .organized-menu .menu-section.active{
  background:var(--hm5-primary-soft)!important;border-color:#dce4ff!important;color:#2647bd!important;
  box-shadow:inset -3px 0 var(--hm5-primary)!important;
}
.app-shell .organized-menu .menu-section.active>.icon{color:var(--hm5-primary)!important}
.app-shell .menu-open-mark{margin-right:auto!important;color:#aab3c1!important;font-size:1rem!important}
.app-shell .nav-count{background:#eef2ff!important;color:#3157d5!important;border:1px solid #dce4ff!important}
.app-shell .sidebar-footer{background:#fff!important;border-top:1px solid var(--hm5-border)!important;padding-top:9px!important}
.app-shell .sidebar-account{border-radius:10px!important;color:#374256!important}.app-shell .sidebar-account:hover{background:#f8fafc!important}
.app-shell .avatar{background:#f8fafc!important;border:1px solid var(--hm5-border)!important;color:#465266!important;box-shadow:none!important}
.app-shell .logout-link{color:#a64b4b!important;border-radius:10px!important}.app-shell .logout-link:hover{background:#fff5f5!important;color:#bd3f3f!important}

/* ---------------- Top bar ---------------- */
.app-shell .topbar,.app-shell .topbar.topbar-modern{
  position:sticky!important;top:0!important;z-index:45!important;height:62px!important;width:100%!important;margin:0!important;
  padding:0 clamp(18px,2.35vw,36px)!important;border:0!important;border-bottom:1px solid var(--hm5-border)!important;border-radius:0!important;
  background:rgba(255,255,255,.96)!important;box-shadow:none!important;backdrop-filter:saturate(140%) blur(12px)!important;
  display:flex!important;align-items:center!important;gap:12px!important;
}
.app-shell .topbar-title{display:grid!important;gap:2px!important;min-width:0!important}
.app-shell .topbar-title>b{color:var(--hm5-text)!important;font-size:.93rem!important;font-weight:900!important;line-height:1.25!important}
.app-shell .topbar-meta{display:flex!important;align-items:center!important;gap:6px!important;color:#8a94a5!important;font-size:.62rem!important}
.app-shell .topbar-meta i{width:3px!important;height:3px!important;border-radius:50%!important;background:#c6ced9!important}
.app-shell .topbar-actions{margin-right:auto!important;display:flex!important;align-items:center!important;gap:7px!important}
.app-shell .topbar-quick,.app-shell .icon-button,.app-shell .notification-bell,.app-shell .small-avatar{
  background:#fff!important;border:1px solid var(--hm5-border)!important;color:#596579!important;box-shadow:none!important;border-radius:10px!important;
}
.app-shell .topbar-quick{min-height:36px!important;padding:0 11px!important;font-size:.69rem!important;font-weight:800!important;text-decoration:none!important}
.app-shell .topbar-quick:hover,.app-shell .icon-button:hover,.app-shell .notification-bell:hover{background:#f8fafc!important;color:var(--hm5-text)!important}
.app-shell .icon-button,.app-shell .notification-bell,.app-shell .small-avatar{width:36px!important;height:36px!important;min-height:36px!important}
.app-shell .notification-count{background:#e14d56!important;color:#fff!important;box-shadow:0 0 0 2px #fff!important}
.app-shell .menu-button{display:none!important}

/* ---------------- General surfaces ---------------- */
.app-shell .panel,.app-shell .card,.app-shell .ds-card,.app-shell .simple-card,
.app-shell .section-hub-card,.app-shell .section-hub-hero,.app-shell .settings-section-card,
.app-shell .maintenance-card,.app-shell .bank-card,.app-shell .stat-card,.app-shell .period-card,
.app-shell .owner-card,.app-shell .account-card,.app-shell .calendar-settings-hero,
.app-shell .dashboard-commandbar,.app-shell .settings-hero,.app-shell .plain-page-head,
.app-shell .page-hero-minimal{
  background:#fff!important;border:1px solid var(--hm5-border)!important;border-radius:var(--hm5-radius-lg)!important;
  color:var(--hm5-text)!important;box-shadow:var(--hm5-shadow-sm)!important;
}
.app-shell .panel,.app-shell .card,.app-shell .simple-card{padding:22px!important}
.app-shell h1,.app-shell h2,.app-shell h3,.app-shell h4{color:var(--hm5-text)!important;letter-spacing:-.018em!important}
.app-shell p,.app-shell small,.app-shell .helper-text{color:var(--hm5-muted)!important}
.app-shell .eyebrow,.app-shell .panel-kicker{color:#66748a!important;font-size:.67rem!important;font-weight:900!important;letter-spacing:0!important}
.app-shell .ds-page-header{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:16px!important;margin-bottom:18px!important;padding:0 2px!important}
.app-shell .ds-page-header h1{font-size:1.35rem!important;margin:0 0 5px!important}.app-shell .ds-page-header p{margin:0!important;font-size:.77rem!important}
.app-shell .panel-head{border-bottom:1px solid #f0f2f5!important;padding-bottom:14px!important;margin-bottom:14px!important}
.app-shell .section-hub-hero,.app-shell .settings-hero{padding:25px!important}
.app-shell .section-hub-card,.app-shell .settings-section-card{transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease!important}
.app-shell .section-hub-card:hover,.app-shell .settings-section-card:hover{transform:translateY(-1px)!important;border-color:#cfd7e3!important;box-shadow:0 10px 30px rgba(20,31,51,.065)!important}
.app-shell .section-hub-icon,.app-shell .section-hub-card-icon,.app-shell .settings-section-icon,.app-shell .bank-emblem{
  background:#f6f8fb!important;border:1px solid var(--hm5-border)!important;color:#69768a!important;box-shadow:none!important;
}

/* Dashboard gets restrained personality, not a flat white wall. */
.app-shell .dashboard-commandbar{position:relative!important;overflow:hidden!important;padding:26px!important;border-color:#dde4ef!important;background:linear-gradient(135deg,#ffffff 0%,#f8faff 100%)!important}
.app-shell .dashboard-commandbar::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--hm5-primary)}
.app-shell .dashboard-commandbar h2{font-size:1.5rem!important;margin:5px 0!important}.app-shell .dashboard-commandbar p{max-width:760px!important}
.app-shell .stat-card{padding:18px!important;min-height:116px!important;box-shadow:none!important}
.app-shell .stat-card:hover{border-color:#d4dce8!important}
.app-shell .stat-icon{background:#f5f7fb!important;border:1px solid var(--hm5-border)!important;color:#607087!important;box-shadow:none!important}
.app-shell .stat-icon.blue{background:#f1f7fd!important;color:#4d88b4!important}.app-shell .stat-icon.amber{background:#fff8eb!important;color:#a87217!important}.app-shell .stat-icon.violet{background:#f5f2ff!important;color:#7462c1!important}.app-shell .stat-icon.teal{background:#f0f9f7!important;color:#4b8b79!important}
.app-shell .progress{background:#edf1f5!important}.app-shell .progress i{background:linear-gradient(90deg,#3157d5,#6d88e6)!important}
.app-shell .donut{--donut-color:var(--hm5-primary)!important}
.app-shell .period-card{box-shadow:none!important}.app-shell .suite-badge{background:#f5f7fb!important;border:1px solid var(--hm5-border)!important;color:#5d697c!important}

/* Inputs, buttons, filters */
.app-shell input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.app-shell select,.app-shell textarea{
  min-height:44px!important;background:#fff!important;color:#283246!important;border:1px solid var(--hm5-border-strong)!important;
  border-radius:10px!important;box-shadow:none!important;transition:border-color .14s ease,box-shadow .14s ease!important;
}
.app-shell input::placeholder,.app-shell textarea::placeholder{color:#a1aab8!important}
.app-shell input:focus,.app-shell select:focus,.app-shell textarea:focus{border-color:#8ea3ef!important;box-shadow:0 0 0 3px var(--hm5-primary-ring)!important;outline:none!important}
.app-shell label{color:#49556a!important;font-weight:700!important}
.app-shell .button,.app-shell button{border-radius:10px!important;box-shadow:none!important;transform:none!important}
.app-shell .button.primary,.app-shell button.primary,
.app-shell button:not(.secondary):not(.ghost-danger):not(.danger):not(.icon-button):not(.modal-close):not(.sidebar-install):not(.text-button):not(.group-toggle):not(.sidebar-close):not(.menu-button):not(.button-secondary):not(.button-danger):not(.owner-result):not(.calendar-panel-close):not(.owner-clear):not(.calendar-nav-button):not(.calendar-day):not(.bank-combobox-toggle):not(.owner-tab):not(#mobileMenuButton):not([data-bank-option]){
  background:var(--hm5-primary)!important;color:#fff!important;border-color:var(--hm5-primary)!important;
}
.app-shell .button.primary:hover,.app-shell button.primary:hover{background:var(--hm5-primary-hover)!important;border-color:var(--hm5-primary-hover)!important}
.app-shell .button.secondary,.app-shell button.secondary,.app-shell .button.soft{background:#fff!important;color:#465266!important;border:1px solid var(--hm5-border-strong)!important}
.app-shell .button.secondary:hover,.app-shell button.secondary:hover,.app-shell .button.soft:hover{background:#f7f9fc!important;color:var(--hm5-text)!important}
.app-shell .button.danger,.app-shell button.danger{background:#fff!important;border:1px solid #efcccc!important;color:var(--hm5-danger)!important}
.app-shell .button.danger:hover,.app-shell button.danger:hover{background:var(--hm5-danger-soft)!important}
.app-shell .flash{border-radius:11px!important;box-shadow:none!important}
.app-shell .flash.success{background:var(--hm5-success-soft)!important;border-color:#d4ebdf!important;color:#2a6c52!important}.app-shell .flash.warning{background:var(--hm5-warning-soft)!important;border-color:#f1dfb9!important;color:#84611d!important}.app-shell .flash.danger{background:var(--hm5-danger-soft)!important;border-color:#efd0d0!important;color:#a64040!important}

/* Tables */
.app-shell .table-wrap{border:1px solid var(--hm5-border)!important;border-radius:14px!important;box-shadow:none!important;overflow:hidden!important;background:#fff!important}
.app-shell table{background:#fff!important}.app-shell th{background:#f8fafc!important;color:#657185!important;border-color:var(--hm5-border)!important;font-weight:900!important}.app-shell td{background:#fff!important;color:#344054!important;border-color:#edf0f4!important}.app-shell tbody tr:hover td{background:#fafbfe!important}

/* ---------------- Professional calendar ---------------- */
.app-shell .professional-calendar{display:grid!important;gap:14px!important}
.app-shell .calendar-command-center{
  background:#fff!important;border:1px solid var(--hm5-border)!important;border-radius:16px!important;box-shadow:var(--hm5-shadow-sm)!important;overflow:hidden!important;
}
.app-shell .calendar-command-top{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:24px!important;padding:18px 20px 15px!important}
.app-shell .calendar-command-heading{min-width:0!important}.app-shell .calendar-command-heading .eyebrow{display:block!important;margin-bottom:3px!important}
.app-shell .calendar-title-row{display:flex!important;align-items:center!important;gap:9px!important;flex-wrap:wrap!important}.app-shell .calendar-title-row h1{margin:0!important;font-size:1.35rem!important;font-weight:950!important}
.app-shell .calendar-command-heading p{margin:5px 0 0!important;font-size:.73rem!important;line-height:1.8!important}
.app-shell .calendar-command-actions{display:flex!important;align-items:center!important;gap:9px!important;flex-wrap:wrap!important;justify-content:flex-end!important}
.app-shell .calendar-month-nav{display:flex!important;direction:ltr!important;align-items:center!important;gap:5px!important;padding:4px!important;background:#f7f9fc!important;border:1px solid var(--hm5-border)!important;border-radius:11px!important}
.app-shell .calendar-nav-button{display:grid!important;place-items:center!important;width:31px!important;height:31px!important;min-height:31px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#5e6a7e!important;text-decoration:none!important;font-size:1.1rem!important;font-weight:900!important}
.app-shell .calendar-nav-button:hover{background:#fff!important;color:var(--hm5-primary)!important;box-shadow:0 1px 2px rgba(20,31,51,.06)!important}
.app-shell .calendar-today{display:grid!important;place-items:center!important;min-width:52px!important;height:31px!important;padding:0 10px!important;border-radius:8px!important;background:#fff!important;color:#465266!important;border:1px solid #e7ebf0!important;text-decoration:none!important;font-size:.68rem!important;font-weight:900!important}
.app-shell .calendar-create-actions{display:flex!important;gap:7px!important}.app-shell .calendar-create-actions .compact{min-height:40px!important;padding:0 13px!important;font-size:.71rem!important}
.app-shell .calendar-cache-status{display:inline-flex!important;align-items:center!important;gap:5px!important;min-height:26px!important;padding:0 8px!important;border-radius:999px!important;background:#f7f9fc!important;border:1px solid var(--hm5-border)!important;color:#667389!important;font-size:.62rem!important;font-weight:800!important}
.app-shell .calendar-cache-status i{width:6px!important;height:6px!important;border-radius:50%!important;background:#9aa5b5!important}.app-shell .calendar-cache-status.ready i{background:#55a17e!important}.app-shell .calendar-cache-status.syncing i{background:#d19a33!important}
.app-shell .calendar-command-bar{display:flex!important;align-items:center!important;gap:14px!important;padding:10px 16px!important;background:#fafbfc!important;border-top:1px solid #edf0f4!important;border-bottom:1px solid #edf0f4!important}
.app-shell .calendar-view-tabs{display:flex!important;align-items:center!important;gap:3px!important;padding:3px!important;background:#f1f4f7!important;border:1px solid #e6eaf0!important;border-radius:10px!important;box-shadow:none!important}
.app-shell .calendar-view-tabs a{min-width:52px!important;padding:7px 10px!important;border-radius:7px!important;text-decoration:none!important;color:#6f7b8e!important;font-size:.67rem!important;font-weight:900!important;text-align:center!important;border:0!important;background:transparent!important}
.app-shell .calendar-view-tabs a:hover{color:#344054!important}.app-shell .calendar-view-tabs a.active{background:#fff!important;color:var(--hm5-primary)!important;box-shadow:0 1px 4px rgba(20,31,51,.08)!important}
.app-shell .calendar-mini-stats{display:flex!important;align-items:center!important;gap:12px!important;margin-right:auto!important}
.app-shell .calendar-mini-stats>span{display:flex!important;align-items:center!important;gap:5px!important;color:#6b778a!important;font-size:.64rem!important}.app-shell .calendar-mini-stats i{width:7px!important;height:7px!important;border-radius:50%!important}.app-shell .calendar-mini-stats i.occasion{background:var(--hm5-occasion)!important}.app-shell .calendar-mini-stats i.period{background:var(--hm5-blue)!important}.app-shell .calendar-mini-stats i.event{background:var(--hm5-violet)!important}.app-shell .calendar-mini-stats b{color:#344054!important;font-size:.72rem!important}.app-shell .calendar-mini-stats small{font-size:.61rem!important;color:#8994a5!important}
.app-shell .calendar-settings-link{color:#5d697d!important;text-decoration:none!important;font-size:.67rem!important;font-weight:900!important;padding:7px 9px!important;border-radius:8px!important}.app-shell .calendar-settings-link:hover{background:#eef2ff!important;color:var(--hm5-primary)!important}
.app-shell .calendar-filter-panel{background:#fff!important}.app-shell .calendar-filter-panel summary{display:none!important}.app-shell .calendar-filters{display:grid!important;grid-template-columns:repeat(4,minmax(120px,1fr)) auto minmax(280px,1.6fr)!important;gap:8px!important;padding:12px 16px!important;align-items:end!important}
.app-shell .calendar-filters>label{display:grid!important;gap:5px!important}.app-shell .calendar-filters>label>span:first-child{font-size:.61rem!important;color:#7a8698!important;font-weight:900!important}.app-shell .calendar-filters select{min-height:37px!important;height:37px!important;padding-top:0!important;padding-bottom:0!important;font-size:.67rem!important;border-radius:9px!important}
.app-shell .calendar-filters .filter-check{display:flex!important;align-items:center!important;gap:6px!important;min-height:37px!important;padding:0 10px!important;border:1px solid var(--hm5-border)!important;border-radius:9px!important;background:#fff!important;white-space:nowrap!important}.app-shell .calendar-filters .filter-check input{width:15px!important;height:15px!important;min-height:15px!important}.app-shell .calendar-filters .filter-check span{font-size:.65rem!important;color:#566277!important}
.app-shell .calendar-layer-checks{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;min-height:37px!important}.app-shell .calendar-layer-checks label{display:flex!important;align-items:center!important;gap:5px!important;padding:7px 8px!important;border:1px solid var(--hm5-border)!important;border-radius:9px!important;background:#fff!important;color:#596579!important;font-size:.64rem!important;font-weight:800!important;white-space:nowrap!important}.app-shell .calendar-layer-checks input[type=checkbox]{width:14px!important;height:14px!important;min-height:14px!important}.app-shell .legend-dot{width:6px!important;height:6px!important;border-radius:50%!important}.app-shell .legend-dot.occasion{background:var(--hm5-occasion)!important}.app-shell .legend-dot.period{background:var(--hm5-blue)!important}.app-shell .legend-dot.event{background:var(--hm5-violet)!important}

/* Calendar board: connected white grid, clear hierarchy. */
.app-shell .calendar-board{background:#fff!important;border:1px solid var(--hm5-border)!important;border-radius:16px!important;box-shadow:var(--hm5-shadow-sm)!important;overflow:hidden!important}
.app-shell .calendar-week-head{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;background:#f7f9fc!important;border:0!important;border-bottom:1px solid var(--hm5-border)!important;color:#667388!important;min-width:0!important}
.app-shell .calendar-week-head>span{padding:10px 8px!important;text-align:center!important;font-size:.65rem!important;font-weight:900!important;border-left:1px solid #edf0f4!important}.app-shell .calendar-week-head>span:last-child{border-left:0!important}.app-shell .calendar-week-head .friday{color:#b35a5a!important;background:#fff8f8!important}
.app-shell .calendar-grid{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:0!important;background:#fff!important;border:0!important;min-width:0!important}
.app-shell .calendar-day{
  appearance:none!important;position:relative!important;min-height:124px!important;padding:9px!important;text-align:right!important;cursor:pointer!important;
  background:#fff!important;color:#344054!important;border:0!important;border-left:1px solid #edf0f4!important;border-bottom:1px solid #edf0f4!important;border-radius:0!important;box-shadow:none!important;font:inherit!important;overflow:hidden!important;
}
.app-shell .calendar-day:nth-child(7n){border-left:0!important}.app-shell .calendar-day:hover{background:#fbfcff!important;box-shadow:inset 0 0 0 1px #dfe5ef!important;z-index:1!important}.app-shell .calendar-day.empty{background:#fafbfc!important;cursor:default!important}.app-shell .calendar-day.holiday{background:#fffdfd!important}.app-shell .calendar-day.today{background:#f8faff!important;box-shadow:inset 0 0 0 2px #8da3ef!important;z-index:2!important}.app-shell .calendar-day.today:hover{background:#f5f7ff!important}
.app-shell .calendar-day-top{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;min-height:27px!important}.app-shell .calendar-day-number{display:grid!important;place-items:center!important;width:28px!important;height:28px!important;border-radius:9px!important;color:#475467!important;background:transparent!important;font-size:.76rem!important;font-weight:950!important}.app-shell .calendar-day.today .calendar-day-number{background:var(--hm5-primary)!important;color:#fff!important}.app-shell .calendar-day.holiday:not(.today) .calendar-day-number{color:#b44e4e!important}
.app-shell .holiday-mark{position:static!important;display:inline-flex!important;align-items:center!important;min-height:20px!important;padding:0 6px!important;border-radius:999px!important;background:#fff3f3!important;border:1px solid #f3dede!important;color:#b15b5b!important;font-size:.53rem!important;font-weight:900!important}
.app-shell .calendar-day-items{display:grid!important;gap:4px!important;margin-top:7px!important}.app-shell .day-item{display:flex!important;align-items:center!important;gap:5px!important;min-width:0!important;padding:4px 6px!important;border:1px solid transparent!important;border-radius:7px!important;background:#f8fafc!important;color:#5b6679!important;font-size:.59rem!important;line-height:1.5!important;box-shadow:none!important}.app-shell .day-item>i{width:6px!important;height:6px!important;flex:0 0 6px!important;border-radius:50%!important;background:#9aa5b5!important}.app-shell .day-item>span{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;min-width:0!important}.app-shell .day-item b{font-size:inherit!important;color:inherit!important}.app-shell .day-item.occasion{background:var(--hm5-occasion-soft)!important;border-color:#f3e6c9!important;color:#80652f!important}.app-shell .day-item.occasion i{background:var(--hm5-occasion)!important}.app-shell .day-item.occasion.holiday-item{background:#fff4f4!important;border-color:#f3dede!important;color:#a85454!important}.app-shell .day-item.occasion.holiday-item i{background:#d66d6d!important}.app-shell .day-item.period{background:#f7f9fc!important;border-color:#e7ebf0!important;color:#59677a!important}.app-shell .day-item.period.blue{background:var(--hm5-blue-soft)!important;border-color:#dbeef9!important;color:#4f7893!important}.app-shell .day-item.period.blue i{background:var(--hm5-blue)!important}.app-shell .day-item.period.pink{background:var(--hm5-pink-soft)!important;border-color:#f5dce6!important;color:#8d5d72!important}.app-shell .day-item.period.pink i{background:var(--hm5-pink)!important}.app-shell .day-item.event{background:var(--hm5-violet-soft)!important;border-color:#e8e3fb!important;color:#685c99!important}.app-shell .day-item.event i{background:var(--hm5-violet)!important}.app-shell .day-more{display:inline-flex!important;width:max-content!important;margin-top:1px!important;padding:2px 5px!important;color:#8b96a7!important;font-size:.54rem!important;font-weight:800!important}

/* Agenda */
.app-shell .calendar-agenda-card{background:#fff!important;border:1px solid var(--hm5-border)!important;border-radius:16px!important;box-shadow:var(--hm5-shadow-sm)!important;padding:18px!important}.app-shell .agenda-day{border-color:#edf0f4!important;border-radius:12px!important;background:#fff!important}.app-shell .agenda-day:hover{background:#fbfcff!important}.app-shell .agenda-day.holiday{border-right:3px solid #e58c8c!important}.app-shell .agenda-date{background:#f8fafc!important;border-color:var(--hm5-border)!important}.app-shell .agenda-item{background:#fff!important;border-color:#edf0f4!important}

/* Calendar drawers / workflows */
.app-shell .calendar-overlay{background:rgba(21,29,43,.34)!important;backdrop-filter:blur(3px)!important}.app-shell .calendar-drawer,.app-shell .calendar-workflow-drawer,.app-shell .calendar-day-panel,.app-shell .calendar-form-modal{background:#fff!important;border-color:var(--hm5-border)!important;box-shadow:-20px 0 55px rgba(20,31,51,.13)!important}.app-shell .calendar-drawer-head,.app-shell .workflow-drawer-head{border-bottom:1px solid #edf0f4!important;background:#fff!important}.app-shell .calendar-panel-close{background:#f7f9fc!important;border:1px solid var(--hm5-border)!important;color:#647084!important}.app-shell .calendar-panel-close:hover{background:#eef2ff!important;color:var(--hm5-primary)!important}.app-shell .day-panel-summary span{background:#f8fafc!important;border-color:var(--hm5-border)!important}.app-shell .panel-section,.app-shell .workflow-step,.app-shell .period-form-section{background:#fff!important;border-color:var(--hm5-border)!important;box-shadow:none!important}.app-shell .workflow-step-title>span{background:#eef2ff!important;color:var(--hm5-primary)!important;border-color:#dce4ff!important}.app-shell .suite-choice{background:#fff!important;border-color:var(--hm5-border)!important;color:#465266!important}.app-shell .suite-choice:hover{border-color:#cbd4e2!important;background:#fbfcff!important}.app-shell .suite-choice:has(input:checked){background:#f8faff!important;border-color:#9eb0ef!important;box-shadow:0 0 0 3px var(--hm5-primary-ring)!important}.app-shell .suite-choice.blue:has(input:checked){background:var(--hm5-blue-soft)!important;border-color:#add4ec!important}.app-shell .suite-choice.pink:has(input:checked){background:var(--hm5-pink-soft)!important;border-color:#e9b6ca!important}.app-shell .owner-picker-results{border-color:var(--hm5-border)!important;box-shadow:0 14px 35px rgba(20,31,51,.12)!important}.app-shell .owner-result:hover{background:#f7f9fc!important}.app-shell .selected-date-chip{background:#f5f7fb!important;border-color:var(--hm5-border)!important;color:#596579!important}

/* Settings / section pages */
.app-shell .settings-jump-nav{background:#fff!important;border:1px solid var(--hm5-border)!important;border-radius:13px!important;box-shadow:none!important}.app-shell .settings-jump-nav a{color:#5b677a!important;border-radius:9px!important}.app-shell .settings-jump-nav a:hover{background:#f7f9fc!important;color:var(--hm5-primary)!important}.app-shell .settings-section-card{box-shadow:none!important}.app-shell .design-setting-box,.app-shell .design-preview,.app-shell .settings-subsection{background:#f9fafc!important;border-color:var(--hm5-border)!important}.app-shell .maintenance-card{box-shadow:none!important}
.app-shell .section-hub-grid{gap:14px!important}.app-shell .section-hub-card{min-height:140px!important}.app-shell .section-hub-card h3{font-size:.95rem!important}.app-shell .section-hub-card p{font-size:.7rem!important;line-height:1.85!important}

/* Stays and ordinary forms */
.app-shell .form-grid{gap:13px!important}.app-shell .rate-summary{background:#f8faff!important;border:1px solid #e1e6f6!important;border-radius:13px!important;color:#465266!important}.app-shell .rate-summary b{color:#344054!important}.app-shell .actions{padding-top:4px!important}

/* Backup stays visually integrated with v5. */
.app-shell .backup-page .panel,.app-shell .backup-path-card{box-shadow:none!important}.app-shell .security-badge{background:#f8faff!important;border-color:#dce4ff!important;color:var(--hm5-primary)!important}.app-shell .success-badge,.app-shell .status-pill.ok{background:var(--hm5-success-soft)!important;border-color:#d4ebdf!important;color:#2f735a!important}.app-shell .warning-badge{background:var(--hm5-warning-soft)!important;border-color:#f1dfb9!important;color:#84611d!important}

/* ---------------- Responsive ---------------- */
@media(max-width:1180px){
  :root{--hm5-sidebar:226px}
  .app-shell .calendar-filters{grid-template-columns:repeat(4,minmax(105px,1fr))!important}.app-shell .calendar-layer-checks{grid-column:1/-1!important;justify-content:flex-start!important}
}
@media(max-width:900px){
  .app-shell .sidebar{width:min(318px,88vw)!important;transform:translateX(110%)!important;z-index:80!important;box-shadow:-18px 0 45px rgba(20,31,51,.14)!important}
  .sidebar-open .sidebar{transform:translateX(0)!important}.app-shell .workspace{margin-right:0!important}.app-shell .topbar,.app-shell .topbar.topbar-modern{height:58px!important;padding:0 14px!important}.app-shell .menu-button{display:grid!important;place-items:center!important}.app-shell .topbar-quick{display:none!important}.app-shell .page-content{padding:16px 12px 88px!important}.app-shell .suite-overview-item b{font-size:.72rem!important}
  .app-shell .mobile-dock,.mobile-dock{background:rgba(255,255,255,.97)!important;border-top:1px solid var(--hm5-border)!important;box-shadow:0 -6px 20px rgba(20,31,51,.06)!important;backdrop-filter:blur(10px)!important}.mobile-dock a,.mobile-dock button{color:#7a8698!important}.mobile-dock a.active{background:#eef2ff!important;color:var(--hm5-primary)!important}
  .app-shell .calendar-command-top{align-items:flex-start!important;flex-direction:column!important;gap:13px!important;padding:15px!important}.app-shell .calendar-command-actions{width:100%!important;justify-content:space-between!important}.app-shell .calendar-command-bar{flex-wrap:wrap!important;padding:9px 12px!important}.app-shell .calendar-view-tabs{order:1!important;flex:1!important}.app-shell .calendar-view-tabs a{flex:1!important;min-width:0!important}.app-shell .calendar-mini-stats{order:2!important;margin-right:0!important}.app-shell .calendar-settings-link{order:3!important;margin-right:auto!important}
  .app-shell .calendar-filter-panel summary{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:11px 13px!important;cursor:pointer!important;color:#465266!important;font-size:.7rem!important;font-weight:900!important;border-top:1px solid #edf0f4!important}.app-shell .calendar-filter-panel summary small{font-size:.58rem!important;color:#8b96a7!important;font-weight:700!important}.app-shell .calendar-filter-panel[open] summary{background:#fafbfc!important}.app-shell .calendar-filters{grid-template-columns:1fr 1fr!important;padding:12px!important}.app-shell .calendar-layer-checks{grid-column:1/-1!important;justify-content:flex-start!important;flex-wrap:wrap!important}.app-shell .calendar-filters .filter-check{grid-column:1/-1!important}
}
@media(max-width:640px){
  .app-shell .topbar-title>b{font-size:.86rem!important}.app-shell .topbar-meta{font-size:.58rem!important}.app-shell .topbar-actions .small-avatar{display:none!important}
  .app-shell .panel,.app-shell .card,.app-shell .simple-card{padding:16px!important;border-radius:14px!important}.app-shell .dashboard-commandbar{padding:18px!important}.app-shell .dashboard-commandbar h2{font-size:1.2rem!important}.app-shell .stat-grid{grid-template-columns:1fr 1fr!important;gap:9px!important}.app-shell .stat-card{padding:13px!important;min-height:100px!important}.app-shell .stat-card strong{font-size:1.05rem!important}
  .app-shell .calendar-command-heading p{display:none!important}.app-shell .calendar-title-row h1{font-size:1.14rem!important}.app-shell .calendar-command-actions{align-items:center!important}.app-shell .calendar-create-actions .secondary{display:none!important}.app-shell .calendar-mini-stats{width:100%!important;justify-content:space-between!important;order:3!important}.app-shell .calendar-mini-stats>span{flex:1!important;justify-content:center!important;padding:3px!important}.app-shell .calendar-settings-link{display:none!important}
  .app-shell .calendar-filters{grid-template-columns:1fr 1fr!important}.app-shell .calendar-filters>label:nth-of-type(3),.app-shell .calendar-filters>label:nth-of-type(4){grid-column:span 1!important}
  /* Mobile month keeps seven columns, but shows compact event dots instead of text. */
  .app-shell .calendar-board{border-radius:13px!important;overflow:hidden!important}.app-shell .calendar-week-head,.app-shell .calendar-grid{min-width:0!important;width:100%!important}.app-shell .calendar-week-head>span{padding:8px 2px!important;font-size:.54rem!important;white-space:nowrap!important}.app-shell .calendar-day{min-height:72px!important;padding:5px!important;border-radius:0!important}.app-shell .calendar-day-number{width:24px!important;height:24px!important;font-size:.67rem!important;border-radius:8px!important}.app-shell .holiday-mark{font-size:0!important;width:6px!important;height:6px!important;min-height:6px!important;padding:0!important;border:0!important;background:#dc6c6c!important}.app-shell .calendar-day-items{display:flex!important;align-items:center!important;gap:3px!important;flex-wrap:wrap!important;margin-top:5px!important}.app-shell .day-item{width:8px!important;height:8px!important;min-height:8px!important;padding:0!important;border:0!important;border-radius:50%!important;background:#9aa5b5!important;overflow:hidden!important}.app-shell .day-item>i,.app-shell .day-item>span{display:none!important}.app-shell .day-item.occasion{background:var(--hm5-occasion)!important}.app-shell .day-item.occasion.holiday-item{background:#d66d6d!important}.app-shell .day-item.period{background:#94a0b2!important}.app-shell .day-item.period.blue{background:var(--hm5-blue)!important}.app-shell .day-item.period.pink{background:var(--hm5-pink)!important}.app-shell .day-item.event{background:var(--hm5-violet)!important}.app-shell .day-more{display:none!important}
  .app-shell .calendar-overlay.calendar-drawer-overlay{align-items:flex-end!important;justify-content:stretch!important}.app-shell .calendar-drawer,.app-shell .calendar-workflow-drawer{width:100%!important;height:auto!important;max-height:92svh!important;border-radius:18px 18px 0 0!important;border-right:0!important;border-top:1px solid var(--hm5-border)!important;box-shadow:0 -18px 50px rgba(20,31,51,.14)!important}
  .app-shell .calendar-panel-actions,.app-shell .period-modal-actions,.app-shell .calendar-event-form .modal-actions{position:sticky!important;bottom:0!important;background:#fff!important;border-top:1px solid #edf0f4!important;padding:10px 14px calc(10px + env(safe-area-inset-bottom))!important;z-index:3!important}
  .app-shell .mobile-cards table,.app-shell .mobile-cards tbody,.app-shell .mobile-cards tr,.app-shell .mobile-cards td{display:block!important;width:100%!important}.app-shell .mobile-cards thead{display:none!important}.app-shell .mobile-cards tr{margin-bottom:10px!important;padding:12px!important;border:1px solid var(--hm5-border)!important;border-radius:12px!important;background:#fff!important}.app-shell .mobile-cards td{display:flex!important;justify-content:space-between!important;gap:12px!important;padding:7px 0!important;border:0!important;border-bottom:1px dashed #edf0f4!important}.app-shell .mobile-cards td:last-child{border-bottom:0!important}.app-shell .mobile-cards td::before{content:attr(data-label);color:#8792a3;font-size:.64rem;font-weight:800!important}
}
@media(max-width:430px){
  .app-shell .suite-overview-list{grid-template-columns:1fr 1fr!important}.app-shell .topbar-title>b{max-width:180px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.app-shell .calendar-view-tabs a{padding:7px 4px!important;font-size:.61rem!important}.app-shell .calendar-filters{grid-template-columns:1fr!important}.app-shell .calendar-filters>label,.app-shell .calendar-filters .filter-check{grid-column:1!important}.app-shell .calendar-layer-checks{grid-column:1!important}.app-shell .calendar-day{min-height:66px!important}.app-shell .calendar-week-head>span{font-size:.49rem!important}.app-shell .stat-grid{grid-template-columns:1fr!important}
}

/* Specificity guard: legacy global button rules used many :not() selectors and could repaint calendar cells.
   The ID-scoped rules below deliberately outrank those legacy selectors. */
#main-content .professional-calendar .calendar-grid button.calendar-day{background:#fff!important;color:#344054!important;border-left:1px solid #edf0f4!important;border-bottom:1px solid #edf0f4!important}
#main-content .professional-calendar .calendar-grid button.calendar-day:hover{background:#fbfcff!important;color:#344054!important}
#main-content .professional-calendar .calendar-grid button.calendar-day.holiday{background:#fffdfd!important}
#main-content .professional-calendar .calendar-grid button.calendar-day.today{background:#f8faff!important;color:#344054!important}
#main-content .professional-calendar .calendar-grid button.calendar-day.empty{background:#fafbfc!important}

/* v5.2 — calendar assignment workflow hardening */
.app-shell .calendar-workflow-drawer{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
.app-shell .calendar-workflow-drawer .workflow-drawer-head{
  flex:0 0 auto!important;
}
.app-shell .calendar-workflow-drawer .calendar-period-form,
.app-shell .calendar-workflow-drawer .calendar-event-form{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}
.app-shell .calendar-period-form .workflow-step{
  padding:16px 2px!important;
}
.app-shell .calendar-period-form .workflow-step:first-of-type{padding-top:8px!important}
.app-shell .owner-smart-picker{position:relative!important;display:grid!important;gap:8px!important}
.app-shell .owner-search-control{position:relative!important}
.app-shell .owner-search-control>input{padding-left:86px!important;background:#fff!important}
.app-shell .owner-picker-hint{display:block!important;color:#8a94a6!important;font-size:9.5px!important;line-height:1.7!important;padding:0 2px!important}
.app-shell .owner-selected-summary{display:grid!important;grid-template-columns:auto 1fr auto!important;align-items:center!important;gap:8px!important;padding:9px 11px!important;border:1px solid #dfe5ef!important;border-radius:10px!important;background:#f8faff!important;color:#344054!important}
.app-shell .owner-selected-summary[hidden]{display:none!important}
.app-shell .owner-selected-summary span{font-size:9px!important;color:#7a8699!important}
.app-shell .owner-selected-summary b{font-size:11px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.app-shell .owner-selected-summary small{font-size:9px!important;color:#51637f!important;background:#eef2ff!important;border-radius:999px!important;padding:3px 7px!important}

/* Stronger than the legacy global `button:not(...)` rule in style.css. */
#periodOwnerResults.owner-picker-results{
  position:relative!important;
  top:auto!important;
  right:auto!important;
  left:auto!important;
  z-index:2!important;
  max-height:none!important;
  overflow:visible!important;
  padding:5px!important;
  border:1px solid #dfe5ef!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 10px 28px rgba(20,31,51,.09)!important;
}
#periodOwnerResults.owner-picker-results[hidden]{display:none!important}
#periodOwnerResults.owner-picker-results > button.owner-result:not(.secondary):not(.ghost-danger){
  width:100%!important;
  min-height:44px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:0!important;
  padding:8px 10px!important;
  border:0!important;
  border-bottom:1px solid #eef1f5!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#263244!important;
  box-shadow:none!important;
  text-align:right!important;
  transform:none!important;
}
#periodOwnerResults.owner-picker-results > button.owner-result:last-of-type{border-bottom-color:transparent!important}
#periodOwnerResults.owner-picker-results > button.owner-result:not(.secondary):not(.ghost-danger):hover,
#periodOwnerResults.owner-picker-results > button.owner-result:not(.secondary):not(.ghost-danger):focus-visible{
  background:#f6f8fc!important;
  color:#1f2a3b!important;
  outline:none!important;
}
#periodOwnerResults .owner-result-main{display:grid!important;gap:2px!important;min-width:0!important}
#periodOwnerResults .owner-result-main b{font-size:11px!important;color:#263244!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#periodOwnerResults .owner-result-main small{font-size:8.8px!important;color:#8b96a8!important}
#periodOwnerResults .owner-result em{font-style:normal!important;font-size:9px!important;font-weight:800!important;color:#51637f!important;background:#f2f5fa!important;border-radius:999px!important;padding:4px 7px!important;white-space:nowrap!important}
#periodOwnerResults .owner-result.free em{background:#f3f4f6!important;color:#667085!important}
#periodOwnerResults .owner-result-empty,#periodOwnerResults .owner-result-more{padding:9px 10px!important;color:#7a8698!important;font-size:9.5px!important;line-height:1.7!important;text-align:center!important}
#periodOwnerResults .owner-result-more{border-top:1px dashed #e6eaf0!important;background:#fafbfc!important;border-radius:7px!important}

@media(max-width:720px){
  .app-shell .calendar-workflow-drawer{max-height:94svh!important}
  .app-shell .calendar-workflow-drawer .calendar-period-form{padding:10px 14px 0!important}
  .app-shell .calendar-period-form .workflow-step{padding:13px 0!important}
  .app-shell .workflow-step-title{margin-bottom:9px!important}
  .app-shell .owner-picker-hint{font-size:9px!important}
  #periodOwnerResults.owner-picker-results > button.owner-result:not(.secondary):not(.ghost-danger){min-height:42px!important}
}
