:root {
  --ink: #111827;
  --text: #111827;
  --muted: #5f6f82;
  --subtle: #8a98a8;
  --soft: #edf3f8;
  --line: #d8e1ea;
  --line-strong: #b9c8d8;
  --paper: #ffffff;
  --surface: #ffffff;
  --canvas: #eef3f7;
  --navy: #102536;
  --navy-2: #18364e;
  --sidebar-gray: rgba(244, 247, 250, .88);
  --brand: #18364e;
  --accent: #246bfe;
  --accent-soft: #e8f0ff;
  --accent-quiet: #f3f7ff;
  --success: #247554;
  --danger: #b42318;
  --warning: #a76505;
  --radius: 8px;
  --shadow: 0 20px 54px rgba(15, 35, 52, .11);
  --shadow-soft: 0 10px 28px rgba(15, 35, 52, .08);
  --shadow-card: 0 10px 28px rgba(15, 35, 52, .07);
  --shadow-panel: 0 24px 76px rgba(15, 35, 52, .18);
  --shadow-hairline: 0 1px 2px rgba(15, 35, 52, .05);
  --control-height: 42px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  min-height: 100%;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .72) 0, rgba(243, 246, 248, 0) 300px),
    var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
}

body.operation-loading::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(246, 248, 250, .38);
  backdrop-filter: blur(1px);
}

body.operation-loading::after {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 201;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border: 4px solid rgba(31, 111, 235, .18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loading-spin .8s linear infinite;
}

body:has(.app-action-notice)::before {
  display: none;
}

.app-action-notice {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 31, 45, .28);
}

.app-action-notice-card {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-panel);
}

.app-action-notice-card.error {
  border-color: rgba(180, 35, 24, .28);
}

.app-action-notice-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 16px;
}

.app-action-notice-card p {
  margin-bottom: 18px;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

button,
input,
select {
  font: inherit;
}

button,
a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(140deg, #0a1722 0%, #18364e 55%, #0f2435 100%);
}

.login-panel {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--shadow);
}

.login-logo {
  display: block;
  width: 190px;
  height: 92px;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  color: #122231;
  font-size: 28px;
  line-height: 1.14;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  color: #172331;
  font-size: 16px;
  line-height: 1.25;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

form,
label {
  display: grid;
}

form {
  gap: 14px;
  margin-top: 24px;
}

label {
  gap: 7px;
  color: #334455;
  font-size: 12px;
  font-weight: 780;
}

label:has(input[required]) > span::after,
label:has(select[required]) > span::after,
label:has(textarea[required]) > span::after {
  content: " *";
  color: #c92a2a;
  font-weight: 900;
}

input,
select,
textarea {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  background: #fbfcfd;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 4px rgba(31, 111, 235, .12);
}

input::placeholder,
textarea::placeholder {
  color: #9aa6b2;
}

textarea {
  min-height: 110px;
  padding-block: 10px;
  resize: vertical;
}

select[multiple] {
  height: auto;
  min-height: 118px;
  padding: 8px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.primary-button {
  border: 1px solid var(--accent);
  color: white;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(31, 111, 235, .18);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
}

.primary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-button:hover:not(:disabled) {
  background: #1b61d1;
  box-shadow: 0 10px 22px rgba(31, 111, 235, .22);
}

.ghost-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: #f8fafc;
  box-shadow: var(--shadow-soft);
}

.primary-button:disabled,
.ghost-button:disabled {
  border-color: #c8d0d8;
  color: #6f7a86;
  background: #d7dde3;
  box-shadow: none;
  cursor: not-allowed;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--navy);
  background: white;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: #f8fafc;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: .4;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: #9d2a22;
  background: #fff0ee;
}

.form-success {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: #1f6d4b;
  background: #e9f7ef;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 74px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  height: 100vh;
  width: 252px;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 16px;
  color: var(--ink);
  background: var(--sidebar-gray);
  backdrop-filter: blur(14px);
  border-right: 1px solid rgba(15, 35, 52, .08);
  box-shadow: 18px 0 42px rgba(15, 35, 52, .12);
  transform: translateX(calc(-100% + 12px));
  transition: width 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: -12px;
  width: 12px;
  height: 100%;
}

.sidebar:hover,
.sidebar:focus-within {
  transform: translateX(0);
}

.app-shell.sidebar-open .sidebar {
  transform: translateX(0);
}

.sidebar-backdrop {
  display: none;
}

.sidebar-toggle {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: var(--navy);
  background: white;
  cursor: pointer;
}

.topbar-menu-button {
  display: none;
  flex: 0 0 auto;
  border-color: var(--line);
  color: var(--ink);
  background: white;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 74px;
  padding-inline: 10px;
}

.app-shell.sidebar-collapsed .sidebar-toggle-inside span {
  transform: rotate(180deg);
}

.app-shell.sidebar-collapsed .brand {
  padding-inline: 0;
}

.app-shell.sidebar-collapsed .brand img {
  width: 42px;
  max-height: 42px;
}

.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  padding-inline: 0;
}

.app-shell.sidebar-collapsed .nav-item span:not(.nav-icon) {
  display: none;
}

.app-shell.sidebar-collapsed .nav-submenu {
  display: none;
}

.brand {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-bottom: 1px solid rgba(15, 35, 52, .1);
  padding: 12px 0 16px;
  background: transparent;
  cursor: pointer;
}

.brand img {
  width: 214px;
  max-height: 82px;
  object-fit: contain;
}

.nav-list {
  display: grid;
  gap: 7px;
  margin: 10px 0 auto;
}

.sidebar-signout {
  margin-top: auto;
  border-color: rgba(15, 35, 52, .14);
  color: var(--navy);
  background: white;
}

.app-shell.sidebar-collapsed .sidebar-signout {
  padding-inline: 0;
  font-size: 0;
}

.app-shell.sidebar-collapsed .sidebar-signout::before {
  content: "↪";
  font-size: 18px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 12px;
  color: #405060;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-weight: 760;
  transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.nav-item:hover,
.nav-item.active {
  color: var(--navy);
  background: white;
  box-shadow: var(--shadow-soft);
  transform: translateX(1px);
}

.nav-submenu {
  display: grid;
  gap: 4px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(15, 35, 52, .12);
}

.nav-subitem {
  min-height: 38px;
  padding-left: 10px;
  font-size: 13px;
  font-weight: 720;
}

.nav-chevron {
  margin-left: auto;
  color: #7f93a4;
  font-size: 14px;
  font-weight: 900;
}

.nav-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  margin-left: auto;
  border-radius: 999px;
  padding: 0 5px;
  color: white;
  background: #d73535;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.company-switcher {
  padding: 8px 0;
}

.company-switcher label {
  display: grid;
  gap: 7px;
}

.company-switcher .nav-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #405060;
  font-size: 13px;
  font-weight: 820;
}

.company-switcher select {
  width: 100%;
  min-height: 38px;
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
}

.nav-icon,
.module-icon,
.principle-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--navy);
  background: white;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(15, 35, 52, .06);
}

.workspace {
  min-width: 0;
  padding-left: 12px;
  padding-bottom: 88px;
  transition: padding-left 180ms ease;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto auto minmax(220px, 520px) auto;
  min-height: 72px;
  align-items: center;
  justify-content: end;
  gap: 14px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 250, .92);
  backdrop-filter: blur(14px);
}

.topbar-history-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-box {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  min-height: 44px;
  border-radius: var(--radius);
  padding: 0 12px;
  background: white;
  box-shadow: 0 1px 2px rgba(15, 35, 52, .04);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, .1);
}

.search-box input {
  width: 100%;
  border: 0;
  box-shadow: none;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 45;
  display: grid;
  width: min(620px, 86vw);
  max-height: min(520px, 72vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.global-search-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.global-search-result:hover {
  background: var(--accent-soft);
}

.global-search-result span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result small {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--muted);
  font-weight: 800;
}

.global-search-empty {
  margin: 0;
  padding: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  min-width: 0;
}

.topbar-company-switch {
  position: relative;
}

.topbar-company-menu {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 80;
}

.topbar-company-menu p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  margin: 0 0 2px;
}

.topbar-company-option {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.topbar-company-option:hover:not(:disabled) {
  background: #f5f8fb;
  border-color: var(--line);
}

.topbar-company-option.active {
  background: #eef5ff;
  border-color: #cfe0f5;
  cursor: default;
}

.topbar-company-option small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.profile-chip > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--navy-2);
  font-weight: 850;
}

.profile-chip small {
  display: block;
  color: var(--muted);
}

.topbar-icon-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--navy);
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  position: relative;
  flex: 0 0 auto;
  width: 40px;
}

.topbar-icon-button:hover {
  border-color: var(--navy-2);
  box-shadow: var(--shadow-soft);
}

.topbar-badge {
  background: #b82318;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  min-width: 17px;
  padding: 1px 4px;
  position: absolute;
  right: -5px;
  top: -5px;
}

.company-time-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
  padding: 9px 10px;
  white-space: nowrap;
}

.view {
  display: none;
  padding: 26px clamp(20px, 3vw, 36px);
}

.view.active {
  display: block;
}

.page-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.page-heading p {
  max-width: 760px;
  margin-bottom: 0;
}

.page-heading > div,
.section-header-row > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.page-heading > div > .eyebrow {
  flex: 0 0 100%;
}

.page-heading > div > h1,
.section-header-row > div > h2,
.section-header-row > div > h3,
.section-header-row > div > h4 {
  margin-bottom: 0;
}

.page-heading > div > p:not(.compact-help-note):not(.eyebrow),
.section-header-row > div > p:not(.compact-help-note) {
  flex: 0 0 100%;
}

.page-heading > div > .compact-help-note,
.section-header-row > div > .compact-help-note {
  flex: 0 0 auto;
}

.subscription-pill {
  display: grid;
  gap: 4px;
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.subscription-pill span,
.metric-card span,
.module-card small,
dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.metric-grid,
.module-grid,
.principle-grid,
.home-basic-grid,
.home-widget-grid,
.settings-grid {
  display: grid;
  gap: 14px;
}

.home-basic-grid {
  max-width: 1180px;
}

.home-widget-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(190px, calc((100vh - 190px) / 2), 250px);
  align-items: stretch;
  width: 100%;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric-card,
.principle-grid article,
.settings-grid article,
.endpoint-list article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 1px 2px rgba(15, 35, 52, .04);
}

.metric-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.metric-card strong {
  font-size: 22px;
}

.module-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.module-card {
  display: grid;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: white;
  box-shadow: 0 1px 2px rgba(15, 35, 52, .04);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.module-card:hover {
  border-color: #c4d4e8;
  box-shadow: 0 10px 30px rgba(15, 35, 52, .08);
  transform: translateY(-1px);
}

.module-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.module-card strong {
  margin-bottom: 8px;
  font-size: 18px;
}

.module-cta {
  align-self: end;
  color: var(--accent);
  font-weight: 800;
}

.principle-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.principle-grid article,
.settings-grid article {
  padding: 18px;
}

.settings-accordion {
  grid-template-columns: 1fr;
}

.settings-section-card {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 1px 2px rgba(15, 35, 52, .04);
  overflow: hidden;
}

.settings-section-card summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
}

.settings-section-card summary::-webkit-details-marker {
  display: none;
}

.settings-section-card summary h2 {
  margin: 0;
}

.settings-section-card summary span {
  color: var(--muted);
  font-weight: 900;
  transition: transform .16s ease;
}

.settings-section-card[open] summary {
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.settings-section-card[open] summary span {
  transform: rotate(180deg);
}

.settings-section-card > :not(summary) {
  margin: 18px;
}

.settings-group-card {
  background: #f7f9fb;
}

.settings-group-card > summary {
  min-height: 76px;
}

.settings-group-card > summary div {
  display: grid;
  gap: 4px;
}

.settings-group-card > summary p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
}

.settings-group-content {
  display: grid;
  gap: 12px;
}

.settings-group-content .settings-section-card {
  margin: 0;
}

.settings-nested-card {
  background: white;
  box-shadow: none;
}

.settings-nested-card > summary {
  min-height: 52px;
}

.principle-icon {
  margin-bottom: 14px;
  background: var(--accent-soft);
}

.empty-module {
  display: grid;
  min-height: 440px;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px dashed #bdc9d4;
  border-radius: 8px;
  background: white;
  text-align: center;
}

.empty-module p {
  max-width: 520px;
}

.module-icon.large {
  width: 58px;
  height: 58px;
  font-size: 24px;
  background: var(--accent-soft);
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.settings-grid.settings-accordion {
  grid-template-columns: 1fr;
}

.permissions-panel {
  grid-column: 1 / -1;
}

.locations-panel {
  grid-column: 1 / -1;
}

.settings-form {
  gap: 16px;
  margin: 0;
}

.form-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.accounting-category-picker {
  display: grid;
  gap: 8px;
}

.user-create-form {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.settings-note {
  margin: -4px 0 0;
  font-size: 12px;
}

.compact-help-note {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 22px;
  margin: 0;
  width: fit-content;
  max-width: 100%;
  vertical-align: middle;
}

.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.info-tip-button {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(18, 48, 69, .22);
  border-radius: 999px;
  background: #f7fafc;
  color: var(--muted);
  cursor: help;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.info-tip-button:hover,
.info-tip-button:focus-visible,
.info-tip.open .info-tip-button {
  border-color: rgba(18, 48, 69, .46);
  background: white;
  color: var(--navy);
  outline: none;
}

.info-tip-content {
  position: fixed;
  left: var(--info-tip-left, 50vw);
  top: var(--info-tip-top, 50vh);
  z-index: 350;
  width: var(--info-tip-width, min(360px, calc(100vw - 28px)));
  max-width: calc(100vw - 28px);
  max-height: min(58vh, 420px);
  overflow: auto;
  overscroll-behavior: contain;
  transform: translate(-50%, calc(-100% - 10px)) scale(.98);
  border: 1px solid rgba(18, 48, 69, .16);
  border-radius: 8px;
  background: #10293c;
  box-shadow: 0 18px 40px rgba(15, 33, 48, .22);
  color: white;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.45;
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  text-align: left;
  text-transform: none;
  transition: opacity .14s ease, transform .14s ease;
  white-space: normal;
}

.info-tip-content::after {
  position: absolute;
  left: 50%;
  top: calc(100% - 5px);
  width: 10px;
  height: 10px;
  background: #10293c;
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.info-tip.below .info-tip-content {
  transform: translate(-50%, 10px) scale(.98);
}

.info-tip.below .info-tip-content::after {
  top: -5px;
  bottom: auto;
}

.info-tip:hover .info-tip-content,
.info-tip:focus-within .info-tip-content,
.info-tip.open .info-tip-content {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, calc(-100% - 10px)) scale(1);
}

.info-tip.below:hover .info-tip-content,
.info-tip.below:focus-within .info-tip-content,
.info-tip.below.open .info-tip-content {
  transform: translate(-50%, 10px) scale(1);
}

.section-header-row .compact-help-note,
.page-heading .compact-help-note {
  margin-left: 0;
}

.logo-preview-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.logo-preview-row img {
  width: 132px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #0e2232;
  object-fit: contain;
}

.role-permission-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.permission-directory-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 14px;
}

.permission-role-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.permission-role-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  text-align: left;
  cursor: pointer;
}

.permission-role-item.active,
.permission-role-item:hover {
  border-color: #bdd0e6;
  background: #f8fbff;
}

.permission-role-item small {
  color: var(--muted);
}

.permission-detail-panel {
  min-width: 0;
}

.role-permission-card {
  display: grid;
  gap: 14px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.role-permission-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.role-permission-heading small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.permission-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.permission-module {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.permission-module legend {
  padding: 0 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.permission-check {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 12px;
}

.permission-check input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.locked-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  background: white;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.employee-module-shell {
  display: grid;
  gap: 18px;
}

.module-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  background: #eef3f7;
}

.module-tabs button {
  min-width: 112px;
  height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}

.module-tabs button.active {
  color: white;
  background: var(--navy-2);
  box-shadow: 0 6px 14px rgba(15, 35, 52, .16);
}

.accounting-sales-workspace {
  display: grid;
  gap: 18px;
}

.accounting-invoice-form,
.accounting-sales-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.accounting-invoice-form {
  overflow: hidden;
}

.accounting-invoice-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  background: #f3f6f9;
}

.accounting-invoice-topbar h2 {
  margin: 0;
}

.accounting-balance-card {
  min-width: 190px;
  text-align: right;
}

.accounting-balance-card span,
.accounting-sale-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.accounting-balance-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1;
}

.accounting-invoice-grid,
.accounting-payment-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 22px;
}

.accounting-invoice-grid label:nth-child(5) {
  grid-row: span 2;
}

.accounting-invoice-grid textarea {
  min-height: 96px;
}

.accounting-payment-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.accounting-payment-strip .checkbox-row {
  align-self: end;
  min-height: 42px;
}

.accounting-line-table-wrap {
  overflow-x: auto;
  padding: 0 22px;
}

.accounting-line-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.accounting-line-table th,
.accounting-line-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
}

.accounting-line-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.accounting-line-table td:first-child,
.accounting-line-table th:first-child {
  width: 44px;
  text-align: center;
}

.accounting-line-table input,
.accounting-line-table select {
  min-width: 0;
}

.accounting-line-actions,
.accounting-invoice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 14px 22px;
}

.accounting-line-actions label {
  flex: 1 1 320px;
}

.accounting-line-actions textarea {
  min-height: 64px;
}

.accounting-invoice-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.accounting-sales-list {
  padding: 18px;
}

.accounting-sale-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.accounting-sale-card-main {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) repeat(3, minmax(100px, .75fr)) auto;
  gap: 12px;
  align-items: center;
}

.accounting-payment-form {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.accounting-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
  margin: 12px 0;
}

.accounting-filter-bar label,
.accounting-payment-split-row {
  min-width: 0;
}

.accounting-payment-splits {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.accounting-payment-split-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 180px);
  align-items: center;
  gap: 10px;
}

.accounting-list-row > .accounting-account-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.accounting-account-detail {
  display: grid;
  gap: 4px;
}

.accounting-bank-required-badge {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(33, 59, 82, 0.18);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(33, 59, 82, 0.08);
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
}

.accounting-bank-statement-textarea {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.45;
}

.accounting-bank-transactions-panel {
  grid-column: 1 / -1;
}

.accounting-bank-transaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 14px;
  align-items: start;
}

.accounting-bank-transaction-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.accounting-bank-transaction-main small,
.accounting-bank-transaction-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accounting-bank-match-form {
  display: grid;
  gap: 8px;
}

.module-card-button {
  display: grid;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: white;
  color: var(--text);
  cursor: pointer;
}

.module-card-button:hover {
  border-color: rgba(36, 64, 87, .35);
  box-shadow: 0 10px 24px rgba(20, 30, 42, .08);
}

.module-card-button span {
  color: var(--muted);
  line-height: 1.45;
}

.accounting-rename-row {
  align-items: end;
}

.accounting-rename-row label {
  display: grid;
  gap: 6px;
}

.accounting-daily-sales-list {
  display: grid;
  gap: 10px;
  margin: 8px 0;
}

.accounting-daily-sales-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 160px;
  padding: 10px 12px;
}

.accounting-daily-sales-row span {
  font-weight: 700;
}

.accounting-daily-sales-row input {
  text-align: right;
}

.restaurant-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.restaurant-action-card {
  min-height: 138px;
  align-content: start;
}

.restaurant-daily-sales-layout {
  display: grid;
  gap: 16px;
}

.restaurant-daily-sales-card,
.restaurant-daily-sales-group,
.restaurant-fiscal-sales-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.restaurant-daily-sales-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.restaurant-daily-sales-groups {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(320px, 1.15fr);
  gap: 14px;
}

.restaurant-daily-sales-group {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  background: #fbfcfd;
}

.restaurant-daily-sales-group h3,
.restaurant-fiscal-sales-section h4 {
  margin: 0;
}

.restaurant-fiscal-sales-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.restaurant-fiscal-sales-section {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.restaurant-fiscal-sales-section .accounting-daily-sales-row {
  margin: 0;
}

.restaurant-daily-sales-widget {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
  align-content: start;
}

.restaurant-daily-sales-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, .75fr);
  gap: 8px;
  align-items: center;
}

.restaurant-daily-sales-controls select,
.restaurant-daily-sales-controls input {
  min-width: 0;
}

.restaurant-daily-sales-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.restaurant-daily-sales-stat-grid article {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(33, 59, 82, 0.14);
  border-radius: 10px;
  padding: 9px 10px;
  background: linear-gradient(135deg, rgba(33, 59, 82, 0.08), rgba(255, 255, 255, 0.96));
  min-width: 0;
}

.restaurant-daily-sales-stat-grid small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-overflow: clip;
  text-transform: uppercase;
  white-space: normal;
}

.restaurant-daily-sales-stat-grid strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-daily-sales-list {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.restaurant-daily-sales-list article {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  background: #fbfcfd;
}

.restaurant-daily-sales-list article.is-today {
  border-color: rgba(51, 121, 187, 0.4);
  background: rgba(51, 121, 187, 0.08);
}

.restaurant-daily-sales-list article > div:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.restaurant-daily-sales-list strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-daily-sales-list span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-daily-sales-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(33, 59, 82, 0.08);
}

.restaurant-daily-sales-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.income-account-widget {
  align-content: start;
}

.accounting-purchase-orders-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.accounting-purchase-order-lines {
  display: grid;
  gap: 10px;
}

.accounting-purchase-order-line {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 120px;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.accounting-purchase-order-line > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.task-quantity-field {
  width: 120px;
}

.income-widget-settings {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.income-widget-account-list,
.income-account-widget-list {
  display: grid;
  gap: 8px;
}

.income-account-widget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
}

.income-account-widget-row span {
  min-width: 0;
  color: var(--muted);
  font-weight: 800;
}

.income-account-widget-row strong {
  color: var(--ink);
}

.employee-team-grid .employee-directory {
  grid-column: 1 / -1;
}

.employee-team-grid > article:first-child {
  grid-column: 1 / -1;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.directory-search {
  width: min(360px, 100%);
}

.employee-edit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
}

.employee-edit-fields input,
.employee-edit-fields select {
  min-height: 38px;
}

.employee-edit-fields select[multiple],
.user-create-form select[multiple] {
  height: auto;
  padding: 8px;
}

.location-check-list {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.location-check-list.is-disabled {
  opacity: .65;
}

.location-check {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.location-check input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.employee-directory-layout {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.employee-name-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.employee-list-item {
  display: grid;
  grid-template-columns: 38px minmax(180px, 1.15fr) minmax(220px, 1.4fr) minmax(160px, .75fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
  text-align: left;
  cursor: pointer;
}

.employee-list-item.hide-compensation {
  grid-template-columns: 38px minmax(180px, 1.2fr) minmax(180px, .8fr) auto;
}

.employee-list-item.active,
.employee-list-item:hover {
  border-color: #bdd0e6;
  background: #f8fbff;
}

.employee-list-item > span:first-child,
.employee-detail-heading > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--navy-2);
  font-weight: 850;
}

.employee-list-item strong,
.employee-list-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-list-main,
.employee-list-details,
.employee-pay-summary {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.employee-list-details small,
.employee-pay-summary small {
  color: var(--muted);
}

.employee-list-meta {
  display: grid;
  justify-items: end;
}

.employee-detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
}

.employee-directory-layout.has-open-profile .employee-detail-panel {
  position: fixed;
  inset: 5vh max(20px, calc((100vw - 860px) / 2));
  z-index: 35;
  overflow: auto;
  box-shadow: 0 26px 80px rgba(15, 35, 52, .28);
}

.employee-detail-form {
  margin: 0;
}

.employee-detail-form [data-back-to-team] {
  position: sticky;
  top: 0;
  z-index: 3;
  width: fit-content;
  margin: 0 0 12px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 18px rgba(15, 35, 52, .08);
}

.employee-detail-form > button[type="submit"],
.employee-detail-form > .locked-pill {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 14px;
  border-radius: 8px;
  background-clip: padding-box;
  box-shadow: 0 -8px 18px rgba(15, 35, 52, .08);
}

.employee-detail-form > button[type="submit"] {
  width: 100%;
}

.employee-detail-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.employee-detail-heading h3 {
  margin: 0 0 3px;
}

.employee-detail-heading p {
  margin: 0;
}

.new-employee-pill {
  border: 1px solid rgba(36, 117, 84, .25);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--success);
  background: #e9f7ef;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.employee-detail-form .form-error,
.employee-detail-form .form-success {
  grid-column: 1 / -1;
  width: 100%;
}

.self-profile-actions {
  display: grid;
  align-content: end;
  gap: 7px;
}

.self-profile-actions small {
  color: var(--muted);
  line-height: 1.35;
}

.pin-change-box {
  display: grid;
  align-content: end;
  gap: 8px;
}

.sidebar-order-list {
  display: grid;
  gap: 8px;
}

.sidebar-order-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.sidebar-order-item strong {
  min-width: 0;
}

.sidebar-order-item > div {
  display: inline-flex;
  gap: 6px;
}

.widget-choice-list {
  display: grid;
  gap: 10px;
}

.widget-choice {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.widget-choice input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.widget-choice span {
  display: grid;
  gap: 3px;
}

.widget-choice small {
  color: var(--muted);
  line-height: 1.35;
}

.location-directory-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.task-station-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.task-station-layout.has-location-list {
  grid-template-columns: minmax(190px, 250px) minmax(210px, 280px) minmax(0, 1fr);
}

.my-task-location-list .location-list-item {
  background: #f8fbff;
}

.task-list-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.task-list-controls .ghost-button {
  gap: 8px;
}

.task-list-controls .ghost-button.active {
  border-color: rgba(36, 107, 254, .34);
  color: var(--accent);
  background: var(--accent-soft);
}

.task-list-controls .ghost-button small {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  padding: 0 6px;
  color: white;
  background: var(--accent);
  font-size: 11px;
}

.nav-badge-dot,
.settings-alert-dot {
  width: 10px;
  min-width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: #d82e2e;
}

.settings-alert-dot {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

.inline-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #d7e2eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-hairline);
}

.inline-alert p,
.inline-alert small {
  margin: 4px 0 0;
  color: #637487;
}

.warning-alert {
  border-color: #f1d18a;
  background: #fff8e7;
}

.location-name-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.location-list-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  text-align: left;
  cursor: pointer;
}

.location-list-item.active,
.location-list-item:hover {
  border-color: #bdd0e6;
  background: #f8fbff;
}

.location-list-item small {
  color: var(--muted);
}

.location-detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
}

.location-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  align-items: end;
  gap: 10px;
  margin: 0;
}

.location-row .form-error,
.location-row .form-success {
  grid-column: 1 / -1;
}

.schedule-settings-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.schedule-settings-panel h3 {
  margin: 0;
}

.compact-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, .4fr) auto;
  align-items: end;
  gap: 10px;
  margin: 0;
}

.station-create-form {
  grid-template-columns: minmax(180px, 1fr) auto;
}

.station-create-form h4 {
  grid-column: 1 / -1;
  margin: 0;
}

.station-timeframe-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.station-timeframe-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 130px 130px minmax(120px, auto) auto;
  align-items: center;
  gap: 8px;
}

.compact-create-form .form-error {
  grid-column: 1 / -1;
}

.department-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.department-chip {
  border: 1px solid var(--line);
  border-left: 6px solid var(--department-color);
  border-radius: 8px;
  padding: 9px 12px;
  background: white;
  font-weight: 850;
  cursor: pointer;
}

.department-chip.active,
.department-chip:hover {
  background: #f8fbff;
  border-color: #bdd0e6;
  border-left-color: var(--department-color);
}

.department-edit-form {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 110px auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.department-edit-form .form-error,
.department-edit-form .form-success {
  grid-column: 1 / -1;
}

.copy-location-form {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
  padding: 12px;
  background: #fffdf8;
}

.copy-location-form h3 {
  margin: 0;
}

.copy-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inline-check {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.inline-check input {
  width: auto;
}

.uppercase-input {
  text-transform: uppercase;
}

.station-list {
  display: grid;
  gap: 8px;
}

.station-list-item {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 2fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
}

.station-list-item .form-error,
.station-list-item .form-success {
  grid-column: 1 / -1;
}

.schedule-shell {
  display: grid;
  gap: 14px;
}

.schedule-toolbar,
.schedule-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.schedule-toolbar {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 1px 2px rgba(15, 35, 52, .04);
}

.schedule-filters {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.schedule-day-control {
  display: none;
  gap: 8px;
}

.week-control {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 1px 2px rgba(15, 35, 52, .04);
}

.week-control .ghost-button {
  border: 0;
  border-radius: 0;
}

.week-picker-trigger {
  position: relative;
  display: grid;
  min-width: 220px;
  min-height: 40px;
  place-items: center;
  padding: 0 14px;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}

.week-picker-trigger:hover {
  background: #f8fbff;
}

.week-picker-trigger input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.smtp-settings-panel {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.smtp-settings-panel h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.email-delivery-log {
  display: grid;
  gap: 10px;
}

.email-delivery-log h4 {
  margin: 0;
  font-size: 14px;
}

.email-delivery-list {
  display: grid;
  gap: 8px;
}

.email-delivery-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.email-delivery-row.failed {
  border-color: rgba(190, 74, 74, 0.5);
  background: rgba(190, 74, 74, 0.08);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.messaging-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(420px, 1fr);
  align-items: start;
  gap: 18px;
}

.messaging-layout.inbox-only {
  grid-template-columns: minmax(0, 1fr);
}

.message-compose-panel,
.message-inbox-panel,
.announcements-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: white;
}

.message-compose-panel {
  position: sticky;
  top: 18px;
}

.message-inbox-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.message-recipient-picker {
  display: grid;
  gap: 8px;
}

.message-recipient-picker > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message-recipient-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfd;
}

.message-recipient-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}

.message-recipient-option:hover,
.message-recipient-option:has(input:checked) {
  border-color: #bdd0e6;
  background: white;
}

.message-recipient-option input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.message-recipient-option strong,
.message-recipient-option small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-recipient-option small {
  color: var(--muted);
}

.message-window {
  display: grid;
  gap: 14px;
}

.message-thread-list,
.announcement-list,
.message-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.message-thread-item {
  position: relative;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fbfcfd;
  text-align: left;
  cursor: pointer;
}

.message-thread-item.active,
.message-thread-item:hover {
  border-color: #bdd0e6;
  background: #f8fbff;
}

.message-thread-item.unread {
  border-left: 3px solid #d73535;
  padding-left: 9px;
}

.message-thread-item small,
.announcement-card small {
  color: var(--muted);
}

.message-conversation {
  display: grid;
  min-height: 360px;
  align-content: space-between;
  gap: 14px;
}

.message-bubble {
  max-width: 78%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7f9fb;
}

.message-bubble.mine {
  justify-self: end;
  color: white;
  border-color: var(--navy-2);
  background: var(--navy-2);
}

.task-module-shell {
  display: grid;
  gap: 16px;
}

.task-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: start;
}

.task-create-layout.single-column {
  grid-template-columns: 1fr;
}

.task-create-main,
.task-template-sidebar,
.task-create-form {
  display: grid;
  gap: 16px;
}

.task-create-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: white;
}

.task-create-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink);
}

.task-create-card p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}

.task-limit-note {
  justify-self: end;
  color: var(--muted);
  font-weight: 650;
}

.task-timeframe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.task-timeframe-grid .settings-note {
  grid-column: 1 / -1;
  margin: 0;
}

.task-timeframe-toggle {
  justify-self: start;
}

.task-assignment-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.task-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.task-card-list,
.task-location-report-list,
.task-item-list,
.task-builder-list,
.task-template-library-panel,
.task-recurrence-section {
  display: grid;
  gap: 12px;
}

.task-recurrence-section + .task-recurrence-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.task-card,
.task-report-location,
.task-template-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
}

.task-card {
  display: grid;
  gap: 10px;
}

.task-template-library {
  display: grid;
  gap: 10px;
}

.task-template-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.task-template-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.task-template-item > span {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.task-template-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  color: var(--muted);
}

.task-template-item.active {
  border-color: rgba(43, 82, 116, .45);
  background: #f3f8fc;
}

.task-card.complete,
.task-report-template.complete,
.task-report-row.complete,
.task-item-row.complete {
  border-color: rgba(36, 117, 84, .3);
  background: #f2fbf6;
}

.task-report-template {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: white;
}

.task-report-summary-list {
  display: grid;
  gap: 14px;
}

.task-report-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
}

.task-report-controls label {
  min-width: min(280px, 100%);
}

.task-report-summary-location {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: white;
}

.task-report-summary-location h3 {
  margin: 0;
}

.task-report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.task-report-summary-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  background: #fbfcfd;
}

.task-report-donut {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, white 0 57%, transparent 58%),
    conic-gradient(var(--success) var(--task-progress), #e7edf2 0);
}

.task-report-donut span,
.task-report-donut small {
  grid-area: 1 / 1;
}

.task-report-donut span {
  margin-top: -12px;
  font-size: 20px;
  font-weight: 900;
}

.task-report-donut small {
  margin-top: 28px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.task-report-detail-list {
  display: grid;
  gap: 8px;
}

.task-report-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.task-report-detail strong,
.task-report-detail small {
  display: block;
}

.task-report-detail small,
.task-photo-missing {
  color: var(--muted);
}

.task-report-photo {
  display: block;
  width: 76px;
  height: 58px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #f7f9fb;
  cursor: zoom-in;
}

.task-report-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-photo-viewer,
.task-detail-viewer,
.task-list-viewer,
.task-pdf-viewer,
.my-task-station-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.task-photo-viewer-backdrop,
.task-detail-viewer-backdrop,
.task-list-viewer-backdrop,
.task-pdf-viewer-backdrop,
.my-task-station-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 23, 35, .72);
}

.task-photo-viewer-dialog,
.task-detail-viewer-dialog,
.task-list-viewer-dialog,
.task-pdf-viewer-dialog,
.my-task-station-viewer-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  max-width: min(980px, 94vw);
  max-height: 90vh;
  overflow: auto;
  border-radius: 8px;
  padding: 14px;
  background: white;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
}

.task-photo-viewer-dialog img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.task-photo-viewer-close,
.task-detail-viewer-close,
.task-list-viewer-close,
.task-pdf-viewer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
}

.task-detail-viewer-dialog {
  width: min(680px, 94vw);
  padding: 24px;
}

.task-list-viewer-dialog {
  width: min(760px, 94vw);
  padding: 24px;
}

.my-task-station-viewer-dialog {
  width: min(760px, 94vw);
  padding: 24px;
}

.task-pdf-viewer-dialog {
  grid-template-rows: auto 1fr;
  width: min(1120px, 96vw);
  height: min(900px, 92vh);
  max-width: 96vw;
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
}

.task-pdf-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 54px 12px 16px;
  border-bottom: 1px solid var(--line);
}

.task-pdf-viewer-header span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-pdf-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}

.task-detail-heading {
  padding-right: 40px;
}

.task-detail-heading h2 {
  margin: 4px 0 0;
}

.task-detail-heading small {
  color: var(--muted);
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(11, 23, 35, .62);
}

.modal-panel {
  width: min(560px, 94vw);
  max-height: 90vh;
  overflow: auto;
  border-radius: 8px;
  padding: 20px;
  background: white;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.task-card-heading,
.task-item-row,
.task-report-row,
.task-builder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.task-card.task-card-toggle {
  display: grid;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  padding: 16px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.task-card.task-card-toggle:hover {
  border-color: var(--navy-2);
  box-shadow: 0 10px 24px rgba(15, 35, 52, .08);
}

.task-card-detail {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.task-action-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.task-item-main {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.task-item-main:hover strong {
  color: var(--accent);
}

.task-card-heading strong,
.task-item-row strong,
.task-report-row strong {
  display: block;
}

.task-card-heading small,
.task-item-row small,
.task-report-row small {
  color: var(--muted);
}

.task-progress,
.task-done-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #f7f9fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.task-builder-row label {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.task-builder-row {
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.task-remove-button {
  justify-self: end;
}

.task-builder-row .task-description-field,
.task-builder-row .task-pdf-field {
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
}

.task-purchase-fields {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.task-purchase-fields > label,
.task-purchase-product-line label {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.task-purchase-products-builder,
.task-purchase-product-lines,
.task-purchase-order-list {
  display: grid;
  gap: 10px;
}

.task-purchase-product-line,
.task-purchase-order-line {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(140px, .55fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.task-purchase-order-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.task-purchase-order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.task-purchase-order-card-header span,
.task-purchase-order-line > span {
  display: grid;
  gap: 4px;
}

.task-purchase-order-lines {
  display: grid;
  gap: 8px;
}

.task-purchase-order-line {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  align-items: center;
}

.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.rich-text-toolbar button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  min-width: 34px;
  height: 32px;
  font-weight: 850;
  cursor: pointer;
}

.rich-text-editor {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
}

.rich-text-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.rich-text-output h3,
.rich-text-output h4,
.rich-text-output p,
.rich-text-output ul,
.rich-text-output ol {
  margin: 6px 0;
}

.rich-text-output ul,
.rich-text-output ol {
  padding-left: 22px;
}

.task-item-description {
  margin: 6px 0;
  color: var(--ink);
}

.task-pdf-link {
  display: inline-block;
  margin: 0 0 6px;
  color: var(--navy-2);
  font-weight: 800;
}

.task-photo-button {
  position: relative;
  overflow: hidden;
}

.task-photo-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.date-input {
  max-width: 190px;
}

.audit-shell {
  display: grid;
  gap: 16px;
}

.audit-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(180px, 1fr) minmax(0, 1.3fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.audit-row strong,
.audit-row small {
  display: block;
}

.audit-row small {
  color: var(--muted);
}

.audit-row code {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.audit-row.is-clickable {
  cursor: pointer;
}

.audit-row.is-clickable:hover {
  border-color: rgba(31, 111, 235, .36);
  background: rgba(31, 111, 235, .04);
}

.audit-row-link {
  align-self: end;
  color: var(--accent) !important;
  font-weight: 700;
}

.message-bubble p {
  margin: 5px 0 0;
  color: inherit;
}

.message-bubble small {
  color: inherit;
  opacity: .78;
}

.message-meta-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.message-reply-form {
  display: grid;
  gap: 10px;
  margin: 0;
}

.announcement-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.announcement-card p {
  margin: 0;
}

.announcement-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, .1);
}

/* Shared product polish layer */
.settings-section-card,
.employee-detail-panel,
.employee-list-item,
.message-compose-panel,
.message-inbox-panel,
.announcements-panel,
.announcement-card,
.task-create-card,
.task-card,
.task-report-location,
.task-template-item,
.audit-filter-grid,
.audit-row,
.schedule-picker-panel,
.template-editor-panel,
.home-overview-widget,
.my-schedule-panel,
.modal-panel,
.email-delivery-row,
.permission-module,
.location-check-list,
.task-assignment-panel,
.task-report-summary-location,
.task-report-template {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 35, 52, .04);
}

.employee-list-item,
.message-thread-item,
.task-template-item,
.task-card.task-card-toggle,
.audit-row,
.scheduled-headcount-card,
.my-schedule-card,
.employee-pick-button,
.home-widget-picker-option {
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.employee-list-item:hover,
.message-thread-item:hover,
.task-template-item:hover,
.task-card.task-card-toggle:hover,
.audit-row:hover,
.scheduled-headcount-card:hover,
.my-schedule-card:hover,
.employee-pick-button:hover,
.home-widget-picker-option:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.employee-list-item.active,
.message-thread-item.active,
.task-template-item.active {
  border-color: rgba(31, 111, 235, .34);
  background: var(--accent-quiet);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, .08);
}

.accounting-sale-card.is-focused,
.accounting-list-row.is-focused,
.accounting-bank-transaction-row.is-focused {
  border-color: rgba(31, 111, 235, .5);
  background: rgba(31, 111, 235, .08);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, .09);
}

.employee-detail-panel,
.message-compose-panel,
.message-inbox-panel,
.announcements-panel,
.task-create-card,
.audit-filter-grid,
.schedule-picker-panel,
.template-editor-panel,
.modal-panel,
.home-widget-picker-panel {
  background: rgba(255, 255, 255, .98);
}

.modal-panel,
.schedule-picker-panel,
.template-editor-panel,
.home-widget-picker-panel,
.employee-directory-layout.has-open-profile .employee-detail-panel {
  box-shadow: var(--shadow-panel);
}

.status-pill,
.locked-pill,
.new-employee-pill,
.task-progress,
.task-done-pill {
  border-radius: 999px;
  font-weight: 850;
}

.rich-text-toolbar button:hover,
.text-button:hover,
.task-pdf-link:hover {
  color: var(--accent);
}

.danger-button {
  color: var(--danger);
}

.danger-button:hover:not(:disabled) {
  border-color: rgba(180, 35, 24, .25);
  background: #fff5f3;
}

.schedule-publish {
  margin-left: auto;
}

.schedule-publish:disabled {
  border-color: #c8d0d8;
  color: #6f7a86;
  background: #d7dde3;
  box-shadow: none;
  cursor: not-allowed;
}

.schedule-publish.is-loading {
  opacity: .75;
}

.schedule-filters label {
  width: min(340px, 100%);
}

.readonly-field {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
}

.schedule-picker-panel {
  position: fixed;
  inset: auto 20px 24px auto;
  z-index: 40;
  display: grid;
  gap: 14px;
  width: min(680px, calc(100vw - 40px));
  max-height: min(70vh, 640px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
  box-shadow: var(--shadow);
}

.schedule-picker-panel p {
  margin-bottom: 0;
}

.template-editor-panel,
.home-overview-widget,
.my-schedule-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
}

.home-widget-shell,
.home-widget-empty-slot {
  position: relative;
  min-height: 0;
  height: 100%;
}

.home-widget-grid > .home-overview-widget,
.home-widget-shell > .my-schedule-panel {
  height: 100%;
  align-content: start;
  overflow: hidden;
}

.home-widget-shell > .my-schedule-panel,
.home-widget-grid > .home-overview-widget {
  padding: 14px;
}

.home-widget-shell.has-widget-toolbar > .my-schedule-panel,
.home-widget-grid > .home-overview-widget.has-widget-toolbar {
  padding-top: 42px;
}

.home-widget-shell > .my-schedule-panel .section-header-row,
.home-widget-grid > .home-overview-widget .section-header-row {
  align-items: start;
  gap: 10px;
}

.home-widget-shell > .my-schedule-panel .section-header-row p,
.home-widget-grid > .home-overview-widget .section-header-row p {
  display: none;
}

.home-widget-shell > .my-schedule-panel .my-schedule-list,
.home-widget-grid > .home-overview-widget .scheduled-headcount-list {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.home-widget-toolbar {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  display: inline-flex;
  gap: 6px;
}

.home-widget-toolbar .icon-button {
  width: 30px;
  height: 30px;
  background: white;
}

.home-widget-empty-slot {
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px dashed #cbd5df;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, .62);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.home-widget-empty-slot:hover {
  border-color: rgba(31, 111, 235, .42);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-soft);
}

.home-widget-empty-slot span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  background: white;
  font-size: 24px;
  font-weight: 850;
}

.home-widget-empty-slot strong {
  font-size: 13px;
}

.home-widget-picker-panel {
  position: fixed;
  top: 96px;
  right: 24px;
  z-index: 25;
  display: grid;
  gap: 14px;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 124px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
  box-shadow: var(--shadow);
}

.home-widget-picker-list {
  display: grid;
  gap: 10px;
}

.home-widget-picker-option {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  color: var(--ink);
  background: #fbfcfd;
  text-align: left;
  cursor: pointer;
}

.home-widget-picker-option:hover {
  border-color: rgba(77, 155, 210, .45);
  background: #f3f8fc;
}

.home-widget-picker-option small {
  color: var(--muted);
}

.template-editor-panel p,
.home-overview-widget p,
.my-schedule-panel p {
  margin-bottom: 0;
}

.home-overview-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0;
}

.home-overview-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.home-widget-date-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-widget-date-controls input {
  width: 150px;
}

.scheduled-headcount-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.home-widget-grid .scheduled-headcount-list {
  grid-template-columns: 1fr;
}

.scheduled-headcount-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fbfcfd;
}

.scheduled-headcount-card span {
  font-size: 28px;
  font-weight: 900;
}

.template-editor-grid {
  display: grid;
  grid-template-columns: 190px repeat(7, minmax(96px, 1fr));
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 862px;
}

.template-editor-head,
.template-editor-station {
  min-height: 58px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px;
}

.template-editor-head {
  display: grid;
  place-items: center start;
  color: var(--muted);
  background: #f7f9fb;
  font-size: 12px;
  font-weight: 900;
}

.template-editor-station {
  display: grid;
  align-content: center;
  gap: 3px;
}

.template-editor-station small {
  color: var(--muted);
}

.template-assignment-cell {
  display: grid;
  gap: 7px;
  min-height: 78px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
  background: white;
}

.template-assignment-cell select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  font-size: 12px;
}

.template-break-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.template-break-field input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.template-rotation-check {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: start;
  gap: 6px;
  color: var(--muted);
  background: white;
  font-size: 12px;
  font-weight: 850;
}

.template-rotation-check input {
  width: 16px;
  height: 16px;
}

.my-schedule-list {
  display: grid;
  gap: 10px;
}

.my-schedule-week {
  display: grid;
  gap: 10px;
}

.my-schedule-week-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.my-schedule-week-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.my-schedule-week-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.home-widget-grid .my-schedule-week-days {
  grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
  .home-widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.my-schedule-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 11px;
  background: #fbfcfd;
}

.my-schedule-card span {
  font-weight: 850;
}

.my-schedule-card small {
  color: var(--muted);
}

.employee-pick-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.employee-pick-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  text-align: left;
  background: #fbfcfd;
  cursor: pointer;
}

.employee-pick-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.employee-pick-button:disabled {
  opacity: .58;
  cursor: not-allowed;
}

.employee-pick-button span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--navy-2);
  font-size: 12px;
  font-weight: 900;
}

.employee-pick-button strong,
.employee-pick-button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-pick-button small {
  grid-column: 2;
  color: var(--muted);
}

.schedule-board {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 1px 2px rgba(15, 35, 52, .04);
}

.schedule-board-stack {
  display: grid;
  gap: 16px;
}

.schedule-reset-row {
  display: flex;
  justify-content: flex-end;
}

.schedule-board-header,
.schedule-events-row,
.schedule-station-row {
  display: grid;
  grid-template-columns: 240px repeat(7, minmax(132px, 1fr));
  min-width: 1164px;
}

.schedule-board.one-day .schedule-board-header,
.schedule-board.one-day .schedule-events-row,
.schedule-board.one-day .schedule-station-row {
  grid-template-columns: minmax(132px, 180px) minmax(160px, 1fr);
  min-width: 0;
}

.schedule-board.one-day .schedule-department-bar {
  min-width: 0;
}

.schedule-side-cell,
.schedule-day-head,
.schedule-time-cell,
.schedule-shift-cell {
  min-height: 82px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.schedule-event-cell {
  min-height: 44px;
  max-height: 58px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
}

.schedule-day-head {
  display: grid;
  align-content: center;
  gap: 4px;
}

.schedule-day-head.today,
.schedule-event-cell.today,
.schedule-shift-cell.today {
  background: #eaf5ff;
}

.schedule-day-head.today {
  box-shadow: inset 0 3px 0 #4d9bd2;
}

.schedule-day-head strong {
  font-size: 20px;
}

.schedule-day-head span,
.schedule-day-head small,
.schedule-time-cell span,
.schedule-side-cell small {
  color: var(--muted);
}

.schedule-side-cell {
  display: grid;
  align-content: center;
  gap: 8px;
}

.schedule-events-row .schedule-side-cell {
  min-height: 44px;
  padding: 6px 8px;
}

.text-button {
  width: fit-content;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.schedule-department-bar {
  min-width: 1164px;
  padding: 9px 14px;
  color: white;
  background: var(--department-color);
  font-weight: 900;
}

.schedule-time-cell {
  display: grid;
  align-content: center;
  gap: 5px;
}

.schedule-shift-cell {
  display: grid;
  align-content: start;
  gap: 7px;
  place-items: stretch;
  border-top: 0;
  border-left: 0;
  color: var(--muted);
  background: #fff;
}

.schedule-time-cell {
  background: #fbfcfd;
}

.rotation-toggle {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 7px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 11px;
  font-weight: 850;
}

.rotation-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.schedule-shift-cell:hover {
  background: #f8fbff;
}

.schedule-shift-cell.today:hover {
  background: #dff0ff;
}

.schedule-event-cell {
  display: grid;
  align-content: start;
  gap: 3px;
}

.schedule-event-pill {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-left: 3px solid #7a9ab2;
  border-radius: 5px;
  padding: 3px 5px;
  background: #fbfcfd;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-event-pill.birthday {
  border-left-color: #d49a3a;
}

.schedule-event-pill.hiring {
  border-left-color: #3d8b6b;
}

.schedule-event-pill strong {
  font-size: 9px;
  text-transform: uppercase;
}

.schedule-add {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.schedule-add:hover {
  background: rgba(77, 155, 210, .1);
  color: var(--navy);
}

.shift-assignment-card {
  display: grid;
  width: 100%;
  gap: 2px;
  border: 0;
  border-left: 5px solid var(--department-color);
  padding: 7px 8px;
  color: var(--ink);
  background: #f4f7fa;
  font-size: 12px;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
}

.shift-assignment-card:hover {
  outline: 2px solid rgba(31, 111, 235, .18);
}

.shift-assignment-card.generated {
  border-left-style: double;
  background: #eef7f3;
}

.shift-assignment-card.draft {
  border-left-color: #d6a531;
  background: #fff6d8;
}

.shift-assignment-card strong,
.shift-assignment-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-assignment-card strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shift-assignment-card small {
  color: var(--muted);
  font-weight: 750;
}

.shift-remove-action {
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #9f3d3d;
  background: white;
  font-size: 16px;
  line-height: 1;
}

.shift-remove-action:hover {
  border-color: #d9a4a4;
  background: #fff0f0;
}

.schedule-empty-config {
  min-width: 1164px;
  padding: 24px;
}

.schedule-template-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.notifications-shell {
  display: grid;
  gap: 10px;
}

.punch-clock-shell,
.time-clock-management,
.time-clock-report,
.time-clock-entry-list {
  display: grid;
  gap: 14px;
}

.punch-card,
.time-clock-user-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
}

.time-clock-entry-row {
  display: grid;
  grid-template-columns: 110px 1fr minmax(150px, 1fr) minmax(150px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.time-clock-salary-approved {
  color: #237a42;
}

.time-clock-user-card .section-header-row strong small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.time-clock-salary-approved small {
  color: #237a42;
}

.time-clock-entry-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.payroll-period-form .time-clock-entry-list {
  display: grid;
  gap: 0;
}

.payroll-period-form .time-clock-entry-row {
  grid-template-columns: minmax(160px, 1.4fr) 80px minmax(120px, 1fr) minmax(160px, 1fr) minmax(120px, 1fr);
  padding: 12px 0;
}

.payroll-period-form .time-clock-entry-row label {
  margin: 0;
}

.payroll-summary-panel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
}

.payroll-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.payroll-summary-line strong {
  font-size: 1.05rem;
  text-align: right;
}

.payroll-summary-total {
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 12px;
}

.payroll-summary-total strong {
  color: #237a42;
  font-size: 1.25rem;
}

.payroll-payment-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 12px;
}

.employee-performance-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fbfcfd;
}

.employee-performance-panel h3 {
  margin: 0;
}

.employee-performance-list {
  display: grid;
  gap: 8px;
}

.employee-performance-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px);
  gap: 10px;
}

.employee-performance-list p {
  margin: 0;
  border-left: 3px solid #d08b24;
  padding: 8px 10px;
  background: white;
}

.notification-card {
  position: relative;
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 13px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.notification-card:hover {
  border-color: #a8b6c4;
  background: #fbfcfd;
}

.notification-card.unread {
  border-left-color: #d73535;
}

.notification-card:not(.unread) {
  border-left-color: #b9c4cf;
  background: #f5f7f9;
  color: #6f7a86;
}

.notification-unread-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d73535;
}

.notification-card p {
  margin: 0;
}

.notification-card span,
.notification-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.private-toggle {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.danger-button {
  color: #9b2f2f;
}

.danger-zone {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid #f0c5c5;
  border-radius: var(--radius);
  padding: 14px;
  background: #fff8f8;
}

.danger-zone h3 {
  margin: 0;
  color: #7b2525;
}

.user-list,
.role-order-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
}

.user-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.user-row > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--navy-2);
  font-weight: 850;
}

.user-row small {
  display: block;
  color: var(--muted);
}

.user-row em {
  color: var(--success);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.role-order-list {
  padding-left: 22px;
}

.role-order-list li {
  padding: 6px 0;
}

dl {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

dd {
  margin: 0;
  word-break: break-word;
}

.endpoint-list {
  display: grid;
  gap: 10px;
}

.endpoint-list article {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 180px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.endpoint-list span {
  color: var(--success);
  font-weight: 900;
}

.endpoint-list small {
  color: var(--muted);
}

.creator-footer {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 15;
  display: grid;
  gap: 2px;
  justify-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 20px rgba(15, 35, 52, .08);
  font-size: 11px;
  font-weight: 800;
}

.creator-footer-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.creator-footer small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.support-footer-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.support-footer-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

@media (max-width: 1100px) {
  .metric-grid,
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principle-grid,
  .settings-grid,
  .accounting-invoice-grid,
  .accounting-payment-strip,
  .accounting-sale-card-main,
  .restaurant-daily-sales-groups,
  .task-create-layout {
    grid-template-columns: 1fr;
  }

  .restaurant-fiscal-sales-grid {
    grid-template-columns: 1fr;
  }

  .permission-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-edit-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-directory-layout {
    grid-template-columns: 1fr;
  }

  .location-directory-layout,
  .task-station-layout,
  .permission-directory-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    z-index: 30;
    transform: translateX(-100%);
    box-shadow: 18px 0 42px rgba(15, 35, 52, .24);
  }

  .sidebar::after {
    display: none;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 24;
    display: none;
    border: 0;
    background: rgba(15, 35, 52, .14);
    cursor: pointer;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .app-shell.sidebar-collapsed .sidebar {
    width: 252px;
    padding: 12px 14px 16px;
  }

  .app-shell.sidebar-collapsed .brand img {
    width: 214px;
    max-height: 82px;
  }

  .app-shell.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .app-shell.sidebar-collapsed .nav-item span:not(.nav-icon) {
    display: inline;
  }

  .topbar-menu-button {
    display: inline-grid;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    display: grid;
    grid-template-columns: 40px auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px;
  }

  .search-box {
    min-width: 0;
  }

  .topbar-actions {
    align-items: center;
    flex-direction: row;
    justify-content: end;
    width: auto;
  }

  .company-time-chip {
    display: none;
  }

  .view {
    padding: 20px;
  }

  .metric-grid,
  .module-grid,
  .home-widget-grid,
  .permission-module-grid,
  .form-grid-two,
  .task-timeframe-grid,
  .task-assignment-panel,
  .task-template-filters,
  .task-purchase-product-line,
  .task-purchase-order-line {
    grid-template-columns: 1fr;
  }

  .home-widget-grid {
    grid-auto-rows: auto;
  }

  .home-widget-shell,
  .home-widget-empty-slot,
  .home-widget-shell > .my-schedule-panel,
  .home-widget-grid > .home-overview-widget {
    height: auto;
    min-height: 190px;
  }

  .home-widget-picker-panel {
    inset: auto 12px 12px 12px;
    width: auto;
    max-height: min(70vh, 520px);
  }

  .module-tabs,
  .accounting-invoice-topbar,
  .section-header-row {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .accounting-balance-card {
    text-align: left;
  }

  .messaging-layout,
  .employee-directory-layout,
  .employee-list-item,
  .time-clock-entry-row,
  .task-card-heading,
  .task-item-row,
  .task-report-row,
  .task-report-detail,
  .task-builder-row,
  .task-template-item,
  .audit-filter-grid,
  .audit-row {
    grid-template-columns: 1fr;
  }

  .message-compose-panel,
  .message-inbox-panel,
  .message-conversation,
  .accounting-invoice-form,
  .accounting-sales-list,
  .message-bubble {
    min-width: 0;
    max-width: 100%;
  }

  .accounting-invoice-grid,
  .accounting-payment-strip,
  .accounting-invoice-topbar,
  .accounting-line-actions,
  .accounting-invoice-actions {
    padding-right: 14px;
    padding-left: 14px;
  }

  .accounting-line-table-wrap {
    padding: 0 14px;
  }

  .employee-directory-layout.has-open-profile .employee-detail-panel {
    inset: 12px;
  }

  .module-tabs button {
    width: 100%;
  }

  .employee-edit-fields,
  .location-row,
  .compact-create-form,
  .station-create-form,
  .station-timeframe-row {
    grid-column: 1 / -1;
    justify-items: stretch;
    grid-template-columns: 1fr;
  }

  .schedule-toolbar,
  .schedule-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-day-control {
    display: flex;
  }

  .week-control,
  .schedule-day-control,
  .schedule-filters label,
  .schedule-publish {
    width: 100%;
    margin-left: 0;
  }

  .schedule-day-control .ghost-button {
    flex: 1;
  }

  .week-control {
    justify-content: space-between;
  }

  .week-control strong {
    min-width: 0;
  }

  .schedule-picker-panel {
    inset: auto 12px 12px 12px;
    width: auto;
  }

  .endpoint-list article,
  dl {
    grid-template-columns: 1fr;
  }

  .creator-footer {
    position: static;
    margin: 0 20px 20px;
    justify-items: end;
  }
}

.app-shell.sidebar-collapsed .nav-item span.nav-badge {
  display: inline-grid;
  width: 10px;
  min-width: 10px;
  height: 10px;
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 0;
  overflow: hidden;
  color: transparent;
}

.status-pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  padding: 5px 9px;
  white-space: nowrap;
}

.status-pill.warning {
  background: #fff2c7;
  color: #7a4d00;
}

.status-pill.success {
  background: #dff7eb;
  color: #176241;
}

.punch-availability-prompt {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  bottom: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  display: flex;
  gap: 12px;
  left: 50%;
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px;
  position: fixed;
  transform: translateX(-50%);
  width: max-content;
  z-index: 70;
}

.punch-availability-prompt p {
  color: var(--muted);
  margin: 3px 0 0;
}

@media (max-width: 760px) {
  .punch-availability-prompt {
    align-items: stretch;
    bottom: 12px;
    flex-direction: column;
    width: calc(100vw - 24px);
  }

  .app-shell.sidebar-collapsed .nav-item span.nav-badge {
    position: static;
    width: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    color: white;
  }
}

/* SaaS product redesign layer */
.login-screen {
  background:
    linear-gradient(90deg, rgba(62, 142, 216, .16), transparent 34%, rgba(42, 168, 118, .1)),
    linear-gradient(145deg, #0d1d2a 0%, #17354c 58%, #102536 100%);
}

.login-panel {
  position: relative;
  overflow: hidden;
  padding: 38px;
  border-color: rgba(255, 255, 255, .2);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .32);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #3e8ed8, #2aa876, #d9a036);
}

.login-logo {
  width: 210px;
  height: 102px;
}

.login-panel h1 {
  margin: 12px 0 22px;
  text-align: center;
}

#loginForm {
  display: grid;
  gap: 14px;
}

.login-subscribe-button,
.login-create-account-button {
  width: 100%;
  min-height: 42px;
  margin-top: 2px;
}

.login-forgot-button {
  min-height: 30px;
  justify-self: center;
  padding: 0 8px;
  color: var(--accent);
  font-weight: 800;
}

.login-status {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 132px;
  padding: 20px 0 6px;
  text-align: center;
}

.login-status p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.login-status-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(37, 74, 103, .18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.login-credential-step {
  display: grid;
  gap: 12px;
}

.login-selected-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 95, 209, .16);
  border-radius: 8px;
  background: rgba(246, 248, 251, .94);
  color: #243447;
  font-weight: 800;
}

.link-button {
  border: 0;
  background: transparent;
  color: #1f5fd1;
  font: inherit;
  font-size: .86rem;
  font-weight: 850;
  text-decoration: underline;
  cursor: pointer;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #405060;
  font-weight: 760;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
}

.company-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(31, 95, 209, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
}

.company-picker p {
  margin: 0;
  color: #405060;
  font-weight: 760;
}

.company-picker-list {
  display: grid;
  gap: 8px;
}

.company-picker-list button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.company-picker-list small {
  color: #718295;
  font-weight: 800;
}

.primary-button,
.ghost-button,
.icon-button,
.topbar-icon-button,
.support-footer-button {
  transition: transform 120ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.primary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled),
.icon-button:hover:not(:disabled),
.topbar-icon-button:hover:not(:disabled),
.support-footer-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled,
.icon-button:disabled {
  opacity: .58;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.primary-button {
  border-color: #1f5fd1;
  background: linear-gradient(180deg, #2c74ff, #1f5fd1);
  box-shadow: 0 8px 18px rgba(31, 95, 209, .22);
}

.ghost-button {
  color: #223142;
  background: #fff;
  box-shadow: var(--shadow-hairline);
}

.ghost-button:hover:not(:disabled) {
  border-color: #b8c7d6;
  background: #f8fbff;
  box-shadow: 0 8px 20px rgba(15, 35, 52, .08);
}

input,
select,
textarea,
.rich-text-editor {
  border-color: #d5dee7;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(15, 35, 52, .02);
}

input:hover,
select:hover,
textarea:hover,
.rich-text-editor:hover {
  border-color: #c3d0dc;
}

.sidebar {
  width: 266px;
  padding: 12px 13px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(239, 243, 247, .96)),
    var(--sidebar-gray);
  border-right-color: rgba(16, 37, 54, .1);
  box-shadow: 18px 0 45px rgba(15, 35, 52, .1);
}

.brand {
  min-height: 122px;
  border-bottom-color: rgba(16, 37, 54, .09);
  padding: 12px 0 18px;
}

.brand img {
  width: 226px;
  max-height: 94px;
}

.nav-list {
  gap: 6px;
  margin-top: 12px;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-item {
  position: relative;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #4c5c6c;
  font-size: 13px;
}

.nav-item:hover {
  border-color: rgba(36, 107, 254, .13);
  color: #1a2a39;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 18px rgba(15, 35, 52, .06);
}

.nav-item.active {
  border-color: rgba(36, 107, 254, .18);
  color: var(--navy);
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 35, 52, .1);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 9px;
  width: 3px;
  height: calc(100% - 18px);
  border-radius: 999px;
  background: var(--accent);
}

.nav-icon,
.module-icon,
.principle-icon {
  border: 1px solid rgba(15, 35, 52, .08);
  color: #17364f;
  background: linear-gradient(180deg, #fff, #f4f7fa);
  box-shadow: none;
}

.nav-item.active .nav-icon {
  color: #fff;
  border-color: transparent;
  background: var(--navy-2);
}

.sidebar-signout {
  min-height: 40px;
  border-radius: 8px;
  color: #34485a;
}

.workspace {
  padding-bottom: 104px;
}

.topbar {
  min-height: 68px;
  border-bottom-color: rgba(15, 35, 52, .08);
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 1px 0 rgba(15, 35, 52, .04);
}

.search-box {
  border-color: #d4dde6;
  background: #f9fbfc;
}

.search-box input {
  background: transparent;
}

.topbar-icon-button {
  border-color: #d5dee7;
  background: #fff;
  box-shadow: var(--shadow-hairline);
}

.topbar-badge,
.nav-badge {
  background: #d82e2e;
}

.company-time-chip {
  background: #fff;
  box-shadow: var(--shadow-hairline);
}

.view {
  padding: 30px clamp(22px, 3vw, 42px);
}

.page-heading {
  align-items: center;
  margin-bottom: 24px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
}

.page-heading p {
  margin-top: 7px;
}

.subscription-pill,
.metric-card,
.module-card,
.principle-grid article,
.settings-grid article,
.settings-section-card,
.employee-detail-panel,
.employee-list-item,
.location-detail-panel,
.location-list-item,
.permission-role-item,
.role-permission-card,
.permission-module,
.task-create-card,
.task-card,
.task-report-location,
.task-template-item,
.task-report-summary-location,
.task-report-summary-card,
.message-compose-panel,
.message-inbox-panel,
.announcements-panel,
.announcement-card,
.notification-card,
.punch-card,
.time-clock-user-card,
.audit-filter-grid,
.audit-row,
.modal-panel,
.schedule-picker-panel,
.template-editor-panel,
.home-overview-widget,
.my-schedule-panel,
.scheduled-headcount-card,
.my-schedule-card {
  border-color: rgba(196, 208, 219, .9);
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--shadow-hairline);
}

.metric-card,
.module-card,
.task-card,
.employee-list-item,
.location-list-item,
.message-thread-item,
.notification-card,
.audit-row,
.scheduled-headcount-card,
.my-schedule-card {
  box-shadow: 0 1px 2px rgba(15, 35, 52, .04), 0 10px 30px rgba(15, 35, 52, .03);
}

.metric-card {
  min-height: 104px;
  padding: 18px;
}

.metric-card strong {
  font-size: 28px;
  letter-spacing: 0;
}

.module-card {
  min-height: 164px;
  padding: 18px;
}

.module-card:hover,
.metric-card:hover,
.settings-section-card:hover,
.employee-list-item:hover,
.location-list-item:hover,
.task-template-item:hover,
.task-card.task-card-toggle:hover,
.notification-card:hover,
.audit-row:hover,
.scheduled-headcount-card:hover,
.my-schedule-card:hover {
  border-color: rgba(36, 107, 254, .25);
  box-shadow: 0 16px 38px rgba(15, 35, 52, .09);
}

.module-card-top {
  margin-bottom: 24px;
}

.module-cta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--accent-soft);
  color: #1f5fd1;
}

.module-tabs {
  border-color: #d5dee7;
  background: #e9eef3;
  box-shadow: inset 0 1px 1px rgba(15, 35, 52, .04);
}

.module-tabs button {
  min-width: 122px;
  color: #526575;
}

.module-tabs button.active {
  background: var(--navy-2);
  box-shadow: 0 8px 20px rgba(24, 54, 78, .22);
}

.settings-section-card {
  border-radius: 8px;
}

.settings-section-card summary {
  min-height: 64px;
}

.settings-section-card[open] summary {
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.employee-list-item {
  min-height: 66px;
  border-left: 4px solid transparent;
}

.employee-list-item:hover,
.employee-list-item.active {
  border-left-color: var(--accent);
}

.employee-list-item > span:first-child,
.employee-detail-heading > span,
.user-row > span,
.employee-pick-button span {
  border-radius: 999px;
  background: linear-gradient(145deg, var(--navy-2), #26516f);
}

.employee-detail-panel {
  padding: 20px;
}

.employee-directory-layout.has-open-profile .employee-detail-panel {
  border-color: rgba(36, 107, 254, .18);
}

.location-list-item,
.permission-role-item,
.task-template-item,
.message-thread-item {
  border-radius: 8px;
}

.directory-search,
.task-template-filters select,
.audit-filter-grid label,
.task-report-controls label {
  min-width: 0;
}

.schedule-toolbar {
  position: sticky;
  top: 82px;
  z-index: 8;
  padding: 12px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(15, 35, 52, .07);
}

.schedule-filters {
  background: #fff;
  box-shadow: var(--shadow-hairline);
}

.schedule-board {
  border-color: rgba(196, 208, 219, .95);
  box-shadow: 0 16px 44px rgba(15, 35, 52, .08);
}

.schedule-board-header {
  background: #f8fafc;
}

.schedule-day-head strong {
  font-size: 19px;
}

.schedule-day-head.today,
.schedule-event-cell.today,
.schedule-shift-cell.today {
  background: #e8f4ff;
}

.schedule-day-head.today {
  box-shadow: inset 0 4px 0 #3e8ed8;
}

.schedule-department-bar {
  padding: 10px 14px;
  letter-spacing: .01em;
}

.schedule-time-cell {
  background: #f7f9fb;
}

.schedule-shift-cell {
  min-height: 86px;
}

.schedule-add {
  min-height: 32px;
  border: 1px dashed #c6d1dc;
  background: #fbfcfd;
  font-size: 22px;
}

.schedule-add:hover {
  border-color: rgba(36, 107, 254, .45);
  background: var(--accent-quiet);
}

.shift-assignment-card {
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(15, 35, 52, .04);
}

.shift-assignment-card.draft {
  background: #fff5cf;
}

.schedule-event-cell {
  max-height: 58px;
  align-content: start;
}

.schedule-event-pill {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.schedule-event-pill strong,
.schedule-event-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-event-pill strong {
  flex: 0 0 auto;
  font-size: 9px;
}

.task-create-card {
  padding: 24px;
}

.task-create-card h3 {
  font-size: 26px;
}

.task-card.task-card-toggle {
  border-left: 4px solid transparent;
}

.task-card.task-card-toggle:hover {
  border-left-color: var(--accent);
}

.task-progress,
.task-done-pill,
.status-pill,
.new-employee-pill,
.locked-pill {
  border-color: rgba(196, 208, 219, .9);
  box-shadow: var(--shadow-hairline);
}

.task-done-pill,
.task-card.complete .task-progress {
  color: var(--success);
  background: #eef9f3;
}

.message-inbox-panel {
  min-height: 560px;
}

.message-thread-item {
  border-left: 4px solid transparent;
  padding: 12px;
}

.message-thread-item.unread {
  border-left-color: #d82e2e;
}

.message-thread-item.active {
  border-left-color: var(--accent);
}

.message-conversation {
  min-height: 460px;
}

.message-list {
  align-content: end;
  min-height: 290px;
}

.message-bubble {
  border-radius: 8px 8px 8px 2px;
  background: #f3f6f9;
}

.message-bubble.mine {
  border-radius: 8px 8px 2px 8px;
}

.announcement-card {
  border-left-width: 4px;
}

.notification-card {
  min-height: 72px;
  padding-right: 34px;
}

.time-clock-entry-row {
  border-top-color: rgba(196, 208, 219, .75);
  padding: 12px 0 0;
}

.time-clock-entry-editor,
.task-builder-row,
.task-assignment-panel,
.copy-location-form,
.department-edit-form,
.employee-performance-panel {
  border-color: rgba(196, 208, 219, .9);
  background: #f8fafc;
}

.audit-row {
  border-left: 4px solid #c8d4df;
}

.audit-row:hover {
  border-left-color: var(--accent);
}

.modal-backdrop,
.task-photo-viewer-backdrop,
.task-detail-viewer-backdrop,
.task-list-viewer-backdrop,
.task-pdf-viewer-backdrop {
  background: rgba(10, 22, 33, .68);
  backdrop-filter: blur(3px);
}

.modal-panel,
.task-photo-viewer-dialog,
.task-detail-viewer-dialog,
.task-list-viewer-dialog,
.task-pdf-viewer-dialog,
.schedule-picker-panel,
.template-editor-panel,
.home-widget-picker-panel {
  border: 1px solid rgba(196, 208, 219, .85);
  border-radius: 8px;
}

.home-widget-grid {
  gap: 16px;
  grid-auto-rows: clamp(260px, calc((100vh - 190px) / 2), 340px);
}

.home-widget-shell > .my-schedule-panel,
.home-widget-grid > .home-overview-widget {
  padding: 46px 16px 16px;
}

.home-widget-grid .section-header-row {
  gap: 8px;
}

.home-widget-grid .section-header-row h2 {
  font-size: 16px;
  line-height: 1.2;
}

.home-widget-grid .section-header-row select,
.home-widget-grid .home-widget-date-controls input,
.home-widget-grid .ghost-button {
  min-height: 34px;
  font-size: 12px;
}

.home-widget-grid .scheduled-headcount-card,
.home-widget-grid .my-schedule-card,
.home-widget-grid .income-account-widget-row,
.home-widget-grid .restaurant-daily-sales-list article {
  padding: 9px 10px;
}

.home-widget-grid .scheduled-headcount-card span {
  font-size: 24px;
}

.home-widget-grid .income-account-widget-row span,
.home-widget-grid .my-schedule-card small,
.home-widget-grid .restaurant-daily-sales-list strong,
.home-widget-grid .restaurant-daily-sales-list span {
  font-size: 12px;
}

.home-widget-grid .income-account-widget-row strong,
.home-widget-grid .summary-widget-total strong,
.home-widget-grid .restaurant-daily-sales-stat-grid strong {
  font-size: 17px;
}

.home-widget-grid .scheduled-headcount-list,
.home-widget-grid .income-account-widget-list,
.home-widget-grid .restaurant-daily-sales-list,
.home-widget-grid .my-schedule-list {
  min-height: 0;
  overflow: auto;
}

.home-widget-empty-slot {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(248, 250, 252, .75));
}

.scheduled-headcount-card span {
  color: var(--navy-2);
}

.creator-footer {
  border-color: rgba(196, 208, 219, .8);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
}

@media (min-width: 761px) {
  .app-shell.sidebar-collapsed {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .app-shell.sidebar-collapsed .sidebar {
    width: 80px;
  }
}

@media (max-width: 1100px) {
  .schedule-toolbar {
    top: 74px;
  }
}

@media (max-width: 760px) {
  .accounting-bank-transaction-row {
    grid-template-columns: 1fr;
  }

  .login-panel {
    padding: 30px 24px;
  }

  .login-logo {
    width: 188px;
    height: 92px;
  }

  .sidebar {
    width: min(286px, 86vw);
    padding: 12px;
  }

  .brand {
    min-height: 110px;
  }

  .app-shell.sidebar-collapsed .brand img,
  .brand img {
    width: 220px;
    max-width: 100%;
  }

  .topbar {
    grid-template-columns: 40px auto minmax(0, 1fr) auto;
    padding: 10px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-icon-button {
    width: 38px;
    height: 38px;
  }

  .view {
    padding: 18px 14px 26px;
  }

  .page-heading h1 {
    font-size: 24px;
  }

  .module-tabs {
    display: grid;
  }

  .schedule-toolbar {
    position: static;
  }

  .schedule-event-cell {
    max-height: none;
  }

  .message-inbox-panel,
  .message-conversation {
    min-height: 0;
  }

  .home-widget-grid {
    gap: 12px;
    grid-auto-rows: minmax(300px, auto);
  }

  .accounting-purchase-order-line {
    grid-template-columns: 1fr;
  }

  .creator-footer {
    display: flex;
    min-height: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 14px 18px;
    padding: 9px 10px;
  }

  .creator-footer-main {
    min-width: 0;
    flex-wrap: wrap;
  }

  .support-footer-button {
    min-height: 30px;
  }
}

.walkthrough-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 340;
}

.walkthrough-card {
  pointer-events: auto;
  position: fixed;
  left: 24px;
  bottom: 24px;
  width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(36, 74, 104, .18);
  border-radius: 10px;
  padding: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 60px rgba(16, 35, 52, .2);
}

.walkthrough-card h2 {
  margin: 3px 0 8px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.walkthrough-card p {
  color: var(--muted);
}

.walkthrough-actions,
.walkthrough-settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.walkthrough-language-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.walkthrough-step-count {
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.walkthrough-progress-note {
  margin-top: 12px;
  border: 1px solid rgba(196, 137, 0, .25);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff8df;
  color: #7c5600;
  font-size: 13px;
  font-weight: 800;
}

.walkthrough-progress-note.complete {
  border-color: rgba(21, 128, 61, .22);
  background: #eaf8ef;
  color: #166534;
}

.walkthrough-highlight {
  position: relative;
  z-index: 330;
  border-radius: 10px;
  outline: 3px solid rgba(40, 118, 240, .82);
  outline-offset: 5px;
  box-shadow: 0 0 0 10px rgba(40, 118, 240, .13);
}

.walkthrough-settings-list {
  display: grid;
  gap: 12px;
}

.walkthrough-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px;
  background: #fbfcfd;
}

.walkthrough-settings-item strong,
.walkthrough-settings-item small {
  display: block;
}

.walkthrough-settings-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .info-tip-content {
    width: var(--info-tip-width, calc(100vw - 28px));
    max-height: min(64vh, 440px);
  }

  .info-tip-content::after {
    display: none;
  }

  .walkthrough-card {
    bottom: 14px;
    left: 14px;
    right: 14px;
    width: auto;
  }

  .walkthrough-settings-item {
    align-items: stretch;
    flex-direction: column;
  }

  .walkthrough-settings-actions {
    justify-content: flex-start;
  }
}

/* 2026 SaaS interface refresh */
body {
  background:
    radial-gradient(circle at top left, rgba(36, 107, 254, .08), transparent 320px),
    linear-gradient(180deg, #f8fafc 0, #eef3f7 420px, #edf2f7 100%);
}

.login-screen {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, .12), transparent 280px),
    linear-gradient(145deg, #07131e 0%, #11283a 46%, #18364e 100%);
}

.login-panel {
  display: grid;
  gap: 12px;
  border-color: rgba(255, 255, 255, .22);
  padding: 38px;
  box-shadow: 0 30px 90px rgba(2, 14, 26, .36);
}

.login-panel h1 {
  margin: 4px 0 0;
  text-align: center;
}

.login-panel form {
  margin-top: 12px;
}

.login-logo {
  width: 220px;
  height: 104px;
}

.app-shell {
  background:
    linear-gradient(90deg, rgba(24, 54, 78, .03), transparent 320px),
    transparent;
}

.sidebar {
  width: 268px;
  gap: 10px;
  border-right-color: rgba(15, 35, 52, .1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(244, 247, 250, .82)),
    var(--sidebar-gray);
  box-shadow: 20px 0 50px rgba(15, 35, 52, .13);
}

.brand {
  min-height: 94px;
  padding: 10px 0 14px;
}

.brand img {
  width: 224px;
  max-height: 88px;
}

.nav-list {
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-item {
  min-height: 44px;
  border: 1px solid transparent;
  color: #415268;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(24, 54, 78, .12);
  color: var(--navy);
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 10px 24px rgba(15, 35, 52, .07);
}

.nav-icon,
.module-icon,
.principle-icon {
  border: 1px solid rgba(24, 54, 78, .08);
  background: linear-gradient(180deg, #ffffff, #f4f7fa);
}

.sidebar-signout {
  min-height: 42px;
  margin-top: 10px;
}

.workspace {
  min-height: 100vh;
  padding-bottom: 112px;
}

@media (min-width: 761px) {
  .sidebar:hover ~ .workspace,
  .sidebar:focus-within ~ .workspace,
  .app-shell.sidebar-open .workspace {
    padding-left: 0;
  }
}

.topbar {
  grid-template-columns: auto auto minmax(260px, 600px) auto;
  min-height: 66px;
  border-bottom-color: rgba(15, 35, 52, .08);
  background: rgba(249, 251, 253, .9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72);
}

.search-box,
.topbar-icon-button,
.company-time-chip,
.week-control,
.module-tabs,
.schedule-toolbar,
.schedule-filters,
.accounting-filter-bar,
.audit-filter-grid,
.task-template-filters {
  border-color: rgba(24, 54, 78, .12);
  box-shadow: var(--shadow-hairline);
}

.search-box {
  min-height: 42px;
  background: rgba(255, 255, 255, .94);
}

.topbar-icon-button {
  background: rgba(255, 255, 255, .94);
}

.topbar-icon-button:hover {
  border-color: rgba(36, 107, 254, .35);
  color: var(--accent);
  background: white;
}

.company-time-chip {
  background: rgba(255, 255, 255, .84);
}

.view {
  padding: 28px clamp(18px, 3vw, 42px);
}

.page-heading {
  align-items: center;
  margin-bottom: 22px;
}

.page-heading h1 {
  margin-bottom: 4px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.08;
}

.eyebrow {
  color: #386a96;
  letter-spacing: .07em;
}

.section-header-row h2,
.section-header-row h3,
.section-header-row h4 {
  margin: 0;
}

.primary-button,
.ghost-button,
.icon-button,
.topbar-icon-button,
.module-tabs button,
.text-button,
.support-footer-button {
  -webkit-tap-highlight-color: transparent;
}

.primary-button,
.ghost-button {
  min-height: var(--control-height);
}

.primary-button {
  background: linear-gradient(180deg, #2c73ff, #1f62dc);
  box-shadow: 0 10px 22px rgba(36, 107, 254, .2);
}

.ghost-button {
  background: rgba(255, 255, 255, .94);
}

.icon-button,
.topbar-icon-button {
  border-radius: 8px;
}

input,
select,
textarea,
.rich-text-editor {
  min-height: var(--control-height);
  background: #ffffff;
}

textarea,
.rich-text-editor {
  line-height: 1.45;
}

label {
  color: #2f4052;
}

.module-tabs {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  padding: 5px;
  background: rgba(226, 234, 242, .72);
}

.module-tabs button {
  flex: 0 0 auto;
  min-width: 128px;
  padding-inline: 14px;
  white-space: nowrap;
}

.module-tabs button.active {
  background: linear-gradient(180deg, #18364e, #102536);
}

.home-widget-grid {
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  grid-auto-rows: minmax(238px, 29vh);
  gap: 16px;
}

.home-overview-widget,
.my-schedule-panel,
.metric-card,
.module-card,
.settings-section-card,
.message-compose-panel,
.message-inbox-panel,
.announcements-panel,
.task-create-card,
.task-card,
.task-report-location,
.task-template-item,
.audit-filter-grid,
.audit-row,
.schedule-board,
.schedule-toolbar,
.schedule-filters,
.template-editor-panel,
.location-detail-panel,
.employee-detail-panel,
.accounting-invoice-form,
.accounting-sales-list,
.restaurant-daily-sales-card,
.restaurant-daily-sales-group,
.restaurant-fiscal-sales-section,
.time-clock-user-card,
.punch-card,
.notification-card,
.modal-panel {
  border-color: rgba(24, 54, 78, .12);
  box-shadow: var(--shadow-card);
}

.home-widget-shell > .my-schedule-panel,
.home-widget-grid > .home-overview-widget {
  padding: 16px;
}

.home-widget-grid > .home-overview-widget .section-header-row h2,
.home-widget-shell > .my-schedule-panel .section-header-row h2 {
  font-size: 15px;
}

.home-widget-grid > .home-overview-widget .section-header-row,
.home-widget-shell > .my-schedule-panel .section-header-row {
  display: grid;
  grid-template-columns: 1fr;
}

.app-shell.sidebar-open .home-widget-grid,
.sidebar:hover ~ .workspace .home-widget-grid,
.sidebar:focus-within ~ .workspace .home-widget-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.home-widget-grid > .home-overview-widget,
.home-widget-shell > .my-schedule-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(250, 252, 254, .96));
}

.home-widget-date-controls {
  gap: 6px;
}

.home-widget-date-controls input {
  width: 132px;
  height: 36px;
  min-height: 36px;
  padding-inline: 8px;
  font-size: 12px;
}

.scheduled-headcount-card,
.income-account-widget-row,
.my-schedule-week-header,
.my-schedule-card,
.restaurant-daily-sales-list article,
.task-template-item,
.task-card.task-card-toggle,
.message-thread-item,
.notification-card,
.employee-list-item,
.location-list-item,
.station-list-item,
.accounting-sale-card,
.accounting-list-row,
.user-row {
  background: rgba(255, 255, 255, .9);
}

.scheduled-headcount-card span {
  color: var(--brand);
}

.income-account-widget-row {
  min-height: 48px;
}

.restaurant-daily-sales-widget {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.home-widget-grid .restaurant-daily-sales-controls {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.restaurant-daily-sales-stat-grid article {
  border-radius: 8px;
  background: #f7fafc;
}

.restaurant-daily-sales-list article {
  padding: 9px 10px;
}

.settings-section-card {
  background: rgba(255, 255, 255, .96);
}

.settings-section-card summary {
  min-height: 62px;
  padding-inline: 20px;
}

.settings-section-card[open] summary {
  background: linear-gradient(180deg, #fbfdff, #f6f9fc);
}

.settings-section-card > :not(summary) {
  margin: 20px;
}

.permission-directory-layout,
.location-directory-layout,
.task-station-layout {
  gap: 16px;
}

.permission-role-list,
.location-name-list,
.employee-name-list {
  position: sticky;
  top: 86px;
}

.permission-role-item,
.location-list-item,
.employee-list-item {
  border-color: rgba(24, 54, 78, .12);
}

.permission-role-item.active,
.permission-role-item:hover,
.location-list-item.active,
.location-list-item:hover {
  border-color: rgba(36, 107, 254, .35);
  background: #f4f8ff;
}

.permission-module-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.employee-list-item {
  grid-template-columns: 42px minmax(190px, 1.2fr) minmax(220px, 1.4fr) minmax(130px, .65fr) auto;
  min-height: 70px;
}

.employee-list-item > span:first-child,
.employee-detail-heading > span,
.user-row > span,
.employee-pick-button span,
.profile-chip > span {
  border-radius: 8px;
  background: linear-gradient(180deg, #24485f, #18364e);
}

.employee-directory-layout.has-open-profile .employee-detail-panel {
  inset: 4vh max(16px, calc((100vw - 920px) / 2));
  border-radius: 8px;
}

.employee-detail-form [data-back-to-team],
.employee-detail-form > button[type="submit"],
.employee-detail-form > .locked-pill {
  backdrop-filter: blur(10px);
}

.schedule-shell {
  gap: 16px;
}

.schedule-toolbar {
  position: sticky;
  top: 78px;
  z-index: 8;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
}

.schedule-filters {
  background: rgba(248, 251, 253, .9);
}

.schedule-board {
  background: #fff;
}

.schedule-board-header,
.schedule-events-row,
.schedule-station-row {
  grid-template-columns: 220px repeat(7, minmax(138px, 1fr));
}

.schedule-side-cell,
.schedule-day-head,
.schedule-time-cell,
.schedule-shift-cell {
  min-height: 76px;
}

.schedule-day-head {
  background: #fbfdff;
}

.schedule-day-head strong {
  font-size: 18px;
}

.schedule-event-cell {
  min-height: 38px;
  max-height: 48px;
}

.schedule-event-pill {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  font-size: 10px;
}

.schedule-event-pill strong {
  font-size: 8px;
}

.schedule-department-bar {
  min-width: 1150px;
  padding: 10px 14px;
  letter-spacing: .01em;
}

.shift-assignment-card {
  border-radius: 8px;
  background: #f5f8fb;
  box-shadow: inset 0 0 0 1px rgba(24, 54, 78, .05);
}

.shift-assignment-card.draft {
  background: #fff7d8;
}

.shift-assignment-card.generated {
  background: #edf8f2;
}

.schedule-picker-panel,
.home-widget-picker-panel {
  border-radius: 8px;
}

.employee-pick-list {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.accounting-invoice-form {
  border-radius: 8px;
  overflow: hidden;
}

.accounting-invoice-topbar {
  background:
    linear-gradient(180deg, rgba(248, 251, 253, .98), rgba(240, 245, 250, .95));
}

.accounting-balance-card strong {
  color: #172331;
}

.accounting-invoice-grid,
.accounting-payment-strip {
  gap: 16px;
}

.accounting-payment-strip,
.accounting-invoice-actions {
  background: #f8fafc;
}

.accounting-line-table th {
  background: #fbfdff;
}

.accounting-line-table tr:hover td {
  background: #f8fbff;
}

.accounting-sale-card-main {
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(110px, .75fr)) auto;
}

.accounting-filter-bar {
  background: rgba(248, 251, 253, .88);
}

.restaurant-action-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.module-card-button {
  min-height: 132px;
  border-color: rgba(24, 54, 78, .12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 251, 253, .98));
  box-shadow: var(--shadow-card);
}

.module-card-button strong {
  font-size: 17px;
}

.task-create-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.task-create-card {
  padding: 24px;
}

.task-create-card h3 {
  font-size: 22px;
}

.task-builder-row {
  background: #f8fafc;
}

.task-card.task-card-toggle {
  min-height: 84px;
}

.task-progress,
.task-done-pill,
.locked-pill,
.new-employee-pill,
.status-pill {
  background: #f7fafc;
}

.task-report-summary-card {
  background: #f8fafc;
}

.task-report-donut {
  width: 108px;
  height: 108px;
}

.messaging-layout {
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
}

.message-compose-panel,
.message-inbox-panel,
.announcements-panel {
  background: rgba(255, 255, 255, .96);
}

.message-thread-item {
  min-height: 74px;
}

.message-conversation {
  min-height: min(600px, calc(100vh - 250px));
}

.message-bubble {
  border-radius: 8px;
  box-shadow: var(--shadow-hairline);
}

.message-bubble.mine {
  background: linear-gradient(180deg, #21465f, #18364e);
}

.time-clock-entry-row {
  grid-template-columns: 106px minmax(160px, 1fr) minmax(135px, .8fr) minmax(135px, .8fr) auto auto auto;
}

.time-clock-entry-list {
  overflow-x: auto;
}

.time-clock-entry-row {
  grid-template-columns:
    minmax(104px, .8fr)
    minmax(140px, 1fr)
    minmax(170px, 1.1fr)
    minmax(160px, 1fr)
    minmax(160px, 1fr)
    minmax(70px, .45fr)
    minmax(125px, .8fr)
    minmax(52px, auto);
  min-width: 1080px;
}

.time-clock-entry-header {
  border-top: 0;
  padding: 8px 0;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.time-clock-flags-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 30px;
}

.time-clock-punch-cell,
.time-clock-date-cell,
.time-clock-station-cell,
.time-clock-hours-cell {
  min-width: 0;
}

.audit-row {
  grid-template-columns: minmax(150px, 210px) minmax(180px, .8fr) minmax(0, 1.4fr);
}

.modal-backdrop,
.task-photo-viewer,
.task-detail-viewer,
.task-list-viewer,
.task-pdf-viewer,
.my-task-station-viewer {
  background: rgba(11, 23, 35, .68);
  backdrop-filter: blur(4px);
}

.modal-panel,
.task-photo-viewer-dialog,
.task-detail-viewer-dialog,
.task-list-viewer-dialog,
.task-pdf-viewer-dialog,
.my-task-station-viewer-dialog {
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
}

.creator-footer {
  right: 16px;
  bottom: 12px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
}

@media (max-width: 1280px) {
  .home-widget-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    grid-auto-rows: minmax(230px, auto);
  }

  .task-create-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .home-widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .topbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .permission-role-list,
  .location-name-list,
  .employee-name-list {
    position: static;
  }

  .employee-list-item,
  .employee-list-item.hide-compensation,
  .accounting-sale-card-main,
  .time-clock-entry-row,
  .audit-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    background: #f1f5f9;
  }

  .login-screen {
    align-items: start;
    padding-top: 34px;
  }

  .login-panel {
    padding: 28px 22px;
  }

  .login-logo {
    width: 210px;
    height: 96px;
  }

  .brand {
    min-height: 96px;
  }

  .sidebar {
    width: min(300px, 88vw);
  }

  .topbar {
    position: sticky;
    grid-template-columns: 40px 82px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 58px;
    padding: 8px 10px;
  }

  .topbar-history-controls {
    gap: 4px;
  }

  .search-box {
    min-height: 38px;
    padding-inline: 9px;
  }

  .topbar-actions {
    display: flex;
    grid-column: auto;
    gap: 5px;
  }

  .topbar-icon-button {
    width: 36px;
    height: 36px;
  }

  .view {
    padding: 16px 12px 28px;
  }

  .page-heading {
    gap: 12px;
    margin-bottom: 16px;
  }

  .page-heading h1 {
    font-size: 23px;
  }

  .home-widget-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .home-widget-shell,
  .home-widget-empty-slot,
  .home-widget-shell > .my-schedule-panel,
  .home-widget-grid > .home-overview-widget {
    min-height: 0;
  }

  .home-widget-date-controls {
    width: 100%;
  }

  .home-widget-date-controls input {
    flex: 1;
    width: auto;
  }

  .settings-section-card summary {
    min-height: 56px;
    padding-inline: 14px;
  }

  .settings-section-card > :not(summary) {
    margin: 14px;
  }

  .module-tabs {
    display: flex;
    width: 100%;
    overflow-x: auto;
  }

  .module-tabs button {
    min-width: max-content;
    height: 36px;
  }

  .schedule-toolbar {
    top: 58px;
    align-items: stretch;
  }

  .schedule-toolbar,
  .schedule-filters {
    gap: 8px;
    padding: 10px;
  }

  .week-control {
    width: 100%;
  }

  .week-picker-trigger {
    min-width: 0;
    width: 100%;
  }

  .schedule-board.one-day .schedule-board-header,
  .schedule-board.one-day .schedule-events-row,
  .schedule-board.one-day .schedule-station-row {
    grid-template-columns: 112px minmax(180px, 1fr);
  }

  .schedule-side-cell,
  .schedule-day-head,
  .schedule-time-cell,
  .schedule-shift-cell {
    min-height: 68px;
    padding: 9px;
  }

  .schedule-day-head strong {
    font-size: 16px;
  }

  .schedule-picker-panel {
    inset: auto 10px 10px 10px;
    width: auto;
    max-height: 72vh;
  }

  .task-create-card,
  .modal-panel,
  .task-detail-viewer-dialog,
  .task-list-viewer-dialog,
  .my-task-station-viewer-dialog {
    padding: 16px;
  }

  .task-list-controls {
    width: 100%;
    justify-content: stretch;
  }

  .task-list-controls .date-input,
  .task-list-controls .ghost-button {
    flex: 1 1 100%;
  }

  .task-station-layout .location-detail-panel {
    display: none;
  }

  .task-create-card h3 {
    font-size: 20px;
  }

  .task-template-item,
  .task-purchase-product-line,
  .task-purchase-order-line,
  .accounting-payment-split-row,
  .accounting-bank-transaction-row {
    grid-template-columns: 1fr;
  }

  .accounting-invoice-grid,
  .accounting-payment-strip,
  .accounting-invoice-topbar,
  .accounting-line-actions,
  .accounting-invoice-actions,
  .accounting-sales-list {
    padding: 12px;
  }

  .accounting-line-table {
    min-width: 760px;
  }

  .message-conversation {
    min-height: 420px;
  }

  .creator-footer {
    position: static;
    margin: 0 12px 14px;
  }
}

/* Mobile login polish */
.login-panel {
  isolation: isolate;
}

.login-panel.credential-active #email {
  color: #405166;
  background: #f2f6fa;
  border-color: #cbd7e2;
}

.login-panel.credential-active .login-selected-email {
  justify-content: flex-end;
  min-height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.login-panel.credential-active #selectedLoginEmail {
  display: none;
}

@media (max-width: 760px) {
  .sidebar:hover,
  .sidebar:focus-within {
    transform: translateX(-100%);
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .login-screen {
    position: fixed;
    display: flex;
    min-height: 100dvh;
    align-items: stretch;
    justify-content: center;
    overflow-y: auto;
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 220px),
      linear-gradient(160deg, #081724 0%, #10283c 54%, #18364e 100%);
  }

  .login-panel {
    width: min(100%, 430px);
    min-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    align-content: start;
    gap: 14px;
    margin: 0 auto;
    border-radius: 14px;
    padding: 26px 22px 24px;
    background: rgba(255, 255, 255, .985);
    box-shadow: 0 22px 70px rgba(2, 14, 26, .34);
  }

  .login-logo {
    width: min(248px, 76vw);
    height: 116px;
    margin-top: 4px;
  }

  .login-panel h1 {
    margin: 2px 0 6px;
    font-size: 26px;
    line-height: 1.12;
  }

  #loginForm {
    gap: 16px;
    margin-top: 8px;
  }

  #loginForm label {
    gap: 8px;
    font-size: 13px;
  }

  #loginForm input,
  #loginForm select,
  #loginForm textarea {
    min-height: 52px;
    border-radius: 12px;
    font-size: 16px;
  }

  #loginSubmitButton {
    min-height: 52px;
    border-radius: 12px;
    font-size: 16px;
  }

  .login-credential-step {
    gap: 14px;
  }

  .login-selected-email .link-button {
    min-height: 32px;
    padding: 0;
    font-size: 13px;
  }

  .checkbox-row {
    align-items: flex-start;
    line-height: 1.35;
  }

  #loginForm .checkbox-row input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin-top: 2px;
  }

  .login-status {
    min-height: 190px;
    align-content: center;
  }

  .form-error {
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.35;
  }
}

/* Full-screen mobile app shell */
@supports (padding: env(safe-area-inset-top)) {
  html,
  body {
    min-height: 100dvh;
    background: #f1f5f9;
  }

  .app-shell {
    min-height: 100dvh;
    background: #f1f5f9;
  }

  .workspace {
    min-height: 100dvh;
    background: #f1f5f9;
  }

  @media (max-width: 760px) {
    .topbar {
      min-height: calc(58px + env(safe-area-inset-top));
      padding-top: max(8px, env(safe-area-inset-top));
      background: rgba(249, 251, 253, .96);
    }

    .sidebar {
      height: 100dvh;
      padding-top: max(12px, env(safe-area-inset-top));
      padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .login-screen {
      min-height: 100dvh;
      padding-top: max(34px, env(safe-area-inset-top));
      padding-bottom: max(18px, env(safe-area-inset-bottom));
    }

    .creator-footer {
      margin-bottom: max(14px, env(safe-area-inset-bottom));
    }
  }
}

.ai-shell {
  display: grid;
  gap: 18px;
}

.ai-assistant-grid {
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(360px, 1.15fr);
  gap: 18px;
  align-items: start;
}

.ai-card {
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  padding: 18px;
}

.ai-chat-card form {
  display: grid;
  gap: 14px;
}

.ai-chat-card textarea {
  resize: vertical;
  min-height: 150px;
}

.ai-examples {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.ai-examples h3 {
  margin: 0;
  font-size: 14px;
}

.ai-example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-example-list .ghost-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.ai-response-card {
  min-height: 360px;
}

.ai-answer-text {
  color: #16202e;
  line-height: 1.6;
  white-space: normal;
}

.ai-usage-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, .1);
  color: #526174;
  font-size: 12px;
}

.ai-report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ai-access-list {
  display: grid;
  gap: 8px;
}

.ai-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.ai-settings-form .checkbox-row,
.ai-settings-form .form-error,
.ai-settings-form .form-success {
  grid-column: 1 / -1;
}

.ai-settings-form .primary-button {
  width: fit-content;
}

.ai-access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.ai-access-row strong,
.ai-access-row small {
  display: block;
}

.ai-access-row small {
  color: #64748b;
  margin-top: 2px;
}

.ai-access-row input {
  width: 18px;
  height: 18px;
}

@media (max-width: 900px) {
  .ai-assistant-grid,
  .ai-report-grid {
    grid-template-columns: 1fr;
  }

  .ai-access-row {
    grid-template-columns: 1fr auto;
  }

  .ai-settings-form {
    grid-template-columns: 1fr;
  }

  .ai-access-row .status-pill {
    grid-column: 1 / -1;
    width: fit-content;
  }
}

.time-clock-entry-list {
  overflow-x: auto;
}

.time-clock-entry-row {
  grid-template-columns:
    minmax(104px, .8fr)
    minmax(140px, 1fr)
    minmax(170px, 1.1fr)
    minmax(160px, 1fr)
    minmax(160px, 1fr)
    minmax(70px, .45fr)
    minmax(125px, .8fr)
    minmax(52px, auto);
  min-width: 1080px;
}

.time-clock-entry-header {
  border-top: 0;
  padding: 8px 0;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.time-clock-flags-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 30px;
}

.time-clock-punch-cell,
.time-clock-date-cell,
.time-clock-station-cell,
.time-clock-hours-cell {
  min-width: 0;
}

@media (max-width: 760px) {
  .time-clock-entry-row {
    min-width: 920px;
    grid-template-columns:
      90px
      130px
      150px
      140px
      140px
      64px
      116px
      46px;
  }
}
