:root {
  --bg: #f5f3ef;
  --card: #fffdf9;
  --ink: #1f2d2a;
  --accent: #256a5a;
  --warn: #8b1e1e;
  --line: #d8d2c5;
  --button-press-depth: 2px;
  --button-surface-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 4px 0 rgba(23, 63, 53, 0.16), 0 10px 18px rgba(23, 63, 53, 0.12);
  --button-surface-shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.72) inset, 0 3px 0 rgba(93, 103, 99, 0.18), 0 8px 16px rgba(23, 42, 36, 0.08);
  --button-surface-shadow-pressed: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 1px 0 rgba(23, 63, 53, 0.12), 0 4px 10px rgba(23, 63, 53, 0.12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at 10% 10%, #faf6ea, var(--bg));
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}
header {
  padding: 18px;
  background: linear-gradient(120deg, #f4e6ca, #cde2d9);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.header-row.manager-left-nav {
  align-items: center;
}
.brand-block {
  display: flex;
  align-items: center;
}
.brand-logo {
  display: block;
  height: 62px;
  width: auto;
  max-width: min(100%, 520px);
  object-fit: contain;
}
.owner-branding-panel {
  display: grid;
  gap: 14px;
}
.owner-branding-preview-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}
.owner-branding-preview-image {
  display: block;
  width: 220px;
  max-width: 100%;
  height: 72px;
  object-fit: contain;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7f1e4, #edf5f1);
  border: 1px solid rgba(37, 106, 90, 0.12);
}
.owner-branding-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.owner-branding-upload-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.owner-branding-upload-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.top-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.top-nav.manager-hamburger-nav {
  justify-content: flex-start;
  position: relative;
  max-width: 340px;
  align-self: flex-start;
  width: auto;
  margin-left: 0;
}
.header-row.manager-left-nav .top-nav.manager-hamburger-nav {
  width: 100%;
  max-width: none;
}
.menu-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #173f35;
  border: 1px solid #13342c;
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}
.menu-toggle-glyph {
  font-size: 17px;
  line-height: 1;
}
.menu-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #8b1e1e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 0 5px;
}
.menu-drawer {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: min(340px, calc(100vw - 24px));
  background: #fffdf8;
  border: 1px solid #cfc8ba;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(16, 25, 22, 0.18);
  padding: 8px;
  z-index: 1200;
  display: grid;
  gap: 6px;
}
.menu-link,
.menu-sublink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-decoration: none;
  color: #1e2f2a;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.menu-link {
  padding: 10px;
  font-weight: 700;
  border: 1px solid #d8d2c5;
  background: #f6f3eb;
}
.menu-link.active {
  background: #e8f1ed;
  border-color: #9bb8ad;
}
.menu-flyout {
  position: relative;
}
.menu-flyout-trigger {
  width: 100%;
}
.menu-flyout-caret {
  font-size: 12px;
  line-height: 1;
}
.menu-flyout-panel {
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  min-width: 240px;
  background: #fffdf8;
  border: 1px solid #d8d2c5;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(16, 25, 22, 0.16);
  padding: 6px;
  display: none;
  gap: 4px;
  z-index: 1300;
}
.menu-flyout.open .menu-flyout-panel {
  display: grid;
}
.menu-sublink {
  padding: 8px 10px;
  border: 1px solid #efeadf;
  background: #fff;
  font-weight: 600;
}
.menu-sublink.active {
  background: #eef4f1;
}
.menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #8b1e1e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
}
.menu-logout-btn {
  width: 100%;
  background: #6b6a67;
  border-radius: 8px;
}
body.manager-workspace {
  display: grid;
  grid-template-columns: minmax(214px, 248px) minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(244, 230, 202, 0.7), transparent 28%),
    linear-gradient(180deg, #f3efe7, #f8f6f1 38%, #f4f6f2);
}
body.manager-workspace > header {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 16px 14px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.95), rgba(240, 245, 241, 0.95)),
    linear-gradient(120deg, #f4e6ca, #cde2d9);
  border-bottom: none;
  border-right: 1px solid rgba(162, 174, 167, 0.55);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.55);
}
body.manager-workspace > header .header-row {
  align-items: stretch;
  gap: 14px;
  justify-content: flex-start;
  flex-wrap: nowrap;
  height: calc(100vh - 32px);
  overflow: hidden;
}
body.manager-workspace > header .brand-block {
  flex: 0 0 auto;
  justify-content: flex-start;
  padding: 2px 6px 12px;
  border-bottom: 1px solid rgba(173, 182, 175, 0.42);
}
body.manager-workspace > header .brand-logo {
  height: auto;
  width: min(100%, 200px);
  max-width: 100%;
}
body.manager-workspace .top-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 14px;
  justify-content: flex-start;
  width: 100%;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
body.manager-workspace .top-nav > * {
  min-width: 0;
}
body.manager-workspace .manager-sidebar-group {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(183, 191, 186, 0.42);
  background: rgba(255, 255, 255, 0.24);
}
body.manager-workspace .manager-sidebar-group.active {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(146, 171, 162, 0.62);
  box-shadow: 0 10px 20px rgba(19, 42, 35, 0.05);
}
body.manager-workspace .manager-sidebar-group-title {
  margin: 0 4px 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #73877f;
}
body.manager-workspace .manager-sidebar-link,
body.manager-workspace .manager-sidebar-sublink,
body.manager-workspace .owner-test-toggle-btn,
body.manager-workspace .owner-test-launch-btn {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(205, 212, 208, 0.7);
  background: rgba(255, 253, 249, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}
body.manager-workspace .manager-sidebar-link,
body.manager-workspace .owner-test-toggle-btn,
body.manager-workspace .owner-test-launch-btn {
  padding: 10px 12px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.25;
}
body.manager-workspace .manager-sidebar-sublink {
  padding: 8px 12px;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.2;
}
body.manager-workspace .manager-sidebar-link:hover,
body.manager-workspace .manager-sidebar-link:focus-visible,
body.manager-workspace .manager-sidebar-sublink:hover,
body.manager-workspace .manager-sidebar-sublink:focus-visible,
body.manager-workspace .owner-test-toggle-btn:hover,
body.manager-workspace .owner-test-toggle-btn:focus-visible,
body.manager-workspace .owner-test-launch-btn:hover,
body.manager-workspace .owner-test-launch-btn:focus-visible {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(142, 167, 158, 0.72);
}
body.manager-workspace .manager-sidebar-link.active,
body.manager-workspace .manager-sidebar-sublink.active,
body.manager-workspace .owner-test-toggle-btn.active {
  background: #fffdf9;
  border-color: #a8bdb5;
  color: #173f35;
  box-shadow: 0 8px 18px rgba(19, 42, 35, 0.06);
}
body.manager-workspace .manager-sidebar-cluster {
  display: grid;
  gap: 4px;
}
body.manager-workspace .manager-sidebar-cluster.active {
  background: transparent;
  border-color: transparent;
}
body.manager-workspace .manager-sidebar-cluster-title {
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #567067;
}
body.manager-workspace .manager-sidebar-subnav {
  display: grid;
  gap: 6px;
}
body.manager-workspace #ownerEmployeeTestNavSlot {
  min-width: 0;
  width: 100%;
}
body.manager-workspace .manager-sidebar-owner-slot {
  width: 100%;
}
body.manager-workspace .manager-sidebar-logout {
  width: 100%;
  margin-top: 2px;
  padding: 9px 10px;
  background: #304f47;
  font-size: 12px;
}
body.manager-workspace .owner-test-nav-wrap {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
body.manager-workspace .owner-test-group-title {
  margin: 0 6px 2px;
  display: block;
}
body.manager-workspace .owner-test-nav-panel {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
body.manager-workspace .owner-test-nav-panel select {
  min-width: 0;
  width: 100%;
  border-radius: 9px;
  border: 1px solid rgba(138, 154, 145, 0.72);
  background: rgba(255, 255, 255, 0.88);
  font-size: 12px;
}
body.manager-workspace > main {
  padding: 22px 26px 34px;
  max-width: none;
  margin: 0;
  min-width: 0;
}
body.manager-workspace #appSection {
  display: grid;
  gap: 14px;
}
body.manager-workspace .card {
  margin-bottom: 0;
}
body.manager-workspace .menu-badge {
  background: #a02424;
}
.manager-workspace-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(186, 193, 188, 0.8);
  background:
    radial-gradient(circle at top right, rgba(205, 226, 217, 0.65), transparent 34%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.94), rgba(242, 246, 243, 0.92));
  box-shadow: 0 14px 30px rgba(21, 37, 32, 0.06);
}
.manager-workspace-header > .developer-acting-banner,
.manager-workspace-header > .manager-workspace-heading,
.manager-workspace-header > .manager-workspace-header-meta {
  width: 100%;
}
.manager-workspace-heading {
  display: grid;
  gap: 6px;
}
.manager-workspace-heading h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  color: #17352f;
}
.manager-workspace-description {
  margin: 0;
  max-width: 42rem;
  color: #587069;
  font-size: 14px;
  line-height: 1.45;
}
.manager-workspace-header-meta {
  display: grid;
  justify-items: end;
  gap: 10px;
  width: 100%;
}
.developer-acting-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(18, 74, 118, 0.18);
  background: linear-gradient(135deg, rgba(230, 243, 255, 0.98), rgba(241, 248, 255, 0.94));
}
.developer-acting-banner-copy {
  display: grid;
  gap: 4px;
}
.developer-acting-banner-copy strong {
  color: #153b59;
}
.developer-acting-banner-copy span {
  color: #48657d;
  font-size: 13px;
}
.manager-top-status-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.manager-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
}
.manager-status-pill.ok {
  background: #e4f3e9;
  border-color: #9bc4a8;
  color: #21503a;
}
.manager-status-pill.warn {
  background: #fff0dc;
  border-color: #e0b56c;
  color: #714b15;
}
.manager-status-pill.neutral {
  background: #eef1f3;
  border-color: #ccd4d9;
  color: #354953;
}
.manager-session-label {
  font-size: 12px;
  color: #60736d;
  font-weight: 700;
}
body.manager-workspace.ui-mobile {
  display: block;
}
body.manager-workspace.ui-mobile > header {
  position: static;
  min-height: 0;
  padding: 14px 12px;
  border-right: none;
  border-bottom: 1px solid rgba(162, 174, 167, 0.55);
}
body.manager-workspace.ui-mobile > header .header-row {
  height: auto;
  overflow: visible;
}
body.manager-workspace.ui-mobile.has-manager-mobile-tab-bar .top-nav {
  display: none;
}
body.manager-workspace.ui-mobile > main {
  padding: 14px 12px 24px;
}
body.manager-workspace.ui-mobile.has-manager-mobile-tab-bar > main {
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}
body.manager-workspace.ui-mobile .manager-workspace-header {
  flex-direction: column;
  align-items: stretch;
  padding: 16px;
}
body.manager-workspace.ui-mobile .manager-workspace-header-meta,
body.manager-workspace.ui-mobile .manager-top-status-bar {
  justify-items: start;
  justify-content: flex-start;
}
body.manager-workspace.ui-mobile .owner-settings-toolbar,
body.manager-workspace.ui-mobile .owner-entity-card-head,
body.manager-workspace.ui-mobile .owner-settings-savebar {
  display: grid;
  grid-template-columns: 1fr;
}
body.manager-workspace.ui-mobile .owner-settings-summary,
body.manager-workspace.ui-mobile .owner-settings-grid,
body.manager-workspace.ui-mobile .owner-settings-fields,
body.manager-workspace.ui-mobile .owner-entity-fields,
body.manager-workspace.ui-mobile .onboarding-stepper,
body.manager-workspace.ui-mobile .onboarding-fields,
body.manager-workspace.ui-mobile .onboarding-settings-grid,
body.manager-workspace.ui-mobile .onboarding-review-grid,
body.manager-workspace.ui-mobile .onboarding-list-row,
body.manager-workspace.ui-mobile .platform-admin-layout,
body.manager-workspace.ui-mobile .platform-detail-grid,
body.manager-workspace.ui-mobile .platform-summary-grid,
body.manager-workspace.ui-mobile .platform-domain-verify-row {
  grid-template-columns: 1fr;
}
body.manager-workspace.ui-mobile .owner-settings-toolbar-actions,
body.manager-workspace.ui-mobile .owner-settings-panel-head-inline,
body.manager-workspace.ui-mobile .onboarding-hero,
body.manager-workspace.ui-mobile .owner-settings-savebar {
  width: 100%;
}
body.manager-workspace.ui-mobile .owner-settings-toolbar-actions > button,
body.manager-workspace.ui-mobile .owner-settings-panel-head-inline > button,
body.manager-workspace.ui-mobile .owner-settings-savebar-actions > button,
body.manager-workspace.ui-mobile .onboarding-footer button,
body.manager-workspace.ui-mobile .owner-entity-remove {
  width: 100%;
}
body.manager-workspace.ui-mobile .onboarding-hero,
body.manager-workspace.ui-mobile .onboarding-footer {
  flex-direction: column;
}
body.manager-workspace.ui-mobile > header .brand-block {
  border-bottom: none;
  padding: 0;
  justify-content: center;
}
body.manager-workspace.ui-mobile > header .brand-logo {
  width: auto;
  max-width: min(72vw, 220px);
  max-height: 42px;
}
@media (max-width: 900px) {
  .platform-admin-layout,
  .platform-detail-grid,
  .platform-summary-grid {
    grid-template-columns: 1fr;
  }
  .menu-flyout-panel {
    position: static;
    min-width: 0;
    box-shadow: none;
    margin-top: 4px;
  }
  body.manager-workspace {
    display: block;
  }
  body.manager-workspace > header {
    position: static;
    min-height: 0;
    padding: 14px 12px;
    border-right: none;
    border-bottom: 1px solid rgba(162, 174, 167, 0.55);
  }
  body.manager-workspace > header .header-row {
    height: auto;
    overflow: visible;
  }
  body.manager-workspace.has-manager-mobile-tab-bar .top-nav {
    display: none;
  }
  body.manager-workspace > main {
    padding: 14px 12px 24px;
  }
  body.manager-workspace.has-manager-mobile-tab-bar > main {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
  .manager-workspace-header {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .manager-workspace-header-meta,
  .manager-top-status-bar {
    justify-items: start;
    justify-content: flex-start;
  }
}
header h1 { margin: 0 0 4px; }
header p { margin: 0; }
.nav-btn {
  display: inline-block;
  position: relative;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #1c5648;
  text-decoration: none;
  color: #fff;
  background: #256a5a;
  font-weight: 600;
  box-shadow: var(--button-surface-shadow);
}
.nav-btn.active {
  background: #173f35;
  box-shadow: inset 0 0 0 2px #f3d27a;
}
.nav-btn.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f3d27a;
}
.top-nav button.nav-btn {
  border: 1px solid #1c5648;
  background: #256a5a;
  color: #fff;
  padding: 10px 14px;
}
.owner-test-nav-wrap {
  display: grid;
  gap: 6px;
  align-items: center;
}
.owner-test-nav-panel {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.owner-test-nav-panel select {
  min-width: 180px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #1c5648;
}
.owner-test-toggle-btn {
  background: #4f5d14;
  border: 1px solid #3f4b10;
}
.owner-test-launch-btn {
  background: #0f3d6d;
  border: 1px solid #0a2f56;
}
main { padding: 12px; max-width: 1200px; margin: 0 auto; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.grid { display: grid; gap: 8px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
input, select, button {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #b6b1a5;
  font-size: 14px;
}
textarea {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #b6b1a5;
  font-size: 14px;
  font-family: inherit;
  margin: 8px 0;
}
button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--button-surface-shadow);
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  box-shadow: var(--button-surface-shadow);
}
button.secondary { background: #6b6a67; }
button.warn { background: var(--warn); }
.list { display: grid; gap: 6px; margin-top: 8px; }
.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}
.owner-settings-shell {
  display: grid;
  gap: 16px;
}
.owner-settings-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d8d2c5;
  border-radius: 14px;
  background: linear-gradient(145deg, #fffef9, #f5efe3);
}
.owner-settings-toolbar-copy {
  display: grid;
  gap: 4px;
}
.owner-settings-toolbar-copy h3,
.owner-settings-panel-head h4 {
  margin: 0;
}
.owner-settings-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.owner-settings-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.owner-summary-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(28, 86, 72, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8, #f8f3e7);
}
.owner-summary-card strong {
  font-size: 20px;
  color: #17352f;
  line-height: 1;
}
.owner-summary-card span {
  font-size: 12px;
  color: #596d67;
}
.owner-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.owner-settings-stack {
  display: grid;
  gap: 14px;
}
.owner-settings-savebar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d8d2c5;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 10px 24px rgba(31, 45, 42, 0.12);
  backdrop-filter: blur(8px);
}
.owner-settings-savebar-copy {
  display: grid;
  gap: 4px;
}
.owner-settings-savebar-copy strong {
  color: #17352f;
}
.owner-settings-savebar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#ownerSettingsSaveStatus[data-state="dirty"] {
  color: #8a5806;
}
#ownerSettingsSaveStatus[data-state="saving"] {
  color: #1f5f56;
}
#ownerSettingsSaveStatus[data-state="saved"] {
  color: #48625b;
}
.owner-settings-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #ddd6c8;
  border-radius: 14px;
  background: #fff;
}
.owner-settings-panel-head {
  display: grid;
  gap: 4px;
}
.onboarding-launch-btn {
  margin-left: auto;
}
.onboarding-shell {
  display: grid;
  gap: 18px;
}
.onboarding-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid #dfd2bd;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(212, 148, 69, 0.22), transparent 34%),
    linear-gradient(135deg, #fff9ec, #f4ead8);
}
.onboarding-hero h1,
.onboarding-hero p {
  margin: 0;
}
.onboarding-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.onboarding-step-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dfd6c8;
  border-radius: 999px;
  background: #fffdf8;
  color: #65746f;
  font-size: 13px;
  text-transform: capitalize;
}
.onboarding-step-pill span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #eee4d4;
  color: #3c4c47;
  font-weight: 700;
}
.onboarding-step-pill.active {
  border-color: #2f6f62;
  color: #17352f;
  box-shadow: 0 0 0 2px rgba(47, 111, 98, 0.12);
}
.onboarding-step-pill.complete span {
  background: #2f6f62;
  color: #fff;
}
.onboarding-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #ddd6c8;
  border-radius: 18px;
  background: #fff;
}
.onboarding-card h2,
.onboarding-card p {
  margin: 0;
}
.onboarding-guidance {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #d8e2d7;
  border-radius: 14px;
  background: linear-gradient(180deg, #f6fbf5, #eef7ee);
  color: #28443d;
}
.onboarding-guidance strong {
  color: #17352f;
}
.onboarding-guidance p {
  margin: 0;
}
.onboarding-validation {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid #e4b763;
  border-radius: 14px;
  background: #fff5df;
  color: #6d4b12;
}
.onboarding-validation strong {
  color: #5c3600;
}
.onboarding-recommendation {
  color: #1f5f56;
  font-weight: 700;
}
.onboarding-fields,
.onboarding-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.onboarding-list {
  display: grid;
  gap: 10px;
}
.onboarding-list-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(160px, 1.2fr) 96px auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid #eadfcf;
  border-radius: 14px;
  background: #fffaf1;
}
.onboarding-role-row {
  grid-template-columns: minmax(160px, 1.2fr) minmax(130px, 0.9fr) 92px 112px 112px auto;
}
.onboarding-list-row label,
.onboarding-fields label,
.onboarding-settings-grid label {
  display: grid;
  gap: 6px;
  color: #30413d;
}
.onboarding-footer {
  position: sticky;
  bottom: 12px;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d8d2c5;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 10px 24px rgba(31, 45, 42, 0.12);
  backdrop-filter: blur(8px);
}
.onboarding-review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.onboarding-review-grid > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #eadfcf;
  border-radius: 14px;
  background: #fffaf1;
}
.onboarding-review-grid strong {
  color: #17352f;
  font-size: 20px;
}
.onboarding-review-grid span {
  color: #65746f;
  font-size: 12px;
}
.owner-settings-panel-head-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}
.owner-settings-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.owner-settings-fields label,
.owner-entity-fields label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #30413d;
}
.owner-settings-fields input[type="color"],
.owner-entity-fields input[type="color"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d4ccc0;
  border-radius: 10px;
  padding: 4px;
  background: #fff;
}
.owner-settings-fields > label,
.owner-settings-fields > .toggle-switch-label {
  padding: 12px 14px;
  border: 1px solid #ddd6c8;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefb, #f7f2e8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.owner-settings-fields > label {
  gap: 8px;
}
.owner-settings-fields > label textarea {
  min-height: 120px;
  resize: vertical;
}
.owner-settings-fields > label input:not([type="color"]),
.owner-settings-fields > label select,
.owner-settings-fields > label textarea {
  width: min(100%, 320px);
}
.owner-settings-fields > .toggle-switch-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.owner-settings-fields > .toggle-switch-label .toggle-switch-track {
  order: 2;
  justify-self: end;
}
.owner-settings-fields > .toggle-switch-label .toggle-switch-text {
  order: 1;
  display: grid;
  gap: 3px;
}
.owner-settings-rule-grid {
  display: grid;
  gap: 10px;
}
.owner-setting-rule-card,
.owner-setting-paired-card {
  display: grid;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #ddd6c8;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefb, #f7f2e8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.owner-setting-rule-card-toggle .toggle-switch-label,
.owner-setting-paired-card .toggle-switch-label {
  padding: 0;
}
.owner-setting-rule-input {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: #30413d;
}
.owner-setting-rule-input input {
  width: min(100%, 320px);
}
.owner-toggle-field {
  align-content: start;
}
.owner-toggle-field input[type="checkbox"] {
  margin-right: 8px;
}
.owner-entity-list {
  display: grid;
  gap: 10px;
}
.platform-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.platform-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
}
.platform-admin-column {
  display: grid;
  gap: 14px;
}
.platform-tenant-list {
  display: grid;
  gap: 10px;
}
.platform-tenant-entry {
  display: grid;
  gap: 8px;
}
.platform-tenant-card {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 1px solid #ddd6c8;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fbf6ea);
  color: inherit;
}
.platform-tenant-card.selected {
  border-color: #2c6f61;
  box-shadow: 0 0 0 2px rgba(44, 111, 97, 0.14);
}
.platform-tenant-card-head,
.platform-domain-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.platform-tenant-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #5c6c67;
}
.developer-dashboard-shell {
  gap: 18px;
}
.developer-company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.developer-company-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #ddd6c8;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffefb, #f9f4ea);
}
.developer-company-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.developer-company-card-head h5 {
  margin: 0;
  font-size: 18px;
  color: #17352f;
}
.developer-company-meta {
  display: grid;
  gap: 6px;
  color: #304540;
  font-size: 13px;
}
.developer-company-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(245, 238, 225, 0.88);
}
.developer-company-activity {
  display: grid;
  gap: 6px;
  padding-top: 4px;
}
.developer-company-activity strong {
  color: #17352f;
  font-size: 13px;
}
.developer-company-activity-list {
  display: grid;
  gap: 6px;
}
.developer-company-activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(28, 86, 72, 0.08);
}
.platform-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.platform-detail-grid .platform-detail-notes {
  grid-column: 1 / -1;
}
.platform-checkbox {
  align-content: end;
}
.platform-domain-list {
  display: grid;
  gap: 10px;
}
.platform-domain-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #e0dacc;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fcf8ef);
}
.platform-domain-verify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.owner-entity-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e0dacc;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fcf8ef);
}
.owner-entity-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.owner-entity-remove {
  flex: 0 0 auto;
}
.owner-entity-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.owner-role-group-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.owner-role-group-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #d8d2c5;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: #30413d;
}
.owner-role-group-chip input {
  margin: 0;
}
.owner-entity-wide {
  grid-column: 1 / -1;
}
.schedule-card-selected {
  border-color: #d49a1d;
  box-shadow: 0 0 0 2px rgba(212, 154, 29, 0.25);
  background: linear-gradient(180deg, #fffdf4, #fff);
}
.schedules-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.schedules-col {
  display: grid;
  gap: 6px;
  align-content: start;
}
.schedules-tools-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.schedule-card {
  cursor: pointer;
}
.schedule-card-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}
.schedule-card-left {
  display: grid;
  gap: 4px;
}
.schedule-card-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #405550;
}
.schedule-range-short {
  font-size: 15px;
}
.schedule-card-right {
  display: grid;
  gap: 4px;
  align-content: start;
  justify-items: start;
  min-width: 220px;
}
.sched-check-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #2a3834;
}
.sched-check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #4b9467;
  background: #d8f3df;
  color: #1c7d3f;
  font-weight: 700;
}
.sched-check-empty {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #b8b4aa;
  background: #f7f5ef;
}
.schedule-card-actions {
  margin-top: 6px;
}
.schedule-card-footer {
  margin-top: 4px;
  justify-content: flex-end;
}
.schedule-delete-small {
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.1;
}
.hidden { display: none; }
.employee-test-mode-card {
  border-color: #c6921c;
  background: #fffdf4;
}
.employee-test-mode-title {
  color: #6e4f00;
  font-weight: 700;
}
.employee-test-mode-log {
  max-height: 220px;
  overflow: auto;
}
.hint { color: #555; font-size: 12px; }
.role-skill, .template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.template-grid {
  grid-template-columns: 1fr;
}
.template-matrix-wrap {
  overflow-x: auto;
}
.template-matrix {
  table-layout: fixed;
  width: 100%;
  min-width: 1080px;
}
.template-library-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid #e1d7c7;
  border-radius: 12px;
  background: #fffaf1;
}
.template-library-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.template-library-field {
  flex: 1 1 260px;
  min-width: 220px;
}
.template-library-field input,
.template-library-field select {
  width: 100%;
}
.template-matrix th:first-child,
.template-matrix td:first-child {
  width: 180px;
}
.template-matrix th {
  text-align: center;
}
.template-matrix .tmpl-role {
  background: #f9f6ef;
  position: sticky;
  left: 0;
  z-index: 1;
}
.template-matrix .tmpl-cell {
  vertical-align: top;
  min-height: 88px;
  background: #fffdf8;
}
.tmpl-cell-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.tmpl-cell-count {
  font-size: 11px;
  font-weight: 700;
  color: #5d594f;
}
.tmpl-cell-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.tmpl-cell-btn {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
}
.tmpl-empty-hint {
  display: block;
  padding-top: 2px;
}
.tmpl-shift-chip {
  border-radius: 8px;
  border: 1px solid #d8d2c5;
  background: #f4efe3;
  padding: 5px 6px;
  margin: 4px 0;
}
.tmpl-shift-chip.period-am {
  background: linear-gradient(160deg, #ffe38a, #f4c94e);
}
.tmpl-shift-chip.period-pm {
  background: linear-gradient(160deg, #9fd0ff, #5ca8ef);
}
.tmpl-shift-chip.role-am-host-1 {
  background: linear-gradient(160deg, #cdeec8, #a8df9f);
}
.tmpl-shift-chip.role-am-host-2 {
  background: linear-gradient(160deg, #e6d8ff, #cdb5ff);
}
.tmpl-shift-chip.role-pm-host-1 {
  background: linear-gradient(160deg, #ffd6e8, #ffb3d6);
}
.tmpl-shift-chip.role-pm-host-2 {
  background: linear-gradient(160deg, #ffe3bf, #ffc47c);
}
.tmpl-chip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tmpl-chip-title {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 0;
}
.tmpl-skill-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
}
.tmpl-skill-inline input[type="number"] {
  width: 46px;
  min-width: 46px;
  padding: 3px 4px;
  font-size: 11px;
}
.tmpl-chip-row {
  display: grid;
  gap: 6px;
  align-items: end;
  margin-top: 3px;
}
.tmpl-chip-times {
  grid-template-columns: 1fr;
}
.tmpl-chip-row label {
  font-size: 10px;
  display: grid;
  gap: 2px;
}
.tmpl-chip-row input[type="time"] {
  width: 100%;
  min-width: 0;
  padding: 3px 4px;
  font-size: 11px;
  height: 28px;
}
.template-calendar {
  display: grid;
  grid-template-columns: 1fr;
}
.calendar-day {
  min-width: 0;
}
.calendar-day h4 {
  margin: 0 0 8px;
}
.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.day-tab {
  background: #ece7dc;
  color: #224038;
  border: 1px solid #c7c1b5;
}
.day-tab.active {
  background: #256a5a;
  color: #fff;
}
.day-timeline {
  position: relative;
  height: min(72vh, 760px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(to bottom, rgba(37, 106, 90, 0.05) 1px, transparent 1px) 0 0 / 100% 43.75px,
    #fffef9;
  overflow: hidden;
}
.day-lane-canvas {
  position: relative;
  height: 100%;
  width: 100%;
}
.calendar-hour-mark {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(90, 90, 90, 0.25);
  pointer-events: none;
}
.calendar-hour-mark span {
  position: absolute;
  top: -8px;
  left: 4px;
  font-size: 10px;
  color: #6b6b6b;
  background: rgba(255, 255, 255, 0.75);
  padding: 0 3px;
}
.shift-box {
  position: absolute;
  padding: 8px;
  background: linear-gradient(160deg, #2e7d6a, #245c4f);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  overflow: hidden;
  touch-action: none;
}
.shift-box.dragging {
  box-shadow: 0 0 0 2px #f4e6ca;
}
.shift-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}
.shift-time {
  font-size: 11px;
  margin: 2px 0 4px;
}
.shift-skill-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}
.shift-skill-label input {
  width: 64px;
  padding: 3px 4px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #d2e7e0;
}
.role-skill-item .skill-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.employee-card {
  padding: 10px;
}
.employee-card.employee-card-out {
  background: #fff1f1;
  border-color: #e4b0b0;
}
.quick-add-grid {
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
}
.employee-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.employee-card.employee-card-collapsible {
  cursor: pointer;
}
.employee-card.employee-card-collapsible:hover {
  border-color: #b6c9c1;
  box-shadow: 0 6px 16px rgba(35, 61, 55, 0.08);
}
.employee-card.employee-card-collapsible.is-open {
  border-color: #8eb0a4;
  box-shadow: 0 8px 18px rgba(35, 61, 55, 0.1);
}
.employee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.employee-summary-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
  box-shadow: none;
}
.employee-summary-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.employee-summary-text b,
.employee-summary-text span,
.employee-summary-text .hint {
  overflow-wrap: anywhere;
}
.employee-caret {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: #405550;
  font-size: 16px;
  line-height: 1;
  margin-top: 1px;
}
.employee-row-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}
.employee-editor {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: grid;
  gap: 8px;
}
.employee-editor-section {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfcfa;
}
.employee-editor-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.employee-editor-section-head h4 {
  margin: 0 0 4px;
  font-size: 13px;
}
.employee-out-summary-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.employee-out-status-current {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e4c3a5;
  border-radius: 10px;
  background: #fff8ef;
}
.employee-out-indefinite-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}
.staff-out-row td {
  background: #fff1f1;
}
.employee-oncall-range-controls {
  display: grid;
  gap: 8px;
}
.employee-self-serve-grid {
  align-items: end;
}
.add-employee-card-head,
.add-employee-dialog-head,
.add-employee-dialog-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.add-employee-card-head h2,
.add-employee-card-head p,
.add-employee-dialog-head h3 {
  margin: 0;
}
.add-employee-dialog-card {
  display: grid;
  gap: 12px;
  width: min(760px, calc(100vw - 28px));
  max-height: min(88vh, 860px);
  overflow: auto;
}
.add-employee-dialog-actions {
  position: sticky;
  bottom: -16px;
  z-index: 2;
  align-items: center;
  padding: 12px 0 0;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0), #fffdf8 32%);
}
@media (max-width: 820px) {
  .quick-add-grid,
  .employee-toolbar,
  .employee-self-serve-grid {
    grid-template-columns: 1fr;
  }
  .add-employee-card-head,
  .add-employee-dialog-head,
  .add-employee-dialog-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .add-employee-card-head > button,
  .add-employee-dialog-actions > button,
  .add-employee-dialog-head > button {
    width: 100%;
  }
  .availability-painter-table {
    border-spacing: 3px;
  }
  .availability-painter-table td {
    width: 38px;
  }
  .availability-painter-cell {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }
}
.employee-edit-split {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 10px;
  align-items: start;
}
.employee-role-col h4,
.employee-avail-col h4 {
  margin: 0 0 6px;
  font-size: 13px;
}
.employee-role-list {
  grid-template-columns: 1fr;
}
.employee-role-list .role-skill-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}
.skill-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.skill-rank-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: grab;
  user-select: none;
}
.skill-rank-item:active {
  cursor: grabbing;
}
.skill-rank-item.dragging {
  opacity: 0.5;
}
.skill-rank-item.drag-over {
  border-color: #256a5a;
  background: #eef8f4;
}
.skill-rank-handle {
  color: var(--hint, #8a9ba8);
  font-size: 14px;
  letter-spacing: -2px;
  line-height: 1;
  flex-shrink: 0;
}
.hidden,
.employee-editor.hidden {
  display: none !important;
}
.availability { display: grid; gap: 4px; margin-top: 8px; }
.availability-painter-host {
  margin-top: 2px;
}
.availability-painter {
  display: grid;
  gap: 8px;
}
.availability-painter-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.availability-painter-tool.is-active {
  background: #214b41;
  border-color: #214b41;
  color: #fff;
}
.availability-painter-scroll {
  overflow-x: auto;
}
.availability-painter-table {
  width: auto;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 4px;
}
.availability-painter-table th {
  font-size: 11px;
  color: #526761;
  font-weight: 700;
  text-align: center;
}
.availability-painter-table tbody th {
  text-align: left;
  padding-right: 2px;
  width: 30px;
}
.availability-painter-table td {
  padding: 0;
  width: 42px;
}
.availability-painter-cell {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid #cad8d2;
  background: #fff;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  user-select: none;
  -webkit-user-select: none;
}
.availability-painter-cell:hover,
.availability-painter-cell:focus-visible {
  border-color: #8ca9a0;
  box-shadow: 0 0 0 2px rgba(76, 124, 110, 0.14);
}
.availability-painter-cell.is-regular {
  background: linear-gradient(180deg, #7ca892 0%, #658f7d 100%);
  border-color: #587f6f;
}
.availability-painter-cell.is-oncall {
  background:
    repeating-linear-gradient(135deg, rgba(39, 83, 72, 0.18) 0 8px, rgba(39, 83, 72, 0.06) 8px 16px),
    linear-gradient(180deg, #eef5f1 0%, #d9e8e0 100%);
  border-color: #89a79d;
}
.availability-painter-cell.is-clear {
  background: #fff;
  border-style: dashed;
}
.availability-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.availability-col {
  display: grid;
  gap: 4px;
  align-content: start;
}
.warn { color: var(--warn); font-weight: 600; }
button.warn { color: #fff; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.table th, .table td {
  border: 1px solid var(--line);
  padding: 4px;
  text-align: left;
}
.schedule-grid th:first-child,
.schedule-grid td:first-child {
  min-width: 180px;
}
.sched-cell {
  vertical-align: top;
  min-height: 70px;
  background: #fffdf8;
  text-align: center;
}
.sched-cell.sched-cell-unavailable {
  background: #d5dae0;
}
.sched-cell.sched-cell-timeoff-requested,
.sched-cell.sched-cell-timeoff-requested.sched-cell-unavailable,
.sched-cell.sched-cell-timeoff-requested.sched-cell-am-unavailable,
.sched-cell.sched-cell-timeoff-requested.sched-cell-pm-unavailable {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(215, 129, 129, 0.36) 0 8px,
      rgba(215, 129, 129, 0.16) 8px 16px
    ),
    #dbe0e6 !important;
  box-shadow: inset 0 0 0 1px #c98d8d;
}
.sched-cell.sched-cell-timeoff-approved,
.sched-cell.sched-cell-timeoff-approved.sched-cell-unavailable,
.sched-cell.sched-cell-timeoff-approved.sched-cell-am-unavailable,
.sched-cell.sched-cell-timeoff-approved.sched-cell-pm-unavailable {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(190, 86, 86, 0.44) 0 8px,
      rgba(190, 86, 86, 0.2) 8px 16px
    ),
    #c4cbd4 !important;
  box-shadow: inset 0 0 0 1px #9e5f5f;
}
.sched-cell.sched-cell-oncall {
  background: #dff3d8;
}
.sched-cell.sched-cell-oncall-am {
  background:
    linear-gradient(to bottom right, transparent calc(50% - 0.6px), #87b292 calc(50% - 0.6px), #87b292 calc(50% + 0.6px), transparent calc(50% + 0.6px)),
    linear-gradient(to bottom right, #dff3d8 0 50%, transparent 50% 100%),
    #fffdf8;
}
.sched-cell.sched-cell-oncall-pm {
  background:
    linear-gradient(to bottom right, transparent calc(50% - 0.6px), #87b292 calc(50% - 0.6px), #87b292 calc(50% + 0.6px), transparent calc(50% + 0.6px)),
    linear-gradient(to bottom right, transparent 0 50%, #dff3d8 50% 100%),
    #fffdf8;
}
.sched-cell.sched-cell-am-unavailable {
  background:
    linear-gradient(to bottom right, transparent calc(50% - 0.6px), #848f9b calc(50% - 0.6px), #848f9b calc(50% + 0.6px), transparent calc(50% + 0.6px)),
    linear-gradient(to bottom right, #d5dae0 0 50%, transparent 50% 100%),
    #fffdf8;
}
.sched-cell.sched-cell-pm-unavailable {
  background:
    linear-gradient(to bottom right, transparent calc(50% - 0.6px), #848f9b calc(50% - 0.6px), #848f9b calc(50% + 0.6px), transparent calc(50% + 0.6px)),
    linear-gradient(to bottom right, transparent 0 50%, #d5dae0 50% 100%),
    #fffdf8;
}
.sched-cell.drag-over {
  outline: 2px dashed #256a5a;
  outline-offset: -2px;
  background: #eef8f4 !important;
}
.shift-chip {
  color: #1f2d2a;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 6px;
  margin: 4px 0;
  cursor: grab;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 6px);
  max-width: 100%;
  position: relative;
}
.shift-chip.shift-chip-interactive {
  cursor: pointer;
}
.shift-chip.shift-chip-readonly {
  cursor: default;
}
.shift-chip.has-lock .shift-chip-head {
  padding-left: 26px;
}
.shift-chip-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}
.chip-lock-btn {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.94);
  color: #1d312b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 1;
}
.chip-lock-btn:hover {
  background: rgba(255, 255, 255, 1);
}
.chip-lock-btn.chip-lock-static {
  cursor: default;
  pointer-events: none;
}
.chip-lock-glyph {
  font-size: 12px;
  line-height: 1;
}
.chip-lock-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 16px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  border: 1px solid #8f885d;
  background: #f8e8a0;
  color: #4a4423;
  font-size: 9px;
  line-height: 12px;
  font-weight: 700;
  text-align: center;
}
.chip-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.shift-chip.period-am {
  background: linear-gradient(160deg, #ffe38a, #f4c94e);
}
.shift-chip.period-pm {
  background: linear-gradient(160deg, #9fd0ff, #5ca8ef);
}
.shift-chip.role-am-host-1 {
  background: linear-gradient(160deg, #cdeec8, #a8df9f);
}
.shift-chip.role-am-host-2 {
  background: linear-gradient(160deg, #e6d8ff, #cdb5ff);
}
.shift-chip.role-pm-host-1 {
  background: linear-gradient(160deg, #ffd6e8, #ffb3d6);
}
.shift-chip.role-pm-host-2 {
  background: linear-gradient(160deg, #ffe3bf, #ffc47c);
}
.shift-chip.unfilled {
  background: linear-gradient(160deg, #8b1e1e, #6f1717);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.shift-chip.review-shift {
  background: linear-gradient(160deg, #f4d46c, #d8b042);
  color: #4a3710;
  border: 1px solid rgba(102, 74, 12, 0.35);
}
.shift-chip.training {
  border-style: dashed;
  border-width: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.shift-chip.dragging {
  opacity: 0.65;
}
.shift-chip.external-assignment-chip {
  cursor: default;
  opacity: 0.76;
  border-style: dashed;
}
.shift-chip[data-switch-chip] {
  cursor: pointer;
}
.chip-role {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center !important;
  width: 100%;
  display: block;
  margin: 0 auto;
}
.chip-time {
  font-size: 11px;
  opacity: 0.95;
  text-align: center !important;
  width: 100%;
  display: block;
  margin: 0 auto;
}
.chip-external-note {
  font-weight: 700;
  color: #3d574f;
}
.chip-remove-btn {
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 10px;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.92);
  color: #3c2a2a;
  cursor: pointer;
  box-shadow: var(--button-surface-shadow-soft);
}
.chip-menu-btn,
.chip-action-btn,
.cell-menu-btn {
  align-self: flex-end;
  margin-bottom: 4px;
  padding: 2px 8px;
  font-size: 10px;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: #243732;
  cursor: pointer;
  box-shadow: var(--button-surface-shadow-soft);
}
.chip-menu-btn:hover,
.chip-action-btn:hover,
.cell-menu-btn:hover {
  background: rgba(255, 255, 255, 1);
}
.chip-action-btn {
  margin-bottom: 0;
  min-width: 28px;
  padding: 2px 7px;
}
.cell-menu-btn {
  float: right;
  margin: 1px 1px 2px 0;
  min-width: 28px;
  padding: 1px 7px;
  font-size: 11px;
}
.chip-remove-btn:hover {
  background: rgba(255, 255, 255, 1);
}
.status-legend-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.85);
  color: #263532;
}
.status-pill.status-open {
  background: #eef2f4;
  border-color: #c9d2d8;
  color: #2d3f49;
}
.status-pill.status-pending-employee {
  background: #fff4da;
  border-color: #e5c57a;
  color: #5f4a1c;
}
.status-pill.status-pending-manager {
  background: #ffe9cb;
  border-color: #e4af5d;
  color: #6a4518;
}
.status-pill.status-approved {
  background: #dff3d8;
  border-color: #93c088;
  color: #1f5131;
}
.status-pill.status-denied {
  background: #ffe2e2;
  border-color: #d28f8f;
  color: #6f2424;
}
.status-pill.status-review {
  background: #ffe9ad;
  border-color: #d4b35a;
  color: #6a5416;
}
.status-pill.status-canceled {
  background: #f1ece7;
  border-color: #c9c0b6;
  color: #5d554b;
}
.shift-chip.status-pending-employee,
.shift-chip.status-pending-manager,
.shift-chip.status-approved,
.shift-chip.status-denied,
.shift-chip.status-review,
.shift-chip.status-canceled {
  border-width: 2px;
}
.shift-chip.status-pending-employee {
  border-color: #ddb75f;
}
.shift-chip.status-pending-manager {
  border-color: #cf9647;
}
.shift-chip.status-approved {
  border-color: #6ea975;
}
.shift-chip.status-denied {
  border-color: #ab6060;
}
.shift-chip.status-review {
  border-color: #b8912f;
}
.shift-chip.status-canceled {
  border-color: #9e9387;
}
.shift-board-head {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}
.switch-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.switch-day-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: #fff;
}
.switch-day-head {
  font-size: 12px;
  color: #2f3f3a;
  margin-bottom: 4px;
}
.switch-day-chips {
  display: grid;
  gap: 4px;
}
.chip-context-menu {
  position: fixed;
  z-index: 9999;
  min-width: 170px;
  background: #fff;
  border: 1px solid #cfc8ba;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  padding: 4px;
}
.chip-context-item {
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #21302d;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  box-shadow: none;
}
.chip-context-item:hover {
  background: #eef4f1;
}
.lock-popover {
  position: fixed;
  z-index: 10000;
  width: min(320px, calc(100vw - 16px));
  background: #fff;
  border: 1px solid #cfc8ba;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  padding: 10px;
  display: grid;
  gap: 6px;
}
.lock-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lock-popover label {
  display: grid;
  gap: 4px;
  font-size: 12px;
}
.tbd-row td {
  background: #fff4f0;
}
.tbd-row td:first-child {
  color: #8b1e1e;
}
.warnings-bottom {
  margin-top: 10px;
}
.lock-calendar th:first-child,
.lock-calendar td:first-child {
  min-width: 180px;
}
.lock-calendar td {
  vertical-align: top;
  min-height: 58px;
  background: #fffdf8;
}
.lock-pill {
  background: #efe9db;
  border: 1px solid #d8d2c5;
  border-radius: 8px;
  padding: 4px 6px;
  margin: 3px 0;
  font-size: 11px;
  line-height: 1.2;
}
.lock-pill-btn {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 10px;
  background: #efefe8;
  margin-right: 4px;
}
.saved-badge {
  display: inline-block;
  color: #147a2f;
  font-weight: 700;
}
.working-badge {
  display: inline-block;
  color: #2e4b55;
  font-weight: 700;
}
.schedule-generate-shell {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(260px, 0.9fr);
  gap: 14px;
  align-items: stretch;
}
.schedule-generate-config,
.schedule-generate-actions {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(170, 181, 174, 0.52);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(244, 248, 244, 0.92));
}
.schedule-generate-field {
  display: grid;
  gap: 6px;
}
.schedule-generate-label,
.schedule-generate-summary-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f766d;
}
.schedule-generate-summary {
  display: grid;
  gap: 6px;
}
.schedule-generate-button-row,
.schedule-generate-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.schedule-generate-button-row > button {
  flex: 1 1 180px;
}
.schedule-generate-feedback {
  min-height: 20px;
}
.schedule-range-blocked-chip {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf2ef;
  border: 1px solid #c8d5cf;
  color: #4a6158;
  font-size: 11px;
}
.timeoff-overlap-alert {
  margin-top: 8px;
  border: 1px solid #8b1e1e;
  background: #fff3f3;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  line-height: 1.35;
}
.timeoff-calendar-block {
  display: grid;
  gap: 10px;
  --timeoff-calendar-day-bg: #f7f2ea;
  --timeoff-calendar-border: #d8d2c5;
  --timeoff-calendar-today: #8fb7aa;
  --timeoff-calendar-empty-bg: #ffffff;
  --timeoff-calendar-empty-text: #7a786e;
  --timeoff-calendar-approved: #6ea975;
  --timeoff-calendar-denied: #ab6060;
  --timeoff-calendar-pending: #cf9647;
}
.timeoff-calendar-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
}
.timeoff-calendar-block-head h3 {
  margin: 0 0 4px;
}
.timeoff-calendar-wrap {
  overflow-x: auto;
  padding-bottom: 2px;
}
.timeoff-calendar-grid {
  display: grid;
  gap: 10px;
  min-width: 900px;
}
.timeoff-calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.timeoff-calendar-day {
  min-height: 136px;
  border: 1px solid var(--timeoff-calendar-border);
  border-radius: 12px;
  padding: 8px;
  background: linear-gradient(180deg, #fffdfa, var(--timeoff-calendar-day-bg));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
}
.timeoff-calendar-day.is-today {
  border-color: var(--timeoff-calendar-today);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 0 1px rgba(37, 106, 90, 0.12);
}
.timeoff-calendar-day.timeoff-calendar-day-empty {
  min-height: 0;
  background: transparent;
  border-style: dashed;
  border-color: var(--timeoff-calendar-border);
  box-shadow: none;
}
.timeoff-calendar-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.timeoff-calendar-day-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6f7268;
}
.timeoff-calendar-day-date {
  font-size: 12px;
  font-weight: 700;
  color: #223732;
}
.timeoff-calendar-day-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timeoff-calendar-empty {
  margin-top: auto;
  padding: 6px 7px;
  border-radius: 9px;
  border: 1px dashed var(--timeoff-calendar-border);
  background: var(--timeoff-calendar-empty-bg);
  color: var(--timeoff-calendar-empty-text);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.timeoff-calendar-chip {
  border-radius: 10px;
  border: 2px solid transparent;
  padding: 6px 7px;
  box-shadow: 0 4px 10px rgba(36, 53, 46, 0.12);
  display: grid;
  gap: 4px;
}
.timeoff-calendar-chip.status-approved {
  border-color: var(--timeoff-calendar-approved);
}
.timeoff-calendar-chip.status-denied {
  border-color: var(--timeoff-calendar-denied);
  border-style: dashed;
  opacity: 0.76;
}
.timeoff-calendar-chip.status-pending-manager,
.timeoff-calendar-chip.status-pending-employee {
  border-color: var(--timeoff-calendar-pending);
}
.timeoff-calendar-chip-name {
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
}
.timeoff-calendar-chip-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
}
.timeoff-calendar-chip-status {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--timeoff-calendar-denied);
  color: var(--timeoff-calendar-denied);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.timeoff-calendar-sidecar {
  display: grid;
  gap: 8px;
  padding-top: 2px;
  border-top: 1px solid rgba(216, 210, 197, 0.9);
}
@media (max-width: 980px) {
  .timeoff-calendar-grid {
    min-width: 780px;
  }
  .timeoff-calendar-day {
    min-height: 124px;
  }
}
@media (max-width: 640px) {
  .timeoff-calendar-grid {
    min-width: 700px;
  }
  .timeoff-calendar-day {
    min-height: 112px;
    padding: 7px;
  }
  .timeoff-calendar-chip {
    padding: 5px 6px;
  }
  .timeoff-calendar-chip-name {
    font-size: 11px;
  }
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 25, 23, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}
.modal-card {
  width: min(700px, 100%);
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}
.modal-card h3 {
  margin: 0 0 6px;
}
.modal-card textarea {
  margin-top: 6px;
}
.modal-meta-stack,
.modal-action-stack {
  display: grid;
  gap: 8px;
}
.modal-meta-stack {
  margin-top: 8px;
}
.modal-action-stack {
  margin-top: 12px;
}
.unsaved-changes-card {
  width: min(520px, 100%);
  padding: 18px;
}
.unsaved-changes-card p {
  margin: 6px 0 0;
  color: #30423d;
}
.unsaved-changes-detail {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #eadfcf;
  border-radius: 10px;
  background: #fff8ec;
  color: #6d4b12;
  font-size: 13px;
}
.unsaved-changes-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.template-sync-preview-card {
  width: min(760px, 100%);
}
.template-sync-preview-copy {
  margin: 12px 0 0;
  color: #30423d;
}
.template-sync-preview-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.template-sync-preview-stat {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #d8d2c7;
  background: #f7f2ea;
}
.template-sync-preview-stat strong {
  font-size: 24px;
  line-height: 1;
}
.template-sync-preview-stat span {
  font-size: 13px;
  color: #576760;
}
.template-sync-preview-stat.success {
  background: #eef7ec;
  border-color: #bfd6b8;
}
.template-sync-preview-stat.warn {
  background: #fff5d7;
  border-color: #e8cf87;
}
.template-sync-preview-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3efe8;
  color: #3f4b47;
}
.template-sync-preview-note.warn {
  background: #fff5d7;
  color: #5a4511;
}
.template-sync-preview-conflicts {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.template-sync-preview-conflict-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffdf9;
  border: 1px solid #e4dccd;
  font-size: 13px;
}

.card-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5f7b72;
}
.workspace-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.workspace-section-nav::-webkit-scrollbar {
  display: none;
}
.workspace-section-link {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #cbd5cf;
  background: rgba(255, 253, 248, 0.92);
  color: #173f35;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: var(--button-surface-shadow-soft);
}
.workspace-section-link.active,
.workspace-section-link:hover,
.workspace-section-link:focus-visible {
  background: #173f35;
  color: #fff;
  border-color: #173f35;
}
body.ui-mobile .workspace-section-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin-top: -2px;
  background: linear-gradient(180deg, rgba(245, 243, 239, 0.97), rgba(245, 243, 239, 0.88), rgba(245, 243, 239, 0));
  scrollbar-width: none;
}
body.ui-mobile .workspace-section-link {
  padding: 10px 13px;
}
.employee-portal {
  display: grid;
  gap: 14px;
}
.employee-portal .card {
  margin-bottom: 0;
}
.employee-dashboard-hero {
  display: grid;
  gap: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(243, 210, 122, 0.34), transparent 34%),
    linear-gradient(135deg, #fffdf8, #f2f7f4);
}
.employee-hero-copy {
  display: grid;
  gap: 8px;
}
.employee-hero-copy h2,
.employee-upcoming-panel h3 {
  margin: 0;
}
.employee-hero-message {
  margin: 0;
  max-width: 56rem;
  font-size: 15px;
  line-height: 1.45;
  color: #385149;
}
.employee-hero-actions {
  margin-top: 4px;
}
.employee-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.employee-stat-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(28, 86, 72, 0.14);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 22px rgba(24, 41, 36, 0.06);
}
.employee-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: #5b726a;
}
.employee-stat-value {
  font-size: 19px;
  line-height: 1.15;
  color: #163830;
}
.employee-stat-meta {
  font-size: 12px;
  line-height: 1.35;
  color: #557068;
}
.employee-upcoming-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(28, 86, 72, 0.14);
  background: rgba(255, 255, 255, 0.88);
}
.employee-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.employee-upcoming-list {
  display: grid;
  gap: 8px;
}
.employee-upcoming-item {
  display: grid;
  grid-template-columns: minmax(104px, auto) 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf8, #f7f3ea);
  border: 1px solid #e0d7c8;
}
.employee-upcoming-date {
  font-size: 12px;
  font-weight: 700;
  color: #2a4b42;
}
.employee-upcoming-main {
  display: grid;
  gap: 3px;
}
.employee-upcoming-role {
  font-weight: 700;
  color: #183c34;
}
.employee-upcoming-time {
  font-size: 12px;
  color: #586b65;
}
.employee-upcoming-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #e8f1ed;
  color: #1e5d4f;
  font-size: 11px;
  font-weight: 700;
}
.employee-dashboard-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.dashboard-action-card {
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: left;
  background: linear-gradient(180deg, #fffdf8, #f6f2e8);
  color: #1f2d2a;
  border: 1px solid #d7d2c5;
  padding: 16px;
  box-shadow: var(--button-surface-shadow-soft);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, filter 120ms ease;
}
.dashboard-action-card strong {
  font-size: 18px;
  line-height: 1.2;
  color: #163830;
}
.dashboard-action-card:hover,
.dashboard-action-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(26, 44, 39, 0.09);
  border-color: #94b2a8;
}
.dashboard-action-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a8178;
}
.dashboard-action-summary {
  font-size: 13px;
  line-height: 1.4;
  color: #536963;
}
.employee-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.95fr);
  gap: 14px;
  align-items: start;
}
.employee-dashboard-primary,
.employee-dashboard-secondary {
  display: grid;
  gap: 14px;
}
.employee-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.employee-card-header h2 {
  margin: 0;
}
.employee-inline-panel {
  margin-top: 8px;
}
.employee-inline-panel-row {
  margin-top: 6px;
}
body.ui-mobile .employee-portal .row {
  flex-direction: column;
  align-items: stretch;
}
body.ui-mobile .employee-portal .row > button {
  width: 100%;
}
body.ui-mobile .employee-portal .row > .saved-badge,
body.ui-mobile .employee-portal .row > .working-badge,
body.ui-mobile .employee-portal .row > .hint {
  align-self: flex-start;
}
body.ui-mobile .schedule-generate-shell {
  grid-template-columns: 1fr;
}
body.ui-mobile .schedule-generate-button-row > button {
  width: 100%;
}
body.ui-mobile .employee-inline-panel-row {
  align-items: stretch;
}
body.ui-mobile .employee-inline-panel-row label {
  width: 100%;
}
body.ui-mobile .switch-calendar-grid {
  grid-template-columns: 1fr;
}
body.ui-mobile .switch-day-card {
  padding: 10px;
}
body.ui-mobile .shift-chip {
  padding: 10px 10px 12px;
}
body.ui-mobile .chip-action-btn {
  min-width: 34px;
  min-height: 30px;
  font-size: 12px;
  padding: 4px 10px;
}
body.ui-mobile .employee-upcoming-item {
  grid-template-columns: 1fr;
  justify-items: start;
}
body.ui-mobile .employee-hero-stats,
body.ui-mobile .employee-dashboard-actions,
body.ui-mobile .employee-dashboard-layout {
  grid-template-columns: 1fr;
}
body.ui-mobile .employee-dashboard-hero {
  padding: 14px;
}

.manager-mobile-schedule {
  display: grid;
  gap: 14px;
}
.manager-mobile-schedule-head {
  display: grid;
  gap: 10px;
}
.manager-mobile-schedule-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.manager-mobile-summary-card {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid rgba(28, 86, 72, 0.14);
  background: linear-gradient(180deg, #fffdf8, #f7f3ea);
}
.manager-mobile-summary-card strong {
  font-size: 18px;
  line-height: 1.1;
  color: #17352f;
}
.manager-mobile-summary-card span {
  font-size: 12px;
  color: #5a7069;
}
.manager-mobile-schedule-pane {
  display: grid;
  gap: 10px;
}
.manager-mobile-shift-list {
  display: grid;
  gap: 8px;
}
.manager-mobile-shift-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border-color: rgba(191, 202, 196, 0.9);
  box-shadow: 0 8px 18px rgba(21, 37, 32, 0.06);
}
.manager-mobile-shift-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.manager-mobile-shift-main {
  display: grid;
  gap: 5px;
}
.manager-mobile-shift-main strong {
  color: #17352f;
  font-size: 16px;
  line-height: 1.25;
}
.manager-mobile-shift-meta {
  font-size: 13px;
  line-height: 1.35;
  color: #536963;
}
.manager-mobile-shift-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}
.manager-mobile-shift-actions button {
  width: 100%;
  min-height: 48px;
}
.manager-mobile-date-nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  scrollbar-width: none;
}
.manager-mobile-date-link {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d7d2c5;
  background: #fffdf8;
  color: #1f2d2a;
  text-align: left;
  box-shadow: 0 8px 16px rgba(21, 37, 32, 0.05);
}
.manager-mobile-date-link strong,
.manager-mobile-date-link span {
  display: block;
}
.manager-mobile-date-link span {
  font-size: 12px;
  color: #60736d;
}
.manager-mobile-date-link.active {
  background: #173f35;
  border-color: #173f35;
  color: #fff;
}
.manager-mobile-date-link.active span {
  color: rgba(255, 255, 255, 0.85);
}
.manager-mobile-empty {
  border: 1px dashed #cfc8ba;
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
}
body.ui-mobile .modal-backdrop {
  align-items: flex-end;
}
body.ui-mobile .modal-card {
  width: 100%;
  max-height: min(88vh, 760px);
  overflow: auto;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding: 16px;
}
body.ui-mobile .modal-card .row {
  flex-direction: column;
  align-items: stretch;
}
body.ui-mobile .modal-card .row > button {
  width: 100%;
}
body.ui-mobile .template-sync-preview-summary {
  grid-template-columns: 1fr;
}
body.ui-mobile .template-sync-preview-conflict-row {
  grid-template-columns: 1fr;
}
body.ui-mobile .manager-mobile-schedule-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.ui-mobile .manager-mobile-schedule-head h3 {
  font-size: 20px;
  line-height: 1.2;
}
body.ui-mobile .manager-mobile-schedule .status-legend-line {
  justify-content: flex-start;
}
body.ui-mobile .manager-mobile-schedule .row {
  flex-direction: column;
  align-items: stretch;
}
body.ui-mobile .manager-mobile-schedule .row > button {
  width: 100%;
}

@media (max-width: 800px) {
  .schedules-split {
    grid-template-columns: 1fr;
  }
  .schedules-tools-bottom {
    grid-template-columns: 1fr;
  }
  .schedule-card-main {
    grid-template-columns: 1fr;
  }
  .schedule-card-right {
    min-width: 0;
  }
  .employee-edit-split {
    grid-template-columns: 1fr;
  }
  .brand-logo {
    height: 46px;
    max-width: min(100%, 360px);
  }
  .owner-branding-preview-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .owner-branding-preview-image {
    width: 100%;
  }
  .workspace-section-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 0 10px;
    margin-top: -2px;
    background: linear-gradient(180deg, rgba(245, 243, 239, 0.97), rgba(245, 243, 239, 0.88), rgba(245, 243, 239, 0));
    scrollbar-width: none;
  }
  .workspace-section-link {
    padding: 10px 13px;
  }
  .employee-dashboard-hero {
    padding: 14px;
  }
  .employee-hero-stats,
  .employee-dashboard-actions,
  .employee-dashboard-layout {
    grid-template-columns: 1fr;
  }
  .employee-portal .row {
    flex-direction: column;
    align-items: stretch;
  }
  .employee-portal .row > button {
    width: 100%;
  }
  .employee-portal .row > .saved-badge,
  .employee-portal .row > .working-badge,
  .employee-portal .row > .hint {
    align-self: flex-start;
  }
  .employee-inline-panel-row {
    align-items: stretch;
  }
  .employee-inline-panel-row label {
    width: 100%;
  }
  .switch-calendar-grid {
    grid-template-columns: 1fr;
  }
  .switch-day-card {
    padding: 10px;
  }
  .shift-chip {
    padding: 10px 10px 12px;
  }
  .chip-action-btn {
    min-width: 34px;
    min-height: 30px;
    font-size: 12px;
    padding: 4px 10px;
  }
  .employee-upcoming-item {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .template-calendar {
    grid-template-columns: 1fr;
  }
  .day-timeline { height: min(64vh, 640px); }
  .modal-backdrop {
    align-items: flex-end;
  }
  .modal-card {
    width: 100%;
    max-height: min(88vh, 760px);
    overflow: auto;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 16px;
  }
  .modal-card .row {
    flex-direction: column;
    align-items: stretch;
  }
  .modal-card .row > button {
    width: 100%;
  }
  .template-sync-preview-summary {
    grid-template-columns: 1fr;
  }
  .template-sync-preview-conflict-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   #1  TOGGLE SWITCHES (replaces plain checkboxes in settings)
   ============================================================ */
.toggle-switch-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}
.toggle-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.toggle-switch-track {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #ccc8be;
  border: 1px solid #b8b4aa;
  transition: background 0.2s, border-color 0.2s;
}
.toggle-switch-input:checked + .toggle-switch-track {
  background: #256a5a;
  border-color: #1c5648;
}
.toggle-switch-input:disabled + .toggle-switch-track {
  opacity: 0.45;
  cursor: not-allowed;
}
.toggle-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.toggle-switch-input:checked + .toggle-switch-track .toggle-switch-thumb {
  transform: translateX(18px);
}
.toggle-switch-text {
  font-size: 13px;
  color: #30413d;
  line-height: 1.35;
}
.toggle-switch-desc {
  font-size: 11px;
  color: #647d76;
  line-height: 1.3;
  margin-top: 2px;
}
.toggle-switch-label:has(.toggle-switch-input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
.toggle-field-wrap {
  display: grid;
  gap: 2px;
}

/* ============================================================
   #2  SETTINGS TABS
   ============================================================ */
.settings-tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid #ddd6c8;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.settings-tab-bar::-webkit-scrollbar { display: none; }
.settings-tab-btn {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #5a7069;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  min-height: 44px;
}
.settings-tab-btn.active {
  color: #17352f;
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: #256a5a;
}
.settings-tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
  color: #2a4a43;
}
.settings-tab-panel {
  display: none;
}
.settings-tab-panel.active {
  display: grid;
  gap: 14px;
}

/* ============================================================
   #3  TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: 24px;
  display: grid;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  box-shadow: 0 8px 24px rgba(16, 25, 22, 0.18);
  font-size: 14px;
  font-weight: 600;
  pointer-events: auto;
  animation: toast-in 0.28s ease;
  max-width: min(360px, calc(100vw - 48px));
  line-height: 1.35;
}
.toast.success {
  background: #e4f3e9;
  border-color: #9bc4a8;
  color: #1a4f2e;
}
.toast.error {
  background: #fdeaea;
  border-color: #d89090;
  color: #5c1a1a;
}
.toast.info {
  background: #eef4f1;
  border-color: #9bbbb0;
  color: #1e3530;
}
.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-msg { flex: 1; }
.toast-dismiss {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  font-size: 16px;
  padding: 0 0 0 6px;
  line-height: 1;
  flex-shrink: 0;
}
.toast-dismiss:hover { opacity: 1; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(12px); }
}
.toast.dismissing {
  animation: toast-out 0.22s ease forwards;
}
@media (max-width: 800px) {
  .toast-container {
    right: 12px;
    left: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .toast { max-width: 100%; }
}

/* ============================================================
   #4  iOS / ANDROID SAFE AREA INSETS
   ============================================================ */
body.has-bottom-tab-bar {
  padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
}
body.has-manager-mobile-tab-bar.ui-mobile {
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}
body.manager-workspace.ui-mobile.has-manager-mobile-tab-bar > main {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

/* ============================================================
   #5A  MANAGER BOTTOM TAB BAR (mobile only)
   ============================================================ */
.manager-mobile-bottom-tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(255, 253, 248, 0.98);
  border-top: 1px solid rgba(162, 174, 167, 0.6);
  box-shadow: 0 -10px 26px rgba(16, 25, 22, 0.12);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.manager-mobile-bottom-tab-bar-inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 70px;
}
.manager-mobile-tab-btn {
  position: relative;
  min-width: 0;
  min-height: 70px;
  padding: 8px 4px 9px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #5f756f;
  box-shadow: none;
  display: grid;
  gap: 3px;
  justify-items: center;
  align-content: center;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 700;
}
.manager-mobile-tab-btn.active {
  color: #173f35;
  background: rgba(37, 106, 90, 0.08);
}
.manager-mobile-tab-btn.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22%;
  right: 22%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: #256a5a;
}
.manager-mobile-tab-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.manager-mobile-tab-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.manager-mobile-tab-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manager-mobile-tab-badge {
  position: absolute;
  top: 7px;
  right: calc(50% - 24px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #8b1e1e;
  color: #fff;
  border: 2px solid rgba(255, 253, 248, 0.98);
  font-size: 10px;
  line-height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.manager-mobile-more-panel {
  display: none;
}
.manager-mobile-more-open .manager-mobile-more-panel {
  display: block;
}
.manager-mobile-more-scrim {
  position: fixed;
  inset: 0;
  z-index: 880;
  border: none;
  border-radius: 0;
  background: rgba(18, 27, 25, 0.42);
  box-shadow: none;
  min-height: 0;
  padding: 0;
}
.manager-mobile-more-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  z-index: 910;
  max-height: min(74vh, 680px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 16px 14px 18px;
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(205, 212, 208, 0.86);
  border-bottom: none;
  background: #fffdf8;
  box-shadow: 0 -16px 34px rgba(16, 25, 22, 0.2);
}
.manager-mobile-more-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.manager-mobile-more-head h2 {
  margin: 2px 0 0;
}
.manager-mobile-more-close,
.manager-mobile-more-logout {
  min-height: 44px;
}
.manager-mobile-more-groups {
  display: grid;
  gap: 14px;
}
.manager-mobile-more-group {
  display: grid;
  gap: 8px;
}
.manager-mobile-more-group h3 {
  margin: 0;
  color: #526761;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.manager-mobile-more-links {
  display: grid;
  gap: 8px;
}
.manager-mobile-more-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e0d9cc;
  background: #fff;
  color: #1f2d2a;
  text-align: left;
  box-shadow: 0 3px 10px rgba(31, 45, 42, 0.05);
}
.manager-mobile-more-link.active {
  border-color: #9bb8ad;
  background: #eef6f2;
  color: #173f35;
}
.manager-mobile-more-logout {
  width: 100%;
  background: #304f47;
}
body.ui-mobile .manager-mobile-bottom-tab-bar {
  display: block;
}

/* ============================================================
   #5  EMPLOYEE BOTTOM TAB BAR (mobile only)
   ============================================================ */
.mobile-bottom-tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  background: rgba(255, 253, 248, 0.97);
  border-top: 1px solid rgba(162, 174, 167, 0.55);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-bottom-tab-bar-inner {
  display: flex;
  height: 62px;
}
.mobile-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  border-radius: 0;
  color: #6a8178;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
  min-height: 62px;
  min-width: 44px;
  letter-spacing: 0.02em;
  transition: color 0.15s, transform 120ms ease, background-color 120ms ease;
  position: relative;
  box-shadow: none;
}
.mobile-tab-btn.active {
  color: #256a5a;
}
.mobile-tab-btn.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: #256a5a;
}
.mobile-tab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-tab-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mobile-tab-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #8b1e1e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 253, 248, 0.97);
}
body.ui-mobile .mobile-bottom-tab-bar { display: block; }
body.ui-mobile .workspace-section-nav:not(.manager-mobile-schedule-nav) { display: none; }
body.ui-mobile .manager-mobile-schedule-nav {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}
body.ui-mobile .manager-mobile-schedule-nav .workspace-section-link {
  flex: 0 0 auto;
  min-height: 44px;
  border-radius: 999px;
}

/* ============================================================
   #6  EMPTY STATES
   ============================================================ */
.empty-state {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  padding: 32px 20px;
}
.empty-state-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(145deg, #f0ece2, #e8e2d4);
  border: 1px solid #ddd6c8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state-icon svg {
  width: 26px;
  height: 26px;
  stroke: #7a9289;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.empty-state-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #2a3e38;
}
.empty-state-body {
  margin: 0;
  font-size: 13px;
  color: #60736d;
  max-width: 26ch;
  line-height: 1.4;
}
.empty-state-action {
  margin-top: 4px;
}

/* ============================================================
   #7  SKELETON LOADING SCREENS
   ============================================================ */
@keyframes skeleton-shimmer {
  from { background-position: -400px 0; }
  to   { background-position: 400px 0; }
}
.skeleton {
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    #ede8df 25%,
    #f7f3ec 50%,
    #ede8df 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.5s infinite linear;
}
.skeleton-block { display: block; }
.skeleton-line {
  height: 14px;
  border-radius: 4px;
}
.skeleton-line.sm { height: 10px; }
.skeleton-line.lg { height: 20px; }
.skeleton-card {
  padding: 14px;
  border: 1px solid #e8e2d8;
  border-radius: 12px;
  background: #fefcf8;
  display: grid;
  gap: 10px;
}
.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.skeleton-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ============================================================
   #7b  PAGE SKELETON OVERLAY (shown during initial load)
   ============================================================ */
.page-load-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg, #f5f3ef);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px 24px;
}
.page-load-skeleton-wrap {
  width: 100%;
  max-width: 680px;
  display: grid;
  gap: 16px;
}
.page-load-skeleton-header {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e2d8;
}
.page-load-skeleton-cards {
  display: grid;
  gap: 10px;
}

/* ============================================================
   #8  TOUCH TARGET IMPROVEMENTS (44px minimum)
   ============================================================ */
@media (max-width: 900px) {
  body.manager-workspace .manager-sidebar-link,
  body.manager-workspace .manager-sidebar-sublink,
  body.manager-workspace .owner-test-toggle-btn,
  body.manager-workspace .owner-test-launch-btn {
    min-height: 44px;
    padding: 11px 12px;
  }
  .workspace-section-link {
    min-height: 44px;
    padding: 12px 14px;
  }
  .menu-link { min-height: 44px; padding: 12px; }
  .menu-sublink { min-height: 44px; padding: 10px 12px; }
  input, select { min-height: 46px; padding: 10px; }
  .chip-action-btn { min-height: 46px; min-width: 46px; }
  .settings-tab-btn { min-height: 46px; }
  button:not(.mobile-tab-btn):not(.manager-mobile-tab-btn):not(.manager-mobile-more-scrim) { min-height: 46px; }
}
body.ui-mobile .manager-sidebar-link,
body.ui-mobile .manager-sidebar-sublink {
  min-height: 48px;
  padding: 11px 12px;
  font-size: 13px;
}
body.ui-mobile input,
body.ui-mobile select {
  min-height: 48px;
  padding: 10px;
}
body.ui-mobile button:not(.mobile-tab-btn):not(.manager-mobile-tab-btn):not(.manager-mobile-more-scrim) {
  min-height: 48px;
}
body.ui-mobile .schedule-delete-small {
  min-height: 44px;
}
body.ui-mobile .toggle-switch-label {
  min-height: 48px;
}
body.ui-mobile .availability-painter-table td,
body.ui-mobile .availability-painter-cell {
  width: 44px;
}
body.ui-mobile .availability-painter-cell {
  height: 44px;
  min-height: 44px;
}

/* ============================================================
   #9  COMMERCIAL MARKETING SITE
   ============================================================ */
body.marketing-site {
  min-height: 100vh;
  color: #1f2d2a;
  background:
    linear-gradient(180deg, rgba(246, 250, 249, 0.94), rgba(255, 255, 255, 0.98)),
    url("/assets/schedule-app-logo.svg") no-repeat right 7vw top 112px / min(34vw, 420px);
}
.marketing-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(190, 199, 193, 0.55);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.marketing-brand {
  display: inline-flex;
  align-items: center;
}
.marketing-brand .brand-logo {
  width: auto;
  max-width: min(260px, 54vw);
  max-height: 50px;
}
.marketing-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
  font-weight: 800;
}
.marketing-nav a {
  color: #304f47;
  text-decoration: none;
}
.marketing-login-link {
  padding: 10px 14px;
  border-radius: 8px;
  background: #256a5a;
  color: #fff !important;
}
.marketing-main {
  max-width: none;
  padding: 0;
}
.marketing-hero {
  min-height: min(760px, calc(100vh - 88px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(56px, 9vw, 112px) clamp(18px, 6vw, 92px) clamp(44px, 7vw, 78px);
}
.marketing-hero-copy {
  display: grid;
  gap: 18px;
  max-width: 760px;
}
.marketing-kicker {
  margin: 0;
  color: #59736b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.marketing-hero h1 {
  margin: 0;
  color: #153d35;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: 0;
}
.marketing-lede {
  max-width: 680px;
  margin: 0;
  color: #52645f;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
}
.marketing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.marketing-primary-action,
.marketing-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}
.marketing-primary-action {
  background: #256a5a;
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 106, 90, 0.18);
}
.marketing-secondary-action {
  border: 1px solid #c7d5da;
  background: #f7fafb;
  color: #304f47;
}
.marketing-hero-panel {
  display: flex;
  justify-content: center;
}
.marketing-schedule-preview {
  width: min(100%, 480px);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(181, 194, 187, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 54px rgba(24, 38, 34, 0.14);
}
.marketing-preview-topline,
.marketing-preview-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #5a6f68;
  font-size: 13px;
  font-weight: 800;
}
.marketing-preview-topline strong {
  color: #256a5a;
}
.marketing-preview-grid {
  display: grid;
  grid-template-columns: 48px repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.marketing-preview-grid span,
.marketing-preview-grid b {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
}
.marketing-preview-grid span {
  justify-content: center;
  background: #edf3ef;
  color: #465b55;
  font-size: 12px;
}
.marketing-preview-grid b {
  background: #edf1f6;
  color: #173f35;
  font-size: 13px;
}
.marketing-band,
.marketing-workflows {
  padding: clamp(48px, 7vw, 86px) clamp(18px, 6vw, 92px);
  border-top: 1px solid rgba(190, 199, 193, 0.5);
  background: #fff;
}
.marketing-section-head {
  display: grid;
  gap: 10px;
  max-width: 780px;
}
.marketing-section-head h2,
.marketing-workflows h2 {
  margin: 0;
  color: #173f35;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
}
.marketing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.marketing-feature-grid article {
  min-height: 190px;
  padding: 20px;
  border: 1px solid #dde5df;
  border-radius: 8px;
  background: #f8fbfc;
}
.marketing-feature-grid h3 {
  margin: 0 0 10px;
  color: #203f38;
}
.marketing-feature-grid p {
  margin: 0;
  color: #52645f;
  line-height: 1.5;
}
.marketing-workflows {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  background: #edf4f7;
}
.marketing-check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.marketing-check-list li {
  padding: 14px 16px;
  border-left: 4px solid #8b3f51;
  background: #fff;
  border-radius: 8px;
  color: #354b45;
  font-weight: 700;
}
@media (max-width: 860px) {
  .marketing-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }
  .marketing-nav {
    justify-content: flex-start;
  }
  .marketing-hero,
  .marketing-workflows,
  .marketing-feature-grid {
    grid-template-columns: 1fr;
  }
  .marketing-hero {
    min-height: auto;
  }
}

/* ── User Management Table ─────────────────────────────── */
.user-mgmt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.user-mgmt-header h2 { margin: 0; }

.user-mgmt-table {
  display: grid;
  gap: 0;
  border: 1px solid #e0ddd5;
  border-radius: 8px;
  overflow: hidden;
}
.user-mgmt-table-head {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 2fr;
  gap: 0;
  background: #f5efe3;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6b5d4f;
  border-bottom: 1px solid #e0ddd5;
}
.user-mgmt-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 2fr;
  gap: 0;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #ede8df;
  background: #fff;
  transition: background .12s;
}
.user-mgmt-row:last-child { border-bottom: none; }
.user-mgmt-row:hover { background: #fdfaf5; }
.user-mgmt-row-self { background: #fffbf2; }
.user-mgmt-cell {
  padding: 4px 8px 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.user-mgmt-cell input,
.user-mgmt-cell select {
  width: 100%;
  min-width: 0;
}
.user-mgmt-actions {
  gap: 6px;
  flex-wrap: wrap;
}
.user-mgmt-save-btn { flex-shrink: 0; }
.user-mgmt-you-badge {
  display: inline-block;
  background: #254f6c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.user-mgmt-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.hint-inline {
  font-size: 11px;
  color: #8a8070;
  font-weight: 400;
}

/* Admin role preview */
.admin-role-preview-panel {
  border: 1px solid #d9d2c7;
  background:
    linear-gradient(135deg, rgba(255, 252, 246, 0.98), rgba(245, 247, 243, 0.94));
  box-shadow: 0 14px 30px rgba(33, 38, 30, 0.06);
}
.admin-role-preview-status {
  font-size: 12px;
  color: #5d655f;
}
.admin-role-preview-controls {
  margin-top: 8px;
}
.role-preview-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.role-preview-controls.compact {
  gap: 8px;
}
.role-preview-field {
  display: grid;
  gap: 6px;
  min-width: 160px;
}
.role-preview-controls.compact .role-preview-field {
  min-width: 140px;
}
.role-preview-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: inherit;
}
.role-preview-select {
  min-width: 0;
}
.role-preview-apply-btn {
  min-height: 42px;
}

/* ── Test Mode Banner (sticky top bar for both employee + manager test modes) ── */
.test-mode-banner {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #1a3a52;
  color: #fff;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.test-mode-banner.manager-preview-banner {
  background:
    linear-gradient(135deg, #8e4619, #5f2810);
}
.test-mode-banner.employee-preview-banner {
  background:
    linear-gradient(135deg, #1d5b73, #12384c);
}
.test-mode-banner.hidden { display: none; }
.test-mode-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  max-width: 100%;
  flex-wrap: wrap;
}
.test-mode-banner-copy {
  display: grid;
  gap: 10px;
  flex: 1 1 420px;
  min-width: min(100%, 320px);
}
.test-mode-banner .role-preview-label {
  color: rgba(255, 255, 255, 0.82);
}
.test-mode-banner .role-preview-select {
  background: rgba(255, 255, 255, 0.96);
  color: #17313c;
  border: 1px solid rgba(255, 255, 255, 0.42);
}
.test-mode-banner .role-preview-apply-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.36);
}
.test-mode-banner .role-preview-apply-btn:hover,
.test-mode-banner .role-preview-apply-btn:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}
.test-mode-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  flex-wrap: wrap;
}
.test-mode-badge {
  display: inline-block;
  background: #e8a020;
  color: #1a1a1a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.test-mode-exit-btn {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
  min-height: unset;
  box-shadow: var(--button-surface-shadow-soft);
}
.test-mode-exit-btn:hover {
  background: rgba(255,255,255,.28);
}
.nav-btn,
.menu-link,
.menu-sublink,
.button-link,
.workspace-section-link,
.dashboard-action-card,
.chip-remove-btn,
.chip-menu-btn,
.chip-action-btn,
.cell-menu-btn,
.chip-context-item,
.mobile-tab-btn,
.test-mode-exit-btn,
button:not(.employee-summary-toggle) {
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
  will-change: transform;
}
.nav-btn:active,
.menu-link:active,
.menu-sublink:active,
.button-link:active,
.workspace-section-link:active,
.dashboard-action-card:active,
.chip-remove-btn:active,
.chip-menu-btn:active,
.chip-action-btn:active,
.cell-menu-btn:active,
.chip-context-item:active,
.test-mode-exit-btn:active,
button:not(.employee-summary-toggle):not(:disabled):active {
  transform: translateY(var(--button-press-depth));
  box-shadow: var(--button-surface-shadow-pressed);
  filter: saturate(0.96) brightness(0.98);
}
.mobile-tab-btn:active {
  transform: translateY(1px);
  background: rgba(37, 106, 90, 0.08);
  box-shadow: none;
  filter: none;
}
.chip-context-item:active {
  background: #e5eeea;
}
.nav-btn:disabled,
.menu-link:disabled,
.menu-sublink:disabled,
.workspace-section-link:disabled,
.dashboard-action-card:disabled,
.chip-remove-btn:disabled,
.chip-menu-btn:disabled,
.chip-action-btn:disabled,
.cell-menu-btn:disabled,
.chip-context-item:disabled,
.mobile-tab-btn:disabled,
.test-mode-exit-btn:disabled,
button:not(.employee-summary-toggle):disabled {
  transform: none;
  box-shadow: none;
  filter: none;
}
.manager-test-mode-banner {
  width: 100%;
}

/* Responsive: user mgmt table stacks on mobile */
@media (max-width: 680px) {
  .role-preview-controls,
  .role-preview-controls.compact {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .role-preview-field,
  .role-preview-controls.compact .role-preview-field {
    min-width: 0;
  }
  .user-mgmt-table-head { display: none; }
  .user-mgmt-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 2px solid #ede8df;
  }
  .user-mgmt-cell { padding: 0; }
  .user-mgmt-actions { justify-content: flex-start; }
}

/* ── Day Warning Badges ─────────────────────────────────────────── */
.day-warning-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  justify-content: center;
}
.day-warning {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.3;
  white-space: nowrap;
  cursor: default;
}
.day-warning-short {
  background: #fff3cd;
  color: #7c4a00;
  border: 1px solid #f0c040;
}
.day-warning-over {
  background: #fde8e8;
  color: #7c0000;
  border: 1px solid #f08080;
}

/* ── Add Shift Footer Row ───────────────────────────────────────── */
.sched-add-shift-row td,
.sched-add-shift-cell {
  padding: 4px 6px;
  text-align: center;
  background: transparent;
  border: none;
}
.sched-add-shift-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1.5px dashed #b0a898;
  background: transparent;
  color: #6b5e50;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.sched-add-shift-btn:hover {
  background: #f5f0e8;
  border-color: #7c6e60;
  color: #3a2e24;
}

/* ── Extra Shift Chip Badge ─────────────────────────────────────── */
.extra-shift .chip-inner {
  border-left: 3px solid #c07030;
}
.chip-extra-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #c07030;
  color: #fff;
  border-radius: 3px;
  padding: 1px 4px;
  margin-right: 3px;
  vertical-align: middle;
  line-height: 1.4;
}

/* ── Add Shift Modal ────────────────────────────────────────────── */
.add-shift-modal-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px 24px;
  width: min(480px, 96vw);
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  position: relative;
}
.add-shift-modal-card h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}
.add-shift-modal-card .hint {
  margin: 0 0 16px;
}
.add-shift-form {
  display: grid;
  gap: 12px;
}
.add-shift-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a3f35;
}
.add-shift-form input,
.add-shift-form select {
  font-size: 0.95rem;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1.5px solid #d0c8be;
  background: #faf8f5;
  color: #2a2017;
}
.add-shift-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.add-shift-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
}
.add-shift-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #888;
  line-height: 1;
  padding: 0 4px;
}
.add-shift-modal-close:hover { color: #222; }

/* ── Preset Schedule Type Toggles ───────────────────────────────── */
.preset-schedule-toggles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.preset-schedule-card {
  border: 2px solid #ddd6cc;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #faf8f5;
}
.preset-schedule-card.preset-active {
  border-color: var(--preset-color, #254f6c);
  background: color-mix(in srgb, var(--preset-color, #254f6c) 6%, #fff);
}
.preset-schedule-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.preset-schedule-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #2a2017;
}
.preset-schedule-card-desc {
  font-size: 0.8rem;
  color: #6b5e50;
  line-height: 1.4;
}
.preset-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.preset-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.preset-toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 22px;
  transition: background 0.2s;
  cursor: pointer;
}
.preset-toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.preset-toggle input:checked + .preset-toggle-slider {
  background: var(--preset-color, #254f6c);
}
.preset-toggle input:checked + .preset-toggle-slider::before {
  transform: translateX(16px);
}

@media (max-width: 600px) {
  .preset-schedule-toggles {
    grid-template-columns: 1fr;
  }
  .add-shift-form-row {
    grid-template-columns: 1fr;
  }
  .add-shift-modal-actions {
    flex-direction: column;
  }
}

/* ── Schedule Changes / Audit Trail Modal ───────────────────────── */
.changes-modal-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 24px 20px;
  width: min(560px, 96vw);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  position: relative;
}
.changes-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.changes-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
}
.changes-baseline-note {
  margin: 0 0 14px;
  font-size: 0.8rem;
}
.changes-section {
  margin-bottom: 20px;
}
.changes-section:last-child { margin-bottom: 0; }
.changes-section-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5a4e44;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #ede8df;
  padding-bottom: 6px;
}
.changes-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #e0dbd4;
  color: #3a2e24;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 6px;
  line-height: 1;
}
.changes-count-warn {
  background: #fde8c8;
  color: #7c3a00;
}

/* Audit log entries */
.audit-log {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.audit-entry {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 7px;
  background: #faf8f5;
  border: 1px solid #ede8df;
}
.audit-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: #e0dbd4;
  color: #3a2e24;
}
.audit-icon-assign   { background: #d4edda; color: #145a25; }
.audit-icon-reassign { background: #d1ecf1; color: #0c5460; }
.audit-icon-unassign { background: #f8d7da; color: #721c24; }
.audit-icon-extra    { background: #fde8c8; color: #7c3a00; }
.audit-icon-extra-rm { background: #f8d7da; color: #721c24; }
.audit-icon-training { background: #e2d9f3; color: #4a2b7a; }
.audit-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.audit-msg {
  font-size: 0.88rem;
  color: #2a2017;
  line-height: 1.4;
}
.audit-meta {
  font-size: 0.75rem;
  color: #8a7a6a;
}

/* TBD / over-template rows */
.changes-tbd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  background: #faf8f5;
  border: 1px solid #ede8df;
  margin-bottom: 5px;
  font-size: 0.88rem;
}
.changes-tbd-row:last-child { margin-bottom: 0; }
.changes-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1.4;
}
.changes-badge-tbd  { background: #f8d7da; color: #721c24; }
.changes-badge-over { background: #fde8c8; color: #7c3a00; }
.changes-date {
  margin-left: auto;
  font-size: 0.8rem;
  color: #8a7a6a;
  white-space: nowrap;
}

/* Review Changes button */
.sched-review-changes-btn {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .changes-modal-card { padding: 18px 14px 16px; }
  .changes-tbd-row { flex-wrap: wrap; }
  .changes-date { margin-left: 0; width: 100%; }
}
.role-pref-block {
  display: grid;
  gap: 8px;
}
.switch-row {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.role-pref-panel {
  display: grid;
  gap: 8px;
}
.role-pref-list {
  display: grid;
  gap: 6px;
}
.role-pref-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.invite-section-head {
  margin: 14px 0 10px;
}

.invite-section-head h3 {
  margin-bottom: 4px;
}

.invite-availability-grid {
  display: grid;
  gap: 10px;
}

.invite-day-row {
  display: grid;
  grid-template-columns: 72px repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.invite-day-label {
  font-weight: 700;
  color: #49372a;
}

.invite-checkbox-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d9c9b5;
  border-radius: 12px;
  background: #f8f3ea;
}

.invite-checkbox-pill input {
  margin: 0;
}

.message-history-entry {
  display: grid;
  gap: 8px;
}

.message-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
}

.message-history-title {
  color: #3f2f25;
}

.message-history-date {
  color: #7e6a59;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.message-history-meta {
  margin-top: -2px;
}

.message-history-body {
  white-space: pre-wrap;
  line-height: 1.5;
  color: #3f2f25;
}

@media (max-width: 720px) {
  .invite-day-row {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .message-history-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}
