/* Navigation, mobile layout, settings and contrast fixes. */
.nav { display: grid; align-content: start; gap: 6px; }
.nav button { min-width: 0; }
.nav-settings-start { margin-top: 12px; padding-top: 14px !important; position: relative; }
.nav-settings-start::before { content: ""; position: absolute; top: 0; left: 12px; right: 12px; height: 1px; background: rgb(237 247 240 / 27%); }
.settings-list { display: grid; gap: 10px; max-width: 920px; }
.setting-row { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: var(--shadow); }
.setting-row > summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 14px; align-items: center; min-height: 68px; padding: 15px 18px; cursor: pointer; list-style: none; }
.setting-row > summary::-webkit-details-marker { display: none; }
.setting-row > summary::after { content: "＋"; grid-column: 2; grid-row: 1 / 3; color: var(--green); font-size: 21px; }
.setting-row[open] > summary::after { content: "−"; }
.setting-row > summary b { font-size: 14px; }
.setting-row > summary small { color: var(--muted); font-size: 11px; }
.setting-content { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.setting-content > .panel { margin: 12px 0 0; box-shadow: none; }
.setting-content .inline-form { align-items: end; }
.formula-options { display: grid; gap: 8px; margin: 14px 0; }
.formula-option { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); cursor: pointer; }
.formula-option input { width: 20px; height: 20px; accent-color: var(--green); flex: 0 0 auto; }
.formula-option span { display: grid; gap: 2px; }
.formula-option small { color: var(--muted); line-height: 1.35; }
.formula-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.theme-switch { position: relative; width: 54px !important; min-width: 54px !important; height: 32px !important; min-height: 32px !important; padding: 0 !important; border: 1px solid var(--line) !important; border-radius: 999px !important; background: #cdd8cf !important; font-size: 0 !important; }
.theme-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #0003; transition: transform .18s ease; }
.theme-switch[aria-checked="true"] { background: #28734f !important; }
.theme-switch[aria-checked="true"]::after { transform: translateX(22px); }
.manager-calendar .week { margin-top: 12px; }
.manager-calendar .filter-row { align-items: end; }
.calendar-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }

@media (min-width: 761px) {
  .sidebar .nav { flex: 1 1 auto; }
  .sidebar { gap: 18px; }
}

@media (max-width: 760px) {
  .sidebar { grid-template-columns: minmax(0,1fr); align-items: start; gap: 8px; padding: 10px 12px 12px; }
  .sidebar > .brand, .sidebar > .nav { grid-column: 1; grid-row: auto; }
  .sidebar > .nav { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; max-height: none; overflow: visible; padding: 2px 0; }
  .nav button { min-height: 44px; padding: 8px 9px; font-size: 11px; line-height: 1.25; }
  .nav-settings-start { margin-top: 0; padding-top: 8px !important; }
  .nav .nav-settings-start { grid-column: 1 / -1; }
  .nav-settings-start::before { left: 4px; right: 4px; }
  .sidebar .side-foot { display: none; }
  .topbar { position: relative; }
  .top-controls { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; }
  .top-controls > * { min-width: 0; max-width: 100%; }
  .schedule-wrap { overflow-x: auto !important; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; border: 1px solid var(--line); }
  .schedule, .schedule.cash-schedule { display: table !important; width: max(760px,100%) !important; min-width: 760px !important; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
  .schedule thead, .schedule tbody { display: table-row-group !important; }
  .schedule thead tr, .schedule tbody tr { display: table-row !important; padding: 0; border: 0; box-shadow: none; }
  .schedule th, .schedule td { display: table-cell !important; min-width: 82px !important; min-height: 0 !important; padding: 8px 5px !important; font-size: 11px !important; white-space: normal; overflow-wrap: anywhere; text-align: center; }
  .schedule th:first-child, .schedule td:first-child { position: sticky; left: 0; z-index: 2; width: 150px; min-width: 150px !important; text-align: left; background: var(--white); }
  .schedule thead th:first-child { z-index: 3; background: var(--surface-soft); }
  .schedule-cell-active strong { font-size: 11px; }
  .schedule-cell-active small { font-size: 10px; }
  .schedule .schedule-empty-cell { display: grid; place-items: center; min-height: 32px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); }
  .revenue-batch-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .revenue-batch-actions button { width: 100%; min-height: 46px; }
  .panel-head > .field { width: min(100%,220px); }
  .setting-row > summary { min-height: 62px; padding: 13px; }
  .setting-content { padding: 0 12px 12px; }
  .setting-content .inline-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 420px) {
  .top-controls { grid-template-columns: minmax(0,1fr); }
  .top-controls .account-chip { grid-column: 1; }
  .setting-content .inline-form { grid-template-columns: minmax(0,1fr); }
  .formula-actions { align-items: stretch; flex-direction: column; }
}

body[data-theme="dark"] .setting-row,
body[data-theme="dark"] .setting-content,
body[data-theme="dark"] .formula-option { background: var(--white); color: var(--ink); border-color: var(--line); }
body[data-theme="dark"] .setting-row > summary small,
body[data-theme="dark"] .formula-option small { color: var(--muted); }
body[data-theme="dark"] .chart text,
body[data-theme="dark"] .chart .gridline { fill: var(--muted); stroke: var(--line); }

/* Per-account avatar in the top bar and profile settings. */
.profile-photo-chip {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid #cbded0 !important;
  border-radius: 50% !important;
  background: var(--green2) !important;
  color: var(--green) !important;
  font-size: 12px !important;
  font-weight: 750;
  cursor: pointer;
}
.profile-menu-group { display: flex; min-width: 0; align-items: center; gap: 7px; }
.profile-menu-group .account-chip { width: auto; min-width: 0; flex: 0 1 auto; }
.top-controls .profile-photo-chip { width: 38px; min-width: 38px; height: 38px; min-height: 38px; }
.profile-photo-chip:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.profile-photo-chip img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-photo-chip img[hidden], .profile-photo-chip[hidden], #topAvatarInitials[hidden] { display: none !important; }
.account-identity { align-items: center; }
.account-avatar { flex: 0 0 46px; width: 46px; height: 46px; overflow: hidden; border-radius: 50%; }
.account-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-identity-copy { min-width: 0; flex: 1 1 auto; }
.account-avatar-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.account-avatar-actions .btn { min-height: 36px; }
body[data-theme="dark"] .profile-photo-chip { border-color: var(--line) !important; background: #29372d !important; color: #a3d2b0 !important; }
@media (max-width: 600px) {
  .account-identity { align-items: flex-start; flex-wrap: wrap; }
  .account-identity-copy { padding-top: 4px; }
  .account-avatar-actions { width: 100%; margin-left: 58px; }
}
@media (max-width: 760px) {
  .top-controls .profile-menu-group { grid-column: 1 / -1; }
  .top-controls .profile-menu-group .account-chip { width: auto; min-width: 0; flex: 1 1 auto; }
  .top-controls .profile-photo-chip { width: 42px; min-width: 42px; height: 42px; min-height: 42px; flex-basis: 42px; }
}
body[data-theme="dark"] .chart .line { stroke: #8fd0a4; }
body[data-theme="dark"] .chart .area { fill: #3e7654; }
body[data-theme="dark"] .schedule th:first-child,
body[data-theme="dark"] .schedule td:first-child { background: var(--white); }
body[data-theme="dark"] .schedule thead th:first-child { background: var(--surface-soft); }
body[data-theme="dark"] .topbar { border-color: var(--line); color: var(--ink); }
body[data-theme="dark"] .panel-head p,
body[data-theme="dark"] .legend,
body[data-theme="dark"] .crumb { color: var(--muted); }
body[data-theme="dark"] .revenue-batch-list,
body[data-theme="dark"] .revenue-batch-item,
body[data-theme="dark"] .expense-tabs button,
body[data-theme="dark"] .view-toggle button { color: var(--ink); border-color: var(--line); }
body[data-theme="dark"] .field input,
body[data-theme="dark"] .field select,
body[data-theme="dark"] .field textarea,
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea { background-color: var(--white); color: var(--ink); border-color: var(--line); }
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder { color: #91a498; }

/* Mobile-first navigation and touch layout. Keep the section bar visible without
   taking space from the page, and reserve room for it below the content. */
@media (max-width: 760px) {
  html { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  body { min-width: 320px; }
  .app { display: block; min-height: 100dvh; }
  .sidebar {
    position: static;
    display: block;
    min-height: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
  }
  .sidebar > .brand,
  .sidebar > .rolebox,
  .sidebar > .side-foot { display: none !important; }
  .sidebar > .nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    background: #123d2a;
    border-top: 1px solid rgb(255 255 255 / 16%);
    box-shadow: 0 -6px 24px rgb(12 34 23 / 18%);
    touch-action: pan-x;
  }
  .sidebar > .nav button {
    display: flex;
    flex: 0 0 88px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    min-width: 88px;
    min-height: 58px;
    max-height: 58px;
    margin: 0;
    padding: 5px 4px;
    border-radius: 10px;
    color: #e0eee4;
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .sidebar > .nav button.active { background: #2e7655; color: #fff; }
  .sidebar > .nav .icon { width: auto; font-size: 18px; line-height: 1; }
  .nav-settings-start { margin-top: 0; padding-top: 5px !important; }
  .nav-settings-start::before { inset: 5px auto 5px -3px; width: 1px; height: auto; }
  body[data-theme="dark"] .sidebar > .nav { background: #202622; border-color: var(--line); }
  body[data-theme="dark"] .sidebar > .nav button { color: #d6e3d8; }
  body[data-theme="dark"] .sidebar > .nav button.active { background: #315640; color: #fff; }

  .content { padding: 16px 14px calc(88px + env(safe-area-inset-bottom)); }
  .topbar { padding: 12px 14px; }
  .crumb { font-size: 12px; }
  .crumb strong { font-size: 14px; }
  .top-controls select,
  .top-controls button,
  .top-controls .btn { min-height: 46px; padding: 9px 10px; font-size: 14px; line-height: 1.25; }
  .title-row h1 { font-size: clamp(22px, 6vw, 27px); }
  .subtitle, .panel-head p { font-size: 13px; line-height: 1.45; }
  .panel-head h2 { font-size: 17px; }
  .kpi label { font-size: 12px; }
  .kpi small { font-size: 12px; line-height: 1.35; }
  .kpi strong { font-size: clamp(19px, 5.2vw, 24px); }
  .tiny, .field label { font-size: 12px; line-height: 1.4; }
  .btn, .expense-tabs button, .acts-tabs button, .view-toggle button,
  .rev-tabs button, .top-controls button { min-height: 44px; font-size: 14px; line-height: 1.25; }
  .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .field select, .field textarea,
  .filter-row input, .filter-row select,
  .docs-toolbar input, .docs-toolbar select {
    box-sizing: border-box;
    min-width: 0;
    min-height: 46px;
    font-size: 16px;
    line-height: 1.35;
  }
  .filter-row > *, .right-actions > *, .panel-head > * { min-width: 0; max-width: 100%; }
  .filter-row label { font-size: 13px; }
  .expense-tabs { display: flex; overflow-x: auto; }
  .expense-tabs button { flex: 1 0 auto; padding-inline: 12px; }
  .schedule-wrap, .cash-schedule-block .schedule-wrap {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }
  .schedule, .schedule.cash-schedule {
    display: table !important;
    width: max(760px, 100%) !important;
    min-width: 760px !important;
    table-layout: fixed;
  }
  .schedule thead, .schedule tbody { display: table-row-group !important; }
  .schedule thead tr, .schedule tbody tr { display: table-row !important; }
  .schedule th, .schedule td { display: table-cell !important; min-width: 82px !important; font-size: 12px !important; }
  .schedule th:first-child, .schedule td:first-child { min-width: 150px !important; }
  .schedule-cell-active strong { font-size: 12px !important; }
  .schedule-cell-active small { font-size: 11px !important; white-space: normal !important; }
  .schedule select { min-height: 40px; font-size: 14px !important; }
  .schedule-time-picker { z-index: 60; }
  .wo-save-row { bottom: calc(74px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .sidebar > .nav { gap: 2px; padding-inline: 5px; }
  .sidebar > .nav button { flex-basis: 82px; min-width: 82px; font-size: 11px; }
  .content { padding-inline: 11px; }
  .kpis { gap: 7px; }
  .panel { padding: 12px; }
}

/* Real payroll review list and compact seven-day mobile calendar. */
.payroll-review-toggle{border:0;cursor:pointer;font:inherit}.payroll-review-toggle:disabled{cursor:default;opacity:.8}.payroll-review-list{list-style:none;display:grid;gap:8px;margin:0;padding:0}.payroll-review-list li{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface,#fff);font-size:12px}.payroll-review-list li span{color:var(--muted);text-align:right}.payroll-review-list .review-clear{justify-content:center;color:var(--muted)}
@media(max-width:720px){.week.week-view:not(.month-view){grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}.week.week-view:not(.month-view) .daycell{min-width:0;overflow:hidden;padding:6px 1px;border-radius:6px;font-size:8px;line-height:1.15}.week.week-view:not(.month-view) .daycell>span{display:block;font-size:7px;white-space:nowrap}.week.week-view:not(.month-view) .daycell>b{font-size:11px;margin:3px 0}.week.week-view:not(.month-view) .daycell>small{display:block;font-size:7px;line-height:1.15;overflow-wrap:anywhere}.payroll-review-list li{align-items:flex-start;flex-direction:column;gap:4px}.payroll-review-list li span{text-align:left}}

/* Mobile navigation: slide-out section menu plus four role-aware shortcuts. */
.mobile-dock { display: none; }
.mobile-drawer-backdrop { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 720px) {
  .sidebar { pointer-events: none; position: static; }
  .mobile-nav { display: block; position: static; pointer-events: none; }
  .mobile-nav > summary {
    position: fixed;
    z-index: 92;
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgb(20 74 52 / 12%);
    border-radius: 15px;
    background: rgb(255 255 255 / 96%);
    color: #155c43;
    box-shadow: 0 5px 18px rgb(18 49 34 / 16%), 0 1px 3px rgb(18 49 34 / 8%);
    backdrop-filter: blur(12px);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    list-style: none;
    pointer-events: auto;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  }
  .mobile-nav > summary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgb(18 49 34 / 20%); }
  .mobile-nav > summary:active { transform: scale(.96); }
  .mobile-nav > summary:focus-visible { outline: 3px solid #9acb65; outline-offset: 3px; }
  .mobile-nav > summary::-webkit-details-marker { display: none; }
  .mobile-nav > summary::before,
  .mobile-nav > summary::after { content: none !important; display: none !important; }
  .mobile-menu-bars { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 20px; height: 20px; }
  .mobile-menu-bars i { display: block; width: 18px; height: 2px; border-radius: 3px; background: currentColor; }
  .mobile-nav[open] > summary { background: #155c43; color: #fff; }
  .mobile-drawer-backdrop,
  .mobile-nav[open] > .mobile-drawer-backdrop {
    position: fixed;
    z-index: 89;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgb(5 17 11 / 54%);
    pointer-events: auto;
  }
  .mobile-nav:not([open]) > .mobile-drawer-backdrop { display: none; }
  .mobile-nav > #nav,
  .mobile-nav:not([open]) > #nav {
    position: fixed;
    z-index: 90;
    inset: 0 auto 0 0;
    display: none !important;
    align-content: start;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    width: min(330px, 86vw);
    max-height: 100dvh;
    margin: 0;
    padding: max(68px, calc(env(safe-area-inset-top) + 60px)) 14px max(24px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid rgb(255 255 255 / 14%);
    background: linear-gradient(158deg, #164d37 0%, #103b2b 55%, #0b3022 100%);
    box-shadow: 14px 0 36px rgb(0 0 0 / 25%);
    pointer-events: auto;
  }
  .mobile-nav[open] > #nav { display: grid !important; }
  .mobile-nav > #nav button {
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 11px;
    color: #e5f0e8;
    font-size: 14px;
    line-height: 1.3;
    text-align: left;
    white-space: normal;
  }
  .mobile-nav > #nav button.active { background: #2e7655; color: #fff; }
  body[data-theme="dark"] .mobile-nav > summary { background: rgb(20 39 31 / 96%); color: #dff1e5; border-color: rgb(226 242 230 / 14%); }
  body[data-theme="dark"] .mobile-nav[open] > summary { background: #1b6547; color: #fff; }
  body[data-theme="dark"] .mobile-nav > #nav { background: linear-gradient(158deg, #123d2a, #0b2a1c 60%, #081f16); }
  .topbar { padding-top: 65px !important; }
  .mobile-dock {
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 2px;
    min-height: 67px;
    padding: 5px 6px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--white) 96%, transparent);
    box-shadow: 0 -7px 24px rgb(12 34 23 / 13%);
    backdrop-filter: blur(14px);
  }
  .mobile-dock button {
    display: flex;
    min-width: 0;
    min-height: 54px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.12;
    text-align: center;
    text-wrap: balance;
    cursor: pointer;
  }
  .mobile-dock button .icon { font-size: 17px; line-height: 1; }
  .mobile-dock button.active { background: var(--green2); color: var(--green); }
  body[data-theme="dark"] .mobile-dock { background: rgb(24 36 28 / 96%); border-color: var(--line); }
  body[data-theme="dark"] .mobile-dock button.active { background: #254b34; color: #c1e6cc; }
  .content { padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important; }
}

/* Today's shift at a glance — translucent surface tied to the existing green palette. */
.today-shift-card {
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid rgb(255 255 255 / 68%);
  border-radius: 20px;
  background: linear-gradient(128deg, rgb(255 255 255 / 88%), rgb(234 246 239 / 78%));
  box-shadow: 0 12px 34px rgb(26 76 53 / 10%), inset 0 1px 0 rgb(255 255 255 / 90%);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}
.today-shift-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.today-shift-eyebrow { color: #4d8066; font-size: 10px; font-weight: 750; letter-spacing: .13em; }
.today-shift-head h2 { margin: 3px 0 2px; color: #173a2c; font-size: 21px; }
.today-shift-head p { margin: 0; color: #687b70; font-size: 12px; text-transform: capitalize; }
.today-revenue-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 15px; border: 1px solid rgb(21 92 67 / 14%); border-radius: 13px; background: rgb(255 255 255 / 76%); color: #155c43; font: inherit; font-weight: 700; box-shadow: 0 3px 10px rgb(23 69 48 / 8%); cursor: pointer; transition: background .16s ease, transform .16s ease, box-shadow .16s ease; }
.today-revenue-button span { font-size: 18px; line-height: 1; }
.today-revenue-button:hover { transform: translateY(-1px); background: #fff; box-shadow: 0 7px 16px rgb(23 69 48 / 13%); }
.today-revenue-button:focus-visible,.rev-math-ops button:focus-visible { outline: 3px solid #8abf9d; outline-offset: 2px; }
.today-shift-roster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 8px; margin-top: 14px; }
.today-shift-person { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; padding: 11px 13px; border: 1px solid rgb(255 255 255 / 82%); border-radius: 14px; background: rgb(255 255 255 / 63%); }
.today-shift-person-main,.today-shift-time { display: grid; gap: 3px; min-width: 0; }
.today-shift-person-main b,.today-shift-time b { color: #263b30; font-size: 13px; }
.today-shift-person-main span,.today-shift-time span { color: #6e8075; font-size: 11px; }
.today-shift-time { flex: 0 0 auto; text-align: right; }
.today-shift-empty,.today-shift-loading,.today-shift-error { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; min-height: 50px; padding: 10px 13px; border-radius: 13px; background: rgb(255 255 255 / 58%); color: #52685c; font-size: 12px; }
.today-shift-empty > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #e3f2e8; color: #26734e; font-weight: 800; }
.today-shift-empty div { display: grid; gap: 2px; }
.today-shift-empty small { color: #74877c; }
.today-shift-error { color: #a0443f; }
.rev-math-ops { display: none; }
body[data-theme="dark"] .today-shift-card { border-color: rgb(197 230 210 / 12%); background: linear-gradient(130deg, rgb(29 59 45 / 88%), rgb(16 44 31 / 82%)); box-shadow: 0 12px 32px rgb(0 0 0 / 20%), inset 0 1px 0 rgb(255 255 255 / 6%); }
body[data-theme="dark"] .today-shift-head h2, body[data-theme="dark"] .today-shift-person-main b, body[data-theme="dark"] .today-shift-time b { color: #e5f4e9; }
body[data-theme="dark"] .today-shift-eyebrow { color: #9bc8a8; }
body[data-theme="dark"] .today-shift-head p, body[data-theme="dark"] .today-shift-person-main span, body[data-theme="dark"] .today-shift-time span { color: #afc4b5; }
body[data-theme="dark"] .today-shift-person, body[data-theme="dark"] .today-shift-empty, body[data-theme="dark"] .today-shift-loading { border-color: rgb(214 239 220 / 8%); background: rgb(235 248 238 / 6%); color: #d4e7d9; }
body[data-theme="dark"] .today-revenue-button { border-color: rgb(214 239 220 / 15%); background: rgb(235 248 238 / 9%); color: #d9efdf; }
@media (max-width: 720px) {
  .modal-back { z-index: 50; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .account-modal { max-height: calc(100dvh - 24px - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; padding-bottom: max(20px, calc(16px + env(safe-area-inset-bottom))); }
  .today-shift-card { margin: 0 0 12px; padding: 14px; border-radius: 17px; }
  .today-shift-head { align-items: flex-start; }
  .today-shift-head h2 { font-size: 18px; }
  .today-revenue-button { min-height: 40px; padding: 0 11px; font-size: 12px; white-space: nowrap; }
  .today-shift-roster { grid-template-columns: 1fr; margin-top: 11px; }
  .today-shift-person { padding: 10px 11px; }
  .rev-math-ops { display: grid; grid-template-columns: repeat(4, minmax(34px, 1fr)); gap: 4px; margin-top: 5px; }
  .rev-math-ops button { min-height: 31px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: rgb(245 249 246 / 92%); color: var(--green); font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; }
  body[data-theme="dark"] .rev-math-ops button { background: #1c3025; color: #d8eddd; border-color: #385342; }
}

/* Compact, labeled header icons keep branch/month values available without wide selects. */
.top-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.header-filter { position: relative; flex: 0 0 auto; }
.header-filter > summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  list-style: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(17 48 30 / 5%);
}
.header-filter > summary::-webkit-details-marker { display: none; }
.header-filter > summary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.header-filter > summary:hover, .header-filter[open] > summary { border-color: #a7c7b2; background: var(--surface-soft); color: var(--green); }
.header-filter[data-disabled] > summary { opacity: .52; cursor: not-allowed; }
.header-filter-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  width: min(260px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 16px 38px rgb(12 32 20 / 18%);
}
.header-filter-panel label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.header-filter-panel select { box-sizing: border-box; width: 100%; min-width: 0 !important; min-height: 44px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font-size: 14px; }
.top-controls .profile-menu-group { flex: 0 0 auto; gap: 0; }
.profile-menu-group .account-chip { display: none !important; }
body[data-theme="dark"] .header-filter > summary,
body[data-theme="dark"] .header-filter-panel,
body[data-theme="dark"] .header-filter-panel select { border-color: var(--line); background: var(--white); color: var(--ink); }
@media (max-width: 720px) {
  .top-controls { display: flex; width: 100%; align-items: center; justify-content: flex-end; gap: 7px; }
  .top-controls .profile-menu-group { grid-column: auto; }
  .top-controls .profile-photo-chip { flex-basis: 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  .header-filter > summary { width: 44px; height: 44px; }
  .header-filter-panel { top: calc(100% + 7px); }
}

/* Account settings use three clear, independently expandable sections. */
.account-modal { display: grid; gap: 10px; }
.account-modal-head { align-items: flex-start; margin-bottom: 2px; }
.account-modal-head h2 { margin: 3px 0 0; }
.account-section { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.account-section > summary,
.account-password-change > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 12px 15px;
  list-style: none;
  cursor: pointer;
}
.account-section > summary::-webkit-details-marker,
.account-password-change > summary::-webkit-details-marker { display: none; }
.account-section > summary > span:first-child,
.account-password-change > summary > span:first-child { display: grid; gap: 3px; min-width: 0; }
.account-section > summary b,
.account-password-change > summary b { color: var(--ink); font-size: 13px; }
.account-section > summary small,
.account-password-change > summary small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.account-section-mark { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; color: var(--green); }
.account-section-mark::before { content: "+"; font-size: 18px; line-height: 1; }
.account-section[open] > summary,
.account-password-change[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.account-section[open] > summary .account-section-mark::before,
.account-password-change[open] > summary .account-section-mark::before { content: "−"; }
.account-section-content { display: grid; gap: 12px; padding: 14px; }
.account-section-content .workday-panel { margin: 0; padding: 0; border: 0; }
.account-section-content .workday-heading { margin-bottom: 10px; }
.account-section-content .account-identity { margin: 0; }
.account-form { gap: 2px 12px; }
.account-form .field { margin: 4px 0; }
.account-form .field span { font-size: 11px; }
.account-form input { min-height: 42px; height: auto; font-size: 14px; }
.account-password-change { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.account-password-content { display: grid; gap: 3px; padding: 12px; }
.account-password-content .account-password-field { display: grid; gap: 6px; margin: 0; }
.account-password-content .account-password-field span { color: var(--muted); font-size: 11px; }
.account-password-content .account-note { margin: 4px 0 0; line-height: 1.4; }
.account-save-row { align-items: center; padding: 3px 0 0; }
.account-save-row .btn { min-height: 44px; }
.notification-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notification-panel-head b { font-size: 13px; }
.notification-panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.account-birthday-notifications { display: grid; gap: 8px; }
.birthday-notification-card { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.birthday-notification-day { padding: 5px 7px; border-radius: 8px; background: var(--green2); color: var(--green); font-size: 10px; font-weight: 800; white-space: nowrap; }
.birthday-notification-card b { display: block; color: var(--ink); font-size: 12px; }
.birthday-notification-card p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.notification-empty { margin: 0; padding: 12px; border-radius: 10px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.notification-templates { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.notification-templates > summary { padding: 11px 12px; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.notification-template-list { display: grid; gap: 8px; padding: 0 12px 12px; }
.notification-template-list > div { padding: 9px 10px; border-radius: 9px; background: var(--surface-soft); }
.notification-template-list span { color: var(--green); font-size: 10px; font-weight: 800; }
.notification-template-list p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.future-mail-placeholder { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); }
.future-mail-placeholder > div { display: grid; flex: 1; gap: 3px; }
.future-mail-placeholder b { color: var(--ink); font-size: 12px; }
.future-mail-placeholder small { font-size: 10px; line-height: 1.4; }
.future-mail-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--green2); color: var(--green); font-size: 16px; }
.coming-soon { padding: 4px 7px; border-radius: 99px; background: var(--surface-soft); font-size: 9px; font-weight: 750; white-space: nowrap; }
.account-logout { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.account-logout p { margin: 0; color: var(--muted); font-size: 11px; }
.account-logout .btn { width: 100%; min-height: 46px; }
body[data-theme="dark"] .account-section,
body[data-theme="dark"] .account-password-change,
body[data-theme="dark"] .notification-templates,
body[data-theme="dark"] .birthday-notification-card { border-color: var(--line); background: var(--white); }
body[data-theme="dark"] .account-section[open] > summary,
body[data-theme="dark"] .account-password-change[open] > summary { background: var(--surface-soft); }
body[data-theme="dark"] .notification-template-list > div,
body[data-theme="dark"] .notification-empty,
body[data-theme="dark"] .future-mail-placeholder { background: var(--surface-soft); }
body[data-theme="dark"] .birthday-notification-day,
body[data-theme="dark"] .future-mail-icon { background: #254b34; color: #c1e6cc; }
@media (max-width: 600px) {
  .account-modal { padding: 16px; gap: 8px; }
  .account-section-content { padding: 11px; }
  .account-modal-head .btn { min-height: 40px; padding: 7px 9px; }
  .notification-panel-head { align-items: flex-start; flex-direction: column; }
  .notification-panel-head .btn { width: 100%; }
  .account-save-row { align-items: stretch; flex-direction: column; }
  .account-save-row .btn { width: 100%; }
  .account-identity { gap: 9px; }
  .account-avatar-actions { margin-left: 0; }
}

.cashier-rate-content { display: grid; grid-template-columns: minmax(220px,360px) minmax(0,1fr); align-items: end; gap: 12px 18px; padding-top: 14px; }
.cashier-rate-content .field { margin: 0; }
.cashier-rate-content .tiny { margin: 0 0 10px; }
.hookah-analytics-panel { margin-top: 14px; }
.hookah-month-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0 16px; }
.hookah-month-total span { color: var(--muted); }
.hookah-month-total strong { color: var(--ink); font-size: clamp(25px,4vw,34px); }
.weekday-hookah-chart { display: grid; gap: 9px; }
.weekday-hookah-row { display: grid; grid-template-columns: 30px minmax(50px,1fr) minmax(42px,auto) minmax(48px,auto); align-items: center; gap: 10px; }
.weekday-hookah-row > b { color: var(--muted); font-size: 12px; }
.weekday-hookah-track { display: block; height: 9px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.weekday-hookah-track i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.weekday-hookah-row > strong { text-align: right; font-variant-numeric: tabular-nums; }
.weekday-hookah-row > small { color: var(--muted); text-align: right; white-space: nowrap; }
.cross-branch-out-row td { background: var(--surface-soft); border-top: 0; }
.cross-branch-out-row td:first-child b,
.cross-branch-out-row td:first-child small { display: block; }
.cross-branch-out-row td:first-child small { margin-top: 3px; color: var(--muted); }
body[data-theme="dark"] .cross-branch-out-row td { background: var(--surface-soft); }

@media (max-width: 420px) {
  .cashier-rate-content { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .weekday-hookah-row { grid-template-columns: 25px minmax(35px,1fr) 36px 42px; gap: 7px; }
}

/* Direct daily revenue entry, opened from the shift dashboard. */
.quick-revenue-back { display: none; }
#page-revenue.quick-revenue-mode > :not(.title-row):not(.split) { display: none !important; }
#page-revenue.quick-revenue-mode > .split { grid-template-columns: minmax(0, 1fr); }
#page-revenue.quick-revenue-mode > .split > :not(#dailyRevenueForm) { display: none !important; }
#page-revenue.quick-revenue-mode #dailyRevenueForm { display: block !important; width: min(100%, 920px); margin-inline: auto; }
#page-revenue.quick-revenue-mode .quick-revenue-back { display: inline-flex; align-self: center; white-space: nowrap; }
.pool-schedule .pool-share-input{width:64px;min-width:58px;min-height:38px;padding:6px 7px;border:1px solid var(--line);border-radius:9px;background:var(--white);color:var(--ink);text-align:center;font-variant-numeric:tabular-nums}
.pool-table-panel .panel-head{align-items:center}
#page-schedule .pool-schedule{border-collapse:separate;border-spacing:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--white)}
#page-schedule .pool-schedule th,#page-schedule .pool-schedule td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:center}
#page-schedule .pool-schedule th:first-child,#page-schedule .pool-schedule td:first-child{border-left:0;text-align:left}
#page-schedule .pool-schedule th:last-child,#page-schedule .pool-schedule td:last-child{border-right:0}
#page-schedule .pool-schedule tfoot td{border-bottom:0;background:var(--surface-soft);font-weight:700}
#page-schedule .pool-schedule tbody tr:nth-child(even) td{background:color-mix(in srgb,var(--surface-soft) 42%,var(--white))}
#page-schedule .pool-schedule tbody tr:nth-child(even) td:first-child{background:var(--white)}
#page-schedule .pool-schedule tbody td:first-child{min-width:190px}
#page-schedule .pool-schedule tbody td:first-child b{display:block}
#page-schedule .pool-schedule tbody td:first-child small{display:block;margin-top:3px}
#page-schedule .pool-schedule .pool-share-input:focus-visible{outline:2px solid var(--green);outline-offset:1px;box-shadow:0 0 0 3px color-mix(in srgb,var(--green) 16%,transparent)}
#page-schedule.pool-view-active #scheduleManagerPanel>:not(.filter-row):not(.schedule-toolbar):not(#poolTablePanel){display:none!important}
#page-schedule.pool-view-active #offScheduleShiftPanel{display:none!important}
#page-schedule.pool-view-active #scheduleStation,
#page-schedule.pool-view-active #addScheduleEmployee,
#page-schedule.pool-view-active #addCrossBranchScheduleEmployee{display:none!important}
@media(max-width:760px){.pool-schedule .pool-share-input{width:46px;min-width:42px;min-height:38px;padding:5px 3px;font-size:15px!important}.pool-table-panel .panel-head{align-items:flex-start;flex-direction:column}#page-schedule .pool-schedule tbody td{border-right:1px solid var(--line)!important;border-bottom:1px solid var(--line)!important;border-radius:0!important}#page-schedule .pool-schedule tbody td:first-child{border-left:0!important}#page-schedule .pool-schedule tbody tr{border:1px solid var(--line)!important}#page-schedule .pool-schedule tbody tr:nth-child(even) td{background:var(--surface-soft)}#page-schedule .pool-schedule tbody td:first-child{background:var(--white)!important}}

/* Monthly hours from a station line in the payroll breakdown. */
#managerBreakdown .pay-hours-label { cursor: pointer; }
#managerBreakdown .pay-hours-open {
  appearance: none; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; background: transparent; color: var(--green); font: inherit;
  font-weight: 650; text-align: right; cursor: pointer;
}
#payHoursCalendar {
  box-sizing: border-box; width: min(640px, calc(100% - 24px)); max-height: 88dvh;
  margin: auto; overflow: auto; border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(12px, 3vw, 24px); background: var(--white); color: var(--ink);
}
#payHoursCalendar::backdrop { background: rgb(12 26 22 / 52%); }
#payHoursCalendar header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
#payHoursCalendar h2 { margin:0; font-size:1.15rem; }
#payHoursPeriod { margin:4px 0 14px; color:var(--muted); }
#payHoursCalendar .calendar-weekdays, #payHoursDays {
  display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; text-align:center;
}
#payHoursCalendar .calendar-weekdays { margin-bottom:6px; }
#payHoursDays .daycell { min-height:clamp(44px, 8vw, 70px); min-width:0; }
#payHoursDays .daycell.on b, #payHoursDays .daycell.on small { color:#25312b; }
 
#deliveryDialog{width:min(26rem,92vw);box-sizing:border-box;margin:auto;padding:1.3rem;border:1px solid var(--line);border-radius:16px;background:var(--white);color:var(--ink)}#deliveryDialog::backdrop{background:#14291e80}#deliveryForm input{display:block;width:100%;box-sizing:border-box;margin-top:.4rem}

#page-revenue { --mix-card:#26765d; --mix-cash:#77ad99; --mix-bonus:#dca44d; }
#page-revenue .weekday-hookah-chart { grid-template-columns:repeat(7,minmax(0,1fr)); gap:0; padding-top:24px; }
.hookah-column { min-width:0; text-align:center; font-variant-numeric:tabular-nums; }
.hookah-plot { height:115px; display:flex; align-items:flex-end; justify-content:center; border-bottom:1px solid var(--line); background:repeating-linear-gradient(to top,transparent 0 27px,var(--line) 28px,transparent 29px); }
.hookah-plot i { display:block; position:relative; width:48%; max-width:46px; border-radius:6px 6px 0 0; background:linear-gradient(to top,#26765d,#78b49c); }
.hookah-plot b { position:absolute; bottom:100%; left:50%; transform:translateX(-50%); font-size:13px; line-height:22px; font-style:normal; color:var(--ink); }
.hookah-column > strong,.hookah-column > small { display:block; }
.hookah-column > strong { margin-top:7px; }
.hookah-column > small { color:var(--muted); font-size:11px; }
.mix-layout { display:flex; align-items:center; gap:clamp(14px,3vw,30px); flex-wrap:wrap; justify-content:center; padding:12px 0; }
.mix-ring { width:clamp(132px,12vw,180px); aspect-ratio:1; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--mix-card) 0 var(--card-end),var(--mix-cash) var(--card-end) var(--cash-end),var(--mix-bonus) var(--cash-end) 100%); }
.mix-ring.empty-mix { background:var(--line); }
.mix-ring > div { width:77%; aspect-ratio:1; background:var(--white); border-radius:50%; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:4px; }
.mix-ring small,.mix-key small { color:var(--muted); }
.mix-ring strong { font-size:clamp(12px,1vw,17px); }
.mix-key { flex:1 1 160px; list-style:none; padding:0; margin:0; }
.mix-key li { display:grid; grid-template-columns:9px 1fr auto; gap:2px 9px; align-items:center; padding:8px 0; font-variant-numeric:tabular-nums; }
.mix-key li+li { border-top:1px solid var(--line); }
.mix-key li::before { content:''; width:9px; height:9px; border-radius:50%; background:var(--mix-card); }
.mix-key .mix-cash::before { background:var(--mix-cash); }
.mix-key .mix-bonus::before { background:var(--mix-bonus); }
.mix-key li b { white-space:nowrap; }
.mix-key li small { grid-column:2/-1; }

.rev-calendar {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.rev-calendar>div {display:grid;gap:3px;align-content:center;padding:6px 2px;text-align:center;border-radius:6px;background:color-mix(in srgb,var(--green) var(--tone),var(--paper));font-variant-numeric:tabular-nums}
.rev-calendar small {text-align:center;color:var(--ink);font-size:11px}
.rev-calendar b {font-size:clamp(9px,1vw,13px)}
#compareDialog {width:min(540px,94vw);max-height:85dvh;overflow:auto;background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:16px;padding:20px}
#compareDialog::backdrop {background:#10271ec2}
#compareDialog form {float:right}
#compareResult table {width:100%;min-width:0;margin-top:14px;font-variant-numeric:tabular-nums}
#compareResult :is(th,td){white-space:normal;padding:6px;text-align:right}
#compareResult th:first-child{text-align:left}

.comparison-track{display:block;height:6px;background:var(--line);border-radius:4px;margin-top:4px;overflow:hidden}.comparison-track i{height:100%;display:block;border-radius:inherit}

.schedule-toolbar { display:grid; gap:12px; margin-bottom:16px; }
.schedule-toolbar-filters, .schedule-toolbar-actions, .schedule-week-buttons, .schedule-add-buttons {
  display:flex; flex-wrap:wrap; gap:8px;
}
.schedule-toolbar-filters { align-items:flex-end; }
.schedule-toolbar-filters .field { margin:0; }
.schedule-toolbar-filters :is(input,select,button) { min-height:44px; }
.schedule-toolbar-actions { align-items:center; justify-content:space-between; }
.schedule-add-buttons { margin-inline-start:auto; }
.schedule-station-group th { text-align:left; }
@media (max-width:600px) {
  .schedule-toolbar-filters, .schedule-week-buttons, .schedule-add-buttons { width:100%; }
  .schedule-toolbar-filters > *, .schedule-week-buttons > *, .schedule-add-buttons > * { flex:1 1 auto; }
}
