:root {
  --ink: #17314e;
  --muted: #66809b;
  --line: #cfe4f2;
  --green: #1674ea;
  --green-dark: #0b5dc8;
  --lime: #d6efff;
  --paper: #f8fcff;
  --white: #fff;
  --danger: #b94f5b;
  --shadow: 0 24px 65px rgba(43, 116, 166, .13);
}

body {
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  background-color: #f8fcff;
  background-image:
    linear-gradient(rgba(28, 116, 173, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 116, 173, .028) 1px, transparent 1px),
    radial-gradient(circle at 92% 5%, rgba(82, 185, 255, .18), transparent 29%);
  background-size: 62px 62px, 62px 62px, auto;
}

.main-content { padding-top: 42px; }

.sidebar {
  overflow: hidden;
  border-right: 1px solid rgba(133, 193, 228, .42);
  color: var(--ink);
  background: linear-gradient(165deg, rgba(255,255,255,.98), rgba(234,247,255,.96));
  box-shadow: 12px 0 45px rgba(43, 116, 166, .06);
}

.sidebar::after {
  position: absolute;
  right: -52px;
  bottom: 44px;
  color: rgba(22, 116, 234, .055);
  content: "中国";
  font-family: Georgia, serif;
  font-size: 118px;
  letter-spacing: -.18em;
  pointer-events: none;
}

.brand { gap: 12px; }
.brand-mark {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 39px;
  height: 49px;
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
  color: transparent;
  background: #f4f1ea;
}
.brand-mark img { position: absolute; top: -13px; left: -20px; width: 78px; max-width: none; height: auto; }
.brand strong,.mobile-brand strong,.mobile-login-brand strong { color: #0c2340; font-size: 17px; font-weight: 820; letter-spacing: -.045em; text-transform: lowercase; }
.brand .brand-dot,.mobile-brand .brand-dot,.mobile-login-brand .brand-dot { color: #1674ea; }
.brand small { color: #7891a7; font-size: 8px; letter-spacing: .07em; }

.side-nav { position: relative; z-index: 1; gap: 7px; }
.nav-link { min-height: 48px; border: 1px solid transparent; border-radius: 14px; color: #66809b; font-size: 11px; }
.nav-link span { color: #7ea9c5; }
.nav-link:hover { border-color: #d7eaf5; color: #1674ea; background: rgba(255,255,255,.78); }
.nav-link.is-active { border-color: #c6e5f8; color: #0b5dc8; background: #dff3ff; box-shadow: 0 12px 27px rgba(43, 116, 166, .09); }
.nav-link.is-active span { color: #1674ea; }
.nav-link.is-active::before { left: -19px; background: #1674ea; }
.sidebar-footer { position: relative; z-index: 1; border-top-color: #cfe4f2; }
.user-card strong { color: #17314e; }
.user-card small,.link-button { color: #7891a7; }
.link-button:hover { color: #1674ea; }

.page-heading { margin-bottom: 29px; }
.page-heading h1 { color: #0c2340; font-size: 32px; font-weight: 760; letter-spacing: -.05em; }
.page-heading p:last-child { color: #66809b; font-size: 11px; line-height: 1.6; }
.eyebrow,.section-kicker { color: #1674ea; letter-spacing: .17em; }
h2 { color: #0c2340; }

.button { min-height: 43px; border-radius: 14px; font-size: 10px; }
.button-primary { background: #1674ea; box-shadow: 0 14px 30px rgba(22, 116, 234, .22); }
.button-primary:hover { background: #0b5dc8; transform: translateY(-1px); box-shadow: 0 18px 36px rgba(22, 116, 234, .27); }
.button-secondary { border-color: #b9ddf3; color: #0b5dc8; background: #eaf7ff; }
.button-ghost { border-color: #cfe4f2; color: #315f7d; background: rgba(255,255,255,.76); }
.button-ghost:hover { border-color: #8bcdf3; color: #1674ea; background: #fff; }

.panel,.stat-card,.person-card,.user-panel,.profile-card,.form-panel {
  border-color: rgba(133, 193, 228, .46);
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 17px 48px rgba(43, 116, 166, .065);
  backdrop-filter: blur(14px);
}
.panel:hover,.person-card:hover { border-color: rgba(104, 183, 229, .62); }

.stats-grid { gap: 15px; }
.stat-card { min-height: 142px; padding: 23px; border-radius: 22px; }
.stat-card p { color: #66809b; font-size: 10px; }
.stat-card strong { color: #0c2340; font-size: 28px; }
.stat-card > span { color: #7891a7; }
.stat-card.accent { border-color: transparent; color: #fff; background: linear-gradient(150deg,#2b91f0,#1268dc); box-shadow: 0 24px 48px rgba(22,116,234,.2); }
.stat-card.accent::after { right: -34px; bottom: -53px; width: 150px; height: 150px; border-color: rgba(255,255,255,.09); }
.stat-card.accent p,.stat-card.accent strong,.stat-card.accent > span { color: #fff; }

.schedule-panel,.orders-panel,.table-panel,.full-calendar { overflow: hidden; }
.panel-heading { padding: 23px 25px 20px; }
.schedule-scroll,.compact-list { border-top-color: #d9eaf4; }
.time-head { background: rgba(234,247,255,.52); }
.time-head b { color: #7992aa; }
.schedule-row,.compact-order,.table-row,.calendar-row { border-color: #e2eef6; }
.compact-order:hover,.table-row:hover { background: #f4fbff; }
.timeline { background-image: linear-gradient(to right,transparent calc(100% - 1px),#e4f0f7 calc(100% - 1px)); }
.task-block { border-left-width: 0; border-radius: 13px; box-shadow: 0 9px 20px rgba(43,116,166,.1); }
.task-blue { color: #245c80; background: #dff3ff; }
.task-violet { color: #465a8f; background: #e9edff; }
.task-orange { color: #8a5e35; background: #fff0dd; }
.task-green { color: #33745b; background: #e0f5ec; }
.free-label { color: #7891a7; }

.avatar { border-radius: 13px; color: #fff; background: #1674ea; box-shadow: 0 8px 18px rgba(22,116,234,.15); }
.avatar-blue { color: #17689a; background: #d8f0ff; }
.avatar-violet { color: #5269a3; background: #e4eaff; }
.avatar-orange { color: #98673d; background: #ffead5; }
.avatar-green { color: #347a5d; background: #dcf4e9; }

.create-panel { scroll-margin-top: 22px; }
.create-panel > summary { padding: 21px 24px; }
.create-panel > summary > span > b { width: 39px; height: 39px; border-radius: 13px; color: #1674ea; background: #dff3ff; }
.create-panel > summary strong { color: #0c2340; font-size: 11px; }
.create-panel > summary small { color: #7891a7; }
.create-panel[open] > summary { border-color: #d9eaf4; background: linear-gradient(145deg,#fff,#f7fcff); }
.form-grid { gap: 17px; padding: 25px; }
.form-grid label > span,.stack-form label > span:first-child,.employee-picker legend,.service-picker legend,.field-label-row { color: #42617d; font-size: 8px; }
.form-grid input,.form-grid select,.form-grid textarea,.stack-form input,.status-form select {
  min-height: 41px;
  border-color: #c8e2f1;
  border-radius: 13px;
  color: #17314e;
  background: rgba(255,255,255,.92);
}
.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus,.stack-form input:focus { border-color: #69baf0; box-shadow: 0 0 0 4px rgba(22,116,234,.09); }
.employee-picker,.service-picker { border-color: #d3e7f3; border-radius: 16px; background: rgba(248,252,255,.72); }
.employee-picker label,.form-grid .service-picker label { border-color: #dcebf4; border-radius: 13px; background: #fff; }
.employee-picker label:has(input:checked),.service-picker label:has(input:checked) { border-color: #74bff0; color: #0b5dc8; background: #e8f7ff; }
.specialist-picker label.is-suggested { border-color: #81c7ef; background: #edf9ff; }
.specialist-picker .match-badge { color: #12649a; background: #d3efff; }

.table-head { border-color: #d9eaf4; color: #718ba3; background: #eef9ff; }
.table-row { min-height: 84px; }
.table-row small { color: #748ca2; }
.service-chip,.specialist-tags span { color: #0b66a2; background: #e0f4ff; }
.status-new { color: #97682f; background: #fff0dc; }
.status-assigned { color: #355fa0; background: #e5eeff; }
.status-in_progress { color: #267259; background: #def4ea; }
.status-completed { color: #28744d; background: #dcf5e5; }
.status-cancelled { color: #a04d59; background: #fae6e8; }

.specialist-card { border-radius: 28px; }
.specialist-coverage { color: #346984; background: #eef9ff; }
.specialist-contact,.profile-editor,.person-card dl,.user-meta { border-color: #d9eaf4; }
.profile-editor > summary { color: #0b69b5; }
.profile-editor[open] > summary,.profile-editor .form-grid { background: #f4fbff; }
.availability { border-radius: 999px; }
.availability-available,.status-dot.online { color: #26795b; background: #dcf5e9; }
.availability-busy { color: #9a672e; background: #fff0da; }
.availability-vacation,.status-dot { color: #86617b; background: #f4e9f1; }

.calendar-head { background: #eef9ff; }
.calendar-cell.has-order { border-color: #b9dff3; color: #275f80; background: #e8f7ff; }
.dot-order { background: #1674ea; }
.dot-free { background: #9bb4c6; }

.client-results { border-color: #b9ddf3; border-radius: 14px; box-shadow: 0 22px 50px rgba(43,116,166,.16); }
.client-option { border-radius: 10px; }
.client-option:hover,.client-option.is-active { background: #eaf7ff; }
.client-dialog { border-radius: 28px; box-shadow: 0 40px 100px rgba(12,48,75,.28); }
.client-dialog::backdrop { background: rgba(12,35,64,.48); }
.dialog-head,.dialog-actions { border-color: #d9eaf4; }
.dialog-actions { background: #f4fbff; }
.dialog-close { border-color: #cfe4f2; border-radius: 13px; color: #66809b; }
.dialog-close:hover { color: #1674ea; background: #eaf7ff; }

.flash { border-radius: 14px; }
.flash-success { border-color: #bde5d1; color: #287154; background: #e9f8f0; }
.flash-error { border-color: #efcbd0; color: #9a4955; background: #fff0f1; }
.flash-warning { border-color: #f0d8ad; color: #8f642c; background: #fff7e8; }

.auth-page { background: #f8fcff; }
.login-intro {
  position: relative;
  color: #0c2340;
  background:
    linear-gradient(rgba(28,116,173,.04) 1px,transparent 1px),
    linear-gradient(90deg,rgba(28,116,173,.04) 1px,transparent 1px),
    linear-gradient(145deg,#f9fdff 0%,#e9f7ff 58%,#dff3ff 100%);
  background-size: 62px 62px,62px 62px,auto;
}
.login-intro::after { position: absolute; right: -42px; bottom: -38px; color: rgba(22,116,234,.075); content: "中国"; font-family: Georgia,serif; font-size: clamp(160px,23vw,340px); letter-spacing: -.18em; pointer-events: none; }
.login-intro > * { position: relative; z-index: 1; }
.login-intro h1 { color: #0c2340; font-weight: 730; }
.login-intro h1::after { display: block; margin-top: 8px; color: #1674ea; content: "就在这里。"; font-family: Georgia,serif; font-size: .42em; font-weight: 600; letter-spacing: -.03em; }
.login-intro > div > p:last-child { color: #66809b; }
.login-note { color: #718ba3; }
.login-panel { background: #eef9ff; }
.login-card { padding: 39px; border-color: rgba(255,255,255,.95); border-radius: 28px; box-shadow: 0 32px 80px rgba(43,116,166,.16); }
.login-card h2 { color: #0c2340; font-size: 28px; }
.security-note { color: #7891a7; }

.calendar-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 15px; }
.calendar-summary-card { min-height: 112px; padding: 20px 22px; border: 1px solid rgba(133,193,228,.46); border-radius: 21px; background: rgba(255,255,255,.88); box-shadow: 0 16px 40px rgba(43,116,166,.06); }
.calendar-summary-card span,.calendar-summary-card small { display: block; color: #718ba3; font-size: 8px; font-weight: 750; }
.calendar-summary-card strong { display: block; margin: 9px 0 7px; color: #0c2340; font-size: 25px; letter-spacing: -.04em; }
.calendar-summary-primary { border-color: transparent; background: linear-gradient(150deg,#2b91f0,#1268dc); box-shadow: 0 20px 44px rgba(22,116,234,.19); }
.calendar-summary-primary span,.calendar-summary-primary strong,.calendar-summary-primary small { color: #fff; }
.month-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 15px; padding: 20px 22px; }
.month-navigation { display: flex; align-items: center; gap: 12px; }
.month-navigation > div { min-width: 155px; }
.month-navigation span { display: block; margin-bottom: 4px; color: #718ba3; font-size: 7px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.month-navigation h2 { font-size: 18px; }
.month-arrow { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border: 1px solid #c7e2f2; border-radius: 14px; color: #1674ea; background: #f3fbff; font-size: 18px; font-weight: 800; }
.month-arrow:hover { border-color: #79c3f0; color: #fff; background: #1674ea; box-shadow: 0 12px 24px rgba(22,116,234,.18); transform: translateY(-1px); }
.calendar-filters { display: flex; align-items: flex-end; gap: 9px; }
.calendar-filters label { display: flex; min-width: 175px; flex-direction: column; gap: 6px; }
.calendar-filters label span { color: #58748d; font-size: 7px; font-weight: 800; }
.calendar-filters select { min-height: 40px; padding: 0 34px 0 11px; border: 1px solid #c8e2f1; border-radius: 12px; outline: none; color: #17314e; background: #fff; font-size: 9px; }
.calendar-filters select:focus { border-color: #69baf0; box-shadow: 0 0 0 4px rgba(22,116,234,.09); }
.calendar-reset { min-height: 40px; padding: 0 12px; border: 0; color: #1674ea; background: transparent; font-size: 8px; font-weight: 850; }
.month-calendar { overflow: hidden; border-radius: 25px; }
.month-scroll { overflow-x: auto; }
.month-grid { display: grid; grid-template-columns: repeat(7,minmax(150px,1fr)); min-width: 1050px; gap: 1px; background: #d9eaf4; }
.month-weekday { padding: 12px 14px; color: #66809b; background: #eef9ff; font-size: 8px; font-weight: 850; letter-spacing: .1em; text-align: center; text-transform: uppercase; }
.month-day { min-height: 172px; padding: 10px; overflow: hidden; background: rgba(255,255,255,.94); transition: background .18s,opacity .18s; }
.month-day:hover { background: #f8fdff; }
.month-day.is-outside { background: rgba(244,250,253,.82); opacity: .57; }
.month-day.is-outside:hover { opacity: .82; }
.month-day > header { display: flex; align-items: center; min-height: 28px; gap: 6px; margin-bottom: 6px; }
.month-day > header > a:first-child { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: #365d78; font-size: 9px; font-weight: 850; }
.month-day > header > span { padding: 4px 6px; border-radius: 999px; color: #1674ea; background: #e0f4ff; font-size: 6px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.month-day.is-today { box-shadow: inset 0 0 0 2px #68baf0; }
.month-day.is-today > header > a:first-child { color: #fff; background: #1674ea; box-shadow: 0 7px 14px rgba(22,116,234,.2); }
.day-add { display: grid; place-items: center; width: 25px; height: 25px; margin-left: auto; border: 1px solid #c7e2f2; border-radius: 8px; color: #1674ea; background: #fff; font-size: 13px; font-weight: 800; opacity: 0; transform: translateY(3px); }
.month-day:hover .day-add,.month-day:focus-within .day-add { opacity: 1; transform: translateY(0); }
.day-events { display: flex; flex-direction: column; gap: 6px; }
.calendar-event { display: block; padding: 8px 9px; border-left: 3px solid; border-radius: 10px; color: #315f7d; background: #edf8ff; box-shadow: 0 5px 12px rgba(43,116,166,.055); }
.calendar-event:hover { box-shadow: 0 9px 20px rgba(43,116,166,.13); transform: translateY(-1px); }
.calendar-event > span { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.calendar-event > span b { color: inherit; font-size: 7px; }
.calendar-event > span i { overflow: hidden; color: inherit; font-size: 6px; font-style: normal; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; opacity: .72; }
.calendar-event > strong { display: block; overflow: hidden; margin-top: 5px; color: inherit; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event > small { display: block; overflow: hidden; margin-top: 4px; color: inherit; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; opacity: .72; }
.calendar-event[hidden] { display: none; }
.event-blue { border-color: #1674ea; color: #275f87; background: #e4f4ff; }
.event-violet { border-color: #7d78d8; color: #4e5688; background: #eeefff; }
.event-orange { border-color: #e69a4d; color: #81562e; background: #fff1df; }
.event-green { border-color: #35b985; color: #2d7158; background: #e1f6ed; }
.event-sky { border-color: #4db6e9; color: #286984; background: #e2f7ff; }
.event-navy { border-color: #0c2340; color: #fff; background: #173654; }
.event-gray { border-color: #8fa8b9; color: #536f82; background: #edf3f6; }
.calendar-day-empty { margin: 13px 3px 0; color: #9aafbd; font-size: 7px; }
.month-day.is-filter-empty { background-image: repeating-linear-gradient(135deg,transparent,transparent 8px,rgba(100,163,202,.025) 8px,rgba(100,163,202,.025) 16px); }
.calendar-time-note { margin: 12px 2px 0; color: #7891a7; font-size: 8px; text-align: right; }

@media (max-width: 1120px) {
  .specialist-grid { grid-template-columns: 1fr; }
  .month-toolbar { align-items: stretch; flex-direction: column; }
  .calendar-filters { width: 100%; }
  .calendar-filters label { flex: 1; }
}

@media (max-width: 760px) {
  .main-content { padding: 25px 14px 88px; }
  .mobile-header { border-color: #cfe4f2; background: rgba(255,255,255,.9); box-shadow: 0 9px 30px rgba(43,116,166,.08); backdrop-filter: blur(18px); }
  .mobile-brand { color: #0c2340; }
  .mobile-brand .brand-mark { width: 32px; height: 40px; }
  .mobile-brand .brand-mark img { top: -9px; left: -15px; width: 62px; }
  .bottom-nav { border-color: #cfe4f2; background: rgba(255,255,255,.95); box-shadow: 0 -10px 32px rgba(43,116,166,.08); backdrop-filter: blur(16px); }
  .bottom-nav a { color: #7891a7; }
  .bottom-nav a.is-active { color: #1674ea; }
  .bottom-nav a.is-active::before { background: #1674ea; }
  .page-heading h1 { font-size: 27px; }
  .stat-card { border-radius: 18px; }
  .panel,.person-card,.user-panel,.profile-card,.form-panel { border-radius: 20px; }
  .form-grid { padding: 18px; }
  .client-dialog { border-radius: 24px; }
  .login-shell { background: #eef9ff; }
  .login-panel { background: linear-gradient(145deg,#f9fdff,#e4f5ff); }
  .login-card { padding: 28px; border-radius: 24px; }
  .mobile-login-brand .brand-mark { width: 35px; height: 44px; }
  .mobile-login-brand .brand-mark img { top: -11px; left: -17px; width: 69px; }
  .calendar-summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .calendar-summary-primary { grid-column: 1/-1; }
  .calendar-summary-card { min-height: 93px; padding: 16px; border-radius: 17px; }
  .calendar-summary-card strong { font-size: 21px; }
  .month-toolbar { padding: 16px; }
  .month-navigation { flex-wrap: wrap; }
  .month-navigation > div { flex: 1; min-width: 125px; }
  .calendar-filters { align-items: stretch; flex-direction: column; }
  .calendar-filters label { width: 100%; }
  .calendar-reset { align-self: flex-start; min-height: 30px; }
  .month-calendar { margin-right: -14px; margin-left: -14px; border-radius: 0; }
  .month-grid { grid-template-columns: repeat(7,minmax(135px,1fr)); min-width: 945px; }
  .month-day { min-height: 158px; }
  .day-add { opacity: 1; transform: none; }
  .calendar-time-note { text-align: left; }
}

/* Readability scale: larger type, clearer controls and calmer spacing. */
body { font-size: 16px; line-height: 1.55; }
.sidebar { width: 264px; padding: 30px 20px 22px; }
.app-shell { margin-left: 264px; }
.main-content { width: min(1480px,100%); padding: 44px clamp(28px,3.8vw,60px) 58px; }
.brand { gap: 14px; padding-right: 8px; padding-bottom: 32px; padding-left: 8px; }
.brand strong,.mobile-brand strong,.mobile-login-brand strong { font-size: 20px; }
.brand small { margin-top: 4px; font-size: 11px; line-height: 1.35; }
.side-nav { gap: 7px; }
.nav-link { min-height: 54px; gap: 14px; padding: 0 15px; font-size: 14px; line-height: 1.25; }
.nav-link span { width: 20px; font-size: 20px; }
.user-card strong { font-size: 13px; }
.user-card small { font-size: 11px; }
.link-button { margin-top: 13px; font-size: 12px; }

.page-heading { gap: 24px; margin-bottom: 32px; }
.page-heading h1 { font-size: 38px; line-height: 1.12; }
.page-heading p:last-child { max-width: 720px; margin-top: 10px; font-size: 15px; line-height: 1.65; }
.eyebrow,.section-kicker { margin-bottom: 7px; font-size: 11px; line-height: 1.4; }
h2 { font-size: 22px; line-height: 1.25; }
.button { min-height: 48px; padding: 0 20px; font-size: 14px; line-height: 1.2; }
.button-small { min-height: 40px; padding: 0 14px; font-size: 12px; }
.button-large { min-height: 54px; }

.stats-grid { gap: 16px; margin-bottom: 20px; }
.stat-card { min-height: 158px; padding: 26px; }
.stat-card p { margin-bottom: 13px; font-size: 14px; line-height: 1.4; }
.stat-card strong { margin-bottom: 10px; font-size: 34px; line-height: 1; }
.stat-card strong small { font-size: 17px; }
.stat-card > span { font-size: 12px; line-height: 1.45; }
.panel-heading { min-height: 74px; padding: 25px 27px 22px; }
.panel-heading h2 { font-size: 22px; }

.time-head { min-height: 44px; }
.time-head b { padding-top: 13px; font-size: 11px; }
.schedule-row { min-height: 80px; }
.employee-cell { padding: 11px 17px; }
.employee-cell strong { font-size: 13px; }
.employee-cell small { margin-top: 4px; font-size: 11px; }
.task-block { top: 11px; height: 58px; padding: 10px 12px; }
.task-block b { font-size: 12px; }
.task-block small { margin-top: 5px; font-size: 10px; }
.free-label { top: 30px; font-size: 11px; }

.compact-order { grid-template-columns: 92px minmax(200px,1fr) 108px 106px; gap: 16px; padding: 18px 23px; }
.compact-order > span:nth-child(2) strong { font-size: 14px; line-height: 1.35; }
.compact-order > span:nth-child(2) small { margin-top: 5px; font-size: 11px; line-height: 1.45; }
.compact-order > b { font-size: 13px; }
.date-chip b { font-size: 13px; }
.date-chip small { font-size: 11px; }
.bonus-summary > strong { font-size: 32px; }
.bonus-summary > p { font-size: 12px; line-height: 1.5; }
.status,.availability,.status-dot { padding: 7px 10px; font-size: 10px; line-height: 1.3; }
.inline-empty { padding: 38px; font-size: 13px; line-height: 1.6; }

.create-panel > summary { min-height: 76px; padding: 20px 24px; }
.create-panel > summary strong { font-size: 14px; }
.create-panel > summary small { margin-top: 5px; font-size: 11px; line-height: 1.45; }
.form-grid { gap: 20px; padding: 28px; }
.stack-form { gap: 19px; }
.form-grid label,.stack-form label,.form-field { gap: 9px; }
.form-grid label > span,.stack-form label > span:first-child,.employee-picker legend,.service-picker legend,.field-label-row { font-size: 13px; line-height: 1.35; }
.form-grid label > small,.stack-form label > small,.client-picker-hint { font-size: 11px; line-height: 1.5; }
.form-grid input,.form-grid select,.form-grid textarea,.stack-form input,.status-form select {
  min-height: 50px;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}
.form-grid textarea { min-height: 112px; }
.form-actions { gap: 14px; }
.form-actions small { font-size: 11px; }
.employee-picker,.service-picker { gap: 10px; padding: 14px; }
.employee-picker label { min-height: 56px; gap: 10px; padding: 10px; }
.employee-picker label strong { font-size: 13px; }
.employee-picker label small { font-size: 10px; }
.form-grid .service-picker label { min-height: 42px; padding: 9px 12px; }
.form-grid .check-line { min-height: 48px; }
.form-grid .check-line > span { font-size: 13px; }
.password-field input { padding-right: 96px; }
.password-field button { right: 9px; font-size: 11px; }
.inline-add-button { font-size: 12px; }
.client-autocomplete::after { top: 14px; font-size: 18px; }
.client-results { top: calc(100% - 8px); max-height: 300px; padding: 7px; border-radius: 13px; }
.client-option { gap: 5px; padding: 12px; }
.client-option strong { font-size: 13px; }
.client-option small { font-size: 11px; }
.client-no-results { padding: 16px; font-size: 12px; }

.table-head,.table-row { gap: 20px; padding: 17px 24px; }
.table-head { font-size: 11px; line-height: 1.35; }
.table-row { min-height: 90px; font-size: 13px; line-height: 1.45; }
.table-row strong { font-size: 14px; }
.table-row small { margin-top: 6px; font-size: 11px; line-height: 1.55; }
.employee-names { gap: 6px; }
.employee-names span { gap: 8px; font-size: 11px; }
.employee-names i { width: 27px; height: 27px; font-size: 9px; }
.status-select { min-height: 40px; padding: 0 10px; font-size: 11px; }

.people-grid,.user-grid { gap: 18px; }
.person-card { padding: 24px; }
.person-card h2 { margin-top: 20px; font-size: 18px; }
.person-card > p { margin-top: 5px; font-size: 13px; line-height: 1.5; }
.person-card dl { margin: 22px -24px 0; }
.person-card dl > div { padding: 16px 24px; }
dt { font-size: 11px; line-height: 1.4; }
dd { margin-top: 6px; font-size: 13px; line-height: 1.45; }
.status-form { margin-top: 18px; }
.status-form label > span { font-size: 12px; }
.specialist-tags span,.service-chip { padding: 6px 9px; font-size: 10px; }
.specialist-coverage { padding: 12px; font-size: 11px; line-height: 1.5; }
.specialist-note { font-size: 12px; line-height: 1.65; }
.specialist-contact { font-size: 11px; }
.specialist-contact b { font-size: 11px; }
.profile-editor > summary { min-height: 48px; padding: 14px 22px; font-size: 12px; }
.specialist-picker .match-badge { padding: 5px 7px; font-size: 9px; }
.empty-state p { font-size: 13px; line-height: 1.6; }

.user-panel { padding: 23px; }
.user-panel-head h2 { font-size: 17px; }
.user-panel-head p { margin-top: 5px; font-size: 12px; }
.password-reset form { top: 48px; width: 300px; padding: 18px; }
.password-reset form label > span:first-child { font-size: 12px; }
.profile-card h2,.form-section-heading h2 { font-size: 19px; }
.profile-card > p { font-size: 13px; }
.badge { padding: 7px 10px; font-size: 10px; }
.form-section-heading p { margin-top: 6px; font-size: 12px; line-height: 1.5; }
.flash { padding: 15px 17px; font-size: 13px; line-height: 1.45; }

.dialog-head { padding: 22px 24px; }
.dialog-head h2 { font-size: 22px; }
.dialog-close { width: 40px; height: 40px; }
.dialog-body { padding: 24px; }
.dialog-actions { padding: 18px 24px; }
.dialog-error { padding: 13px 24px; font-size: 12px; }

.login-intro h1 { font-size: clamp(48px,5vw,76px); line-height: 1.02; }
.login-intro > div > p:last-child { max-width: 590px; font-size: 17px; line-height: 1.75; }
.login-note { font-size: 12px; }
.login-card { width: min(460px,100%); padding: 42px; }
.login-card h2 { margin-bottom: 10px; font-size: 32px; }
.login-card > .muted { margin-bottom: 28px; font-size: 13px; line-height: 1.55; }
.security-note { margin-top: 24px; font-size: 11px; line-height: 1.6; }

.calendar-summary-grid { gap: 16px; margin-bottom: 18px; }
.calendar-summary-card { min-height: 130px; padding: 23px 25px; }
.calendar-summary-card span,.calendar-summary-card small { font-size: 11px; line-height: 1.4; }
.calendar-summary-card strong { margin: 10px 0 8px; font-size: 32px; }
.month-toolbar { margin-bottom: 18px; padding: 23px 25px; }
.month-navigation { gap: 14px; }
.month-navigation > div { min-width: 190px; }
.month-navigation span { margin-bottom: 5px; font-size: 10px; }
.month-navigation h2 { font-size: 24px; }
.month-arrow { width: 48px; height: 48px; font-size: 22px; }
.calendar-filters { gap: 11px; }
.calendar-filters label { min-width: 205px; gap: 7px; }
.calendar-filters label span { font-size: 11px; }
.calendar-filters select { min-height: 48px; padding-right: 38px; padding-left: 13px; font-size: 13px; }
.calendar-reset { min-height: 48px; padding: 0 14px; font-size: 12px; }
.month-grid { grid-template-columns: repeat(7,minmax(175px,1fr)); min-width: 1225px; }
.month-weekday { padding: 15px; font-size: 11px; }
.month-day { min-height: 215px; padding: 13px; }
.month-day > header { min-height: 34px; margin-bottom: 8px; }
.month-day > header > a:first-child { width: 33px; height: 33px; font-size: 13px; }
.month-day > header > span { padding: 5px 7px; font-size: 9px; }
.day-add { width: 32px; height: 32px; font-size: 17px; opacity: .5; }
.day-events { gap: 8px; }
.calendar-event { padding: 10px 11px; border-left-width: 4px; }
.calendar-event > span b { font-size: 10px; }
.calendar-event > span i { font-size: 9px; }
.calendar-event > strong { margin-top: 6px; font-size: 12px; }
.calendar-event > small { margin-top: 5px; font-size: 10px; line-height: 1.4; }
.calendar-day-empty { margin-top: 16px; font-size: 10px; }
.calendar-time-note { margin-top: 14px; font-size: 11px; line-height: 1.5; }

@media (max-width: 1120px) {
  .sidebar { width: 250px; }
  .app-shell { margin-left: 250px; }
  .main-content { padding-right: 26px; padding-left: 26px; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .app-shell { margin-left: 0; }
  .main-content { padding: 28px 16px 96px; }
  .mobile-header { min-height: 66px; padding: 12px 16px; }
  .mobile-brand { gap: 10px; }
  .mobile-brand strong,.mobile-login-brand strong { font-size: 17px; }
  .bottom-nav { height: 76px; }
  .bottom-nav span { font-size: 20px; }
  .bottom-nav small { font-size: 10px; line-height: 1.2; }
  .page-heading { flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
  .page-heading h1 { font-size: 30px; line-height: 1.15; }
  .page-heading p:last-child { max-width: none; font-size: 14px; }
  .page-heading-actions { width: 100%; }
  .page-heading-actions .button { min-width: auto; padding: 0 15px; font-size: 12px; }
  .page-heading-actions .button::first-letter { font-size: inherit; }
  .button { min-height: 46px; padding: 0 16px; font-size: 13px; }
  .button-small { min-height: 40px; font-size: 12px; }
  .stats-grid { gap: 10px; }
  .stat-card { min-height: 126px; padding: 18px; }
  .stat-card p { font-size: 12px; }
  .stat-card strong { font-size: 27px; }
  .stat-card > span { font-size: 11px; }
  .panel-heading { min-height: 66px; padding: 19px; }
  .panel-heading h2 { font-size: 19px; }
  .compact-order { grid-template-columns: 78px 1fr 88px; padding: 16px; }
  .form-grid { gap: 18px; padding: 19px; }
  .form-grid input,.form-grid textarea,.stack-form input { font-size: 16px; }
  .form-grid select,.status-form select { font-size: 15px; }
  .field-label-row { gap: 7px; }
  .inline-add-button { font-size: 13px; }
  .table-row,.order-table,.client-table,.bonus-table { padding: 17px; }
  .person-card { padding: 21px; }
  .person-card dl { margin-right: -21px; margin-left: -21px; }
  .calendar-summary-grid { gap: 10px; }
  .calendar-summary-card { min-height: 105px; padding: 18px; }
  .calendar-summary-card strong { font-size: 27px; }
  .month-toolbar { padding: 18px; }
  .month-navigation > div { min-width: 150px; }
  .month-navigation h2 { font-size: 21px; }
  .calendar-filters select { font-size: 15px; }
  .month-calendar { margin-right: -16px; margin-left: -16px; }
  .month-grid { grid-template-columns: repeat(7,minmax(165px,1fr)); min-width: 1155px; }
  .month-day { min-height: 200px; }
  .day-add { opacity: 1; transform: none; }
  .login-panel { padding: 20px; }
  .login-card { padding: 30px 24px; }
  .login-card h2 { font-size: 28px; }
}

/* Minimal management accounting. */
.finance-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.finance-month-toolbar { align-items: center; }
.finance-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.finance-summary-card { min-height: 150px; padding: 24px 25px; border: 1px solid rgba(133,193,228,.46); border-radius: 22px; background: rgba(255,255,255,.9); box-shadow: 0 16px 40px rgba(43,116,166,.065); }
.finance-summary-card > span { display: block; color: #58748d; font-size: 12px; font-weight: 800; }
.finance-summary-card > strong { display: block; margin: 15px 0 10px; color: #0c2340; font-size: 30px; line-height: 1; letter-spacing: -.045em; }
.finance-summary-card > small { display: block; color: #718ba3; font-size: 11px; line-height: 1.45; }
.finance-summary-income { border-color: #b9e8d6; background: linear-gradient(145deg,#f5fffb,#e7f9f1); }
.finance-summary-income > strong { color: #187255; }
.finance-summary-debt { border-color: #f0d1b4; background: linear-gradient(145deg,#fffaf5,#fff0e3); }
.finance-summary-debt > strong { color: #a65d27; }
.finance-summary-result { border-color: transparent; color: #fff; }
.finance-summary-result.is-positive { background: linear-gradient(150deg,#2b91f0,#1268dc); box-shadow: 0 20px 46px rgba(22,116,234,.2); }
.finance-summary-result.is-negative { background: linear-gradient(150deg,#db735f,#b74a55); box-shadow: 0 20px 46px rgba(172,69,77,.18); }
.finance-summary-result > span,.finance-summary-result > strong,.finance-summary-result > small { color: #fff; }
.finance-note { margin: 0 0 18px; padding: 15px 18px; border: 1px solid #cfe4f2; border-radius: 15px; color: #486a84; background: #eef9ff; font-size: 12px; line-height: 1.6; }
.finance-note b { color: #0c5ea4; }
.finance-entry-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.finance-create-panel { align-self: start; margin-bottom: 0; }
.finance-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
.finance-orders-panel,.finance-ledger-panel { margin-bottom: 18px; overflow: hidden; }
.finance-table-scroll { overflow-x: auto; border-top: 1px solid #d9eaf4; }
.finance-order-table { grid-template-columns: minmax(250px,1.5fr) 105px 120px 120px 120px 115px; min-width: 980px; }
.finance-order-table > strong,.finance-order-table > span { text-align: right; }
.finance-order-table > :first-child { text-align: left; }
.finance-order-table .positive { text-align: right; }
.finance-debt-value { color: #aa5f2a; }
.payment-status { display: inline-flex; align-items: center; justify-content: center; justify-self: end; width: max-content; min-height: 32px; padding: 6px 9px; border-radius: 9px; font-size: 10px; font-weight: 850; line-height: 1.25; }
.payment-status-unpaid { color: #a0525c; background: #fae8eb; }
.payment-status-partial { color: #97642d; background: #fff0d9; }
.payment-status-paid { color: #287354; background: #ddf5e8; }
.finance-entry-count { color: #718ba3; font-size: 12px; font-weight: 750; }
.finance-ledger-table { grid-template-columns: 92px 110px minmax(220px,1.2fr) minmax(180px,1fr) minmax(190px,1fr) 130px; min-width: 1100px; }
.ledger-kind { display: inline-flex; width: max-content; padding: 6px 9px; border-radius: 8px; font-size: 10px; font-weight: 850; }
.ledger-kind-payment { color: #287354; background: #ddf5e8; }
.ledger-kind-bonus { color: #6756a0; background: #eeebff; }
.ledger-kind-expense { color: #97642d; background: #fff0d9; }
.finance-amount { text-align: right; white-space: nowrap; }
.finance-amount-income { color: #187255; }
.finance-amount-expense { color: #a7553e; }

@media (max-width: 1120px) {
  .finance-month-toolbar { align-items: stretch; }
  .finance-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .finance-entry-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .finance-heading-actions { width: 100%; justify-content: flex-start; }
  .finance-heading-actions .button { flex: 1 1 auto; }
  .finance-month-toolbar { align-items: stretch; }
  .finance-summary-grid { gap: 10px; }
  .finance-summary-card { min-height: 125px; padding: 19px; border-radius: 18px; }
  .finance-summary-card > span { font-size: 11px; }
  .finance-summary-card > strong { margin: 12px 0 8px; font-size: 25px; }
  .finance-summary-card > small { font-size: 10px; }
  .finance-note { padding: 14px 15px; font-size: 11px; }
  .finance-form { grid-template-columns: 1fr; }
  .finance-order-table { min-width: 920px; }
  .finance-ledger-table { min-width: 1030px; }
  .bottom-nav-six { grid-template-columns: repeat(6,1fr); }
  .bottom-nav-six a { min-width: 0; }
  .bottom-nav-six small { font-size: 9px; }
}

@media (max-width: 430px) {
  .finance-summary-grid { grid-template-columns: 1fr; }
  .finance-summary-card { min-height: 116px; }
}
