:root {
  --ink: #16312f;
  --muted: #70807d;
  --teal: #23695c;
  --green: #d5e8dc;
  --bg: #f3f5f1;
  --line: #dfe5df;
  --white: #fff;
  --amber: #936127;
  --blue: #3b6687;
  --red: #a34b47;
  --font: "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #397d6b;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 650;
  line-height: 1.3;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.4px;
  font-weight: 650;
}
h3 {
  font-size: 15px;
  font-weight: 650;
}
small {
  color: var(--muted);
}
.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.1px;
}
.initial-load {
  display: grid;
  place-content: center;
  justify-items: center;
  height: 100vh;
}
.initial-load h1 {
  margin: 16px 0 6px;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--muted);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
  white-space: nowrap;
}
.btn:hover {
  background: #f3f6f2;
  border-color: #b9cac0;
}
.btn.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}
.btn.primary:hover {
  background: #184c43;
}
.btn.danger {
  color: var(--red);
  background: #fcf5f3;
}
.btn.small {
  padding: 5px 10px;
  font-size: 12px;
  min-height: 30px;
}
.btn.ghost {
  background: none;
  border-color: transparent;
}
.btn.on {
  border-color: #8bb6a4;
  background: #e8f2eb;
  color: #205c4b;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row.between {
  justify-content: space-between;
}
.row.wrap {
  flex-wrap: wrap;
}
.push {
  margin-left: auto;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.wide-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}
.gap {
  margin-bottom: 22px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  overflow: hidden;
}
.card-pad {
  padding: 22px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}
.card-head h2,
.card-head h3 {
  margin: 0;
}
.subline {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}
.callout {
  padding: 13px 16px;
  border-radius: 9px;
  background: #edf4ef;
  border: 1px solid #d6e5da;
  color: #3b6052;
  font-size: 12px;
  line-height: 1.7;
}
.callout.warn {
  background: #fcf6eb;
  border-color: #ede1c9;
  color: #805b28;
}
.callout.error {
  background: #fff2f0;
  border-color: #ecd2ca;
  color: #953d37;
}
.callout ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.callout[hidden] {
  display: none;
}
.text-link {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  padding: 4px 9px;
  border-radius: 5px;
  background: #f0f3f0;
  color: #61726b;
  white-space: nowrap;
}
.badge.green {
  background: #e8f3eb;
  color: #337154;
}
.badge.blue {
  background: #eaf1f7;
  color: #3d6680;
}
.badge.amber {
  background: #fbf2df;
  color: #936b2e;
}
.badge.red {
  background: #f9eae5;
  color: #a05a4d;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.num {
  font-variant-numeric: tabular-nums;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.metric {
  padding: 20px 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  position: relative;
  overflow: hidden;
}
.metric .value {
  font-size: 31px;
  font-weight: 650;
  letter-spacing: -1.1px;
  line-height: 1.3;
  margin: 10px 0 6px;
}
.metric .label {
  font-size: 12px;
  color: #60756d;
}
.metric .note {
  font-size: 11px;
  color: var(--muted);
}
.metric .metric-icon {
  position: absolute;
  right: 18px;
  top: 18px;
  color: #799686;
}
.metric .metric-icon .icon {
  width: 21px;
  height: 21px;
}
.metric.featured {
  background: #e6efe5;
  border-color: #c7dac7;
}
.mini-progress {
  height: 6px;
  background: #eef2ed;
  border-radius: 99px;
  overflow: hidden;
}
.mini-progress > span {
  display: block;
  height: 100%;
  background: #6f9b82;
  border-radius: 99px;
}
.title-row {
  margin-bottom: 24px;
  align-items: flex-start;
}
.title-row h1 {
  margin: 5px 0 7px;
}
.title-row p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  max-width: 780px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.toolbar input,
.toolbar select {
  max-width: 260px;
}
.field-input {
  border: 1px solid #d8e0d8;
  border-radius: 7px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  min-height: 39px;
  width: 100%;
}
.field-input:focus {
  outline: 2px solid #a2c3ac;
  border-color: #65977e;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #50685e;
  margin-bottom: 7px;
}
.field-help {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0;
}
.search-box {
  position: relative;
  min-width: 200px;
  flex: 1;
  max-width: 380px;
}
.search-box .icon {
  position: absolute;
  left: 12px;
  top: 11px;
  color: #9aa99f;
}
.search-box input {
  padding-left: 39px;
  max-width: none;
}
.field-wrap {
  margin-bottom: 16px;
}
.field-wrap.full {
  grid-column: 1/-1;
}
.check-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: #435e51;
}
.check-label input {
  margin-top: 4px;
  accent-color: var(--teal);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-weight: 600;
  color: #78887d;
  background: #f8faf6;
  font-size: 11px;
  padding: 12px 18px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 14px 18px;
  border-bottom: 1px solid #eef1ec;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tr:hover td {
  background: #fcfdfb;
}
td .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
td .second {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
td.align-right,
th.align-right {
  text-align: right;
}
.empty {
  padding: 46px 22px;
  text-align: center;
  color: var(--muted);
}
.empty .icon {
  width: 30px;
  height: 30px;
  margin-bottom: 9px;
}
.empty p {
  margin: 8px 0;
  font-size: 13px;
}
.loader {
  padding: 65px;
  text-align: center;
  color: var(--muted);
}
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #d8e5da;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.animate-in {
  animation: fadein 0.25s ease-out;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* Auth: an original editorial layout with explicit role entrances. */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 48% 52%;
  background: #fcfdf9;
}
.login-story {
  background: #153d38;
  color: #eff7ef;
  padding: 54px max(42px, 6vw);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 650;
}
.login-story .story-copy {
  margin: auto 0;
  position: relative;
  z-index: 1;
  padding: 60px 0;
}
.login-story h1 {
  font-size: clamp(32px, 3vw, 47px);
  font-weight: 550;
  line-height: 1.5;
  letter-spacing: -1px;
  margin-bottom: 22px;
}
.login-story p {
  color: #adc9ba;
  font-size: 14px;
  line-height: 1.95;
  max-width: 390px;
}
.login-orbit {
  position: absolute;
  border: 1px solid #73958230;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  left: 100px;
  top: 23%;
  pointer-events: none;
}
.login-orbit:after {
  content: "";
  position: absolute;
  inset: 70px;
  border: 1px solid #73958230;
  border-radius: 50%;
}
.story-stats {
  display: flex;
  gap: 35px;
  position: relative;
  z-index: 1;
}
.story-stats strong {
  font-size: 24px;
  font-weight: 550;
  display: block;
}
.story-stats span {
  font-size: 10px;
  color: #a2bdac;
  letter-spacing: 1px;
}
.login-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 34px;
}
.login-form {
  width: 100%;
  max-width: 440px;
}
.login-form h2 {
  font-size: 25px;
  margin: 9px 0 8px;
  letter-spacing: -0.7px;
}
.login-form > .muted {
  font-size: 13px;
  margin-bottom: 25px;
}
.role-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 5px;
  background: #edf1e9;
  border-radius: 9px;
  margin-bottom: 24px;
  gap: 3px;
}
.role-tabs button {
  background: transparent;
  border: 0;
  padding: 11px 6px;
  color: #6f8375;
  border-radius: 6px;
  font-size: 13px;
}
.role-tabs button.active {
  background: white;
  color: #285c46;
  box-shadow: 0 1px 5px #243e2010;
  font-weight: 650;
}
.login-divider {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 23px 0;
  color: #95a191;
  font-size: 11px;
}
.login-divider:before,
.login-divider:after {
  content: "";
  height: 1px;
  background: #e4e9df;
  flex: 1;
}
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.demo-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #e0e6db;
  border-radius: 8px;
  background: #fafbf7;
  text-align: left;
  color: #56705d;
  font-size: 12px;
}
.demo-option:hover {
  border-color: #83aa8f;
  background: #eef5ec;
}
.demo-option .icon {
  width: 15px;
  height: 15px;
}
.privacy-note {
  font-size: 10px;
  color: #95a18f;
  line-height: 1.75;
  margin-top: 20px;
}
.login-panel .language-button {
  position: absolute;
  right: 28px;
  top: 24px;
}
/* Workspace */
.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #133932;
  color: #d8e7dd;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 236px;
  display: flex;
  flex-direction: column;
  z-index: 20;
  padding: 27px 16px 15px;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 25px;
}
.brand h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #f1f6ef;
  letter-spacing: -0.4px;
}
.brand .sub {
  font-size: 9px;
  color: #95baaa;
  letter-spacing: 1.3px;
  margin-top: 3px;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #7c9e8d;
  padding: 22px 13px 8px;
  text-transform: uppercase;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border-radius: 7px;
  color: #afc9b9;
  font-size: 12px;
  transition: background 0.15s;
}
.nav-item:hover {
  background: #ffffff09;
  color: #fff;
}
.nav-item.active {
  background: #cce0c9;
  color: #1c4a34;
  font-weight: 650;
}
.nav-item.active .icon {
  color: #327054;
}
.nav-list .icon {
  width: 17px;
  height: 17px;
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 25px;
}
.scope-card {
  padding: 14px;
  background: #ffffff08;
  border: 1px solid #ffffff0d;
  border-radius: 9px;
}
.scope-card .eyebrow {
  color: #95b9a7;
  font-size: 8px;
  letter-spacing: 1px;
}
.scope-card strong {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  color: #d6e7d8;
}
.scope-card p {
  font-size: 10px;
  color: #87a38f;
  margin: 6px 0 0;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 6px 0;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d3dec2;
  color: #43613b;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.user-card strong {
  display: block;
  font-size: 11px;
  color: #d7e8d9;
}
.user-card small {
  font-size: 9px;
  color: #88ab96;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 70px;
  background: #fcfdf9;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 34px;
}
.breadcrumb {
  font-size: 11px;
  color: #869487;
  display: flex;
  align-items: center;
  gap: 11px;
}
.breadcrumb strong {
  color: #4f6756;
  font-weight: 550;
}
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: #7b907b;
}
.workspace-main {
  padding: 31px 34px 40px;
  max-width: 1800px;
  margin: auto;
}
.page-foot {
  padding: 22px 0 0;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #99a394;
  border-top: 1px solid var(--line);
  margin-top: 32px;
}
.hero-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 28px;
  background: #e8eee2;
  border-radius: 12px;
  margin-bottom: 22px;
  border: 1px solid #dce4d3;
}
.hero-strip h2 {
  font-size: 23px;
  font-weight: 550;
  margin: 0 0 7px;
}
.hero-strip p {
  font-size: 12px;
  color: #71876b;
  margin: 0;
}
.hero-emblem {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: #d1dec4;
  border-radius: 50%;
  color: #65915e;
}
.hero-emblem .icon {
  width: 30px;
  height: 30px;
}
.list-row {
  padding: 14px 0;
  border-bottom: 1px solid #edf1e8;
  display: flex;
  align-items: center;
  gap: 12px;
}
.list-row:last-child {
  border-bottom: 0;
}
.time-box {
  color: #55745e;
  font-size: 12px;
  font-weight: 600;
  min-width: 43px;
}
.list-main {
  min-width: 0;
  flex: 1;
}
.list-main strong {
  font-size: 12px;
  font-weight: 600;
}
.list-main small {
  font-size: 10px;
  display: block;
  margin-top: 4px;
}
.tone-box {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eff4e9;
  color: #63875c;
}
.tone-box.amber {
  background: #faf2e4;
  color: #ab8951;
}
.chart {
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding-top: 14px;
  padding-bottom: 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.chart-column {
  flex: 1;
  min-width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 7px;
}
.chart-bar {
  background: #a0bda3;
  width: 100%;
  min-width: 8px;
  max-width: 35px;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}
.chart-bar.strong {
  background: #3f7963;
}
.chart-column > small {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.chart-column > .num {
  font-size: 10px;
  color: #58735b;
}
.legend {
  display: flex;
  gap: 16px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 15px;
}
.key {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #a0bda3;
  margin-right: 5px;
}
.section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: #6d856b;
  margin: 0 0 13px;
}
.section-kicker .icon {
  width: 15px;
  height: 15px;
}
.schedule-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.schedule-column {
  background: #edf1e9;
  padding: 13px;
  border-radius: 10px;
  min-height: 280px;
}
.schedule-column > h3 {
  font-size: 11px;
  color: #75876e;
  margin: 2px 2px 14px;
  display: flex;
  justify-content: space-between;
}
.schedule-item {
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #dce5d5;
  margin-bottom: 10px;
  cursor: pointer;
  border-left: 3px solid #8eb09a;
}
.schedule-item:hover {
  box-shadow: 0 4px 12px #1b45290a;
}
.schedule-item strong {
  font-size: 13px;
  display: block;
  margin: 7px 0 5px;
}
.schedule-item small {
  display: block;
  font-size: 10px;
}
.schedule-item .schedule-time {
  font-size: 11px;
  color: #478563;
  font-weight: 650;
}
.timeline {
  padding-left: 17px;
  border-left: 1px solid #d2dfcf;
  margin-left: 5px;
}
.timeline-item {
  position: relative;
  padding: 0 0 20px 12px;
}
.timeline-item:before {
  content: "";
  position: absolute;
  left: -22px;
  top: 6px;
  width: 8px;
  height: 8px;
  border: 2px solid white;
  outline: 1px solid #a6bca0;
  border-radius: 50%;
  background: #71956b;
}
.timeline-item strong {
  font-size: 12px;
}
.timeline-item p {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 0;
}
.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.kv small {
  display: block;
  font-size: 10px;
  margin-bottom: 5px;
}
.kv strong {
  font-size: 13px;
  font-weight: 550;
  word-break: break-word;
}
.person-heading {
  display: flex;
  gap: 16px;
  align-items: center;
}
.person-heading .avatar {
  width: 56px;
  height: 56px;
  font-size: 20px;
  background: #e4eddc;
}
.person-heading h1 {
  font-size: 26px;
  margin: 0 0 5px;
}
.person-heading p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.odontogram {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 5px;
  padding: 18px 0;
}
.tooth {
  border: 1px solid #dde6d8;
  background: #f8faf5;
  border-radius: 10px 10px 5px 5px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: #90a58b;
  cursor: pointer;
}
.tooth svg {
  width: 24px;
  height: 29px;
  fill: #fff;
  stroke: #91aa83;
  stroke-width: 1.4;
}
.tooth:hover,
.tooth.selected {
  background: #e0edda;
  border-color: #78a06c;
}
.tooth.marked {
  background: #f9ebda;
  border-color: #c7a578;
  color: #956e37;
}
.tooth span {
  font-size: 9px;
}
.tooth-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-align: center;
  color: #94a38b;
  grid-column: 1/-1;
}
.note-version {
  border-left: 3px solid #cadbbf;
  background: #f7faf3;
  padding: 16px 18px;
  font-size: 12px;
  line-height: 1.85;
  white-space: pre-wrap;
}
.plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 10px;
}
.plan-card strong {
  font-size: 13px;
}
.plan-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 0;
}
.total-row {
  display: flex;
  justify-content: space-between;
  margin: 9px 0;
  font-size: 13px;
}
.total-row.grand {
  font-size: 23px;
  font-weight: 650;
  padding-top: 14px;
  margin-top: 15px;
  border-top: 1px solid var(--line);
}
.tabline {
  display: flex;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}
.tabline .btn {
  font-size: 12px;
}
.result-pill {
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #f0f3e9;
  color: #7e9176;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: #102c2c70;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  backdrop-filter: blur(3px);
}
body.dialog-open {
  overflow: hidden;
}
.modal {
  width: 650px;
  max-width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #fcfdf9;
  border-radius: 13px;
  box-shadow: 0 25px 100px #0e2b2540;
}
.modal > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.modal-head {
  flex-shrink: 0;
  padding: 24px 27px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal-head h2 {
  font-size: 20px;
  margin: 0 0 6px;
}
.modal-head p {
  font-size: 12px;
  margin: 0;
  color: var(--muted);
}
.modal-body {
  min-height: 0;
  flex: 1;
  padding: 23px 27px;
  overflow-y: auto;
}
.modal-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.modal-footer {
  flex-shrink: 0;
  padding: 18px 27px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.modal-close {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 3px;
}
.modal-error {
  margin-top: 10px;
}
.toast {
  position: fixed;
  bottom: 25px;
  right: 26px;
  background: #1e4e39;
  color: white;
  border-radius: 9px;
  padding: 13px 20px;
  z-index: 200;
  box-shadow: 0 8px 30px #16372430;
  font-size: 12px;
  max-width: 400px;
}
.invoice-brand {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.7px;
}
.print-only {
  display: none;
}
.mobile-nav {
  display: none;
}
.rights-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.rights-list .badge {
  font-size: 10px;
}
.loading-bar {
  height: 2px;
  background: linear-gradient(90deg, #cbdcc2, #47816b, #cbdcc2);
  background-size: 200%;
  animation: move 1.5s linear infinite;
}
@keyframes move {
  to {
    background-position: -200%;
  }
}
@media (min-width: 1600px) {
  .workspace-main {
    padding-left: 48px;
    padding-right: 48px;
  }
  .metric .value {
    font-size: 35px;
  }
}
@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .sidebar {
    width: 210px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .workspace-main {
    padding: 25px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .wide-main {
    grid-template-columns: minmax(0, 1fr) 275px;
  }
  .schedule-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .odontogram {
    gap: 3px;
  }
  .tooth {
    min-height: 60px;
  }
  .tooth svg {
    width: 20px;
  }
  .metric {
    padding: 18px;
  }
  .metric .value {
    font-size: 27px;
  }
}
@media (max-width: 960px) {
  .wide-main,
  .grid3 {
    grid-template-columns: 1fr;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login-story {
    padding: 40px;
  }
  .story-stats {
    gap: 20px;
  }
  .grid2 {
    gap: 15px;
  }
  .topbar-meta .date-meta {
    display: none;
  }
}
@media (max-width: 720px) {
  .table-wrap table {
    min-width: 640px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    min-height: 215px;
    padding: 25px 28px;
  }
  .login-story .story-copy {
    padding: 25px 0 0;
  }
  .login-story h1 {
    font-size: 25px;
    line-height: 1.4;
    margin-bottom: 10px;
  }
  .login-story p,
  .story-stats {
    display: none;
  }
  .login-brand img {
    width: 30px;
    height: 30px;
  }
  .login-panel {
    padding: 30px 25px;
  }
  .login-panel .language-button {
    top: 23px;
    color: #cfdfce;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 236px;
  }
  .sidebar.open {
    transform: none;
    box-shadow: 0 0 0 100vmax #173b2950;
  }
  .workspace-main {
    padding: 23px 18px;
  }
  .topbar {
    height: 60px;
    padding: 0 18px;
  }
  .mobile-nav {
    display: inline-flex;
  }
  .topbar-meta {
    gap: 8px;
  }
  .title-row {
    flex-wrap: wrap;
    gap: 15px;
  }
  .title-row h1 {
    font-size: 26px;
  }
  .title-row .push {
    margin-left: 0;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar input,
  .toolbar select {
    max-width: 100%;
    width: 100%;
  }
  .toolbar > * {
    flex: 1;
    min-width: 120px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .hero-strip {
    padding: 21px;
  }
  .hero-strip h2 {
    font-size: 20px;
  }
  .hero-emblem {
    width: 45px;
    height: 45px;
  }
  .metric {
    padding: 16px;
  }
  .metric .value {
    font-size: 27px;
  }
  .metric-grid {
    gap: 10px;
  }
  .card-head {
    padding: 16px;
  }
  .card-pad {
    padding: 17px;
  }
  .modal-overlay {
    padding: 12px;
  }
  .modal-body {
    padding: 19px;
  }
  .modal-head {
    padding: 20px;
  }
  .modal-fields {
    grid-template-columns: 1fr;
  }
  .modal-footer {
    padding: 16px 20px;
  }
  .schedule-board {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .schedule-column {
    padding: 9px;
  }
  .schedule-item {
    padding: 11px;
  }
  .odontogram {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  .tooth {
    min-height: 64px;
  }
  .card .row.between {
    flex-wrap: wrap;
  }
  .page-foot {
    gap: 10px;
    flex-wrap: wrap;
  }
  .breadcrumb span {
    display: none;
  }
}
@media print {
  body {
    background: white;
  }
  .sidebar,
  .topbar,
  .title-row,
  .toolbar,
  .page-foot,
  .screen-only,
  .modal-overlay,
  #toast-root {
    display: none !important;
  }
  .app-shell,
  .workspace {
    display: block;
  }
  .workspace-main {
    padding: 0;
    max-width: none;
  }
  .card {
    border: 0;
    overflow: visible;
  }
  .invoice-print {
    display: block;
  }
  .print-only {
    display: block;
  }
  .card-head {
    padding-left: 0;
  }
  .invoice-print table {
    font-size: 11px;
  }
  @page {
    size: A4;
    margin: 17mm;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
