    :root {
      --bg: #fff9f2;
      --panel: #ffffff;
      --ink: #44403c;
      --muted: #a8a29e;
      --orange: #f97316;
      --orange-dark: #ea580c;
      --orange-soft: #fff7ed;
      --border: #fde6d2;
      --line: #06c755;
      --danger: #ef4444;
      --stone: #1f2937;
    }

    [hidden] { display: none !important; }

    .toolbar .toolbar-split-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      flex: 0 0 auto;
      white-space: nowrap;
      background: #fff;
      border: 1px solid #cbd5e1;
      color: #1f2937;
      font: inherit;
      font-size: 12px;
      font-weight: 900;
      line-height: 1;
      letter-spacing: 0;
      box-shadow: none;
    }
    .toolbar .toolbar-split-toggle[aria-pressed="true"] { background: #1f2937; color: #fff; }
    .toolbar .toolbar-split-toggle:disabled { opacity: .5; cursor: not-allowed; }
    .admin-workspace-header {
      display: contents;
    }
    .admin-workspace-launch { position: relative; display: inline-flex; flex: 0 0 auto; }
    .toolbar .admin-workspace-launch > .admin-split-icon-button {
      width: 36px;
      height: 36px;
      min-height: 36px;
      padding: 0;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      color: #44403c;
      font: inherit;
      font-size: 18px;
      font-weight: 900;
      line-height: 1;
      box-shadow: none;
    }
    .admin-workspace-tabbar {
      position: relative;
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
      border-bottom: 1px solid #d6d3d1;
      margin-bottom: 0;
      padding-bottom: 6px;
      flex: 0 0 auto;
    }
    #adminWorkspaceTabs { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
    .admin-workspace-tab {
      display: flex;
      align-items: center;
      border: 1px solid transparent;
      border-radius: 6px 6px 0 0;
      flex: 0 0 auto;
      background: #f5f5f4;
      color: #57534e;
    }
    .admin-workspace-tab.active { background: #fff7ed; border-color: #fdba74; color: #c2410c; }
    .admin-workspace-tab.secondary { border-color: #94a3b8; background: #f1f5f9; color: #1f2937; }
    .admin-workspace-tab button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      min-height: 38px;
      border: 0;
      border-radius: 6px;
      padding: 6px 12px;
      background: transparent;
      color: inherit;
      font: inherit;
      font-size: 14px;
      font-weight: 900;
      line-height: 1.4;
      letter-spacing: 0;
      white-space: nowrap;
      box-shadow: none;
      cursor: pointer;
    }
    .admin-workspace-tab button.admin-workspace-tab-close { width: 28px; padding: 0; min-height: 32px; }
    .admin-workspace-tab button:hover, .admin-split-icon-button:hover { background: #e7e5e4; }
    .admin-split-icon-button {
      display: inline-grid;
      place-items: center;
      width: 36px;
      height: 36px;
      min-height: 36px;
      flex: 0 0 36px;
      padding: 0;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      background: #fff;
      color: #44403c;
      font: inherit;
      font-size: 18px;
      font-weight: 900;
      line-height: 1;
      letter-spacing: 0;
      box-shadow: none;
      cursor: pointer;
    }
    .admin-workspace-new-menu {
      position: absolute;
      z-index: 100;
      top: 100%;
      left: 0;
      width: min(280px, 100%);
      max-height: min(480px, 65vh);
      overflow-y: auto;
      padding: 4px;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      background: #fff;
      box-shadow: 0 6px 18px #0002;
    }
    .admin-workspace-new-menu button,
    .toolbar .admin-workspace-new-menu button {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-height: 38px;
      padding: 8px 10px;
      border: 0;
      border-radius: 4px;
      background: #fff;
      color: #44403c;
      font: inherit;
      font-size: 14px;
      font-weight: 900;
      line-height: 1.4;
      letter-spacing: 0;
      text-align: left;
      box-shadow: none;
    }
    .admin-workspace-new-menu button:hover { background: #fff7ed; color: #c2410c; }
    .admin-workspace-launch > .admin-workspace-new-menu {
      left: auto;
      right: 0;
      width: 280px;
      max-width: calc(100vw - 32px);
    }
    .admin-split-workspace {
      display: grid;
      grid-template-columns: minmax(0, var(--split-left, 50fr)) 12px minmax(0, var(--split-right, 50fr));
      grid-template-rows: minmax(0, 1fr);
      flex: 1 1 auto;
      min-width: 0;
      min-height: 0;
      overflow: hidden;
    }
    .admin-workspace-pane {
      display: flex;
      flex-direction: column;
      min-width: 0;
      min-height: 0;
      overflow: hidden;
      grid-row: 1;
    }
    .admin-workspace-pane[data-slot="left"] { grid-column: 1; }
    .admin-workspace-pane[data-slot="right"] { grid-column: 3; }
    .admin-workspace-pane[data-slot="hidden"] { display: none; }
    .admin-workspace-pane > iframe { border: 0; width: 100%; flex: 1; min-height: 0; background: #fff; }
    .admin-split-pane-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
      flex: 0 0 auto;
      padding: 0 4px 8px;
      border-bottom: 1px solid #e7e5e4;
      margin-bottom: 8px;
      color: #c2410c;
      font-size: 20px;
    }
    .admin-split-pane-bar select {
      width: 100%;
      min-width: 0;
      height: 38px;
      padding: 0 30px 0 8px;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      color: #44403c;
      background: #fff;
      font: inherit;
      font-size: 16px;
      font-weight: 900;
      line-height: 1.4;
      letter-spacing: 0;
    }
    .admin-split-divider { grid-column: 2; grid-row: 1; cursor: col-resize; touch-action: none; position: relative; }
    .admin-split-divider::before { content: ''; position: absolute; top: 0; bottom: 0; left: 5px; width: 2px; background: #e7e5e4; }
    .admin-split-divider:hover::before, .admin-split-divider:focus-visible::before { background: #f97316; }
    body.admin-workspace-active #adminShell > main {
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    body.admin-workspace-has-tabs .admin-workspace-header {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 16px;
      margin-bottom: 10px;
      border-bottom: 1px solid #d6d3d1;
      padding-bottom: 8px;
      min-width: 0;
      flex: 0 0 auto;
    }
    body.admin-workspace-has-tabs .admin-workspace-header > .admin-workspace-tabbar {
      flex: 1 1 180px;
      max-width: 100%;
      border: 0;
      padding: 0;
    }
    body.admin-workspace-has-tabs #adminShell .admin-workspace-header > .main-title {
      flex: 0 1 auto;
      min-width: 0;
      max-width: 100%;
      margin-bottom: 0;
    }
    body.admin-workspace-has-tabs #adminShell .admin-workspace-header > .main-title > .main-title-heading { display: none; }
    body.admin-workspace-active .admin-workspace-pane > .layout {
      display: block;
      flex: 1;
      min-height: 0;
      overflow: auto;
      overscroll-behavior: contain;
    }
    .admin-split-workspace[data-split="false"] > .admin-split-divider,
    .admin-split-workspace[data-focus="left"] > .admin-split-divider,
    .admin-split-workspace[data-focus="right"] > .admin-split-divider,
    .admin-split-workspace[data-focus="left"] > [data-slot="right"],
    .admin-split-workspace[data-focus="right"] > [data-slot="left"] { display: none; }
    .admin-split-workspace[data-split="false"] > [data-slot="left"],
    .admin-split-workspace[data-focus="left"] > [data-slot="left"],
    .admin-split-workspace[data-focus="right"] > [data-slot="right"] { grid-column: 1 / -1; }
    body.admin-split-resizing { cursor: col-resize; user-select: none; }
    body.admin-split-resizing iframe { pointer-events: none; }
    body.admin-split-child #adminShell { grid-template-columns: minmax(0, 1fr) !important; padding: 0 !important; gap: 0; height: 100vh; }
    body.admin-split-child #adminShell > header { display: none !important; }
    body.admin-split-child #adminShell > main {
      height: 100vh !important;
      max-height: 100vh !important;
      min-height: 0;
      padding: 6px !important;
      border: 0;
      box-shadow: none;
    }
    body.admin-split-child .main-title-heading,
    body.admin-split-child #tabletSidebarToggle,
    body.admin-split-child #adminSplitToggle,
    body.admin-split-child #boardRealtimeStatus,
    body.admin-split-child #boardSecurityStatus,
    body.admin-split-child #adminAccount,
    body.admin-split-child #adminLogout { display: none !important; }
    body.admin-split-child .main-title > .toolbar { flex-basis: auto; justify-content: flex-start; }
    body.admin-split-child #adminShell .main-title > .toolbar { flex-wrap: wrap; min-width: 0; }
    body.admin-split-child #adminShell .main-title > .toolbar > button { flex: 0 0 auto; white-space: nowrap; }
    body.admin-split-child .main-title .toolbar button { min-height: 36px; font-family: inherit; padding: 6px 10px; }
    .admin-workspace-tab button:focus-visible,
    .admin-split-icon-button:focus-visible,
    .admin-split-divider:focus-visible { outline: 2px solid #f97316; outline-offset: 2px; }

    body.admin-workspace-has-tabs #adminShell .admin-workspace-header > .main-title > .toolbar {
      flex-wrap: wrap;
      justify-content: flex-end;
      min-width: 0;
      max-width: 100%;
      flex-basis: auto;
      gap: 8px;
    }
    body.admin-workspace-active #adminShell .admin-workspace-header > .main-title > .toolbar > * { flex-shrink: 0; }
    body.admin-workspace-frame-active #adminShell .admin-workspace-header > .main-title #adminBackAction,
    body.admin-workspace-frame-active #adminShell .admin-workspace-header > .main-title #adminUndoAction,
    body.admin-workspace-frame-active #adminShell .admin-workspace-header > .main-title #adminVoiceSchedule,
    body.admin-workspace-frame-active #adminShell .admin-workspace-header > .main-title #refresh,
    body.admin-workspace-frame-active #adminShell .admin-workspace-header > .main-title #boardSecurityStatus { display: none; }
    body.admin-split-child .operation-report-wrap { width: 100%; min-width: 0; }
    @media (max-width: 700px) {
      body.admin-workspace-active #adminShell { grid-template-columns: minmax(0, 1fr) !important; }
      body.admin-workspace-active #adminShell > header,
      body.admin-workspace-active #tabletSidebarToggle,
      body.admin-workspace-active #boardRealtimeStatus .board-realtime-status-detail { display: none !important; }
      body.admin-workspace-active #adminShell > main { padding: 8px !important; }
      body.admin-workspace-active #adminShell .admin-workspace-header > .main-title > .toolbar { justify-content: flex-start; gap: 6px; }
      body.admin-workspace-active #adminShell .admin-workspace-header > .main-title > .toolbar button { min-height: 36px; padding: 6px 10px; }
      body.admin-split-child .operation-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--ink);
      font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      -webkit-font-smoothing: antialiased;
      overflow: hidden;
    }


    .hidden {
      display: none !important;
    }

    .auth-view {
      height: 100vh;
      overflow: auto;
      display: grid;
      place-items: start center;
      padding: 72px 16px 32px;
    }

    .auth-login-stack {
      width: min(100%, 560px);
      display: grid;
      justify-items: center;
      gap: 16px;
    }

    .auth-company-brand {
      width: 100%;
      margin: 0;
      padding: 10px 0;
      border-top: 1px solid #e7ddd5;
      border-bottom: 1px solid #e7ddd5;
      display: grid;
      grid-template-columns: 36px minmax(0, 1fr) 36px;
      align-items: center;
      gap: 8px;
      color: #57534e;
      font-size: 15px;
      line-height: 1.45;
      font-weight: 900;
      text-align: center;
    }

    .auth-company-brand::after {
      content: "";
      width: 36px;
      height: 1px;
    }

    .auth-company-brand img {
      display: block;
      width: 36px;
      height: 36px;
      object-fit: contain;
      mix-blend-mode: multiply;
    }

    .auth-company-brand span {
      min-width: 0;
      white-space: nowrap;
    }

    @media (max-width: 480px) {
      .auth-view { padding: 24px 12px 28px; }
      .auth-company-brand {
        grid-template-columns: 24px minmax(0, 1fr) 24px;
        gap: 3px;
        font-size: 13px;
      }
      .auth-company-brand::after { width: 24px; }
      .auth-company-brand img { width: 24px; height: 24px; }
    }

    .auth-card {
      width: min(100%, 420px);
      position: relative;
      overflow: hidden;
      border: 4px solid var(--border);
      border-radius: 40px;
      background: #fff;
      padding: 36px 28px;
      text-align: center;
      box-shadow: 0 15px 30px -10px rgba(237, 125, 49, 0.1);
      animation: auth-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .auth-card::after {
      content: "";
      position: absolute;
      top: -56px;
      right: -56px;
      width: 160px;
      height: 160px;
      border-radius: 50%;
      background: var(--orange);
      opacity: 0.08;
      pointer-events: none;
    }

    .auth-icon {
      width: 80px;
      height: 80px;
      margin: 0 auto 18px;
      border-radius: 30px;
      display: grid;
      place-items: center;
      background: var(--orange-soft);
      color: var(--orange);
      font-size: 40px;
      box-shadow: inset 0 2px 12px rgba(249, 115, 22, 0.08);
      animation: sun-shine 5s ease-in-out infinite;
    }

    .auth-title {
      margin: 0 0 8px;
      color: var(--stone);
      font-size: 26px;
      font-weight: 900;
      line-height: 1.15;
    }

    .auth-sub {
      margin: 0 0 26px;
      color: var(--muted);
      font-size: 14px;
      font-weight: 900;
      line-height: 1.55;
    }

    .auth-kicker {
      display: block;
      margin-bottom: 14px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .google-button-wrap {
      display: grid;
      place-items: center;
      min-height: 44px;
    }

    .auth-message {
      margin-top: 18px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
      line-height: 1.5;
    }

    .auth-message.error {
      color: var(--danger);
    }

    .support-login-divider {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 22px 0 16px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
    }

    .support-login-divider::before,
    .support-login-divider::after {
      content: "";
      height: 1px;
      flex: 1;
      background: var(--border);
    }

    .support-login-form {
      display: grid;
      gap: 10px;
      text-align: left;
    }

    .support-login-form label {
      display: grid;
      gap: 6px;
      color: var(--stone);
      font-size: 12px;
      font-weight: 900;
    }

    .support-login-form input {
      width: 100%;
      border: 2px solid var(--border);
      border-radius: 14px;
      padding: 11px 12px;
      font: inherit;
      font-weight: 800;
      color: var(--stone);
      background: #fff;
    }

    .support-login-form button {
      border: 0;
      border-radius: 16px;
      min-height: 44px;
      margin-top: 2px;
      background: #6b5b45;
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .support-login-form button:hover {
      background: #5a4a37;
    }

    .support-login-remember {
      display: flex !important;
      grid-template-columns: none !important;
      align-items: center;
      gap: 8px;
      color: var(--muted) !important;
      font-size: 12px !important;
      font-weight: 900;
    }

    .support-login-remember input {
      width: 16px;
      height: 16px;
      padding: 0;
      accent-color: #6b5b45;
    }

    .auth-retry {
      border: 0;
      border-radius: 16px;
      width: 100%;
      min-height: 46px;
      margin-top: 8px;
      background: var(--stone);
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .admin-account {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      border-radius: 999px;
      padding: 7px 12px;
      background: #fff7ed;
      color: #9a3412;
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }

    @keyframes auth-enter {
      from { opacity: 0; transform: translateY(-18px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .loading-view {
      position: fixed;
      right: 24px;
      bottom: 24px;
      z-index: 12000;
      display: flex;
      align-items: flex-start;
      max-width: min(460px, calc(100vw - 32px));
      pointer-events: none;
      transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    }

    .loading-view.hidden {
      opacity: 0;
      transform: translateY(10px);
      visibility: hidden;
      pointer-events: none;
    }

    .loading-card {
      width: 100%;
      display: flex;
      align-items: flex-start;
      gap: 12px;
      border-radius: 18px;
      background: rgba(28, 25, 23, 0.96);
      color: #fff;
      padding: 14px 16px;
      box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
      text-align: left;
      pointer-events: auto;
    }

    .loading-icon {
      width: 18px;
      height: 18px;
      margin-top: 2px;
      flex: 0 0 auto;
      border-radius: 999px;
      display: grid;
      place-items: center;
      color: #fb923c;
      font-size: 18px;
    }

    .loading-icon i {
      animation: loading-spin 1s linear infinite;
    }

    .loading-brand-logo,
    .loading-boot-spinner,
    .loading-title-boot {
      display: none;
    }

    .loading-title {
      margin: 0;
      color: #fff;
      font-size: 14px;
      font-weight: 900;
      line-height: 1.4;
    }

    .loading-text {
      margin: 3px 0 0;
      color: rgba(255, 255, 255, 0.72);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.4;
      letter-spacing: 0;
      word-break: break-word;
    }

    body.initial-loading .loading-view {
      inset: 0;
      right: auto;
      bottom: auto;
      max-width: none;
      width: 100%;
      height: 100%;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: #fff9f2;
      pointer-events: auto;
    }

    body.initial-loading #adminShell {
      visibility: hidden;
    }

    body.initial-loading .loading-view.hidden {
      pointer-events: none;
    }

    body.schedule-editor-open .loading-view {
      display: none !important;
      opacity: 0 !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }

    body.initial-loading .loading-card {
      width: min(360px, calc(100vw - 32px));
      min-height: 0;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
      border: 0;
      border-radius: 0;
      background: transparent;
      color: var(--stone);
      padding: 0;
      text-align: center;
      box-shadow: none;
    }

    body.initial-loading .loading-icon {
      display: none;
    }

    body.initial-loading .loading-brand-logo {
      display: block;
      width: 64px;
      height: 64px;
      object-fit: contain;
    }

    body.initial-loading .loading-boot-spinner {
      display: block;
      width: 34px;
      height: 34px;
      flex: 0 0 auto;
      border: 4px solid #fed7aa;
      border-top-color: #f97316;
      border-radius: 999px;
      animation: loading-spin 0.75s linear infinite;
    }

    body.initial-loading .loading-title-regular {
      display: none;
    }

    body.initial-loading .loading-title-boot {
      display: block;
    }

    body.initial-loading .loading-title {
      color: var(--stone);
      font-size: 18px;
      line-height: 1.35;
    }

    body.initial-loading .loading-text {
      margin-top: 0;
      color: #a8a29e;
      font-size: 13px;
      font-weight: 800;
    }

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

    @keyframes sun-shine {
      0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
      50% { transform: scale(1.05) rotate(10deg); opacity: 0.8; }
    }

    .shell {
      width: min(1800px, 100%);
      height: 100vh;
      margin: 0 auto;
      padding: 24px;
      display: grid;
      grid-template-columns: 300px minmax(0, 1fr);
      gap: 24px;
      min-height: 0;
    }

    .q-card {
      background: white;
      border: 4px solid var(--border);
      border-top: 0;
      border-bottom: 0;
      border-radius: 0;
      box-shadow: 0 15px 30px -10px rgba(237, 125, 49, 0.1);
    }

    header {
      padding: 28px;
      align-self: start;
      max-height: calc(100vh - 48px);
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
    }

    h1 {
      margin: 0;
      font-size: 24px;
      line-height: 1.15;
      font-weight: 900;
      letter-spacing: 0;
      color: #1f2937;
    }

    .brand-lockup {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 10px;
      padding-top: 10px;
    }

    .app-company-brand-logo {
      width: 42px;
      height: 42px;
      object-fit: contain;
      flex: 0 0 auto;
      mix-blend-mode: multiply;
    }

    .app-company-brand-name {
      min-width: 0;
      color: #44403c;
      font-size: 12px;
      font-weight: 900;
      line-height: 1.45;
    }

    .app-company-brand-name span {
      display: block;
      white-space: nowrap;
    }

    .brand-icon {
      width: 46px;
      height: 46px;
      border-radius: 18px;
      display: grid;
      place-items: center;
      background: var(--orange);
      color: #fff;
      font-size: 26px;
      flex: 0 0 auto;
      box-shadow: 0 12px 22px -12px rgba(249, 115, 22, 0.75);
      animation: sun-shine 5s ease-in-out infinite;
    }

    .brand-en {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      line-height: 1.1;
    }

    .brand-sub {
      margin: 8px 0 24px;
      color: var(--muted);
      font-weight: 900;
      font-size: 13px;
    }

    nav {
      display: grid;
      gap: 8px;
    }

    .nav-section-label {
      margin: 14px 4px 2px;
      color: #9a3412;
      font-size: 11px;
      font-weight: 900;
      letter-spacing: 0.12em;
    }

    nav button,
    .toolbar button,
    form button {
      border: 2px solid transparent;
      border-radius: 20px;
      background: #fff;
      color: var(--muted);
      min-height: 46px;
      padding: 0 16px;
      font-weight: 900;
      cursor: pointer;
      transition: all 0.25s ease;
    }

    nav button {
      text-align: left;
      width: 100%;
      color: #57534e;
      font-size: 16px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    nav button i {
      font-size: 20px;
      flex: 0 0 auto;
    }

    nav button:hover,
    .toolbar button:hover,
    form button:hover {
      background: var(--orange-soft);
      color: var(--orange-dark);
    }

    nav button.active,
    form button.primary {
      border-color: var(--orange);
      background: var(--orange);
      color: #fff;
      box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
    }

    main {
      padding: 28px;
      min-width: 0;
      min-height: 0;
      max-height: calc(100vh - 48px);
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
    }

    .toolbar {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 12px;
      margin-bottom: 18px;
    }

    .toolbar .admin-back-action {
      min-height: 40px;
      display: inline-flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 0 14px;
      border: 1px solid #fed7aa;
      border-radius: 999px;
      background: #fff7ed;
      color: #c2410c;
      font: inherit;
      font-size: 12px;
      font-weight: 900;
      line-height: 1;
      white-space: nowrap;
      box-shadow: none;
    }

    .toolbar .admin-back-action i {
      width: 18px;
      height: 18px;
      display: inline-flex;
      flex: 0 0 18px;
      align-items: center;
      justify-content: center;
      place-items: center;
      font-size: 17px;
      line-height: 1;
    }

    .toolbar .admin-back-action i::before { display: block; line-height: 1; }

    .toolbar .admin-back-action span {
      display: inline-block;
      line-height: 1;
      white-space: nowrap;
    }

    .toolbar .admin-back-action:not(:disabled):hover {
      background: #ffedd5;
      color: #9a3412;
      filter: brightness(.98);
      transform: none;
    }

    .toolbar .admin-back-action:disabled {
      border-color: #f5f5f4;
      background: #fafaf9;
      color: #a8a29e;
      box-shadow: none;
      cursor: default;
      opacity: 1;
    }

    .toolbar .toolbar-sidebar-toggle {
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 0 14px;
      border: 1px solid #fed7aa;
      border-radius: 999px;
      background: #fff;
      color: #c2410c;
      font: inherit;
      font-size: 12px;
      font-weight: 900;
      line-height: 1;
      white-space: nowrap;
      box-shadow: none;
    }

    .toolbar .toolbar-sidebar-toggle i,
    .toolbar .toolbar-sidebar-toggle span {
      line-height: 1;
    }

    .toolbar .toolbar-sidebar-toggle:hover,
    body.sidebar-collapsed .toolbar .toolbar-sidebar-toggle,
    body.tablet-mode.tablet-sidebar-collapsed .toolbar .toolbar-sidebar-toggle {
      border-color: #fdba74;
      background: #fff7ed;
      color: #9a3412;
      transform: none;
    }

    .toolbar input {
      width: min(360px, 100%);
      min-height: 48px;
      border: 2px solid #f5f5f4;
      border-radius: 18px;
      padding: 0 16px;
      font: inherit;
      font-weight: 700;
      background: #fafaf9;
    }

    .layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 360px;
      gap: 18px;
      align-items: start;
      min-height: 0;
    }

    .panel {
      background: var(--panel);
      border: 2px solid #f5f5f4;
      border-radius: 30px;
      overflow: hidden;
    }

    .table-wrap {
      overflow: auto;
      max-height: calc(100vh - 176px);
    }

    .table-filter-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      padding: 14px;
      background: #fafaf9;
      border-bottom: 2px solid #f5f5f4;
      position: sticky;
      top: 0;
      z-index: 2;
    }

    .table-filter-bar label {
      min-width: 240px;
      margin: 0;
    }

    .record-table-keyword-search {
      flex: 0 1 520px;
      width: min(520px, 100%);
      max-width: 520px;
      min-width: min(360px, 100%) !important;
    }

    .table-filter-bar.client-record-filter-bar {
      align-items: flex-end;
      overflow: visible;
    }

    th.record-table-filter-cell:focus-within {
      z-index: 3;
    }

    .record-table-keyword-search input {
      height: 40px;
      min-height: 40px;
      border-radius: 12px;
      background: #fff;
    }

    .record-table-keyword-search .record-suggestion-list {
      position: fixed;
      inset: auto;
      z-index: 14001;
    }

    #clientRecordKeywordSearch,
    #clientRecordKeywordClear,
    #employeeRecordKeywordSearch,
    #employeeRecordKeywordClear {
      height: 40px;
      min-height: 40px;
      padding: 0 12px;
      white-space: nowrap;
      justify-content: center;
      flex: 0 0 auto;
    }

    #clientRecordKeywordSearch,
    #employeeRecordKeywordSearch {
      background: #374151;
      color: #fff;
    }

    #clientRecordKeywordClear,
    #employeeRecordKeywordClear {
      border: 1px solid #d6d3d1;
      background: #fff;
      color: #57534e;
    }

    .client-record-search-count {
      display: inline-flex;
      align-items: center;
      min-height: 40px;
      padding: 0 10px;
      border-radius: 10px;
      background: #f5f5f4;
      color: #78716c;
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }

    .table-action-button {
      border: 0;
      border-radius: 12px;
      min-height: 38px;
      padding: 0 10px;
      background: #1f2937;
      color: #fff;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .client-record-select-cell {
      width: 48px;
      min-width: 48px;
      padding-inline: 8px;
      text-align: center;
    }

    input[data-client-record-check] {
      display: inline-block;
      width: 18px;
      height: 18px;
      min-height: 18px;
      margin: 0;
      padding: 0;
      border-radius: 4px;
      vertical-align: middle;
      accent-color: var(--orange);
    }

    .support-organization-badge {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 4px 9px;
      border: 1px solid #e7d7b9;
      border-radius: 6px;
      background: #faf4e8;
      color: #745f3f;
      font-weight: 700;
      line-height: 1.35;
      white-space: nowrap;
    }

    #newRecordModal,
    #newRecordFromPanel {
      background: var(--orange);
      color: #fff;
    }

    #newRecordModal:hover,
    #newRecordFromPanel:hover {
      background: var(--orange-dark);
      color: #fff;
    }

    #newRecordModal,
    #normalizeClientAddressesFromRegistry,
    #batchSetClientLocationRadius {
      height: 40px;
      min-height: 40px;
      padding: 0 12px;
      line-height: 1;
      white-space: nowrap;
      justify-content: center;
      flex: 0 0 auto;
    }

    .record-modal-hint {
      display: inline-flex;
      align-items: center;
      height: 40px;
      min-height: 40px;
      color: #78716c;
      font-size: 13px;
      font-weight: 900;
      line-height: 1.35;
      white-space: nowrap;
    }

    .client-record-filter-bar .table-action-button,
    .client-record-filter-bar .client-record-search-count {
      height: 40px;
      min-height: 40px;
      box-sizing: border-box;
    }

    .service-records-wrap {
      display: grid;
      gap: 14px;
      padding: 14px;
      min-width: 1280px;
    }

    .client-list-page {
      display: grid;
      gap: 12px;
      min-width: 1480px;
      text-align: left;
    }

    .client-month-dashboard {
      display: grid;
      gap: 14px;
      padding: 16px;
      border: 1px solid #e7e5e4;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 8px 24px rgba(28, 25, 23, 0.06);
    }

    .client-month-dashboard-head,
    .client-month-dashboard-head > div,
    .client-month-controls {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .client-month-dashboard-head {
      justify-content: space-between;
      flex-wrap: wrap;
    }

    .client-month-dashboard-head strong {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 18px;
      color: #1c1917;
    }

    .client-month-dashboard-head span {
      font-size: 14px;
      font-weight: 900;
      color: #78716c;
    }

    .client-month-controls input,
    .client-month-controls button {
      min-height: 38px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      color: #292524;
      font: inherit;
      font-weight: 900;
    }

    .client-month-controls input {
      padding: 0 10px;
    }

    .client-month-controls button {
      padding: 0 12px;
      cursor: pointer;
    }

    #clientMonthExport {
      background: #0f766e;
      border-color: #0f766e;
      color: #fff;
    }

    #clientMonthManagementToggle {
      background: #fff7ed;
      border-color: #fdba74;
      color: #9a3412;
    }

    .client-month-metrics {
      display: grid;
      grid-template-columns: repeat(4, minmax(170px, 1fr));
      gap: 10px;
    }

    .client-month-metric {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 76px;
      padding: 12px;
      border: 1px solid #e7e5e4;
      border-left: 4px solid #78716c;
      border-radius: 8px;
      background: #fafaf9;
    }

    .client-month-metric > i {
      font-size: 24px;
      color: #57534e;
    }

    .client-month-metric div {
      display: grid;
      gap: 3px;
    }

    .client-month-metric span {
      font-size: 12px;
      font-weight: 800;
      color: #78716c;
    }

    .client-month-metric strong {
      font-size: 22px;
      color: #1c1917;
    }

    .client-month-metric.green { border-left-color: #16a34a; }
    .client-month-metric.blue { border-left-color: #2563eb; }
    .client-month-metric.orange { border-left-color: #f97316; }
    .client-month-metric.amber { border-left-color: #d97706; }
    .client-month-metric.red { border-left-color: #dc2626; }

    .client-month-report-sections {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: stretch;
      width: 100%;
      max-width: 100%;
      gap: 10px;
      overflow: visible;
      position: relative;
      z-index: 40;
    }

    .client-month-report-block {
      display: flex;
      flex-direction: column;
      min-width: 0;
      border: 1px solid #e7e5e4;
      border-radius: 8px;
      overflow: hidden;
      background: #fff;
    }

    .client-month-report-block.identity-claims {
      grid-column: 1;
      grid-row: 2;
    }

    .client-month-report-block.month-dynamics {
      grid-column: 2;
      grid-row: 1;
    }

    .client-month-report-block.area-distribution {
      grid-column: 2;
      grid-row: 2;
    }

    .client-month-report-title {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      align-content: center;
      gap: 2px;
      min-height: 52px;
      height: auto;
      padding: 6px 9px;
      border-bottom: 1px solid #e7e5e4;
      background: #fafaf9;
      color: #292524;
      font-size: 13px;
      font-weight: 900;
    }

    .client-month-report-title small {
      max-width: none;
      color: #78716c;
      font-size: 10px;
      line-height: 1.25;
      font-weight: 800;
      text-align: left;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .client-month-report-table {
      width: 100%;
      max-width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
      font-size: 12px;
    }

    .client-month-report-table th,
    .client-month-report-table td {
      height: 34px;
      border-right: 1px solid #e7e5e4;
      border-bottom: 1px solid #e7e5e4;
      padding: 5px 6px;
      text-align: center;
      vertical-align: middle;
      color: #292524;
      font-weight: 850;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: normal;
    }

    .client-month-report-table th {
      white-space: normal;
    }

    .client-month-report-table th:last-child,
    .client-month-report-table td:last-child {
      border-right: 0;
    }

    .client-month-report-table tbody tr:last-child td {
      border-bottom: 0;
    }

    .client-month-report-table th {
      background: #fff7ed;
      color: #9a3412;
      font-size: 12px;
      font-weight: 900;
    }

    .identity-claims .client-month-report-table {
      table-layout: fixed;
    }

    .identity-claims .client-month-report-table th:first-child,
    .identity-claims .client-month-report-table td:first-child {
      width: 40%;
    }

    .client-month-report-table td:first-child {
      text-align: center;
      font-weight: 900;
    }

    .client-month-report-table .summary-row td {
      background: #fafaf9;
      font-weight: 950;
    }

    .client-month-report-table .tone-home td:first-child {
      border-left: 4px solid #f97316;
      background: #fff7ed;
      color: #9a3412;
    }

    .client-month-report-table .tone-respite td:first-child {
      border-left: 4px solid #2563eb;
      background: #eff6ff;
      color: #1d4ed8;
    }

    .client-month-report-table .tone-short td:first-child {
      border-left: 4px solid #0f766e;
      background: #f0fdfa;
      color: #0f766e;
    }

    .client-month-report-table .tone-general td:first-child {
      border-left: 4px solid #64748b;
      background: #f8fafc;
      color: #334155;
    }

    .client-month-report-table .tone-middle td:first-child {
      border-left: 4px solid #d97706;
      background: #fffbeb;
      color: #92400e;
    }

    .client-month-report-table .tone-low td:first-child {
      border-left: 4px solid #16a34a;
      background: #f0fdf4;
      color: #166534;
    }

    .client-month-report-table .tone-claim td:first-child {
      border-left: 4px solid #7c3aed;
      background: #f5f3ff;
      color: #6d28d9;
    }

    .client-month-report-foot {
      min-height: 34px;
      margin-top: auto;
      display: flex;
      align-items: center;
      padding: 0 12px;
      border-top: 1px solid #e7e5e4;
      background: #fafaf9;
      color: #78716c;
      font-size: 11px;
      font-weight: 850;
    }

    .client-month-list-details {
      border-top: 1px solid #e7e5e4;
      background: #fafaf9;
    }

    .client-month-list-details summary {
      min-height: 34px;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0 12px;
      color: #44403c;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
      list-style: none;
    }

    .client-month-list-details summary::-webkit-details-marker {
      display: none;
    }

    .client-month-list-details summary::before {
      content: "＋";
      color: #78716c;
      font-size: 16px;
    }

    .client-month-list-details[open] summary::before {
      content: "−";
    }

    .client-month-list-body {
      display: grid;
      gap: 0;
      padding: 0 12px 10px;
    }

    .client-month-list-row {
      display: grid;
      grid-template-columns: minmax(100px, 1fr) auto;
      gap: 10px;
      padding: 8px 0;
      border-top: 1px solid #f0eeeb;
      color: #44403c;
      font-size: 12px;
      font-weight: 800;
    }

    .client-month-list-row b {
      color: #1c1917;
    }

    .client-month-detail {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(360px, 0.7fr);
      gap: 14px;
    }

    .client-month-hours,
    .client-month-ranking {
      border: 1px solid #e7e5e4;
      border-radius: 8px;
      padding: 14px;
      background: #fafaf9;
    }

    .client-month-hours {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }

    .client-month-hours > div:not(.client-completion-track) {
      display: grid;
      gap: 4px;
    }

    .client-month-hours span,
    .client-month-hours small {
      color: #78716c;
      font-weight: 800;
    }

    .client-month-hours strong {
      font-size: 20px;
      color: #1c1917;
    }

    .client-completion-track {
      grid-column: 1 / -1;
      height: 8px;
      overflow: hidden;
      border-radius: 4px;
      background: #e7e5e4;
    }

    .client-completion-track span {
      display: block;
      height: 100%;
      background: #16a34a;
    }

    .client-month-ranking {
      display: grid;
      gap: 7px;
    }

    .client-month-ranking-title {
      font-size: 13px;
      font-weight: 900;
      color: #44403c;
    }

    .client-rank-row {
      display: grid;
      grid-template-columns: 24px minmax(100px, 1fr) auto;
      align-items: center;
      gap: 8px;
      min-height: 30px;
      border-bottom: 1px solid #e7e5e4;
    }

    .client-rank-row > span {
      display: inline-grid;
      place-items: center;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: #ffedd5;
      color: #c2410c;
      font-size: 11px;
      font-weight: 900;
    }

    .client-rank-row small,
    .client-month-empty {
      color: #78716c;
      font-weight: 800;
    }

    .client-list-title,
    .client-list-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .client-list-title strong {
      font-size: 18px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .client-list-pagination {
      margin-left: auto;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 40px;
    }

    .client-list-pagination button {
      width: 40px;
      height: 38px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      color: #78716c;
      font: inherit;
      font-size: 16px;
      box-shadow: none;
      cursor: pointer;
    }

    .client-list-pagination button:not(:disabled):hover {
      border-color: #e3ad78;
      background: #fff7ed;
      color: #b45309;
    }

    .client-list-pagination button:disabled {
      border-color: #e7e5e4;
      background: #f5f5f4;
      color: #c7c2bd;
      cursor: default;
    }

    .client-list-pagination-status {
      min-height: 38px;
      padding: 0 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #e7e5e4;
      border-radius: 8px;
      background: #fff;
      color: #57534e;
      font-size: 13px;
      font-weight: 800;
      white-space: nowrap;
    }

    .client-list-pagination select {
      width: auto;
      min-width: 92px;
      height: 38px;
      padding: 0 30px 0 10px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 800;
    }

    .client-list-filters {
      display: grid;
      grid-template-columns: repeat(7, minmax(150px, 1fr));
      gap: 10px;
    }

    .client-list-filters label {
      display: grid;
      grid-template-rows: 18px 40px;
      gap: 5px;
      align-content: start;
      min-width: 0;
      margin: 0;
      font-size: 12px;
      line-height: 18px;
      color: #57534e;
    }

    .client-list-filters input,
    .client-list-filters select {
      display: block;
      width: 100%;
      height: 40px;
      min-height: 40px;
      max-height: 40px;
      box-sizing: border-box;
      border: 1px solid #e7e5e4;
      border-radius: 10px;
      padding: 0 10px;
      margin: 0;
      font: inherit;
      font-size: 13px;
      line-height: normal;
      font-weight: 800;
      background: #fff;
    }

    .client-list-keyword-shell {
      position: relative;
      display: block;
      width: 100%;
      min-width: 0;
      height: 40px;
    }

    .client-list-keyword-suggestions {
      position: fixed;
      z-index: 20001;
      display: grid;
      gap: 4px;
      max-height: 300px;
      overflow-y: auto;
      padding: 6px;
      border: 1px solid #d6d3d1;
      border-radius: 10px;
      background: #fff;
      box-shadow: 0 16px 34px rgba(41, 37, 36, .18);
      -webkit-overflow-scrolling: touch;
    }

    .client-list-keyword-suggestions[hidden] {
      display: none;
    }

    .client-list-keyword-suggestion {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      width: 100%;
      min-height: 42px;
      padding: 7px 9px;
      border: 0;
      border-radius: 7px;
      background: #fff;
      color: #44403c;
      font: inherit;
      text-align: left;
      cursor: pointer;
    }

    .client-list-keyword-suggestion:hover,
    .client-list-keyword-suggestion:focus-visible,
    .client-list-keyword-suggestion.active {
      background: #f5f3ef;
      color: #292524;
      outline: none;
    }

    .client-list-keyword-suggestion strong {
      overflow: hidden;
      font-size: 13px;
      font-weight: 900;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .client-list-keyword-suggestion small,
    .client-list-keyword-suggestion-empty {
      color: #78716c;
      font-size: 11px;
      font-weight: 700;
    }

    .client-list-keyword-suggestion-empty {
      padding: 10px;
      text-align: center;
    }

    .client-list-filter-header {
      overflow: visible !important;
    }

    .client-list-filter-header:focus-within,
    .client-tablet-overview:focus-within {
      position: sticky;
      z-index: 20000 !important;
    }

    .client-list-filters input[type="date"] {
      min-width: 0;
      padding: 0 39px 0 9px;
      line-height: 38px;
      font-size: 12px;
      font-variant-numeric: tabular-nums;
      text-align: left;
      overflow: hidden;
    }

    .client-list-date-shell {
      position: relative;
      display: block;
      width: 100%;
      height: 40px;
      min-width: 0;
    }

    .client-list-date-button {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      width: 100%;
      height: 40px;
      padding: 0 9px;
      border: 1px solid #e7e5e4;
      border-radius: 10px;
      background: #fff;
      color: #292524;
      font: inherit;
      font-size: 12px;
      font-weight: 800;
      text-align: left;
      cursor: pointer;
    }

    .client-list-date-button:hover,
    .client-list-date-button:focus-visible {
      border-color: #fb923c;
      outline: 3px solid #ffedd5;
    }

    .client-list-date-button .client-list-date-icon {
      flex: 0 0 auto;
      color: #57534e;
      font-size: 25px;
      line-height: 1;
    }

    .system-date-shell {
      position: relative;
      display: block;
      width: 100%;
      min-width: 0;
      height: var(--system-date-height, 44px);
    }

    .system-date-shell > input[type="date"] {
      position: absolute !important;
      width: 1px !important;
      height: 1px !important;
      min-width: 1px !important;
      min-height: 1px !important;
      padding: 0 !important;
      border: 0 !important;
      opacity: 0;
      pointer-events: none;
    }

    .system-date-button {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      width: 100%;
      min-width: 0;
      height: 100%;
      min-height: 100%;
      padding: 0 10px;
      border: 1px solid #d6d3d1;
      border-radius: 12px;
      background: #fff;
      color: #292524;
      font: inherit;
      font-size: 13px;
      font-weight: 800;
      text-align: left;
      cursor: pointer;
    }

    .system-date-button:hover,
    .system-date-button:focus-visible {
      border-color: #fb923c;
      outline: 3px solid #ffedd5;
    }

    .system-date-button span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .system-date-button i {
      flex: 0 0 auto;
      color: #57534e;
      font-size: 23px;
      line-height: 1;
    }

    .client-date-picker-backdrop,
    .client-contract-signer-backdrop {
      position: fixed;
      z-index: 10050;
      inset: 0;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(28, 25, 23, 0.38);
      backdrop-filter: blur(3px);
    }

    .client-date-picker-backdrop.schedule-date-picker-backdrop {
      z-index: 16050;
    }

    body.visit-planning-page-mode.appointment-editor-open .client-date-picker-backdrop {
      z-index: 16050;
    }

    .client-date-picker {
      width: min(460px, calc(100vw - 28px));
      max-height: calc(100vh - 28px);
      overflow-y: auto;
      padding: 22px;
      border: 1px solid #fed7aa;
      border-radius: 18px;
      background: #fff;
      box-shadow: 0 24px 70px rgba(28, 25, 23, 0.24);
    }

    .client-dialog-titlebar {
      min-height: 42px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .client-dialog-titlebar strong,
    .client-dialog-titlebar h3 {
      min-width: 0;
      margin: 0;
      color: #292524;
      font-size: 18px;
      font-weight: 900;
      line-height: 1.25;
    }

    .client-date-picker-header {
      display: grid;
      grid-template-columns: 46px 1fr 46px;
      align-items: center;
      gap: 8px;
      margin-bottom: 12px;
    }

    .client-date-picker-header strong {
      text-align: center;
      font-size: 20px;
      color: #292524;
    }

    .client-date-picker-controls {
      display: grid;
      grid-template-columns: minmax(0, 1.75fr) minmax(0, .75fr);
      gap: 8px;
      min-width: 0;
    }

    .client-date-picker-controls select {
      width: 100%;
      height: 44px;
      border: 2px solid #fed7aa;
      border-radius: 12px;
      background: #fff7ed;
      color: #292524;
      font: inherit;
      font-size: 16px;
      font-weight: 900;
      text-align: center;
      text-align-last: center;
      outline: none;
      cursor: pointer;
    }

    .client-date-picker-controls select:focus {
      border-color: #f97316;
      box-shadow: 0 0 0 3px #ffedd5;
    }

    .client-date-picker-header button,
    .client-date-picker-actions button {
      display: inline-grid;
      place-items: center;
      min-width: 44px;
      height: 44px;
      border: 1px solid #e7e5e4;
      border-radius: 10px;
      background: #fff;
      color: #44403c;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
    }

    .client-date-picker-header button {
      padding: 0;
      font-size: 23px;
    }

    .client-date-picker-weekdays,
    .client-date-picker-days {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 5px;
    }

    .client-date-picker-weekdays span {
      display: grid;
      place-items: center;
      height: 28px;
      color: #78716c;
      font-size: 13px;
      font-weight: 900;
    }

    .client-date-picker-day {
      display: grid;
      place-items: center;
      aspect-ratio: 1;
      min-width: 0;
      border: 0;
      border-radius: 10px;
      background: #fafaf9;
      color: #292524;
      font: inherit;
      font-size: 16px;
      font-weight: 900;
      cursor: pointer;
    }

    .client-date-picker-day:hover {
      background: #ffedd5;
      color: #c2410c;
    }

    .client-date-picker-day.today {
      box-shadow: inset 0 0 0 2px #fb923c;
    }

    .client-date-picker-day.selected {
      background: #f97316;
      color: #fff;
      box-shadow: none;
    }

    .client-date-picker-day.empty {
      visibility: hidden;
      pointer-events: none;
    }

    .client-date-picker-actions {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      margin-top: 14px;
    }

    .client-date-picker-actions button {
      flex: 1;
      padding: 0 12px;
    }

    .client-date-picker-actions .primary {
      border-color: #f97316;
      background: #fff7ed;
      color: #c2410c;
    }

    .client-contract-signer {
      width: min(430px, calc(100vw - 28px));
      padding: 18px;
      border: 1px solid #fed7aa;
      border-radius: 18px;
      background: #fff;
      box-shadow: 0 24px 70px rgba(28, 25, 23, 0.24);
      display: grid;
      gap: 12px;
    }

    .client-contract-signer h3 {
      margin: 0;
      color: #292524;
      font-size: 20px;
      line-height: 1.25;
    }

    .client-contract-signer p {
      margin: 0;
      color: #78716c;
      font-size: 14px;
      font-weight: 800;
      line-height: 1.55;
    }

    .client-contract-date {
      display: grid;
      gap: 6px;
      color: #44403c;
      font-size: 13px;
      font-weight: 900;
    }

    .client-contract-date input {
      width: 100%;
      min-height: 42px;
    }

    .client-contract-review-notice {
      display: grid;
      gap: 5px;
      padding: 11px 12px;
      border: 1px solid #fdba74;
      border-radius: 10px;
      background: #fff7ed;
      color: #7c2d12;
      font-size: 13px;
      font-weight: 750;
      line-height: 1.55;
    }

    .client-contract-review-notice[hidden] {
      display: none;
    }

    .client-contract-review-notice strong {
      display: flex;
      align-items: center;
      gap: 6px;
      color: #c2410c;
      font-size: 13px;
      font-weight: 900;
    }

    .client-contract-review-notice span {
      display: block;
    }

    .client-contract-review-notice span:last-child {
      text-decoration: underline;
      text-underline-offset: 3px;
      text-decoration-thickness: 1px;
    }

    .client-contract-signer-options {
      display: grid;
      gap: 8px;
    }

    .client-contract-signer-options button,
    .client-contract-signer-actions button {
      min-height: 44px;
      border: 1px solid #e7e5e4;
      border-radius: 12px;
      background: #fff;
      color: #292524;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
    }

    .client-contract-signer-options button {
      text-align: left;
      padding: 10px 12px;
    }

    .client-contract-signer-options button.primary {
      border-color: #fbbf24;
      background: #fffbeb;
    }

    .client-contract-signer-options button:disabled {
      cursor: not-allowed;
      opacity: 0.58;
      background: #f5f5f4;
    }

    .client-contract-signer-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    .client-list-actions button {
      border: 0;
      border-radius: 12px;
      min-height: 38px;
      padding: 0 12px;
      font-weight: 900;
      cursor: pointer;
    }

    .client-list-actions .primary {
      background: var(--orange);
      color: #fff;
    }

    .client-list-actions .create {
      background: var(--orange);
      color: #fff;
    }

    .client-payment-batch {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 42px;
      padding: 4px;
      border: 1px solid #f3df9b;
      border-radius: 12px;
      background: #fffbea;
    }

    .client-payment-batch select,
    .client-payment-batch input {
      width: auto;
      height: 34px;
      min-height: 34px;
      margin: 0;
      border: 1px solid #e7d38d;
      border-radius: 9px;
      padding: 0 9px;
      background: #fff;
      color: #3f3a2d;
      font-size: 13px;
      font-weight: 850;
    }

    .client-payment-batch select {
      min-width: 138px;
    }

    .client-payment-batch input {
      width: 116px;
      min-width: 116px;
    }

    .client-payment-batch input:disabled {
      background: #f5f5f4;
      color: #a8a29e;
      cursor: not-allowed;
    }

    .client-payment-batch button {
      min-height: 34px;
      border: 1px solid #e4c55a;
      background: #f6e7a6;
      color: #59480e;
    }

    .client-status-pill {
      display: inline-flex;
      min-width: 72px;
      justify-content: center;
      border-radius: 999px;
      padding: 4px 8px;
      font-size: 12px;
      font-weight: 900;
      background: #dcfce7;
      color: #166534;
    }

    .client-status-pill.paused {
      background: #fef3c7;
      color: #92400e;
    }

    .client-status-pill.ended {
      background: #fee2e2;
      color: #991b1b;
    }

    td.wide-address {
      min-width: 220px;
      white-space: normal;
    }

    .client-list-check {
      width: 16px;
      height: 16px;
    }

    .client-list-name {
      color: #1f2937;
      font-weight: 900;
    }

    .client-care-contact {
      min-width: 190px;
      white-space: normal;
      line-height: 1.35;
    }

    .client-care-contact-line {
      display: block;
      margin: 1px 0;
      padding: 1px 4px;
      font-size: 12px;
      font-weight: 700;
    }

    @media (max-width: 1100px) {
      .client-month-metrics {
        grid-template-columns: repeat(2, minmax(170px, 1fr));
      }

      .client-month-detail {
        grid-template-columns: 1fr;
      }

      .client-month-report-sections {
        grid-template-columns: 1fr;
      }

      .client-month-report-block.identity-claims,
      .client-month-report-block.month-dynamics,
      .client-month-report-block.area-distribution {
        grid-column: auto;
        grid-row: auto;
      }

    }

    body.smart-scheduling-mode .layout {
      grid-template-columns: minmax(0, 1fr);
    }

    body.smart-scheduling-mode aside.panel {
      display: none;
    }

    body.smart-scheduling-mode .table-wrap {
      max-height: none;
      overflow: visible;
      border: 0;
      background: #fff;
      box-shadow: none;
    }

    body.smart-scheduling-mode table {
      min-width: 0;
      background: #fff;
    }

    body.smart-scheduling-mode .table-wrap td {
      padding: 0;
      border: 0;
      background: #fff;
      white-space: normal;
    }

    .smart-scheduling-page {
      display: grid;
      gap: 14px;
      width: 100%;
      min-width: 0;
      padding: 0;
      box-sizing: border-box;
      background: #fff;
      text-align: left;
    }

    .smart-scheduling-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 16px;
      border: 1px solid #fed7aa;
      border-radius: 12px;
      background: #fff7ed;
    }

    .smart-scheduling-head strong {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #9a3412;
      font-size: 18px;
    }

    .smart-scheduling-head span {
      color: #57534e;
      font-size: 13px;
      font-weight: 800;
    }

    .smart-scheduling-head > div > span {
      display: block;
      line-height: 1.55;
    }

    .smart-message-import {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: end;
      padding: 12px;
      border: 1px solid #bfdbfe;
      border-radius: 10px;
      background: #eff6ff;
    }

    .smart-message-import label {
      display: grid;
      gap: 6px;
      color: #1e3a8a;
      font-size: 13px;
      font-weight: 900;
    }

    .smart-message-import textarea {
      min-height: 112px;
      resize: vertical;
      border-color: #bfdbfe;
      background: #fff;
      line-height: 1.55;
    }

    .smart-message-import button {
      min-height: 42px;
      border-color: #2563eb;
      border-radius: 9px;
      background: #2563eb;
      color: #fff;
      box-shadow: none;
    }

    .smart-message-import button:hover {
      border-color: #1d4ed8;
      background: #1d4ed8;
      color: #fff;
    }

    .smart-message-result {
      grid-column: 1 / -1;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      color: #475569;
      font-size: 12px;
      font-weight: 800;
    }

    .smart-message-result span {
      padding: 4px 7px;
      border-radius: 7px;
      background: #fff;
    }

    .smart-workflow {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
      padding: 10px;
      border: 1px solid #d6d3d1;
      border-radius: 10px;
      background: #fafaf9;
    }

    .smart-workflow span {
      color: #57534e;
      font-size: 12px;
      font-weight: 800;
      line-height: 1.45;
    }

    .smart-workflow strong {
      color: #0f766e;
    }

    .smart-scheduling-form {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      padding: 14px;
      border: 1px solid #e7e5e4;
      border-radius: 12px;
      background: #fff;
    }

    .smart-scheduling-form label {
      min-width: 0;
      margin: 0;
    }

    .smart-scheduling-form .wide {
      grid-column: span 2;
    }

    .smart-scheduling-form input[readonly] {
      color: #0f766e;
      background: #f0fdfa;
    }

    .smart-weekdays,
    .smart-scheduling-options {
      grid-column: 1 / -1;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      padding: 10px;
      border: 1px solid #e7e5e4;
      border-radius: 10px;
      background: #fafaf9;
    }

    .smart-weekdays strong,
    .smart-scheduling-options strong {
      color: #44403c;
      font-size: 13px;
    }

    .smart-weekdays label,
    .smart-scheduling-options label {
      display: inline-flex;
      grid-template-columns: none;
      align-items: center;
      gap: 6px;
      min-height: 32px;
      padding: 5px 9px;
      border-radius: 8px;
      background: #fff;
      color: #44403c;
      cursor: pointer;
    }

    .smart-weekdays input,
    .smart-scheduling-options input,
    .smart-service-option input {
      width: 15px;
      min-height: 15px;
      height: 15px;
      margin: 0;
      padding: 0;
    }

    .smart-slot-preview {
      grid-column: 1 / -1;
      display: grid;
      gap: 9px;
      padding: 11px;
      border: 1px solid #99f6e4;
      border-radius: 10px;
      background: #f0fdfa;
    }

    .smart-slot-preview > strong {
      color: #115e59;
      font-size: 14px;
    }

    .smart-slot-preview-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
      gap: 9px;
    }

    .smart-slot-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 116px;
      gap: 8px 12px;
      align-items: center;
      padding: 11px;
      border: 1px solid #ccfbf1;
      border-radius: 9px;
      background: #fff;
    }

    .smart-slot-card strong {
      color: #134e4a;
      font-size: 14px;
    }

    .smart-slot-card input[type="time"] {
      width: 116px;
      min-height: 38px;
      height: 38px;
      margin: 0;
      padding: 7px 9px;
    }

    .smart-slot-card span {
      color: #292524;
      font-size: 14px;
      font-weight: 900;
    }

    .smart-slot-card small {
      color: #78716c;
      font-size: 12px;
      font-weight: 800;
      text-align: right;
    }

    .smart-scheduling-services {
      grid-column: 1 / -1;
      display: grid;
      gap: 9px;
      padding: 11px;
      border: 1px solid #e7e5e4;
      border-radius: 10px;
      background: #fafaf9;
    }

    .smart-scheduling-services > strong {
      color: #44403c;
      font-size: 13px;
    }

    .smart-service-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .smart-service-option {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr) auto 62px;
      align-items: center;
      gap: 7px;
      min-height: 48px;
      padding: 7px 9px;
      border: 1px solid #e7e5e4;
      border-radius: 8px;
      background: #fff;
      cursor: pointer;
    }

    .smart-service-option span {
      min-width: 0;
      color: #292524;
      font-size: 12px;
      font-weight: 900;
      line-height: 1.35;
    }

    .smart-service-option small {
      color: #0f766e;
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
    }

    .smart-service-option input[type="number"] {
      width: 62px;
      min-height: 32px;
      height: 32px;
      padding: 4px 6px;
      border-radius: 7px;
      text-align: center;
      font-size: 12px;
      font-weight: 900;
    }

    .smart-scheduling-actions {
      grid-column: 1 / -1;
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    .smart-scheduling-actions button,
    .smart-candidate-actions button {
      min-height: 38px;
      border: 0;
      border-radius: 10px;
      padding: 0 13px;
      font-weight: 900;
      cursor: pointer;
    }

    .smart-scheduling-actions .primary,
    .smart-candidate-actions .primary {
      border-color: #0f766e;
      background: #0f766e;
      color: #fff;
      box-shadow: none;
    }

    .smart-scheduling-actions .primary:hover,
    .smart-candidate-actions .primary:hover {
      border-color: #115e59;
      background: #115e59;
      color: #fff;
      box-shadow: none;
    }

    .smart-scheduling-actions .secondary,
    .smart-candidate-actions .secondary {
      background: #e7e5e4;
      color: #44403c;
    }

    .smart-analysis-summary {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
    }

    .smart-analysis-summary div {
      display: grid;
      gap: 4px;
      padding: 12px;
      border-radius: 10px;
      background: #f5f5f4;
    }

    .smart-analysis-summary span {
      color: #78716c;
      font-size: 12px;
      font-weight: 900;
    }

    .smart-analysis-summary strong {
      color: #1f2937;
      font-size: 18px;
    }

    .smart-result-section {
      display: grid;
      gap: 10px;
    }

    .smart-result-section h3 {
      margin: 0;
      color: #1f2937;
      font-size: 18px;
    }

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

    .smart-candidate {
      display: grid;
      gap: 11px;
      padding: 16px;
      border: 1px solid #a7f3d0;
      border-radius: 10px;
      background: #f0fdf4;
    }

    .smart-candidate.adjustable {
      border-color: #fed7aa;
      background: #fff7ed;
    }

    .smart-candidate-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .smart-candidate-head strong {
      color: #1f2937;
      font-size: 19px;
    }

    .smart-candidate-head small {
      color: #78716c;
      font-size: 13px;
      font-weight: 800;
      line-height: 1.5;
    }

    .smart-candidate-score {
      min-width: 62px;
      border-radius: 999px;
      padding: 5px 9px;
      background: #0f766e;
      color: #fff;
      text-align: center;
      font-size: 14px;
      font-weight: 900;
    }

    .smart-candidate.adjustable .smart-candidate-score {
      background: #ea580c;
    }

    .smart-candidate-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .smart-candidate-meta span {
      border-radius: 999px;
      padding: 5px 9px;
      background: rgba(255,255,255,.85);
      color: #57534e;
      font-size: 13px;
      font-weight: 800;
    }

    .smart-candidate-note {
      color: #292524;
      font-size: 15px;
      font-weight: 700;
      line-height: 1.65;
    }

    .smart-candidate-timeline {
      max-height: 150px;
      overflow: auto;
      padding: 8px 10px;
      border-left: 3px solid #a8a29e;
      background: rgba(255,255,255,.75);
      color: #44403c;
      font-size: 14px;
      line-height: 1.65;
      white-space: pre-line;
    }

    .smart-candidate-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
    }

    .smart-candidate-actions button {
      min-height: 42px;
      padding: 0 16px;
      font-size: 14px;
    }

    .smart-empty {
      padding: 18px;
      border: 1px dashed #d6d3d1;
      border-radius: 10px;
      color: #78716c;
      background: #fff;
      text-align: center;
      font-weight: 800;
    }

    @media (max-width: 1180px) {
      .smart-scheduling-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

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

      .smart-message-import {
        grid-template-columns: 1fr;
      }

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

      .smart-candidate-grid {
        grid-template-columns: 1fr;
      }
    }


    .service-record-title {
      display: grid;
      grid-template-columns: minmax(180px, 1fr) 320px minmax(180px, 1fr);
      grid-template-areas: "heading switch summary";
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 22px;
      background: #fff7ed;
      color: #1f2937;
      font-weight: 900;
    }

    .service-record-title-heading {
      grid-area: heading;
      min-width: 0;
      font-family: inherit;
      font-size: 16px;
      font-weight: 900;
      line-height: 1.45;
      letter-spacing: 0;
    }

    .service-record-title-summary {
      grid-area: summary;
      min-width: 0;
      text-align: right;
      font-family: inherit;
      font-size: 13px;
      font-weight: 800;
      line-height: 1.45;
      letter-spacing: 0;
    }

    .service-record-view-switch {
      grid-area: switch;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: center;
      gap: 4px;
      width: 320px;
      max-width: 100%;
      padding: 4px;
      border: 1px solid #e7e5e4;
      border-radius: 12px;
      background: #fff;
    }

    .service-record-view-switch button {
      width: 100%;
      min-height: 34px;
      padding: 0 12px;
      border: 0;
      border-radius: 8px;
      background: transparent;
      color: #57534e;
      font: inherit;
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
      cursor: pointer;
    }

    .service-record-view-switch button.active {
      background: #1f2937;
      color: #fff;
    }

    .paper-service-form-wrap {
      display: grid;
      gap: 12px;
    }

    .paper-service-form-summary {
      display: grid;
      grid-template-columns: repeat(4, minmax(150px, 1fr));
      gap: 10px;
    }

    .paper-service-form-summary > div {
      display: grid;
      gap: 4px;
      min-height: 76px;
      padding: 12px 14px;
      border: 1px solid #e7e5e4;
      border-radius: 10px;
      background: #fff;
    }

    .paper-service-form-summary span {
      color: #78716c;
      font-size: 12px;
      font-weight: 800;
    }

    .paper-service-form-summary strong {
      color: #1f2937;
      font-size: 20px;
      font-weight: 900;
    }

    .paper-service-form-table th,
    .paper-service-form-table td {
      vertical-align: middle;
      overflow-wrap: normal;
      word-break: normal;
      font-family: inherit;
      font-size: 13px;
      font-weight: 800;
      letter-spacing: 0;
    }

    .paper-service-form-wrap .monitor-panel h3 {
      font-family: inherit;
      font-size: 16px;
      font-weight: 900;
      line-height: 1.45;
      letter-spacing: 0;
    }

    .paper-service-form-wrap .monitor-panel-body,
    .paper-service-form-table-wrap {
      max-width: 100%;
      overflow-x: auto;
      overflow-y: visible;
      overscroll-behavior-x: contain;
      -webkit-overflow-scrolling: touch;
    }

    .paper-service-form-table {
      width: 100%;
      min-width: 1560px;
      table-layout: fixed;
    }

    .paper-service-form-table th:nth-child(1),
    .paper-service-form-table td:nth-child(1) { width: 46px; min-width: 46px; }
    .paper-service-form-table th:nth-child(2),
    .paper-service-form-table td:nth-child(2) {
      width: 250px;
      text-align: center;
    }
    .paper-service-form-table th:nth-child(3),
    .paper-service-form-table td:nth-child(3) { width: 112px; }
    .paper-service-form-table th:nth-child(4),
    .paper-service-form-table td:nth-child(4) { width: 96px; }
    .paper-service-form-table th:nth-child(5),
    .paper-service-form-table td:nth-child(5) { width: 205px; }
    .paper-service-form-table th:nth-child(6),
    .paper-service-form-table td:nth-child(6) { width: 205px; }
    .paper-service-form-table th:nth-child(7),
    .paper-service-form-table td:nth-child(7) { width: 102px; }
    .paper-service-form-table th:nth-child(8),
    .paper-service-form-table td:nth-child(8) { width: 150px; }
    .paper-service-form-table th:nth-child(9),
    .paper-service-form-table td:nth-child(9) { width: 174px; }
    .paper-service-form-table th:nth-child(10),
    .paper-service-form-table td:nth-child(10) { width: 230px; }

    .paper-service-form-table th:nth-child(-n+5),
    .paper-service-form-table td:nth-child(-n+5),
    .paper-service-form-table th:nth-child(7),
    .paper-service-form-table td:nth-child(7) {
      white-space: nowrap;
    }

    .paper-service-form-select-cell {
      width: 46px;
      min-width: 46px;
      text-align: center;
    }

    .paper-service-form-select-cell input {
      width: 19px;
      min-width: 19px;
      height: 19px;
      min-height: 19px;
      margin: 0;
      accent-color: var(--orange);
      cursor: pointer;
    }

    .paper-service-form-select-cell input:disabled {
      cursor: default;
      opacity: 0.42;
    }

    .paper-service-form-table tr.employee-group-start td {
      border-top-width: 2px;
      border-top-color: #d6d3d1;
    }

    .paper-service-form-employee-heading {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-width: 0;
      white-space: nowrap;
    }

    .paper-service-form-employee-heading > strong {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .paper-service-form-employee-meta {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: nowrap;
      gap: 5px;
      margin-top: 5px;
      white-space: nowrap;
    }

    .paper-service-form-employee-meta small {
      color: #78716c;
      font: inherit;
      font-size: 11px;
      font-weight: 800;
      white-space: nowrap;
    }

    .paper-service-form-plan-badge,
    .paper-service-form-external-unit {
      display: inline-flex;
      align-items: center;
      min-height: 22px;
      padding: 2px 7px;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      font: inherit;
      font-size: 11px;
      font-weight: 800;
      line-height: 1.2;
      letter-spacing: 0;
      white-space: nowrap;
    }

    .paper-service-form-plan-badge {
      background: #f5f5f4;
      color: #57534e;
    }

    .paper-service-form-records {
      display: grid;
      gap: 3px;
      min-width: 180px;
      color: #57534e;
      font-size: 12px;
      line-height: 1.5;
    }

    .paper-service-form-note {
      width: 100%;
      min-width: 150px;
      height: 38px;
      min-height: 38px;
      padding: 0 10px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      color: #1f2937;
      font-family: inherit;
      font-size: 13px;
      font-weight: 700;
    }

    .paper-service-form-actions {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: nowrap;
      gap: 6px;
      min-width: 210px;
    }

    .paper-service-form-actions button {
      flex: 0 0 auto;
      white-space: nowrap;
    }

    .paper-service-form-actions .received-action {
      border-color: #fdba74;
      background: #fff7ed;
      color: #c2410c;
    }

    @media (max-width: 900px) {
      .paper-service-form-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .service-record-title {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
          "heading"
          "switch"
          "summary";
        align-items: flex-start;
      }

      .service-record-title-summary {
        text-align: left;
      }
    }

    .service-record-filters {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 12px;
      align-items: end;
      padding: 14px;
      border: 2px solid #e7e5e4;
      border-radius: 24px;
      background: #fffaf4;
      color: #1f2937;
    }

    .service-record-filters label {
      min-height: 78px;
      margin: 0;
      color: #1f2937;
      font-weight: 900;
    }

    .service-record-filters input,
    .service-record-filters select {
      min-height: 44px;
      color: #111827;
      background: #fff;
      border-color: #d6d3d1;
      font-weight: 800;
    }

    .service-record-filters .filter-inline {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .service-record-main-filters {
      grid-template-columns:
        minmax(250px, 2fr)
        repeat(6, minmax(0, 1fr));
      gap: 8px;
      padding: 12px;
    }

    .service-record-main-filters > * {
      min-width: 0;
    }

    .service-record-filters.service-record-main-filters .date-filter {
      grid-column: auto;
    }

    .service-record-main-filters .service-record-date-control {
      grid-template-columns: 32px minmax(0, 1fr) 14px minmax(0, 1fr) 32px;
      gap: 4px;
    }

    .service-record-main-filters .service-record-date-control > button {
      width: 32px;
      min-width: 32px;
    }

    .service-record-date-heading {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 6px;
      min-width: 0;
    }

    .service-record-date-mode {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      padding: 2px;
      border: 1px solid #d6d3d1;
      border-radius: 7px;
      background: #f5f5f4;
    }

    .service-record-date-mode button {
      width: auto;
      min-width: 38px;
      height: 22px;
      min-height: 22px;
      padding: 0 7px;
      border: 0;
      border-radius: 5px;
      background: transparent;
      color: #78716c;
      box-shadow: none;
      font: inherit;
      font-size: 11px;
      font-weight: 900;
      line-height: 1;
    }

    .service-record-date-mode button.active {
      background: #1f2937;
      color: #fff;
    }

    .service-record-query-filters.service-record-main-filters .service-record-date-control input[type="date"] {
      min-width: 0;
      padding-inline: 5px;
      font-size: 12px;
    }

    .service-record-query-filters.service-record-main-filters .service-record-date-control input[type="date"]::-webkit-calendar-picker-indicator {
      width: 18px;
      height: 18px;
      margin-left: 1px;
    }

    .service-record-main-filters > .filter-check {
      width: 100%;
      min-width: 0;
      height: 48px;
      min-height: 48px;
      box-sizing: border-box;
    }

    .service-record-main-filters .service-record-client-filter,
    .service-record-main-filters .service-record-note-filter {
      grid-column: auto;
    }

    .paper-service-form-query-filters {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .paper-service-form-query-filters > label {
      grid-column: auto;
      min-width: 0;
    }

    .paper-service-form-query-filters .monitor-month-switch,
    .paper-service-form-query-filters .record-suggest-wrap {
      width: 100%;
      min-width: 0;
    }

    .service-record-query-filters > label:not(.filter-check) {
      display: grid;
      grid-template-rows: 20px 48px;
      align-content: end;
      gap: 5px;
      min-height: 73px;
    }

    .service-record-query-filters > label:not(.filter-check) > input,
    .service-record-query-filters > label:not(.filter-check) > select,
    .service-record-query-filters .record-suggest-wrap,
    .service-record-query-filters .filter-inline {
      height: 48px;
      min-height: 48px;
    }

    .service-record-query-filters input,
    .service-record-query-filters select,
    .service-record-query-filters .service-date-range input[type="date"] {
      width: 100%;
      height: 48px;
      min-height: 48px;
      box-sizing: border-box;
      border-radius: 12px;
      padding: 0 12px;
      font-size: 14px;
    }

    .service-record-query-filters .service-date-range input[type="date"]::-webkit-calendar-picker-indicator {
      width: 24px;
      height: 24px;
    }

    .service-record-query-filters .service-date-range {
      grid-template-columns: minmax(138px, 1fr) 24px minmax(138px, 1fr);
      align-items: center;
    }

    .service-date-separator {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #78716c;
      font-size: 13px;
      font-weight: 900;
      white-space: nowrap;
    }

    .service-record-month-switch {
      height: 48px;
      min-height: 48px;
    }

    .service-record-month-switch .service-date-range {
      min-width: 0;
    }

    .service-record-month-switch button {
      height: 48px;
      min-height: 48px;
    }

    .service-record-date-control {
      display: grid;
      grid-template-columns: 48px minmax(150px, 1fr) 24px minmax(150px, 1fr) 48px;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-width: 0;
      height: 48px;
      min-height: 48px;
    }

    .service-record-date-control > button {
      width: 48px;
      min-width: 48px;
      height: 48px;
      min-height: 48px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #fed7aa;
      border-radius: 12px;
      background: #fff7ed;
      color: #c2410c;
      box-shadow: none;
      font-size: 17px;
    }

    .service-record-date-control > button:hover {
      border-color: #fdba74;
      background: #ffedd5;
      color: #9a3412;
    }

    .service-record-query-filters .service-record-date-control input[type="date"] {
      width: 100%;
      min-width: 0;
      height: 48px;
      min-height: 48px;
      padding: 0 12px;
      border-radius: 12px;
      font-size: 14px;
      box-sizing: border-box;
      color-scheme: light;
    }

    .service-record-query-filters .service-record-date-control input[type="date"]::-webkit-calendar-picker-indicator {
      width: 24px;
      height: 24px;
      margin-left: 4px;
    }

    .service-record-filters .date-filter {
      grid-column: span 3;
      min-width: 0;
    }

    .service-record-filters .service-date-range input[type="date"] {
      min-height: 66px;
      border-radius: 18px;
      padding: 0 16px;
      font-size: 18px;
      color-scheme: light;
      background: linear-gradient(180deg, #fff, #fafaf9);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    .service-record-filters .service-date-range input[type="date"]::-webkit-calendar-picker-indicator {
      width: 34px;
      height: 34px;
      cursor: pointer;
      opacity: 0.82;
    }

    .service-record-query-filters .service-date-range input[type="date"] {
      height: 48px;
      min-height: 48px;
      border-radius: 12px;
      padding: 0 12px;
      font-size: 14px;
    }

    .service-record-query-filters .service-date-range input[type="date"]::-webkit-calendar-picker-indicator {
      width: 24px;
      height: 24px;
    }

    .record-suggest-wrap {
      position: relative;
      display: grid;
      gap: 5px;
    }

    .record-suggestion-list {
      position: absolute;
      top: calc(100% + 5px);
      left: 0;
      right: 0;
      z-index: 20;
      display: none;
      max-height: 220px;
      overflow: auto;
      border: 2px solid #fed7aa;
      border-radius: 14px;
      background: #fff;
      padding: 5px;
      box-shadow: 0 18px 36px -24px rgba(31, 41, 55, 0.5);
    }

    .record-suggestion-list.open {
      display: grid;
      gap: 4px;
    }

    .record-suggestion-option {
      border: 0;
      border-radius: 10px;
      min-height: 34px;
      padding: 6px 9px;
      background: #fff;
      color: #1f2937;
      font-size: 12px;
      font-weight: 900;
      text-align: left;
      cursor: pointer;
    }

    .record-suggestion-option:hover,
    .record-suggestion-option.active {
      background: #fff7ed;
      color: #9a3412;
    }

    .service-record-filters .wide {
      grid-column: span 2;
    }

    .service-record-filters .wide.date-filter {
      grid-column: span 3;
    }

    .service-record-filters.service-record-main-filters .date-filter {
      grid-column: auto;
    }

    .service-record-filters .filter-check {
      min-height: 44px;
      align-self: end;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin: 0;
      padding: 0 12px;
      border: 2px solid #fed7aa;
      border-radius: 14px;
      background: #fff7ed;
      color: #9a3412;
      cursor: pointer;
    }

    .service-record-filters .filter-check input {
      flex: 0 0 20px;
      width: 20px;
      min-width: 20px;
      max-width: 20px;
      height: 20px;
      min-height: 20px;
      max-height: 20px;
      margin: 0;
      accent-color: var(--orange);
      cursor: pointer;
    }

    .service-record-buttons {
      display: flex;
      align-items: end;
      justify-content: flex-start;
      flex-wrap: wrap;
      gap: 8px;
      align-self: end;
    }

    .service-record-filter-actions,
    .paper-service-form-filter-actions {
      grid-column: 1 / -1 !important;
      flex-wrap: nowrap;
      align-items: center;
      width: 100%;
      min-width: 0;
      overflow-x: auto;
      overflow-y: hidden;
      overscroll-behavior-x: contain;
      padding: 2px 0 4px;
      scrollbar-width: thin;
    }

    .service-record-filter-actions button,
    .paper-service-form-filter-actions button {
      flex: 0 0 auto;
      white-space: nowrap;
    }

    .service-record-buttons button {
      flex: 0 0 auto;
      min-width: 92px;
      padding-inline: 12px;
    }

    .service-record-buttons button,
    .record-action-button {
      border: 0;
      border-radius: 12px;
      min-height: 34px;
      padding: 0 10px;
      background: #1f2937;
      color: #fff;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
    }

    .service-record-buttons button.primary {
      background: var(--orange);
    }

    .service-record-buttons button.secondary {
      background: #e7e5e4;
      color: #44403c;
    }

    .service-record-buttons button.today-shortcut {
      border: 1px solid #16a34a;
      background: #16a34a;
      color: #fff;
      box-shadow: 0 6px 12px -8px rgba(22, 163, 74, 0.5);
    }

    .service-record-buttons button.today-shortcut:hover {
      border-color: #15803d;
      background: #15803d;
      color: #fff;
    }

    .service-record-buttons button.danger {
      background: #dc2626;
      color: #fff;
    }

    .service-record-pagination {
      min-height: 56px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 9px 12px;
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      background: #fafaf9;
    }

    .service-record-pagination button {
      width: 40px;
      height: 36px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      color: #78716c;
      font-family: inherit;
      font-size: 16px;
      box-shadow: none;
      cursor: pointer;
      transition: background-color .18s ease, border-color .18s ease, color .18s ease;
    }

    .service-record-pagination button:not(:disabled):hover {
      border-color: #fdba74;
      background: var(--orange-soft);
      color: var(--orange-dark);
    }

    .service-record-pagination button:disabled {
      border-color: #e7e5e4;
      background: #f5f5f4;
      color: #c7c2bd;
      cursor: default;
    }

    .service-record-pagination-status {
      min-width: 210px;
      min-height: 36px;
      padding: 0 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #e7e5e4;
      border-radius: 8px;
      background: #fff;
      text-align: center;
      color: #57534e;
      font-family: inherit;
      font-size: 13px;
      font-weight: 900;
      white-space: nowrap;
    }

    .record-action-stack {
      display: grid;
      grid-template-columns: repeat(3, minmax(42px, 1fr));
      gap: 6px;
      min-width: 156px;
    }

    .photo-recognition-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-top: 5px;
      border-radius: 999px;
      padding: 3px 8px;
      background: #f5f5f4;
      color: #57534e;
      font-size: 11px;
      font-weight: 950;
      line-height: 1.3;
      white-space: normal;
    }

    .photo-recognition-badge.match {
      background: #dcfce7;
      color: #166534;
    }

    .photo-recognition-badge.warn {
      background: #fef3c7;
      color: #92400e;
    }

    .photo-recognition-badge.error {
      background: #fee2e2;
      color: #991b1b;
    }

    .photo-recognition-badge.pending {
      background: #e0f2fe;
      color: #075985;
    }

    .service-record-ai-review {
      margin-top: 12px;
      border: 1px solid #f59e0b;
      border-left-width: 4px;
      border-radius: 6px;
      padding: 12px 14px;
      background: #fffbeb;
      color: #78350f;
      font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.7;
    }

    .service-record-ai-review-title {
      margin-bottom: 6px;
      color: #92400e;
      font-size: 14px;
      font-weight: 950;
      line-height: 1.7;
    }

    .service-record-ai-review-meta {
      margin-bottom: 8px;
      font-size: 13px;
      font-weight: 900;
      line-height: 1.7;
    }

    .service-record-ai-review-reason {
      color: #7f1d1d;
      font-family: inherit;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.7;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }

    .service-record-ai-review-detail {
      margin-top: 7px;
      color: #57534e;
      font-family: inherit;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.7;
      overflow-wrap: anywhere;
    }

    .approval-stack {
      display: grid;
      gap: 4px;
      min-width: 74px;
    }

    .approval-stack span,
    .record-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      padding: 4px 8px;
      background: #f5f5f4;
      color: #57534e;
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
    }

    .record-stats-panel {
      display: grid;
      gap: 14px;
      color: #1f2937;
      font-weight: 800;
    }

    .record-stats-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 18px;
      background: #fff7ed;
      color: #ea580c;
      font-size: 18px;
      font-weight: 900;
    }

    .record-stats-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      border: 1px solid #e7e5e4;
      border-radius: 18px;
      overflow: hidden;
      background: #fff;
    }

    .record-stat-cell {
      min-height: 42px;
      padding: 9px 10px;
      border-right: 1px solid #e7e5e4;
      border-bottom: 1px solid #e7e5e4;
      display: grid;
      align-content: center;
      gap: 2px;
      overflow-wrap: anywhere;
    }

    .record-stat-cell.label {
      background: #fafaf9;
      color: #57534e;
      font-size: 12px;
      font-weight: 900;
    }

    .record-stat-cell.value {
      color: #111827;
      font-size: 13px;
      font-weight: 900;
    }

    .record-stats-note {
      color: #78716c;
      font-size: 12px;
      line-height: 1.5;
    }

    .record-stats-table-wrap {
      overflow: auto;
      border: 1px solid #e7e5e4;
      border-radius: 18px;
      background: #fff;
    }

    .record-stats-table {
      width: 100%;
      min-width: 1040px;
      border-collapse: collapse;
      font-size: 12px;
      white-space: pre-line;
    }

    .record-stats-table th,
    .record-stats-table td {
      border: 1px solid #e7e5e4;
      padding: 8px;
      text-align: center;
      vertical-align: middle;
      color: #1f2937;
      font-weight: 800;
    }

    .record-stats-table th {
      background: #fff7ed;
      color: #9a3412;
      font-weight: 900;
    }

    .record-pill.done {
      background: #dcfce7;
      color: #166534;
    }

    .record-pill.warn {
      background: #fef3c7;
      color: #92400e;
    }

    .record-pill.missing {
      background: #fee2e2;
      color: #b45309;
    }

    .service-record-table {
      min-width: 4100px;
      border-collapse: collapse;
      table-layout: fixed;
    }

    .service-record-table th,
    .service-record-table td {
      border: 1px solid #e7e5e4;
      vertical-align: middle;
      text-align: center;
      white-space: pre-line;
      overflow-wrap: anywhere;
      line-height: 1.45;
      padding: 10px 8px;
    }

    .service-record-table th {
      background: #fff7ed;
      border-color: #fed7aa;
      color: #9a3412;
      font-weight: 900;
    }

    .service-record-table td {
      background: #fff;
    }

    .clock-time-warning {
      color: #dc2626;
      font-weight: 950;
    }

    .clock-time-warning small {
      display: block;
      margin-top: 2px;
      font-size: 10px;
      line-height: 1.2;
      color: #b91c1c;
      white-space: nowrap;
    }

    .service-record-leave-alert {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      max-width: 100%;
      padding: 5px 7px;
      border: 1px solid #fca5a5;
      border-radius: 6px;
      background: #fee2e2;
      color: #b91c1c;
      font-size: 11px;
      font-weight: 900;
      line-height: 1.35;
      white-space: normal;
    }

    .service-record-table tbody tr.service-record-leave-row > td,
    .service-record-table tbody tr.service-record-leave-row:hover > td {
      background: #fff7f7;
    }

    .service-record-table tbody tr.service-record-leave-row > td:first-child {
      box-shadow: inset 4px 0 0 #dc2626;
    }

    .schedule-badge.clock-delay {
      background: #fee2e2;
      color: #b91c1c;
    }

    .location-warning {
      color: #dc2626;
      font-weight: 950;
    }

    .location-warning .location-status {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-top: 4px;
      border-radius: 999px;
      padding: 2px 7px;
      background: #fee2e2;
      color: #b91c1c;
      font-size: 11px;
      font-weight: 950;
    }

    .service-record-location-evidence {
      display: block;
      margin-top: 4px;
      color: #78716c;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.45;
      white-space: normal;
    }

    .service-record-table tbody tr:nth-child(even) td {
      background: #f8fafc;
    }

    .operation-report-wrap {
      display: grid;
      gap: 14px;
      padding: 14px;
      min-width: 1180px;
    }

    .operation-report-wrap.receipt-report-wrap {
      min-width: 0;
      width: 100%;
    }

    .receipt-report-wrap .aa-reconcile-preview {
      min-width: 0;
      max-width: 100%;
      overflow-x: auto;
    }

    .line-contact-binding-panel .operation-report-table {
      min-width: 1080px;
    }

    .line-contact-binding-panel > summary {
      min-height: 54px;
      padding: 14px 16px;
      line-height: 1.6;
      color: #57534e;
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
      box-sizing: border-box;
    }

    .line-contact-binding-panel > summary strong {
      color: #1f2937;
      font-size: 14px;
      font-weight: 950;
    }

    .line-contact-binding-actions {
      width: 100%;
      min-height: 38px;
      padding: 0 16px 12px;
      box-sizing: border-box;
      align-items: center;
      justify-content: flex-start;
      flex-wrap: wrap;
      gap: 8px;
    }

    .line-contact-binding-actions button {
      min-width: 144px;
      min-height: 40px;
      white-space: nowrap;
    }

    .line-contact-binding-actions .line-contact-search-button {
      min-width: 82px;
    }

    .line-contact-name-search {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex: 1 1 350px;
      width: min(430px, 100%);
      max-width: 430px;
      min-width: 300px;
      color: #57534e;
      font-size: 13px;
      font-weight: 850;
      white-space: nowrap;
    }

    .line-contact-name-search-control {
      position: relative;
      display: block;
      flex: 1 1 auto;
      min-width: 0;
    }

    .line-contact-name-search-control > i {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      z-index: 1;
      color: #a8a29e;
      pointer-events: none;
    }

    .line-contact-name-search input[type="search"] {
      width: 100%;
      height: 40px;
      min-height: 40px;
      padding: 0 34px 0 36px;
      border: 2px solid #e7e5e4;
      border-radius: 10px;
      background: #fff;
      color: #292524;
      font: inherit;
      font-size: 13px;
      font-weight: 800;
      outline: none;
    }

    @media (max-width: 720px) {
      .line-contact-name-search {
        flex-basis: 100%;
        width: 100%;
        max-width: none;
        min-width: 0;
      }
    }

    .line-contact-name-search input[type="search"]:focus {
      border-color: #fdba74;
      box-shadow: 0 0 0 3px rgba(251, 146, 60, .12);
    }

    .line-contact-search-count {
      color: #78716c;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .line-contact-binding-panel > .status {
      margin: 0;
      padding: 0 16px 16px;
      text-align: left;
      box-sizing: border-box;
    }

    .line-contact-binding-panel .operation-report-table th,
    .line-contact-binding-panel .operation-report-table td {
      padding: 7px 8px;
      line-height: 1.3;
    }

    .line-contact-binding-panel .operation-report-table tbody tr {
      cursor: default;
    }

    .line-contact-binding-panel .operation-report-table tbody tr:hover > td {
      background: #fff !important;
    }

    .line-contact-binding-panel .operation-report-table tbody tr:nth-child(even):hover > td {
      background: #f8fafc !important;
    }

    .line-contact-binding-panel .operation-report-table tbody td:hover {
      background: #fff7ed !important;
    }

    .line-contact-binding-panel select,
    .line-contact-binding-panel input[type="text"] {
      min-height: 40px;
      height: 40px;
      padding-top: 0;
      padding-bottom: 0;
      border-radius: 10px;
      line-height: 38px;
    }

    .line-contact-binding-panel .table-action-group {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 8px;
      min-height: 40px;
    }

    .line-contact-binding-panel .table-action-button {
      min-height: 38px;
      padding: 0 11px;
      line-height: 1.2;
      white-space: nowrap;
    }

    .operation-report-wrap .service-record-filters input,
    .operation-report-wrap .service-record-filters select {
      width: 100%;
      height: 48px;
      min-height: 48px;
      border-radius: 12px;
      padding: 0 12px;
      font-size: 14px;
    }

    .operation-report-wrap .service-record-filters .service-date-range input[type="date"] {
      height: 48px;
      min-height: 48px;
      border-radius: 12px;
      padding: 0 12px;
      font-size: 14px;
    }

    .operation-report-wrap .service-record-filters .record-suggest-wrap {
      min-height: 48px;
    }

    .operation-report-wrap .service-record-filters {
      position: relative;
      z-index: 40;
      overflow: visible;
    }

    .operation-report-wrap .report-filter-field:focus-within {
      position: relative;
      z-index: 42;
    }

    .operation-report-wrap .record-suggestion-list {
      position: fixed;
      top: auto;
      right: auto;
      bottom: auto;
      left: auto;
      z-index: 14001;
    }

    .operation-report-wrap .report-filter-field {
      display: grid;
      grid-template-rows: 25px 48px;
      align-content: end;
      gap: 5px;
      height: 78px;
      min-height: 78px;
      align-self: end;
    }

    .operation-report-wrap .report-name-field,
    .operation-report-wrap .report-compact-field {
      width: min(100%, 320px);
      min-width: 0;
      max-width: 320px;
      grid-column: auto;
      justify-self: start;
    }

    .operation-report-wrap .report-even-filters {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-start;
      align-items: flex-end;
    }

    .operation-report-wrap .report-even-filters > .report-filter-field {
      flex: 0 1 240px;
      width: 240px;
      max-width: 240px;
      min-width: 0;
    }

    .operation-report-wrap .report-even-filters > .care-manager-quota-import {
      flex: 0 0 100%;
    }

    .operation-report-wrap .report-even-filters > .service-record-buttons {
      flex: 0 0 auto;
      max-width: 100%;
      min-width: 0;
    }

    @media (max-width: 600px) {
      .operation-report-wrap .report-even-filters > .report-filter-field {
        flex-basis: 100%;
        width: 100%;
        max-width: none;
      }
    }

    .operation-report-wrap .report-filter-heading {
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      line-height: 25px;
    }

    .operation-report-wrap .report-filter-heading .filter-clear-button {
      flex: 0 0 auto;
      min-height: 25px;
      height: 25px;
      border-radius: 7px;
      padding: 0 8px;
      line-height: 25px;
    }

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

    .operation-report-card {
      min-height: 76px;
      display: grid;
      align-content: center;
      gap: 4px;
      border: 2px solid #fed7aa;
      border-radius: 18px;
      background: #fff7ed;
      padding: 12px;
      color: #9a3412;
      font-weight: 900;
    }

    .operation-report-card span {
      color: #57534e;
      font-size: 12px;
    }

    .operation-report-card strong {
      color: #1f2937;
      font-size: 20px;
    }

    .operation-report-card.has-error {
      border-color: #fecaca;
      background: #fef2f2;
    }

    .operation-report-card.has-error strong,
    .operation-report-validation-error {
      color: #b91c1c;
    }

    .operation-report-validation-ok {
      color: #166534;
      font-weight: 900;
    }

    .reimbursement-monitor {
      display: grid;
      gap: 18px;
    }

    .monitor-header {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 14px;
      align-items: end;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 16px 18px;
      box-shadow: 0 12px 30px rgba(249, 115, 22, 0.08);
    }

    .monitor-filter-grid {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(150px, 0.8fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(190px, 1fr);
      gap: 12px;
    }

    .monitor-filter-grid label {
      display: grid;
      align-content: start;
      gap: 6px;
      min-height: 70px;
      font-size: 14px;
      font-weight: 900;
      color: var(--stone);
    }

    .monitor-filter-grid input,
    .monitor-filter-grid select {
      width: 100%;
      min-width: 0;
      height: 46px;
      min-height: 46px;
      box-sizing: border-box;
      border-radius: 12px;
      border: 1px solid #fed7aa;
      padding: 0 12px;
      font: inherit;
      font-size: 14px;
      line-height: 1.35;
      background: #fff;
    }

    .monitor-month-switch {
      width: 100%;
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr) 42px;
      gap: 6px;
      align-items: center;
    }

    .monitor-month-switch button {
      width: 36px;
      min-width: 36px;
      height: 46px;
      min-height: 46px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #1f2937;
      border-radius: 12px;
      background: #1f2937;
      color: #fff;
      box-shadow: none;
      font-size: 15px;
    }

    .monitor-month-switch select {
      width: 100%;
      min-width: 0;
      height: 46px !important;
      min-height: 46px !important;
      margin: 0;
      box-sizing: border-box;
      line-height: 1.2;
      text-align: center;
      text-align-last: center;
    }

    .monitor-month-switch button:hover {
      border-color: #111827;
      background: #111827;
      color: #fff;
    }

    .monitor-actions {
      display: flex;
      gap: 10px;
      flex-wrap: nowrap;
      justify-content: flex-end;
      align-items: end;
      width: auto;
    }

    .monitor-actions button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      height: 46px;
      min-height: 46px;
      padding-top: 0;
      padding-bottom: 0;
      white-space: nowrap;
    }

    .monitor-actions .table-action-button.toolbar-small-button {
      width: 76px;
      min-width: 76px;
      height: 40px;
      min-height: 40px;
      padding: 0 10px;
      border: 0;
      border-radius: 13px;
      background: #1f2937;
      color: #fff;
      font-size: 13px;
      font-weight: 900;
      box-shadow: none;
    }

    .monitor-actions .table-action-button.toolbar-small-button:hover {
      background: #374151;
      color: #fff;
    }

    .monitor-note {
      color: #78716c;
      background: #fff7ed;
      border: 1px solid #fed7aa;
      border-radius: 14px;
      padding: 12px 14px;
      line-height: 1.7;
      font-weight: 700;
    }

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

    .monitor-card {
      background: #fff;
      border: 1px solid #f5e0cf;
      border-radius: 18px;
      padding: 16px;
      display: grid;
      gap: 7px;
      box-shadow: 0 12px 28px rgba(68, 64, 60, 0.07);
    }

    .monitor-card span {
      color: #78716c;
      font-weight: 900;
    }

    .monitor-card strong {
      color: #1f2937;
      font-size: 1.65rem;
      font-weight: 1000;
      letter-spacing: 0;
    }

    .monitor-card em {
      color: #a8a29e;
      font-style: normal;
      font-weight: 800;
      font-size: 0.88rem;
    }

    .monitor-card.green { border-color: #bbf7d0; background: #f0fdf4; }
    .monitor-card.blue { border-color: #bfdbfe; background: #eff6ff; }
    .monitor-card.amber { border-color: #fde68a; background: #fffbeb; }
    .monitor-card.red { border-color: #fecaca; background: #fff1f2; }

    .revenue-time-analysis .revenue-time-filter-grid {
      width: min(100%, 850px);
      grid-template-columns: minmax(210px, 270px) minmax(280px, 420px) 132px;
      align-items: end;
    }

    .revenue-time-analysis,
    .revenue-time-analysis button,
    .revenue-time-analysis input,
    .revenue-time-analysis select,
    .revenue-time-analysis option {
      font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      letter-spacing: 0;
    }

    .revenue-time-analysis .monitor-note,
    .revenue-time-analysis .revenue-time-advice-item p,
    .revenue-time-analysis .revenue-time-advice-footnote {
      font-weight: 700;
    }

    .revenue-time-analysis .monitor-panel h3,
    .revenue-time-analysis .monitor-filter-grid label,
    .revenue-time-analysis .revenue-time-chart-code,
    .revenue-time-analysis .revenue-time-advice-item strong {
      font-weight: 900;
    }

    .revenue-time-analysis .monitor-header {
      grid-template-columns: minmax(0, 1fr);
    }

    .revenue-time-summary-cards {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .revenue-time-summary-cards .monitor-card {
      min-width: 0;
    }

    .revenue-time-summary-cards .monitor-card em {
      white-space: normal;
      overflow-wrap: anywhere;
      line-height: 1.45;
    }

    .revenue-time-reset-action {
      display: flex;
      align-items: flex-end;
      min-height: 70px;
    }

    .revenue-time-reset-action .table-action-button {
      width: 132px;
      min-width: 132px;
      height: 46px;
      min-height: 46px;
      padding: 0 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      border: 0;
      border-radius: 12px;
      background: #1f2937;
      color: #fff;
      box-shadow: none;
      font-size: 14px;
      font-weight: 900;
      white-space: nowrap;
    }

    .revenue-time-reset-action .table-action-button:hover {
      background: #374151;
      color: #fff;
    }

    .revenue-time-control-panel .monitor-panel-body {
      padding: 14px 16px;
    }

    .revenue-time-control-row {
      display: grid;
      grid-template-columns: minmax(220px, 0.9fr) minmax(150px, 0.45fr) minmax(260px, 1.4fr);
      gap: 16px;
      align-items: center;
    }

    .revenue-time-control-row > div,
    .revenue-time-control-row label {
      display: grid;
      gap: 4px;
    }

    .revenue-time-control-row small,
    .revenue-time-control-row label span {
      color: #766a60;
      font-size: 13px;
      font-weight: 700;
    }

    .revenue-time-control-row label {
      margin: 0;
    }

    .revenue-time-control-row input[type="range"] {
      width: 100%;
      accent-color: #f97316;
    }

    .revenue-time-slider-wrap {
      position: relative;
      min-width: 0;
      padding: 3px 8px 46px;
    }

    .revenue-time-slider-wrap input[type="range"] {
      position: relative;
      z-index: 2;
      display: block;
      margin: 0;
    }

    .revenue-time-scale {
      position: absolute;
      z-index: 1;
      top: 24px;
      left: 10px;
      right: 10px;
      height: 7px;
      border-top: 1px solid #cbd5e1;
    }

    .revenue-time-scale-mark {
      position: absolute;
      top: -1px;
      width: 1px;
      height: 5px;
      background: #cbd5e1;
      transform: translateX(-50%);
    }

    .revenue-time-scale-mark.major {
      height: 8px;
      background: #64748b;
    }

    .revenue-time-scale-mark.baseline {
      width: 2px;
      height: 10px;
      background: #f97316;
    }

    .revenue-time-scale-labels {
      position: absolute;
      top: 32px;
      left: 10px;
      right: 10px;
      height: 16px;
    }

    .revenue-time-scale-labels span {
      position: absolute;
      color: #6b7280;
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
      transform: translateX(-50%);
    }

    .revenue-time-scale-labels span:first-child {
      transform: none;
    }

    .revenue-time-scale-labels span:last-child {
      transform: translateX(-100%);
    }

    .revenue-time-scale-meta {
      position: absolute;
      top: 51px;
      left: 10px;
      right: 10px;
      color: #8a8179;
      font-size: 11px;
      font-weight: 700;
    }

    .revenue-time-scale-meta > span {
      position: absolute;
      left: 0;
      white-space: nowrap;
    }

    .revenue-time-scale-meta > strong {
      position: absolute;
      color: #c2410c;
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
      transform: translateX(-50%);
    }

    .revenue-time-chart {
      position: relative;
      display: grid;
      gap: 8px;
      padding-top: 22px;
    }

    .revenue-time-chart-row {
      display: grid;
      grid-template-columns: 72px minmax(120px, 1fr) 92px;
      gap: 10px;
      align-items: center;
      width: 100%;
      min-height: 34px;
      padding: 4px 6px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: #2d2925;
      box-shadow: none;
      text-align: left;
    }

    .revenue-time-chart-row:hover,
    .revenue-time-chart-row.selected {
      background: #fff4e9;
    }

    .revenue-time-chart-row strong {
      font-size: 13px;
      text-align: right;
      white-space: nowrap;
    }

    .revenue-time-chart-code {
      font-weight: 900;
      white-space: nowrap;
    }

    .revenue-time-chart-track {
      position: relative;
      display: block;
      height: 17px;
      overflow: hidden;
      border-radius: 4px;
      background: #eee9e4;
    }

    .revenue-time-chart-bar {
      display: block;
      height: 100%;
      min-width: 2px;
      border-radius: 4px;
      background: #1f6f78;
      transition: width 160ms ease;
    }

    .revenue-time-chart-row.selected .revenue-time-chart-bar {
      background: #f97316;
    }

    .revenue-time-chart-row.fixed .revenue-time-chart-bar {
      background: #566170;
    }

    .revenue-time-cost-marker {
      position: absolute;
      z-index: 2;
      top: 0;
      bottom: 0;
      width: 2px;
      background: #b45309;
      pointer-events: none;
    }

    .revenue-time-reference-label {
      position: absolute;
      top: 0;
      left: 82px;
      color: #8b4513;
      font-size: 12px;
      font-weight: 700;
    }

    .revenue-time-code-button {
      min-width: 70px;
      padding: 6px 9px;
      border: 1px solid #ffd2a8;
      border-radius: 6px;
      background: #fff8f1;
      color: #9a3412;
      box-shadow: none;
      font-weight: 900;
    }

    .revenue-time-table tr.selected td {
      background: #fff8f1;
    }

    .revenue-time-table {
      min-width: 1680px;
    }

    .revenue-time-table .revenue-time-negative strong {
      color: #b42318;
    }

    .revenue-time-fixed-pill {
      background: #eef1f4;
      color: #384252;
    }

    .revenue-time-advice-list {
      display: grid;
      gap: 0;
    }

    .revenue-time-selected-advice {
      padding: 14px 16px;
      border-left: 4px solid #f97316;
      background: #fff8f1;
    }

    .revenue-time-selected-advice-heading {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 6px 12px;
    }

    .revenue-time-selected-advice-heading span {
      color: #9a3412;
      font-size: 12px;
      font-weight: 900;
    }

    .revenue-time-selected-advice-heading strong {
      color: #292524;
      font-size: 15px;
      font-weight: 900;
    }

    .revenue-time-selected-metrics {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 10px;
    }

    .revenue-time-selected-metrics span {
      padding: 4px 8px;
      border: 1px solid #fed7aa;
      border-radius: 5px;
      background: #fff;
      color: #57534e;
      font-size: 12px;
      font-weight: 700;
    }

    .revenue-time-selected-advice p {
      margin: 10px 0 0;
      color: #5f574f;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.7;
    }

    .revenue-time-advice-section-title {
      margin-top: 14px;
      padding: 0 4px 7px;
      border-bottom: 1px solid #eee7df;
      color: #57534e;
      font-size: 13px;
      font-weight: 900;
    }

    .revenue-time-advice-item {
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr);
      gap: 10px;
      align-items: start;
      padding: 12px 4px;
      border-bottom: 1px solid #eee7df;
    }

    .revenue-time-advice-item:last-child {
      border-bottom: 0;
    }

    .revenue-time-advice-item > i {
      display: grid;
      place-items: center;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      color: #475569;
      background: #f1f5f9;
      font-size: 17px;
    }

    .revenue-time-advice-item strong {
      color: #292524;
      font-size: 14px;
    }

    .revenue-time-advice-item p {
      margin: 4px 0 0;
      color: #6b625b;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.65;
    }

    .revenue-time-advice-item.good > i {
      color: #16734a;
      background: #e9f9f0;
    }

    .revenue-time-advice-item.warn > i,
    .revenue-time-advice-item.alert > i {
      color: #b45309;
      background: #fff4df;
    }

    .revenue-time-advice-item.selected > i {
      color: #c2410c;
      background: #fff0e5;
    }

    .revenue-time-advice-footnote {
      margin: 8px 0 0;
      padding-top: 10px;
      border-top: 1px dashed #ded5cc;
      color: #83786f;
      font-size: 12px;
      font-weight: 700;
      line-height: 1.6;
    }

.revenue-time-profit-toolbar {
      display: flex;
      align-items: end;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 14px;
    }

    .revenue-time-profit-toolbar label {
      display: grid;
      gap: 6px;
      flex: 0 1 220px;
      min-width: 0;
      color: #57534e;
      font-weight: 900;
    }

    .revenue-time-profit-toolbar input {
      box-sizing: border-box;
      width: 100%;
      height: 42px;
      padding: 0 12px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      color: #292524;
      font-size: 14px;
      font-weight: 900;
    }

    .revenue-time-profit-toolbar button {
      min-height: 42px;
      box-shadow: none;
    }

    .revenue-time-profit-modes {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
    }

    .revenue-time-profit-modes button {
      background: #fff;
      border-color: #d6d3d1;
      color: #57534e;
    }

    .revenue-time-profit-modes button[aria-pressed="true"] {
      background: #1f2937;
      border-color: #1f2937;
      color: #fff;
    }

    .revenue-time-profit-spinner {
      animation: revenue-time-profit-spin 1s linear infinite;
    }

    @keyframes revenue-time-profit-spin {
      to { transform: rotate(360deg); }
    }

    .revenue-time-profit-status {
      margin-bottom: 12px;
      color: #57534e;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.6;
    }

    .revenue-time-profit-cards {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .revenue-time-profit-cards .monitor-card {
      min-width: 0;
      border-radius: 8px;
    }

    .revenue-time-profit-cards em {
      white-space: normal;
      line-height: 1.6;
    }

    .revenue-time-profit-warnings {
      margin: 14px 0;
      padding-left: 22px;
      color: #92400e;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.8;
    }

    .revenue-time-profit-results {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 24px;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid #e7e5e4;
    }

    .revenue-time-profit-results > div {
      min-width: 0;
    }

    .revenue-time-profit-results strong {
      color: #292524;
      font-size: 14px;
    }

    .revenue-time-profit-results dl,
    .revenue-time-profit-breakdown dl {
      margin: 10px 0;
    }

    .revenue-time-profit-results dl > div,
    .revenue-time-profit-breakdown dl > div {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 0;
      border-bottom: 1px solid #f1efed;
      font-size: 13px;
    }

    .revenue-time-profit-results dd,
    .revenue-time-profit-breakdown dd {
      margin: 0;
      color: #1f2937;
      font-weight: 900;
      text-align: right;
      overflow-wrap: anywhere;
    }

    .revenue-time-profit-results p,
    .revenue-time-profit-model-note {
      color: #6b625b;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.7;
    }

    .revenue-time-profit-model-note {
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px dashed #ded5cc;
      font-size: 12px;
    }

    .revenue-time-profit-breakdown {
      margin-top: 14px;
      color: #57534e;
      font-size: 13px;
      font-weight: 700;
    }

    .revenue-time-profit-breakdown summary {
      padding: 10px 0;
      cursor: pointer;
      font-weight: 900;
    }

    @media (max-width: 560px) {
      .revenue-time-analysis .revenue-time-profit-cards,
      .revenue-time-profit-results {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .revenue-time-profit-spinner { animation: none; }
    }

    @media (max-width: 920px) {
      .revenue-time-analysis .revenue-time-filter-grid,
      .revenue-time-control-row {
        width: 100%;
        grid-template-columns: 1fr;
      }

      .revenue-time-reset-action {
        min-height: 46px;
      }

      .revenue-time-reset-action .table-action-button {
        width: 100%;
      }

      .revenue-time-analysis .monitor-header {
        grid-template-columns: 1fr;
      }

      .revenue-time-summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .revenue-time-chart-row {
        grid-template-columns: 64px minmax(90px, 1fr) 82px;
        gap: 7px;
      }

    }

    @media (max-width: 560px) {
      .revenue-time-summary-cards {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    .monitor-grid-two {
      display: grid;
      grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
      gap: 14px;
    }

    .monitor-panel {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 18px;
      overflow: hidden;
      box-shadow: 0 12px 28px rgba(68, 64, 60, 0.07);
    }

    .monitor-panel h3 {
      margin: 0;
      padding: 14px 16px;
      display: flex;
      align-items: center;
      gap: 8px;
      color: #7c2d12;
      background: #fff7ed;
      border-bottom: 1px solid #fed7aa;
      font-size: 1rem;
    }

    .monitor-panel-body {
      padding: 12px;
      overflow: auto;
    }

    .monitor-collapsible > summary {
      min-height: 48px;
      padding: 0 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: #7c2d12;
      background: #fff7ed;
      font-size: 1rem;
      font-weight: 900;
      list-style: none;
      cursor: pointer;
    }

    .monitor-collapsible > summary::-webkit-details-marker {
      display: none;
    }

    .monitor-collapsible > summary > span {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .monitor-collapsible-summary-meta {
      color: #78716c;
      font-size: 0.85rem;
      white-space: nowrap;
    }

    .monitor-collapsible-summary-meta i {
      transition: transform 160ms ease;
    }

    .monitor-collapsible[open] > summary {
      border-bottom: 1px solid #fed7aa;
    }

    .monitor-collapsible[open] .monitor-collapsible-summary-meta i {
      transform: rotate(180deg);
    }

    .monitor-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 58px;
      padding: 4px 8px;
      border-radius: 999px;
      color: #9a3412;
      background: #ffedd5;
      font-weight: 1000;
    }

    .service-hour-audit-table {
      min-width: 1420px;
    }

    .service-hour-audit .monitor-filter-grid {
      grid-template-columns: repeat(6, minmax(150px, 1fr));
    }

    .service-hour-audit-filter-suggest .record-suggestion-list {
      position: fixed;
      inset: auto;
      z-index: 14001;
      text-align: left;
    }

    .payroll-estimate-monitor .monitor-filter-grid {
      width: max-content;
      max-width: 100%;
      grid-template-columns: repeat(3, minmax(210px, 260px));
      justify-content: start;
    }

    .service-hour-audit .monitor-panel h3,
    .service-hour-audit .monitor-panel h3 small,
    .service-hour-audit .monitor-card span,
    .service-hour-audit .monitor-note strong {
      font-family: inherit;
      letter-spacing: 0;
    }

    .service-hour-audit .monitor-panel h3 {
      font-weight: 900;
      line-height: 1.4;
    }

    .service-hour-audit .monitor-panel h3 small {
      color: #78716c;
      font-size: 0.85rem;
      font-weight: 800;
      line-height: 1.4;
    }

    .service-hour-audit .monitor-card span,
    .service-hour-audit .monitor-note strong {
      font-weight: 900;
    }

    .service-hour-audit-table th,
    .service-hour-audit-table td {
      vertical-align: middle;
    }

    .service-hour-audit-time {
      display: grid;
      gap: 3px;
      white-space: nowrap;
    }

    .service-hour-audit-time small {
      color: #78716c;
      font-weight: 800;
    }

    .service-hour-audit-status {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 86px;
      padding: 5px 9px;
      border: 1px solid #d6d3d1;
      border-radius: 999px;
      background: #fafaf9;
      color: #57534e;
      font-size: 0.86rem;
      font-weight: 900;
      white-space: nowrap;
    }

    .service-hour-audit-status.ok {
      border-color: #bbf7d0;
      background: #f0fdf4;
      color: #166534;
    }

    .service-hour-audit-status.warning {
      border-color: #fed7aa;
      background: #fff7ed;
      color: #9a3412;
    }

    .service-hour-audit-status.danger {
      border-color: #fecaca;
      background: #fff1f2;
      color: #b91c1c;
    }

    .service-hour-audit-status.muted {
      border-color: #e7e5e4;
      background: #f5f5f4;
      color: #78716c;
    }

    .service-hour-audit-difference {
      font-weight: 900;
      white-space: nowrap;
    }

    .service-hour-audit-difference.has-difference {
      color: #b91c1c;
    }

    .service-hour-audit-action {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      height: 36px;
      min-height: 36px;
      padding: 0 11px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      color: #57534e;
      box-shadow: none;
      font: inherit;
      font-size: 0.84rem;
      font-weight: 850;
      white-space: nowrap;
    }

    .service-hour-audit-action:hover {
      border-color: #a8a29e;
      background: #fafaf9;
      color: #292524;
    }

    .service-hour-payment-table th,
    .service-hour-payment-table td {
      vertical-align: middle;
      text-align: center;
    }

    .service-hour-payment-table th:first-child,
    .service-hour-payment-table td:first-child {
      text-align: left;
    }

    .service-hour-payment-input {
      box-sizing: border-box;
      width: 112px;
      max-width: 100%;
      height: 36px;
      padding: 0 8px;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      background: #fff;
      color: #292524;
      text-align: center;
      font: inherit;
      font-size: 0.84rem;
      font-weight: 700;
    }

    .service-hour-payment-collector {
      box-sizing: border-box;
      width: 160px;
      max-width: 100%;
      height: 36px;
      padding: 0 8px;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      background: #fff;
      color: #292524;
      font: inherit;
      font-size: 0.84rem;
      font-weight: 700;
    }

    .service-hour-collector-allocation {
      display: grid;
      gap: 6px;
      min-width: 210px;
      text-align: left;
    }

    .service-hour-collector-allocation > div {
      display: grid;
      gap: 2px;
      padding: 5px 0;
      border-bottom: 1px solid #e7e5e4;
      font-size: 0.8rem;
    }

    .service-hour-collector-allocation > div:last-child {
      border-bottom: 0;
    }

    .service-hour-collector-allocation span {
      color: #57534e;
      white-space: nowrap;
    }

    .service-hour-worker-cash-action {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 3px;
    }

    .service-hour-worker-cash-action input {
      width: 86px;
      min-width: 0;
      height: 34px;
      padding: 0 6px;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      background: #fff;
      color: #292524;
      font: inherit;
      text-align: center;
    }

    .service-hour-worker-cash-action button {
      min-height: 34px;
      white-space: nowrap;
    }

    .service-hour-payment-actions,
    .service-hour-payment-editor {
      display: flex;
      align-items: end;
      justify-content: center;
      flex-wrap: wrap;
      gap: 8px;
    }

    .service-hour-payment-detail td {
      padding: 12px 16px;
      background: #fafaf9;
      text-align: left !important;
    }

    .service-hour-payment-receipts {
      margin: 8px 0 12px;
      padding: 0;
      list-style: none;
    }

    .service-hour-payment-receipts li {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 6px 0;
      border-bottom: 1px solid #e7e5e4;
      font-size: 0.84rem;
    }

    .service-hour-payment-receipts li.voided {
      color: #78716c;
    }

    .service-hour-payment-editor {
      justify-content: flex-start;
    }

    .service-hour-payment-editor label {
      display: grid;
      grid-template-rows: 18px 40px;
      align-content: end;
      gap: 5px;
      font-size: 0.8rem;
      font-weight: 700;
    }

    .service-hour-payment-editor input,
    .service-hour-payment-editor select {
      box-sizing: border-box;
      width: 160px;
      height: 40px;
      min-height: 40px;
      padding: 0 8px;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      background: #fff;
      color: #292524;
      font: inherit;
    }

    .service-hour-payment-editor .service-hour-audit-action {
      height: 40px;
      min-height: 40px;
    }

    .service-hour-audit-table th:last-child,
    .service-hour-audit-table td:last-child {
      min-width: 190px;
      text-align: center;
    }

    .service-hour-audit-row-actions {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 6px;
    }

    .service-hour-collection-cell {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      min-width: 270px;
      align-items: center;
      justify-content: center;
      gap: 6px;
      text-align: center;
    }

    .service-hour-audit-client-table th:last-child,
    .service-hour-audit-client-table td:last-child {
      width: 290px;
      min-width: 290px;
      text-align: center;
    }

    .service-hour-collection-summary {
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 4px 6px;
      line-height: 1.35;
    }

    .service-hour-collection-summary:only-child {
      grid-column: 1 / -1;
    }

    .service-hour-collection-cell small {
      color: #78716c;
      font: inherit;
      font-size: 0.78rem;
      font-weight: 700;
      line-height: 1.35;
    }

    .service-record-table tr.service-record-focus-highlight > td {
      background: #fff7ed;
      box-shadow: inset 0 2px #d99a65, inset 0 -2px #d99a65;
      transition: background 180ms ease, box-shadow 180ms ease;
    }

    .monitor-code-groups {
      display: grid;
      gap: 14px;
    }

    .monitor-code-group {
      display: grid;
      gap: 8px;
    }

    .monitor-code-group-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: #7c2d12;
      font-weight: 1000;
    }

    .monitor-code-group-title span {
      color: #78716c;
      font-size: 0.9rem;
      font-weight: 900;
    }

    .monitor-warning-list {
      margin: 0;
      padding-left: 20px;
      color: #b45309;
      font-weight: 800;
      line-height: 1.8;
    }

    @media (max-width: 1180px) {
      .monitor-header { grid-template-columns: 1fr; align-items: stretch; }
      .monitor-filter-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
      .service-hour-audit .monitor-filter-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
      .payroll-estimate-monitor .monitor-filter-grid {
        grid-template-columns: repeat(3, minmax(190px, 240px));
      }
      .monitor-actions { justify-content: flex-end; }
      .monitor-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .monitor-grid-two { grid-template-columns: 1fr; }
    }

    @media (max-width: 820px) {
      .payroll-estimate-monitor .monitor-filter-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
      }
    }

    .operation-report-table {
      min-width: 1180px;
      border-collapse: collapse;
      table-layout: fixed;
    }

    .operation-report-table th,
    .operation-report-table td {
      border: 1px solid #e7e5e4;
      padding: 9px 8px;
      text-align: center;
      vertical-align: middle;
      white-space: pre-line;
      overflow-wrap: anywhere;
      color: #1f2937;
      font-weight: 800;
    }

    .operation-report-table th {
      background: #fff7ed;
      color: #9a3412;
      border-color: #fed7aa;
      font-weight: 900;
    }

    .operation-report-table td {
      background: #fff;
    }

    .operation-report-table tbody tr:nth-child(even) td {
      background: #f8fafc;
    }

    .care-manager-quota-import {
      grid-column: 1 / -1;
      display: grid;
      gap: 8px;
      min-width: 0;
    }

    .care-manager-quota-import textarea {
      width: 100%;
      min-height: 150px;
      resize: vertical;
      border: 1px solid #d6d3d1;
      border-radius: 12px;
      padding: 12px 14px;
      background: #fff;
      color: #1f2937;
      font: inherit;
      font-size: 14px;
      font-weight: 700;
      line-height: 1.65;
      box-sizing: border-box;
    }

    .care-manager-quota-import textarea:focus {
      outline: 3px solid rgba(234, 88, 12, .12);
      border-color: #c77745;
    }

    .care-manager-quota-preview {
      min-width: 0;
      overflow-x: auto;
    }

    .care-manager-quota-preview .operation-report-table {
      min-width: 1580px;
    }

    .care-manager-quota-preview .quota-client-cell,
    .care-manager-quota-preview .quota-contact-cell {
      text-align: left;
      white-space: normal;
    }

    .care-manager-quota-preview .quota-client-cell strong,
    .care-manager-quota-preview .quota-contact-cell strong {
      display: block;
      color: #1f2937;
      font-weight: 900;
    }

    .care-manager-quota-preview .quota-client-cell span,
    .care-manager-quota-preview .quota-contact-cell span {
      display: block;
      margin-top: 3px;
      color: #78716c;
      font-size: 12px;
      font-weight: 700;
    }

    .care-manager-quota-preview select,
    .care-manager-quota-preview input {
      width: 100%;
      min-height: 40px;
      border-radius: 9px;
      padding: 0 9px;
      font: inherit;
      font-size: 13px;
      font-weight: 750;
      box-sizing: border-box;
    }

    .care-manager-quota-preview select.quota-followup-status,
    select.quota-followup-filter {
      border-width: 1px;
      border-style: solid;
      font-weight: 850;
      transition: border-color .16s ease, background-color .16s ease, color .16s ease;
    }

    select.quota-followup-pending {
      border-color: #dfb187;
      background: #fff7ed;
      color: #92502c;
    }

    select.quota-followup-notified {
      border-color: #adc5ce;
      background: #f0f6f7;
      color: #3f6670;
    }

    select.quota-followup-completed {
      border-color: #aac8b3;
      background: #eff7f1;
      color: #3d684a;
    }

    select.quota-followup-ignored {
      border-color: #cbc7c2;
      background: #f5f5f4;
      color: #68635e;
    }

    select.quota-followup-status option,
    select.quota-followup-filter option {
      background: #fff;
      color: #292524;
    }

    .quota-setting-missing {
      color: #b91c1c;
      font-weight: 900;
    }

    .quota-setting-ready {
      color: #166534;
      font-weight: 900;
    }

    .quota-match-warning {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      border-radius: 7px;
      padding: 0 8px;
      background: #fef2f2;
      color: #b91c1c;
      font-size: 12px;
      font-weight: 900;
    }

    .quota-service-stack {
      display: grid;
      gap: 7px;
      min-width: 0;
      text-align: left;
    }

    .quota-service-entry {
      display: grid;
      gap: 2px;
      border-bottom: 1px solid #e7e5e4;
      padding-bottom: 7px;
    }

    .quota-service-entry:last-child {
      border-bottom: 0;
      padding-bottom: 0;
    }

    .quota-service-entry strong {
      color: #1f2937;
      font-size: 13px;
      font-weight: 850;
    }

    .quota-service-entry span {
      color: #78716c;
      font-size: 12px;
      font-weight: 700;
      line-height: 1.45;
    }

    .quota-service-entry.warning span {
      color: #b91c1c;
      font-weight: 850;
    }

    .quota-message-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      min-height: 36px;
      border: 1px solid #d5a06f;
      border-radius: 8px;
      padding: 0 10px;
      background: #fffaf4;
      color: #a44f1b;
      font: inherit;
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
      cursor: pointer;
    }

    .quota-message-button:disabled {
      border-color: #d6d3d1;
      background: #f5f5f4;
      color: #a8a29e;
      cursor: not-allowed;
    }

    .quota-message-modal .quota-message-editor textarea {
      min-height: 540px;
      padding: 12px 14px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      color: #292524;
      line-height: 1.75;
    }

    .quota-message-modal .schedule-governance-dialog {
      width: min(980px, calc(100vw - 32px));
      max-height: min(900px, 94vh);
    }

    .quota-message-modal .schedule-governance-body {
      max-height: calc(min(900px, 94vh) - 72px);
    }

    .quota-message-actions .primary {
      background: var(--orange);
    }

    .support-reporting-note {
      margin: 0;
      color: #57534e;
      font-size: 13px;
      font-weight: 800;
      line-height: 1.7;
    }

    .support-reporting-error {
      color: #b91c1c;
      font-weight: 900;
      line-height: 1.5;
    }

    .support-reporting-ok {
      color: #166534;
      font-weight: 900;
    }

    .support-reporting-checkbox {
      width: 20px;
      height: 20px;
      accent-color: #d97706;
    }

    .support-reporting-invalid td {
      background: #fff7f7 !important;
    }

    .support-reporting-filter-bar {
      display: grid;
      grid-template-columns: minmax(160px, .8fr) minmax(160px, .8fr) minmax(130px, .65fr) minmax(0, 2fr);
      gap: 10px;
      align-items: end;
      padding: 12px;
      border: 1px solid #e7e5e4;
      border-radius: 8px;
      background: #fafaf9;
    }

    .support-reporting-filter-bar.manual-outbound {
      grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr);
    }

    .support-reporting-filter-bar label {
      display: grid;
      gap: 6px;
      min-width: 0;
      color: #57534e;
      font-size: 13px;
      font-weight: 900;
    }

    .support-reporting-filter-bar select {
      width: 100%;
      min-height: 42px;
      padding: 8px 34px 8px 10px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      color: #292524;
      font: inherit;
      font-size: 14px;
    }

    .support-reporting-filter-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .support-reporting-filter-actions button {
      height: 42px;
      min-height: 42px;
      padding: 0 12px;
      border-radius: 10px;
      font-size: 13px;
      white-space: nowrap;
      justify-content: center;
      box-shadow: none;
    }

    .support-reporting-filter-actions .support-selection-replace {
      border-color: var(--orange);
      background: var(--orange);
      color: #fff;
    }

    .support-reporting-filter-actions .support-selection-add {
      border-color: #1f2937;
      background: #1f2937;
      color: #fff;
    }

    .support-reporting-filter-actions .support-selection-remove {
      border-color: #57534e;
      background: #57534e;
      color: #fff;
    }

    .support-reporting-filter-actions .support-selection-reset {
      border: 1px solid #d6d3d1;
      background: #fff;
      color: #57534e;
    }

    .support-reporting-filter-count {
      margin: 0;
      color: #78716c;
      font-size: 13px;
      font-weight: 800;
    }

    @media (max-width: 900px) {
      .support-reporting-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .support-reporting-filter-actions {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 620px) {
      .support-reporting-filter-bar,
      .support-reporting-filter-bar.manual-outbound {
        grid-template-columns: minmax(0, 1fr);
      }

      .support-reporting-filter-actions {
        grid-column: auto;
      }
    }

    .aa-reconcile-imports {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .aa-reconcile-import {
      min-height: 112px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 13px;
      border: 2px dashed #fdba74;
      border-radius: 18px;
      background: #fff;
    }

    .aa-reconcile-import strong,
    .aa-reconcile-import span {
      display: block;
    }

    .aa-reconcile-import strong {
      color: #1f2937;
      font-size: 14px;
      font-weight: 900;
    }

    .aa-reconcile-import span {
      margin-top: 4px;
      color: #78716c;
      font-size: 12px;
      font-weight: 800;
      overflow-wrap: anywhere;
    }

    .aa-reconcile-import button {
      min-width: 124px;
      min-height: 42px;
      border: 0;
      border-radius: 12px;
      padding: 0 12px;
      background: #fff7ed;
      color: #c2410c;
      font-weight: 900;
      cursor: pointer;
    }

    .aa-reconcile-import.combo-import {
      grid-template-columns: 1fr;
    }

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

    .combo-import-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding-top: 8px;
      border-top: 1px solid #fed7aa;
    }

    .combo-import-row:first-child {
      border-top: 0;
      padding-top: 0;
    }

    .aa-reconcile-preview {
      grid-column: 1 / -1;
      overflow: auto;
      border: 2px solid #e7e5e4;
      border-radius: 18px;
      background: #fff;
    }

    .cash-collection-summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 1px;
      width: 100%;
      min-width: 0;
      border-bottom: 1px solid #e7e5e4;
      background: #e7e5e4;
    }

    .cash-collection-summary-item {
      min-width: 0;
      display: grid;
      gap: 4px;
      padding: 11px 13px;
      background: #fffaf4;
      color: #57534e;
      font-size: 12px;
      font-weight: 850;
      line-height: 1.35;
    }

    .cash-collection-summary-item strong {
      color: #1f2937;
      font-size: 16px;
      font-weight: 950;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .cash-collection-summary-item.received strong {
      color: #166534;
    }

    .cash-collection-summary-item.pending strong {
      color: #b91c1c;
    }


    .aa-reconcile-preview-toolbar {
      grid-column: 1 / -1;
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border: 2px solid #e7e5e4;
      border-radius: 14px;
      background: #fff;
    }

    .aa-reconcile-preview-toolbar label {
      display: grid;
      gap: 5px;
      min-width: 220px;
      color: #44403c;
      font-size: 12px;
      font-weight: 900;
    }

    .aa-reconcile-preview-toolbar > strong {
      color: #1f2937;
      font-size: 14px;
      font-weight: 900;
    }

    .aa-reconcile-preview-toolbar select {
      width: 100%;
      min-height: 42px;
      border: 1px solid #d6d3d1;
      border-radius: 10px;
      padding: 0 34px 0 11px;
      background: #fff;
      color: #1f2937;
      font-weight: 900;
    }

    .caregiver-payroll-preview-toolbar {
      flex-wrap: wrap;
    }

    .caregiver-payroll-preview-toolbar .payroll-employee-filter {
      width: min(100%, 320px);
      min-width: 0;
    }

    .caregiver-payroll-preview-toolbar .payroll-employee-filter input {
      width: 100%;
      height: 44px;
      min-height: 44px;
      border: 1px solid #d6d3d1;
      border-radius: 10px;
      padding: 0 11px;
      background: #fff;
      color: #1f2937;
      font: inherit;
      font-size: 14px;
    }

    .caregiver-payroll-preview-toolbar .record-suggestion-list {
      max-height: 240px !important;
    }

    .aa-reconcile-preview-count {
      color: #57534e;
      font-size: 13px;
      font-weight: 900;
    }

    .aa-reconcile-preview table {
      width: 100%;
      min-width: 860px;
      border-collapse: collapse;
      table-layout: fixed;
    }

    .aa-reconcile-preview th,
    .aa-reconcile-preview td {
      border: 1px solid #e7e5e4;
      padding: 8px;
      text-align: center;
      vertical-align: middle;
      color: #1f2937;
      font-size: 12px;
      font-weight: 800;
      overflow-wrap: anywhere;
    }

    .aa-reconcile-preview th {
      background: #fff7ed;
      color: #9a3412;
      font-weight: 900;
    }

    .aa-reconcile-status-ok {
      color: #15803d !important;
    }

    .aa-reconcile-status-warn {
      color: #c2410c !important;
    }

    .aa-reconcile-status-error {
      color: #dc2626 !important;
    }

    @media (max-width: 980px) {
      .aa-reconcile-imports {
        grid-template-columns: 1fr;
      }

      .aa-reconcile-import {
        grid-template-columns: 1fr;
      }

      .aa-reconcile-import button {
        width: 100%;
      }
    }

    .filter-clear-button {
      border: 0;
      border-radius: 10px;
      min-height: 30px;
      padding: 0 10px;
      background: #f5f5f4;
      color: #57534e;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
    }

    .clock-record-tools {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px;
      background: #fff7ed;
      border: 1px solid #fed7aa;
      color: #57534e;
      font-weight: 900;
      white-space: normal;
    }

    .clock-record-tools > i {
      flex: 0 0 auto;
      color: #c2410c;
      font-size: 24px;
    }

    .clock-record-tools > span {
      flex: 1 1 auto;
      line-height: 1.55;
    }

    .clock-record-tools > span strong {
      color: #9a3412;
    }

    .clock-record-tools button {
      border: 0;
      border-radius: 12px;
      min-height: 38px;
      padding: 0 14px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--orange);
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .national-holiday-import-row > td { padding: 10px 12px; background: #fff; }
    .national-holiday-import-toolbar,
    .national-holiday-import-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
    .national-holiday-import-toolbar label { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; white-space: nowrap; }
    .national-holiday-import-toolbar input { width: 96px; min-height: 38px; padding: 4px 8px; text-align: center; }
    .national-holiday-import-toolbar > span { color: var(--muted); font-size: 13px; font-weight: 600; }
    .national-holiday-import-preview { margin-top: 10px; }
    .national-holiday-import-summary { margin-bottom: 8px; font-weight: 700; }
    .national-holiday-import-summary a { margin-left: 6px; }
    .national-holiday-import-list { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; }
    .national-holiday-import-list table { width: 100%; border-collapse: collapse; }
    .national-holiday-import-list th,
    .national-holiday-import-list td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border); }
    .national-holiday-import-list th { position: sticky; top: 0; background: #f8fafc; z-index: 1; }
    .national-holiday-import-list input[type="checkbox"] { width: 16px; height: 16px; margin: 0; vertical-align: middle; }
    .national-holiday-import-actions { margin-top: 10px; }
    .national-holiday-import-actions button:disabled { opacity: .5; cursor: not-allowed; }

    .security-center-wrap {
      display: grid;
      gap: 14px;
      width: 100%;
      min-width: 0;
      padding: 14px;
      text-align: left;
    }

    .security-center-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: nowrap;
      overflow-x: auto;
      padding: 14px;
      border: 1px solid #dbeafe;
      border-radius: 12px;
      background: #f8fafc;
    }

    .security-center-title {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 0 0 auto;
      color: #1e3a8a;
    }

    .security-center-title i {
      font-size: 28px;
    }

    .security-center-title strong {
      display: block;
      font-size: 18px;
    }

    .security-center-title small {
      display: block;
      margin-top: 2px;
      color: #64748b;
      font-size: 12px;
      font-weight: 800;
    }

    .security-center-tabs {
      display: inline-flex;
      flex: 0 0 auto;
      flex-wrap: nowrap;
      gap: 4px;
      padding: 4px;
      border-radius: 10px;
      background: #e2e8f0;
    }

    .security-center-tabs button {
      min-height: 40px;
      border: 0;
      border-radius: 8px;
      padding: 0 13px;
      background: transparent;
      color: #475569;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
      white-space: nowrap;
    }

    .security-center-tabs button.active {
      background: #fff;
      color: #1d4ed8;
      box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    }

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

    .security-center-summary > div {
      display: grid;
      gap: 4px;
      min-height: 72px;
      align-content: center;
      padding: 10px 12px;
      border: 1px solid #e2e8f0;
      border-left: 4px solid #64748b;
      border-radius: 10px;
      background: #fff;
    }

    .security-center-summary > div.safe { border-left-color: #16a34a; }
    .security-center-summary > div.alert { border-left-color: #dc2626; }
    .security-center-summary span {
      color: #64748b;
      font-size: 12px;
      font-weight: 800;
    }
    .security-center-summary strong {
      color: #0f172a;
      font-size: 20px;
    }

    .security-alert-panel { display: grid; gap: 10px; }
    .security-alert-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid #bbf7d0; border-radius: 12px; background: #f0fdf4; }
    .security-alert-item > i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #dcfce7; color: #15803d; font-size: 20px; }
    .security-alert-item strong { display: block; color: #166534; font-size: 14px; font-weight: 900; }
    .security-alert-item p { margin: 3px 0 0; color: #475569; font-size: 12px; line-height: 1.6; font-weight: 800; }
    .security-alert-item.info { border-color: #bfdbfe; background: #eff6ff; }
    .security-alert-item.info > i { background: #dbeafe; color: #1d4ed8; }
    .security-alert-item.info strong { color: #1e40af; }
    .security-alert-item.warning { border-color: #fde68a; background: #fffbeb; }
    .security-alert-item.warning > i { background: #fef3c7; color: #a16207; }
    .security-alert-item.warning strong { color: #92400e; }
    .security-alert-item.critical { border-color: #fecaca; background: #fef2f2; }
    .security-alert-item.critical > i { background: #fee2e2; color: #b91c1c; }
    .security-alert-item.critical strong { color: #991b1b; }

    .security-measures-panel {
      display: grid;
      gap: 12px;
    }

    .security-measures-intro,
    .security-measures-note {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px 14px;
      border: 1px solid #bfdbfe;
      border-radius: 10px;
      background: #eff6ff;
      color: #1e3a8a;
      font-size: 13px;
      font-weight: 800;
      line-height: 1.6;
    }

    .security-measures-intro i,
    .security-measures-note i {
      flex: 0 0 auto;
      margin-top: 2px;
      font-size: 21px;
    }

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

    .security-measure-card {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      gap: 10px;
      min-height: 126px;
      align-content: start;
      padding: 13px;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      background: #fff;
    }

    .security-measure-card > i {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      border-radius: 9px;
      background: #dbeafe;
      color: #1d4ed8;
      font-size: 21px;
    }

    .security-measure-card strong {
      display: block;
      color: #0f172a;
      font-size: 14px;
      font-weight: 900;
    }

    .security-measure-card p {
      margin: 5px 0 0;
      color: #475569;
      font-size: 12px;
      font-weight: 800;
      line-height: 1.55;
    }

    .security-measures-note {
      border-color: #fed7aa;
      background: #fff7ed;
      color: #9a3412;
    }

    .performance-diagnostics {
      display: grid;
      gap: 12px;
    }

    .performance-diagnostics-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      background: #fff;
    }

    .performance-diagnostics-head strong,
    .performance-diagnostics-head small {
      display: block;
    }

    .performance-diagnostics-head small {
      margin-top: 3px;
      color: #64748b;
      font-size: 12px;
      font-weight: 800;
    }

    .performance-diagnostics-head button {
      min-height: 38px;
      border: 1px solid #cbd5e1;
      border-radius: 8px;
      padding: 0 12px;
      background: #fff;
      color: #475569;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
    }

    .performance-diagnostics-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .performance-diagnostics-grid > div {
      display: grid;
      gap: 4px;
      min-height: 72px;
      align-content: center;
      padding: 10px 12px;
      border: 1px solid #e2e8f0;
      border-left: 4px solid #94a3b8;
      border-radius: 10px;
      background: #fff;
    }

    .performance-diagnostics-grid span {
      color: #64748b;
      font-size: 12px;
      font-weight: 800;
    }

    .performance-diagnostics-grid strong {
      color: #0f172a;
      font-size: 20px;
    }

    .performance-table-wrap {
      overflow: auto;
      max-height: 52vh;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      background: #fff;
    }

    .performance-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    .performance-table th,
    .performance-table td {
      padding: 10px 12px;
      border-bottom: 1px solid #e2e8f0;
      text-align: left;
      white-space: nowrap;
    }

    .performance-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #f8fafc;
      color: #475569;
      font-weight: 900;
    }

    .performance-table td:first-child {
      min-width: 220px;
      white-space: normal;
      font-weight: 900;
    }

    .performance-slow {
      color: #b45309;
      font-weight: 900;
    }

    .api-usage-monitor {
      display: grid;
      gap: 12px;
    }

    .api-usage-toolbar {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      background: #fff;
    }

    .api-usage-toolbar label {
      min-width: 260px;
      margin: 0;
      color: #334155;
      font-size: 12px;
      font-weight: 900;
    }

    .api-usage-toolbar-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .api-usage-toolbar-actions button {
      min-height: 42px;
      border: 1px solid #1e3a5f;
      border-radius: 8px;
      padding: 0 14px;
      background: #1e3a5f;
      color: #fff;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
    }

    .api-usage-toolbar-actions button:disabled {
      cursor: wait;
      opacity: .58;
    }

    .api-usage-note {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      padding: 11px 13px;
      border: 1px solid #bfdbfe;
      border-radius: 9px;
      background: #eff6ff;
      color: #1e3a8a;
      font-size: 12px;
      font-weight: 800;
      line-height: 1.55;
    }

    .api-usage-note.warning {
      border-color: #fed7aa;
      background: #fff7ed;
      color: #9a3412;
    }

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

    .api-usage-bars {
      display: grid;
      gap: 10px;
      padding: 14px;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      background: #fff;
    }

    .api-usage-bars > strong { color: #334155; font-size: 13px; }
    .api-usage-bar-row { display: grid; grid-template-columns: 150px minmax(120px, 1fr) 72px; align-items: center; gap: 10px; }
    .api-usage-bar-row > span { overflow: hidden; color: #475569; font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
    .api-usage-bar-track { height: 20px; overflow: hidden; border-radius: 5px; background: #f1f5f9; }
    .api-usage-bar-track i { display: block; height: 100%; border-radius: inherit; background: #d89a63; transition: width .25s ease; }
    .api-usage-bar-row > b { color: #334155; font-size: 12px; text-align: right; }

    .api-provider-card {
      display: grid;
      gap: 9px;
      min-height: 154px;
      padding: 13px;
      border: 1px solid #e2e8f0;
      border-top: 4px solid #64748b;
      border-radius: 8px;
      background: #fff;
    }

    .api-provider-card.ok { border-top-color: #15803d; }
    .api-provider-card.warning { border-top-color: #c2410c; }
    .api-provider-card.unavailable { border-top-color: #94a3b8; background: #f8fafc; }

    .api-provider-card-head,
    .api-provider-metrics {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .api-provider-card-head strong,
    .api-provider-card-head small {
      display: block;
    }

    .api-provider-card-head strong { color: #0f172a; font-size: 14px; }
    .api-provider-card-head small { margin-top: 2px; color: #64748b; font-size: 11px; font-weight: 800; }

    .api-provider-status {
      flex: 0 0 auto;
      border-radius: 999px;
      padding: 4px 8px;
      background: #dcfce7;
      color: #166534;
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
    }

    .api-provider-status.warning { background: #ffedd5; color: #9a3412; }
    .api-provider-status.unavailable { background: #e2e8f0; color: #475569; }

    .api-provider-metrics > div { min-width: 0; }
    .api-provider-metrics span,
    .api-provider-metrics strong { display: block; }
    .api-provider-metrics span { color: #64748b; font-size: 11px; font-weight: 800; }
    .api-provider-metrics strong { margin-top: 2px; color: #0f172a; font-size: 17px; }

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

    .api-usage-progress > i {
      display: block;
      width: var(--api-usage-progress, 0%);
      height: 100%;
      border-radius: inherit;
      background: #15803d;
    }

    .api-provider-card.warning .api-usage-progress > i { background: #c2410c; }

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

    .api-line-card {
      padding: 12px 14px;
      border: 1px solid #bbf7d0;
      border-radius: 8px;
      background: #f0fdf4;
      color: #14532d;
      font-size: 12px;
      font-weight: 800;
    }

    .api-line-card strong { display: block; margin-bottom: 4px; font-size: 14px; }

    @media (max-width: 1050px) {
      .api-provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    @media (max-width: 720px) {
      .api-usage-toolbar { align-items: stretch; flex-direction: column; }
      .api-usage-toolbar label { min-width: 0; }
      .api-provider-grid,
      .api-line-grid { grid-template-columns: 1fr; }
    }

    .security-center-tools {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) 180px auto auto;
      gap: 10px;
      align-items: end;
      padding: 12px;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      background: #fff;
    }

    .security-center-tools label {
      min-width: 0;
      margin: 0;
      color: #334155;
      font-size: 12px;
      font-weight: 900;
    }

    .security-center-tools input,
    .security-center-tools select {
      width: 100%;
      height: 42px;
      margin-top: 5px;
      border: 1px solid #cbd5e1;
      border-radius: 9px;
      padding: 0 10px;
      background: #fff;
      font: inherit;
      font-size: 13px;
      font-weight: 800;
    }

    .security-center-tools button {
      height: 42px;
      border: 0;
      border-radius: 9px;
      padding: 0 13px;
      background: #1e40af;
      color: #fff;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
    }

    .security-center-tools button.secondary {
      border: 1px solid #93c5fd;
      background: #eff6ff;
      color: #1d4ed8;
    }

    .security-center-table-wrap {
      width: 100%;
      max-width: 100%;
      overflow-x: auto;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      -webkit-overflow-scrolling: touch;
    }

    .security-center-pagination {
      min-height: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 7px 10px;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      background: #f8fafc;
    }

    .security-center-pagination span {
      min-width: 220px;
      min-height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0 12px;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      background: #fff;
      color: #475569;
      font-size: 13px;
      font-weight: 800;
    }

    .security-center-pagination button {
      width: 40px;
      height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #cbd5e1;
      border-radius: 8px;
      background: #fff;
      color: #64748b;
      font: inherit;
      cursor: pointer;
    }

    .security-center-pagination button:not(:disabled):hover {
      border-color: #94a3b8;
      background: #f1f5f9;
      color: #334155;
    }

    .security-center-pagination button:disabled {
      opacity: .42;
      cursor: default;
    }

    .security-center-table {
      width: 100%;
      min-width: 1120px;
      border-collapse: collapse;
      table-layout: auto;
    }

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

    .admin-account-flow {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      border: 1px solid #bfdbfe;
      border-radius: 10px;
      overflow: hidden;
      background: #eff6ff;
    }

    .admin-account-flow > div {
      min-width: 0;
      padding: 12px 14px;
      border-right: 1px solid #bfdbfe;
    }

    .admin-account-flow > div:last-child { border-right: 0; }
    .admin-account-flow strong {
      display: block;
      color: #1e3a8a;
      font-size: 13px;
      font-weight: 900;
    }
    .admin-account-flow span {
      display: block;
      margin-top: 4px;
      color: #475569;
      font-size: 12px;
      font-weight: 800;
      line-height: 1.5;
    }

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

    .admin-account-bootstrap > div {
      padding: 12px 14px;
      border: 1px solid #fde68a;
      border-left: 4px solid #d97706;
      border-radius: 8px;
      background: #fffbeb;
    }

    .admin-account-bootstrap strong,
    .admin-account-section-head strong {
      color: #78350f;
      font-size: 14px;
      font-weight: 900;
    }

    .admin-account-bootstrap p {
      margin: 5px 0 0;
      color: #57534e;
      font-size: 12px;
      font-weight: 800;
      line-height: 1.55;
      overflow-wrap: anywhere;
    }

    .admin-account-section {
      display: grid;
      gap: 9px;
      padding-top: 3px;
    }

    .admin-account-section-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 12px;
      border-bottom: 1px solid #e2e8f0;
      padding: 0 2px 8px;
    }

    .admin-account-section-head strong { color: #0f172a; }
    .admin-account-section-head small {
      color: #64748b;
      font-size: 12px;
      font-weight: 800;
    }

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

    .admin-account-row {
      display: grid;
      grid-template-columns: minmax(210px, 1.3fr) minmax(150px, 0.8fr) 95px minmax(130px, 0.7fr) auto;
      gap: 8px;
      align-items: end;
      padding: 9px;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      background: #fff;
    }

    .admin-account-row.support {
      grid-template-columns: minmax(170px, 1fr) minmax(150px, 0.8fr) minmax(180px, 1fr) 95px minmax(130px, 0.7fr) auto;
    }

    .admin-account-row label {
      min-width: 0;
      margin: 0;
      color: #475569;
      font-size: 11px;
      font-weight: 900;
    }

    .admin-account-row input {
      width: 100%;
      height: 39px;
      margin-top: 4px;
      border: 1px solid #cbd5e1;
      border-radius: 7px;
      padding: 0 9px;
      background: #fff;
      color: #0f172a;
      font: inherit;
      font-size: 13px;
      font-weight: 800;
    }

    .admin-account-row input:focus {
      outline: 2px solid #bfdbfe;
      border-color: #3b82f6;
    }

    .admin-account-status,
    .admin-account-last-login {
      min-height: 39px;
      display: flex;
      align-items: center;
      color: #475569;
      font-size: 12px;
      font-weight: 900;
    }

    .admin-account-status span {
      display: inline-flex;
      align-items: center;
      min-height: 26px;
      padding: 0 8px;
      border-radius: 6px;
      background: #dcfce7;
      color: #166534;
    }

    .admin-account-status span.disabled {
      background: #fee2e2;
      color: #b91c1c;
    }

    .admin-account-actions {
      min-height: 39px;
      display: flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }

    .admin-account-actions button,
    .admin-account-add button {
      min-height: 36px;
      border: 0;
      border-radius: 7px;
      padding: 0 10px;
      background: #1e40af;
      color: #fff;
      font: inherit;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
    }

    .admin-account-actions button.secondary {
      border: 1px solid #cbd5e1;
      background: #f8fafc;
      color: #334155;
    }

    .admin-account-actions button.danger {
      border: 1px solid #fecaca;
      background: #fff1f2;
      color: #b91c1c;
    }

    .admin-account-add {
      padding: 9px;
      border: 1px dashed #93c5fd;
      border-radius: 8px;
      background: #f8fafc;
    }

    .admin-account-empty,
    .admin-account-loading,
    .admin-account-migration {
      padding: 18px;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      background: #f8fafc;
      color: #475569;
      text-align: center;
      font-size: 13px;
      font-weight: 900;
      line-height: 1.6;
    }

    .admin-account-migration button {
      min-height: 36px;
      margin-left: 10px;
      border: 1px solid #fecaca;
      border-radius: 7px;
      padding: 0 11px;
      background: #fff;
      color: #b91c1c;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
    }

    .admin-account-migration {
      border-color: #fecaca;
      background: #fff1f2;
      color: #b91c1c;
    }

    @media (max-width: 1180px) {
      .admin-account-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .admin-account-flow > div:nth-child(2) { border-right: 0; }
      .admin-account-flow > div:nth-child(-n+2) { border-bottom: 1px solid #bfdbfe; }
      .admin-account-row,
      .admin-account-row.support { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .admin-account-actions { grid-column: 1 / -1; }
    }

    @media (max-width: 700px) {
      .security-center-tabs { width: auto; }
      .admin-account-flow,
      .admin-account-bootstrap,
      .admin-account-row,
      .admin-account-row.support { grid-template-columns: 1fr; }
      .admin-account-flow > div { border-right: 0; border-bottom: 1px solid #bfdbfe; }
      .admin-account-flow > div:last-child { border-bottom: 0; }
      .admin-account-actions { grid-column: auto; flex-wrap: wrap; }
    }

    .security-center-table th,
    .security-center-table td {
      border: 1px solid #e2e8f0;
      padding: 9px 10px;
      text-align: center;
      vertical-align: middle;
      white-space: normal;
      overflow-wrap: anywhere;
      color: #334155;
      font-size: 12px;
      font-weight: 800;
    }

    .security-center-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #eff6ff;
      color: #1e40af;
      font-weight: 900;
    }

    .security-center-table.login-log-table th:nth-child(4),
    .security-center-table.login-log-table td:nth-child(4) {
      width: 220px;
      min-width: 220px;
      white-space: nowrap;
    }

    .security-center-table.login-log-table th:nth-child(5),
    .security-center-table.login-log-table td:nth-child(5) {
      width: 150px;
      min-width: 150px;
      white-space: nowrap;
    }

    .security-center-table.login-log-table th:nth-child(6),
    .security-center-table.login-log-table td:nth-child(6) {
      width: 140px;
      min-width: 140px;
      white-space: nowrap;
    }

    .security-center-table.login-log-table th:nth-child(9),
    .security-center-table.login-log-table td:nth-child(9) {
      width: 110px;
      min-width: 110px;
      max-width: 110px;
      font-size: 11px;
    }

    .security-center-table.operation-log-table th:nth-child(3),
    .security-center-table.operation-log-table td:nth-child(3) {
      width: 160px;
      min-width: 160px;
      white-space: nowrap;
    }

    .security-center-table.operation-log-table th:nth-child(10),
    .security-center-table.operation-log-table td:nth-child(10) {
      width: 130px;
      min-width: 130px;
      white-space: nowrap;
    }

    .security-center-table.operation-log-table th:nth-child(11),
    .security-center-table.operation-log-table td:nth-child(11) {
      width: 110px;
      min-width: 110px;
      max-width: 110px;
      font-size: 11px;
    }

    .security-center-empty {
      padding: 24px;
      color: #64748b;
      text-align: center;
      font-weight: 800;
    }

    body.security-center-mode .layout > .table-wrap {
      max-width: 100%;
      overflow: visible;
    }

    body.security-center-mode .layout > .table-wrap > table {
      width: 100%;
      min-width: 0;
      table-layout: fixed;
    }

    body.security-center-mode .layout > .table-wrap > table > tbody > tr > td {
      width: 100%;
      max-width: 100%;
      padding: 0;
      white-space: normal;
    }

    body.security-center-mode .layout > .table-wrap > table > tbody > tr,
    .security-center-table tbody tr {
      cursor: default;
    }

    body.security-center-mode .layout > .table-wrap > table > tbody > tr:hover > td {
      background: transparent;
    }

    body.operation-report-page-mode .layout > .table-wrap {
      max-width: 100%;
      overflow-x: auto;
    }

    body.operation-report-page-mode .layout > .table-wrap > table {
      width: 100%;
      min-width: 0;
      table-layout: fixed;
    }

    body.operation-report-page-mode .layout > .table-wrap > table > tbody > tr > td {
      width: 100%;
      max-width: 100%;
      padding: 0;
      white-space: normal;
    }

    .security-center-table tbody tr:hover > td {
      background: #fff;
    }

    body.custom-page-no-row-hover .layout > .table-wrap > table > tbody > tr {
      cursor: default;
    }

    body.custom-page-no-row-hover .layout > .table-wrap > table > tbody > tr:hover > td {
      background: transparent;
    }

    .security-result {
      display: inline-flex;
      justify-content: center;
      min-width: 58px;
      border-radius: 999px;
      padding: 3px 8px;
      background: #f1f5f9;
      color: #475569;
      font-weight: 900;
    }

    .security-result.safe {
      background: #dcfce7;
      color: #166534;
    }

    .security-result.alert {
      background: #fee2e2;
      color: #b91c1c;
    }

    .client-geocode-panel {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px;
      border: 1px solid #fed7aa;
      border-radius: 14px;
      background: #fff7ed;
      color: #57534e;
      font-weight: 900;
    }

    .client-geocode-panel button {
      border: 0;
      border-radius: 12px;
      min-height: 38px;
      padding: 0 14px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--orange);
      color: #fff;
      font-weight: 900;
      cursor: pointer;
      white-space: nowrap;
    }

    .client-geocode-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }

    .client-geocode-panel button.secondary {
      border: 1px solid #e7c39a;
      background: #fff;
      color: #8b5a2b;
    }

    .client-location-tools { flex-wrap: wrap; }
    #clientLocationStatus {
      grid-column: 1 / -1;
      margin: 8px 0 12px;
      color: #57534e;
      font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: 14px;
      font-weight: 700;
      line-height: 1.5;
      letter-spacing: 0;
      overflow-wrap: anywhere;
    }

    .service-record-table tbody tr:hover > td {
      background: #fff7ed;
    }

    .service-record-table th:nth-child(1), .service-record-table td:nth-child(1) { width: 48px; }
    .service-record-table th:nth-child(2), .service-record-table td:nth-child(2) { width: 42px; padding-inline: 4px; text-align: center; }
    .service-record-table th:nth-child(3), .service-record-table td:nth-child(3) { width: 190px; }
    .service-record-table th:nth-child(4), .service-record-table td:nth-child(4) { width: 228px; }
    .service-record-table th:nth-child(5), .service-record-table td:nth-child(5) { width: 112px; }
    .service-record-table th:nth-child(6), .service-record-table td:nth-child(6) { width: 118px; }
    .service-record-table th:nth-child(7), .service-record-table td:nth-child(7) { width: 112px; }
    .service-record-table th:nth-child(8), .service-record-table td:nth-child(8) { width: 104px; }
    .service-record-table th:nth-child(9), .service-record-table td:nth-child(9) { width: 142px; }
    .service-record-table th:nth-child(10), .service-record-table td:nth-child(10) { width: 92px; }
    .service-record-table th:nth-child(11), .service-record-table td:nth-child(11) { width: 92px; }
    .service-record-table th:nth-child(12), .service-record-table td:nth-child(12) { width: 92px; }
    .service-record-table th:nth-child(13), .service-record-table td:nth-child(13) { width: 104px; }
    .service-record-table th:nth-child(14), .service-record-table td:nth-child(14) { width: 104px; }
    .service-record-table th:nth-child(15), .service-record-table td:nth-child(15) { width: 96px; }
    .service-record-table th:nth-child(16), .service-record-table td:nth-child(16) { width: 220px; text-align: center; }
    .service-record-table th:nth-child(17), .service-record-table td:nth-child(17) { width: 140px; }
    .service-record-table th:nth-child(18), .service-record-table td:nth-child(18) { width: 230px; text-align: center; }
    .service-record-table th:nth-child(19), .service-record-table td:nth-child(19) { width: 112px; }
    .service-record-table th:nth-child(20), .service-record-table td:nth-child(20) { width: 96px; }
    .service-record-table th:nth-child(21), .service-record-table td:nth-child(21) { width: 230px; text-align: center; }
    .service-record-table th:nth-child(22), .service-record-table td:nth-child(22) { width: 230px; text-align: center; }
    .service-record-table th:nth-child(23), .service-record-table td:nth-child(23) { width: 390px; text-align: center; }
    .service-record-table th:nth-child(24), .service-record-table td:nth-child(24) { width: 112px; }
    .service-record-table th:nth-child(25), .service-record-table td:nth-child(25) { width: 178px; }
    .service-record-table th:nth-child(26), .service-record-table td:nth-child(26) { width: 124px; }
    .service-record-table th:nth-child(27), .service-record-table td:nth-child(27) { width: 178px; }
    .service-record-table th:nth-child(28), .service-record-table td:nth-child(28) { width: 180px; text-align: center; }

    .service-record-table input[data-service-record-select] {
      width: 14px;
      height: 14px;
      min-width: 14px;
      min-height: 14px;
      margin: 0;
      accent-color: var(--orange);
      vertical-align: middle;
    }

    .service-record-table td:nth-child(3) {
      padding-inline: 10px;
    }

    .service-record-table td:nth-child(4) {
      padding-inline: 10px;
    }

    .service-record-table td:nth-child(4) .record-action-stack {
      grid-template-columns: repeat(2, minmax(72px, 1fr));
      min-width: 156px;
    }

    .service-record-table td:nth-child(4) .record-action-button,
    .service-record-table td:nth-child(4) .record-pill {
      width: 100%;
      min-width: 58px;
      min-height: 34px;
      margin: 0 auto;
      padding-inline: 8px;
      white-space: nowrap;
    }

    .service-record-preview {
      display: grid;
      gap: 10px;
      color: #57534e;
      font-weight: 900;
      line-height: 1.6;
    }

    .service-record-preview .preview-block {
      padding: 12px;
      border-radius: 16px;
      background: #fafaf9;
      border: 2px solid #f5f5f4;
    }

    table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      min-width: 980px;
    }

    th,
    td {
      border-bottom: 2px solid #f5f5f4;
      padding: 14px 16px;
      text-align: left;
      font-size: 13px;
      white-space: nowrap;
      font-weight: 700;
    }

    th {
      position: sticky;
      top: 0;
      background: var(--orange-soft);
      color: var(--orange-dark);
      z-index: 1;
      font-weight: 900;
    }

    th:first-child {
      border-top-left-radius: 20px;
      border-bottom-left-radius: 20px;
    }

    th:last-child {
      border-top-right-radius: 20px;
      border-bottom-right-radius: 20px;
    }

    tr {
      cursor: pointer;
    }

    tr:hover > td {
      background: #fff7ed;
    }

    aside {
      padding: 22px;
      max-height: calc(100vh - 160px);
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
    }

    h2 {
      margin: 0 0 14px;
      font-size: 18px;
      font-weight: 900;
      color: #1f2937;
    }

    form {
      display: grid;
      gap: 10px;
    }

    label {
      display: grid;
      gap: 5px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    input,
    select,
    textarea {
      width: 100%;
      border: 2px solid #f5f5f4;
      border-radius: 16px;
      min-height: 44px;
      padding: 9px 12px;
      font: inherit;
      color: var(--ink);
      font-weight: 700;
      background: #fafaf9;
    }

    textarea {
      min-height: 68px;
      resize: vertical;
    }

    body.appointment-mode .layout {
      grid-template-columns: 1fr;
    }

    body.appointment-mode aside.panel {
      display: none;
    }

    body.todo-center-mode .layout {
      grid-template-columns: 1fr;
    }

    body.todo-center-mode aside.panel {
      display: none;
    }

    body.appointment-mode.appointment-editor-open::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 10;
      background: rgba(31, 41, 55, 0.32);
      backdrop-filter: blur(2px);
    }

    body.appointment-mode.appointment-editor-open aside.panel {
      display: block;
      position: fixed;
      z-index: 11;
      top: 50%;
      left: 50%;
      width: min(980px, calc(100vw - 28px));
      max-height: calc(100vh - 28px);
      overflow: auto;
      transform: translate(-50%, -50%);
      box-shadow: 0 24px 60px rgba(31, 41, 55, 0.24);
    }

    body.appointment-mode.appointment-editor-open aside.panel > h2,
    body.record-modal-mode.record-editor-open aside.panel > h2,
    body.schedule-mode.schedule-editor-open aside.panel > h2,
    body.service-record-page-mode.schedule-editor-open aside.panel > h2 {
      padding-right: 52px;
    }

    body.record-modal-mode .layout {
      grid-template-columns: 1fr;
    }

    body.record-modal-mode aside.panel {
      display: none;
    }

    body.record-modal-mode.record-editor-open::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 10;
      background: rgba(31, 41, 55, 0.32);
      backdrop-filter: blur(2px);
    }

    body.record-modal-mode.record-editor-open aside.panel {
      display: block;
      position: fixed;
      z-index: 11;
      top: 50%;
      left: 50%;
      width: min(1040px, calc(100vw - 28px));
      max-height: calc(100vh - 28px);
      overflow: auto;
      transform: translate(-50%, -50%);
      box-shadow: 0 24px 60px rgba(31, 41, 55, 0.24);
    }

    body.record-modal-mode.record-editor-open .client-editor {
      grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    body.record-modal-mode.record-editor-open .client-editor label:has(textarea),
    body.record-modal-mode.record-editor-open .client-editor .actions,
    body.record-modal-mode.record-editor-open .client-editor .danger,
    body.record-modal-mode.record-editor-open .client-import-panel,
    body.record-modal-mode.record-editor-open .client-identity-section,
    body.record-modal-mode.record-editor-open .client-service-section {
      grid-column: 1 / -1;
    }

    .appointment-editor input,
    .appointment-editor select {
      height: 46px;
      min-height: 46px;
    }

    .appointment-editor textarea {
      min-height: 46px;
    }

    .appointment-editor-grid {
      grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    .appointment-editor-grid .wide,
    .appointment-editor-grid label:has(textarea) {
      grid-column: 1 / -1;
    }

    body.visit-planning-page-mode .layout > .table-wrap > table { width: 100%; min-width: 0; table-layout: fixed; }
    body.visit-planning-page-mode .layout > .table-wrap > table > tbody > tr > td { width: 100%; max-width: 100%; padding: 0; white-space: normal; }
    body.visit-planning-page-mode .appointment-page > .table-wrap { min-width: 0; max-width: 100%; }
    .visit-record-editor .visit-editor-section { margin: 8px 0 0; padding: 10px 0; border-bottom: 1px solid #e7e5e4; font-family: inherit; font-size: 15px; font-weight: 900; color: var(--ink); }
    .visit-record-editor input, .visit-record-editor select, .visit-record-editor textarea { font-family: inherit; font-weight: 700; letter-spacing: 0; }
    .visit-record-editor select,
    .visit-record-editor select option {
      background-color: #fff;
      color: var(--ink, #1f2937);
      -webkit-text-fill-color: var(--ink, #1f2937);
      color-scheme: light;
    }
    .visit-record-editor button { font-family: inherit; font-weight: 900; letter-spacing: 0; }
    .visit-record-editor label, .visit-record-editor .visit-editor-section, .visit-record-editor button {
      -webkit-user-select: none;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
    }
    .visit-record-editor input, .visit-record-editor textarea {
      -webkit-user-select: text;
      user-select: text;
    }
    .visit-record-editor select {
      -webkit-user-select: none;
      user-select: none;
      outline: none;
    }
    .visit-record-editor select:focus,
    .visit-record-editor select:focus-visible {
      border-color: #e7b98d;
      background: #fff;
      box-shadow: 0 0 0 3px rgba(210, 154, 100, 0.16);
      outline: none;
    }
    .visit-record-editor textarea { line-height: 1.7; }
    .visit-record-editor .schedule-entity-field { min-width: 0; }
    .visit-record-editor .schedule-entity-options { z-index: 30; }
    .visit-record-editor .actions { flex-wrap: wrap; gap: 8px; }
    .visit-record-editor button[data-visit-ai="home_visit"] { background: #fff3e8; border-color: #efc9a7; color: #a4521e; }
    .visit-record-editor button[data-visit-ai="polish"] { background: #eef5f0; border-color: #bfd2c5; color: #4a6a54; }
    .visit-record-editor button[data-visit-ai="home_visit"]:hover { background: #ffead7; }
    .visit-record-editor button[data-visit-ai="polish"]:hover { background: #e3eee6; }
    .visit-record-editor .visit-editor-actions { border-top: 1px solid #e7e5e4; padding-top: 12px; }
    .visit-record-editor .visit-editor-status.is-error { color: #b91c1c; }
    .visit-record-editor .visit-editor-status:empty { display: none; }
    .visit-care-context { padding: 14px 0; border-top: 1px solid var(--line, #e7e5e4); line-height: 1.6; overflow-wrap: anywhere; }
    .visit-care-context p { font-weight: 700; margin: 8px 0; }
    .visit-care-context button { margin-top: 6px; }
    .visit-record-editor input:disabled, .visit-record-editor textarea:disabled, .visit-record-editor select:disabled { opacity: 1; color: var(--ink); -webkit-text-fill-color: var(--ink); }
    .visit-record-summary { max-width: 360px; min-width: 200px; white-space: normal; font-weight: 500; line-height: 1.65; }
    .visit-record-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
    .visit-record-case-summary { display: flex; flex-wrap: wrap; gap: 16px 28px; padding: 14px 0; border-block: 1px solid #e7e5e4; }
    .visit-record-case-summary > div { min-width: 120px; display: grid; gap: 4px; }
    .visit-record-case-summary span { color: var(--muted, #78716c); font-size: 12px; }
    .visit-record-case-summary strong { font-size: 14px; font-weight: 700; }
    .visit-record-empty { padding: 48px 16px; text-align: center; color: var(--muted, #78716c); font-size: 15px; }
    .visit-record-case-field .record-suggestion-list { position: fixed; inset: auto; z-index: 160; text-align: left; }
    .visit-record-case-field .record-suggestion-option { justify-content: flex-start; text-align: left; }
    .visit-row-actions { display: flex; gap: 5px; flex-wrap: nowrap; }

    .appointment-page {
      display: grid;
      gap: 12px;
      padding: 14px;
    }

    .todo-center-page {
      user-select: none;
    }

    .todo-center-title {
      margin-bottom: 12px;
      color: var(--stone);
      font-size: 28px;
      font-weight: 900;
      line-height: 1.15;
      letter-spacing: 0;
    }

    .todo-center-page table tbody tr {
      cursor: default;
    }

    .todo-center-page table tbody tr:hover > td {
      background: #fff7ed;
    }

    body.custom-page-no-row-hover .appointment-page table tbody tr {
      cursor: default;
    }

    body.custom-page-no-row-hover .appointment-page table tbody tr:hover > td {
      background: #fff7ed !important;
    }

    .todo-center-page button,
    .todo-center-page a {
      user-select: none;
    }

    .appointment-toolbar {
      display: grid;
      grid-template-columns: minmax(180px, 1.4fr) repeat(5, minmax(120px, 1fr)) auto auto auto;
      gap: 10px;
      align-items: end;
      padding: 12px;
      border-radius: 20px;
      background: #fafaf9;
      border: 2px solid #f5f5f4;
    }

    .appointment-toolbar label {
      min-width: 0;
    }

    .appointment-toolbar input,
    .appointment-toolbar select,
    .appointment-toolbar button {
      min-height: 40px;
      border-radius: 13px;
      font-size: 13px;
    }

    .appointment-toolbar .toolbar-small-button {
      width: 76px;
      min-width: 76px;
      justify-content: center;
      padding: 0 10px;
    }

    .leave-substitution-toolbar {
      grid-template-columns: repeat(3, minmax(180px, 1fr)) max-content max-content;
    }

    .leave-substitution-toolbar .leave-toolbar-button {
      width: max-content;
      min-width: max-content;
      padding: 0 14px;
      justify-content: center;
      text-align: center;
      white-space: nowrap;
    }

    .visit-planning-toolbar.client-view,
    .visit-planning-toolbar.record-view {
      grid-template-columns: minmax(0, 1fr) auto;
    }

    .visit-toolbar-filters {
      display: grid;
      grid-template-columns: repeat(4, minmax(120px, 1fr));
      gap: 10px;
      align-items: end;
    }

    .visit-planning-toolbar.record-view { --visit-control-width: 96px; display: flex; flex-wrap: wrap; }
    .visit-planning-toolbar.record-view > .visit-toolbar-filters {
      flex: 0 0 auto;
      min-width: 0;
      grid-template-columns: repeat(2, 180px);
    }
    .visit-planning-toolbar.record-view > .visit-toolbar-actions { flex-wrap: wrap; }
    .visit-planning-toolbar.record-view .visit-toolbar-action { width: var(--visit-control-width); min-width: var(--visit-control-width); padding-inline: 8px; }
    .visit-planning-toolbar.record-view > .visit-toolbar-filters input,
    .visit-planning-toolbar.record-view > .visit-toolbar-filters select,
    .visit-planning-toolbar.record-view .visit-toolbar-action { height: 40px; min-height: 40px; box-sizing: border-box; }
    .visit-record-detail-filters {
      flex: 1 1 100%;
      min-width: 0;
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 10px;
      align-items: end;
    }

    .visit-planning-toolbar button {
      width: 100%;
      min-width: 0;
      justify-content: center;
    }

    .visit-planning-toolbar .visit-toolbar-action {
      width: 132px;
      min-width: 132px;
      padding-inline: 10px;
    }

    .visit-planning-toolbar .visit-toolbar-action:disabled { opacity: .45 !important; cursor: not-allowed; }

    .visit-toolbar-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      justify-content: flex-end;
      white-space: nowrap;
    }

    .anomaly-toolbar {
      grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
    }

    .anomaly-toolbar-actions {
      display: inline-flex;
      gap: 8px;
      align-items: end;
      justify-content: flex-end;
      white-space: nowrap;
    }

    .anomaly-select-cell {
      text-align: center;
    }

    .anomaly-select-box {
      width: 16px;
      height: 16px;
      min-height: 0;
      margin: 0;
      vertical-align: middle;
      accent-color: var(--orange);
    }

    .table-action-button.batch-select {
      background: #1f2937;
    }

    .table-action-button.batch-clear {
      background: #57534e;
    }

    .table-action-button.batch-confirm {
      background: var(--orange);
    }

    .table-action-button.batch-ignore {
      background: #16a34a;
    }

    .table-action-button.batch-reopen {
      background: var(--orange-dark);
    }

    .appointment-summary {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
    }

    .visit-view-switch {
      display: inline-flex;
      gap: 6px;
      padding: 4px;
      border: 1px solid #e7e5e4;
      border-radius: 12px;
      background: #fafaf9;
    }

    .visit-view-switch .table-action-button {
      min-height: 36px;
      background: transparent;
      color: #57534e;
    }

    .visit-view-switch .table-action-button.active {
      background: #fef3c7;
      color: #78350f;
      box-shadow: inset 0 0 0 1px #fde68a;
    }

    .visit-client-detail {
      color: #78716c;
      font-size: 12px;
      line-height: 1.55;
    }

    .visit-service-group-row td {
      padding: 11px 14px !important;
      border-top: 1px solid;
      border-bottom: 1px solid;
      font-size: 12px;
      font-weight: 900;
    }

    .visit-service-group-heading,
    .visit-service-badge {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      font-weight: 900;
    }

    .visit-service-group-heading small {
      font-size: 11px;
      font-weight: 800;
      opacity: 0.82;
    }

    .visit-service-dot {
      width: 10px;
      height: 10px;
      flex: 0 0 auto;
      border-radius: 999px;
      background: currentColor;
    }

    .visit-service-badge {
      border: 1px solid;
      border-radius: 8px;
      padding: 4px 8px;
      font-size: 11px;
      white-space: nowrap;
    }

    .visit-service-group-row.home td,
    .visit-service-badge.home {
      border-color: #fed7aa;
      background: #fff7ed;
      color: #c2410c;
    }

    .visit-service-group-row.respite td,
    .visit-service-badge.respite {
      border-color: #a7f3d0;
      background: #ecfdf5;
      color: #047857;
    }

    .visit-service-group-row.short-care td,
    .visit-service-badge.short-care {
      border-color: #bfdbfe;
      background: #eff6ff;
      color: #1d4ed8;
    }

    .visit-service-group-row.other td,
    .visit-service-badge.other {
      border-color: #e7e5e4;
      background: #fafaf9;
      color: #57534e;
    }

    .visit-map-backdrop {
      width: min(1800px, calc(100vw - 24px));
      height: min(1000px, calc(100vh - 24px));
      height: min(1000px, calc(100dvh - 24px));
      max-width: none;
      max-height: none;
      margin: auto;
      padding: 0;
      border: 0;
      border-radius: 10px;
      overflow: hidden;
      background: transparent;
      box-shadow: 0 28px 80px rgba(28, 25, 23, 0.36);
    }

    .visit-map-backdrop:not([open]) {
      display: none;
    }

    .visit-map-backdrop::backdrop {
      background: rgba(28, 25, 23, 0.62);
      backdrop-filter: blur(2px);
      -webkit-backdrop-filter: blur(2px);
    }

    .visit-map-backdrop.hidden { display: none; }

    .visit-map-panel {
      width: 100%;
      height: 100%;
      min-height: 0;
      display: grid;
      grid-template-rows: auto auto auto minmax(0, 1fr);
      overflow: hidden;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      box-shadow: none;
    }

    .visit-map-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 16px;
      border-bottom: 1px solid #e7e5e4;
      background: #fff7ed;
    }

    .visit-map-head strong { color: #292524; font-size: 18px; font-weight: 950; }

    .visit-map-filters {
      display: grid;
      grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(140px, .8fr)) auto;
      gap: 8px;
      align-items: end;
      padding: 10px 16px;
      border-bottom: 1px solid #e7e5e4;
      background: #fff;
    }

    .visit-map-filters label {
      min-width: 0;
      display: grid;
      gap: 4px;
      color: #57534e;
      font-size: 11px;
      font-weight: 900;
    }

    .visit-map-filters input,
    .visit-map-filters select,
    .visit-map-filters button {
      width: 100%;
      min-width: 0;
      min-height: 38px;
      border-radius: 7px;
      font-size: 12px;
    }

    .visit-map-filters button {
      padding-inline: 13px;
      white-space: nowrap;
    }

    .visit-map-close {
      width: 38px;
      height: 38px;
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      padding: 0;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      background: #fff;
      color: #57534e;
      cursor: pointer;
    }

    .visit-map-summary {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px 16px;
      padding: 10px 16px;
      border-bottom: 1px solid #e7e5e4;
      color: #57534e;
      font-size: 12px;
      font-weight: 850;
    }

    .visit-map-legend { display: inline-flex; align-items: center; gap: 5px; }
    .visit-map-legend::before { width: 9px; height: 9px; border-radius: 50%; background: var(--visit-map-color); content: ''; }
    .visit-map-legend.home { --visit-map-color: #f97316; }
    .visit-map-legend.respite { --visit-map-color: #10b981; }
    .visit-map-legend.short-care { --visit-map-color: #3b82f6; }
    .visit-map-legend.other { --visit-map-color: #78716c; }

    .visit-map-body { height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); overflow: hidden; background: #f5f5f4; }
    .visit-map-client-list { height: 100%; min-height: 0; overflow: auto; padding: 10px; border-right: 1px solid #e7e5e4; background: #fff; }
    .visit-map-client-button { width: 100%; display: grid; gap: 4px; margin: 0 0 7px; padding: 10px 11px; border: 1px solid #e7e5e4; border-radius: 6px; background: #fff; color: #44403c; text-align: left; cursor: pointer; }
    .visit-map-client-button:hover, .visit-map-client-button.active { border-color: #fdba74; background: #fff7ed; box-shadow: inset 3px 0 0 #f97316; }
    .visit-map-client-button.overview { min-height: 48px; display: flex; align-items: center; gap: 9px; margin-bottom: 10px; border-color: #fed7aa; background: #fffaf5; }
    .visit-map-client-button.overview i { flex: 0 0 auto; color: #ea580c; font-size: 19px; }
    .visit-map-client-button strong { color: #1c1917; font-size: 14px; font-weight: 950; }
    .visit-map-client-button span { color: #78716c; font-size: 11px; font-weight: 750; line-height: 1.4; }
    .visit-map-client-button:disabled { cursor: not-allowed; opacity: .56; }
    .visit-map-google { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; background: #f5f5f4; }
    .visit-map-google iframe { width: 100%; height: 100%; min-height: 420px; display: block; border: 0; background: #f5f5f4; }
    .visit-map-overview { width: 100%; height: 100%; min-height: 420px; background: #f5f5f4; }
    .visit-map-overview.leaflet-container { font-family: "Noto Sans TC", sans-serif; }
    .visit-map-marker-shell { border: 0; background: transparent; }
    .visit-map-empty { height: 100%; min-height: 420px; display: grid; place-items: center; padding: 24px; color: #78716c; text-align: center; font-weight: 850; }
    .visit-map-google-actions { position: absolute; right: 12px; bottom: 12px; z-index: 2; }
    .visit-map-google-actions a { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 6px; background: #f97316; color: #fff; font-size: 12px; font-weight: 900; text-decoration: none; box-shadow: 0 5px 18px rgba(28,25,23,.2); }
    .visit-map-marker { width: 30px; height: 30px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); background: var(--visit-map-color); color: #fff; box-shadow: 0 4px 12px rgba(28, 25, 23, 0.28); }
    .visit-map-marker i { transform: rotate(45deg); font-size: 15px; }
    .visit-map-marker.home { --visit-map-color: #f97316; }
    .visit-map-marker.respite { --visit-map-color: #10b981; }
    .visit-map-marker.short-care { --visit-map-color: #3b82f6; }
    .visit-map-marker.other { --visit-map-color: #78716c; }
    .visit-map-popup { min-width: 220px; display: grid; gap: 5px; color: #44403c; font-family: "Noto Sans TC", sans-serif; }
    .visit-map-popup strong { color: #1c1917; font-size: 15px; font-weight: 950; line-height: 1.4; }
    .visit-map-popup span { font-size: 12px; line-height: 1.45; }
    .visit-map-popup .visit-map-popup-plan { font-size: 13px; font-weight: 900; }
    .visit-map-popup .visit-map-popup-plan.home { color: #c2410c; }
    .visit-map-popup .visit-map-popup-plan.respite { color: #047857; }
    .visit-map-popup .visit-map-popup-plan.short-care { color: #1d4ed8; }
    .visit-map-popup .visit-map-popup-plan.other { color: #57534e; }
    .visit-map-popup .visit-map-popup-status { color: #57534e; font-size: 12px; font-weight: 750; }
    .visit-map-popup .visit-map-popup-address { color: #78716c; font-size: 12px; font-weight: 700; }
    .visit-map-popup a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; margin-top: 3px; border-radius: 6px; background: #f97316; color: #fff !important; font-size: 12px; font-weight: 900; text-decoration: none; }

    @media (max-width: 720px) {
      .visit-map-backdrop { width: 100%; height: 100vh; height: 100dvh; margin: 0; padding: 0; border-radius: 0; }
      .visit-map-panel { width: 100%; height: 100vh; height: 100dvh; min-height: 0; max-height: none; border: 0; border-radius: 0; }
      .visit-map-filters { grid-template-columns: 1fr 1fr; padding: 8px 10px; }
      .visit-map-filters .visit-map-filter-keyword,
      .visit-map-filters .visit-map-filter-reset { grid-column: 1 / -1; }
      .visit-map-body { grid-template-columns: 1fr; grid-template-rows: minmax(130px, 30vh) minmax(0, 1fr); }
      .visit-map-client-list { border-right: 0; border-bottom: 1px solid #e7e5e4; }
      .visit-map-google iframe, .visit-map-empty { min-height: 0; }
    }

    @media (max-width: 1200px) {
      .visit-planning-toolbar.client-view,
      .visit-planning-toolbar.record-view {
        grid-template-columns: minmax(0, 1fr);
      }

      .visit-toolbar-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        flex-wrap: wrap;
      }

      .visit-record-detail-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }

    @media (max-width: 720px) {
      .visit-toolbar-filters,
      .visit-record-detail-filters {
        grid-template-columns: 1fr;
      }

      .visit-planning-toolbar.record-view > .visit-toolbar-filters { grid-template-columns: 180px; }

      .visit-toolbar-actions {
        justify-content: stretch;
      }

      .visit-planning-toolbar .visit-toolbar-action {
        flex: 1 1 calc(50% - 6px);
        width: auto;
        min-width: 120px;
      }
      .visit-planning-toolbar.record-view .visit-toolbar-action {
        flex: 0 0 var(--visit-control-width);
        width: var(--visit-control-width);
        min-width: var(--visit-control-width);
      }
    }

    body.custom-page-no-row-hover .appointment-page table tbody tr.visit-service-group-row.home:hover > td { background: #fff7ed !important; }
    body.custom-page-no-row-hover .appointment-page table tbody tr.visit-service-group-row.respite:hover > td { background: #ecfdf5 !important; }
    body.custom-page-no-row-hover .appointment-page table tbody tr.visit-service-group-row.short-care:hover > td { background: #eff6ff !important; }
    body.custom-page-no-row-hover .appointment-page table tbody tr.visit-service-group-row.other:hover > td { background: #fafaf9 !important; }

    .appointment-check {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      border-radius: 999px;
      background: #dcfce7;
      color: #15803d;
      font-weight: 950;
    }

    .appointment-pending {
      color: #c2410c;
      font-weight: 950;
    }

    .client-editor {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .client-editor label {
      gap: 3px;
      font-size: 12px;
    }




    .client-profile-wrap {
      display: grid;
      gap: 14px;
      padding: 14px;
      min-width: 1040px;
      overflow: visible;
      background: #fff;
    }

    .client-profile-filter {
      position: relative;
      z-index: 80;
      display: grid;
      grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
      gap: 12px;
      align-items: end;
      padding: 14px;
      border: 2px solid #f5f5f4;
      border-radius: 24px;
      background: #fffaf4;
    }

    .client-profile-filter label {
      margin: 0;
      color: #1f2937;
      font-weight: 900;
    }

    .client-profile-selector {
      position: relative;
      display: grid;
      gap: 5px;
      min-width: 0;
      color: #1f2937;
      font-size: 13px;
      font-weight: 900;
    }

    .client-profile-selector:focus-within {
      z-index: 1000;
    }

    .client-profile-search-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }

    .client-profile-search-wrap > i {
      position: absolute;
      left: 14px;
      z-index: 1;
      color: #a8a29e;
      font-size: 18px;
      pointer-events: none;
    }

    .client-profile-search-wrap > .ph-caret-down {
      right: 14px;
      left: auto;
      font-size: 16px;
    }

    .client-profile-search-wrap input {
      height: 52px;
      min-height: 52px;
      padding: 0 40px;
      border-color: #fed7aa;
      border-radius: 16px;
      background: #fff;
      color: #111827;
      font-family: inherit;
      font-size: 15px;
      font-weight: 900;
    }

    .client-profile-options {
      position: fixed;
      z-index: 10000;
      top: 0;
      left: 0;
      right: auto;
      max-height: 330px;
      overflow-y: auto;
      padding: 7px;
      border: 1px solid #fed7aa;
      border-radius: 14px;
      background: #fff;
      box-shadow: 0 16px 34px rgba(31, 41, 55, 0.2);
    }

    .client-profile-options[hidden],
    .client-profile-option[hidden] {
      display: none;
    }

    .client-profile-option-count {
      display: block;
      padding: 5px 9px 8px;
      color: #78716c;
      font-size: 11px;
      font-weight: 800;
    }

    .client-profile-option {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      width: 100%;
      min-height: 44px;
      padding: 8px 10px;
      border: 0;
      border-radius: 9px;
      background: #fff;
      color: #292524;
      text-align: left;
      cursor: pointer;
    }

    .client-profile-option:hover,
    .client-profile-option:focus-visible,
    .client-profile-option.active {
      background: #fff7ed;
      color: #9a3412;
      outline: none;
    }

    .client-profile-option strong {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 14px;
    }

    .client-profile-option small {
      color: #78716c;
      font-size: 11px;
      white-space: nowrap;
    }

    .client-profile-option-empty {
      padding: 14px 9px;
      color: #a8a29e;
      font-size: 12px;
      text-align: center;
    }

    .client-profile-filter select {
      height: 52px;
      min-height: 52px;
      padding: 0 14px;
      background: #fff;
      border-color: #fed7aa;
      color: #111827;
      font-family: inherit;
      font-size: 15px;
      font-weight: 900;
      line-height: 1.4;
    }

    .client-profile-summary {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      color: #78716c;
      font-size: 13px;
      font-weight: 900;
    }

    .client-profile-summary span {
      display: inline-flex;
      align-items: center;
      min-height: 30px;
      border-radius: 999px;
      padding: 4px 10px;
      background: #fff;
      border: 1px solid #fed7aa;
      color: #9a3412;
    }

    .client-profile-header {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      padding: 16px;
      border-radius: 24px;
      background: #fff7ed;
      color: #1f2937;
    }

    .client-profile-title {
      display: grid;
      gap: 4px;
    }

    .client-profile-title strong {
      font-size: 22px;
      font-weight: 900;
    }

    .client-profile-title span {
      color: #78716c;
      font-size: 13px;
      font-weight: 900;
    }

    .client-profile-status {
      border-radius: 999px;
      padding: 8px 12px;
      background: #dcfce7;
      color: #166534;
      font-size: 13px;
      font-weight: 900;
      white-space: nowrap;
    }

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

    .client-profile-section {
      border: 2px solid #f5f5f4;
      border-radius: 22px;
      overflow: hidden;
      background: #fff;
    }

    .client-profile-section.full {
      grid-column: 1 / -1;
    }

    .client-profile-section h3 {
      margin: 0;
      padding: 12px 14px;
      background: #fafaf9;
      color: #1f2937;
      font-size: 15px;
      font-weight: 900;
      border-bottom: 2px solid #f5f5f4;
    }

    .client-profile-fields {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-profile-field {
      min-height: 54px;
      padding: 10px 12px;
      border-right: 1px solid #f5f5f4;
      border-bottom: 1px solid #f5f5f4;
      display: grid;
      gap: 3px;
      align-content: start;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .client-profile-label {
      color: #a8a29e;
      font-size: 12px;
      font-weight: 900;
    }

    .client-field-tone-red {
      color: #dc2626 !important;
    }

    .client-field-tone-green {
      color: #15803d !important;
    }

    .client-field-tone-blue {
      color: #1d4ed8 !important;
    }

    .client-field-tone-amber {
      color: #d97706 !important;
    }

    .client-profile-value {
      color: #292524;
      font-size: 14px;
      font-weight: 900;
      line-height: 1.45;
      white-space: pre-line;
    }

    .client-profile-value.empty {
      color: #d6d3d1;
    }

    .client-profile-history-field {
      grid-column: 1 / -1;
      padding: 0;
      border-right: 0;
    }

    .client-profile-history-list {
      display: grid;
    }

    .client-profile-history-toggle > summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 46px;
      padding: 10px 14px;
      color: #44403c;
      font-size: 13px;
      font-weight: 900;
      list-style: none;
      cursor: pointer;
    }

    .client-profile-history-toggle > summary::-webkit-details-marker {
      display: none;
    }

    .client-profile-history-summary-meta {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .client-profile-history-summary-action {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex: 0 0 auto;
      color: #78716c;
      font-weight: 800;
    }

    .client-profile-history-summary-action i {
      transition: transform 160ms ease;
    }

    .client-profile-history-summary-action-label::before {
      content: '展開查看';
    }

    .client-profile-history-toggle[open] > summary {
      border-bottom: 1px solid #e7e5e4;
    }

    .client-profile-history-toggle[open] .client-profile-history-summary-action i {
      transform: rotate(180deg);
    }

    .client-profile-history-toggle[open] .client-profile-history-summary-action-label::before {
      content: '收合歷程';
    }

    .client-profile-history-item {
      padding: 12px 14px 14px;
      border-bottom: 1px solid #e7e5e4;
    }

    .client-profile-history-item:last-child {
      border-bottom: 0;
    }

    .client-profile-history-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
      color: #57534e;
      font-size: 13px;
      font-weight: 900;
    }

    .client-profile-history-source {
      color: #78716c;
      font-weight: 700;
    }

    .client-profile-history-details {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      border-top: 1px solid #f5f5f4;
      border-left: 1px solid #f5f5f4;
    }

    .client-profile-history-row {
      display: grid;
      grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr);
      border-right: 1px solid #f5f5f4;
      border-bottom: 1px solid #f5f5f4;
    }

    .client-profile-history-row dt,
    .client-profile-history-row dd {
      margin: 0;
      padding: 8px 10px;
      overflow-wrap: anywhere;
    }

    .client-profile-history-row dt {
      background: #fafaf9;
      color: #78716c;
      font-size: 12px;
      font-weight: 900;
    }

    .client-profile-history-row dd {
      color: #292524;
      font-size: 13px;
      font-weight: 800;
      white-space: pre-line;
    }

    .client-profile-service-table {
      width: 100%;
      min-width: 0;
      border-collapse: collapse;
    }

    .client-profile-service-table th,
    .client-profile-service-table td {
      border: 1px solid #f5f5f4;
      padding: 10px 12px;
      white-space: normal;
      text-align: left;
      color: #292524;
      font-size: 13px;
      font-weight: 900;
    }

    .client-profile-service-table th {
      position: static;
      background: #fff7ed;
      color: #9a3412;
    }

    .client-profile-empty {
      padding: 22px;
      border: 2px dashed #fed7aa;
      border-radius: 22px;
      background: #fffaf4;
      color: #a8a29e;
      font-size: 15px;
      font-weight: 900;
      text-align: center;
    }

    .client-profile-panel {
      display: grid;
      gap: 10px;
      color: #57534e;
      font-weight: 900;
      line-height: 1.55;
    }

    .client-profile-panel-card {
      padding: 12px;
      border: 2px solid #f5f5f4;
      border-radius: 18px;
      background: #fafaf9;
      display: grid;
      gap: 6px;
    }

    .client-profile-panel-card strong {
      color: #1f2937;
      font-size: 16px;
    }

    .client-profile-panel button {
      border: 0;
      border-radius: 14px;
      min-height: 42px;
      background: var(--orange);
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .client-import-panel {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #f4fbf8;
    }

    .client-import-panel strong {
      display: block;
      color: var(--ink);
      font-size: 15px;
      line-height: 1.4;
    }

    .client-import-panel span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .client-import-actions {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: wrap;
    }

    .client-import-actions button,
    .client-import-actions .client-import-file {
      min-height: 38px;
    }

    .client-import-file {
      position: relative;
      overflow: hidden;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-height: 38px;
      margin: 0;
      padding: 0 14px;
      border-radius: 8px;
      background: var(--line);
      color: #fff;
      font-weight: 900;
      cursor: pointer;
      white-space: nowrap;
    }

    .client-import-file input {
      position: absolute;
      inset: 0;
      opacity: 0;
      cursor: pointer;
    }

    .client-import-status {
      grid-column: 1 / -1;
      min-height: 18px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
    }

    .client-identity-section {
      grid-column: 1 / -1;
      display: grid;
      gap: 10px;
      padding: 14px;
      border: 2px solid #bfdbfe;
      border-radius: 12px;
      background: #eff6ff;
    }

    .client-identity-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: #1e3a8a;
      font-size: 15px;
      font-weight: 900;
    }

    .client-identity-title span {
      color: #475569;
      font-size: 12px;
    }

    .client-identity-row {
      display: grid;
      grid-template-columns: minmax(130px, .8fr) minmax(130px, .8fr) minmax(150px, 1fr) 38px;
      gap: 8px;
      align-items: end;
      padding: 8px;
      border: 1px solid #bfdbfe;
      border-radius: 10px;
      background: #fff;
    }

    .client-identity-row button {
      min-height: 34px;
      border: 0;
      border-radius: 10px;
      background: #ef4444;
      color: #fff;
      cursor: pointer;
    }

    .client-identity-actions {
      display: flex;
      justify-content: flex-end;
    }

    .client-identity-actions button {
      min-height: 36px;
      border: 0;
      border-radius: 12px;
      padding: 0 14px;
      background: #1d4ed8;
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .client-status-section {
      grid-column: 1 / -1;
      display: grid;
      gap: 10px;
      padding: 14px;
      border: 2px solid #fde68a;
      border-radius: 12px;
      background: #fffbeb;
    }

    .client-status-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: #92400e;
      font-size: 15px;
      font-weight: 900;
    }

    .client-status-title span {
      color: #78716c;
      font-size: 12px;
    }

    .client-status-fields {
      display: grid;
      grid-template-columns: minmax(150px, .7fr) minmax(160px, .8fr) minmax(230px, 1.2fr);
      gap: 8px;
      align-items: end;
    }

    .client-status-fields label {
      grid-template-rows: 18px 40px;
      gap: 4px;
      align-self: stretch;
    }

    .client-status-fields input,
    .client-status-fields select,
    .client-status-fields .system-date-shell {
      height: 40px;
      min-height: 40px;
    }

    .client-status-fields .client-status-note {
      grid-column: 1 / -1;
      grid-template-rows: 18px 76px;
    }

    .client-status-fields .client-status-note textarea {
      height: 76px;
      min-height: 76px;
      resize: vertical;
      line-height: 1.55;
    }

    .client-status-history {
      display: grid;
      gap: 6px;
    }

    .client-status-history-row {
      display: grid;
      grid-template-columns: 110px 110px minmax(160px, .8fr) minmax(0, 1.4fr) auto;
      gap: 8px;
      align-items: center;
      padding: 8px 10px;
      border: 1px solid #fde68a;
      border-radius: 8px;
      background: #fff;
      color: #44403c;
      font-size: 13px;
      font-weight: 800;
    }

    .client-status-history-row strong {
      color: #9a3412;
    }

    .client-status-history-row.readonly {
      grid-template-columns: 110px 110px minmax(160px, .8fr) minmax(0, 1.4fr);
    }

    .client-status-history-row-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
    }

    .client-status-history-editor {
      display: grid;
      grid-template-columns: minmax(150px, .7fr) minmax(160px, .8fr) minmax(220px, 1.1fr);
      gap: 8px;
      padding: 12px;
      border: 1px solid #f59e0b;
      border-radius: 8px;
      background: #fff;
    }

    .client-status-history-editor[hidden] {
      display: none;
    }

    .client-status-history-editor label {
      grid-template-rows: 18px 40px;
      gap: 4px;
    }

    .client-status-history-editor input,
    .client-status-history-editor select {
      height: 40px;
      min-height: 40px;
    }

    .client-status-history-editor .history-note {
      grid-column: 1 / -1;
    }

    .client-status-history-editor .history-note textarea {
      min-height: 72px;
      resize: vertical;
    }

    .client-status-history-actions {
      grid-column: 1 / -1;
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    .client-service-section {
      grid-column: 1 / -1;
      display: grid;
      gap: 10px;
      padding: 14px;
      border: 2px solid #fed7aa;
      border-radius: 12px;
      background: #fff7ed;
    }

    .client-service-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: #9a3412;
      font-size: 15px;
      font-weight: 900;
    }

    .client-service-title span {
      color: #78716c;
      font-size: 12px;
      font-weight: 800;
    }

    .client-service-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
    }

    .client-service-actions button {
      border: 0;
      border-radius: 12px;
      min-height: 36px;
      padding: 0 14px;
      background: #1f2937;
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .client-service-actions button:disabled {
      opacity: 0.45;
      cursor: default;
    }

    .client-service-pair.hidden {
      display: none;
    }

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

    .client-service-pair {
      display: grid;
      grid-template-columns: minmax(0, 1.4fr) minmax(86px, 0.6fr);
      gap: 6px;
      align-items: end;
      padding: 8px;
      border: 1px solid #fed7aa;
      border-radius: 10px;
      background: #fff;
    }

    .client-service-pair label {
      margin: 0;
    }

    .client-editor input,
    .client-editor select,
    .client-editor textarea {
      min-height: 34px;
      border-radius: 12px;
      padding: 6px 9px;
      font-size: 12px;
    }

    .client-editor textarea {
      min-height: 44px;
    }

    .client-editor label:has(textarea),
    .client-editor .actions,
    .client-editor .danger {
      grid-column: span 2;
    }

    .actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 4px;
    }

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

    .actions .save-future {
      border-color: #2563eb;
      background: #dbeafe;
      color: #1e3a8a;
      font-weight: 900;
    }

    .recurring-delete {
      width: 100%;
      min-height: 40px;
      margin-top: 8px;
      border: 0;
      border-radius: 14px;
      background: #b91c1c;
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .recurring-delete:hover {
      background: #991b1b;
      color: #fff;
    }

    .pre-planner-wrap {
      display: grid;
      gap: 12px;
      padding: 12px;
    }

    .pre-planner-toolbar,
    .pre-planner-form {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 8px;
      align-items: end;
      padding: 12px;
      border: 2px solid #fde6d2;
      border-radius: 18px;
      background: #fffaf5;
    }

    .pre-planner-toolbar label,
    .pre-planner-form label {
      display: grid;
      gap: 5px;
      color: #78716c;
      font-size: 12px;
      font-weight: 900;
    }

    .pre-planner-toolbar input,
    .pre-planner-toolbar select,
    .pre-planner-form input,
    .pre-planner-form select,
    .pre-planner-form textarea {
      width: 100%;
      min-height: 42px;
      border: 2px solid #fde6d2;
      border-radius: 13px;
      padding: 8px 10px;
      background: #fff;
      color: #44403c;
      font: inherit;
      font-weight: 800;
    }

    .pre-planner-form .wide {
      grid-column: span 2;
    }

    .pre-planner-actions {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }

    .pre-planner-actions button,
    .pre-planner-toolbar button,
    .pre-planner-form button {
      min-height: 42px;
      border: 0;
      border-radius: 13px;
      padding: 0 13px;
      font-weight: 900;
      cursor: pointer;
      background: #f97316;
      color: #fff;
    }

    .pre-planner-actions button.secondary,
    .pre-planner-toolbar button.secondary,
    .pre-planner-form button.secondary {
      background: #fff7ed;
      color: #c2410c;
      border: 2px solid #fed7aa;
    }

    .pre-planner-actions button.danger {
      background: #dc2626;
      color: #fff;
    }


    .pre-planner-toolbar label,
    .pre-planner-form label {
      min-height: 66px;
      grid-template-rows: 17px 46px;
      align-items: end;
      line-height: 1.2;
    }

    .pre-planner-toolbar input,
    .pre-planner-toolbar select,
    .pre-planner-form input,
    .pre-planner-form select,
    .pre-planner-form textarea {
      height: 46px;
      min-height: 46px;
      line-height: 1.2;
      appearance: auto;
    }

    .pre-planner-form textarea {
      resize: vertical;
    }

    .pre-planner-toolbar > button,
    .pre-planner-toolbar > .pre-planner-actions,
    .pre-planner-form > .pre-planner-actions {
      min-height: 66px;
      align-self: stretch;
      display: flex;
      align-items: end;
    }

    .pre-planner-actions button,
    .pre-planner-toolbar button,
    .pre-planner-form button {
      height: 46px;
      min-height: 46px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      line-height: 1.2;
      white-space: nowrap;
    }

    .pre-planner-actions {
      min-width: 0;
    }

    .pre-planner-service-list {
      grid-column: 1 / -1;
      display: grid;
      gap: 8px;
      padding: 10px;
      border: 2px dashed #fed7aa;
      border-radius: 16px;
      background: #fff;
    }

    .pre-planner-service-title {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      color: #9a3412;
      font-size: 12px;
      font-weight: 950;
    }

    .pre-planner-service-list .service-detail-row {
      grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(110px, .6fr)) 42px;
      align-items: stretch;
    }

    .pre-planner-toolbar label,
    .pre-planner-form label,
    .pre-planner-service-list .service-detail-row > label {
      align-self: stretch;
      display: grid;
      grid-template-rows: 18px 46px;
      align-content: end;
    }

    .pre-planner-service-list .service-detail-row > label {
      min-height: 69px;
      gap: 5px;
      color: #78716c;
      font-size: 12px;
      font-weight: 900;
    }

    .pre-planner-service-list .service-detail-row input,
    .pre-planner-service-list .service-detail-row select {
      height: 46px;
      min-height: 46px;
      align-self: end;
    }

    .pre-planner-service-list .service-detail-row button {
      width: 42px;
      height: 46px;
      min-height: 46px;
      padding: 0;
      align-self: end;
    }

    .pre-card-service-list {
      display: grid;
      gap: 2px;
      margin-top: 2px;
    }

    .pre-card-service-list span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .pre-card-employee,
    .pre-card-services-row {
      font-size: 13px;
      line-height: 1.45;
    }

    .pre-card-services-row {
      color: #334155;
      font-weight: 950;
    }


    /* 預班表使用固定欄位盒模型，讓輸入框本身對齊，不受標題字數影響。 */
    .pre-planner-toolbar,
    .pre-planner-form {
      align-items: start;
    }

    .pre-planner-toolbar label,
    .pre-planner-form label,
    .pre-planner-service-list .service-detail-row > label {
      height: 72px;
      min-height: 72px;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      gap: 6px;
      line-height: 1.15;
      overflow: hidden;
    }

    .pre-planner-toolbar input,
    .pre-planner-toolbar select,
    .pre-planner-form input,
    .pre-planner-form select,
    .pre-planner-form textarea,
    .pre-planner-service-list .service-detail-row input,
    .pre-planner-service-list .service-detail-row select {
      flex: 0 0 46px;
      height: 46px;
      min-height: 46px;
      max-height: 46px;
      box-sizing: border-box;
    }

    .pre-planner-toolbar > button,
    .pre-planner-toolbar > .pre-planner-actions,
    .pre-planner-form > .pre-planner-actions {
      height: 72px;
      min-height: 72px;
      align-self: start;
      align-items: flex-end;
    }

    .pre-planner-service-list .service-detail-row {
      align-items: start;
    }

    .pre-planner-service-list .approved-service-note {
      display: none;
    }

    .pre-planner-service-list .service-detail-row button {
      align-self: end;
      margin-bottom: 0;
    }

    .pre-planner-recurring {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(12, minmax(0, 1fr));
      gap: 8px;
      align-items: end;
      padding: 10px;
      border: 2px solid #fde6d2;
      border-radius: 16px;
      background: #fff;
    }

    .pre-planner-recurring-title {
      grid-column: 1 / -1;
      display: grid;
      gap: 2px;
      color: #9a3412;
      font-size: 12px;
      font-weight: 950;
      align-self: end;
      min-height: auto;
    }

    .pre-planner-recurring-title small {
      color: #78716c;
      font-weight: 850;
    }

    .pre-planner-recurring > label {
      grid-column: span 3;
      height: 72px;
      min-height: 72px;
    }

    .pre-weekday-picker {
      grid-column: 1 / span 7;
      display: grid;
      grid-template-columns: repeat(7, minmax(42px, 1fr));
      gap: 6px;
      align-self: end;
      min-width: 0;
    }

    .pre-weekday-picker label {
      height: 46px;
      min-height: 46px;
      max-height: 46px;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 0 6px;
      border: 2px solid #fde6d2;
      border-radius: 13px;
      background: #fff7ed;
      color: #9a3412;
      font-size: 13px;
      font-weight: 950;
      overflow: visible;
      white-space: nowrap;
    }

    .pre-weekday-picker input {
      flex: 0 0 auto;
      width: 14px;
      height: 14px;
      min-height: 14px;
      max-height: 14px;
      margin: 0;
      accent-color: #f97316;
    }

    #prePlannerCreateRecurring {
      grid-column: span 5;
      justify-self: start;
      min-width: 160px;
    }

    .pre-status-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: fit-content;
      min-height: 24px;
      padding: 3px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 950;
      background: #ecfdf5;
      color: #047857;
    }

    .pre-status-badge.status-leave-client {
      background: #fee2e2;
      color: #b91c1c;
    }

    .pre-status-badge.status-leave-staff {
      background: #dbeafe;
      color: #1e3a8a;
    }

    .pre-status-badge.status-visit-missed {
      background: #ffedd5;
      color: #c2410c;
    }

    .pre-status-badge.status-paused {
      background: #f1f5f9;
      color: #475569;
    }


    /* 目前週、居服員與套用操作置於同列，輸出及正式寫入操作另列。 */
    .pre-planner-toolbar {
      grid-template-columns: auto minmax(220px, 1fr) auto minmax(190px, 1fr) auto;
      align-items: center;
    }

    .pre-planner-toolbar > .pre-planner-actions {
      grid-column: 1 / -1;
      justify-content: flex-end;
    }

    .pre-planner-toolbar > button,
    .pre-planner-toolbar > .pre-planner-actions {
      height: 46px;
      min-height: 46px;
      align-self: center;
      align-items: center;
    }

    .pre-planner-toolbar .pre-toolbar-date,
    .pre-planner-toolbar .pre-toolbar-employee {
      height: 46px;
      min-height: 46px;
      max-height: 46px;
      display: grid;
      grid-template-columns: auto minmax(128px, 1fr);
      align-items: center;
      gap: 8px;
      padding: 0 10px;
      border: 2px solid #fde6d2;
      border-radius: 13px;
      background: #fff;
      overflow: hidden;
      align-self: center;
      box-sizing: border-box;
    }

    .pre-planner-toolbar .pre-toolbar-employee {
      grid-template-columns: auto minmax(120px, 1fr);
    }

    .pre-planner-toolbar .pre-toolbar-date span,
    .pre-planner-toolbar .pre-toolbar-employee span {
      color: #9a3412;
      font-size: 12px;
      font-weight: 950;
      white-space: nowrap;
    }

    .pre-planner-toolbar .pre-toolbar-date input,
    .pre-planner-toolbar .pre-toolbar-employee select {
      width: 100%;
      height: 40px;
      min-height: 40px;
      max-height: 40px;
      flex: 1 1 auto;
      border: 0;
      border-radius: 0;
      padding: 0;
      background: transparent;
      box-shadow: none;
      min-width: 0;
      line-height: 40px;
    }

    .pre-planner-toolbar .pre-toolbar-employee select {
      appearance: auto;
      color: #44403c;
      font-size: 13px;
      font-weight: 850;
    }


    .pre-planner-toolbar input,
    .pre-planner-toolbar select,
    .pre-planner-form input,
    .pre-planner-form select,
    .pre-planner-form textarea,
    .pre-planner-service-list .service-detail-row input,
    .pre-planner-service-list .service-detail-row select {
      outline: none;
      -webkit-tap-highlight-color: transparent;
    }

    .pre-planner-toolbar input:focus,
    .pre-planner-toolbar select:focus,
    .pre-planner-form input:focus,
    .pre-planner-form select:focus,
    .pre-planner-form textarea:focus,
    .pre-planner-service-list .service-detail-row input:focus,
    .pre-planner-service-list .service-detail-row select:focus {
      background-color: #fff;
      border-color: #fb923c;
      box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.18);
    }

    .pre-planner-toolbar .pre-toolbar-date:focus-within,
    .pre-planner-toolbar .pre-toolbar-employee:focus-within {
      border-color: #fb923c;
      box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.18);
    }

    .pre-planner-toolbar .pre-toolbar-date input:focus,
    .pre-planner-toolbar .pre-toolbar-employee select:focus {
      background: transparent;
      box-shadow: none;
      border: 0;
    }

    .pre-planner-toolbar input::selection,
    .pre-planner-form input::selection,
    .pre-planner-form textarea::selection,
    .pre-planner-service-list .service-detail-row input::selection {
      background: rgba(251, 146, 60, 0.22);
      color: #1f2937;
    }

    .pre-week-board {
      display: grid;
      grid-template-columns: repeat(7, minmax(150px, 1fr));
      gap: 8px;
      overflow-x: auto;
      padding-bottom: 4px;
    }

    .pre-week-day {
      min-height: 420px;
      border: 2px solid #fde6d2;
      border-radius: 18px;
      background: #fff;
      overflow: hidden;
    }

    .pre-week-day-head {
      padding: 9px 10px;
      background: #fff7ed;
      color: #9a3412;
      font-weight: 900;
      text-align: center;
      border-bottom: 1px solid #fed7aa;
    }

    .pre-week-day-body {
      display: grid;
      gap: 8px;
      padding: 8px;
    }

    .pre-plan-card {
      display: grid;
      gap: 5px;
      border: 1px solid #fed7aa;
      border-left: 5px solid #f97316;
      border-radius: 14px;
      padding: 8px;
      background: #fffaf5;
      font-size: 12px;
      font-weight: 800;
    }

    .pre-plan-card.conflict {
      border-left-color: #dc2626;
      background: #fef2f2;
    }

    .pre-plan-card strong {
      color: #1f2937;
      font-size: 14px;
    }

    .pre-plan-card small {
      color: #78716c;
      font-weight: 900;
      line-height: 1.35;
    }

    .pre-plan-card .pre-card-actions {
      display: flex;
      gap: 6px;
      margin-top: 4px;
    }

    .pre-plan-card .pre-card-actions button {
      min-height: 30px;
      border: 0;
      border-radius: 9px;
      padding: 0 8px;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
    }

    .pre-plan-card .pre-card-actions .edit {
      background: #dbeafe;
      color: #1d4ed8;
    }

    .pre-plan-card .pre-card-actions .delete {
      background: #fee2e2;
      color: #b91c1c;
    }

    @media (max-width: 1100px) {
      .pre-planner-toolbar,
      .pre-planner-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .pre-planner-toolbar > .pre-planner-actions {
        grid-column: 1 / -1;
      }

    }

    @media (max-width: 760px) {
      .client-payment-batch {
        width: 100%;
        flex-wrap: wrap;
      }

      .client-payment-batch select {
        flex: 1 1 150px;
      }

      .client-payment-batch input {
        flex: 1 1 116px;
        width: auto;
      }

      .pre-planner-recurring {
        grid-template-columns: repeat(7, minmax(0, 1fr));
      }

      .pre-planner-recurring > label,
      .pre-weekday-picker,
      #prePlannerCreateRecurring {
        grid-column: 1 / -1;
      }

      .pre-weekday-picker {
        grid-template-columns: repeat(7, minmax(32px, 1fr));
        gap: 4px;
      }

      .pre-weekday-picker label {
        padding: 0 3px;
        font-size: 12px;
      }

      .pre-weekday-picker input {
        width: 12px;
        height: 12px;
        min-height: 12px;
        max-height: 12px;
      }
    }

    .pre-schedule-panel {
      margin-top: 10px;
      border: 2px solid #fde6d2;
      border-radius: 18px;
      background: #fffaf5;
      overflow: hidden;
    }

    .pre-schedule-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 12px;
      background: #fff7ed;
      color: #9a3412;
      font-size: 13px;
      font-weight: 900;
    }

    .pre-schedule-count {
      border-radius: 999px;
      padding: 4px 9px;
      background: #ffedd5;
      color: #c2410c;
      white-space: nowrap;
    }

    .pre-schedule-empty {
      padding: 12px;
      color: #a8a29e;
      font-size: 13px;
      font-weight: 900;
      line-height: 1.45;
    }

    .pre-schedule-scroll {
      max-height: 320px;
      overflow: auto;
    }

    .pre-schedule-table {
      width: 100%;
      min-width: 780px;
      border-collapse: collapse;
      table-layout: fixed;
      font-size: 12px;
    }

    .pre-schedule-table th,
    .pre-schedule-table td {
      border-top: 1px solid #fed7aa;
      padding: 6px;
      text-align: center;
      vertical-align: middle;
    }

    .pre-schedule-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #fff7ed;
      color: #7c2d12;
      font-weight: 900;
    }

    .pre-schedule-table input,
    .pre-schedule-table select {
      width: 100%;
      min-height: 34px;
      border: 1px solid #fed7aa;
      border-radius: 10px;
      padding: 5px 7px;
      background: #fff;
      color: #44403c;
      font: inherit;
      font-weight: 800;
      text-align: center;
    }

    .pre-schedule-table .pre-note {
      text-align: left;
    }

    .pre-schedule-table .pre-remove {
      width: 34px;
      min-height: 34px;
      border: 0;
      border-radius: 10px;
      background: #fee2e2;
      color: #b91c1c;
      display: inline-grid;
      place-items: center;
    }

    .pre-schedule-row.conflict {
      background: #fef2f2;
    }

    .pre-schedule-warning {
      color: #b91c1c;
      font-weight: 900;
      line-height: 1.35;
    }

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

    .status {
      min-height: 22px;
      color: var(--muted);
      font-size: 14px;
      font-weight: 700;
      margin-top: 10px;
    }

    .status.status-error {
      color: var(--danger);
    }

    .board-wrap {
      display: grid;
      gap: 14px;
    }

    .board-toolbar {
      display: grid;
      grid-template-columns: repeat(6, minmax(120px, auto));
      gap: 10px;
      align-items: end;
      background: #fafaf9;
      border: 2px solid #f5f5f4;
      border-radius: 28px;
      padding: 14px;
    }

    .board-toolbar label {
      gap: 4px;
    }

    .board-toolbar button {
      border: 0;
      border-radius: 16px;
      min-height: 44px;
      padding: 0 14px;
      background: #67c09b;
      color: white;
      font-weight: 900;
      cursor: pointer;
    }

    .board-toolbar .month-arrow {
      min-width: 44px;
      padding: 0;
      background: #1f2937;
      font-size: 18px;
    }

    .board-toolbar .query-reset {
      background: #78716c;
      color: #fff;
    }

    .board-toolbar .month-arrow:hover {
      background: var(--orange);
    }

    .toggle-row {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 44px;
      color: #57534e;
      font-weight: 900;
    }

    .toggle-row input {
      width: auto;
      min-height: auto;
      accent-color: var(--orange);
    }

    .legend {
      background: white;
      border: 2px solid #f5f5f4;
      border-radius: 22px;
      padding: 12px 14px;
      color: #57534e;
      font-size: 13px;
      font-weight: 900;
      line-height: 1.8;
    }

    .legend strong {
      color: #ef4444;
      margin-right: 4px;
    }

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

    .board-legend-copy {
      min-width: 0;
    }

    .board-legend .schedule-lock-badge {
      justify-self: end;
    }

    .summary-bar {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      overflow: visible;
      background: #d9f4e9;
      border-radius: 24px 24px 0 0;
      padding: 10px 12px;
      font-weight: 900;
      color: #111827;
    }

    .board-summary-metrics,
    .board-summary-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .board-summary-metrics {
      flex-wrap: wrap;
      overflow: visible;
    }

    .board-summary-actions {
      justify-content: flex-start;
      flex-wrap: wrap;
    }

    .board-summary-metrics > span,
    .board-summary-actions > button,
    .board-summary-actions > details {
      flex: 0 0 auto;
      white-space: nowrap;
    }

    .board-realtime-status {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      min-height: 40px;
      padding: 0 14px;
      border: 1px solid #d6d3d1;
      border-radius: 999px;
      background: #fafaf9;
      color: #78716c;
      font-size: 12px;
      font-weight: 900;
      line-height: 1;
      white-space: nowrap;
    }

    .board-realtime-status-detail {
      font-size: 10px;
      opacity: .72;
    }

    .board-realtime-status i {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #a8a29e;
      box-shadow: 0 0 0 3px rgba(168, 162, 158, .14);
    }

    .board-realtime-status.connected {
      border-color: #bbd8c9;
      background: #f1f8f4;
      color: #356854;
    }

    .board-realtime-status.connected i,
    .board-realtime-status.synced i {
      background: #4f8a70;
      box-shadow: 0 0 0 3px rgba(79, 138, 112, .15);
    }

    .board-realtime-status.connecting,
    .board-realtime-status.fallback {
      border-color: #e5d3ac;
      background: #fffbeb;
      color: #80651d;
    }

    .board-realtime-status.connecting i,
    .board-realtime-status.fallback i {
      background: #b7791f;
      box-shadow: 0 0 0 3px rgba(183, 121, 31, .14);
    }

    .board-realtime-status.synced {
      border-color: #9cc7b4;
      background: #f1f8f4;
      color: #2f654e;
    }

    .toolbar .board-security-status {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 40px;
      padding: 0 14px;
      border: 1px solid #bbf7d0;
      border-radius: 999px;
      background: #f0fdf4;
      color: #15803d;
      font: inherit;
      font-size: 12px;
      font-weight: 900;
      line-height: 1;
      white-space: nowrap;
      box-shadow: none;
    }

    .toolbar .board-security-status:hover { filter: brightness(.98); transform: none; }
    .toolbar .board-security-status.info { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
    .toolbar .board-security-status.warning { border-color: #fde68a; background: #fffbeb; color: #a16207; }
    .toolbar .board-security-status.critical { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
    .toolbar .board-security-status.unknown { border-color: #e7e5e4; background: #fafaf9; color: #78716c; }

    @media (max-width: 760px) {
      .board-realtime-status-detail { display: none; }
    }

    .summary-bar button {
      border: 0;
      border-radius: 10px;
      background: #67c09b;
      color: #fff;
      font-family: inherit;
      font-size: 13px;
      font-weight: 900;
      line-height: 1.4;
      letter-spacing: 0;
      padding: 8px 12px;
      cursor: pointer;
    }

    .board-action-menu {
      position: relative;
    }

    .board-action-menu[open] {
      z-index: 130;
    }

    .board-action-menu > summary {
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      border: 0;
      border-radius: 10px;
      padding: 8px 12px;
      background: #4f7c6b;
      color: #fff;
      font-family: inherit;
      font-size: 13px;
      font-weight: 900;
      line-height: 1.4;
      letter-spacing: 0;
      cursor: pointer;
      list-style: none;
      user-select: none;
    }

    .board-action-menu > summary::-webkit-details-marker { display: none; }
    .board-action-menu > summary::after { content: "▾"; font-size: 11px; }
    .board-action-menu[open] > summary { background: #3f6658; }

    .board-action-menu.board-menu-display > summary { background: #1f2937; }
    .board-action-menu.board-menu-display[open] > summary,
    .board-action-menu.board-menu-display > summary:hover { background: #111827; }
    .summary-bar #boardTransferLookup { background: #1f2937; color: #fff; }
    .summary-bar #boardTransferLookup:hover { background: #111827; }
    .summary-bar #boardQualityAudit { background: #172554; color: #fff; }
    .summary-bar #boardQualityAudit:hover { background: #0f172a; }
    .toolbar .toolbar-voice-schedule {
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 0 14px;
      border: 1px solid #0f766e;
      border-radius: 999px;
      background: #0f766e;
      color: #fff;
      font: inherit;
      font-size: 12px;
      font-weight: 900;
      line-height: 1;
      white-space: nowrap;
      box-shadow: none;
    }
    .toolbar .toolbar-voice-schedule:hover { border-color: #115e59; background: #115e59; color: #fff; transform: none; }
    body.support-readonly-session .toolbar .toolbar-voice-schedule { display: none; }
    .toolbar .toolbar-quick-cash {
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 0 14px;
      border: 1px solid #b45309;
      border-radius: 999px;
      background: #fff7ed;
      color: #9a3412;
      font: inherit;
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
      box-shadow: none;
    }
    .toolbar .toolbar-quick-cash:hover { background: #ffedd5; transform: none; }
    body.support-readonly-session .toolbar .toolbar-quick-cash { display: none; }

    .quick-cash-overlay { z-index: 16065; }
    .quick-cash-dialog { width: min(880px, calc(100vw - 24px)); max-height: min(860px, 94vh); }
    .quick-cash-dialog button, .quick-cash-dialog input, .quick-cash-dialog select { font-family: inherit; letter-spacing: 0; }
    .quick-cash-dialog .schedule-governance-body { max-height: calc(min(860px, 94vh) - 72px); }
    .quick-cash-filters { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .75fr) 42px; grid-template-areas: "month status refresh" "search search search"; gap: 10px; align-items: end; min-width: 0; }
    .quick-cash-filters label { min-width: 0; }
    .quick-cash-month-field { grid-area: month; }
    .quick-cash-status-field { grid-area: status; }
    .quick-cash-search-field { grid-area: search; }
    .quick-cash-filters .quick-cash-refresh { grid-area: refresh; width: 42px; height: 42px; padding: 0; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #1f2937; }
    .quick-cash-filters input, .quick-cash-filters select { width: 100%; min-width: 0; max-width: 100%; min-height: 42px; padding: 7px 10px; box-sizing: border-box; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #1f2937; font-size: 14px; font-weight: 700; }
    .quick-cash-dialog .quick-cash-filters select { height: 42px; min-height: 42px; }
    .quick-cash-filters .monitor-month-switch { min-width: 0; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 6px; }
    .quick-cash-filters .monitor-month-switch button { width: 42px; min-width: 0; height: 42px; min-height: 42px; padding: 0; border: 1px solid #1f2937; border-radius: 6px; background: #1f2937; color: #fff; }
    .quick-cash-filters .monitor-month-switch select { height: 42px !important; min-height: 42px !important; text-align: center; text-align-last: center; }
    .quick-cash-filters button:disabled { opacity: .55; cursor: wait; }
    .quick-cash-summary { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 10px 0; border-bottom: 1px solid #e5e7eb; color: #57534e; font-weight: 700; }
    .quick-cash-summary strong { color: #9a3412; }
    .quick-cash-rows { display: grid; }
    .quick-cash-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
    .quick-cash-row-main { min-width: 0; display: grid; gap: 2px; }
    .quick-cash-row-main strong { font-size: 16px; color: #1f2937; }
    .quick-cash-row-main small { color: #57534e; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
    .quick-cash-row-main .quick-cash-warning { color: #9a3412; }
    .quick-cash-row-action { display: grid; align-items: center; justify-items: end; gap: 6px; flex: 0 0 auto; }
    .quick-cash-row-action strong { white-space: nowrap; color: #1f2937; }
    .quick-cash-row-action button { min-height: 38px; padding: 6px 12px; border: 1px solid #0f766e; border-radius: 6px; background: #0f766e; color: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; box-shadow: none; }
    .quick-cash-row-action button.quick-cash-reopen { border-color: #d1d5db; background: #fff; color: #57534e; }
    .quick-cash-row-action button:disabled { opacity: .55; cursor: not-allowed; }
    .quick-cash-empty { padding: 24px 8px; color: #78716c; text-align: center; font-weight: 700; }
    .quick-cash-empty .ph-spinner-gap { display: inline-block; animation: quick-cash-spin 1s linear infinite; }
    @keyframes quick-cash-spin { to { transform: rotate(360deg); } }
    @media (max-width: 680px) {
      .quick-cash-overlay { padding: 12px; }
      .quick-cash-filters { grid-template-columns: minmax(0, 1fr) 42px; grid-template-areas: "month month" "status refresh" "search search"; }
      .quick-cash-row { align-items: flex-start; }
      .quick-cash-row-action { display: grid; justify-items: end; gap: 6px; }
    }

    .voice-schedule-overlay { z-index: 16060; }
    .voice-schedule-dialog { width: min(920px, calc(100vw - 32px)); max-height: 94vh; font-family: inherit; }
    .voice-schedule-dialog button, .voice-schedule-dialog input, .voice-schedule-dialog textarea, .voice-schedule-dialog select { font-family: inherit; }
    .voice-schedule-dialog .schedule-governance-head > div { min-width: 0; }
    .voice-schedule-dialog .schedule-governance-head p { margin: 2px 0 0; color: #78716c; font-size: 13px; font-weight: 700; }
    .voice-schedule-body { max-height: calc(94vh - 72px); }
    .voice-schedule-controls { display: grid; grid-template-columns: 1fr; gap: 10px; }
    .voice-schedule-auto { display: flex !important; min-height: 52px; grid-template-columns: none !important; flex-direction: row; align-items: center; gap: 10px !important; padding: 8px 12px; border: 1px solid #d6d3d1; border-radius: 7px; background: #fff; cursor: pointer; }
    .voice-schedule-auto input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: #0f766e; }
    .voice-schedule-auto span { display: grid; gap: 1px; }
    .voice-schedule-auto small { color: #78716c; font-size: 12px; font-weight: 700; }
    .voice-schedule-result { min-height: 150px; border: 1px solid #d6d3d1; border-radius: 7px; background: #fafaf9; overflow: hidden; }
    .voice-schedule-empty { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 8px; color: #78716c; font-weight: 800; }
    .voice-schedule-empty i { font-size: 30px; }
    .voice-schedule-result-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #d6d3d1; }
    .voice-schedule-result-head.safe { background: #ecfdf5; color: #065f46; }
    .voice-schedule-result-head.completed { background: #dcfce7; color: #166534; border-bottom-color: #86efac; }
    .voice-schedule-result-head.blocked { background: #fff7ed; color: #9a3412; }
    .voice-schedule-result-head > i { font-size: 24px; }
    .voice-schedule-result-head > div { display: grid; }
    .voice-schedule-result-head small { color: #78716c; font-size: 12px; font-weight: 700; }
    .voice-schedule-summary { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 7px 12px; padding: 13px 14px; }
    .voice-schedule-summary span { color: #78716c; font-weight: 800; }
    .voice-schedule-summary strong { color: #292524; overflow-wrap: anywhere; }
    .voice-schedule-reason { display: grid; gap: 6px; margin: 0 14px 13px; color: #57534e; font-weight: 800; }
    .voice-schedule-reason select { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid #d6d3d1; border-radius: 6px; background: #fff; color: #292524; font: inherit; }
    .voice-schedule-reason select:focus-visible { outline: 2px solid #1d6f61; outline-offset: 2px; }
    .voice-schedule-batch-list { display: grid; gap: 0; }
    .voice-schedule-batch-item { padding: 12px 14px; border-bottom: 1px solid #e7e5e4; background: #fff; }
    .voice-schedule-batch-item:last-child { border-bottom: 0; }
    .voice-schedule-batch-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
    .voice-schedule-batch-select { display: flex !important; min-width: 0; align-items: flex-start; gap: 10px; cursor: pointer; }
    .voice-schedule-batch-select input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 1px 0 0; padding: 0; accent-color: #0f766e; }
    .voice-schedule-batch-select input:disabled { cursor: not-allowed; }
    .voice-schedule-batch-heading strong { min-width: 0; overflow-wrap: anywhere; color: #292524; }
    .voice-schedule-batch-heading span { flex: 0 0 auto; color: #9a3412; font-size: 12px; font-weight: 900; }
    .voice-schedule-batch-heading span.ready, .voice-schedule-batch-heading span.success { color: #15803d; }
    .voice-schedule-batch-detail { margin-top: 7px; color: #57534e; font-size: 13px; font-weight: 800; line-height: 1.5; }
    .voice-schedule-batch-message { margin-top: 7px; color: #9a3412; font-size: 12px; font-weight: 800; }
    .voice-schedule-batch-item .voice-schedule-issues, .voice-schedule-batch-item .voice-schedule-warnings { padding: 8px 0 0 20px; }
    .voice-schedule-batch-item .voice-schedule-candidates { padding: 10px 0 0; }
    .voice-schedule-duration-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; }
    .voice-schedule-duration-range label { display: grid; gap: 6px; min-width: 0; color: #57534e; font-size: 13px; font-weight: 800; }
    .voice-schedule-duration-range input { width: 100%; min-width: 0; height: 42px; padding: 0 10px; border: 1px solid #d6d3d1; border-radius: 6px; background: #fff; color: #292524; font: inherit; text-align: center; }
    .voice-schedule-range-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 14px; color: #44403c; font-size: 13px; font-weight: 800; }
    .voice-schedule-range-summary button { min-height: 34px; padding: 0 10px; border: 1px solid #d6d3d1; border-radius: 6px; background: #fff; color: #1f2937; font: inherit; cursor: pointer; box-shadow: none; }
    .voice-schedule-duration-overview { display: grid; gap: 7px; padding: 4px 14px 14px; color: #44403c; font-size: 13px; font-weight: 700; }
    .voice-schedule-duration-overview > strong { color: #1f2937; font-size: 15px; }
    .voice-schedule-duration-overview > div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #e7e5e4; padding-top: 7px; }
    .voice-schedule-duration-overview > div span { flex: 0 0 auto; color: #0f766e; }
    .voice-schedule-issues, .voice-schedule-warnings { margin: 0; padding: 0 32px 13px 46px; font-weight: 800; }
    .voice-schedule-issues { color: #b42318; }
    .voice-schedule-warnings { color: #9a6700; }
    .voice-schedule-candidates { display: grid; gap: 6px; padding: 0 14px 14px; }
    .voice-schedule-candidates > strong { color: #44403c; font-size: 13px; }
    .voice-schedule-candidates button { display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid #d6d3d1; border-radius: 6px; background: #fff; color: #292524; font: inherit; font-size: 13px; font-weight: 800; text-align: left; cursor: pointer; box-shadow: none; }
    .voice-schedule-candidates button:hover { border-color: #0f766e; background: #f0fdfa; color: #115e59; }
    .voice-schedule-candidates button span { min-width: 0; overflow-wrap: anywhere; }
    .voice-schedule-candidates button i { flex: 0 0 auto; }
    .voice-schedule-clock-evidence { display: grid; gap: 6px; margin: 0 14px 14px; padding: 11px 12px; border: 1px solid #fecaca; border-left: 4px solid #b42318; background: #fff; }
    .voice-schedule-clock-evidence strong { color: #991b1b; }
    .voice-schedule-clock-evidence span { color: #44403c; font-weight: 800; }
    .voice-schedule-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .voice-schedule-actions button { width: 100%; }
    .voice-schedule-actions .primary.completed { background: #15803d; border-color: #15803d; color: #fff; opacity: 1; }
    .voice-schedule-history { display: block; padding: 0; border: 1px solid #d6d3d1; border-radius: 7px; background: #fff; font-family: inherit; overflow: hidden; }
    .voice-schedule-history-head { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; cursor: pointer; list-style: none; font-family: inherit; }
    .voice-schedule-history-head::-webkit-details-marker { display: none; }
    .voice-schedule-history-head > span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
    .voice-schedule-history-head strong { color: #292524; font-size: 14px; }
    .voice-schedule-history-head small { color: #78716c; font-size: 12px; font-weight: 700; }
    .voice-schedule-history-caret { color: #78716c; transition: transform .18s ease; }
    .voice-schedule-history[open] .voice-schedule-history-caret { transform: rotate(180deg); }
    .voice-schedule-history-list { display: grid; gap: 6px; max-height: 210px; padding: 0 12px 12px; border-top: 1px solid #e7e5e4; overflow: auto; font-family: inherit; }
    .voice-schedule-history-row { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border: 1px solid #e7e5e4; border-left-width: 4px; background: #fafaf9; }
    .voice-schedule-history-row.success { border-left-color: #16a34a; }
    .voice-schedule-history-row.failed { border-left-color: #dc2626; }
    .voice-schedule-history-row > i { margin-top: 2px; color: #78716c; font-size: 17px; }
    .voice-schedule-history-row.success > i { color: #15803d; }
    .voice-schedule-history-row.failed > i { color: #b91c1c; }
    .voice-schedule-history-row > div { display: grid; min-width: 0; gap: 2px; }
    .voice-schedule-history-row strong { color: #292524; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
    .voice-schedule-history-row small, .voice-schedule-history-empty { color: #78716c; font-size: 11px; font-weight: 700; }
    .voice-schedule-history-empty { padding: 12px; text-align: center; }
    @media (max-width: 680px) {
      .voice-schedule-overlay { padding: 0; }
      .voice-schedule-dialog { width: 100vw; max-height: 100dvh; height: 100dvh; border: 0; border-radius: 0; }
      .voice-schedule-body { max-height: calc(100dvh - 72px); }
    }
    .board-action-menu.board-menu-batch > summary { background: #4f7c6b; }
    .board-action-menu.board-menu-batch[open] > summary,
    .board-action-menu.board-menu-batch > summary:hover { background: #3f6658; }
    .board-action-menu.board-menu-governance > summary { background: #78716c; }
    .board-action-menu.board-menu-governance[open] > summary,
    .board-action-menu.board-menu-governance > summary:hover { background: #57534e; }
    .board-action-menu.board-menu-export > summary { background: #c56a16; }
    .board-action-menu.board-menu-export[open] > summary,
    .board-action-menu.board-menu-export > summary:hover { background: #a9530d; }

    .board-action-menu-list {
      position: absolute;
      top: calc(100% + 7px);
      right: 0;
      z-index: 120;
      width: max-content;
      min-width: 190px;
      display: grid;
      gap: 6px;
      padding: 8px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 16px 32px rgba(28, 25, 23, .18);
    }

    .board-action-menu-list button {
      width: 100%;
      min-height: 38px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 7px;
      border-radius: 6px;
      padding: 8px 11px;
      text-align: left;
      white-space: nowrap;
    }

    .board-action-menu-list #boardToggleAttendanceInfo {
      border: 1px solid #1e3a8a;
      background: #1e3a8a;
      color: #fff;
      box-shadow: none;
    }

    .board-action-menu-list #boardToggleAttendanceInfo:hover {
      border-color: #172554;
      background: #172554;
      color: #fff;
    }

    .board-action-menu-list #boardToggleAttendanceInfo.is-hidden {
      border-color: #15803d;
      background: #15803d;
      color: #fff;
    }

    .board-action-menu-list #boardToggleAttendanceInfo.is-hidden:hover {
      border-color: #166534;
      background: #166534;
      color: #fff;
    }

    .board-batch-date-range {
      display: grid;
      grid-template-columns: repeat(2, minmax(138px, 1fr));
      gap: 6px;
      padding: 2px 2px 7px;
      border-bottom: 1px solid #e7e5e4;
    }

    .board-batch-target {
      display: grid;
      gap: 3px;
      margin: 0 2px 4px;
      padding: 9px 10px;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      background: #fafaf9;
      color: #44403c;
    }

    .board-batch-target.is-selected {
      border-color: #fdba74;
      background: #fff7ed;
      color: #c2410c;
    }

    .board-batch-target strong {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
    }

    .board-batch-target small {
      color: #78716c;
      font-size: 11px;
      line-height: 1.45;
    }

    .board-batch-date-range strong {
      grid-column: 1 / -1;
      font-size: 12px;
      color: #57534e;
    }

    .board-batch-date-range label {
      display: grid;
      grid-template-rows: auto 38px;
      align-items: center;
      gap: 4px;
      margin: 0;
      font-size: 11px;
      font-weight: 800;
      color: #78716c;
      text-align: center;
    }

    .board-batch-date-range input {
      width: 100%;
      min-width: 0;
      min-height: 38px;
      border: 1px solid #1f2937;
      border-radius: 6px;
      padding: 7px 8px;
      font: inherit;
      color: #1f2937;
      background: #fff;
      color-scheme: light;
      text-align: center;
      text-align-last: center;
    }

    .board-batch-date-range input[type="date"]::-webkit-date-and-time-value,
    .board-batch-date-range input[type="date"]::-webkit-datetime-edit {
      width: 100%;
      text-align: center;
    }

    .board-batch-date-range input:focus {
      outline: 2px solid #fb923c;
      outline-offset: 1px;
    }

    .board-batch-date-range .system-date-shell {
      align-self: stretch;
      height: 38px;
      min-height: 38px;
    }

    .board-batch-date-range .system-date-button {
      position: relative;
      justify-content: center;
      gap: 9px;
      min-height: 38px;
      padding: 0 12px;
      border: 1px solid #1f2937;
      border-radius: 6px;
      background: #fff;
      color: #1f2937;
      font-size: 13px;
      font-weight: 900;
      text-align: center;
    }

    .board-batch-date-range .system-date-button span {
      position: static;
      display: block;
      width: auto;
      padding: 0;
      text-align: center;
      pointer-events: none;
    }

    .board-batch-date-range .system-date-button i {
      position: static;
      transform: none;
      color: #1f2937;
      font-size: 19px;
    }

    .board-batch-date-range .system-date-button:hover,
    .board-batch-date-range .system-date-button:focus-visible {
      border-color: #1f2937;
      outline: 2px solid #fb923c;
      outline-offset: 1px;
      background: #fff;
      color: #1f2937;
    }

    .board-batch-selection-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
      padding: 7px 2px;
      border-bottom: 1px solid #e7e5e4;
    }

    .board-batch-selection-actions button {
      min-width: 0;
      min-height: 36px;
      justify-content: center;
      border: 1px solid #334155;
      background: #f8fafc;
      color: #1e293b;
      box-shadow: none;
    }

    .board-batch-selection-actions #boardBatchSelectRange {
      grid-column: 1 / -1;
      background: #1e293b;
      color: #fff;
    }

    .board-action-menu-list #boardClearSelection {
      border: 1px solid #d6d3d1;
    }

    @media (max-width: 1200px) {
      .summary-bar {
        grid-template-columns: minmax(0, 1fr);
      }

      .board-summary-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
      }

      .board-legend {
        grid-template-columns: minmax(0, 1fr);
      }

      .board-legend .schedule-lock-badge {
        justify-self: start;
      }
    }

    .summary-bar #boardCheckApproval {
      background: #2563eb;
      color: #fff;
    }

    .summary-bar #boardCheckApproval:hover {
      background: #1d4ed8;
    }

    .summary-bar #boardTimeMode {
      color: #fff;
    }

    .summary-bar #boardTimeMode.scheduled {
      background: #dbeafe;
      color: #1e3a8a;
    }

    .summary-bar #boardTimeMode.clock {
      background: #4f7c6b;
    }

    .summary-bar #boardTimeMode.scheduled:hover {
      background: #bfdbfe;
      color: #172554;
    }

    .summary-bar #boardTimeMode.clock:hover {
      background: #3f6658;
    }

    .summary-bar #boardToggleCareBadges {
      background: #fef3c7;
      border: 1px solid #d6b45f;
      color: #6b4e16;
    }

    .summary-bar #boardToggleCareBadges:hover {
      background: #fde68a;
      color: #5f420b;
    }

    .summary-bar #boardExportScheduledPdf {
      background: #c56a16;
      color: #fff;
    }

    .summary-bar #boardExportClockPdf {
      background: #4f7c6b;
      color: #fff;
    }

    .summary-bar #boardExportScheduledPdf:hover {
      background: #a9530d;
    }

    .summary-bar #boardExportClockPdf:hover {
      background: #3f6658;
    }

    .summary-bar #boardBatchManualClock {
      background: #e0f2fe;
      border: 1px solid #7dd3fc;
      color: #075985;
    }

    .summary-bar #boardBatchClientLeave {
      background: #fff7ed;
      border: 1px solid #fdba74;
      color: #9a3412;
    }

    .summary-bar #boardBatchEmployeeLeave {
      background: #eff6ff;
      border: 1px solid #93c5fd;
      color: #1d4ed8;
    }

    .summary-bar #boardBatchSuspendService {
      background: #fefce8;
      border: 1px solid #fde047;
      color: #854d0e;
    }

    .summary-bar #boardBatchSupportReported {
      background: #ecfdf5;
      border: 1px solid #86efac;
      color: #166534;
    }

    .summary-bar #boardBatchSupportPending {
      background: #fff1f2;
      border: 1px solid #fda4af;
      color: #be123c;
    }

    .summary-bar #boardDeleteSelected {
      background: #b91c1c;
      border: 1px solid #991b1b;
      color: #fff;
    }

    .summary-bar #boardBatchClientLeave:hover { background: #ffedd5; }
    .summary-bar #boardBatchEmployeeLeave:hover { background: #dbeafe; }
    .summary-bar #boardBatchSuspendService:hover { background: #fef08a; }
    .summary-bar #boardBatchSupportReported:hover { background: #dcfce7; }
    .summary-bar #boardBatchSupportPending:hover { background: #ffe4e6; }
    .summary-bar #boardBatchManualClock:hover { background: #bae6fd; }
    .summary-bar #boardDeleteSelected:hover { background: #991b1b; }

    .summary-bar #boardAdd {
      background: var(--orange);
      color: #fff;
    }

    .summary-bar #boardAdd:hover {
      background: var(--orange-dark);
    }

    .summary-bar #boardClearSelection {
      background: #f5f5f4;
      border: 1px solid #d6d3d1;
      color: #44403c;
    }

    .summary-bar #boardClearSelection:hover {
      background: #e7e5e4;
      border-color: #a8a29e;
    }

    .summary-bar #boardDeleteSelected {
      background: #dc2626;
      color: #fff;
    }

    .summary-bar button.month-locked-action {
      opacity: .68;
      cursor: not-allowed;
      filter: saturate(.72);
    }

    .month-board {
      border: 2px solid #f5f5f4;
      border-top: 0;
      border-radius: 0 0 28px 28px;
      overflow: auto;
      background: white;
    }

    .calendar-grid {
      min-width: 1050px;
      display: grid;
      grid-template-columns: 58px repeat(7, minmax(140px, 1fr));
    }

    .week-cell {
      border-right: 2px solid #f5f5f4;
      border-bottom: 2px solid #f5f5f4;
      display: grid;
      place-items: center;
      color: #57534e;
      font-weight: 900;
      background: #fafaf9;
      min-height: 158px;
      line-height: 1.5;
    }

    .day-cell {
      min-height: 158px;
      border-right: 2px solid #f5f5f4;
      border-bottom: 2px solid #f5f5f4;
      background: #fff;
      cursor: pointer;
      position: relative;
      transition: background 0.18s ease, box-shadow 0.18s ease;
    }

    .day-cell:not(.outside):hover {
      background: #fff7ed;
      box-shadow: inset 0 0 0 2px #fed7aa;
    }

    .day-cell.outside {
      background: #f8fafc;
      color: #cbd5e1;
      cursor: default;
    }

    .day-cell.national-holiday {
      background: #fff1f2;
      box-shadow: inset 0 0 0 2px #fda4af;
    }

    .day-cell.national-holiday:not(.outside):hover {
      background: #ffe4e6;
      box-shadow: inset 0 0 0 2px #fb7185;
    }

    .day-head {
      background: #f6bfcd;
      color: #44403c;
      text-align: center;
      padding: 10px 8px;
      font-weight: 900;
      min-height: 42px;
    }

    .day-cell.national-holiday .day-head {
      background: linear-gradient(135deg, #be123c, #fb7185);
      color: #fff;
    }

    .day-holiday-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      max-width: 100%;
      margin-top: 5px;
      padding: 3px 8px;
      border-radius: 999px;
      background: #fff;
      color: #be123c;
      font-size: 11px;
      font-weight: 950;
      line-height: 1.2;
      box-shadow: 0 6px 14px -10px rgba(190, 18, 60, 0.5);
    }

    .day-body {
      padding: 8px;
      display: grid;
      gap: 4px;
      align-content: start;
    }


    .day-paste-button {
      width: fit-content;
      border: 0;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin-top: 2px;
      padding: 4px 9px;
      background: #1f2937;
      color: #fff;
      font-size: 11px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 8px 16px -12px rgba(31, 41, 55, 0.5);
    }

    .day-paste-button:hover {
      background: var(--orange);
    }

    .day-add-hint {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      width: fit-content;
      margin-top: 2px;
      border-radius: 999px;
      background: #fff7ed;
      color: var(--orange-dark);
      padding: 3px 8px;
      font-size: 11px;
      font-weight: 900;
      opacity: 0;
      transform: translateY(2px);
      transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .day-cell:not(.outside):hover .day-add-hint,
    .day-cell.empty-day .day-add-hint {
      opacity: 1;
      transform: translateY(0);
    }

    .day-stats {
      color: #111827;
      font-size: 12px;
      font-weight: 900;
      line-height: 1.45;
      margin-bottom: 2px;
    }

    .service-line {
      display: flex;
      align-items: flex-start;
      gap: 4px;
      border: 0;
      background: transparent;
      padding: 0;
      color: #292524;
      font: inherit;
      font-size: 12px;
      font-weight: 900;
      line-height: 1.35;
      text-align: left;
      cursor: pointer;
    }

    .service-line:hover {
      color: var(--orange-dark);
    }

    .service-line.selected {
      background: #fee2e2;
      border-radius: 10px;
      padding: 2px 4px;
      color: #b91c1c;
    }

    .service-line.drag-saving {
      opacity: .72;
      outline: 2px solid #d6b94f;
      outline-offset: 2px;
    }

    .schedule-badge.drag-saving-badge {
      background: #fff8dc;
      color: #6f5a19;
    }

    .schedule-drag-toggle {
      border-color: #e5c76b !important;
      background: #fff8dc !important;
      color: #6f5a19 !important;
    }

    .schedule-drag-toggle.active {
      border-color: #c9a93c !important;
      background: #f8e9a7 !important;
      color: #4f4215 !important;
      box-shadow: inset 0 0 0 1px rgba(111, 90, 25, 0.12);
    }

    body.schedule-drag-mode .service-line[data-schedule-id] {
      cursor: grab;
      border-radius: 10px;
      outline: 1px dashed #d6b94f;
      outline-offset: 2px;
      touch-action: none;
      -webkit-user-select: none;
      user-select: none;
    }

    body.schedule-drag-mode .service-line[data-schedule-id]:active {
      cursor: grabbing;
    }

    body.schedule-drag-mode .schedule-inline-actions {
      display: none;
    }

    body.schedule-drag-mode .day-cell[data-in-month="1"] {
      transition: background-color .15s ease, box-shadow .15s ease;
    }

    body.schedule-drag-mode .day-cell.schedule-drop-hover {
      background: #fff8dc;
      box-shadow: inset 0 0 0 3px #d6b94f;
    }

    .schedule-drag-panel {
      position: static;
      width: 100%;
      max-height: none;
      display: grid;
      grid-template-columns: minmax(190px, 230px) minmax(170px, 200px) minmax(0, 1fr);
      grid-template-rows: auto;
      align-items: center;
      gap: 8px;
      margin: 0 0 8px;
      padding: 10px;
      border: 2px solid #e5c76b;
      border-radius: 8px;
      background: #fffdf4;
      color: #44403c;
      box-shadow: none;
    }

    .schedule-drag-panel[hidden] {
      display: none;
    }

    .schedule-drag-panel-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .schedule-drag-panel-head strong {
      color: #4f4215;
      font-size: 15px;
    }

    .schedule-drag-panel-head small {
      display: block;
      margin-top: 2px;
      color: #78716c;
      font-size: 12px;
      font-weight: 700;
      line-height: 1.45;
    }

    .schedule-drag-panel-close {
      width: 34px;
      height: 34px;
      flex: 0 0 34px;
      border: 1px solid #dfd7bd;
      border-radius: 6px;
      background: #fff;
      color: #57534e;
      cursor: pointer;
    }

    .schedule-drag-search {
      width: 100%;
      min-height: 40px;
      border: 1px solid #d6cfae;
      border-radius: 6px;
      background: #fff;
      padding: 8px 10px;
      font: inherit;
      font-size: 13px;
    }

    .schedule-drag-employees {
      min-height: 0;
      display: flex;
      gap: 7px;
      overflow-x: auto;
      overflow-y: hidden;
      padding: 0 0 3px;
      scroll-snap-type: x proximity;
      -webkit-overflow-scrolling: touch;
    }

    .schedule-drag-empty {
      display: flex;
      align-items: center;
      min-height: 50px;
      padding: 0 10px;
      color: #78716c;
      font-size: 13px;
      font-weight: 700;
      white-space: nowrap;
    }

    .schedule-drag-empty[hidden] {
      display: none;
    }

    .schedule-employee-drop {
      flex: 0 0 210px;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      align-content: center;
      gap: 2px;
      min-height: 50px;
      padding: 8px 10px;
      border: 1px solid #e7e5e4;
      border-radius: 6px;
      background: #fff;
      color: #44403c;
      scroll-snap-align: start;
    }

    .schedule-employee-drop[hidden] {
      display: none;
    }

    .schedule-employee-drop strong {
      font-size: 14px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .schedule-employee-drop small {
      color: #a8a29e;
      font-size: 11px;
      font-weight: 800;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .schedule-employee-drop.schedule-drop-hover {
      border-color: #c9a93c;
      background: #f8e9a7;
      color: #4f4215;
    }

    .schedule-drag-ghost {
      position: fixed;
      z-index: 120;
      width: min(280px, calc(100vw - 32px));
      margin: 0;
      padding: 9px 11px;
      border: 2px solid #c9a93c;
      border-radius: 8px;
      background: #fffdf4;
      color: #292524;
      box-shadow: 0 16px 30px -16px rgba(68, 58, 22, .58);
      pointer-events: none;
      opacity: .96;
    }

    .schedule-drag-toast {
      position: fixed;
      z-index: 130;
      right: 22px;
      bottom: 22px;
      width: min(390px, calc(100vw - 32px));
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #292524;
      color: #fff;
      box-shadow: 0 18px 38px -18px rgba(0, 0, 0, .65);
      font-size: 13px;
      font-weight: 800;
    }

    .schedule-drag-toast button {
      min-height: 34px;
      border: 1px solid #f8e9a7;
      border-radius: 6px;
      background: #f8e9a7;
      color: #4f4215;
      padding: 0 12px;
      font-weight: 900;
      cursor: pointer;
    }

    @media (max-width: 980px) {
      .schedule-drag-panel {
        position: static;
        width: 100%;
        max-height: none;
        grid-template-columns: minmax(190px, 230px) minmax(170px, 200px) minmax(0, 1fr);
        grid-template-rows: auto;
        align-items: center;
        gap: 8px;
        margin: 0 0 8px;
        padding: 10px;
        box-shadow: none;
      }

      .schedule-drag-employees {
        display: flex;
        gap: 7px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 3px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
      }

      .schedule-employee-drop {
        flex: 0 0 210px;
        min-height: 50px;
        scroll-snap-align: start;
      }
    }

    @media (max-width: 700px) {
      .schedule-drag-panel {
        grid-template-columns: minmax(0, 1fr);
      }

      .schedule-drag-panel-head small {
        line-height: 1.35;
      }
    }

    body.tablet-mode .schedule-drag-panel {
      position: static;
      width: 100%;
      max-height: none;
      grid-template-columns: minmax(190px, 230px) minmax(170px, 200px) minmax(0, 1fr);
      grid-template-rows: auto;
      align-items: center;
      gap: 8px;
      margin: 0 0 8px;
      padding: 10px;
      box-shadow: none;
    }

    body.tablet-mode .schedule-drag-employees {
      display: flex;
      gap: 7px;
      overflow-x: auto;
      overflow-y: hidden;
      padding: 0 0 3px;
      scroll-snap-type: x proximity;
      -webkit-overflow-scrolling: touch;
    }

    body.tablet-mode .schedule-employee-drop {
      flex: 0 0 210px;
      min-height: 50px;
      scroll-snap-align: start;
    }

    @media (max-width: 700px) {
      body.tablet-mode .schedule-drag-panel {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    .service-line.conflict .service-line-text,
    .service-line.conflict.status-leave-client .service-line-text,
    .service-line.conflict.status-leave-staff .service-line-text,
    .service-line.conflict.status-visit-missed .service-line-text {
      background: #dc2626;
      color: #fff;
      border-radius: 9px;
      padding: 2px 5px;
      box-shadow: none;
    }

    .service-line.conflict .service-line-text *,
    .service-line.conflict .service-min {
      color: #fff;
    }

    .service-line.status-leave-client .service-line-text,
    .service-line.status-leave-client .service-min {
      color: #b91c1c;
    }

    .service-line.status-leave-client .service-line-text {
      background: #fef2f2;
      border-radius: 9px;
      padding: 2px 5px;
      box-shadow: inset 3px 0 0 #ef4444;
    }

    .service-line.status-leave-client i {
      background: #dc2626;
    }

    .service-line.status-leave-staff .service-line-text,
    .service-line.status-leave-staff .service-min {
      color: #1e3a8a;
    }

    .service-line.status-leave-staff .service-line-text {
      background: #dbeafe;
      border-radius: 9px;
      padding: 2px 5px;
      box-shadow: inset 3px 0 0 #1d4ed8;
    }

    .service-line.status-leave-staff i {
      background: #1e40af;
    }

    .service-line.status-visit-missed .service-line-text,
    .service-line.status-visit-missed .service-min {
      color: #b45309;
    }

    .service-line.status-visit-missed .service-line-text {
      background: #fff7ed;
      border-radius: 9px;
      padding: 2px 5px;
      box-shadow: inset 3px 0 0 #f59e0b;
    }

    .service-line.status-visit-missed i {
      background: #f97316;
    }

    .service-line i {
      flex: 0 0 auto;
      width: 18px;
      height: 18px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      background: #8a8a8a;
      color: white;
      font-size: 12px;
    }

    .service-min {
      color: #2563eb;
      font-weight: 900;
    }

    .month-schedule-time {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }

    .month-transfer {
      display: inline-flex;
      align-items: center;
      margin-left: 4px;
      border-radius: 6px;
      padding: 1px 5px;
      background: #ffedd5;
      color: #c2410c;
      font-weight: 950;
      white-space: nowrap;
    }

    .day-transfer-stat {
      color: #c2410c;
    }

    .month-service-list {
      display: grid;
      gap: 1px;
      margin: 3px 0;
      width: 100%;
    }

    .month-service-item {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: baseline;
      column-gap: 6px;
      width: 100%;
      min-height: 18px;
      line-height: 1.3;
    }

    .month-service-index {
      color: #78716c;
      text-align: right;
      font-variant-numeric: tabular-nums;
    }

    .month-service-name {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .month-service-minutes {
      color: #2563eb;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }

    .month-service-quantity {
      color: #1c1917;
      font-weight: 900;
      text-align: right;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }

    .schedule-badge {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      border-radius: 999px;
      padding: 2px 7px;
      font-size: 10px;
      font-weight: 900;
      line-height: 1.2;
      background: #f5f5f4;
      color: #57534e;
    }

    .schedule-badge.done {
      background: #dcfce7;
      color: #166534;
    }

    .schedule-badge.missing {
      background: #fee2e2;
      color: #b91c1c;
    }

    .schedule-badge.partial {
      background: #fef3c7;
      color: #92400e;
    }

    .schedule-badge.special {
      background: #e0f2fe;
      color: #075985;
    }

    .schedule-purpose-control {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px 10px;
    }

    .schedule-purpose-label {
      color: #374151;
      font-family: inherit;
      font-size: 13px;
      font-weight: 900;
      line-height: 1.4;
    }

    .schedule-purpose-segments {
      display: inline-flex;
      align-items: center;
    }

    .schedule-purpose-segments button {
      width: auto;
      min-height: 30px;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      color: #4b5563;
      font-family: inherit;
      font-size: 13px;
      font-weight: 800;
      line-height: 1.35;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      box-shadow: none;
    }

    .schedule-purpose-segments button.active {
      background: transparent;
      color: #4b5563;
      box-shadow: none;
    }

    .schedule-purpose-segments button:hover {
      background: transparent;
      color: #374151;
    }

    .schedule-purpose-switch-track {
      position: relative;
      display: inline-block;
      width: 38px;
      height: 22px;
      flex: 0 0 38px;
      border-radius: 999px;
      background: #d6d3d1;
      box-shadow: inset 0 0 0 1px rgba(87, 83, 78, .08);
      transition: background-color .18s ease;
    }

    .schedule-purpose-switch-thumb {
      position: absolute;
      top: 2px;
      left: 2px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #fff;
      box-shadow: 0 1px 3px rgba(41, 37, 36, .28);
      transition: transform .18s ease;
    }

    .schedule-purpose-switch.active .schedule-purpose-switch-track {
      background: var(--orange);
    }

    .schedule-purpose-switch.active .schedule-purpose-switch-thumb {
      transform: translateX(16px);
    }

    .schedule-purpose-switch:focus-visible .schedule-purpose-switch-track {
      outline: 3px solid rgba(249, 115, 22, .22);
      outline-offset: 2px;
    }

    .schedule-purpose-hint {
      flex-basis: 100%;
      color: #6b7280;
      font-size: 12px;
      font-weight: 700;
      line-height: 1.4;
    }

    .schedule-external-support-field {
      border: 0;
      background: transparent;
      padding: 0;
    }

    .schedule-external-support-field input { background: #fafaf9; }
    .schedule-purpose-hidden { display: none !important; }

    .service-line.status-external-support .service-line-text {
      border-color: #fdba74;
      background: #ffedd5;
      color: #7c2d12;
      box-shadow: none;
    }

    .service-line.status-external-support > i { color: var(--orange); }

    .schedule-badge.external-support-badge {
      border: 1px solid #fdba74;
      background: #ffedd5;
      color: #c2410c;
    }

    .schedule-badge.conflict-badge {
      background: #ef4444;
      color: #fff;
    }

    .schedule-badge.support-reporting-person {
      appearance: none;
      width: fit-content;
      min-height: auto;
      gap: 3px;
      border: 1px solid transparent;
      border-radius: 999px;
      padding: 2px 7px;
      font-family: inherit;
      font-size: 10px;
      font-weight: 900;
      line-height: 1.2;
      cursor: pointer;
      box-shadow: none !important;
      filter: none !important;
      transform: none !important;
      background-image: none !important;
    }

    .schedule-badge.support-reporting-person:hover,
    .schedule-badge.support-reporting-person:focus-visible,
    .schedule-badge.support-reporting-person:active {
      box-shadow: none !important;
      filter: none !important;
      transform: none !important;
      background-image: none !important;
    }

    .support-reporting-summary-warning {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      width: fit-content;
      min-height: auto;
      padding: 2px 7px;
      border: 1px solid #fecaca !important;
      border-radius: 999px !important;
      background: #fee2e2 !important;
      color: #b91c1c !important;
      font-family: inherit;
      font-size: 10px !important;
      font-weight: 900;
      line-height: 1.2;
      cursor: pointer;
      box-shadow: none !important;
      filter: none !important;
      transform: none !important;
      background-image: none !important;
    }

    .support-reporting-summary-warning:hover,
    .support-reporting-summary-warning:focus-visible,
    .support-reporting-summary-warning:active {
      border-color: #fecaca !important;
      background: #fee2e2 !important;
      color: #b91c1c !important;
      box-shadow: none !important;
      filter: none !important;
      transform: none !important;
      background-image: none !important;
    }

    .labor-insurance-summary-warning {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      width: fit-content;
      padding: 2px 7px;
      border: 1px solid #fde68a;
      border-radius: 999px;
      background: #fef3c7;
      color: #92400e;
      font-family: inherit;
      font-size: 10px;
      font-weight: 900;
      line-height: 1.2;
      white-space: nowrap;
    }

    .schedule-badge.labor-insurance-reminder {
      gap: 3px;
      border: 1px solid transparent;
    }

    .schedule-badge.labor-insurance-reminder.pending {
      border-color: #fecaca;
      background: #fee2e2;
      color: #b91c1c;
    }

    .schedule-badge.labor-insurance-reminder.partial {
      border-color: #fde68a;
      background: #fef3c7;
      color: #92400e;
    }

    .schedule-badge.labor-insurance-reminder.complete {
      border-color: #bbf7d0;
      background: #dcfce7;
      color: #166534;
    }

    .day-labor-insurance-reminders {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      padding: 5px 0 3px;
      border-bottom: 1px solid #e7e5e4;
    }

    .employee-certificate-field {
      grid-column: 1 / -1;
      margin: 0;
      padding: 12px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fafaf9;
    }

    .employee-certificate-field legend {
      padding: 0 6px;
      font-weight: 900;
      color: #292524;
    }

    .employee-certificate-header,
    .employee-certificate-row {
      display: grid;
      grid-template-columns: minmax(170px, 1.35fr) minmax(120px, 1fr) minmax(150px, 1.2fr) 130px 130px 38px;
      gap: 8px;
      align-items: end;
    }

    .employee-certificate-header {
      margin-bottom: 5px;
      color: #57534e;
      font-size: 12px;
      font-weight: 900;
    }

    .employee-certificate-rows {
      display: grid;
      gap: 8px;
      margin-bottom: 10px;
    }

    .employee-certificate-row label {
      min-width: 0;
      font-size: 12px;
    }

    .employee-certificate-row input,
    .employee-certificate-row select {
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
    }

    .employee-certificate-row [data-remove-certificate] {
      width: 38px;
      min-width: 38px;
      height: 38px;
      padding: 0;
      color: #b91c1c;
    }

    .client-intake-date-label {
      color: #dc2626;
      font-weight: 900;
    }

    .client-multi-choice {
      min-width: 0;
      margin: 0;
      padding: 9px 10px;
      border: 2px solid #e7e5e4;
      border-radius: 12px;
      background: #fff;
    }

    .client-multi-choice legend {
      padding: 0 4px;
      color: #57534e;
      font-size: 13px;
      font-weight: 900;
    }

    .client-multi-choice > div {
      display: flex;
      flex-wrap: wrap;
      gap: 7px 12px;
    }

    .client-multi-choice > div label {
      display: inline-flex;
      flex-direction: row;
      align-items: center;
      gap: 5px;
      min-height: 30px;
      margin: 0;
      font-size: 13px;
    }

    .client-multi-choice input[type="checkbox"] {
      width: 17px;
      height: 17px;
      min-height: 0;
      accent-color: var(--orange);
    }

    .schedule-badge.care-reminder {
      display: inline-flex;
      align-items: center;
      gap: 3px;
    }

    .schedule-care-reminder-panel {
      grid-column: 1 / -1;
      display: grid;
      gap: 6px;
      padding: 9px 11px;
      border: 1px solid #fdba74;
      border-radius: 8px;
      background: #fff7ed;
      color: #9a3412;
      font-weight: 800;
    }

    .schedule-care-reminder-panel[hidden] {
      display: none;
    }

    .schedule-care-reminder-panel.warning {
      border-color: #fca5a5;
      background: #fef2f2;
      color: #b91c1c;
    }

    .schedule-care-reminder {
      display: flex;
      align-items: flex-start;
      gap: 6px;
    }

    .schedule-badge.care-reminder.aa09 {
      background: #dcfce7;
      color: #166534;
    }

    .schedule-badge.care-reminder.dementia {
      background: #fef3c7;
      color: #92400e;
    }

    .schedule-badge.care-reminder.dementia-missing,
    .schedule-badge.care-reminder.disability-missing {
      background: #fee2e2;
      color: #b91c1c;
    }

    .schedule-badge.care-reminder.disability {
      background: #dbeafe;
      color: #1e3a8a;
    }

    @media (max-width: 720px) {
      .employee-certificate-header {
        display: none;
      }

      .employee-certificate-row {
        grid-template-columns: 1fr 1fr;
        padding-bottom: 10px;
        border-bottom: 1px solid #e7e5e4;
      }

      .employee-certificate-row label:first-child,
      .employee-certificate-row label:nth-child(3) {
        grid-column: 1 / -1;
      }
    }

    .schedule-form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .schedule-form-grid .full {
      grid-column: 1 / -1;
    }

    .schedule-entity-field {
      position: relative;
      display: grid;
      gap: 3px;
      align-content: start;
      min-width: 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .schedule-entity-field:focus-within {
      z-index: 1000;
    }

    .schedule-entity-search-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }

    .schedule-entity-search-wrap > i {
      position: absolute;
      left: 11px;
      z-index: 1;
      color: #a8a29e;
      font-size: 16px;
      pointer-events: none;
    }

    .schedule-entity-search-wrap input {
      padding-left: 34px !important;
      padding-right: 34px !important;
      background: #fff !important;
    }

    .schedule-entity-search-wrap > .ph-caret-down {
      position: absolute;
      right: 10px;
      color: #a8a29e;
      font-size: 15px;
      pointer-events: none;
    }

    .schedule-entity-options {
      position: absolute;
      z-index: 1001;
      top: calc(100% + 5px);
      left: 0;
      right: 0;
      max-height: 270px;
      overflow-y: auto;
      padding: 6px;
      border: 1px solid #d6d3d1;
      border-radius: 12px;
      background: #fff;
      box-shadow: 0 14px 30px rgba(31, 41, 55, 0.18);
    }

    .schedule-entity-options[hidden] {
      display: none;
    }

    .schedule-entity-option-count {
      display: block;
      padding: 5px 8px 7px;
      color: #78716c;
      font-size: 11px;
      font-weight: 800;
    }

    form .schedule-entity-option {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-height: 40px;
      padding: 7px 9px;
      border: 0;
      border-radius: 8px;
      background: #fff;
      color: #292524;
      box-shadow: none;
      text-align: left;
    }

    form .schedule-entity-option:hover,
    form .schedule-entity-option:focus-visible,
    form .schedule-entity-option.active {
      background: #fff7ed;
      color: #9a3412;
      outline: none;
    }

    form .schedule-entity-option[hidden] {
      display: none;
    }

    .schedule-entity-option strong {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
    }

    .schedule-entity-option small {
      color: #78716c;
      font-size: 11px;
      white-space: nowrap;
    }

    .schedule-entity-option-empty {
      padding: 12px 9px;
      color: #a8a29e;
      font-size: 12px;
      text-align: center;
    }

    .schedule-location-editor {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: end;
      padding: 10px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fafaf9;
    }

    .schedule-location-editor > label {
      min-width: 0;
    }

    .schedule-location-actions {
      display: flex;
      gap: 6px;
      align-items: center;
    }

    .schedule-location-actions button {
      width: auto;
      min-width: 118px;
      white-space: nowrap;
    }

    .schedule-location-status {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      gap: 6px;
      min-height: 22px;
      color: #57534e;
      font-size: 12px;
      font-weight: 800;
      line-height: 1.45;
    }

    .schedule-location-status.custom {
      color: #b45309;
    }

    .schedule-location-status.ready {
      color: #047857;
    }

    @media (max-width: 720px) {
      .schedule-location-editor {
        grid-template-columns: minmax(0, 1fr);
      }

      .schedule-location-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
      }

      .schedule-location-actions button {
        width: 100%;
        min-width: 0;
      }
    }

    .schedule-transfer-preview {
      grid-column: 1 / -1;
      display: flex;
      align-items: flex-start;
      gap: 8px;
      min-height: 42px;
      padding: 9px 11px;
      border: 1px solid #fde68a;
      border-radius: 8px;
      background: #fffbeb;
      color: #854d0e;
      font-size: 13px;
      line-height: 1.55;
      font-weight: 800;
    }

    .schedule-transfer-preview i {
      flex: 0 0 auto;
      margin-top: 2px;
      font-size: 17px;
    }

    .schedule-transfer-preview strong {
      color: #713f12;
    }

    .schedule-transfer-preview.warning {
      border-color: #fca5a5;
      background: #fef2f2;
      color: #b91c1c;
    }

    .schedule-transfer-preview.warning strong {
      color: #991b1b;
    }

    .schedule-transfer-preview.neutral {
      border-color: #d6d3d1;
      background: #fafaf9;
      color: #57534e;
    }

    .service-detail-list {
      grid-column: 1 / -1;
      display: grid;
      gap: 8px;
    }

    .service-detail-row {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) 82px 82px 88px 38px;
      gap: 8px;
      align-items: end;
    }

    .service-detail-row > label {
      min-width: 0;
    }

    .service-detail-row input,
    .service-detail-row select {
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
    }

    .service-detail-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      align-items: stretch;
    }

    .service-detail-actions .inline-button {
      width: 100%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      text-align: center;
      white-space: nowrap;
    }

    .approved-service-note {
      color: #9a3412;
      font-size: 12px;
      font-weight: 900;
      min-height: 18px;
    }

    .approval-usage-panel {
      grid-column: 1 / -1;
      display: grid;
      gap: 5px;
      border: 2px solid #bbf7d0;
      border-radius: 12px;
      padding: 10px 12px;
      background: #f0fdf4;
      color: #166534;
      font-size: 12px;
      font-weight: 900;
    }

    .approval-usage-panel.warning {
      border-color: #fecaca;
      background: #fef2f2;
      color: #b91c1c;
    }

    .approval-usage-panel span {
      display: block;
      line-height: 1.5;
    }

    .summary-approval-status {
      border-radius: 999px;
      padding: 4px 9px;
      background: #dcfce7;
      color: #166534;
      font-weight: 900;
      white-space: nowrap;
    }

    .summary-approval-status.warning {
      background: #fee2e2;
      color: #b91c1c;
    }

    .service-detail-row button,
    .inline-button {
      border: 0;
      border-radius: 14px;
      min-height: 38px;
      background: #1f2937;
      color: #fff;
      font-weight: 900;
      cursor: pointer;
      padding: 0 10px;
    }

    .service-detail-row button {
      background: #ef4444;
      padding: 0;
    }

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

    .weekday-picker label {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
      border: 2px solid #f5f5f4;
      border-radius: 12px;
      background: white;
      color: #57534e;
      font-size: 12px;
    }

    .weekday-picker input {
      width: auto;
      min-height: auto;
      margin-right: 4px;
      accent-color: var(--orange);
    }

    .weekday-picker .continuous-option {
      border-color: #fed7aa;
      background: #fff7ed;
      color: #9a3412;
      font-weight: 900;
    }

    .quick-create {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
      margin-bottom: 12px;
      padding: 12px;
      border-radius: 20px;
      background: #fff7ed;
      border: 2px solid #fed7aa;
    }

    .quick-create-title {
      color: var(--orange-dark);
      font-size: 13px;
      font-weight: 900;
    }

    .quick-create-actions {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
    }

    .quick-create-actions button {
      border: 0;
      border-radius: 14px;
      min-height: 38px;
      background: white;
      color: #57534e;
      font-weight: 900;
      cursor: pointer;
      text-align: left;
      padding: 0 12px;
    }

    .quick-create-actions button:hover {
      background: var(--orange);
      color: white;
    }

    .schedule-tools {
      display: grid;
      gap: 8px;
      margin-top: 12px;
      padding: 12px;
      border-radius: 20px;
      background: #fafaf9;
      border: 2px solid #f5f5f4;
    }

    .clock-detail-panel {
      display: grid;
      gap: 6px;
      grid-column: 1 / -1;
      padding: 10px;
      border-radius: 16px;
      background: #fff;
      border: 2px solid #f5f5f4;
      color: #57534e;
      font-size: 13px;
      font-weight: 900;
      line-height: 1.55;
    }

    .clock-detail-row {
      padding-top: 6px;
      border-top: 1px dashed #e7e5e4;
      overflow-wrap: anywhere;
    }

    .clock-detail-row:first-child {
      padding-top: 0;
      border-top: 0;
    }

    .clock-detail-row-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .clock-detail-row-copy {
      min-width: 0;
      flex: 1 1 auto;
    }

    .clock-location-evidence {
      color: #78716c;
      font-size: 12px;
      font-weight: 700;
      line-height: 1.6;
    }

    .clock-corrected-badge {
      display: inline-flex;
      align-items: center;
      margin-left: 6px;
      padding: 1px 6px;
      border-radius: 5px;
      background: #fef3c7;
      color: #92400e;
      font-size: 11px;
      font-weight: 900;
    }

    .clock-correction-button {
      flex: 0 0 auto;
      min-height: 32px;
      padding: 0 10px;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      background: #fff;
      color: #57534e;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
    }

    .clock-correction-button:hover {
      border-color: #f59e0b;
      color: #b45309;
    }

    .clock-record-actions {
      display: flex;
      flex: 0 0 auto;
      align-items: center;
      gap: 6px;
    }

    .clock-reset-single-button {
      min-height: 32px;
      padding: 0 10px;
      border: 1px solid #fecaca;
      border-radius: 6px;
      background: #fff;
      color: #b91c1c;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
    }

    .clock-reset-single-button:hover {
      border-color: #ef4444;
      background: #fef2f2;
    }

    @media (max-width: 720px) {
      .clock-detail-row-head,
      .clock-record-actions {
        align-items: stretch;
      }

      .clock-detail-row-head {
        flex-direction: column;
      }

      .clock-record-actions > button {
        flex: 1 1 0;
      }
    }

    .clock-correction-panel {
      display: grid;
      gap: 10px;
      padding: 12px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
    }

    .clock-correction-panel[hidden] {
      display: none;
    }

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

    .clock-correction-head strong {
      color: #44403c;
      font-size: 14px;
    }

    .clock-correction-close {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 34px;
      height: 34px;
      padding: 0;
      border: 1px solid #d6d3d1;
      border-radius: 6px;
      background: #fff;
      color: #57534e;
      cursor: pointer;
    }

    .clock-correction-original {
      padding: 8px 10px;
      border-left: 3px solid #a8a29e;
      background: #f5f5f4;
      color: #57534e;
      font-size: 13px;
      font-weight: 800;
    }

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

    .clock-correction-grid .full {
      grid-column: 1 / -1;
    }

    .clock-correction-impact {
      color: #b91c1c;
      font-size: 12px;
      font-weight: 900;
      line-height: 1.5;
    }

    .clock-correction-progress {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #9a3412;
      font-size: 13px;
      font-weight: 800;
    }

    .clock-correction-progress[hidden] { display: none; }
    .clock-correction-progress.error { color: #b91c1c; }
    .clock-correction-spinner { animation: loading-spin 1s linear infinite; }
    .clock-correction-panel button:disabled { opacity: 0.65; cursor: wait; }

    .clock-correction-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    .clock-correction-actions button {
      min-height: 38px;
      padding: 0 14px;
      border: 0;
      border-radius: 6px;
      background: #78716c;
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .clock-correction-actions .primary {
      background: #c2410c;
    }

    @media (max-width: 700px) {
      .clock-correction-grid {
        grid-template-columns: minmax(0, 1fr);
      }

      .clock-correction-grid .full {
        grid-column: auto;
      }
    }

    .photo-detail-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 6px;
    }

    .photo-detail-button {
      border: 0;
      border-radius: 12px;
      min-height: 36px;
      padding: 0 12px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--orange);
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .photo-detail-button.secondary {
      background: var(--stone);
    }

    .photo-detail-button.danger,
    .record-action-button.danger-mini {
      background: #dc2626;
    }

    .admin-photo-input {
      display: none;
    }

    .photo-badge {
      background: #ffedd5;
      color: #c2410c;
    }

    .photo-preview-backdrop {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: grid;
      place-items: center;
      padding: 20px;
      background: rgba(31, 41, 55, 0.72);
    }

    .photo-preview-backdrop.hidden {
      display: none;
    }

    .photo-preview-panel {
      width: min(100%, 760px);
      max-height: 92vh;
      overflow: auto;
      border-radius: 28px;
      background: #fff;
      padding: 16px;
      box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.45);
    }

    .photo-preview-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
      color: var(--stone);
      font-weight: 900;
    }

    .photo-preview-close {
      border: 0;
      border-radius: 14px;
      width: 42px;
      height: 42px;
      display: grid;
      place-items: center;
      background: var(--orange-soft);
      color: var(--orange-dark);
      font-size: 20px;
      cursor: pointer;
    }

    .photo-preview-image {
      width: 100%;
      max-height: 78vh;
      object-fit: contain;
      border-radius: 18px;
      background: #fafaf9;
    }

    .photo-preview-stage {
      position: relative;
      display: grid;
      place-items: center;
      min-height: 240px;
      border-radius: 18px;
      background: #fafaf9;
      overflow: hidden;
    }

    .photo-preview-nav {
      position: absolute;
      top: 50%;
      z-index: 1;
      width: 44px;
      height: 44px;
      border: 1px solid rgba(255, 255, 255, 0.72);
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: rgba(31, 41, 55, 0.78);
      color: #fff;
      font-size: 20px;
      cursor: pointer;
      transform: translateY(-50%);
    }

    .photo-preview-nav.previous {
      left: 12px;
    }

    .photo-preview-nav.next {
      right: 12px;
    }

    .photo-preview-nav.hidden,
    .photo-preview-meta.hidden {
      display: none;
    }

    .photo-preview-meta {
      margin-top: 10px;
      text-align: center;
      color: #78716c;
      font-size: 13px;
      font-weight: 800;
    }

    .danger-inline {
      background: var(--danger) !important;
    }

    .tool-title {
      color: #57534e;
      font-size: 13px;
      font-weight: 900;
    }

    .tool-buttons {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 8px;
    }

    .tool-buttons button {
      border: 0;
      border-radius: 14px;
      min-height: 38px;
      background: #1f2937;
      color: white;
      font-weight: 900;
      cursor: pointer;
      padding: 0 10px;
    }

    .tool-buttons button.copy {
      background: #67c09b;
    }

    .tool-buttons button.delete {
      background: #ef4444;
    }

    .modal-close {
      position: absolute;
      top: 12px;
      right: 12px;
      z-index: 20;
      border: 0;
      width: 42px;
      min-width: 42px;
      height: 42px;
      min-height: 42px;
      display: grid;
      place-items: center;
      border-radius: 12px;
      padding: 0;
      background: var(--orange-soft);
      color: var(--orange-dark);
      font-size: 20px;
      cursor: pointer;
      margin: 0;
    }

    .window-close-button {
      flex: 0 0 42px;
      width: 42px;
      min-width: 42px;
      height: 42px;
      min-height: 42px;
      display: grid;
      place-items: center;
      border: 0;
      border-radius: 12px;
      padding: 0;
      background: var(--orange-soft);
      color: var(--orange-dark);
      font-size: 20px;
      cursor: pointer;
    }

    .main-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
      margin-bottom: 18px;
    }

    .main-title > .toolbar {
      flex: 1 1 680px;
      margin-bottom: 0 !important;
    }

    .main-title h2 {
      margin: 0;
      font-size: 30px;
    }

    .main-title-heading {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .main-title-icon {
      width: 44px;
      height: 44px;
      display: grid;
      place-items: center;
      flex: 0 0 44px;
      border-radius: 50%;
      background: var(--orange-soft);
      color: var(--orange-dark);
      font-size: 23px;
    }

    .pill {
      background: var(--orange-soft);
      color: var(--orange-dark);
      border-radius: 999px;
      padding: 8px 12px;
      font-weight: 900;
      font-size: 12px;
    }

    body.workspace-mode .shell {
      width: 100%;
      max-width: none;
      padding: 10px;
      grid-template-columns: 230px minmax(0, 1fr);
      gap: 12px;
    }

    body.workspace-mode header {
      top: 10px;
      height: calc(100vh - 20px);
      max-height: calc(100vh - 20px);
      padding: 18px;
      border-radius: 0;
    }

    body.workspace-mode h1 {
      font-size: 20px;
    }

    body.workspace-mode .brand-sub {
      margin: 6px 0 16px;
      font-size: 12px;
    }

    body.workspace-mode nav {
      gap: 10px;
    }

    body.workspace-mode nav button {
      min-height: 46px;
      border-radius: 16px;
      padding: 0 14px;
      font-size: 16px;
      line-height: 1.25;
    }

    body.workspace-mode main {
      height: calc(100vh - 20px);
      max-height: calc(100vh - 20px);
      padding: 14px;
      border-radius: 0;
    }

    body.workspace-mode .main-title {
      margin-bottom: 10px;
    }

    body.workspace-mode .main-title h2 {
      font-size: 30px;
    }

    body.workspace-mode .toolbar {
      margin-bottom: 10px;
    }

    body.workspace-mode .layout {
      grid-template-columns: 1fr;
      gap: 12px;
    }

    body.workspace-mode .table-wrap {
      max-height: none;
    }

    body.schedule-mode .shell {
      width: 100%;
      max-width: none;
      padding: 10px;
      grid-template-columns: 230px minmax(0, 1fr);
      gap: 12px;
    }

    body.schedule-mode header {
      top: 10px;
      height: calc(100vh - 20px);
      max-height: calc(100vh - 20px);
      padding: 18px;
      border-radius: 0;
    }

    body.schedule-mode h1 {
      font-size: 20px;
    }

    body.schedule-mode .brand-sub {
      margin: 6px 0 16px;
      font-size: 12px;
    }

    body.schedule-mode .main-title .brand-sub,
    body.schedule-mode .main-title .pill {
      font-size: 12px;
    }

    body.schedule-mode nav button {
      min-height: 46px;
      border-radius: 16px;
      padding: 0 14px;
      font-size: 16px;
      line-height: 1.25;
    }

    body.schedule-mode main {
      height: calc(100vh - 20px);
      max-height: calc(100vh - 20px);
      padding: 14px;
      border-radius: 0;
    }

    body.schedule-mode .main-title {
      margin-bottom: 10px;
    }

    body.schedule-mode .main-title h2 {
      font-size: 30px;
    }

    body.schedule-mode .toolbar {
      margin-bottom: 10px;
    }

    body.schedule-mode .layout {
      grid-template-columns: 1fr;
      gap: 12px;
    }

    body.schedule-mode .table-wrap {
      max-height: none;
      overflow: visible;
    }

    body.schedule-mode table {
      min-width: 0;
    }

    body.schedule-mode .table-wrap td {
      padding: 0;
      border: 0;
      white-space: normal;
    }

    body.schedule-mode aside.panel,
    body.service-record-page-mode.schedule-editor-open aside.panel {
      display: none;
      padding: 16px;
      border-radius: 24px;
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
    }

    body.schedule-mode.schedule-editor-open::before,
    body.service-record-page-mode.schedule-editor-open::before {
      content: none;
      display: none;
    }

    body.schedule-mode.schedule-editor-open aside.panel,
    body.service-record-page-mode.schedule-editor-open aside.panel {
      display: block;
      position: fixed;
      z-index: 14001;
      top: 50%;
      left: 50%;
      width: min(760px, calc(100vw - 24px));
      max-height: calc(100vh - 24px);
      overflow-y: auto;
      overscroll-behavior: contain;
      touch-action: auto;
      transform: translate(-50%, -50%);
      box-shadow: 0 24px 60px rgba(31, 41, 55, 0.24);
    }

    body.schedule-mode.schedule-editor-open .tablet-sidebar-fab,
    body.service-record-page-mode.schedule-editor-open .tablet-sidebar-fab {
      display: none;
    }

    body.schedule-mode .board-wrap {
      gap: 8px;
    }

    body.schedule-mode .board-toolbar {
      grid-template-columns: 44px 72px 72px 44px repeat(5, minmax(112px, 1fr)) 82px 96px 96px;
      gap: 8px;
      padding: 10px;
      border-radius: 20px;
    }

    body.schedule-mode .board-toolbar label {
      min-width: 0;
    }

    .board-client-keyword-field {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .board-client-keyword-field > label {
      display: block;
    }

    .board-employee-keyword-field .record-suggest-wrap {
      gap: 0;
    }

    .board-employee-keyword-field .record-suggestion-list {
      position: fixed;
      inset: auto;
      z-index: 14001;
      text-align: left;
    }

    body.schedule-mode .board-toolbar .board-employee-keyword-field .record-suggestion-option {
      display: block;
      width: 100%;
      height: auto;
      min-height: 38px;
      padding: 7px 9px;
      border-radius: 8px;
      background: #fff;
      color: #292524;
      text-align: left;
      white-space: nowrap;
    }

    body.schedule-mode .board-toolbar .board-employee-keyword-field .record-suggestion-option:hover,
    body.schedule-mode .board-toolbar .board-employee-keyword-field .record-suggestion-option.active {
      background: #fff7ed;
      color: #9a3412;
    }

    .board-employee-multi-field {
      position: relative;
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .board-employee-multi-field > label {
      display: block;
    }

    body.schedule-mode .board-toolbar .board-employee-multi-trigger {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      width: 100%;
      min-width: 0;
      padding: 0 10px;
      border: 1px solid #d6d3d1;
      background: #fff;
      color: #292524;
      box-shadow: none;
      text-align: left;
    }

    body.schedule-mode .board-toolbar .board-employee-multi-trigger[aria-expanded="true"] {
      border-bottom-color: #fff;
      border-radius: 10px 10px 0 0;
    }

    .board-employee-multi-trigger span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .board-employee-multi-trigger i {
      flex: 0 0 auto;
      color: #78716c;
    }

    .board-employee-multi-popover {
      position: fixed;
      z-index: 14002;
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr) auto;
      gap: 8px;
      width: min(380px, calc(100vw - 24px));
      max-height: min(520px, calc(100vh - 24px));
      padding: 10px;
      border: 1px solid #d6d3d1;
      border-radius: 10px;
      background: #fff;
      box-shadow: 0 18px 42px rgba(41, 37, 36, 0.22);
      text-align: left;
    }

    .board-employee-multi-popover:not(.tablet-centered) {
      border-radius: 0 0 10px 10px;
    }

    .board-employee-multi-popover.tablet-centered {
      border-radius: 10px;
    }

    .board-employee-multi-popover[hidden] {
      display: none !important;
    }

    .board-employee-multi-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .board-employee-multi-head strong {
      color: #292524;
      font-size: 14px;
    }

    body.schedule-mode .board-toolbar .board-employee-multi-close,
    body.schedule-mode > .board-employee-multi-popover .board-employee-multi-close {
      width: 32px;
      min-width: 32px;
      height: 32px;
      min-height: 32px;
      padding: 0;
      border: 0;
      border-radius: 8px;
      background: #f5f5f4;
      color: #57534e;
      box-shadow: none;
    }

    body.schedule-mode .board-toolbar .board-employee-multi-search,
    body.schedule-mode > .board-employee-multi-popover .board-employee-multi-search {
      width: 100%;
      height: 40px;
      min-height: 40px;
      margin: 0;
      border-radius: 10px;
      font-size: 14px;
    }

    .board-employee-multi-options {
      min-height: 0;
      display: grid;
      gap: 4px;
      max-height: 330px;
      overflow-y: auto;
      overscroll-behavior: contain;
    }

    body.schedule-mode .board-toolbar label.board-employee-multi-option,
    body.schedule-mode > .board-employee-multi-popover label.board-employee-multi-option {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
      min-height: 42px;
      padding: 6px 8px;
      border-radius: 8px;
      color: #292524;
      cursor: pointer;
    }

    body.schedule-mode .board-toolbar label.board-employee-multi-option:hover,
    body.schedule-mode .board-toolbar label.board-employee-multi-option.selected,
    body.schedule-mode > .board-employee-multi-popover label.board-employee-multi-option:hover,
    body.schedule-mode > .board-employee-multi-popover label.board-employee-multi-option.selected {
      background: #fff7ed;
    }

    body.schedule-mode .board-toolbar label.board-employee-multi-option[hidden],
    body.schedule-mode > .board-employee-multi-popover label.board-employee-multi-option[hidden] {
      display: none !important;
    }

    .board-employee-multi-option input {
      width: 16px !important;
      min-width: 16px !important;
      height: 16px !important;
      min-height: 16px !important;
      margin: 0 !important;
      accent-color: var(--orange);
    }

    .board-employee-multi-option strong {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
    }

    .board-employee-multi-option small {
      color: #78716c;
      font-size: 11px;
      white-space: nowrap;
    }

    .board-employee-multi-empty {
      padding: 16px 8px;
      color: #78716c;
      font-size: 13px;
      text-align: center;
    }

    .board-employee-multi-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      padding-top: 2px;
    }

    body.schedule-mode .board-toolbar .board-employee-multi-actions button,
    body.schedule-mode > .board-employee-multi-popover .board-employee-multi-actions button {
      width: 100%;
      min-height: 38px;
      border: 0;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      font-family: inherit;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: none;
    }

    body.schedule-mode .board-toolbar .board-employee-multi-clear,
    body.schedule-mode > .board-employee-multi-popover .board-employee-multi-clear {
      background: #1f2937;
      color: #fff;
    }

    body.schedule-mode .board-toolbar .board-employee-multi-clear:hover,
    body.schedule-mode > .board-employee-multi-popover .board-employee-multi-clear:hover {
      background: #374151;
      color: #fff;
    }

    body.schedule-mode .board-toolbar .board-employee-clear-selection,
    body.schedule-mode > .board-employee-multi-popover .board-employee-clear-selection {
      border: 1px solid #fdba74;
      background: #fff7ed;
      color: #c2410c;
    }

    body.schedule-mode .board-toolbar .board-employee-clear-selection:hover,
    body.schedule-mode > .board-employee-multi-popover .board-employee-clear-selection:hover {
      background: #ffedd5;
      color: #9a3412;
    }

    body.schedule-mode .board-toolbar label:not(.toggle-row) input,
    body.schedule-mode .board-toolbar label:not(.toggle-row) select,
    body.schedule-mode .board-toolbar .board-client-keyword-field > input,
    body.schedule-mode .board-toolbar .board-employee-keyword-field input {
      width: 100%;
      min-width: 0;
      height: 38px;
      min-height: 38px;
      box-sizing: border-box;
      margin: 0;
    }

    body.schedule-mode .board-toolbar button {
      height: 38px;
      min-height: 38px;
      border-radius: 12px;
      font-size: 13px;
    }

    body.schedule-mode .board-toolbar label:not(.toggle-row) input,
    body.schedule-mode .board-toolbar label:not(.toggle-row) select,
    body.schedule-mode .board-toolbar .board-client-keyword-field > input,
    body.schedule-mode .board-toolbar .board-employee-keyword-field input {
      border-radius: 12px;
      font-size: 13px;
    }

    .board-client-suggestions {
      position: fixed;
      z-index: 150;
      display: grid;
      gap: 4px;
      max-height: 300px;
      overflow-y: auto;
      padding: 6px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 12px 28px rgba(41, 37, 36, 0.18);
    }

    .board-client-suggestions[hidden] {
      display: none;
    }

    body.schedule-mode .board-toolbar .board-client-suggestion {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      width: 100%;
      height: auto;
      min-height: 42px;
      padding: 7px 10px;
      border: 0;
      border-radius: 6px;
      background: #fff;
      color: #44403c;
      text-align: left;
    }

    body.schedule-mode .board-toolbar .board-client-suggestion:hover,
    body.schedule-mode .board-toolbar .board-client-suggestion:focus-visible,
    body.schedule-mode .board-toolbar .board-client-suggestion.active {
      background: #f5f3ef;
      color: #292524;
    }

    .board-client-suggestion strong {
      overflow: hidden;
      font-size: 14px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .board-client-suggestion small,
    .board-client-suggestion-empty {
      color: #78716c;
      font-size: 12px;
      font-weight: 700;
    }

    .board-client-suggestion-empty {
      padding: 10px;
      text-align: center;
    }

    body.schedule-mode .legend {
      padding: 8px 10px;
      border-radius: 16px;
      font-size: 12px;
      line-height: 1.55;
    }

    body.schedule-mode .summary-bar {
      padding: 8px;
      gap: 10px;
      border-radius: 18px 18px 0 0;
      font-size: 13px;
    }

    body.schedule-mode .month-board {
      overflow: visible;
      border-radius: 0 0 20px 20px;
    }

    body.schedule-mode .calendar-grid {
      width: 100%;
      min-width: 0;
      grid-template-columns: 44px repeat(7, minmax(0, 1fr));
    }

    body.schedule-mode .week-cell,
    body.schedule-mode .day-cell {
      min-height: 142px;
    }

    body.schedule-mode .week-cell {
      font-size: 12px;
    }

    body.schedule-mode .day-head {
      min-height: 34px;
      padding: 8px 4px;
      font-size: 12px;
    }

    body.schedule-mode .day-body {
      padding: 6px;
      gap: 3px;
    }

    body.schedule-mode .day-stats {
      font-size: 11px;
      line-height: 1.35;
    }

    body.schedule-mode .service-line {
      font-size: 11px;
      line-height: 1.3;
    }

    body.schedule-mode .service-line i {
      width: 16px;
      height: 16px;
      font-size: 11px;
    }


    .service-line-text {
      flex: 1 1 auto;
      min-width: 0;
      display: block;
    }

    .month-schedule-main {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 3px 5px;
      min-width: 0;
    }

    .month-schedule-caregiver {
      display: flex;
      align-items: center;
      gap: 4px;
      width: 100%;
      min-width: 0;
      margin-top: 3px;
      color: #57534e;
      font-weight: 800;
      line-height: 1.35;
    }

    .month-schedule-caregiver i {
      flex: 0 0 auto;
      width: 14px !important;
      height: 14px !important;
      border-radius: 0 !important;
      background: transparent !important;
      color: #78716c !important;
      font-size: 13px !important;
    }

    .month-schedule-caregiver-name {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .month-schedule-caregiver-id {
      flex: 0 0 auto;
      color: #a8a29e;
      font-weight: 700;
      white-space: nowrap;
    }

    .month-schedule-statuses {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 4px;
      margin-top: 3px;
    }

    .schedule-status-control {
      display: grid;
      gap: 7px;
      padding: 10px 12px;
      border: 1px solid #dfe4e2;
      border-radius: 6px;
      background: #f8faf9;
    }

    .schedule-status-control > span {
      color: #374151;
      font-size: 13px;
      font-weight: 900;
    }

    .schedule-status-segments {
      display: grid;
      grid-template-columns: repeat(5, minmax(92px, 1fr));
      gap: 6px;
    }

    .schedule-status-segments button {
      min-height: 38px;
      padding: 7px 9px;
      border: 1px solid #d1d5db;
      border-radius: 5px;
      background: #fff;
      color: #4b5563;
      font-family: inherit;
      font-size: 13px;
      font-weight: 800;
      line-height: 1.35;
      cursor: pointer;
      transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
    }

    .schedule-status-segments button:hover {
      border-color: #9ca3af;
      background: #f9fafb;
      color: #374151;
    }

    .schedule-status-segments button.active {
      border-color: #53796b;
      background: #eaf2ee;
      color: #245443;
      box-shadow: inset 0 0 0 1px #53796b;
    }

    .schedule-status-segments button[data-schedule-status="訪視未遇"].active {
      border-color: #a86161;
      background: #f8eaea;
      color: #733b3b;
      box-shadow: inset 0 0 0 1px #a86161;
    }

    .schedule-status-segments button[data-schedule-status="個案請假"].active {
      border-color: #a77b2f;
      background: #fff6dd;
      color: #714f16;
      box-shadow: inset 0 0 0 1px #a77b2f;
    }

    .schedule-status-segments button[data-schedule-status="員工請假"].active {
      border-color: #64829a;
      background: #eaf2f7;
      color: #38566d;
      box-shadow: inset 0 0 0 1px #64829a;
    }

    .schedule-status-segments button[data-schedule-status="暫停服務"].active {
      border-color: #78716c;
      background: #f0efed;
      color: #44403c;
      box-shadow: inset 0 0 0 1px #78716c;
    }

    .schedule-status-control small {
      color: #6b7280;
      font-size: 12px;
      font-weight: 700;
    }

    @media (max-width: 700px) {
      .schedule-status-segments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    .schedule-inline-actions {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin-left: auto;
      margin-top: 1px;
    }

    .schedule-inline-actions button {
      width: 25px;
      height: 25px;
      min-height: 25px;
      border: 0;
      border-radius: 8px;
      display: inline-grid;
      place-items: center;
      padding: 0;
      background: #f5f5f4;
      color: #57534e;
      cursor: pointer;
      font-size: 13px;
    }

    .schedule-inline-actions button:hover {
      background: var(--orange);
      color: white;
    }

    .schedule-inline-actions button[data-inline-action="delete"]:hover {
      background: var(--danger);
      color: white;
    }

    body.schedule-mode.schedule-editor-open aside.panel,
    body.service-record-page-mode.schedule-editor-open aside.panel {
      width: min(1120px, calc(100vw - 28px));
      max-height: calc(100vh - 28px);
    }

    /* Safari may place a native date picker underneath a transformed fixed panel.
       Keep the schedule editor centered without transform so recurring dates stay clickable. */
    body.schedule-mode.schedule-editor-open aside.panel,
    body.service-record-page-mode.schedule-editor-open aside.panel {
      top: 14px;
      right: 0;
      bottom: 14px;
      left: 0;
      height: auto;
      max-height: none;
      margin: 0 auto;
      transform: none;
    }

    body.schedule-mode.schedule-editor-open .schedule-tools,
    body.service-record-page-mode.schedule-editor-open .schedule-tools {
      position: relative;
      z-index: 2;
    }

    body.schedule-mode.schedule-editor-open .schedule-form-grid,
    body.service-record-page-mode.schedule-editor-open .schedule-form-grid {
      grid-template-columns: repeat(4, minmax(150px, 1fr));
      gap: 8px;
    }

    body.schedule-mode.schedule-editor-open .service-detail-list,
    body.service-record-page-mode.schedule-editor-open .service-detail-list {
      gap: 6px;
    }

    body.schedule-mode.schedule-editor-open #serviceDetailRows,
    body.schedule-mode.schedule-editor-open .service-detail-actions,
    body.service-record-page-mode.schedule-editor-open #serviceDetailRows,
    body.service-record-page-mode.schedule-editor-open .service-detail-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(260px, 1fr));
      gap: 8px;
    }

    body.schedule-mode.schedule-editor-open .service-detail-row,
    body.service-record-page-mode.schedule-editor-open .service-detail-row {
      grid-template-columns: minmax(190px, 1fr) 70px 70px 76px 36px;
      gap: 6px;
    }

    body.schedule-mode.schedule-editor-open .schedule-tools,
    body.service-record-page-mode.schedule-editor-open .schedule-tools {
      margin-top: 8px;
      padding: 10px;
      gap: 7px;
    }

    @media (max-width: 720px) {
      body.tablet-mode.appointment-mode.appointment-editor-open .appointment-editor-grid {
        grid-template-columns: minmax(0, 1fr);
      }

      body.tablet-mode.appointment-mode.appointment-editor-open aside.panel {
        top: max(6px, env(safe-area-inset-top));
        right: 6px;
        bottom: max(6px, env(safe-area-inset-bottom));
        left: 6px;
        padding: 10px;
        border-radius: 14px;
      }

      body.tablet-mode.appointment-mode.appointment-editor-open aside.panel h2 {
        top: -10px;
        margin: -10px -10px 8px;
        padding: 10px 50px 9px 10px;
      }

      .service-detail-actions,
      body.schedule-mode.schedule-editor-open .service-detail-actions,
      body.schedule-mode.schedule-editor-open #serviceDetailRows,
      body.service-record-page-mode.schedule-editor-open .service-detail-actions,
      body.service-record-page-mode.schedule-editor-open #serviceDetailRows {
        grid-template-columns: 1fr;
      }

      .service-detail-row,
      body.schedule-mode.schedule-editor-open .service-detail-row,
      body.service-record-page-mode.schedule-editor-open .service-detail-row {
        grid-template-columns: minmax(0, 1fr) 72px 72px;
        align-items: end;
      }

      .service-detail-row > label:first-child {
        grid-column: 1 / -1;
      }

      .service-detail-row > label:nth-child(4) {
        grid-column: 1 / span 2;
      }
    }

    body.schedule-mode.schedule-editor-open .schedule-tools .schedule-form-grid,
    body.service-record-page-mode.schedule-editor-open .schedule-tools .schedule-form-grid {
      grid-template-columns: repeat(4, minmax(135px, 1fr));
    }

    body.schedule-mode.schedule-editor-open label,
    body.service-record-page-mode.schedule-editor-open label {
      gap: 3px;
      font-size: 13px;
    }

    body.schedule-mode.schedule-editor-open input,
    body.schedule-mode.schedule-editor-open select,
    body.schedule-mode.schedule-editor-open textarea,
    body.service-record-page-mode.schedule-editor-open input,
    body.service-record-page-mode.schedule-editor-open select,
    body.service-record-page-mode.schedule-editor-open textarea {
      min-height: 38px;
      border-radius: 13px;
      padding: 6px 10px;
      font-size: 14px;
    }

    body.schedule-mode.schedule-editor-open textarea,
    body.service-record-page-mode.schedule-editor-open textarea {
      min-height: 48px;
    }

    body.schedule-mode.schedule-editor-open .tool-title,
    body.schedule-mode.schedule-editor-open .status,
    body.service-record-page-mode.schedule-editor-open .tool-title,
    body.service-record-page-mode.schedule-editor-open .status {
      font-size: 13px;
    }

    body.schedule-mode .summary-bar {
      font-size: 15px;
      gap: 14px;
      padding: 10px;
    }

    body.schedule-mode .week-cell,
    body.schedule-mode .day-cell {
      min-height: 168px;
    }

    body.schedule-mode .week-cell {
      font-size: 13px;
    }

    body.schedule-mode .day-head {
      font-size: 14px;
      min-height: 38px;
    }

    body.schedule-mode .day-stats {
      font-size: 13px;
      line-height: 1.42;
    }

    body.schedule-mode .service-line {
      font-size: 13px;
      line-height: 1.35;
      gap: 5px;
    }

    body.schedule-mode .service-line i {
      width: 18px;
      height: 18px;
      font-size: 12px;
    }

    body.schedule-mode .schedule-badge {
      font-size: 11px;
    }


    .clipboard-status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border-radius: 999px;
      background: #fff;
      color: #9a3412;
      border: 2px solid #fed7aa;
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 900;
    }

    .summary-bar button.cancel-copy {
      background: var(--orange-soft);
      color: #9a3412;
      border: 1px solid #fdba74;
    }

    .summary-bar button.cancel-copy:hover {
      background: #ffedd5;
      color: #7c2d12;
      border-color: #fb923c;
    }

    .tablet-sidebar-fab {
      display: inline-flex;
      position: fixed;
      left: 24px;
      right: auto;
      bottom: 24px;
      top: auto;
      z-index: 9;
      align-items: center;
      justify-content: center;
      gap: .5rem;
      height: 2.75rem;
      min-height: 2.75rem;
      padding: 0 1rem;
      border: 2px solid #fed7aa;
      border-radius: 999px;
      background: #fff;
      color: #ea580c;
      font: inherit;
      font-size: .75rem;
      font-weight: 900;
      white-space: nowrap;
      box-shadow: 0 10px 18px rgba(249, 115, 22, .10);
      backdrop-filter: none;
      cursor: pointer;
    }

    .tablet-sidebar-fab i {
      font-size: 1rem;
    }

    .tablet-sidebar-fab:hover {
      background: #fff7ed;
    }

    .loading-view:not(.hidden) ~ #adminShell .tablet-sidebar-fab {
      display: none;
    }

    body.record-modal-mode.record-editor-open .tablet-sidebar-fab,
    body.appointment-mode.appointment-editor-open .tablet-sidebar-fab,
    body.staff-notification-mode.staff-notification-composer-open .tablet-sidebar-fab,
    body.schedule-editor-open .tablet-sidebar-fab,
    body:has(.client-date-picker-backdrop) .tablet-sidebar-fab,
    body:has(.client-contract-signer-backdrop) .tablet-sidebar-fab,
    body:has(.schedule-governance-overlay) .tablet-sidebar-fab,
    body:has(.photo-preview-backdrop:not(.hidden)) .tablet-sidebar-fab,
    body:has(.visit-map-backdrop[open]) .tablet-sidebar-fab {
      display: none !important;
    }

    body.sidebar-collapsed .tablet-sidebar-fab,
    body.tablet-mode.tablet-sidebar-collapsed .tablet-sidebar-fab {
      background: #fff7ed;
      border-color: #fdba74;
      color: #c2410c;
    }

    body.sidebar-collapsed .shell,
    body.sidebar-collapsed.workspace-mode .shell,
    body.sidebar-collapsed.schedule-mode .shell {
      grid-template-columns: minmax(0, 1fr);
    }

    body.sidebar-collapsed header {
      display: none;
    }

    body.tablet-mode {
      min-width: 0;
    }

    body.tablet-mode .shell,
    body.tablet-mode.workspace-mode .shell,
    body.tablet-mode.schedule-mode .shell {
      width: 100%;
      max-width: none;
      grid-template-columns: 260px minmax(0, 1fr);
      gap: 10px;
      padding: 8px;
    }

    body.tablet-mode.tablet-sidebar-collapsed .shell,
    body.tablet-mode.tablet-sidebar-collapsed.workspace-mode .shell,
    body.tablet-mode.tablet-sidebar-collapsed.schedule-mode .shell {
      grid-template-columns: minmax(0, 1fr);
    }

    body.tablet-mode header,
    body.tablet-mode.workspace-mode header,
    body.tablet-mode.schedule-mode header {
      position: sticky;
      top: 8px;
      display: block;
      align-self: start;
      height: calc(100vh - 16px);
      max-height: calc(100vh - 16px);
      overflow: auto;
      padding: 18px;
      border-radius: 0;
    }

    body.tablet-mode.tablet-sidebar-collapsed header,
    body.tablet-mode.tablet-sidebar-collapsed.workspace-mode header,
    body.tablet-mode.tablet-sidebar-collapsed.schedule-mode header {
      display: none;
    }

    body.tablet-mode header .brand-lockup {
      min-width: 0;
    }

    body.tablet-mode header .brand-icon {
      width: 42px;
      height: 42px;
      border-radius: 14px;
    }

    body.tablet-mode header h1 {
      font-size: 18px;
    }

    body.tablet-mode header > .brand-sub {
      display: none;
    }

    body.tablet-mode header nav {
      display: grid;
      min-width: 0;
      gap: 7px;
      overflow: visible;
      padding: 0;
      scrollbar-width: thin;
    }

    body.tablet-mode header nav button,
    body.tablet-mode.schedule-mode nav button {
      width: 100%;
      min-height: 42px;
      border-radius: 13px;
      padding: 0 12px;
      font-size: 14px;
      white-space: nowrap;
    }

    body.tablet-mode main,
    body.tablet-mode.workspace-mode main,
    body.tablet-mode.schedule-mode main {
      min-width: 0;
      height: calc(100vh - 16px);
      max-height: calc(100vh - 16px);
      padding: 11px;
      border-radius: 0;
    }

    body.tablet-mode .main-title {
      gap: 8px;
      margin-bottom: 8px;
    }

    body.tablet-mode .main-title h2,
    body.tablet-mode.workspace-mode .main-title h2,
    body.tablet-mode.schedule-mode .main-title h2 {
      font-size: 30px;
    }

    body.tablet-mode .toolbar {
      flex-wrap: wrap;
      gap: 7px;
      margin-bottom: 8px;
    }

    body.tablet-mode .toolbar button,
    body.tablet-mode .toolbar .admin-account {
      min-height: 42px;
    }

    body.tablet-mode .layout {
      grid-template-columns: minmax(0, 1fr);
      gap: 8px;
    }

    body.tablet-mode .panel {
      border-radius: 16px;
    }

    body.tablet-mode .table-wrap {
      max-width: 100%;
      max-height: none;
      overflow: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }

    body.tablet-mode .client-tablet-overview {
      position: sticky;
      left: 0;
      z-index: 3;
      width: 100%;
      min-width: 0;
      padding: 10px;
      border-bottom: 1px solid #e7e5e4;
      background: #fff;
    }

    body.tablet-mode .client-tablet-overview .client-list-page {
      width: 100%;
      min-width: 0;
    }

    body.tablet-mode .client-tablet-overview .client-month-dashboard {
      width: 100%;
      min-width: 0;
      padding: 12px;
    }

    body.tablet-mode .client-tablet-overview .client-month-dashboard-head {
      align-items: flex-start;
    }

    body.tablet-mode .client-tablet-overview .client-month-controls {
      flex: 1 1 100%;
      flex-wrap: wrap;
    }

    body.tablet-mode .client-tablet-overview .client-month-controls input,
    body.tablet-mode .client-tablet-overview .client-month-controls button {
      min-height: 42px;
    }

    body.tablet-mode .client-tablet-overview .client-month-metrics {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.tablet-mode .client-tablet-overview .client-month-report-sections {
      grid-template-columns: minmax(0, 1fr);
      overflow: hidden;
    }

    body.tablet-mode .client-tablet-overview .client-month-report-block,
    body.tablet-mode .client-tablet-overview .client-month-report-block.identity-claims,
    body.tablet-mode .client-tablet-overview .client-month-report-block.month-dynamics,
    body.tablet-mode .client-tablet-overview .client-month-report-block.area-distribution {
      grid-column: auto;
      grid-row: auto;
      width: 100%;
      min-width: 0;
    }

    body.tablet-mode .client-tablet-overview .client-month-report-table {
      width: 100%;
      min-width: 0;
      table-layout: fixed;
    }

    body.tablet-mode .client-tablet-overview .client-month-report-table th,
    body.tablet-mode .client-tablet-overview .client-month-report-table td {
      min-width: 0;
      padding: 7px 4px;
      font-size: 12px;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    body.tablet-mode .client-tablet-overview .client-month-detail {
      grid-template-columns: minmax(0, 1fr);
    }

    body.tablet-mode .client-tablet-overview .client-month-hours {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.tablet-mode .client-tablet-overview .client-list-filters {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      width: 100%;
      min-width: 0;
    }

    body.tablet-mode .client-tablet-overview .client-list-actions {
      gap: 8px;
    }

    body.tablet-mode .client-tablet-overview .client-list-pagination {
      width: 100%;
      margin-left: 0;
      justify-content: flex-end;
      flex-wrap: wrap;
    }

    body.tablet-mode input[type="date"] {
      display: block;
      width: 100% !important;
      min-width: 0 !important;
      max-width: 100% !important;
      inline-size: 100% !important;
      min-inline-size: 0 !important;
      max-inline-size: 100% !important;
      box-sizing: border-box;
      padding: 0 6px !important;
      font-size: 13px;
      overflow: hidden;
    }

    body.tablet-mode input[type="date"]::-webkit-date-and-time-value {
      min-width: 0;
      text-align: left;
    }

    body.tablet-mode input[type="date"]::-webkit-datetime-edit {
      min-width: 0;
      overflow: hidden;
      padding: 0;
    }

    body.tablet-mode .client-list-date-filter {
      grid-column: 1 / -1;
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
    }

    body.tablet-mode .client-list-date-filter input[type="date"] {
      padding-inline: 6px !important;
      font-size: 12px;
    }

    body.tablet-mode .security-center-summary {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.tablet-mode .security-measures-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.tablet-mode .security-center-tools {
      grid-template-columns: minmax(0, 1fr) minmax(150px, 0.45fr);
    }

    body.tablet-mode .security-center-tools button {
      width: 100%;
    }

    body.tablet-mode.service-record-page-mode .layout > .table-wrap {
      max-width: 100%;
      overflow: visible;
    }

    body.tablet-mode.service-record-page-mode .layout > .table-wrap > table {
      width: 100%;
      min-width: 0;
      table-layout: fixed;
    }

    body.tablet-mode.service-record-page-mode .layout > .table-wrap > table > tbody > tr > td {
      width: 100%;
      max-width: 100%;
      padding: 0;
      white-space: normal;
    }

    body.tablet-mode.service-record-page-mode .service-records-wrap {
      width: 100%;
      min-width: 0;
      padding: 10px;
    }

    body.tablet-mode.service-record-page-mode .service-record-query-filters {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      width: 100%;
      min-width: 0;
      padding: 10px;
      gap: 9px;
    }

    body.tablet-mode.service-record-page-mode .service-record-query-filters > label,
    body.tablet-mode.service-record-page-mode .service-record-query-filters .filter-inline,
    body.tablet-mode.service-record-page-mode .service-record-query-filters .record-suggest-wrap {
      width: 100%;
      min-width: 0;
      max-width: 100%;
    }

    body.tablet-mode.service-record-page-mode .service-record-query-filters input,
    body.tablet-mode.service-record-page-mode .service-record-query-filters select {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      box-sizing: border-box;
    }

    body.tablet-mode.service-record-page-mode .service-record-query-filters .filter-check input[type="checkbox"] {
      flex: 0 0 20px;
      width: 20px;
      min-width: 20px;
      max-width: 20px;
      height: 20px;
      min-height: 20px;
      max-height: 20px;
      padding: 0;
    }

    body.tablet-mode.service-record-page-mode .service-record-query-filters .date-filter {
      grid-column: 1 / -1;
      grid-template-rows: 20px 48px;
      min-height: 73px;
      overflow: visible;
    }

    body.tablet-mode.service-record-page-mode .service-record-query-filters .service-date-range {
      grid-template-columns: minmax(138px, 1fr) 24px minmax(138px, 1fr);
      height: auto;
      min-height: 0;
      gap: 8px;
    }

    body.tablet-mode.service-record-page-mode .service-record-query-filters .service-record-month-switch {
      grid-template-columns: 48px minmax(0, 1fr) 48px;
      height: 48px;
      min-height: 48px;
      align-items: center;
    }

    body.tablet-mode.service-record-page-mode .service-record-query-filters .service-record-date-control {
      grid-template-columns: 48px minmax(150px, 1fr) 24px minmax(150px, 1fr) 48px;
      height: 48px;
      min-height: 48px;
    }

    body.tablet-mode.service-record-page-mode .service-record-query-filters .service-date-range input[type="date"] {
      height: 48px;
      min-height: 48px;
    }

    @media (min-width: 1000px) {
      body.tablet-mode.service-record-page-mode .service-record-query-filters.service-record-main-filters {
        grid-template-columns: minmax(250px, 2fr) repeat(6, minmax(0, 1fr));
      }

      body.tablet-mode.service-record-page-mode .service-record-query-filters.service-record-main-filters .date-filter {
        grid-column: auto;
      }

      body.tablet-mode.service-record-page-mode .service-record-query-filters.service-record-main-filters .service-record-date-control {
        grid-template-columns: 32px minmax(0, 1fr) 14px minmax(0, 1fr) 32px;
        gap: 4px;
      }
    }

    body.tablet-mode.service-record-page-mode .paper-service-form-table th:nth-child(1),
    body.tablet-mode.service-record-page-mode .paper-service-form-table td:nth-child(1) {
      position: sticky;
      left: 0;
      z-index: 4;
    }

    body.tablet-mode.service-record-page-mode .paper-service-form-table th:nth-child(2),
    body.tablet-mode.service-record-page-mode .paper-service-form-table td:nth-child(2) {
      position: sticky;
      left: 46px;
      z-index: 3;
      box-shadow: 2px 0 0 #e7e5e4;
    }

    body.tablet-mode.service-record-page-mode .paper-service-form-table th:nth-child(1),
    body.tablet-mode.service-record-page-mode .paper-service-form-table th:nth-child(2) {
      z-index: 6;
      background: #fff7ed;
    }

    body.tablet-mode.service-record-page-mode .paper-service-form-table tbody tr:nth-child(odd) td:nth-child(1),
    body.tablet-mode.service-record-page-mode .paper-service-form-table tbody tr:nth-child(odd) td:nth-child(2) {
      background: #fff;
    }

    body.tablet-mode.service-record-page-mode .paper-service-form-table tbody tr:nth-child(even) td:nth-child(1),
    body.tablet-mode.service-record-page-mode .paper-service-form-table tbody tr:nth-child(even) td:nth-child(2) {
      background: #f8fafc;
    }

    body.tablet-mode.service-record-page-mode .service-record-table-scroll {
      width: 100%;
      max-width: 100%;
      max-height: none !important;
      overflow-x: auto;
      overflow-y: hidden;
      overscroll-behavior-x: contain;
      overscroll-behavior-y: auto;
      -webkit-overflow-scrolling: touch;
    }

    body.tablet-mode.service-record-page-mode .service-record-table-scroll .service-record-table th {
      position: sticky;
      top: 0;
      z-index: 2;
    }

    body.tablet-mode.service-record-page-mode .service-record-table-scroll .service-record-table th:nth-child(1),
    body.tablet-mode.service-record-page-mode .service-record-table-scroll .service-record-table td:nth-child(1) {
      position: sticky;
      left: 0;
      z-index: 3;
    }

    body.tablet-mode.service-record-page-mode .service-record-table-scroll .service-record-table th:nth-child(2),
    body.tablet-mode.service-record-page-mode .service-record-table-scroll .service-record-table td:nth-child(2) {
      position: sticky;
      left: 48px;
      z-index: 3;
    }

    body.tablet-mode.service-record-page-mode .service-record-table-scroll .service-record-table td:nth-child(1),
    body.tablet-mode.service-record-page-mode .service-record-table-scroll .service-record-table td:nth-child(2) {
      background: #fff;
    }

    body.tablet-mode.schedule-mode .board-wrap {
      min-width: 0;
    }

    body.tablet-mode.schedule-mode .board-toolbar {
      grid-template-columns: 44px 68px 68px 44px repeat(5, minmax(118px, 1fr)) 82px 92px 92px;
      min-width: 1100px;
      gap: 7px;
      padding: 9px;
    }

    body.tablet-mode.schedule-mode .board-toolbar-wrap {
      max-width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    body.tablet-mode.schedule-mode .summary-bar {
      align-items: center;
      gap: 7px;
      grid-template-columns: minmax(0, 1fr);
      overflow: visible;
    }

    body.tablet-mode.schedule-mode .board-summary-metrics {
      width: 100%;
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
    }

    body.tablet-mode.schedule-mode .board-summary-actions {
      width: 100%;
      justify-content: flex-start;
      flex-wrap: wrap;
      overflow: visible;
    }

    body.tablet-mode.schedule-mode .month-board {
      max-width: 100%;
      overflow: auto;
      overscroll-behavior: contain;
      touch-action: pan-x pan-y;
      -webkit-overflow-scrolling: touch;
    }

    body.tablet-mode.schedule-mode .calendar-grid {
      width: 1060px;
      min-width: 1060px;
      grid-template-columns: 46px repeat(7, 1fr);
    }

    body.tablet-mode.schedule-mode .week-cell,
    body.tablet-mode.schedule-mode .day-cell {
      min-height: 160px;
    }

    body.tablet-mode.schedule-mode.schedule-editor-open aside.panel,
    body.tablet-mode.service-record-page-mode.schedule-editor-open aside.panel {
      top: 8px;
      right: 8px;
      bottom: 8px;
      left: 8px;
      z-index: 14001;
      width: auto;
      height: auto;
      max-height: none;
      padding: 12px;
      border-radius: 18px;
      transform: none;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }

    body.tablet-mode.appointment-mode.appointment-editor-open::before {
      content: none;
      display: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }

    body.tablet-mode.appointment-mode.appointment-editor-open aside.panel {
      display: block;
      position: fixed;
      top: 8px;
      right: 8px;
      bottom: 8px;
      left: 8px;
      z-index: 14001;
      width: auto;
      height: auto;
      max-height: none;
      padding: 12px;
      border-radius: 18px;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      touch-action: pan-y;
      transform: none;
      background: #fff;
      -webkit-overflow-scrolling: touch;
    }

    body.tablet-mode.appointment-mode.appointment-editor-open {
      overflow: hidden;
    }

    body.tablet-mode.appointment-mode.appointment-editor-open .tablet-sidebar-fab {
      display: none !important;
    }

    body.tablet-mode.appointment-mode.appointment-editor-open aside.panel h2 {
      position: sticky;
      top: -12px;
      z-index: 2;
      margin: -12px -12px 10px;
      padding: 12px 56px 10px 12px;
      background: #fff;
      border-bottom: 1px solid #f5f5f4;
    }

    body.tablet-mode.appointment-mode.appointment-editor-open .modal-close {
      position: absolute;
      top: 10px;
      right: 10px;
      z-index: 3;
      float: none;
      width: 42px;
      min-width: 42px;
      margin: 0;
      background: #fff7ed;
      color: #c2410c;
      border: 2px solid #fed7aa;
    }

    body.tablet-mode.appointment-mode.appointment-editor-open .appointment-editor-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    body.appointment-mode.appointment-editor-open aside.panel:has(.visit-record-editor) {
      width: min(1560px, calc(100vw - 32px));
      max-width: none;
    }
    body.tablet-mode.appointment-mode.appointment-editor-open aside.panel:has(.visit-record-editor) { width: auto; }
    .visit-record-editor [hidden] { display: none !important; }
    .visit-record-editor .visit-contact-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
    .visit-record-editor .visit-contact-fields:has(#applyVisitContact) { grid-template-columns: repeat(4, minmax(0, 1fr)) max-content; }
    .visit-record-editor .visit-contact-fields label { min-width: 0; }
    .visit-record-editor #applyVisitContact { height: 48px; min-height: 48px; margin: 0; padding: 0 14px; white-space: nowrap; }
    @media (max-width: 900px) {
      .visit-record-editor .visit-contact-fields,
      .visit-record-editor .visit-contact-fields:has(#applyVisitContact) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .visit-record-editor #applyVisitContact { grid-column: 1 / -1; justify-self: end; }
    }
    .visit-record-editor .visit-editor-writing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .visit-record-editor .visit-editor-writing label { min-width: 0; grid-column: auto; }
    .visit-record-editor .visit-editor-writing textarea { min-height: 200px; height: clamp(200px, calc(100dvh - 440px), 560px); resize: vertical; }
    .visit-record-editor textarea[name="安排備註"] { height: 64px; min-height: 64px; resize: vertical; }
    .visit-record-editor .visit-editor-actions { position: sticky; bottom: -12px; z-index: 2; background: #fff; padding: 12px 0; }
    .visit-record-editor input:not([type="hidden"]), .visit-record-editor select { height: 48px; min-height: 48px; box-sizing: border-box; }
    @media (min-width: 1100px) { .visit-record-editor.appointment-editor-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
    @media (max-width: 760px) { .visit-record-editor .visit-editor-writing { grid-template-columns: 1fr; } }

    body.tablet-mode.schedule-mode.schedule-editor-open::before,
    body.tablet-mode.service-record-page-mode.schedule-editor-open::before {
      content: none;
      display: none;
    }

    body.tablet-mode.schedule-mode.schedule-editor-open,
    body.tablet-mode.service-record-page-mode.schedule-editor-open {
      overflow: hidden;
    }

    body.tablet-mode.schedule-mode.schedule-editor-open aside.panel h2,
    body.tablet-mode.service-record-page-mode.schedule-editor-open aside.panel h2 {
      position: sticky;
      top: -12px;
      z-index: 2;
      margin: -12px -12px 10px;
      padding: 12px 56px 10px 12px;
      background: #fff;
      border-bottom: 1px solid #f5f5f4;
    }

    body.tablet-mode.schedule-mode.schedule-editor-open #closeScheduleEditor,
    body.tablet-mode.service-record-page-mode.schedule-editor-open #closeScheduleEditor {
      position: absolute;
      top: 10px;
      right: 10px;
      z-index: 3;
      float: none;
      width: 42px;
      min-width: 42px;
      margin: 0;
      background: #fff7ed;
      color: #c2410c;
      border: 2px solid #fed7aa;
    }

    body.tablet-mode.schedule-mode.schedule-editor-open .schedule-form-grid,
    body.tablet-mode.schedule-mode.schedule-editor-open .schedule-tools .schedule-form-grid,
    body.tablet-mode.service-record-page-mode.schedule-editor-open .schedule-form-grid,
    body.tablet-mode.service-record-page-mode.schedule-editor-open .schedule-tools .schedule-form-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    body.tablet-mode.schedule-mode.schedule-editor-open #serviceDetailRows,
    body.tablet-mode.schedule-mode.schedule-editor-open .service-detail-actions,
    body.tablet-mode.service-record-page-mode.schedule-editor-open #serviceDetailRows,
    body.tablet-mode.service-record-page-mode.schedule-editor-open .service-detail-actions {
      grid-template-columns: 1fr;
    }

    body.tablet-mode.schedule-mode.schedule-editor-open .service-detail-row,
    body.tablet-mode.service-record-page-mode.schedule-editor-open .service-detail-row {
      grid-template-columns: minmax(220px, 1fr) 76px 76px 82px 40px;
      overflow-x: auto;
    }

    body.tablet-mode input,
    body.tablet-mode select,
    body.tablet-mode textarea,
    body.tablet-mode button {
      touch-action: manipulation;
    }

    @media (max-width: 780px) {
      body.tablet-mode .security-center-summary,
      body.tablet-mode .security-center-tools {
        grid-template-columns: minmax(0, 1fr);
      }

      body.tablet-mode .security-center-tabs { width: auto; }

      body.tablet-mode .security-center-tabs button {
        padding: 0 8px;
        font-size: 12px;
      }

      body.tablet-mode .security-measures-grid {
        grid-template-columns: minmax(0, 1fr);
      }

      body.tablet-mode.service-record-page-mode .service-record-query-filters {
        grid-template-columns: minmax(0, 1fr);
      }

      body.tablet-mode.service-record-page-mode .service-record-query-filters .wide {
        grid-column: auto;
      }

      body.tablet-mode.service-record-page-mode .service-record-query-filters .service-date-range {
        grid-template-columns: minmax(0, 1fr);
      }

      body.tablet-mode.service-record-page-mode .service-record-query-filters .date-filter {
        grid-template-rows: 20px auto;
        min-height: 126px;
        overflow: hidden;
      }

      body.tablet-mode.service-record-page-mode .service-record-query-filters .service-record-month-switch {
        height: auto;
        min-height: 104px;
      }

      body.tablet-mode.service-record-page-mode .service-record-query-filters .service-record-date-control {
        grid-template-columns: 48px minmax(0, 1fr) 48px;
        grid-template-areas:
          "previous start next"
          ". end .";
        height: auto;
        min-height: 104px;
        row-gap: 8px;
      }

      body.tablet-mode.service-record-page-mode .service-record-date-control .service-record-date-previous { grid-area: previous; }
      body.tablet-mode.service-record-page-mode .service-record-date-control #recordStartDate { grid-area: start; }
      body.tablet-mode.service-record-page-mode .service-record-date-control #recordEndDate { grid-area: end; }
      body.tablet-mode.service-record-page-mode .service-record-date-control .service-record-date-next { grid-area: next; }

      body.tablet-mode.service-record-page-mode .service-date-separator {
        display: none;
      }

      body.tablet-mode.service-record-page-mode .service-record-filter-actions,
      body.tablet-mode.service-record-page-mode .paper-service-form-filter-actions {
        grid-column: 1 / -1;
      }

      body.tablet-mode .client-tablet-overview .client-list-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      body.tablet-mode .client-tablet-overview .client-month-hours {
        grid-template-columns: minmax(0, 1fr);
      }

      body.tablet-mode .main-title .pill {
        display: none;
      }

      body.tablet-mode .toolbar .admin-account {
        flex: 1 1 100%;
      }

      body.tablet-mode.schedule-mode .board-toolbar {
        min-width: 1060px;
      }

      body.tablet-mode.schedule-mode.schedule-editor-open .schedule-form-grid,
      body.tablet-mode.schedule-mode.schedule-editor-open .schedule-tools .schedule-form-grid,
      body.tablet-mode.service-record-page-mode.schedule-editor-open .schedule-form-grid,
      body.tablet-mode.service-record-page-mode.schedule-editor-open .schedule-tools .schedule-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (min-width: 1000px) {
      body.tablet-mode .client-tablet-overview .client-month-report-sections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      body.tablet-mode .client-tablet-overview .client-month-report-block.identity-claims {
        grid-column: 1;
        grid-row: 2;
      }

      body.tablet-mode .client-tablet-overview .client-month-report-block.month-dynamics {
        grid-column: 2;
        grid-row: 1;
      }

      body.tablet-mode .client-tablet-overview .client-month-report-block.area-distribution {
        grid-column: 2;
        grid-row: 2;
      }

      body.tablet-mode .client-tablet-overview .client-list-filters {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }
    }

    @media (max-width: 960px) {
      .shell {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 10px;
        padding: 8px;
      }

      header {
        position: sticky;
        top: 8px;
        align-self: start;
      }

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

      .board-toolbar {
        grid-template-columns: 1fr 1fr;
      }

      .table-wrap {
        max-height: none;
      }

      body.schedule-mode .shell {
        grid-template-columns: 220px minmax(0, 1fr);
        padding: 8px;
      }

      body.workspace-mode .shell {
        grid-template-columns: 220px minmax(0, 1fr);
        padding: 8px;
      }


      .client-profile-wrap {
        min-width: 0;
      }

      .client-profile-filter,
      .client-profile-header,
      .client-profile-grid,
      .client-profile-fields,
      .client-profile-history-details {
        grid-template-columns: 1fr;
      }

      .client-status-fields,
      .client-status-history-editor,
      .client-status-history-row {
        grid-template-columns: 1fr;
      }

      body.schedule-mode .board-toolbar {
        grid-template-columns: 1fr 1fr;
      }

      body.schedule-mode .calendar-grid {
        min-width: 980px;
      }

      body.schedule-mode .month-board {
        overflow: auto;
      }
    }
    .schedule-lock-badge {
      display: inline-flex;
      align-items: center;
      min-height: 34px;
      padding: 6px 10px;
      border: 1px solid #9ca3af;
      border-radius: 6px;
      background: #f3f4f6;
      color: #374151;
      font-size: 13px;
      white-space: nowrap;
    }

    .schedule-lock-badge.locked { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
    .schedule-lock-badge.unlocked { background: #ecfdf5; border-color: #059669; color: #065f46; }
    .schedule-lock-badge.error { background: #fff7ed; border-color: #ea580c; color: #9a3412; }
    .summary-bar #boardMonthLock { background: #49515c; }
    .summary-bar #boardRecycleBin { background: #7c5b45; }

    .schedule-governance-overlay {
      position: fixed;
      inset: 0;
      z-index: 10050;
      display: grid;
      place-items: center;
      padding: 24px;
      background: rgba(17, 24, 39, .58);
    }

    #recurringUpdateScopeModal {
      z-index: 16040;
    }

    .schedule-governance-dialog {
      width: min(760px, 96vw);
      max-height: min(820px, 92vh);
      overflow: hidden;
      background: #fff;
      color: var(--ink);
      border: 1px solid #d1d5db;
      border-radius: 8px;
      box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
      font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: 14px;
      line-height: 1.6;
      letter-spacing: 0;
    }

    .schedule-governance-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 16px 18px;
      border-bottom: 1px solid #e5e7eb;
    }

    .schedule-governance-dialog h3 {
      margin: 0;
      color: var(--stone);
      font-family: inherit;
      font-size: 18px;
      font-weight: 900;
      line-height: 1.4;
      letter-spacing: 0;
    }
    .schedule-governance-head button {
      width: 38px;
      height: 38px;
      border: 0;
      background: transparent;
      font-family: inherit;
      font-size: 20px;
      font-weight: 700;
      line-height: 1;
      letter-spacing: 0;
      cursor: pointer;
    }

    .schedule-governance-body {
      display: grid;
      gap: 14px;
      max-height: calc(min(820px, 92vh) - 72px);
      overflow: auto;
      padding: 18px;
    }

    .schedule-governance-body label {
      display: grid;
      gap: 7px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 900;
      line-height: 1.5;
      letter-spacing: 0;
    }
    .schedule-governance-body select,
    .schedule-governance-body textarea {
      width: 100%;
      min-height: 44px;
      font-family: inherit;
      font-size: 14px;
      font-weight: 700;
      line-height: 1.5;
      letter-spacing: 0;
    }
    .schedule-governance-body textarea { padding: 10px; resize: vertical; }
    .subsidy-claim-modal .schedule-governance-dialog { width: min(560px, 96vw); font-family: inherit; font-weight: 700; }
    #serviceSubsidyClaimForm { display: grid; gap: 14px; }
    .schedule-governance-body .subsidy-claim-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; }
    .subsidy-claim-toggle input { width: 16px; height: 16px; min-width: 16px; min-height: 16px; margin: 0; accent-color: var(--orange); }
    .subsidy-claim-context, .subsidy-claim-history { overflow-wrap: anywhere; }
    .subsidy-claim-history { color: #78716c; font-size: 13px; }
    .subsidy-claim-actions { display: flex; justify-content: flex-end; gap: 8px; }
    .subsidy-claim-actions button { min-height: 40px; padding: 8px 18px; border: 1px solid #d6d3d1; border-radius: 6px; background: #fff; color: #292524; font: inherit; font-weight: 900; letter-spacing: 0; cursor: pointer; box-shadow: none; }
    .subsidy-claim-actions button.primary { background: #1f2937; color: #fff; border-color: #1f2937; box-shadow: none; }
    .subsidy-claim-actions button:disabled { opacity: .6; cursor: wait; }
    .subsidy-claim-button { white-space: nowrap; border-radius: 6px; box-shadow: none; }
    .subsidy-claim-button.excluded { background: #fff7ed; color: #9a3412; border-color: #fdba74; box-shadow: none; }
    .subsidy-claim-error { color: #b91c1c; }
    .subsidy-claim-saving .ph-spinner-gap { display: inline-block; animation: loading-spin 1s linear infinite; }
    .schedule-governance-overlay.transfer-lookup-open .schedule-governance-dialog {
      width: min(1700px, calc(100vw - 32px));
      max-height: 96vh;
    }
    .schedule-governance-overlay.transfer-lookup-open .schedule-governance-body { max-height: calc(96vh - 72px); }
    .transfer-lookup-form { display: grid; grid-template-columns: minmax(330px, .9fr) minmax(420px, 1.35fr); gap: 18px; font-family: inherit; }
    .transfer-lookup-controls { display: grid; align-content: start; gap: 12px; min-width: 0; }
    .transfer-lookup-form input, .transfer-lookup-form select, .transfer-lookup-form button, .transfer-lookup-form a { font-family: inherit; letter-spacing: 0; }
    .transfer-lookup-form input:not([type="radio"]):not([type="checkbox"]), .transfer-lookup-form select { width: 100%; min-height: 44px; font-size: 14px; font-weight: 700; }
    .transfer-route-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .transfer-segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid #d6d3d1; border-radius: 8px; background: #f5f5f4; }
    .transfer-segmented label { display: block; cursor: pointer; }
    .transfer-segmented input { position: absolute; opacity: 0; pointer-events: none; }
    .transfer-segmented span { display: flex; min-height: 38px; align-items: center; justify-content: center; gap: 6px; border-radius: 6px; color: #57534e; font-weight: 900; }
    .transfer-segmented input:checked + span { background: #1f2937; color: #fff; }
    .transfer-highway-control { display: flex; min-height: 48px; align-items: center; padding: 0 12px; border: 1px solid #d6d3d1; border-radius: 8px; background: #fff; }
    .transfer-highway-control .schedule-purpose-segments { width: 100%; }
    .transfer-highway-control .schedule-purpose-switch { width: 100%; justify-content: space-between; }
    .transfer-highway-control .schedule-purpose-switch.active .schedule-purpose-switch-track { background: #1f2937; }
    .transfer-highway-control .schedule-purpose-switch.allows-highways .schedule-purpose-switch-track { background: var(--orange); }
    .transfer-highway-control input { display: none; }
    .transfer-waypoints { display: grid; gap: 9px; }
    .transfer-lookup-controls #transferSwap { width: auto; min-height: 38px; justify-self: start; padding: 7px 12px; }
    .transfer-waypoints-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #44403c; font-size: 13px; font-weight: 900; }
    .transfer-waypoints-head button { min-height: 38px; padding: 7px 11px; }
    .transfer-waypoint-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) 40px; gap: 8px; align-items: end; }
    .transfer-waypoint-row .schedule-entity-field { min-width: 0; }
    .transfer-waypoint-remove { width: 40px; height: 44px; padding: 0 !important; border-radius: 6px !important; background: #f5f5f4 !important; color: #78716c !important; }
    .transfer-result { min-height: 24px; color: #374151; font-size: 14px; font-weight: 800; }
    .transfer-result.has-route { padding: 10px 12px; border-left: 4px solid #4f7c6b; background: #f1f8f4; color: #356854; }
    .transfer-lookup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .transfer-lookup-actions button, .transfer-lookup-actions a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 8px; padding: 9px 14px; font-size: 14px; font-weight: 900; text-decoration: none; }
    .transfer-lookup-actions .primary { background: #1f2937; color: #fff; }
    .transfer-maps-link { border: 1px solid #d6d3d1 !important; background: #fff; color: #44403c; }
    .transfer-map { min-height: clamp(560px, 72vh, 760px); overflow: hidden; border: 1px solid #d6d3d1; border-radius: 8px; background: #f5f5f4; }
    .transfer-map iframe { display: block; width: 100%; height: 100%; min-height: clamp(560px, 72vh, 760px); border: 0; }
    .transfer-map-empty { height: 100%; min-height: clamp(560px, 72vh, 760px); display: grid; place-items: center; padding: 24px; color: #78716c; font-weight: 800; text-align: center; }
    @media (max-width: 820px) {
      .transfer-lookup-form { grid-template-columns: 1fr; }
      .transfer-map, .transfer-map iframe, .transfer-map-empty { min-height: 380px; }
    }
    .governance-notice { padding: 12px; border-left: 4px solid #b7791f; background: #fffbeb; }
    .governance-notice.locked { border-color: #dc2626; background: #fef2f2; }
    .governance-notice strong { font-size: 14px; font-weight: 900; }
    .governance-notice span { display: block; margin-top: 4px; color: #6b7280; font-size: 13px; font-weight: 700; }
    .governance-notice p {
      margin: 7px 0 0;
      font-family: inherit;
      font-size: 14px;
      font-weight: 700;
      line-height: 1.55;
      letter-spacing: 0;
    }
    .governance-actions { display: flex; justify-content: flex-end; gap: 10px; }
    .governance-actions button,
    .schedule-recycle-row button { min-height: 40px; padding: 8px 14px; border: 0; border-radius: 6px; font-family: inherit; font-size: 14px; font-weight: 900; line-height: 1.4; letter-spacing: 0; cursor: pointer; }
    .governance-actions .primary { background: #17795d; color: #fff; }
    .governance-actions .danger { background: #b42318; color: #fff; }
    .recurring-update-scope-options { display: grid; gap: 10px; }
    .recurring-update-scope-option {
      display: grid;
      grid-template-columns: 22px 42px minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      width: 100%;
      min-height: 76px;
      padding: 12px 14px;
      border: 1px solid #d6d3d1;
      border-radius: 8px;
      background: #fff;
      color: #292524;
      font-family: inherit;
      text-align: left;
      cursor: pointer;
    }
    .recurring-update-scope-option input[type="radio"] {
      width: 20px;
      height: 20px;
      margin: 0;
      accent-color: #b7791f;
      cursor: pointer;
    }
    .recurring-update-scope-option:hover,
    .recurring-update-scope-option:focus-within,
    .recurring-update-scope-option.selected { border-color: #d9a75f; background: #fffbf3; outline: none; }
    .recurring-update-scope-option.selected { box-shadow: inset 0 0 0 1px #d9a75f; }
    .recurring-update-scope-option > i {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      border-radius: 8px;
      background: #f3f0ea;
      color: #8a6332;
      font-size: 20px;
    }
    .recurring-update-scope-option span { display: grid; gap: 3px; min-width: 0; }
    .recurring-update-scope-option strong { font-size: 15px; font-weight: 900; line-height: 1.45; }
    .recurring-update-scope-option small { color: #78716c; font-size: 12px; font-weight: 700; line-height: 1.5; }
    .recurring-update-scope-option em { color: #8a6332; font-size: 13px; font-style: normal; font-weight: 900; white-space: nowrap; }
    .recurring-update-range {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      border: 1px solid #e7e5e4;
      border-radius: 8px;
      background: #fafaf9;
    }
    .recurring-update-range span { display: grid; gap: 2px; min-width: 0; }
    .recurring-update-range strong { font-size: 14px; font-weight: 900; line-height: 1.45; }
    .recurring-update-range small { color: #78716c; font-size: 12px; font-weight: 700; line-height: 1.5; }
    .recurring-update-range input { width: 100%; min-height: 44px; font: inherit; font-weight: 700; }
    @media (max-width: 560px) {
      .recurring-update-range { grid-template-columns: 1fr; }
    }
    .schedule-recycle-row,
    .schedule-history-row { display: flex; align-items: center; gap: 14px; padding: 13px; border: 1px solid #e5e7eb; border-radius: 6px; }
    .schedule-recycle-row > div,
    .schedule-history-row { min-width: 0; }
    .schedule-recycle-row > div { display: grid; flex: 1; gap: 3px; }
    .schedule-recycle-row strong,
    .schedule-history-row strong { font-size: 14px; font-weight: 900; line-height: 1.5; }
    .schedule-recycle-row span,
    .schedule-recycle-row small,
    .schedule-history-row span,
    .schedule-history-row small { color: #6b7280; font-size: 13px; font-weight: 700; line-height: 1.5; }
    .schedule-recycle-row button { background: #e8f5ee; color: #146c4d; white-space: nowrap; }
    .schedule-history-row { align-items: flex-start; flex-direction: column; gap: 3px; }
    .schedule-history-row details { width: 100%; margin-top: 7px; }
    .schedule-history-row summary { color: #146c4d; font-size: 13px; font-weight: 900; cursor: pointer; }
    .schedule-history-row pre { max-height: 320px; overflow: auto; padding: 10px; background: #f8fafc; border: 1px solid #e5e7eb; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 12px; font-weight: 700; line-height: 1.55; letter-spacing: 0; }
    .governance-empty { padding: 30px; text-align: center; color: #6b7280; font-size: 14px; font-weight: 700; }
    .month-close-check { display: grid; gap: 10px; }
    .month-close-check-summary { display: grid; grid-template-columns: repeat(5, minmax(92px, 1fr)); border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; }
    .month-close-check-summary div { min-width: 0; padding: 9px 10px; border-right: 1px solid #e5e7eb; background: #f9fafb; }
    .month-close-check-summary div:last-child { border-right: 0; }
    .month-close-check-summary small { display: block; color: #6b7280; font-size: 11px; font-weight: 800; line-height: 1.35; }
    .month-close-check-summary strong { display: block; margin-top: 2px; color: #374151; font-size: 16px; font-weight: 900; line-height: 1.35; }
    .month-close-check-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #bbf7d0; border-radius: 6px; background: #f0fdf4; color: #166534; }
    .month-close-check-result.blocked { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
    .month-close-check-result strong { font-size: 14px; font-weight: 900; }
    .month-close-check-result span { font-size: 12px; font-weight: 700; }
    .month-close-check-groups { display: grid; gap: 7px; }
    .month-close-check-group { border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; }
    .month-close-check-group.blocker { border-left: 4px solid #dc2626; }
    .month-close-check-group.warning { border-left: 4px solid #b7791f; }
    .month-close-check-group summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; color: #374151; font-size: 13px; font-weight: 900; cursor: pointer; }
    .month-close-check-group summary span { color: #6b7280; white-space: nowrap; }
    .month-close-check-items { display: grid; gap: 0; max-height: 230px; overflow: auto; border-top: 1px solid #e5e7eb; }
    .month-close-check-item { display: grid; grid-template-columns: 96px minmax(110px, .8fr) minmax(110px, .8fr) minmax(180px, 1.4fr); gap: 8px; padding: 7px 10px; border-bottom: 1px solid #f1f5f9; color: #4b5563; font-size: 12px; font-weight: 700; }
    .month-close-check-item:last-child { border-bottom: 0; }
    .month-close-check-empty { padding: 10px 12px; border: 1px solid #bbf7d0; border-radius: 6px; background: #f0fdf4; color: #166534; font-size: 13px; font-weight: 800; }
    .schedule-governance-body .month-close-override { display: flex; align-items: flex-start; grid-template-columns: none; gap: 9px; padding: 11px 12px; border: 1px solid #f2cf8d; border-radius: 6px; background: #fffbeb; color: #6b4f12; }
    .month-close-override input { width: 18px; height: 18px; min-height: 18px; margin: 2px 0 0; flex: 0 0 auto; }
    .month-close-override span { font-size: 13px; font-weight: 800; line-height: 1.55; }
    .month-close-override small { display: block; margin-top: 2px; color: #80651d; font-size: 12px; font-weight: 700; }
    .governance-actions button:disabled { opacity: .48; cursor: not-allowed; }

    @media (max-width: 700px) {
      .month-close-check-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .month-close-check-summary div { border-bottom: 1px solid #e5e7eb; }
      .month-close-check-item { grid-template-columns: 88px 1fr; }
    }

    .summary-bar #boardMonthLock,
    .summary-bar #boardRecycleBin {
      font-family: inherit;
      font-weight: 900;
      line-height: 1.4;
      letter-spacing: 0;
    }

    .summary-bar,
    .summary-bar button {
      font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      letter-spacing: 0;
    }

    /* 工時摘要列與日期標頭使用原本的暖淺灰層級。 */
    body.schedule-mode .summary-bar {
      background: #f3f1ee;
      color: #44403c;
      border-color: #dedbd7;
    }

    body.schedule-mode .day-head {
      background: #efeae4;
      color: #44403c;
    }

    @media (max-width: 640px) {
      .schedule-governance-overlay { padding: 10px; }
      .schedule-recycle-row { align-items: stretch; flex-direction: column; }
    }
    body.staff-notification-mode .layout > .table-wrap > table {
      min-width: 0;
    }

    body.staff-notification-mode .layout { grid-template-columns: 1fr; }
    body.staff-notification-mode #editorPanel { display: none; }

    body.staff-notification-mode.staff-notification-composer-open::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 10060;
      background: rgba(31, 41, 55, .42);
      backdrop-filter: blur(2px);
    }

    body.staff-notification-mode.staff-notification-composer-open #editorPanel {
      display: block;
      position: fixed;
      z-index: 10061;
      top: 50%;
      left: 50%;
      width: min(620px, calc(100vw - 28px));
      max-height: calc(100vh - 32px);
      overflow-y: auto;
      transform: translate(-50%, -50%);
      border: 1px solid #ded6ce;
      border-radius: 8px;
      box-shadow: 0 24px 64px rgba(31, 41, 55, .28);
      background: #fff;
    }

    body.staff-notification-mode.staff-notification-composer-open #editorPanel > h2 {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin: 0;
      padding: 16px 18px;
      border-bottom: 1px solid var(--border);
      font-size: 18px;
    }

    .staff-notification-compose-close {
      width: 38px;
      height: 38px;
      border: 1px solid #e7e5e4;
      border-radius: 7px;
      background: #fff;
      color: #57534e;
      display: inline-grid;
      place-items: center;
      cursor: pointer;
      font-size: 18px;
    }

    body.staff-notification-mode .layout > .table-wrap > table > tbody > tr > td {
      padding: 0;
      border: 0;
      background: transparent;
    }

    .staff-notification-page {
      display: grid;
      gap: 16px;
      padding: 18px;
    }

    .staff-notification-page-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .staff-notification-page-head h2 {
      margin: 0;
      color: var(--ink);
      font-size: 22px;
    }

    .staff-notification-page-head p {
      margin: 5px 0 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .staff-notification-page-head .staff-notification-page-description {
      margin: 0;
    }

    .staff-notification-page-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .staff-notification-compose-button {
      min-height: 40px;
      padding: 0 14px;
      border: 1px solid #d8b89f;
      border-radius: 7px;
      background: #fff;
      color: #8a5231;
      font-weight: 900;
      cursor: pointer;
    }

    .staff-notification-summary {
      display: grid;
      grid-template-columns: repeat(5, minmax(112px, 1fr));
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
      background: #fff;
    }

    .staff-notification-summary-item {
      min-height: 82px;
      padding: 14px 16px;
      border-right: 1px solid var(--border);
      display: grid;
      align-content: center;
      gap: 4px;
    }

    .staff-notification-summary-item:last-child { border-right: 0; }
    .staff-notification-summary-item span { color: var(--muted); font-size: 12px; font-weight: 800; }
    .staff-notification-summary-item strong { color: var(--ink); font-size: 23px; line-height: 1; }
    .staff-notification-summary-item.alert strong { color: #c2410c; }
    .staff-notification-summary-item.ok strong { color: #15803d; }

    .staff-notification-history {
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow-x: auto;
      background: #fff;
    }

    .staff-notification-filters {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) 180px auto auto;
      gap: 8px;
      align-items: end;
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #faf8f5;
    }

    .staff-notification-filters label { display: grid; gap: 5px; color: #57534e; font-size: 12px; font-weight: 800; }
    .staff-notification-filters input,
    .staff-notification-filters select { width: 100%; height: 40px; border: 1px solid #dedbd7; border-radius: 7px; background: #fff; padding: 0 10px; color: var(--ink); font: inherit; font-size: 13px; }
    .staff-notification-filter-button { height: 40px; padding: 0 13px; border: 1px solid #d6d3d1; border-radius: 7px; background: #fff; color: #57534e; font-weight: 900; cursor: pointer; }

    .staff-notification-history table { width: 100%; min-width: 880px; border-collapse: collapse; }
    .staff-notification-history th,
    .staff-notification-history td { padding: 12px 13px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
    .staff-notification-history th { background: #faf8f5; color: #57534e; font-size: 12px; white-space: nowrap; }
    .staff-notification-history tr:last-child td { border-bottom: 0; }
    .staff-notification-history td { color: #44403c; font-size: 13px; }
    .staff-notification-history-title { color: var(--ink); font-weight: 900; margin-bottom: 4px; }
    .staff-notification-history-content { max-width: 360px; color: #78716c; line-height: 1.5; white-space: pre-wrap; }
    .staff-notification-recipient-names { max-width: 230px; color: #78716c; line-height: 1.5; }
    .staff-notification-count { font-weight: 900; text-align: center; white-space: nowrap; }
    .staff-notification-row-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
    .staff-notification-row-action { width: 34px; height: 34px; border: 1px solid #d6d3d1; border-radius: 7px; background: #fff; color: #57534e; display: inline-grid; place-items: center; cursor: pointer; font-size: 15px; }
    .staff-notification-row-action:hover { border-color: #c7a68e; color: #8a5231; background: #fffaf6; }
    .staff-notification-row-action.delete:hover { border-color: #fecaca; color: #b91c1c; background: #fff7f7; }
    .staff-notification-row-action:disabled { opacity: .5; cursor: wait; }
    .staff-notification-empty { padding: 42px 18px; color: var(--muted); text-align: center; }

    .staff-notification-pagination {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
    }

    .staff-notification-pagination span { color: #78716c; font-size: 12px; font-weight: 800; }
    .staff-notification-pagination button { min-width: 38px; height: 36px; border: 1px solid #d6d3d1; border-radius: 7px; background: #fff; color: #57534e; font-weight: 900; cursor: pointer; }
    .staff-notification-pagination button:disabled { opacity: .4; cursor: default; }
    .staff-notification-feedback { padding: 10px 12px; border: 1px solid #bbd9c4; border-radius: 7px; background: #f0fdf4; color: #166534; font-size: 13px; font-weight: 900; }

    .staff-notification-form { display: grid; gap: 14px; }
    .staff-notification-form label { display: grid; gap: 7px; color: #57534e; font-size: 13px; font-weight: 800; }
    .staff-notification-form input,
    .staff-notification-form select,
    .staff-notification-form textarea { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 7px; background: #fff; padding: 10px 12px; color: var(--ink); font: inherit; box-sizing: border-box; }
    .staff-notification-form textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
    .staff-notification-employee-list { display: grid; gap: 5px; max-height: 240px; overflow-y: auto; padding: 8px; border: 1px solid var(--border); border-radius: 7px; background: #fafafa; }
    .staff-notification-employee-option { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 9px !important; min-height: 36px; padding: 5px 7px; border-radius: 5px; color: #44403c !important; }
    .staff-notification-employee-option:hover { background: #fff; }
    .staff-notification-employee-option input { width: 18px; min-height: 18px; margin: 0; }
    .staff-notification-recipient-preview { margin-top: 7px; color: #9a5b31; font-size: 12px; font-weight: 900; }
    .staff-notification-recipient-fixed { padding: 11px 12px; border: 1px solid var(--border); border-radius: 7px; background: #faf8f5; color: #57534e; font-size: 13px; line-height: 1.55; }
    .staff-notification-send { min-height: 46px; border: 1px solid #ea580c; border-radius: 7px; background: #ea580c; color: #fff; font-weight: 900; cursor: pointer; }
    .staff-notification-send:disabled { opacity: .55; cursor: wait; }

    .raw-table-pagination {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      min-width: max-content;
      padding: 2px 0;
    }
    .raw-table-pagination span { color: var(--muted); font-size: 13px; font-weight: 700; }
    .raw-table-pagination select,
    .raw-table-pagination button {
      min-height: 34px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: #fff;
      color: var(--ink);
      font: inherit;
      font-size: 13px;
      font-weight: 700;
    }
    .raw-table-pagination select { padding: 5px 30px 5px 9px; }
    .raw-table-pagination button { min-width: 34px; padding: 5px 9px; cursor: pointer; }
    .raw-table-pagination button:disabled { opacity: .4; cursor: default; }
    .raw-table-pagination-row td { background: #faf9f7; }

    .operation-report-context {
      display: flex;
      align-items: center;
      min-height: 48px;
      padding: 12px 14px;
      border-radius: 22px;
      background: #fff7ed;
      color: #1f2937;
      font-family: inherit;
      font-size: 14px;
      font-weight: 900;
      line-height: 1.45;
    }

    .support-readonly-badge,
    .support-readonly-note {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-height: 32px;
      padding: 6px 10px;
      border: 1px solid #9ca3af;
      border-radius: 6px;
      background: #f8fafc;
      color: #374151;
      font: inherit;
      font-size: 13px;
      font-weight: 800;
      line-height: 1;
      white-space: nowrap;
    }

    .support-readonly-badge { margin-left: 8px; min-height: 26px; padding: 4px 8px; font-size: 12px; }
    .support-schedule-viewer input[readonly] { background: #f8fafc; color: var(--ink); cursor: default; }
    body.support-readonly-session #adminBackAction,
    body.support-readonly-session #adminUndoAction,
    body.support-readonly-session #boardSecurityStatus,
    body.support-readonly-session .board-legend .schedule-lock-badge { display: none !important; }
    body.support-readonly-session .service-line { cursor: default; }
    body.support-readonly-session .schedule-inline-actions,
    body.support-readonly-session .day-add-hint,
    body.support-readonly-session .day-paste-button { display: none !important; }

    @media (max-width: 980px) {
      .staff-notification-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .staff-notification-summary-item { border-bottom: 1px solid var(--border); }
      .staff-notification-page-head { align-items: flex-start; flex-direction: column; }
      .staff-notification-filters { grid-template-columns: 1fr 1fr; }
    }

    @media (max-width: 640px) {
      .staff-notification-filters { grid-template-columns: 1fr; }
      .staff-notification-page-actions { width: 100%; }
      .staff-notification-page-actions button { flex: 1 1 0; }
    }
