:root {
  --brand: #168c7e;
  --brand-dark: #0f766e;
  --accent: #246b83;
  --ink: #1d2433;
  --muted: #6f7889;
  --line: #e5ebef;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --warn: #b45f3c;
  --danger: #d94a47;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

button.ghost {
  color: var(--brand);
  background: #e7f6f4;
}

button.plain {
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
}

button.danger-button,
.danger-button {
  background: var(--danger);
}

h1,
h2,
h3,
p {
  margin: 0;
}

p {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(22, 140, 126, 0.12), rgba(36, 107, 131, 0.08)),
    #f6f8f9;
}

.login-panel {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(24, 33, 48, 0.12);
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  font-weight: 900;
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.eyebrow {
  margin-top: 18px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.login-panel h1 {
  margin-top: 8px;
  font-size: 34px;
}

.login-panel p {
  margin-top: 10px;
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

label {
  display: grid;
  gap: 8px;
  color: #4d596d;
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
}

.message {
  min-height: 22px;
  margin-top: 14px;
  color: var(--danger);
  font-weight: 700;
}

.app-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 16px;
  color: #fff;
  background: #16202d;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-title {
  font-weight: 900;
}

.side-sub {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: rgba(22, 140, 126, 0.24);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.topbar .eyebrow {
  margin-top: 0;
}

.topbar h2 {
  margin-top: 4px;
  font-size: 24px;
}

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

.hospital-chip {
  min-width: 190px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  text-align: right;
}

.hospital-chip span,
.hospital-chip small {
  display: block;
}

.hospital-chip span {
  font-weight: 900;
}

.hospital-chip small {
  margin-top: 3px;
  color: var(--muted);
}

.content {
  padding: 24px 28px 40px;
}

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

.toolbar p {
  margin-top: 6px;
}

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

.filter-row input,
.filter-row select {
  min-width: 180px;
}

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

.stat-card,
.panel,
.table-panel,
.room-card,
.fee-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(27, 38, 53, 0.06);
}

.stat-card {
  padding: 18px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-value {
  margin-top: 8px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 900;
}

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

.quota-panel {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #cfe8e4;
  border-radius: 8px;
  background: #f3fbf9;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 280px) auto;
  align-items: center;
  gap: 16px;
}

.quota-panel.is-full {
  border-color: #f1c6c6;
  background: #fff6f6;
}

.quota-title {
  color: var(--brand-dark);
  font-weight: 900;
}

.quota-panel p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.quota-panel strong {
  color: var(--ink);
  white-space: nowrap;
}

.quota-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9e8e5;
}

.quota-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.quota-panel.is-full .quota-meter span {
  background: var(--danger);
}

.log-summary-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.log-filter-panel {
  margin-top: 18px;
}

.log-filter-row {
  grid-template-columns: minmax(240px, 1fr) 180px 160px auto;
}

.log-filter-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.log-table .table-panel {
  overflow-x: auto;
}

.log-table table {
  min-width: 980px;
}

.log-table th:nth-child(8),
.log-table td:nth-child(8) {
  width: 34%;
}

.log-detail {
  display: inline-block;
  max-width: 420px;
  overflow: hidden;
  color: #425166;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
  vertical-align: top;
}

.pagination {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.pagination button {
  width: auto;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.pagination button:disabled {
  color: #a9b2bf;
  cursor: not-allowed;
  background: #f4f6f8;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
}

.panel {
  padding: 18px;
}

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

.panel-title {
  font-size: 18px;
  font-weight: 900;
}

.panel-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.table-panel {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: #516078;
  background: #f8fafb;
  font-weight: 900;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.table-panel tbody tr.is-odd-row td {
  background: #ffffff;
}

.table-panel tbody tr.is-even-row td {
  background: #f7fbfa;
}

.table-panel tbody tr:hover td {
  background: #eef8f6;
}

.table-index-cell {
  width: 58px;
  min-width: 58px;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

tr.clickable-row {
  cursor: pointer;
}

tr.clickable-row:hover td {
  background: #f2fbf9;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--brand);
  background: #e9f7f5;
  font-size: 12px;
  font-weight: 800;
}

.tag.warn {
  color: var(--warn);
  background: #fff4ec;
}

.tag.danger {
  color: var(--danger);
  background: #fff0ef;
}

.empty {
  padding: 26px;
  color: var(--muted);
  text-align: center;
}

.trend {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  align-items: end;
  gap: 6px;
  min-height: 180px;
}

.trend-bar {
  display: grid;
  align-items: end;
  gap: 4px;
  height: 150px;
}

.bar-in,
.bar-out {
  border-radius: 4px 4px 0 0;
}

.bar-in {
  background: var(--brand);
}

.bar-out {
  background: #cfd9df;
}

.trend-label {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  transform: rotate(-35deg);
}

.risk-list,
.task-list {
  display: grid;
  gap: 10px;
}

.nursing-grid-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(520px, 1.35fr);
  gap: 18px;
  align-items: start;
}

.nursing-pending-panel,
.nursing-record-panel {
  min-width: 0;
}

.nursing-record-panel {
  padding: 18px;
}

.nursing-record-panel .table-panel {
  overflow-x: auto;
  box-shadow: none;
}

.nursing-record-panel table {
  min-width: 980px;
}

.nursing-task-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.nursing-task-row > small {
  grid-column: 2;
}

.list-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.list-row strong {
  display: block;
}

.list-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.list-row.clickable {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.list-row.clickable:hover {
  border-color: var(--brand);
  box-shadow: 0 10px 24px rgba(22, 140, 126, 0.12);
  transform: translateY(-1px);
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.room-card {
  padding: 16px;
}

.bed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.bed-cell {
  min-height: 92px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #dce6e2;
  background: #f8fbfa;
  display: grid;
  align-content: start;
}

.bed-cell.clickable {
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.bed-cell.clickable:hover {
  border-color: var(--brand);
  box-shadow: 0 10px 24px rgba(22, 140, 126, 0.14);
  transform: translateY(-1px);
}

.bed-cell.occupied {
  border-color: #f0d1bd;
  background: #fff7f1;
}

.bed-code {
  font-weight: 900;
  line-height: 1.1;
}

.bed-pet {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bed-meta {
  margin-top: 8px;
  color: #9a5b37;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.fee-card {
  padding: 16px;
}

.fee-card h3 {
  margin: 0;
  font-size: 18px;
}

.fee-items {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.fee-actions,
.action-row,
.template-row,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.fee-actions {
  margin-top: 12px;
}

.table-action {
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.orders-table .table-panel {
  overflow-x: auto;
}

.orders-table table {
  min-width: 1320px;
}

.orders-table th,
.orders-table td {
  padding: 11px 12px;
}

.orders-table th:nth-child(6),
.orders-table td:nth-child(6) {
  min-width: 260px;
}

.orders-table th:nth-child(1),
.orders-table td:nth-child(1) {
  width: 58px;
  text-align: center;
  color: var(--muted);
}

.orders-table th:nth-child(7),
.orders-table td:nth-child(7) {
  width: 150px;
  white-space: nowrap;
}

.orders-table th:nth-child(11),
.orders-table td:nth-child(11) {
  width: 190px;
}

.orders-table .tag {
  white-space: nowrap;
}

.orders-table .action-row {
  flex-wrap: nowrap;
  gap: 6px;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.danger-icon {
  color: #fff;
  background: var(--danger);
}

.fee-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.fee-item:last-child {
  border-bottom: 0;
}

.member-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 12px;
  margin-bottom: 18px;
}

.member-form label {
  gap: 6px;
}

.member-avatar-text {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #2a6f82);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.member-status-cell {
  display: grid;
  gap: 8px;
  min-width: 156px;
}

.member-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-switch {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.status-switch:hover {
  color: var(--brand);
  border-color: rgba(22, 140, 126, 0.36);
  background: rgba(22, 140, 126, 0.07);
}

.status-switch.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(13, 21, 32, 0.42);
}

.modal-panel {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(22, 32, 45, 0.22);
  overflow: hidden;
}

.modal-head,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  font-size: 20px;
}

.modal-body {
  min-height: 0;
  padding: 18px;
  overflow: auto;
}

.modal-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.modal-form textarea {
  min-height: 110px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  font: inherit;
}

.modal-form select {
  height: 43px;
}

.modal-form .wide {
  grid-column: 1 / -1;
}

.admission-form {
  display: grid;
  gap: 16px;
}

.admission-section-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.admission-section-head {
  padding-top: 4px;
}

.admission-section-head strong,
.admission-section-head small {
  display: block;
}

.admission-section-head strong {
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
}

.admission-section-head small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

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

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

.admission-grid .span-2 {
  grid-column: span 2;
}

.admission-grid .span-3 {
  grid-column: 1 / -1;
}

.admission-form textarea {
  min-height: 88px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.admission-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

.care-form {
  display: grid;
  gap: 16px;
}

.care-section-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
}

.care-section-head {
  padding-top: 4px;
}

.care-section-head strong,
.care-section-head small {
  display: block;
}

.care-section-head strong {
  font-size: 16px;
  font-weight: 900;
}

.care-section-head small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.care-grid .span-2 {
  grid-column: span 2;
}

.care-grid .span-3 {
  grid-column: 1 / -1;
}

.care-form textarea {
  min-height: 96px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.care-actions {
  justify-content: flex-end;
}

.order-tone {
  border-color: #CFE0F6;
  border-left-color: #3D6FB6;
  background: #F7FAFF;
}

.order-tone .care-section-head strong {
  color: #315C99;
}

.order-plan-tone {
  border-color: #E6DDBB;
  border-left-color: #A9872D;
  background: #FFFDF5;
}

.order-plan-tone .care-section-head strong {
  color: #7B641F;
}

.execution-context-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #E6DDBB;
  border-left: 5px solid #A9872D;
  border-radius: 8px;
  color: #4C3D13;
  background: #FFFDF5;
}

.execution-context-strip strong {
  flex: 0 0 auto;
  font-weight: 900;
}

.execution-context-strip span {
  min-width: 0;
  font-weight: 700;
}

.order-create-form {
  gap: 16px;
}

.order-tip {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #6f7480;
  background: rgba(35, 46, 65, 0.05);
  font-size: 13px;
}

.medicine-card {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #DCE6EF;
  border-radius: 8px;
  background: #F8FBFF;
}

.medicine-card:first-child {
  margin-top: 0;
}

.medicine-head,
.fixed-time-row,
.time-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.medicine-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

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

.order-add-btn {
  margin-top: 12px;
}

.order-schedule-card {
  border-color: #F2D3AC;
  border-left-color: #E48A2A;
  background: #FFF8EF;
}

.fixed-time-row input {
  max-width: 180px;
}

.time-chip-row {
  flex-wrap: wrap;
  min-height: 36px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.time-chip {
  padding: 7px 10px;
  border-radius: 999px;
  color: #1f5f7c;
  background: #EAF4FB;
}

.order-common-label {
  display: grid;
  gap: 8px;
}

.order-detail-meds p + p {
  margin-top: 8px;
}

.order-execution-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.order-execution-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #dce8e6;
  border-radius: 8px;
  background: #ffffff;
}

.order-execution-item strong,
.order-execution-item p {
  margin: 0;
}

.nursing-target-tone {
  border-color: #CDE9E5;
  border-left-color: #168C7E;
  background: #F7FCFA;
}

.nursing-target-tone .care-section-head strong {
  color: #147B70;
}

.nursing-observe-tone {
  border-color: #EBD8C6;
  border-left-color: #C2764A;
  background: #FFF9F4;
}

.nursing-observe-tone .care-section-head strong {
  color: #9A5B37;
}

.nursing-note-tone {
  border-color: #D9D9EA;
  border-left-color: #6F6FA8;
  background: #FAFAFF;
}

.nursing-note-tone .care-section-head strong {
  color: #55558D;
}

.form-section-title {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.form-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.modal-actions {
  justify-content: flex-end;
}

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

.settlement-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.settlement-toolbar strong,
.settlement-toolbar small {
  display: block;
}

.settlement-toolbar small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.settlement-table {
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.settlement-table table {
  min-width: 900px;
}

.settlement-table input {
  min-width: 82px;
  padding: 8px;
}

.settlement-table td,
.settlement-table th {
  padding: 8px;
}

.fee-remove-button {
  margin: 0 auto;
}

@media (max-width: 900px) {
  .admission-section-card {
    grid-template-columns: 1fr;
  }

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

  .admission-grid .span-2,
  .admission-grid .span-3 {
    grid-column: 1;
  }

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

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

  .care-grid .span-2,
  .care-grid .span-3 {
    grid-column: 1;
  }
}

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

.detail-grid .wide {
  grid-column: 1 / -1;
}

.detail-grid > div,
.stop-summary {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-grid strong {
  display: block;
  margin-top: 6px;
}

.detail-grid p,
.stop-summary p {
  margin-top: 8px;
  line-height: 1.7;
}

.bed-detail {
  display: grid;
  gap: 16px;
}

.bed-detail-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid #cde9e5;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: #f7fcfa;
}

.bed-detail-summary strong {
  display: block;
  font-size: 22px;
}

.bed-detail-summary span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.bed-detail-tags,
.bed-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bed-detail-actions {
  justify-content: flex-end;
}

.hospital-pet-detail {
  display: grid;
  gap: 16px;
}

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid #cde9e5;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: #f7fcfa;
}

.detail-kicker {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.detail-hero h2 {
  margin-top: 6px;
  font-size: 28px;
  line-height: 1.2;
}

.detail-hero p {
  margin-top: 8px;
  font-weight: 800;
}

.detail-hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-summary-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-summary-grid.compact {
  margin-top: 12px;
}

.detail-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

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

.detail-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-section-title {
  font-size: 17px;
  font-weight: 900;
}

.detail-section-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.info-table td {
  padding: 10px 0;
}

.info-table td:first-child {
  width: 92px;
  color: var(--muted);
  font-weight: 900;
}

.hospital-pet-detail .table-panel {
  box-shadow: none;
}

@media (max-width: 900px) {
  .detail-summary-grid,
  .detail-two-col {
    grid-template-columns: 1fr;
  }

  .detail-hero,
  .detail-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-hero-tags {
    justify-content: flex-start;
  }
}

.order-filter-panel {
  margin-bottom: 16px;
}

.order-filter-panel .filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(118px, 0.8fr)) auto;
  gap: 10px;
}

.order-filter-panel .filter-row input,
.order-filter-panel .filter-row select {
  min-width: 0;
  width: 100%;
}

.order-filter-panel .filter-row button {
  min-width: 68px;
  white-space: nowrap;
}

.whiteboard-screen {
  min-height: calc(100vh - 112px);
  margin: -24px -28px -40px;
  padding: 22px;
  color: #e8f4f7;
  background:
    radial-gradient(circle at 18% 12%, rgba(22, 140, 126, 0.2), transparent 34%),
    radial-gradient(circle at 80% 18%, rgba(36, 107, 131, 0.24), transparent 34%),
    #09131f;
}

.wb-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(122, 187, 190, 0.24);
  border-radius: 8px;
  background: rgba(13, 29, 44, 0.82);
}

.wb-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wb-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #168c7e, #2aa6a1);
  font-size: 28px;
  font-weight: 900;
}

.wb-header h1 {
  font-size: 30px;
  letter-spacing: 0.02em;
}

.wb-header p,
.wb-meta,
.wb-actions small,
.wb-panel span,
.wb-empty {
  color: #8fb1bb;
}

.wb-meta {
  text-align: right;
  line-height: 1.7;
}

.wb-meta strong {
  display: block;
  color: #fff;
  font-size: 30px;
  font-family: "DIN Alternate", "Arial Narrow", Arial, sans-serif;
}

.wb-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 280px;
}

.wb-button {
  border: 1px solid rgba(94, 198, 189, 0.34);
  color: #dffbfa;
  background: rgba(22, 140, 126, 0.18);
}

.wb-button.small {
  padding: 7px 10px;
  font-size: 12px;
}

.wb-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.wb-metric,
.wb-panel {
  border: 1px solid rgba(122, 187, 190, 0.22);
  border-radius: 8px;
  background: rgba(13, 29, 44, 0.76);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.wb-metric {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.wb-metric > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #9df0e8;
  background: rgba(22, 140, 126, 0.18);
  font-weight: 900;
}

.wb-metric label {
  display: block;
  color: #bdd7de;
  font-size: 13px;
  font-weight: 800;
}

.wb-metric strong {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: 32px;
  font-family: "DIN Alternate", "Arial Narrow", Arial, sans-serif;
}

.wb-metric p {
  margin-top: 2px;
  color: #7296a2;
  font-size: 12px;
}

.wb-grid {
  display: grid;
  grid-template-columns: minmax(440px, 1.2fr) minmax(340px, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.wb-panel {
  padding: 16px;
}

.wb-panel.rooms,
.wb-panel.records {
  grid-column: 1 / -1;
}

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

.wb-panel h2 {
  color: #f2fbfd;
  font-size: 18px;
}

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

.wb-task {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(122, 187, 190, 0.18);
  border-radius: 8px;
  background: rgba(7, 20, 33, 0.64);
}

.wb-task.overdue,
.wb-bed.overdue {
  border-color: rgba(217, 74, 71, 0.72);
  background: rgba(217, 74, 71, 0.18);
}

.wb-task.dueSoon,
.wb-bed.dueSoon {
  border-color: rgba(252, 181, 94, 0.72);
  background: rgba(180, 95, 60, 0.18);
}

.wb-task-time {
  color: #9df0e8;
  font-size: 22px;
  font-weight: 900;
  font-family: "DIN Alternate", "Arial Narrow", Arial, sans-serif;
}

.wb-task strong,
.wb-next strong {
  color: #fff;
}

.wb-task p {
  margin-top: 4px;
  color: #8fb1bb;
}

.wb-call {
  margin: 12px 0 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.wb-tip {
  display: block;
  color: #9df0e8;
  line-height: 1.7;
}

.wb-voice-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.wb-voice-row select {
  color: #e8f4f7;
  border-color: rgba(122, 187, 190, 0.28);
  background: #0b1b2b;
}

.wb-next,
.wb-queue {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(122, 187, 190, 0.18);
  border-radius: 8px;
  background: rgba(7, 20, 33, 0.52);
}

.wb-next span,
.wb-next strong {
  display: block;
}

.wb-queue {
  display: grid;
  gap: 8px;
  color: #9fbac2;
}

.wb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wb-legend span {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(122, 187, 190, 0.2);
}

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

.wb-room {
  padding: 12px;
  border: 1px solid rgba(122, 187, 190, 0.16);
  border-radius: 8px;
  background: rgba(7, 20, 33, 0.42);
}

.wb-room h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
}

.wb-bed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.wb-bed {
  min-height: 62px;
  padding: 8px;
  border: 1px solid rgba(122, 187, 190, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.wb-bed.observing {
  border-color: rgba(22, 140, 126, 0.66);
  background: rgba(22, 140, 126, 0.16);
}

.wb-bed.empty {
  opacity: 0.74;
}

.wb-bed strong,
.wb-bed small {
  display: block;
}

.wb-bed small {
  margin-top: 7px;
  color: #9fbac2;
}

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

.wb-type div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d7edf1;
}

.wb-type i {
  display: block;
  height: 8px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #168c7e, #73d8cf);
}

.wb-record-head,
.wb-record-row {
  display: grid;
  grid-template-columns: 90px 160px 120px 1fr 100px;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(122, 187, 190, 0.14);
}

.wb-record-head {
  color: #8fb1bb;
  font-weight: 900;
}

.wb-record-row {
  color: #e8f4f7;
}

.wb-footer {
  padding: 18px 0 4px;
  color: #6f98a2;
  text-align: center;
}

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

  .sidebar {
    position: static;
    height: auto;
    min-height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .grid-2,
  .nursing-grid-layout,
  .stats-grid,
  .quota-panel,
  .log-filter-row,
  .member-form {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .wb-header,
  .wb-grid,
  .wb-metrics {
    grid-template-columns: 1fr;
  }

  .wb-record-head,
  .wb-record-row {
    grid-template-columns: 80px 1fr;
  }
}
