:root {
  color-scheme: light;
  --ink: #252932;
  --muted: #747b84;
  --line: #e8eef2;
  --paper: #f8fbfc;
  --panel: #ffffff;
  --panel-soft: #fbfcfd;
  --accent: #92dcf7;
  --accent-strong: #47b8e4;
  --accent-ink: #0c6d91;
  --mint: #86d8be;
  --sakura: #efa9b5;
  --yuzu: #e5bc61;
  --fuji: #8ea7d9;
  --momo: #f0b38e;
  --coral: #d96c63;
  --teal: #2f9892;
  --gold: #b88a32;
  --blue: #5d7fb3;
  --shadow: 0 10px 26px rgba(42, 74, 91, 0.055);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 980px;
  min-height: 680px;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: white;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  min-height: 100vh;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px;
  background: radial-gradient(circle at 18% 10%, rgba(137, 217, 251, 0.28), transparent 28%), white;
}

.login-card {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 0.86fr 1fr;
  overflow: hidden;
  border: 1px solid #e9eef1;
  border-radius: 8px;
  background: white;
  box-shadow: 0 22px 70px rgba(42, 74, 91, 0.1);
}

.login-brand {
  display: grid;
  align-content: space-between;
  gap: 26px;
  padding: 30px;
  background: #f8fcfd;
  border-right: 1px solid var(--line);
}

.login-logo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(23, 66, 88, 0.12);
}

.login-brand h1 {
  margin: 18px 0 8px;
  font-size: 36px;
  font-weight: 650;
  letter-spacing: 0;
}

.login-brand p,
.login-form p {
  margin: 0;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 18px;
  padding: 32px;
}

.login-form h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 650;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfd;
}

.auth-tab {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
}

.auth-tab.active {
  color: var(--accent-ink);
  background: var(--accent);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.remember-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.remember-line input {
  width: 16px;
  min-height: 16px;
}

.auth-notice {
  padding: 10px 12px;
  border: 1px solid rgba(53, 174, 228, 0.28);
  border-radius: 8px;
  color: var(--accent-ink);
  background: rgba(137, 217, 251, 0.16);
  font-size: 13px;
  font-weight: 600;
}

.transport-warning {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(221, 119, 112, 0.4);
  border-radius: 8px;
  background: rgba(255, 247, 246, 0.96);
  color: #9a4b46;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.sync-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed rgba(53, 174, 228, 0.42);
  border-radius: 8px;
  background: rgba(137, 217, 251, 0.11);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sync-box strong {
  color: var(--ink);
  font-size: 14px;
}

.sync-box-wide {
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
}

.file-button {
  cursor: pointer;
}

.file-button input {
  display: none;
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role-option {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.role-option.active {
  border-color: var(--accent-strong);
  background: rgba(137, 217, 251, 0.14);
  box-shadow: inset 0 0 0 1px rgba(53, 174, 228, 0.34);
}

.role-option strong {
  font-size: 15px;
}

.role-option span {
  color: var(--muted);
  font-size: 12px;
}

.login-error {
  min-height: 20px;
  color: var(--coral);
  font-size: 13px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 14px;
  background: #f7fbfc;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: white;
  background: white;
  box-shadow: 0 8px 18px rgba(42, 74, 91, 0.08);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.1;
}

.brand p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  color: #2c3038;
  background: transparent;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.72);
}

.nav-item.active {
  color: var(--accent-ink);
  background: rgba(146, 220, 247, 0.26);
  box-shadow: inset 0 0 0 1px rgba(71, 184, 228, 0.24);
}

.nav-item .icon {
  width: 19px;
  height: 19px;
}

.nav-item[data-view="dashboard"] .icon,
.title-icon.icon-grid,
.panel-head.icon-grid .icon {
  color: #45aede;
}

.nav-item[data-view="profile"] .icon,
.nav-item[data-view="customers"] .icon,
.nav-item[data-view="accounts"] .icon,
.title-icon.icon-user,
.panel-head.icon-user .icon {
  color: #8f8ad6;
}

.nav-item[data-view="calendar"] .icon,
.nav-item[data-view="roster"] .icon,
.title-icon.icon-calendar,
.panel-head.icon-calendar .icon {
  color: #6f98d4;
}

.nav-item[data-view="rooms"] .icon,
.nav-item[data-view="cats"] .icon,
.title-icon.icon-house,
.title-icon.icon-paw,
.panel-head.icon-house .icon,
.panel-head.icon-paw .icon {
  color: #4aa88f;
}

.nav-item[data-view="reports"] .icon,
.nav-item[data-view="ledger"] .icon,
.title-icon.icon-clipboard,
.title-icon.icon-wallet,
.panel-head.icon-clipboard .icon,
.panel-head.icon-wallet .icon {
  color: #c69a42;
}

.nav-item[data-view="docs"] .icon,
.nav-item[data-view="inventory"] .icon,
.title-icon.icon-files,
.title-icon.icon-box,
.panel-head.icon-files .icon,
.panel-head.icon-box .icon {
  color: #7b9ab6;
}

.nav-item[data-view="reminders"] .icon,
.title-icon.icon-bell,
.panel-head.icon-bell .icon {
  color: #dd7770;
}

.nav-item span:last-child {
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.save-indicator {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  color: var(--muted);
}

.toast-region {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 5000;
  display: grid;
  width: min(420px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.app-toast {
  padding: 13px 15px;
  border: 1px solid rgba(53, 174, 228, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(45, 70, 86, 0.16);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  animation: toast-in 180ms ease-out;
}

.app-toast.success {
  border-color: rgba(55, 166, 145, 0.42);
  background: rgba(244, 253, 250, 0.98);
}

.app-toast.error {
  border-color: rgba(221, 119, 112, 0.52);
  background: rgba(255, 247, 246, 0.98);
}

.app-toast.is-leaving {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 160ms ease, transform 160ms ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.workspace {
  min-width: 0;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0) 240px),
    var(--paper);
}

.screen {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 26px 30px;
}

.screen > .panel {
  margin-bottom: 18px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.title-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #f1f7f9;
}

.title-icon .icon {
  width: 23px;
  height: 23px;
}

.page-title h2 {
  margin: 0;
  font-family: "SF Pro Display", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 26px;
  font-weight: 650;
  line-height: 1.18;
}

.page-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(53, 174, 228, 0.24);
  border-radius: 8px;
  color: var(--accent-ink);
  background: rgba(137, 217, 251, 0.16);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.live-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 520px;
}

.live-strip span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(53, 174, 228, 0.24);
  border-radius: 8px;
  color: var(--accent-ink);
  background: rgba(137, 217, 251, 0.16);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.primary-button,
.plain-button,
.ghost-button,
.icon-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-color: rgba(71, 184, 228, 0.7);
  color: var(--accent-ink);
  background: #99def7;
  font-weight: 600;
}

.plain-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-weight: 600;
}

.ghost-button {
  justify-content: center;
  background: rgba(255, 255, 255, 0.52);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  padding: 0;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card,
.panel,
.cat-card,
.row-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 148px;
  padding: 17px;
}

.mascot-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  min-height: 172px;
  padding: 20px 28px;
  border: 1px solid rgba(71, 184, 228, 0.22);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(146, 220, 247, 0.17), rgba(255, 255, 255, 0.78));
  overflow: hidden;
}

.mascot-hero h3 {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 650;
}

.mascot-hero p {
  margin: 0;
  color: var(--muted);
}

.roo-stage {
  display: grid;
  place-items: end center;
  justify-self: end;
  width: 156px;
  height: 166px;
  background: transparent;
  margin: 0;
}

.roo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(38, 87, 112, 0.1));
}

.roo-head,
.roo-body,
.roo-arm,
.roo-leg,
.roo-tail {
  position: absolute;
  display: block;
}

.roo-head {
  left: 17px;
  top: 18px;
  z-index: 4;
  width: 120px;
  height: 88px;
  border: 1px solid rgba(34, 105, 145, 0.34);
  border-radius: 48% 48% 46% 46%;
  background: linear-gradient(145deg, #86c8ed, #5bacd8);
  box-shadow: 0 9px 18px rgba(52, 102, 128, 0.12);
  animation: rooHeadFloat 3.2s ease-in-out infinite;
}

.roo-head::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 50px;
  width: 34px;
  height: 17px;
  border-radius: 999px;
  background: rgba(53, 148, 191, 0.22);
  box-shadow: 48px 0 0 rgba(53, 148, 191, 0.22);
}

.roo-ear {
  position: absolute;
  top: -30px;
  width: 36px;
  height: 57px;
  border: 1px solid rgba(34, 105, 145, 0.3);
  background: linear-gradient(145deg, #86c8ed, #5bacd8);
  transform-origin: 50% 90%;
}

.roo-ear-left {
  left: 23px;
  border-radius: 72% 28% 62% 28%;
  transform: rotate(-13deg);
}

.roo-ear-right {
  right: 23px;
  border-radius: 28% 72% 28% 62%;
  transform: rotate(13deg);
}

.roo-eye {
  position: absolute;
  top: 37px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #253547;
}

.roo-eye-left {
  left: 35px;
}

.roo-eye-right {
  right: 35px;
}

.roo-nose {
  position: absolute;
  left: 50%;
  top: 50px;
  width: 13px;
  height: 10px;
  border-radius: 50%;
  background: #253547;
  transform: translateX(-50%);
}

.roo-mouth {
  position: absolute;
  left: 50%;
  top: 58px;
  width: 28px;
  height: 13px;
  border-bottom: 2px solid #253547;
  border-radius: 0 0 18px 18px;
  transform: translateX(-50%);
}

.roo-whisker {
  position: absolute;
  top: 51px;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: #253547;
  opacity: 0.9;
}

.roo-whisker-left {
  left: 10px;
  transform: rotate(8deg);
}

.roo-whisker-right {
  right: 10px;
  transform: rotate(-8deg);
}

.roo-body {
  left: 34px;
  top: 99px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 86px;
  height: 57px;
  border-radius: 24px 24px 12px 12px;
  background: linear-gradient(180deg, #f0dfb8, #dfc78f);
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  font-weight: 700;
  line-height: 0.88;
}

.roo-body b {
  position: relative;
  z-index: 1;
}

.roo-body::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -32px;
  height: 36px;
  border-radius: 6px 6px 9px 9px;
  background: linear-gradient(180deg, #31475d, #263c52);
}

.roo-arm {
  z-index: 1;
  width: 18px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(180deg, #79bce0, #54a2cd);
}

.roo-arm::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #62add4;
}

.roo-arm-left {
  left: 25px;
  top: 105px;
  transform: rotate(8deg);
  transform-origin: 50% 8%;
}

.roo-arm-right {
  right: 25px;
  top: 105px;
  transform: rotate(-8deg);
  transform-origin: 50% 8%;
}

.roo-leg {
  z-index: 1;
  top: 160px;
  width: 27px;
  height: 31px;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, #70b9dd, #52a1cb);
}

.roo-leg-left {
  left: 47px;
}

.roo-leg-right {
  right: 47px;
}

.roo-tail {
  display: none;
}

.roo-morning .roo-arm-right {
  z-index: 3;
  right: 23px;
  top: 60px;
  height: 76px;
  transform: rotate(-146deg);
  transform-origin: 50% 94%;
  animation: rooWave 1.35s ease-in-out infinite;
}

.roo-morning .roo-arm-left {
  left: 27px;
  top: 111px;
  height: 42px;
  transform: rotate(48deg);
}

.roo-afternoon {
  height: 158px;
}

.roo-afternoon .roo-head {
  left: 17px;
  top: 30px;
  animation: rooNod 3.4s ease-in-out infinite;
}

.roo-afternoon .roo-body {
  left: 25px;
  top: 111px;
  width: 104px;
  height: 42px;
  border-radius: 999px;
  font-size: 12px;
}

.roo-afternoon .roo-body::after {
  display: none;
}

.roo-afternoon .roo-arm-left,
.roo-afternoon .roo-arm-right {
  z-index: 5;
  top: 88px;
  width: 17px;
  height: 39px;
}

.roo-afternoon .roo-arm-left {
  left: 44px;
  transform: rotate(72deg);
}

.roo-afternoon .roo-arm-right {
  right: 44px;
  transform: rotate(-72deg);
}

.roo-afternoon .roo-leg {
  top: 145px;
  opacity: 0.32;
}

.roo-quiet .roo-head {
  animation: rooHeadFloat 4s ease-in-out infinite;
}

@keyframes rooHeadFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes rooWave {
  0%, 100% { transform: rotate(-140deg); }
  50% { transform: rotate(-158deg); }
}

@keyframes rooNod {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(5deg) translateY(2px); }
}

.urgent-panel {
  margin-bottom: 18px;
}

.stock-alert-panel {
  margin-bottom: 18px;
}

.panel-head-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head-with-action .panel-head {
  margin-bottom: 0;
}

.stock-alert-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 10px;
}

.stock-alert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.stock-alert-card p {
  margin: 7px 0 0;
  color: var(--muted);
}

.stock-alert-qty {
  display: grid;
  gap: 4px;
  justify-items: end;
  min-width: 86px;
  font-variant-numeric: tabular-nums;
}

.stock-alert-qty strong {
  font-size: 20px;
  line-height: 1;
}

.stock-alert-qty span {
  color: var(--muted);
  font-size: 12px;
}

.roster-dashboard-panel {
  margin-bottom: 18px;
}

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

.dashboard-roster-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.dashboard-roster-card p {
  margin: 0;
  color: var(--muted);
}

.roster-template-panel {
  margin-bottom: 18px;
}

.roster-template-table {
  display: grid;
  grid-template-columns: 112px repeat(2, minmax(180px, 1fr));
  overflow: hidden;
  border: 1px solid #d8e1e6;
  border-radius: 8px;
  background: white;
}

.roster-template-table > div {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-right: 1px solid #d8e1e6;
  border-bottom: 1px solid #d8e1e6;
}

.roster-template-table > div:nth-child(3n) {
  border-right: 0;
}

.roster-template-table > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.roster-template-title {
  grid-column: 1 / -1;
  font-weight: 650;
  background: white;
}

.roster-template-head {
  font-weight: 650;
  background: #fbfdff;
}

.roster-template-head.employee-0 {
  background: #dff8fb;
}

.roster-template-head.employee-1 {
  background: #ffe1fb;
}

.roster-day {
  font-weight: 600;
}

.roster-shift {
  font-weight: 600;
}

.shift-rest {
  background: #dcffd7;
}

.shift-morning {
  background: #fff1ad;
}

.shift-evening {
  background: #e3d4ff;
}

.reminder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.reminder-card,
.customer-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.reminder-card p {
  margin: 0;
  color: var(--muted);
}

.inline-reminder-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto auto;
  gap: 10px;
  margin-top: 12px;
}

.customer-list {
  display: grid;
  gap: 12px;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.stat-icon.teal,
.badge.teal {
  color: #1f8d84;
  background: #e1f6f1;
}

.stat-icon.coral,
.badge.coral {
  color: #d8655f;
  background: #ffe8e4;
}

.stat-icon.gold,
.badge.gold {
  color: #af7d25;
  background: #fff2d7;
}

.stat-icon.blue,
.badge.blue {
  color: #5479b2;
  background: #e9f1ff;
}

.stat-value {
  font-size: 29px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-title {
  margin-top: 12px;
  font-weight: 600;
}

.stat-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 14px;
  margin-bottom: 18px;
}

.panel {
  padding: 17px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.panel-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.panel-head .icon {
  color: var(--accent-strong);
}

.stack {
  display: grid;
  gap: 10px;
}

.row-card {
  padding: 13px;
  box-shadow: none;
}

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

.row-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: #45aede;
  background: #e5f6fc;
}

.row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.row-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(32, 33, 38, 0.08);
  color: var(--ink);
  white-space: nowrap;
}

.pill.teal {
  color: var(--accent-ink);
  background: rgba(137, 217, 251, 0.28);
}

.pill.coral {
  color: var(--coral);
  background: rgba(220, 93, 77, 0.13);
}

.pill.gold {
  color: #8a650f;
  background: rgba(199, 154, 61, 0.18);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.check-item.done {
  color: var(--teal);
  font-weight: 600;
}

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

.cat-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  box-shadow: none;
}

.cat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cat-card h4 {
  margin: 0;
  font-size: 18px;
}

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee7dc;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-strong);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  margin-bottom: 14px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.cat-list,
.ledger-list,
.report-list {
  display: grid;
  gap: 10px;
}

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

.cat-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  color: #23877f;
  background: #e1f6f1;
}

.cat-main {
  display: grid;
  gap: 8px;
}

.cat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.row-actions {
  display: grid;
  gap: 7px;
}

.row-actions button {
  min-width: 82px;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(220, 93, 77, 0.3);
  border-radius: 8px;
  color: var(--coral);
  background: rgba(217, 108, 99, 0.08);
  font-weight: 600;
}

.form-panel {
  display: grid;
  gap: 14px;
}

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

.form-grid.one-column {
  grid-template-columns: 1fr;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.editable-list {
  display: grid;
  gap: 12px;
}

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

.editable-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editable-card-head strong {
  font-weight: 600;
}

.profile-panel {
  display: grid;
  gap: 18px;
}

.profile-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.profile-preview h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.profile-preview p {
  margin: 0;
  color: var(--muted);
}

.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--accent-ink);
  background: #daf4fe;
  font-weight: 650;
  object-fit: cover;
}

.avatar-large {
  width: 74px;
  height: 74px;
  font-size: 28px;
}

.room-summary {
  display: grid;
  gap: 12px;
}

.room-type-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.room-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink);
  background: #f4f8fb;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}

.room-chip.occupied {
  color: var(--accent-ink);
  border-color: rgba(53, 174, 228, 0.26);
  background: rgba(137, 217, 251, 0.18);
}

.family-cats-editor {
  display: grid;
  gap: 14px;
}

.cat-profile-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

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

.family-cat-chip {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  font-size: 12px;
}

.family-cat-chip span {
  color: var(--muted);
}

.room-service-editor {
  display: grid;
  gap: 10px;
}

.room-service-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

label,
.wide-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-soft);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(137, 217, 251, 0.26);
}

.toggle-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.toggle-line label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.toggle-line input {
  width: 16px;
  min-height: 16px;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.44);
  text-align: center;
}

.empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.amount {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.amount.income {
  color: var(--teal);
}

.amount.expense {
  color: var(--coral);
}

.modal {
  width: min(820px, calc(100vw - 80px));
  max-height: min(780px, calc(100vh - 64px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: white;
  box-shadow: 0 22px 80px rgba(32, 33, 38, 0.28);
}

.modal::backdrop {
  background: rgba(26, 27, 31, 0.42);
}

.modal form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: inherit;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}

.modal-head {
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-body {
  display: grid;
  gap: 16px;
  padding: 18px 20px;
  overflow: auto;
}

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

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) 380px;
  gap: 14px;
}

.calendar-panel,
.schedule-panel {
  align-self: start;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.calendar-head strong {
  font-size: 19px;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekday-row {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.day-cell {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  min-height: 88px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  text-align: left;
}

.day-cell:hover {
  border-color: var(--accent-strong);
}

.day-cell.other-month {
  color: #a9b2ba;
  background: #f8fafc;
}

.day-cell.selected {
  border-color: var(--accent-strong);
  background: rgba(137, 217, 251, 0.16);
  box-shadow: inset 0 0 0 1px rgba(53, 174, 228, 0.24);
}

.day-cell.today span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--accent-ink);
  background: #d8f3fd;
  font-weight: 650;
}

.day-cell b {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-ink);
  background: rgba(137, 217, 251, 0.42);
  font-size: 12px;
}

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

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

.appointment-card {
  display: grid;
  gap: 8px;
}

.doc-list {
  display: grid;
  gap: 12px;
}

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

.inventory-list {
  display: grid;
  gap: 12px;
}

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

.inventory-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.inventory-main p {
  margin: 0;
  color: var(--muted);
}

.inventory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  color: var(--muted);
  font-size: 12px;
}

.inventory-qty {
  display: grid;
  gap: 4px;
  justify-items: end;
  font-variant-numeric: tabular-nums;
}

.inventory-qty strong {
  font-size: 22px;
  line-height: 1;
}

.inventory-qty span {
  color: var(--muted);
  font-size: 12px;
}

.inventory-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.account-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

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

.doc-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.doc-head .row-title {
  flex-wrap: wrap;
}

.doc-preview {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.doc-preview pre,
.print-payload pre {
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  line-height: 1.62;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

.doc-audit {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  font-size: 12px;
}

.doc-audit strong {
  color: var(--ink);
}

.doc-audit span {
  color: var(--muted);
}

.staff-admin-tools {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.staff-admin-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.staff-admin-tools label {
  min-width: 0;
}

.staff-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty.compact {
  min-height: 120px;
}

.print-payload {
  display: none;
}

@media print {
  body * {
    visibility: hidden !important;
  }

  .print-payload,
  .print-payload * {
    visibility: visible !important;
  }

  .print-payload {
    display: block;
    position: fixed;
    inset: 0;
    padding: 28px;
    background: white;
    color: black;
  }

  .print-payload h1 {
    margin: 0 0 8px;
    font-size: 24px;
  }

  .print-payload p {
    margin: 0 0 18px;
    color: #444;
  }
}

@media (max-width: 1120px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

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

  .doc-head {
    display: grid;
  }
}

@media (max-width: 760px) {
  body {
    min-width: 0;
    min-height: 100vh;
    font-size: 14px;
  }

  .login-screen {
    align-items: start;
    padding: 18px;
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .login-logo {
    width: 86px;
    height: 86px;
  }

  .login-brand h1 {
    font-size: 28px;
  }

  .login-form {
    padding: 22px;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 12px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    padding: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .brand p {
    font-size: 11px;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 38px;
    padding: 0 10px;
  }

  .nav-item span:last-child {
    white-space: nowrap;
    font-size: 13px;
  }

  .sidebar-footer {
    display: none;
  }

  .workspace {
    overflow: visible;
  }

  .screen {
    max-width: none;
    padding: 14px;
  }

  .page-head {
    display: grid;
    align-items: start;
    gap: 12px;
  }

  .page-title {
    align-items: start;
  }

  .title-icon {
    width: 42px;
    height: 42px;
  }

  .page-title h2 {
    font-size: 24px;
  }

  .actions,
  .row-title,
  .doc-head .row-title {
    flex-wrap: wrap;
  }

  .live-strip {
    max-width: none;
  }

  .live-strip span {
    min-height: 30px;
    font-size: 11px;
  }

  .mascot-hero {
    grid-template-columns: 1fr;
    justify-items: start;
    min-height: 0;
    padding: 16px;
  }

  .roo-stage {
    justify-self: center;
    margin-top: -6px;
    transform: scale(0.84);
    transform-origin: center top;
  }

  .panel-head-with-action,
  .stock-alert-card {
    grid-template-columns: 1fr;
  }

  .panel-head-with-action {
    display: grid;
    align-items: start;
  }

  .sync-box-wide {
    grid-template-columns: 1fr;
  }

  .stock-alert-list {
    grid-template-columns: 1fr;
  }

  .stock-alert-qty {
    justify-items: start;
  }

  .dashboard-roster-list {
    grid-template-columns: 1fr;
  }

  .roster-template-table {
    grid-template-columns: 78px repeat(2, minmax(150px, 1fr));
    overflow-x: auto;
  }

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

  .stat-card {
    min-height: 132px;
    padding: 14px;
  }

  .stat-value {
    font-size: 25px;
  }

  .grid-two,
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 14px;
  }

  .inline-reminder-form,
  .toolbar,
  .form-grid,
  .room-service-row,
  .staff-admin-grid {
    grid-template-columns: 1fr;
  }

  .reminder-grid,
  .cat-grid {
    grid-template-columns: 1fr;
  }

  .cat-row,
  .account-card,
  .inventory-card {
    grid-template-columns: 1fr;
  }

  .inventory-qty {
    justify-items: start;
  }

  .inventory-actions,
  .row-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .row-card.dense {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .row-card.dense > .amount,
  .row-card.dense > .pill,
  .row-card.dense > .row-title {
    grid-column: 1 / -1;
  }

  .doc-head {
    display: grid;
  }

  .doc-audit {
    grid-template-columns: 1fr;
  }

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

  .calendar-head {
    align-items: stretch;
  }

  .weekday-row,
  .calendar-grid {
    gap: 5px;
  }

  .day-cell {
    min-height: 64px;
    padding: 7px;
  }

  .modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .modal-head,
  .modal-actions,
  .modal-body {
    padding: 14px;
  }
}
