/* デジレボシリーズ　著作権：レボルシオン株式会社（使用の条件は LICENSE.txt をご覧ください） */
:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-muted: #eef3f8;
  --color-border: #dce6f0;
  --color-border-strong: #b8cede;
  --color-text: #212529;
  --color-text-muted: #55606e;
  --color-primary: #2673b8;
  --color-primary-dark: #1b5c95;
  --color-link: #1b5c95;
  --color-primary-light: #e7f1fb;
  --color-accent: #4682b4;
  --color-accent-dark: #3a6f97;
  --color-accent-light: #eaf2f8;
  --color-navy: #002060;
  --color-danger: #e11d48;
  --color-danger-dark: #be123c;
  --color-success: #16a34a;
  --color-success-dark: #15803d;
  --color-warning: #d97706;
  --color-warning-dark: #b45309;
  --color-success-light: #e7f8ec;
  --color-danger-light: #fde3ea;
  --color-warning-light: #fef3e2;
  --color-sidebar-bg: #002060;
  --color-sidebar-bg-deep: #00113a;
  --color-sidebar-active: #123b82;
  --color-sidebar-text: #a9bedd;
  --color-sidebar-heading: rgba(169, 190, 221, 0.78);
  --color-sidebar-chip: rgba(255, 255, 255, 0.10);
  --color-sidebar-chip-hover: rgba(255, 255, 255, 0.18);
  --color-sidebar-chip-border: rgba(255, 255, 255, 0.20);
  --color-sidebar-chip-icon: rgba(255, 255, 255, 0.16);
  --color-sidebar-chip-text: #ffffff;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-btn: 4.8px;
  --sidebar-width: 230px;
  --shadow-card: 0 1px 2px rgba(16, 32, 96, 0.05), 0 4px 14px rgba(16, 32, 96, 0.06);
  --shadow-pop: 0 6px 18px rgba(16, 32, 96, 0.14);
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 1000;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 8px;
  outline: none;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  left: 0;  
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.btn-secondary:focus-visible,
.btn-accent:focus-visible,
.btn-danger:focus-visible,
.form-control:focus-visible,
.sidebar nav a:focus-visible,
.pill-nav a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Nunito", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--color-link, var(--color-primary-dark, var(--color-primary))); text-decoration: none; }
a:hover { text-decoration: underline; }

.btn, .btn-secondary, .btn-accent, .btn-danger,
.form-control, .card, .sidebar nav a, .pill-nav a, .pill-nav span {
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

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

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--color-sidebar-bg) 0%, var(--color-sidebar-bg-deep) 100%);
  color: var(--color-sidebar-text);
  flex-shrink: 0;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.18);
}

.sidebar .brand-block {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
  padding-bottom: 12px;
}

.sidebar .brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  padding: 0 14px 4px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.sidebar .brand:hover .brand-text,
.sidebar .brand:hover .brand-toggle-mark { opacity: 0.85; }

.sidebar .brand:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: 6px; }

.brand-text { flex: 1 1 auto; }

.brand-toggle-mark {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  opacity: 0.55;
}

.brand-mark {
  height: 22px;
  width: auto;
  flex-shrink: 0;
}

.sidebar nav a.nav-top-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 10px 10px;
  padding: 9px 10px;
  border: 1px solid var(--color-sidebar-chip-border);
  border-left: 1px solid var(--color-sidebar-chip-border);
  border-radius: 10px;
  background: var(--color-sidebar-chip);
  color: var(--color-sidebar-chip-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.sidebar nav a.nav-top-link .nav-top-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--color-sidebar-chip-icon);
  font-size: 13px;
  line-height: 1;
}

.sidebar nav a.nav-top-link .nav-top-text { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.sidebar nav a.nav-top-link.active .nav-top-icon { background: rgba(0, 0, 0, 0.22); }

.sidebar nav a.nav-top-link .nav-top-sub {
  margin-left: 5px;
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.75;
}

.sidebar nav a.nav-top-link .nav-top-arrow {
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
  opacity: 0.6;
}

.sidebar nav a.nav-top-link:hover {
  background: var(--color-sidebar-chip-hover);
  color: var(--color-sidebar-chip-text);
  text-decoration: none;
}

.sidebar nav a.nav-top-link.active {
  background: var(--color-sidebar-chip-hover);
  box-shadow: inset 0 0 0 1px var(--color-sidebar-chip-border);
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-sidebar-text);
  padding: 11px 20px;
  margin: 1px 10px 1px 0;
  font-size: 15px;
  border-left: 3px solid transparent;
  border-radius: 0 999px 999px 0;
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.sidebar nav a.active {
  background: var(--color-sidebar-active);
  color: #fff;
  border-left: 3px solid var(--color-accent);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sidebar nav .nav-section {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-sidebar-heading);
  padding: 18px 20px 6px;
}

.sidebar nav .nav-section-external {
  display: block;
  margin-top: 12px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-sidebar-text);
  text-transform: none;
  letter-spacing: normal;
}

.sidebar nav .nav-section-external:hover {
  color: #fff;
}

.sidebar nav .nav-section-external .ext-icon {
  opacity: 0.7;
}

.module-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--tile-gap, 14px);
  margin-top: 14px;
}

.module-home-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

.module-home-tile:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(52, 144, 220, 0.18);
  text-decoration: none;
  transform: translateY(-1px);
}

.module-home-tile .module-home-tile-icon {
  font-size: 26px;
  line-height: 1;
}

.module-home-tile .module-home-tile-label {
  font-weight: 700;
}

.module-home-tile.module-home-tile-detailed {
  align-items: flex-start;
}

.module-home-tile.module-home-tile-detailed .module-home-tile-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-home-tile.module-home-tile-detailed .module-home-tile-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-muted);
}

.module-home-grid-compact {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
}

.module-home-grid-compact .module-home-tile {
  flex: 1 1 0;
  min-width: 96px;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 12px 10px;
}

.module-home-grid-compact .module-home-tile-icon {
  font-size: 20px;
}

.module-home-grid-compact .module-home-tile-label {
  font-size: 13px;
  white-space: nowrap;
}

.module-home-grid.feature-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  column-gap: 28px;
  row-gap: 0;
  margin-top: 4px;
  overflow: visible;
}

.feature-index .module-home-tile {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  gap: 10px;
  min-width: 0;
  padding: 11px 6px 11px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
  color: var(--color-text);
}

.feature-index .module-home-tile::after {
  content: '›';
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1;
}

.feature-index .module-home-tile:hover,
.feature-index .module-home-tile:focus-visible {
  transform: none;
  box-shadow: none;
  border-color: var(--color-border);
  background: var(--color-primary-light);
  text-decoration: none;
}

.feature-index .module-home-tile:hover .module-home-tile-label,
.feature-index .module-home-tile:hover::after {
  color: var(--color-primary-dark, var(--color-primary));
}

.feature-index .module-home-tile .module-home-tile-icon {
  flex: 0 0 20px;
  width: 20px;
  font-size: 16px;
  text-align: center;
}

.feature-index .module-home-tile .module-home-tile-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
}

.pill-nav.pill-nav-compact {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  gap: 4px;
}

.pill-nav.pill-nav-compact a, .pill-nav.pill-nav-compact span {
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar .user-box {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.sidebar .user-box form { margin-top: 8px; }

.main {
  flex: 1;
  padding: var(--page-pad-top, 24px) var(--page-pad-x, 32px) var(--page-pad-bottom, 32px);
  min-width: 0;
  max-width: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-bottom: var(--topbar-gap, 14px);
  font-size: 14px;
  color: var(--color-text-muted);
}

.topbar-tools { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }

.topbar .org-name {
  font-weight: 700;
  color: var(--color-text);
  font-size: 15px;
}

.topbar .user-name {
  color: var(--color-primary);
  font-weight: 600;
}

.topbar .role-tag {
  font-size: 12px;
}

.logout-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--color-danger);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.logout-icon-btn:hover { background: var(--color-danger-dark); }

.topbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-strong);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
}
.topbar-icon-btn:hover { background: var(--color-bg); color: var(--color-text); }

.notification-bell { position: relative; text-decoration: none; }
.notification-bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.notification-list { list-style: none; margin: 0; padding: 0; }
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--color-border);
}
.notification-item:last-child { border-bottom: none; }
.notification-item-unread { background: var(--color-primary-light); border-radius: var(--radius-sm); }
.notification-icon { font-size: 18px; line-height: 1.4; }
.notification-body { flex: 1; }
.notification-message { font-size: 14px; }
.notification-time { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

.page-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 var(--title-gap, 20px);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--card-pad-y, 20px) var(--card-pad-x, 20px);
  margin-bottom: var(--card-gap, 20px);
  box-shadow: var(--shadow-card);
}

.card h2, .card h3 {
  margin-top: 0;
  padding-bottom: var(--card-head-pad, 10px);
  margin-bottom: var(--card-head-gap, 14px);
  border-bottom: 2px solid var(--color-border);
}

.collapsible-card > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}
.collapsible-card > summary::-webkit-details-marker { display: none; }
.collapsible-card > summary:hover { color: var(--color-primary); }
.collapsible-card[open] > summary {
  margin-top: 0;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--color-border);
}
.collapsible-card .collapsible-caret {
  font-size: 12px;
  color: var(--color-text-muted);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.collapsible-card[open] .collapsible-caret { transform: rotate(180deg); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--card-gap, 20px);
}

.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; box-shadow: 0 4px 12px rgba(52, 144, 220, 0.32); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }
.btn-accent { background: var(--color-accent-dark); border-radius: var(--radius-btn); }
.btn-accent:hover { background: #2f5a78; box-shadow: 0 4px 12px rgba(70, 130, 180, 0.32); }
.btn-secondary { background: #eceff5; color: var(--color-text); border: 1px solid var(--color-border); box-shadow: none; border-radius: var(--radius-btn); }
.btn-secondary:hover { background: #dde2ed; border-color: var(--color-border-strong); box-shadow: none; transform: none; }
.btn-danger { background: var(--color-danger); border-radius: var(--radius-btn); }
.btn-danger:hover { background: var(--color-danger-dark); box-shadow: 0 4px 12px rgba(229, 72, 77, 0.32); }
.btn-small { padding: 4px 10px; font-size: 13px; }

.form-group { margin-bottom: var(--field-gap, 14px); }
.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 5px;
}
.tag-required {
  display: inline-block;
  background: var(--color-danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.form-control {
  width: 100%;
  padding: 9px 2px;
  border: none;
  border-bottom: 2.4px solid var(--color-border-strong);
  border-radius: 0;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
  color: var(--color-text);
}
.form-control:focus {
  outline: none;
  border-bottom-color: var(--color-accent);
  box-shadow: none;
}
textarea.form-control {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  background: var(--color-surface);
}
textarea.form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.15);
}
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-bg);
}
.auth-card {
  width: 380px;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 32px;
  border: 0.8px solid var(--color-accent);
  box-shadow: 0 10px 30px rgba(0, 32, 96, 0.12);
}
.auth-card h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.auth-logo-wrap { text-align: center; margin-bottom: 4px; }
.auth-logo { max-width: 220px; width: 70%; height: auto; }
.auth-logo-sub {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--color-navy);
}
.auth-card p.sub { text-align: center; color: var(--color-text-muted); font-size: 14px; margin-bottom: 20px; }
.auth-card .btn { width: 100%; padding: 11px; }
.auth-card .switch { text-align: center; margin-top: 16px; font-size: 14px; }
.auth-firstrun { background: var(--color-surface-muted, #eef4fb); border-left: 4px solid var(--color-info, #3a7bd5); border-radius: 6px; padding: 12px 14px; margin-bottom: 16px; font-size: 13px; line-height: 1.7; }
.auth-firstrun p { margin: 0 0 6px; }
.auth-firstrun-title { font-weight: 700; font-size: 14px; }
.auth-firstrun-btn { margin-top: 6px; }
.auth-note { font-size: 12.5px; color: var(--color-text-muted, #667); margin-bottom: 14px; line-height: 1.6; }


.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 14px;
}
.alert-error { background: var(--color-danger-light); color: var(--color-danger-dark); border: 1px solid #f6c9d3; }
.alert-info { background: var(--color-accent-light); color: var(--color-accent-dark); border: 1px solid #c7ddec; }
.alert-success { background: var(--color-success-light); color: var(--color-success-dark); border: 1px solid #bfe8cc; }
.alert-warning { background: var(--color-warning-light); color: var(--color-warning-dark); border: 1px solid #f4d9ae; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: var(--cell-pad-y, 10px) var(--cell-pad-x, 12px); border-bottom: 1px solid var(--color-border); }
th {
  background: var(--color-bg);
  color: var(--color-text);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--color-border-strong);
}
tbody tr:hover { background: rgba(52, 144, 220, 0.045); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 13px; }
.badge-todo { background: var(--color-surface-muted); color: var(--color-text-muted); }
.badge-doing { background: var(--color-warning-light); color: var(--color-warning-dark); }
.badge-done { background: var(--color-success-light); color: var(--color-success-dark); }
.badge-admin { background: var(--color-primary-light); color: var(--color-primary-dark); }
.badge-member { background: var(--color-surface-muted); color: var(--color-text-muted); }
.badge-top { background: var(--color-primary-light); color: var(--color-primary-dark); }
.badge-middle { background: var(--color-accent-light); color: var(--color-accent-dark); }
.badge-lower { background: var(--color-warning-light); color: var(--color-warning-dark); }
.badge-player { background: var(--color-surface-muted); color: var(--color-text-muted); }
.badge-pinned { background: var(--color-danger-light); color: var(--color-danger-dark); }
.badge-obsolete { background: #e9eaf2; color: #5b607a; }

.pill-nav { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.pill-nav a, .pill-nav span {
  padding: 6px 14px; border-radius: 999px; font-size: 14px; border: 1px solid var(--color-border-strong); color: var(--color-text);
}
.pill-nav a:hover { border-color: var(--color-primary); text-decoration: none; }
.pill-nav a.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); box-shadow: 0 2px 8px rgba(52, 144, 220, 0.3); }

.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--color-border-strong);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.calendar-grid .dow {
  background: var(--color-surface);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  padding: 8px 0;
}
.calendar-grid .dow:first-child { color: var(--color-danger); }
.calendar-grid .dow:last-child { color: var(--color-primary); }
.calendar-cell {
  min-height: 96px;
  background: var(--color-surface);
  padding: 6px;
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
}
.calendar-cell:nth-child(7n+1) .date-num { color: var(--color-danger); }
.calendar-cell:nth-child(7n) .date-num { color: var(--color-primary); }
.calendar-cell.out-of-month { background: #f5f6fa; color: #b7bcc7; }
.calendar-cell.out-of-month .date-num { color: #b7bcc7; }
.calendar-cell.today { background: var(--color-accent-light); box-shadow: inset 0 0 0 2px var(--color-accent); position: relative; z-index: 1; }
.calendar-cell .date-num { font-weight: 700; margin-bottom: 4px; }
.calendar-cell.holiday-statutory { background: #fdeceb; }
.calendar-cell.holiday-scheduled { background: #fff8e6; }
.calendar-cell.today.holiday-statutory,
.calendar-cell.today.holiday-scheduled { background: var(--color-accent-light); }
.holiday-tag {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-bottom: 3px;
  background: #eceff5; color: #444;
}
.holiday-tag.type-scheduled { background: var(--color-warning); color: #3a2c00; }
.holiday-tag.type-statutory { background: var(--color-danger); color: #fff; }
.calendar-event {
  background: #eaf1fd; color: #23458a; border-radius: 5px; padding: 2px 5px; margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 150px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 10px 4px; }
.chat-msg { margin-bottom: 14px; }
.chat-msg .meta { font-size: 13px; color: var(--color-text-muted); margin-bottom: 2px; }
.chat-msg .body { background: var(--color-surface); border: 1px solid var(--color-border-strong); padding: 8px 12px; border-radius: 10px; display: inline-block; max-width: 70%; white-space: pre-wrap; word-break: break-word; }
.chat-msg.own .body { background: #e8f0fd; border-color: #b9cff5; }
.chat-input-row { display: flex; gap: 10px; padding-top: 10px; border-top: 1px solid var(--color-border-strong); }
.chat-input-row input { flex: 1; }

.file-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--color-border-strong); }
.file-row:last-child { border-bottom: none; }
.file-name { font-weight: 600; }
.file-meta { font-size: 14px; color: var(--color-text-muted); }

.empty-state { color: var(--color-text-muted); font-size: 14px; padding: 20px 0; text-align: center; }

.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.bulk-toolbar-active { opacity: 1; background: var(--color-primary-light); border-color: var(--color-primary); }
.bulk-count { font-size: 13px; font-weight: 600; color: var(--color-text-muted); margin-right: auto; }
.bulk-toolbar-active .bulk-count { color: var(--color-primary-dark); }
.bulk-checkbox-col { width: 32px; text-align: center; }

.search-result-list { list-style: none; margin: 0; padding: 0; }
.search-result-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-sub { font-size: 12px; color: var(--color-text-muted); }
.row-muted { opacity: 0.55; }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; }

.alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 13px;
}
.alert-item:last-child { margin-bottom: 0; }
.alert-item.severity-danger { background: var(--color-danger-light); color: var(--color-danger-dark); }
.alert-item.severity-warning { background: var(--color-warning-light); color: var(--color-warning-dark); }
.alert-item.severity-info { background: var(--color-accent-light); color: var(--color-accent-dark); }
.alert-icon { font-size: 16px; }
.alert-message { flex: 1; }
.alert-link { font-weight: 700; white-space: nowrap; color: inherit; text-decoration: underline; }

.health-score-main { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.health-score-number {
  font-size: 34px;
  font-weight: 800;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.health-score-number.badge-done { background: var(--color-success-light); color: var(--color-success-dark); }
.health-score-number.badge-doing { background: var(--color-warning-light); color: var(--color-warning-dark); }
.health-score-number.badge-pinned { background: var(--color-danger-light); color: var(--color-danger-dark); }
.health-score-label { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.health-breakdown { display: grid; gap: 10px; }
.health-breakdown-item { display: grid; grid-template-columns: 190px 1fr 36px; align-items: center; gap: 10px; font-size: 13px; color: var(--color-text-muted); }
.health-breakdown-bar { height: 8px; background: var(--color-bg); border-radius: 999px; overflow: hidden; }
.health-breakdown-fill { height: 100%; background: var(--color-primary); border-radius: 999px; }
.health-breakdown-score { text-align: right; font-weight: 700; color: var(--color-text); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--tile-gap, 16px);
  margin-bottom: var(--card-gap, 20px);
}
.stat-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.stat-tile-label { font-size: 13px; color: var(--color-text-muted); margin-bottom: 6px; }
.stat-tile-value { font-size: 26px; font-weight: 800; color: var(--color-text); }
.stat-tile-sub { font-size: 13px; color: var(--color-text-muted); margin-top: 4px; }

@media (max-width: 800px) {
  .stat-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) and (min-width: 801px) {
  :root { --sidebar-width: 188px; }
  .main { padding: var(--page-pad-top, 20px) 18px 22px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar nav a { padding: 10px 14px; font-size: 14px; gap: 8px; }
  .sidebar nav a.nav-top-link { margin: 0 8px 8px; padding: 8px; font-size: 12.5px; gap: 6px; }
  .sidebar nav a.nav-top-link .nav-top-icon { width: 20px; height: 20px; }
  .sidebar nav a.nav-top-link .nav-top-arrow { display: none; }
  .sidebar .brand { font-size: 16px; padding: 0 10px 4px 14px; }
}

@media (max-width: 800px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 10px; }
  .sidebar .brand-block { display: none; }
  .sidebar nav { display: flex; flex-wrap: nowrap; }
  .sidebar nav a { white-space: nowrap; flex-shrink: 0; }
  .sidebar nav a.nav-top-link { margin: 0 6px 0 0; padding: 8px 10px; }
  .sidebar nav a.nav-top-link .nav-top-arrow { display: none; }
  .sidebar .user-box { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .main { padding: 16px; }
  .topbar { justify-content: space-between; flex-wrap: wrap; row-gap: 6px; gap: 8px; font-size: 12px; }
  .topbar-tools { gap: 6px; }
  .topbar-greeting { width: 100%; order: -1; margin-right: 0; font-size: 13px; }
  .topbar-search { width: 100%; order: -1; margin-left: 0; }
  .topbar-search-input { width: 100%; }

  table:not(.matrix-table) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table:not(.matrix-table) th, table:not(.matrix-table) td {
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .topbar .org-name { display: none; }
}

.dashboard-compact .card { padding: 12px 16px; margin-bottom: 14px; }
.dashboard-compact .card h2, .dashboard-compact .card h3 { margin-bottom: 8px; padding-bottom: 6px; font-size: 15px; }

.dash-grid { display: grid; gap: var(--card-gap, 20px); align-items: start; }
.dash-style-standard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-style-single { grid-template-columns: minmax(0, 1fr); }
.dash-style-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-panel { min-width: 0; }
.dash-panel.is-wide { grid-column: 1 / -1; }
.dash-grid .dash-panel > .card { margin-bottom: 0; }
.dash-layout-link { margin: 4px 0 0; font-size: 12.5px; }
@media (max-width: 1100px) {
  .dash-style-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}

.hl-styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.hl-style { padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.hl-style.is-current { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary) inset; }
.hl-style h3 { margin: 10px 0 4px; font-size: 14.5px; }
.hl-style p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.7; color: var(--color-text-muted); }
.hl-preview { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.hl-preview-wide { height: 14px; border-radius: 3px; background: var(--color-primary); opacity: 0.75; }
.hl-preview-row { display: grid; gap: 4px; }
.hl-preview-row i { display: block; height: 20px; border-radius: 3px; background: var(--color-surface); border: 1px solid var(--color-border-strong); }
.hl-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: hl; }
.hl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.hl-row.is-hidden { background: var(--color-surface-muted); opacity: 0.75; }
.hl-row-icon { font-size: 20px; }
.hl-row-text { flex: 1 1 220px; min-width: 0; }
.hl-row-label { display: block; font-weight: 600; font-size: 14px; }
.hl-row-wide { margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600; background: var(--color-primary-light); color: var(--color-primary-dark); }
.hl-row-note { display: block; font-size: 12px; line-height: 1.6; color: var(--color-text-muted); }
.hl-row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.hl-reset { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.topbar-greeting { font-weight: 600; }

.topbar-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  padding: 5px 14px 5px 12px;
}
.topbar-search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.topbar-search-icon { font-size: 13px; opacity: 0.6; }
.topbar-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  width: 190px;
  color: var(--color-text);
}
.topbar-search-input::placeholder { color: var(--color-text-muted); }

.dashboard-compact .pill-nav { margin-bottom: 8px; }
.dashboard-compact .pill-nav a, .dashboard-compact .pill-nav span { padding: 4px 12px; font-size: 12px; }

.dashboard-compact .calendar-header { margin-bottom: 8px; }
.dashboard-compact .calendar-grid .dow { font-size: 11px; padding: 5px 0; }
.dashboard-compact .calendar-cell { min-height: 52px; padding: 4px; font-size: 11px; }
.dashboard-compact .calendar-cell .date-num { margin-bottom: 2px; }
.dashboard-compact .calendar-event { padding: 1px 4px; margin-bottom: 1px; font-size: 11px; }

.dashboard-compact .alert-item { padding: 6px 10px; margin-bottom: 5px; font-size: 12px; }
.dashboard-compact .alert-icon { font-size: 13px; }

.dashboard-compact table th, .dashboard-compact table td { padding: 6px 10px; font-size: 13px; }
.dashboard-compact .file-meta { font-size: 11px; }
.dashboard-compact .empty-state { padding: 10px 0; font-size: 12px; }
.dashboard-compact .btn-small { padding: 3px 9px; font-size: 11px; }

.org-member-chip { font-size: 12px; }

.hchart-scroll { margin: 10px 0 4px; overflow-x: auto; padding-bottom: 4px; }
.hchart-unit { display: flex; align-items: center; width: fit-content; }
.hchart-node {
  border: 1.5px solid var(--color-border-strong);
  border-radius: 8px;
  background: var(--color-surface);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
  flex: 0 0 auto;
}
.hchart-node-pending { border-style: dashed; }

.hchart-trunk { width: 28px; height: 2px; background: var(--color-border-strong); flex: 0 0 28px; }

.hchart-branches { display: flex; flex-direction: column; padding-left: 28px; }
.hchart-branch { position: relative; padding: 8px 0; display: flex; align-items: center; }
.hchart-branch::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 50%;
  width: 28px;
  height: 2px;
  background: var(--color-border-strong);
}
.hchart-branch::after {
  content: '';
  position: absolute;
  left: -28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border-strong);
}
.hchart-branch:first-child::after { top: 50%; }
.hchart-branch:last-child::after { bottom: 50%; }
.hchart-branch:only-child::after { display: none; }

.project-cards { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.project-card {
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: var(--color-surface);
  padding: 10px 14px;
  min-width: 200px;
  max-width: 280px;
  box-shadow: var(--shadow-card);
}
.project-card-pending { border-style: dashed; background: #fffaf0; }
.project-card-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.project-card-members { display: flex; flex-wrap: wrap; gap: 4px; }

.bfc-wrap { font-size: 12px; }
.bfc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.bfc-revision-table { border-collapse: collapse; font-size: 11px; }
.bfc-revision-table td { border: 1px solid var(--color-border-strong); padding: 3px 10px; }
.bfc-title { font-size: 24px; font-weight: 700; text-align: center; flex: 1; min-width: 200px; }
.bfc-legend { border: 1px solid var(--color-border-strong); border-radius: 6px; padding: 8px 12px; font-size: 11px; line-height: 1.7; white-space: nowrap; }
.bfc-legend-title { font-weight: 700; margin-bottom: 2px; }
.bfc-legend-shape { display: inline-block; width: 14px; height: 10px; margin-right: 2px; vertical-align: middle; border: 1px solid var(--color-text); }
.bfc-legend-circle { border-radius: 50%; width: 11px; height: 11px; }
.bfc-legend-oval { border-radius: 999px; }
.bfc-legend-diamond { display: inline-block; font-weight: 700; border: none; width: auto; }

.bfc-table { border-collapse: collapse; width: 100%; font-size: 11px; table-layout: fixed; }
.bfc-table th, .bfc-table td { border: 1px solid var(--color-border-strong); padding: 4px; vertical-align: top; word-break: break-word; }
.bfc-table thead th { background: var(--color-bg); font-size: 11px; text-align: center; }
.bfc-subhead { background: var(--color-surface); font-size: 10px; text-align: left; color: var(--color-text-muted); font-weight: normal; }
.bfc-th-process { width: 100px; }
.bfc-th-lane { width: 130px; }
.bfc-th-feedback { width: 56px; }
.bfc-th-actions { width: 96px; text-align: center; }

.bfc-band-p1, .bfc-band-p3 { background: #fdeee0; }
.bfc-band-p2, .bfc-band-p4 { background: #e3edfb; }
.bfc-td-process, .bfc-td-lane { text-align: center; }
.bfc-process-code { font-size: 16px; font-weight: 700; }
.bfc-process-name { font-size: 10px; margin-top: 4px; }
.bfc-lane-label { font-size: 10px; white-space: pre-wrap; text-align: left; }
.bfc-lane-input { font-size: 10px; width: 100%; box-sizing: border-box; min-height: 90px; }

.bfc-box { border: 1px solid var(--color-text); border-radius: 4px; padding: 4px 6px; background: var(--color-surface); font-size: 11px; margin: 2px 0; }
.bfc-row-meeting .bfc-box { border-radius: 999px; }
.bfc-row-approval .bfc-box { border-left: 3px solid var(--color-primary); }
.bfc-note { font-size: 10px; white-space: pre-wrap; color: var(--color-text-muted); }
.bfc-feedback-cell { text-align: center; font-size: 11px; color: var(--color-text-muted); }
.bfc-input { font-size: 11px; padding: 4px 6px; min-height: 30px; width: 100%; box-sizing: border-box; }
textarea.bfc-input { resize: vertical; }

.basic-setting-item {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  background: var(--color-surface);
}
.month-checklist { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0; }
.month-check { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; font-weight: normal; }
.basic-setting-dept-row {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: var(--color-surface);
}

.payslip-card { max-width: 640px; }
.payslip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
}
.payslip-row.payslip-total { font-weight: 600; border-bottom: 2px solid var(--color-border); }
.payslip-row.payslip-net {
  margin-top: 10px;
  font-weight: 700;
  font-size: 18px;
  border: none;
  background: var(--color-surface);
  border-radius: 8px;
  padding: 12px 10px;
}

.hcal-over { color: var(--color-danger); font-weight: 700; }
.hcal-year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.hcal-month { background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); padding: 10px; }
.hcal-month h4 { margin: 0 0 8px; font-size: 13px; text-align: center; }
.hcal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.hcal-dow-row { margin-bottom: 4px; }
.hcal-dow { font-size: 10px; text-align: center; color: var(--color-text-muted); font-weight: 700; }
.hcal-cell { text-align: center; }
.hcal-cell.out-of-month { visibility: hidden; }
.hcal-daynum { font-size: 11px; color: var(--color-text-muted); margin-bottom: 2px; }
.hcal-select {
  width: 100%; font-size: 10px; padding: 2px 1px; border-radius: 4px; border: 1px solid var(--color-border-strong);
  background: #eceff5; color: #444;
}
.hcal-select.type-scheduled { background: var(--color-warning); color: #3a2c00; border-color: var(--color-warning); }
.hcal-select.type-statutory { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.hcal-tag {
  display: block; font-size: 10px; padding: 2px 0; border-radius: 4px; background: #eceff5; color: #444;
}
.hcal-tag.type-scheduled { background: var(--color-warning); color: #3a2c00; }
.hcal-tag.type-statutory { background: var(--color-danger); color: #fff; }
.hcal-legend { margin: 8px 0 4px; }
.hcal-legend span { display: inline-flex; align-items: center; gap: 5px; margin-right: 16px; font-size: 12px; color: var(--color-text-muted); }
.hcal-legend .swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; background: var(--color-surface-muted); }
.hcal-legend .swatch.type-scheduled { background: var(--color-warning); }
.hcal-legend .swatch.type-statutory { background: var(--color-danger); }

@media print {
  .sidebar,
  .topbar,
  .btn,
  .btn-secondary,
  .btn-small,
  .btn-danger,
  .logout-icon-btn,
  .topbar-icon-btn,
  form button,
  button {
    display: none !important;
  }
  .app-shell {
    display: block;
  }
  .main {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
  body {
    background: #fff;
    color: #000;
  }
  .card {
    box-shadow: none;
    border: 1px solid #999;
    page-break-inside: avoid;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  .no-print {
    display: none !important;
  }
  @page {
    size: A4;
    margin: 14mm;
  }
}


.report-comments {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 6px;
}
.report-comment {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}
.report-comment:last-of-type {
  border-bottom: none;
}
.report-location-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0;
}
.geo-map-wrap {
  margin-bottom: 6px;
}
.report-timeline-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.report-timeline-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}
.report-timeline-list li:last-child {
  border-bottom: none;
}

@media (max-width: 800px) {
  .report-location-row { grid-template-columns: 1fr; }
}

.mobile-report-page {
  max-width: 480px;
  margin: 0 auto;
}
.mrp-wide-btn {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 14px;
  font-size: 16px;
}
.mrp-status-line {
  font-weight: 600;
  margin-bottom: 4px;
}
.mrp-timeline-item {
  margin-bottom: 10px;
}
.mrp-timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.checklist-group { margin-top: 18px; }
.checklist-group:first-child { margin-top: 4px; }
.checklist-group h4 {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
}
.checklist-item {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--color-bg);
}
.checklist-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.checklist-item-clause {
  font-weight: 700;
  font-size: 13px;
  color: var(--color-primary-dark);
}
.checklist-item-text {
  margin: 0 0 10px;
  font-size: 14px;
}

.matrix-table-wrap {
  overflow: auto;
  max-height: 78vh;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.matrix-table {
  width: auto;
  min-width: 100%;
  font-size: 12px;
  border-collapse: separate;
  border-spacing: 0;
}
.matrix-table th, .matrix-table td {
  border: 1px solid var(--color-border);
  padding: 3px 4px;
  text-align: center;
  white-space: nowrap;
}
.matrix-table thead th {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 2;
}
.matrix-category-th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
.matrix-col-th {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", "Segoe UI", sans-serif;
  min-height: 260px;
  min-width: 24px;
  max-width: 24px;
  font-weight: 500;
  vertical-align: bottom;
  padding: 6px 2px;
}
.matrix-col-th-text { white-space: nowrap; }
.matrix-corner-th, .matrix-group-th, .matrix-name-td {
  text-align: left;
  white-space: normal;
  background: var(--color-surface);
}
.matrix-corner-th {
  position: sticky;
  top: 0;
  z-index: 4;
}
.matrix-corner-th:first-child, .matrix-group-th {
  left: 0;
  min-width: 72px;
}
.matrix-corner-th:nth-child(2), .matrix-name-td {
  left: 72px;
  min-width: 110px;
}
.matrix-group-th {
  position: sticky;
  z-index: 2;
  vertical-align: top;
}
.matrix-name-td {
  position: sticky;
  z-index: 1;
  font-size: 13px;
}
.matrix-mark-td { font-weight: 700; color: var(--color-primary); }
.matrix-mark { font-size: 14px; }

.sc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.sc-head .page-title { margin-bottom: 0; }
.sc-head-sub { font-size: 15px; font-weight: 600; color: var(--color-text-muted); margin-left: 6px; }
.sc-head-links, .sc-toolbar-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px; margin-bottom: 10px; }
.sc-toolbar form { margin: 0; }
.sc-month { display: flex; align-items: center; gap: 6px; }
.sc-month .form-control { width: auto; padding: 4px 8px; }
.sc-period { flex: 1 1 auto; }
.sc-toolbar-actions { margin-left: auto; }
.sc-subbar { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.sc-help { font-size: 13px; color: var(--color-text-muted); }
.sc-help summary { cursor: pointer; color: var(--color-primary-dark); }
.sc-help ul { margin: 6px 0 0; padding-left: 20px; max-width: 80ch; }
.sc-card { padding: 0; overflow: hidden; }
.sc-scroll { overflow-x: auto; }
.sc-table { font-size: 13.5px; }
.sc-table th, .sc-table td { padding: 6px 8px; vertical-align: middle; }
.sc-table thead th { font-size: 12px; white-space: nowrap; }
.sc-table .sc-group-row th { text-align: center; font-size: 11.5px; padding-bottom: 0; border-bottom: 0; color: var(--color-text); }
.sc-table tbody tr:hover > * { background: var(--color-surface-muted); }
.sc-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-table th.sc-num { text-align: right; }
.sc-gl { border-left: 1px solid var(--color-border); }
.sc-name { font-weight: 700; white-space: nowrap; text-align: left; }
.sc-money { color: var(--color-navy); font-weight: 700; }
.sc-net { font-weight: 800; }
.sc-status { white-space: nowrap; }
.sc-table .badge, .sc-item .badge { font-size: 11.5px; padding: 1px 8px; }
.sc-actions { white-space: nowrap; text-align: right; }
.sc-actions .btn + .btn, .sc-actions .btn + a, .sc-actions a + .btn { margin-left: 3px; }
.sc-row-final > * { color: var(--color-text-muted); }
.sc-row-final .sc-money { color: var(--color-text); }
.sc-table tfoot th, .sc-table tfoot td { font-weight: 800; background: var(--color-surface-muted); border-top: 2px solid var(--color-border-strong); border-bottom: 0; }
.sc-in { width: 4.6em; padding: 3px 6px; font: inherit; font-variant-numeric: tabular-nums; text-align: right; border: 1px solid var(--color-border-strong); border-radius: 4px; background: var(--color-surface); color: var(--color-text); -moz-appearance: textfield; }
.sc-in::-webkit-inner-spin-button, .sc-in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sc-in:focus { outline: 2px solid var(--color-primary); outline-offset: 0; border-color: var(--color-primary); }
.sc-in[readonly] { background: var(--color-surface-muted); color: var(--color-text-muted); }
.sc-suggest { border-style: dashed; color: var(--color-text-muted); }
.sc-src { display: inline-block; margin-left: 4px; font-size: 10.5px; font-weight: 700; color: var(--color-text-muted); border: 1px solid var(--color-border-strong); border-radius: 3px; padding: 0 4px; line-height: 1.5; vertical-align: middle; }
.sc-table-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 10px 14px; border-top: 1px solid var(--color-border); }
.sc-default-submit { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.sc-summary { display: flex; flex-wrap: wrap; gap: 6px 28px; align-items: flex-end; margin: 0 0 10px; padding: 10px 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); }
.sc-summary div { display: grid; }
.sc-summary dt { font-size: 11.5px; color: var(--color-text-muted); }
.sc-summary dd { margin: 0; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.sc-progress { flex: 1 1 200px; }
.sc-bar { display: block; height: 7px; margin-top: 6px; border-radius: 99px; background: var(--color-border); overflow: hidden; }
.sc-bar span { display: block; height: 100%; background: var(--color-success); }
.sc-md { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.sc-md > .card { margin-bottom: 0; }
.sc-table tr.sc-sel > * { background: var(--color-primary-light); }
.sc-table tr.sc-sel > th { box-shadow: inset 3px 0 0 var(--color-primary); }
.sc-panel { padding: 14px 16px; display: grid; gap: 12px; position: sticky; top: 12px; }
.sc-panel form { margin: 0; }
.sc-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; }
.sc-panel h4 { margin: 0; font-size: 12px; color: var(--color-text-muted); font-weight: 700; }
.sc-panel-sec { display: grid; gap: 6px; }
.sc-import { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sc-field { display: grid; gap: 2px; font-size: 12px; color: var(--color-text-muted); }
.sc-field .sc-in { width: 100%; }
.sc-breakdown { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 0; font-size: 13px; }
.sc-breakdown dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sc-breakdown .sc-sep { border-top: 1px solid var(--color-border); padding-top: 4px; margin-top: 2px; }
.sc-breakdown .sc-strong { font-weight: 700; }
.sc-breakdown .sc-total { font-weight: 800; color: var(--color-navy); font-size: 15px; }
.sc-panel-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-steps { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; background: var(--color-surface); }
.sc-step { padding: 10px 16px; display: grid; gap: 2px; }
.sc-step + .sc-step { border-left: 1px solid var(--color-border); }
.sc-step-k { font-size: 12px; color: var(--color-text-muted); }
.sc-step-v { font-weight: 800; font-size: 16px; }
.sc-step-now { background: var(--color-primary-light); }
.sc-step-now .sc-step-k { color: var(--color-primary-dark); font-weight: 700; }
.sc-group { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 10px; }
.sc-group-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 8px 14px; border-bottom: 1px solid var(--color-border); background: var(--color-surface-muted); border-radius: var(--radius) var(--radius) 0 0; }
.sc-group-head h3 { margin: 0; font-size: 14px; }
.sc-group-head form { margin: 0; }
.sc-item { position: relative; display: grid; grid-template-columns: 22px minmax(90px, 150px) minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--color-border); }
.sc-item:last-child { border-bottom: 0; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; color: var(--color-text-muted); }
.sc-meta b { color: var(--color-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-item .sc-net { font-size: 15px; }
.sc-item-actions { display: flex; gap: 4px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.sc-item-actions form { margin: 0; }
.sc-fix summary { list-style: none; }
.sc-fix summary::-webkit-details-marker { display: none; }
.sc-fix-form { position: absolute; z-index: 5; right: 14px; top: calc(100% - 6px); display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 10px 12px; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); }
.sc-fix-form .sc-in { width: 4.6em; }
.sc-group-done .sc-item { color: var(--color-text-muted); }
.sc-group-done .sc-money { color: var(--color-text-muted); }
.sc-empty { margin: 0; padding: 10px 14px; font-size: 13px; color: var(--color-text-muted); }
@media (max-width: 1100px) { .sc-md { grid-template-columns: 1fr; } .sc-panel { position: static; } }
@media (max-width: 760px) {
  .sc-steps { grid-template-columns: 1fr; }
  .sc-step + .sc-step { border-left: 0; border-top: 1px solid var(--color-border); }
  .sc-item { grid-template-columns: 22px 1fr auto; }
  .sc-meta, .sc-item-actions { grid-column: 2 / -1; }
  .sc-item-actions { justify-content: flex-start; }
  .sc-fix-form { left: 14px; right: 14px; }
}
.sb-layout-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.sb-layout-option { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); cursor: pointer; background: var(--color-surface); }
.sb-layout-option:has(input:checked) { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); background: var(--color-primary-light); }
.sb-layout-option input { margin-top: 4px; }
.sb-layout-body { display: grid; gap: 6px; }
.sb-layout-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sb-layout-letter { font-size: 12px; font-weight: 800; color: #fff; background: var(--color-navy); border-radius: 4px; padding: 0 7px; }
.sb-layout-desc { font-size: 13px; }
.sb-sketch { display: grid; gap: 3px; width: 128px; padding: 6px; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-surface); }
.sb-sketch i { display: block; height: 6px; border-radius: 2px; background: var(--color-border-strong); }
.sb-sketch-table { grid-template-columns: repeat(6, 1fr); }
.sb-sketch-panel { grid-template-columns: 1fr 40px; }
.sb-sketch-panel b { display: grid; gap: 3px; }
.sb-sketch-panel em { display: block; border-radius: 3px; background: var(--color-primary-light); border: 1px solid var(--color-primary); }
.sb-sketch-workflow u { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; text-decoration: none; margin-bottom: 2px; }
.sb-sketch-workflow u i { background: var(--color-primary); opacity: .55; }
.sb-subhead { margin: 20px 0 8px; font-size: 14px; }
.sb-subhead:first-child { margin-top: 4px; }

.ws-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin: 12px 0; }
.ws-method { display: grid; gap: 4px; align-content: start; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); text-decoration: none; }
.ws-method:hover { border-color: var(--color-primary); }
.ws-method-current { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); background: var(--color-primary-light); }
.ws-method-name { font-weight: 800; font-size: 14px; }
.ws-method-summary { font-size: 12.5px; color: var(--color-text); }
.ws-method-suited { font-size: 11.5px; color: var(--color-text-muted); }
.ws-groups { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 14px; }
.ws-form { display: grid; gap: 10px; border-top: 1px solid var(--color-border); padding-top: 12px; }
.ws-form > p { margin: 0; }
.ws-form .form-group { margin-bottom: 0; }
.ws-wrap { flex-wrap: wrap; }
.ws-field { display: flex; gap: 6px; align-items: center; }
.ws-field .form-control { max-width: 160px; }
.ws-select { max-width: 260px; }
.ws-fieldset { border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 8px 12px 10px; margin: 0; }
.ws-fieldset legend { font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); padding: 0 4px; }
.ws-radio { display: inline-flex; gap: 6px; align-items: center; margin-right: 18px; font-size: 13.5px; }
.ws-formula { background: var(--color-surface-muted); border-radius: var(--radius-sm); padding: 6px 10px; }
.ws-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ws-subhead { margin: 0 0 6px; font-size: 13px; }
.ws-mini { font-size: 13px; width: auto; }
.ws-mini th, .ws-mini td { padding: 4px 8px; }
.ws-cell { width: 6.5em; padding: 3px 6px; font: inherit; font-variant-numeric: tabular-nums; text-align: right; border: 1px solid var(--color-border-strong); border-radius: 4px; background: var(--color-surface); color: var(--color-text); }
.ws-cell:focus { outline: 2px solid var(--color-primary); outline-offset: 0; border-color: var(--color-primary); }
.ws-manual-wrap { overflow: auto; max-height: 460px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.ws-manual { font-size: 12.5px; }
.ws-manual th, .ws-manual td { padding: 3px 6px; white-space: nowrap; }
.ws-manual thead th { position: sticky; top: 0; background: var(--color-surface-muted); z-index: 1; }
.ws-manual tbody th { position: sticky; left: 0; background: var(--color-surface); }
.ws-manual .ws-cell { width: 6.2em; }
.ws-na { color: var(--color-text-muted); text-align: center; }
.ws-csv summary { cursor: pointer; }

.qp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.qp-howto { background: var(--color-surface-muted); border-radius: var(--radius-sm); padding: 8px 12px; margin: 0 0 12px; }
.qp-form { display: grid; gap: 12px; }
.qp-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 14px; }
.qp-fields .form-group { margin-bottom: 0; }
.qp-fields .qp-wide { grid-column: span 2; }
@media (max-width: 640px) { .qp-fields .qp-wide { grid-column: auto; } }
.qp-ops { white-space: nowrap; }
.qp-inline { display: inline; margin: 0; }
.qp-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qp-csv summary { cursor: pointer; }
.qp-csv[open] summary { margin-bottom: 8px; }
.qp-savebar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 0 0 12px; }
.qp-savebar-top { position: sticky; top: 0; z-index: 5; background: var(--color-bg, #f5f6fa); padding: 8px 0; }
.matrix-table-edit .matrix-mark-td { padding: 2px; }
.matrix-check { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--color-primary); }
.matrix-expired { background: var(--color-warning-light); }
.qp-amount-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.qp-amount-section { margin-bottom: 0; }
.qp-amount-section h3 { margin-top: 0; }
.qp-amount-table { width: 100%; font-size: 13.5px; }
.qp-amount-table th, .qp-amount-table td { padding: 4px 8px; }
.qp-amount-input { max-width: 120px; text-align: right; font-variant-numeric: tabular-nums; padding: 4px 8px; }
.qp-amount-save { position: sticky; bottom: 0; z-index: 5; display: grid; gap: 10px; margin-top: 16px; }
.qp-check-label { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
@media print { .qp-actions, .qp-savebar { display: none; } }

.ws-names { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 20px; }
.ws-names .form-group { margin-bottom: 0; }

.sp-section { border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 10px 14px 12px; margin: 0 0 16px; }
.sp-section legend { font-weight: 700; padding: 0 6px; }
.sp-options { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 6px; }
.sp-option { display: inline-flex; gap: 6px; align-items: flex-start; font-size: 14px; }
.sp-preview { margin: 6px 0 10px; padding: 6px 10px; background: var(--color-surface-muted); border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; }
.sp-warn { background: var(--color-warning-light); color: var(--color-warning-dark); }
.sp-quals { margin: 0 0 4px; padding-left: 20px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.sp-base { max-width: 220px; }
.sb-allowance-table { width: 100%; }
.sb-allowance-table th, .sb-allowance-table td { padding: 4px 8px; }
.sb-allowance-table .sb-amount { max-width: 160px; }
.sb-center { text-align: center; }

.sc-sample { display: grid; grid-template-columns: minmax(300px, 440px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .sc-sample { grid-template-columns: 1fr; } }
.sc-sample .card { margin-bottom: 0; }
.sc-sample-steps { display: grid; gap: 16px; }
.sc-sample-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.sc-sample-highlight { background: var(--color-primary-light); border-radius: 4px; padding-left: 6px; padding-right: 6px; font-weight: 700; }
.sc-sample-sub { font-size: 12.5px; color: var(--color-text-muted); padding-left: 14px; }
.sc-sample-muted td { color: var(--color-text-muted); }
.sc-sample-list { margin: 6px 0 10px; padding-left: 22px; line-height: 1.8; }
.sc-sample .sc-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.bfc-auto-table { width: 100%; font-size: 13.5px; }
.bfc-auto-table th, .bfc-auto-table td { padding: 4px 8px; }
.bfc-auto-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bfc-auto-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bfc-auto-actions form { margin: 0; }

.mb-help summary { cursor: pointer; }
.mb-help ul { margin: 8px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.8; color: var(--color-text-muted); }
.mb-summary { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 12px; }
.mb-total { font-size: 14px; }
.mb-total strong, .mb-count strong { font-size: 16px; margin: 0 2px; font-variant-numeric: tabular-nums; }
.mb-count { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 999px; border: 1px solid transparent; color: var(--color-text); text-decoration: none; font-size: 13px; }
.mb-count:hover, .mb-count-current { border-color: var(--color-border-strong); background: var(--color-surface-muted); }
.mb-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mb-filters .form-control { width: auto; min-width: 150px; }
.mb-filters .mb-search { flex: 1 1 240px; min-width: 200px; }
.mb-clear { font-size: 13px; }
.mb-shown { margin: 10px 0 6px; }
.mb-table-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.mb-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.mb-table th, .mb-table td { padding: 8px 10px; vertical-align: top; border-bottom: 1px solid var(--color-border); text-align: left; }
.mb-table thead th { position: sticky; top: 0; z-index: 2; background: var(--color-surface-muted); font-size: 12.5px; white-space: nowrap; }
.mb-table tbody tr:nth-child(even) td, .mb-table tbody tr:nth-child(even) th { background: var(--color-surface-muted); }
.mb-table tbody tr:hover td, .mb-table tbody tr:hover th { background: var(--color-primary-light); }
.mb-table tbody tr:target td, .mb-table tbody tr:target th { background: var(--color-warning-light); }
.mb-table .mb-name { position: sticky; left: 0; z-index: 1; background: var(--color-surface); min-width: 150px; font-weight: 400; }
.mb-table thead th:first-child { left: 0; z-index: 3; }
.mb-name-main { font-weight: 700; }
.mb-username { font-size: 12px; color: var(--color-text-muted); }
.mb-self .mb-name-main { color: var(--color-primary-dark); }
.mb-position { color: var(--color-text-muted); font-size: 12.5px; }
.mb-groups { min-width: 160px; }
.mb-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.mb-role-cell { min-width: 150px; }
.mb-num, .mb-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mb-edit { margin-top: 4px; }
.mb-edit summary { cursor: pointer; font-size: 12px; color: var(--color-primary); list-style: none; display: inline-block; }
.mb-edit summary::-webkit-details-marker { display: none; }
.mb-edit summary::before { content: '✎ '; }
.mb-edit[open] summary { font-weight: 700; }
.mb-edit-body { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.mb-edit-body form { margin: 0; }
.mb-tier-select { width: auto; min-width: 170px; }
.mb-role { font: inherit; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px dashed var(--color-border-strong); background: var(--color-surface); color: var(--color-text-muted); cursor: pointer; }
.mb-role:hover { border-color: var(--color-primary); color: var(--color-primary); }
.mb-role-on { border-style: solid; border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 700; }
.mb-role:focus-visible, .mb-edit summary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
@media print { .mb-filters, .mb-edit, .mb-help { display: none; } .mb-table-wrap { max-height: none; overflow: visible; } }

.cc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.cc-kpi { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.cc-kpi-label { font-size: 12px; color: var(--color-text-muted); }
.cc-kpi-value { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cc-kpi-extra { font-size: 12px; color: var(--color-text-muted); }
.cc-minus { color: var(--color-danger-dark, #c0392b); }
.cc-plus { color: var(--color-success-dark); }
.cc-alert { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 0; font-size: 13px; }
.cc-table-wrap { overflow-x: auto; }
.cc-table { width: 100%; font-size: 13px; }
.cc-table th, .cc-table td { padding: 6px 8px; vertical-align: top; }
.cc-table thead th { white-space: nowrap; background: var(--color-surface-muted); }
.cc-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-parent td { background: var(--color-surface-muted); font-weight: 600; }
.cc-state-over td:first-child { box-shadow: inset 3px 0 0 var(--color-danger, #e5484d); }
.cc-state-warn td:first-child { box-shadow: inset 3px 0 0 var(--color-warning-dark, #b7791f); }
.cc-rate { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.cc-bar { position: relative; display: inline-block; width: 70px; height: 8px; border-radius: 999px; background: var(--color-surface-muted); overflow: hidden; }
.cc-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--color-success, #30a46c); }
.cc-bar-warn { background: var(--color-warning-dark, #b7791f); }
.cc-bar-over { background: var(--color-danger, #e5484d); }
.cc-input { max-width: 140px; text-align: right; font-variant-numeric: tabular-nums; }
.cc-forecast-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 12px; }
.cc-forecast-form .form-group { margin-bottom: 0; }
.cc-unlinked { border-left: 4px solid var(--color-warning-dark, #b7791f); }
.cc-mini { font-size: 13px; width: auto; min-width: 280px; margin-top: 10px; }
.cc-mini td, .cc-mini th { padding: 4px 10px; }
.cc-breakdown .cc-total td { font-weight: 800; border-top: 2px solid var(--color-border-strong); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.cc-actions form { margin: 0; }
.cc-subhead { margin: 16px 0 6px; font-size: 14px; }
.cc-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.rp-work-row { gap: 8px; align-items: center; margin-bottom: 6px; }
.rp-work-row select { flex: 1 1 240px; }
.rp-hours { max-width: 100px; }

.md-period { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.md-period label { display: inline-flex; gap: 6px; align-items: center; }
.md-period .form-control { width: auto; }
.md-nav { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; margin-bottom: 12px; background: var(--color-bg, #f5f6fa); }
.md-nav a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); text-decoration: none; font-size: 13px; }
.md-nav a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.md-section { margin-bottom: 18px; scroll-margin-top: 56px; }
.md-section h2 { margin: 0 0 12px; font-size: 18px; }
.md-subhead { margin: 18px 0 8px; font-size: 14px; }
.md-overview { display: grid; grid-template-columns: minmax(180px, 220px) minmax(280px, 1fr) minmax(240px, 320px); gap: 16px; align-items: center; }
@media (max-width: 960px) { .md-overview { grid-template-columns: 1fr; } }
.md-total { display: grid; gap: 6px; justify-items: start; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface-muted); }
.md-total-label { font-size: 12px; color: var(--color-text-muted); }
.md-total-score { font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.md-total-score span { font-size: 14px; font-weight: 600; color: var(--color-text-muted); margin-left: 2px; }
.md-good { color: var(--color-success-dark, #1f7a4d); }
.md-caution { color: var(--color-warning-dark, #b7791f); }
.md-danger { color: var(--color-danger-dark, #c0392b); }
.md-direction-mini { display: grid; gap: 2px; margin-top: 4px; font-size: 13px; }
.md-radar { display: flex; justify-content: center; }
.md-plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.md-plist a { display: grid; grid-template-columns: 110px 1fr auto auto; gap: 8px; align-items: center; color: var(--color-text); text-decoration: none; font-size: 13px; }
.md-plabel { font-weight: 700; }
.md-bar { position: relative; display: inline-block; width: 100%; min-width: 60px; height: 8px; border-radius: 999px; background: var(--color-surface-muted); overflow: hidden; }
.md-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--color-success, #30a46c); }
.md-bar-fill.md-caution { background: var(--color-warning-dark, #b7791f); }
.md-bar-fill.md-danger { background: var(--color-danger, #e5484d); }
.md-score-num { font-variant-numeric: tabular-nums; min-width: 26px; text-align: right; }
.md-advice { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.md-advice li > .badge { margin-right: 8px; vertical-align: top; }
.md-advice li { display: list-item; }
.md-advice li > div { display: inline-block; vertical-align: top; max-width: calc(100% - 70px); }
.md-advice-body { font-size: 13px; color: var(--color-text-muted); }
.md-pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .md-pgrid { grid-template-columns: 1fr; } }
.md-pcard { margin-bottom: 0; border-top: 4px solid var(--color-border); scroll-margin-top: 56px; }
.md-border-good { border-top-color: var(--color-success, #30a46c); }
.md-border-caution { border-top-color: var(--color-warning-dark, #b7791f); }
.md-border-danger { border-top-color: var(--color-danger, #e5484d); }
.md-phead { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.md-phead h3 { margin: 0; }
.md-phead-score { display: flex; gap: 6px; align-items: center; min-width: 170px; }
.md-table-wrap { overflow-x: auto; }
.md-table { width: 100%; font-size: 13px; }
.md-table th, .md-table td { padding: 6px 8px; vertical-align: top; }
.md-table thead th { background: var(--color-surface-muted); white-space: nowrap; }
.md-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.md-bench { font-size: 12px; color: var(--color-text-muted); }
.md-minus { color: var(--color-danger-dark, #c0392b); }
.md-comment { margin: 10px 0 0; font-size: 13px; background: var(--color-surface-muted); border-radius: var(--radius-sm); padding: 8px 10px; }
.md-risk-summary { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.md-count { display: grid; justify-items: center; min-width: 90px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--color-border); font-size: 12px; }
.md-count strong { font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.md-count-high { border-color: var(--color-danger, #e5484d); color: var(--color-danger-dark, #c0392b); }
.md-count-medium { border-color: var(--color-warning-dark, #b7791f); color: var(--color-warning-dark, #b7791f); }
.md-risk-chart { flex: 1 1 360px; }
.md-risk-high td:first-child { box-shadow: inset 3px 0 0 var(--color-danger, #e5484d); }
.md-direction { border-left: 4px solid var(--color-primary); background: var(--color-primary-light); border-radius: var(--radius-sm); padding: 10px 14px; }
.md-direction-head { font-size: 17px; font-weight: 800; }
.md-direction p { margin: 6px 0 0; }
.md-swot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .md-swot { grid-template-columns: 1fr; } }
.md-swot-box { border-radius: var(--radius-sm); padding: 10px 12px; border: 1px solid var(--color-border); }
.md-swot-box h4 { margin: 0 0 6px; }
.md-swot-box ul { margin: 0; padding-left: 18px; font-size: 13px; }
.md-swot-s { background: var(--color-success-light); }
.md-swot-w { background: var(--color-danger-light); }
.md-swot-o { background: var(--color-accent-light); }
.md-swot-t { background: var(--color-warning-light); }
.md-strategies { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.8; }
.md-plan-form { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 12px; }
.md-plan-form label { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; }
.md-plan-form .form-control { width: 90px; text-align: right; }
.md-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.md-kpi { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.md-kpi span, .md-kpi em { font-size: 12px; color: var(--color-text-muted); font-style: normal; }
.md-kpi strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.md-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .md-two { grid-template-columns: 1fr; } }
.md-actions { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.8; }
.md-chart-wrap { overflow-x: auto; }
.md-note { margin-top: 8px; }
@media print { .md-nav, .md-period, .md-plan-form { display: none; } }

.md-part-title { margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--color-border); font-size: 19px; }

.md-part-head { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--color-border); }
.md-part-head .md-part-title { margin: 0; padding: 0; border: 0; }

.sales-subnav {
  display: flex; gap: 2px; overflow-x: auto; margin: -4px 0 14px;
  border-bottom: 1px solid var(--color-border); scrollbar-width: thin;
}
.sales-subnav a {
  display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px 9px; white-space: nowrap;
  font-size: 13.5px; color: var(--color-text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.sales-subnav a:hover { color: var(--color-primary-dark); text-decoration: none; background: var(--color-primary-light); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.sales-subnav a.active { color: var(--color-primary-dark); font-weight: 700; border-bottom-color: var(--color-primary); }
.module-subnav-divider { flex: 0 0 1px; align-self: center; height: 18px; margin: 0 6px; background: var(--color-border-strong, var(--color-border)); }
.sales-subnav a.module-subnav-more { color: var(--color-primary); font-size: 12.5px; }
@media print { .sales-subnav { display: none; } }

.appearance-lead { margin: -8px 0 16px; max-width: 72ch; color: var(--color-text-muted); }
.appearance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.appearance-option { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); }
.appearance-option.is-current { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary-light); }
.appearance-option h2 { margin: 4px 0 0; font-size: 16px; }
.appearance-option p { flex: 1; margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--color-text-muted); }
.appearance-option form { margin: 0; }
.appearance-current { align-self: flex-start; }
.appearance-preview { display: grid; grid-template-columns: 22% 1fr; height: 120px; overflow: hidden; border: 1px solid; border-radius: 6px; }
.appearance-preview-main { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; font-size: 13px; }
.appearance-preview-bar { display: flex; align-items: center; height: 26px; padding: 0 8px; border: 1px solid; }
.appearance-preview-bar span { width: 40%; height: 8px; border-radius: 2px; }
.appearance-preview-lines { display: flex; flex-direction: column; gap: 6px; }
.appearance-preview-lines i { display: block; height: 6px; border-radius: 2px; }
.appearance-note { margin-top: 16px; font-size: 13px; color: var(--color-text-muted); }

.wr-overview-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.wr-overview-head h2 { margin: 0 0 10px; }
.wr-table-wrap { overflow-x: auto; }
.wr-table th, .wr-table td { vertical-align: top; }
.wr-table th { white-space: nowrap; }
.wr-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.wr-type { font-weight: 700; }
.wr-type a { color: var(--color-text); }
.wr-importance { display: inline-block; margin-top: 3px; padding: 0 6px; border: 1px solid var(--color-border-strong); border-radius: 4px; font-size: 11.5px; color: var(--color-text-muted); white-space: nowrap; }
.wr-importance-required { border-color: var(--color-danger); color: var(--color-danger-dark); }
.wr-importance-recommended { border-color: var(--color-accent); color: var(--color-accent-dark); }
.wr-ok { font-weight: 700; color: var(--color-success-dark); }
.wr-todo { font-weight: 700; color: var(--color-danger-dark); }
.wr-na, .wr-missing { color: var(--color-text-muted); }
.wr-date { display: block; font-size: 12px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.wr-row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wr-row-actions form { margin: 0; }
.wr-bar { display: block; width: 72px; height: 6px; margin-top: 4px; overflow: hidden; border-radius: 999px; background: var(--color-surface-muted); }
.wr-bar > span { display: block; height: 100%; background: var(--color-success); }
.wr-confirm-list { margin: 0; padding: 0; list-style: none; }
.wr-confirm-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--color-border); }
.wr-confirm-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.wr-confirm-banner form { margin: 0; }
.wr-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.wr-steps li { padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.wr-steps li.is-done { border-color: var(--color-success); background: var(--color-success-light); }
.wr-steps li.is-todo { border-color: var(--color-danger); }
.wr-step-label { font-size: 13.5px; font-weight: 700; }
.wr-step-state { font-size: 12.5px; color: var(--color-text-muted); }
.wr-names { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.wr-names li { padding: 2px 8px; border-radius: 999px; background: var(--color-surface-muted); font-size: 12.5px; }
.wr-fieldset { margin: 0 0 12px; padding: 10px 14px 4px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.wr-fieldset legend { padding: 0 6px; font-size: 14px; font-weight: 700; }
.wr-history { margin: 0; padding: 0; list-style: none; }
.wr-history li { padding: 8px 0; border-top: 1px solid var(--color-border); }
.wr-disclaimer { max-width: 90ch; margin-top: 18px; font-size: 12.5px; line-height: 1.7; color: var(--color-text-muted); }

.pg-back { margin: 0 0 8px; }
.pg-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.pg-month-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pg-month-nav strong { min-width: 7em; font-size: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.pg-meter { display: block; width: 100%; max-width: 160px; height: 6px; margin-top: 4px; overflow: hidden; border-radius: 999px; background: var(--color-surface-muted); }
.pg-meter > span { display: block; height: 100%; background: var(--color-success); }
.pg-meter-warn > span { background: var(--color-warning); }
.pg-meter-danger > span { background: var(--color-danger); }
.pg-note { max-width: 90ch; margin-top: 16px; font-size: 12.5px; line-height: 1.7; color: var(--color-text-muted); }

.lv-table-wrap { overflow-x: auto; }
.lv-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lv-sub { display: block; font-size: 12px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.lv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lv-actions form { margin: 0; }
.lv-reject { display: flex; align-items: center; gap: 6px; }
.lv-reject .form-control { width: 12em; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.lv-history { margin: 0; padding: 0; list-style: none; }
.lv-history li { padding: 8px 0; border-top: 1px solid var(--color-border); }
.lv-h3 { margin: 18px 0 6px; font-size: 14px; }
.lv-insurance { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.lv-insurance > span { white-space: nowrap; }
.lv-insurance-row { align-items: flex-end; }
tr.lv-row-current td { background: var(--color-primary-light); }

.hc-cell { position: relative; border-radius: 4px; padding: 1px 0; }
.hc-sun .hcal-daynum, .hc-hol .hcal-daynum, .hcal-dow.hc-sun, .hc-wd.hc-sun { color: var(--color-danger); }
.hc-sat .hcal-daynum, .hcal-dow.hc-sat, .hc-wd.hc-sat { color: var(--color-primary); }
.hc-today { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.hc-today .hcal-daynum { font-weight: 800; }
.hc-daylabel { display: block; margin-top: 1px; font-size: 9px; line-height: 1.2; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-daylabel-muted { color: var(--color-text-muted); }
.hc-month-sub { font-weight: 400; font-size: 11px; color: var(--color-text-muted); }
.hcal-legend .swatch.hc-swatch-today { background: transparent; outline: 2px solid var(--color-primary); }
.hc-savebar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 16px; padding: 10px 12px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); background: var(--color-surface); }
.hc-savebar.is-dirty { border-color: var(--color-warning); }
.hc-savebar.is-dirty .hc-savebar-msg { font-weight: 700; color: var(--color-text); }
.hc-savebar-msg { font-size: 13px; color: var(--color-text-muted); }
.hc-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hc-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.hc-check-warn { border-color: var(--color-danger); }
.hc-check > .badge { flex: 0 0 auto; }
.hc-check-body { min-width: 0; }
.hc-check-body p { margin: 4px 0 0; font-size: 13px; color: var(--color-text-muted); }
.hc-weeklist { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; columns: 2 16em; }
.hc-variable { margin-top: 16px; }
.hc-variable h4 { margin: 0 0 8px; font-size: 14px; }
.hc-variable-table th { text-align: left; font-weight: 600; }
.hc-table-wrap { overflow-x: auto; }
.hc-table-note { margin-top: 10px; }
.hc-total-row td { font-weight: 700; background: var(--color-surface-muted); }
.hc-form-row { flex-wrap: wrap; align-items: flex-end; }
.hc-form-actions { flex: 0 0 auto; margin-top: 8px; }
.hc-num { width: 120px; }
.hc-num-sm { width: 90px; }
.hc-select-auto { width: auto; }
.hc-inline-check { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-size: 13px; }
.hc-inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.hc-checkline { margin: 6px 0; }
.hc-weekdays { border: 0; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hc-weekdays legend { width: 100%; margin-bottom: 4px; font-size: 13px; color: var(--color-text-muted); }
.hc-wd { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.hc-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; }
.hc-hol-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; font-size: 13px; }
.hc-hol-date { display: inline-block; min-width: 6.5em; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.hcal-tag.hc-tag-inline { display: inline-block; padding: 1px 6px; }
.hc-status-card .sales-facts { margin-bottom: 10px; }
.hc-status-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hc-actions { white-space: nowrap; }
@media print { .hc-savebar, .hc-presets, #bulk, #national { display: none !important; } }

.at-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.at-inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.at-inline-form .form-control { width: auto; }
.at-grid-wrap { overflow-x: auto; }
.at-shift-grid { min-width: 860px; table-layout: fixed; }
.at-shift-grid th, .at-shift-grid td { padding: 6px 8px; vertical-align: top; border-left: 1px solid var(--color-border); }
.at-grid-member { width: 130px; white-space: nowrap; }
.at-grid-total { width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.at-day { text-align: center; font-size: 13px; }
.at-day-date { font-weight: 700; }
.at-day-dow { color: var(--color-text-muted); }
.at-day-tag { display: block; font-size: 11px; color: var(--color-text-muted); }
.at-holiday { background: var(--color-surface-muted); }
.at-today { background: var(--color-accent-light); }
.at-row-me > th, .at-row-me > td { background: var(--color-primary-light); }
.at-cell { min-height: 44px; }
.at-cell-add { display: block; text-align: center; padding: 6px 0; border: 1px dashed var(--color-border); border-radius: 6px; color: var(--color-text-muted); }
.at-cell-add:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.at-cell-empty { display: block; text-align: center; color: var(--color-text-muted); }
.at-shift { display: block; margin-bottom: 4px; padding: 4px 6px; border-radius: 6px; border-left: 3px solid var(--color-primary); background: var(--color-surface); color: var(--color-text); font-size: 12.5px; line-height: 1.4; }
a.at-shift:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--color-primary); }
.at-shift-early { border-left-color: var(--color-success); }
.at-shift-late { border-left-color: var(--color-warning); }
.at-shift-night { border-left-color: var(--color-navy); }
.at-shift-time { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.at-shift-pattern { font-size: 11px; color: var(--color-text-muted); margin-right: 4px; }
.at-shift-note { display: block; font-size: 11.5px; color: var(--color-text-muted); overflow-wrap: anywhere; }
.at-form-row { flex-wrap: wrap; align-items: flex-end; }
.at-grow { flex: 2; min-width: 180px; }
.at-form-actions { flex: 0 0 auto; }
.at-nowrap { white-space: nowrap; }
.at-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.at-muted { color: var(--color-text-muted); }
.at-sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--color-text-muted); }
.at-total-row th, .at-total-row td { font-weight: 700; border-top: 2px solid var(--color-border-strong); }
.at-source { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; background: var(--color-surface-muted); color: var(--color-text-muted); }
.at-source-auto { background: var(--color-accent-light); color: var(--color-accent-dark); }
.at-ot { min-width: 200px; }
.at-ot-hours { font-weight: 700; font-variant-numeric: tabular-nums; }
.at-ot .pg-meter { margin: 4px 0; }
.at-reasons { margin: 4px 0 0; padding-left: 1.2em; font-size: 12px; color: var(--color-text-muted); }
.at-row-over > th { border-left: 3px solid var(--color-danger); }
.at-agreement-note { margin: -4px 0 12px; }
.at-day-table th, .at-day-table td { padding: 6px 8px; font-size: 13.5px; }
.at-warn { display: inline-block; margin: 1px 4px 1px 0; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; background: var(--color-warning-light); color: var(--color-warning-dark); }

.la-h { margin: 0 0 8px; font-size: 16px; }
.pg-toolbar .la-h { margin: 0; }
.la-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.la-actions form, .la-inline-form { display: inline-flex; margin: 0; }
.la-actionbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-block: 12px; }
.la-actionbar-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.la-pop { position: relative; }
.la-pop > summary { list-style: none; cursor: pointer; }
.la-pop > summary::-webkit-details-marker { display: none; }
.la-pop-body { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(360px, 86vw); padding: 12px; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: 10px; box-shadow: var(--shadow-pop); }
.la-pop-body .form-group { margin-bottom: 10px; }
.la-pop-foot { margin-top: 8px; }
.la-special { margin-top: 12px; padding: 0 12px; border: 1px solid var(--color-border); border-radius: 8px; }
.la-special > summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.la-special[open] > summary { margin-bottom: 12px; border-bottom: 1px solid var(--color-border); }
.la-savebar { position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 16px; padding: 10px 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.08); }
.la-table-wrap { overflow-x: auto; }
.la-table-wrap td { vertical-align: middle; }
.la-nowrap { white-space: nowrap; }
.la-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.la-num .pg-meter { margin-left: auto; }
.la-row-warn > td { background: var(--color-warning-light); }
.la-row-danger > td { background: var(--color-danger-light); }
.la-row-highlight > td { background: var(--color-primary-light); }
.la-issues { margin-bottom: 14px; }
.la-current .sales-facts { margin-bottom: 8px; }
.la-next { margin: 8px 0 0; font-size: 13.5px; }
.la-form-no { margin-left: 6px; font-size: 11.5px; color: var(--color-text-muted); }
.la-warning-list { margin: 0; padding-left: 0; list-style: none; }
.la-warning-list li { padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.la-danger { margin-top: 24px; }

.hx-table-wrap { overflow-x: auto; }
.hx-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hx-sub { display: block; font-size: 12px; color: var(--color-text-muted); }
.hx-sub.hx-inline { display: inline; margin-left: 6px; }
.hx-h2 { margin: 0; }
.hx-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hx-filter .form-control { width: auto; min-width: 9em; }
.hx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.hx-actions form { margin: 0; }
.hx-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hx-check { display: inline-flex; align-items: center; gap: 6px; font-weight: normal; margin: 4px 0; }
.hx-move { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin-right: 10px; }
.hx-arrow { color: var(--color-text-muted); }
.hx-label { display: inline-block; min-width: 3em; margin-right: 6px; font-size: 12px; color: var(--color-text-muted); }
.hx-memo { margin-top: 4px; white-space: pre-wrap; font-size: 13.5px; }
.hx-facts-note { margin: 10px 0 0; }
.hx-timeline { list-style: none; margin: 0; padding: 0; }
.hx-tl-item { display: grid; grid-template-columns: 8.5em 1fr; gap: 12px; padding: 12px 0 12px 12px; border-left: 3px solid var(--color-border-strong); }
.hx-tl-item + .hx-tl-item { border-top: 1px solid var(--color-border); }
.hx-tl-item.is-future { border-left-color: var(--color-warning); }
.hx-tl-date { font-weight: 700; font-variant-numeric: tabular-nums; }
.hx-tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.hx-tl-body > div { margin-top: 2px; }
@media (max-width: 600px) { .hx-tl-item { grid-template-columns: 1fr; gap: 4px; } }
.hx-steps { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.hx-steps li { display: flex; gap: 6px; align-items: flex-start; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: 6px; font-size: 13px; }
.hx-steps li.is-done { border-color: var(--color-success); background: var(--color-success-light); }
.hx-step-mark { display: inline-flex; justify-content: center; align-items: center; width: 1.2em; height: 1.2em; flex: none; border: 1px solid var(--color-border-strong); border-radius: 3px; font-size: 12px; }
.hx-fieldset { border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 14px; margin: 8px 0; }
.hx-fieldset legend { padding: 0 6px; font-size: 13px; font-weight: 700; }
.hx-step-row { display: grid; grid-template-columns: minmax(12em, 1fr) 11em 1fr; align-items: center; gap: 4px 10px; padding: 4px 0; }
@media (max-width: 700px) { .hx-step-row { grid-template-columns: 1fr; } }
.hx-kind-switch { display: flex; gap: 6px; margin-bottom: 10px; }
.hx-records { list-style: none; margin: 0; padding: 0; }
.hx-records > li { padding: 10px 0; border-top: 1px solid var(--color-border); }
.hx-records > li:first-child { border-top: none; }
.hx-record-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hx-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0 0 10px; padding: 0; font-size: 12.5px; color: var(--color-text-muted); }
.hx-legend li { display: inline-flex; align-items: center; gap: 5px; }
.hx-dot { display: inline-block; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--color-primary); }
.hx-dot-transfer { background: var(--color-accent); }
.hx-dot-commendation { background: var(--color-success); }
.hx-dot-hire { background: var(--color-primary-dark); }
.hx-dot-contract { background: var(--color-warning); }
.hx-dot-retire { background: var(--color-danger); }
.hx-cal-item { display: block; width: 100%; text-align: left; }
.hx-auto { border-left: 3px solid var(--color-primary); }
.hx-auto-transfer { border-left-color: var(--color-accent); }
.hx-auto-commendation { border-left-color: var(--color-success); }
.hx-auto-hire { border-left-color: var(--color-primary-dark); }
.hx-auto-contract { border-left-color: var(--color-warning); }
.hx-auto-retire { border-left-color: var(--color-danger); }
.hx-upcoming { list-style: none; margin: 0; padding: 0; }
.hx-upcoming li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--color-border); }
.hx-upcoming li:first-child { border-top: none; }
.hx-up-date { min-width: 6.5em; font-weight: 700; }

.rc-h { margin: 0; font-size: 16px; }
.rc-sub { display: block; font-size: 12px; font-weight: 400; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.rc-nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-table-wrap { overflow-x: auto; }
.rc-table-wrap td { vertical-align: top; }
tr.rc-row-alert > td { background: var(--color-danger-light); }
tr.rc-row-today > td { background: var(--color-primary-light); }
.rc-grow { flex: 2; min-width: 200px; }
.rc-inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.rc-inline-form .form-control { width: auto; }
.rc-inline-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.rc-actions, .rc-task-actions, .rc-stage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.rc-stage-actions { margin: 12px 0 16px; }
.rc-search { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.rc-search .form-control { width: auto; min-width: 10em; }
.rc-board { display: grid; grid-template-columns: repeat(4, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; }
.rc-col { min-width: 0; padding: 10px; border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.rc-col-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; font-size: 14px; }
.rc-col-count { min-width: 1.8em; padding: 0 8px; border-radius: 999px; background: var(--color-surface); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.rc-col-empty { margin: 0; font-size: 12.5px; color: var(--color-text-muted); }
.rc-cards { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rc-card { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); font-size: 13px; }
.rc-card.is-alert { border-left: 3px solid var(--color-danger); }
.rc-card-name { font-weight: 700; }
.rc-card-line { overflow-wrap: anywhere; }
.rc-card-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.rc-card-alert { border-color: var(--color-danger); }
.rc-steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 4px; padding: 0; list-style: none; }
.rc-steps li { padding: 4px 12px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 13px; color: var(--color-text-muted); }
.rc-steps li.rc-step-done { background: var(--color-success-light); border-color: transparent; color: var(--color-success-dark); }
.rc-steps li.rc-step-current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; font-weight: 700; }
.rc-steps.is-closed li.rc-step-current { background: var(--color-text-muted); border-color: var(--color-text-muted); }
.rc-more { position: relative; display: inline-block; }
.rc-more > summary { list-style: none; cursor: pointer; }
.rc-more > summary::-webkit-details-marker { display: none; }
.rc-more-body { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(340px, 86vw); padding: 12px; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: 10px; box-shadow: var(--shadow-pop); }
.rc-more-wide { width: min(640px, 92vw); }
.rc-tasks { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.rc-task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 6px 12px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.rc-task-actions { grid-column: 2 / -1; }
.rc-task.is-overdue { border-color: var(--color-danger); background: var(--color-danger-light); }
.rc-task.is-done strong, .rc-task.is-skipped strong { color: var(--color-text-muted); text-decoration: line-through; }
.rc-task-toggle { margin: 0; }
.rc-task-body { min-width: 0; }
.rc-task-due { white-space: nowrap; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.rc-where { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--color-accent-dark); }
.rc-group-head { margin: 16px 0 8px; font-size: 14px; }
.rc-progress { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.rc-progress .pg-meter { width: 140px; margin-top: 0; }
.rc-progress-cell { min-width: 140px; font-variant-numeric: tabular-nums; }
.rc-add-task, .rc-next-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; }
.rc-add-task .form-control, .rc-next-form .form-control { width: auto; }
.rc-add-task .form-control:first-child, .rc-next-form .form-control:first-child { flex: 1 1 18em; }
.rc-upgrade { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.rc-interview { padding: 12px 0; border-top: 1px solid var(--color-border); }
.rc-interview:first-of-type { padding-top: 0; border-top: 0; }
.rc-interview.is-alert { padding-left: 10px; border-left: 3px solid var(--color-danger); }
.rc-interview-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rc-eval { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; margin: 8px 0; }
.rc-eval dt { font-size: 12px; color: var(--color-text-muted); }
.rc-eval dd { margin: 0; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rc-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.rc-check { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; }
.rc-rating { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; border: 0; }
.rc-rating legend { width: 100%; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.rc-rate { position: relative; }
.rc-rate input { position: absolute; opacity: 0; }
.rc-rate span { display: inline-block; min-width: 2.6em; padding: 6px 10px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); text-align: center; cursor: pointer; }
.rc-rate input:checked + span { background: var(--color-primary); border-color: var(--color-primary); color: #fff; font-weight: 700; }
.rc-rate input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.rc-history { margin: 0; padding: 0; list-style: none; }
.rc-history li { padding: 8px 0; border-top: 1px solid var(--color-border); font-size: 13.5px; }
.rc-memo { margin: 12px 0 0; padding: 8px 12px; border-left: 3px solid var(--color-border-strong); background: var(--color-surface-muted); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rc-danger { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.rc-stage-card .sales-facts { margin-top: 4px; }
@media (max-width: 720px) { .rc-task { grid-template-columns: minmax(0, 1fr); } .rc-task-actions { grid-column: auto; } .rc-task-due { text-align: left; } .rc-board { grid-template-columns: repeat(4, minmax(220px, 80vw)); } }
@media print { .rc-actions, .rc-task-actions, .rc-stage-actions, .rc-add-task, .rc-next-form, .rc-task-toggle { display: none !important; } }

.el-table-wrap { overflow-x: auto; }
.el-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.el-sub { display: block; font-size: 12px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.el-muted { color: var(--color-text-muted); }
.el-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.el-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.el-search .form-control { width: 22em; max-width: 100%; }
.el-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.el-kpi-breakdown { display: block; font-size: 15px; font-weight: 700; line-height: 1.5; }
.el-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.el-card-head h2 { margin: 0 0 10px; }
.el-h3 { margin: 16px 0 4px; font-size: 14px; }
.el-pre { margin: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.7; }
.el-records { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.el-record { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.el-record-title { font-size: 12.5px; color: var(--color-text-muted); }
.el-record-value { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.el-record-sub { font-size: 12px; color: var(--color-text-muted); }
.el-record-link { margin-top: auto; padding-top: 4px; font-size: 13px; }
.el-timeline { margin: 0; padding: 0; list-style: none; }
.el-timeline li { display: grid; grid-template-columns: 7.5em 7.5em 1fr; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--color-border); }
.el-timeline-date { font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.el-timeline-kind { font-weight: 700; }
@media (max-width: 600px) { .el-timeline li { grid-template-columns: 1fr; } }
.el-fieldset { margin: 0 0 12px; padding: 10px 14px 4px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.el-fieldset > legend { padding: 0 6px; font-size: 14px; font-weight: 700; }
.el-hint { display: block; margin-top: 3px; font-size: 12px; color: var(--color-text-muted); }
.el-attention { border-color: var(--color-warning); background: var(--color-warning-light); }
.el-attention h2 { margin: 0 0 6px; font-size: 16px; }
.el-attention ul { margin: 0; padding-left: 1.2em; line-height: 1.8; }
.el-check-head { margin: 8px 0 2px; font-size: 13px; font-weight: 700; }
.el-reform-tag { display: inline-block; margin-left: 4px; padding: 0 6px; border: 1px solid var(--color-danger); border-radius: 4px; font-size: 11px; font-weight: 700; color: var(--color-danger-dark); vertical-align: middle; }
.el-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.el-actions form { margin: 0; }
.el-category-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.el-category-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.el-category-list .el-sub { display: inline; }
.el-submit .el-actions { margin: 10px 0 6px; }
.el-check { display: flex; align-items: center; gap: 6px; font-size: 14px; }

.dr-sheet-title { margin: 0; font-size: 18px; }
.dr-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 18px 0 8px; }
.dr-section-title { margin: 0; font-size: 16px; font-weight: 700; }
.dr-todo { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--color-surface-muted); font-size: 13px; }
.dr-times { display: grid; grid-template-columns: repeat(2, minmax(0, 12em)); gap: 0 16px; }
.dr-hint { margin: -6px 0 12px; }
.dr-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 6px; }
.dr-tools .form-control { width: auto; min-width: 10em; }
.dr-tools-status { min-height: 1.2em; margin: 0 0 4px; }
.dr-more { margin: 8px 0 4px; }
.dr-more > summary { cursor: pointer; font-weight: 600; color: var(--color-primary-dark); }
.dr-more[open] > summary { margin-bottom: 8px; }
.dr-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.dr-inline-form .form-control { flex: 1 1 200px; width: auto; }
.dr-range-form .form-control { flex: 0 1 auto; }
.dr-delete { margin-top: 10px; }
.dr-photos { margin-top: 16px; }
.dr-photo-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.dr-photo { border: 1px solid var(--color-border, #dde3ea); border-radius: var(--radius-sm, 6px); padding: 8px; background: var(--color-surface, #fff); }
.dr-photo > a { display: block; }
.dr-photo img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius-sm, 6px); background: var(--color-surface-muted, #f8f9fb); }
.dr-photo-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.dr-photo-form { display: flex; flex-direction: column; gap: 6px; }
.dr-photo-warn { color: var(--color-danger, #c53030); }
.dr-photo-add { margin-top: 8px; }
.cm-site-photos { margin-top: 16px; }
.dr-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 6px; }
.dr-report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 4px; }
.dr-report-meta { margin: 0 0 8px; }
.dr-check { width: 20px; height: 20px; }
.dr-reason { margin: 6px 0; }
.dr-iso-link { text-decoration: none; }
.dr-map-link { margin-left: 6px; font-size: 12px; }
.dr-clock { font-variant-numeric: tabular-nums; }
.dr-tl-time { display: inline-block; min-width: 3.4em; font-weight: 700; font-variant-numeric: tabular-nums; }
.dr-tl-label { overflow-wrap: anywhere; }
.report-timeline-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.report-timeline-list li form { margin: 0 0 0 auto; }
.dr-comment-meta { margin: 0 0 2px; }
.dr-comment-form { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.dr-comment-form .form-control { flex: 1; min-width: 0; }
.dr-pending { margin-bottom: 8px; }
.dr-people { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dr-person { display: inline-flex; flex-direction: column; padding: 4px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 13.5px; }
.dr-person small { color: var(--color-text-muted); font-size: 11.5px; }
.dr-fix-list .btn { flex: 0 0 auto; }
.dr-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dr-cal-head { padding: 2px 0; text-align: center; font-size: 12px; color: var(--color-text-muted); }
.dr-cal-day { display: flex; flex-direction: column; justify-content: space-between; min-height: 64px; padding: 6px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); font-size: 12px; }
a.dr-cal-day:hover { border-color: var(--color-primary); text-decoration: none; }
.dr-cal-blank { border: 0; background: transparent; }
.dr-cal-num { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dr-cal-mark { font-size: 11.5px; font-weight: 600; }
.dr-cal-off { background: var(--color-surface-muted); color: var(--color-text-muted); }
.dr-cal-today { box-shadow: inset 0 0 0 2px var(--color-primary); }
.dr-st-approved { background: var(--color-success-light); border-color: transparent; }
.dr-st-approved .dr-cal-mark { color: var(--color-success-dark); }
.dr-st-pending { background: var(--color-warning-light); border-color: transparent; }
.dr-st-pending .dr-cal-mark { color: var(--color-warning-dark); }
.dr-st-rejected, .dr-st-missing { background: var(--color-danger-light); border-color: transparent; }
.dr-st-rejected .dr-cal-mark, .dr-st-missing .dr-cal-mark { color: var(--color-danger-dark); }
.dr-st-other { background: var(--color-primary-light); border-color: transparent; }
.dr-st-other .dr-cal-mark { color: var(--color-primary-dark); }
.dr-st-draft { border-style: dashed; }
.dr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; font-size: 12px; color: var(--color-text-muted); }
.dr-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dr-swatch { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--color-border); border-radius: 3px; }
.dr-table-wrap { overflow-x: auto; }
.dr-table { width: 100%; border-collapse: collapse; }
.dr-table th, .dr-table td { padding: 8px 10px; border-bottom: 1px solid var(--color-border); text-align: left; white-space: nowrap; vertical-align: top; }
.dr-table .dr-wrap { white-space: normal; min-width: 12em; }
.dr-num { text-align: right; font-variant-numeric: tabular-nums; }
.dr-trend { max-width: 420px; }
.dr-spark { display: block; width: 100%; height: auto; }
.dr-spark-base { stroke: var(--color-border); stroke-width: 1; }
.dr-spark-area { fill: var(--color-primary-light); }
.dr-spark-line { fill: none; stroke: var(--color-primary); stroke-width: 2; stroke-linejoin: round; }
.dr-spark-dot { fill: var(--color-primary); }
.dr-trend-labels { display: flex; justify-content: space-between; max-width: 420px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 11.5px; color: var(--color-text-muted); }
.dr-trend-labels li { display: flex; flex-direction: column; align-items: center; }
.dr-trend-labels strong { color: var(--color-text); font-variant-numeric: tabular-nums; }
.dr-insights { margin: 0; padding-left: 20px; }
.dr-insights li { margin-bottom: 6px; }
.dr-m .btn, .dr-m .form-control { min-height: 44px; }
.dr-m .form-control { font-size: 16px; }
.dr-m-head .page-title { margin: 0; }
.dr-m-state { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dr-m-badge { font-size: 14px; padding: 4px 12px; }
.dr-m-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 0 0 12px; }
.dr-m-times > div { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.dr-m-times strong { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.dr-m-times .dr-m-break-cell strong { font-size: 18px; }
.dr-m-break { max-width: 140px; }
.dr-m-primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin: 4px 0; font-size: 18px; font-weight: 700; }
.dr-m-secondary { display: block; width: 100%; margin-top: 6px; }
.dr-m-status { min-height: 1.2em; margin: 6px 0 0; font-size: 13px; font-weight: 600; }
.dr-m-geo { margin: 6px 0 0; font-size: 12.5px; color: var(--color-text-muted); }
.dr-m-geo.is-warn { color: var(--color-warning-dark); }
.dr-m-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.dr-m-chip { min-height: 44px; padding: 0 14px; }
.dr-m-timeline li { min-height: 44px; }
.dr-m-add { display: flex; gap: 8px; margin-bottom: 10px; }
.dr-m-add .form-control { flex: 1; min-width: 0; }
.dr-m-add-form label { display: block; font-weight: 600; margin-top: 8px; }
.dr-m-foot { margin: 16px 0; text-align: center; }
@media (max-width: 600px) { .dr-cal-day { min-height: 48px; padding: 4px; } .dr-cal-mark { font-size: 10px; } .dr-times { grid-template-columns: 1fr 1fr; } .rf-reject .form-control { width: 100%; } }

.sc-run { display: grid; gap: 10px; }
.sc-run-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.sc-run-head h2 { margin: 0; font-size: 16px; }
.sc-meters { display: grid; gap: 6px; max-width: 520px; }
.sc-meter-row { display: grid; grid-template-columns: 3em minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.sc-meter-row .pg-meter { max-width: none; margin-top: 0; }
.sc-run-next { margin: 0; font-size: 13.5px; }
.sc-run-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sc-run-actions form { margin: 0; }
.sc-run-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sc-run-step { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.sc-run-step.is-now { border-color: var(--color-primary); background: var(--color-primary-light); }
.sc-run-step.is-done .sc-run-step-k { color: var(--color-success-dark); }
.sc-run-step-k { font-size: 12px; color: var(--color-text-muted); }
.sc-run-step-v { font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.sc-flag { display: inline-block; margin: 2px 0 0 4px; padding: 0 6px; font-size: 11px; font-weight: 700; line-height: 1.6; white-space: nowrap; border-radius: 3px; background: var(--color-warning-light); color: var(--color-warning-dark); }
.sc-flags .sc-flag, .sc-check-items .sc-flag { margin-left: 0; }
.sc-flag-info { background: var(--color-accent-light); color: var(--color-accent-dark); }
.sc-check-table td { vertical-align: top; }
.sc-check-items { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.sc-form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
@media (max-width: 640px) { .sc-meter-row { grid-template-columns: 3em minmax(0, 1fr); } .sc-meter-row .sc-num { grid-column: 2; } }

.ws-page .ws-h2 { margin: 0 0 8px; font-size: 16px; }
.ws-section-title { margin: 20px 0 4px; font-size: 17px; }
.ws-note-tight { margin-top: 0; }
.ws-meta-line { margin: 2px 0 0; }
.ws-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ws-nowrap { white-space: nowrap; }
.ws-ops { white-space: nowrap; }
.ws-up { color: var(--color-success-dark); font-weight: 700; }
.ws-down { color: var(--color-danger-dark); font-weight: 700; }
.ws-hint { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.ws-label { display: block; font-weight: 600; margin-bottom: 4px; }
.ws-list { margin: 4px 0; padding-left: 20px; }
.ws-table-wrap { overflow-x: auto; }
.ws-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.ws-jump a { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); font-size: 13px; text-decoration: none; }
.ws-jump a:hover { border-color: var(--color-primary); }
.ws-jump-sub { font-size: 11.5px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ws-table-card { scroll-margin-top: 12px; }
.ws-table-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; margin-bottom: 10px; }
.ws-table-title { margin: 0; font-size: 15px; }
.ws-table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-grid-wrap { overflow: auto; max-height: 460px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.ws-grid { font-size: 12.5px; font-variant-numeric: tabular-nums; border-collapse: separate; border-spacing: 0; }
.ws-grid th, .ws-grid td { padding: 3px 8px; white-space: nowrap; }
.ws-grid thead th { position: sticky; top: 0; z-index: 1; background: var(--color-surface-muted); }
.ws-grid tbody th { position: sticky; left: 0; background: var(--color-surface); text-align: left; }
.ws-grid .ws-grid-corner { left: 0; z-index: 2; }
.ws-grid tbody tr:hover td, .ws-grid tbody tr:hover th { background: var(--color-primary-light); }
.ws-empty { color: var(--color-text-muted); text-align: center; }
.ws-diff { background: var(--color-warning-light); font-weight: 700; }
.ws-steps { margin: 4px 0 10px; padding-left: 22px; font-size: 13.5px; line-height: 1.7; }
.ws-csv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 8px 0; }
.ws-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.ws-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ws-errors { white-space: pre-wrap; margin: 8px 0 0; font-size: 12.5px; font-family: inherit; }
.ws-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 12px 0 0; }
.ws-savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 12px 0; }
.ws-row-changed td { background: var(--color-warning-light); }
.ws-row-unmatched td { background: var(--color-danger-light); }
.ws-row-muted td { color: var(--color-text-muted); }
.ws-row-attn td { background: var(--color-warning-light); }
.ws-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0 0 12px; }
.ws-filter .form-group { margin-bottom: 0; min-width: 160px; }
.ws-filter .ws-filter-button { min-width: 0; }
.ws-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.ws-inline-form .form-control { width: auto; }
.ws-matrix-count th, .ws-matrix-count td { background: var(--color-surface-muted); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.ws-matrix-count .ws-matrix-count-label { position: sticky; left: 0; z-index: 1; text-align: left; }
.ws-bd-head { margin: 16px 0 4px; font-size: 14px; }
.ws-bd-gap { margin-top: 12px; }
.ws-member-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 12px; }
.ws-calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.ws-fieldset-gap { margin-bottom: 12px; }
.ws-overview th { white-space: nowrap; }
.ws-sort { color: inherit; text-decoration: none; }
.ws-sort:hover { color: var(--color-primary); text-decoration: underline; }
.ws-sort.is-active { color: var(--color-primary-dark); }
.ws-total-row th, .ws-total-row td { border-top: 2px solid var(--color-border-strong); font-weight: 700; background: var(--color-surface-muted); }
@media print { .ws-page .sales-head-actions, .ws-page .pg-back, .ws-page details.collapsible-card, .ws-jump, .ws-table-actions, .ws-print-hide, .ws-member-nav { display: none; } .ws-grid-wrap { max-height: none; overflow: visible; } }

.bc-hint { margin: 6px 0 0; }
.bc-sub { display: block; font-size: 12px; font-weight: 400; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.bc-muted { color: var(--color-text-muted); }
.bc-card-title { margin: 0; }
.bc-table-wrap { overflow-x: auto; }
.bc-table { width: 100%; }
.bc-table th[scope="row"] { font-weight: 600; text-align: left; }
.bc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bc-inline-form { display: inline-flex; margin: 0; }
.bc-narrow { max-width: 120px; }
.bc-wide { flex: 2; }
.bc-select-md { max-width: 360px; }
.bc-select-sm { width: auto; }
.bc-wrap { flex-wrap: wrap; }
.bc-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; }
.bc-step { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 13px; color: var(--color-text-muted); background: var(--color-surface); }
.bc-step-no { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; background: var(--color-surface-muted); }
.bc-step.is-done { color: var(--color-success-dark); border-color: var(--color-success-light); }
.bc-step.is-done .bc-step-no { background: var(--color-success-light); }
.bc-step.is-current { color: var(--color-text); border-color: var(--color-primary); font-weight: 700; }
.bc-step.is-current .bc-step-no { background: var(--color-primary); color: #fff; }
.bc-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; border-left: 4px solid var(--color-primary); }
.bc-next-text strong { font-size: 16px; }
.bc-readiness.is-pending { border-left: 4px solid var(--color-warning); }
.bc-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.bc-check-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; }
.bc-check-col { width: 32px; text-align: center; }
.bc-issues { margin: 4px 0 0; padding-left: 1.1em; font-size: 12px; color: var(--color-warning-dark); }
.bc-next-cell { display: block; margin-bottom: 4px; font-size: 12px; color: var(--color-text-muted); }
.bc-members th, .bc-members td { white-space: nowrap; }
.bc-statement-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 0 12px; margin-bottom: 8px; border-bottom: 2px solid var(--color-border); }
.bc-statement-total strong { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bc-print-head { margin-bottom: 16px; }
.bc-total-row th, .bc-total-row td { font-weight: 700; background: var(--color-surface-muted); }
.bc-ledger { font-size: 13px; }
.bc-ledger th, .bc-ledger td { padding: 5px 8px; white-space: nowrap; }
.bc-ledger-item { position: sticky; left: 0; z-index: 1; min-width: 12em; text-align: left; background: var(--color-surface); }
.bc-ledger-group { display: inline-block; min-width: 2.5em; margin-right: 6px; font-size: 11px; color: var(--color-text-muted); }
.bc-ledger-empty { color: var(--color-text-muted); text-align: center; }
.bc-ledger-period { font-size: 12px; text-align: center; }
.bc-ledger-total { background: var(--color-surface-muted); font-weight: 700; }
.bc-ledger-strong > th, .bc-ledger-strong > td { background: var(--color-surface-muted); }
.bc-group-start > th, .bc-group-start > td { border-top: 2px solid var(--color-border-strong); }
.bc-row-edit > summary { display: inline-block; list-style: none; cursor: pointer; }
.bc-row-edit > summary::-webkit-details-marker { display: none; }
.bc-row-edit[open] > summary { margin-bottom: 8px; }
.bc-row-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.bc-row-form .form-group { margin: 0; }
.bc-row-saved > th, .bc-row-saved > td { background: var(--color-success-light); }
.bc-row-current > th, .bc-row-current > td { background: var(--color-primary-light); }
.bc-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-entry-form { align-items: flex-end; }
.bc-form-submit { flex: 0; }
@media print {
  .bc-no-print, .bc-bulk, .bc-check-col, .bc-row-edit { display: none !important; }
  .bc-table-wrap { overflow: visible; }
  .bc-ledger { font-size: 9px; }
  .bc-ledger th, .bc-ledger td { padding: 2px 3px; }
  .bc-ledger-item { position: static; }
}

.ar-toolbar { padding-block: 12px; }
.ar-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ar-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.ar-presets-label { font-size: 12px; font-weight: 700; color: var(--color-text-muted); margin-right: 2px; }
.ar-shift { display: inline-flex; gap: 6px; margin-left: 6px; }
.ar-toolbar-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-toolbar-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-top: 10px; }
.ar-toolbar-form .form-group { margin: 0; min-width: 150px; }
.ar-toolbar-form .ar-grow { flex: 1 1 260px; }
.ar-toolbar-form label { font-size: 12px; color: var(--color-text-muted); }
.ar-toolbar-form .ar-toolbar-submit { min-width: 0; }
.ar-toolbar-hint { margin: 8px 0 0; }
.ar-period-tag { align-self: center; min-width: 9.5em; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--color-surface-muted); color: var(--color-text-muted); }
.ar-period-tag.is-b { background: var(--color-primary-light); color: var(--color-primary-dark); }
.ar-report-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 10px; font-size: 17px; }
.ar-report-sub { font-size: 12.5px; font-weight: 400; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ar-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; }
.ar-check { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.ar-check.is-ok { background: var(--color-success-light); color: var(--color-success-dark); }
.ar-check.is-ng { background: var(--color-danger-light); color: var(--color-danger-dark); }
.ar-table-wrap { overflow: auto; max-height: min(75vh, 900px); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.ar-table-wrap.is-free { max-height: none; }
.ar-table { font-size: 14px; }
.ar-table th, .ar-table td { padding: 7px 10px; }
.ar-table thead { position: sticky; top: 0; z-index: 2; }
.ar-table thead th { background: var(--color-bg); box-shadow: inset 0 -1px 0 var(--color-border-strong); white-space: nowrap; vertical-align: bottom; }
.ar-table .num-cell { white-space: nowrap; }
.ar-th-group { text-align: center; }
.ar-th-sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--color-text-muted); }
.ar-wide .ar-sticky-col { position: sticky; left: 0; z-index: 1; min-width: 11em; background: var(--color-surface); }
.ar-wide thead .ar-sticky-col { z-index: 3; background: var(--color-bg); }
.ar-group-row td { background: var(--color-surface-muted); font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); }
.ar-section-row td { font-weight: 800; border-top: 2px solid var(--color-border-strong); }
.ar-group-line td { font-weight: 600; }
.ar-subtotal td { font-weight: 700; border-top: 1px solid var(--color-border-strong); }
.ar-subtotal-strong td { background: var(--color-surface-muted); }
.ar-total td { font-weight: 800; background: var(--color-primary-light); border-top: 2px solid var(--color-border-strong); border-bottom: 2px solid var(--color-border-strong); }
.ar-opening td { background: var(--color-surface-muted); color: var(--color-text-muted); }
.ar-table td.ar-indent { padding-left: 1.8em; }
.ar-strong { font-weight: 700; }
.ar-code, .ar-date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.ar-entry-no { font-size: 11.5px; color: var(--color-text-muted); white-space: nowrap; }
.ar-drill { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.ar-drill:hover { color: var(--color-primary-dark); text-decoration: underline; }
.ar-neg { color: var(--color-danger-dark); }
.ar-diff { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ar-diff.is-good { color: var(--color-success-dark); }
.ar-diff.is-bad { color: var(--color-danger-dark); }
.ar-diff.is-up, .ar-diff.is-down, .ar-diff.is-flat { color: var(--color-text); }
.ar-spark { display: inline-block; vertical-align: middle; overflow: visible; }
.ar-spark-line { fill: none; stroke: var(--color-primary); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.ar-spark-zero { stroke: var(--color-border-strong); stroke-width: 1; stroke-dasharray: 2 2; }
.ar-spark-dot { fill: var(--color-primary-dark); }
.ar-spark-cell { width: 104px; }
.sales-kpi-sub .ar-spark { display: block; margin-top: 4px; }
.ar-bs, .ar-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ar-bs .ar-table { border: 1px solid var(--color-border); }
.ar-pl td:first-child { width: 60%; }
.ar-neighbors { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-related { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 4px 0 16px; font-size: 13.5px; }
.ar-caption { caption-side: top; text-align: left; padding: 4px 0; font-size: 12.5px; color: var(--color-text-muted); }
@media (max-width: 800px) { .ar-bs, .ar-two-col { grid-template-columns: 1fr; } }
@media print {
  .ar-toolbar, .ar-related, .ar-neighbors { display: none !important; }
  .card.ar-report { page-break-inside: auto; }
  .ar-table-wrap { max-height: none; overflow: visible; border: 0; }
  .ar-table thead { position: static; display: table-header-group; }
  .ar-wide .ar-sticky-col { position: static; }
  .ar-table { font-size: 10.5pt; }
  .ar-table th, .ar-table td { padding: 3px 6px; }
  .ar-table tr { page-break-inside: avoid; }
  .ar-bs { grid-template-columns: 1fr 1fr; }
  .ar-total td { background: #eef3f8; }
  .ar-drill { text-decoration: none; }
  .ar-neg, .ar-diff.is-bad { color: #b00020; }
  .ar-diff.is-good { color: #15803d; }
}

.ac-grow { flex: 2; }
.ac-lines-wrap, .ac-table-wrap { overflow-x: auto; }
.ac-lines th, .ac-lines td, .ac-table td { vertical-align: top; }
.ac-table th { white-space: nowrap; }
.ac-account { min-width: 12em; }
.ac-amount { width: 8.5em; text-align: right; font-variant-numeric: tabular-nums; }
.ac-balance { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 10px 0; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); font-size: 13.5px; }
.ac-balance strong { font-variant-numeric: tabular-nums; }
.ac-balance.is-ok { border-color: var(--color-success); background: var(--color-success-light); }
.ac-balance.is-off { border-color: var(--color-warning); background: var(--color-warning-light); }
.ac-balance-state { font-weight: 700; }
.ac-line-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.ac-form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.ac-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 0 0 12px; }
.ac-filter .form-group { margin: 0; }
.ac-filter .form-control { width: auto; min-width: 8em; }
.ac-filter .ac-grow { flex: 2 1 14em; min-width: min(100%, 14em); }
.ac-filter .ac-grow .form-control { width: 100%; }
.ac-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ac-nowrap { white-space: nowrap; }
.ac-sub { display: block; font-size: 12px; color: var(--color-text-muted); }
.ac-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ac-actions form, .ac-inline-form { display: inline; margin: 0; }
.ac-row-draft > td:first-child { box-shadow: inset 3px 0 0 var(--color-warning); }
.ac-row-current td { font-weight: 700; }
.ac-table tfoot td { font-weight: 700; border-top: 2px solid var(--color-border-strong); }
.ac-issue { color: var(--color-danger-dark); font-weight: 600; }
.ac-ok { color: var(--color-success-dark); font-weight: 600; }
.ac-muted { color: var(--color-text-muted); }
.ac-neg { color: var(--color-danger-dark); }
.ac-section-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0 0 10px; }
.ac-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.ac-steps li { padding: 4px 12px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 13px; color: var(--color-text-muted); }
.ac-steps li.is-current { border-color: var(--color-primary); color: var(--color-primary-dark); font-weight: 700; }
.ac-steps li.is-done { border-color: var(--color-success); color: var(--color-success-dark); }
.ac-check { display: flex; align-items: center; gap: 6px; font-weight: normal; }
.ac-fieldset { margin: 0 0 12px; padding: 8px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.ac-h3 { margin: 16px 0 6px; font-size: 14px; }
.ac-more > summary { cursor: pointer; color: var(--color-primary-dark); }
.ac-mini { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.ac-mini li { white-space: nowrap; }
.ac-jump { margin: 0 0 14px; }
.ac-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }

.tx-form-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.tx-form-nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tx-form-nav-label { font-size: 11.5px; font-weight: 700; color: var(--color-text-muted); white-space: nowrap; }
.tx-period-bar { padding: 8px 0; border-bottom: 1px dashed var(--color-border); }
.tx-period-now, .tx-period-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.tx-links { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius); background: var(--color-surface-muted); }
.tx-links .sales-facts dd { font-size: 13.5px; font-weight: 500; }
.tx-how { margin-left: 2px; font-size: 12px; font-weight: 400; color: var(--color-text-muted); }
.tx-src, .tx-feed { margin-left: 4px; font-size: 11px; font-weight: 600; vertical-align: middle; white-space: nowrap; }
.tx-feed-manual { border: 1px dashed currentColor; }
.tx-feeds-row > td { background: var(--color-primary-light); }
.tx-step h2 { margin-bottom: 4px; }
.tx-step-lead { margin: 0 0 10px; }
.tx-check-table td { vertical-align: top; }
.tx-check-links { font-size: 12px; line-height: 1.9; }
.tx-row-optional > td { color: var(--color-text-muted); }
.tx-notices h2 { margin-bottom: 10px; }
.tx-alert-text { color: var(--color-warning-dark); }
.tx-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tx-ratio-cell .pg-meter { margin-left: auto; }
.tx-danger-card { border-color: var(--color-danger-light); }
.tx-danger-card h2 { color: var(--color-danger-dark); }
@media (max-width: 640px) { .tx-form-nav { padding: 8px; } .tx-form-nav-group { width: 100%; } }
@media print {
  .tx-noprint, .tx-page .pg-back, .tx-page .sales-head-actions, .tx-page details.collapsible-card, .tx-src, .tx-feed, .tx-links { display: none !important; }
  .tx-feeds-row > td { background: none; }
  .tx-page .sales-kpi { border: 1px solid #999; background: #fff; }
}

.sales-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-bottom: var(--head-gap, 16px); }
.sales-head .page-title { margin: 0 0 4px; text-wrap: balance; }
.sales-lead { margin: 0; max-width: 72ch; font-size: 13.5px; line-height: 1.6; color: var(--color-text-muted); }
.sales-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sales-form-card > summary { color: var(--color-primary-dark); }
.sales-form-card[open] { border-color: var(--color-border-strong); }

.sales-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.sales-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--color-border-strong); color: var(--color-text); background: var(--color-surface);
}
.sales-chip:hover { border-color: var(--color-primary); text-decoration: none; }
.sales-chip.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.sales-chip-count {
  min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-align: center;
  background: var(--color-surface-muted); color: var(--color-text-muted); font-variant-numeric: tabular-nums;
}
.sales-chip.active .sales-chip-count { background: #fff; color: var(--color-primary-dark); }

.sales-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.sales-toolbar .form-group { margin: 0; min-width: 160px; }
.sales-toolbar .form-group.grow { flex: 1 1 220px; }
.sales-toolbar label { font-size: 12px; color: var(--color-text-muted); }

.sales-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 18px; margin: 0; }
.sales-facts dt { font-size: 12px; color: var(--color-text-muted); margin-bottom: 2px; }
.sales-facts dd { margin: 0; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

.sales-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--color-border); }

.sales-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: var(--block-gap, 16px); }
.sales-kpi {
  display: block; padding: 12px 14px; border-radius: var(--radius); background: var(--color-surface);
  border: 1px solid var(--color-border); color: var(--color-text);
}
a.sales-kpi:hover { border-color: var(--color-primary); text-decoration: none; }
.sales-kpi-label { font-size: 12.5px; color: var(--color-text-muted); }
.sales-kpi-value { font-size: 22px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.sales-kpi-sub { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.sales-kpi.is-alert { border-color: #f3c38b; background: var(--color-warning-light); }

.sales-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sales-quick a {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius-btn);
  background: var(--color-surface); border: 1px solid var(--color-border-strong); color: var(--color-text); font-size: 13.5px;
}
.sales-quick a:hover { border-color: var(--color-primary); color: var(--color-primary-dark); text-decoration: none; }
.sales-quick a.primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.sales-home-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--block-gap, 16px); align-items: start; margin-bottom: var(--block-gap, 16px); }
@media (max-width: 960px) { .sales-home-grid { grid-template-columns: 1fr; } }
.sales-home-grid > .card { margin-bottom: 0; }

.sales-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 8px; flex-wrap: wrap; margin: 0 0 10px; }
.sales-section-title h2, .sales-section-title h3 { margin: 0; font-size: 16px; }
.sales-section-title a { font-size: 13px; white-space: nowrap; }

.sales-group-label { margin: 14px 0 6px; font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); letter-spacing: 0.04em; }
.sales-group-label:first-child { margin-top: 0; }
.sales-list { list-style: none; margin: 0; padding: 0; }
.sales-list li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--color-surface-muted); }
.sales-list li:last-child { border-bottom: 0; }
.sales-list .when { flex: 0 0 auto; min-width: 84px; font-size: 12.5px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.sales-list .what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sales-list .meta { display: block; font-size: 12px; color: var(--color-text-muted); }
.sales-empty { margin: 4px 0; font-size: 13px; color: var(--color-text-muted); }

.sales-feed { list-style: none; margin: 0; padding: 0; }
.sales-feed-day { margin: 14px 0 4px; font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); }
.sales-feed-day:first-child { margin-top: 0; }
.sales-feed-item { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--color-surface-muted); }
.sales-feed-item:last-child { border-bottom: 0; }
.sales-feed-icon {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 16px;
  background: var(--color-surface-muted);
}
.sales-feed-text { overflow-wrap: anywhere; }
.sales-feed-meta { font-size: 12px; color: var(--color-text-muted); margin-top: 1px; }
.sales-feed-detail { font-size: 13px; color: var(--color-text-muted); margin-top: 3px; white-space: pre-wrap; }

.sales-post { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--color-accent-light); margin-bottom: 8px; }
.sales-post:target { outline: 2px solid var(--color-accent); }
.sales-post-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--color-accent-dark); }
.sales-post-body { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sales-post form { display: inline; }
.sales-link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--color-accent-dark); text-decoration: underline; cursor: pointer; }
.sales-share-form textarea { min-height: 70px; }
.sales-share-form .form-row { align-items: flex-end; }

.sales-tile-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 18px; }
.sales-tile-group h3 { margin: 0 0 8px; font-size: 13.5px; color: var(--color-text-muted); }
.sales-tile-group .module-home-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 0; }
.sales-tile-group .module-home-tile { padding: 10px 14px; }
.sales-tile-group .module-home-tile-icon { font-size: 20px; }

.sales-table-wrap { overflow-x: auto; }
.sales-table-wrap table { min-width: 640px; }
.sales-table-wrap td { vertical-align: top; }
.sales-sub { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.sales-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.sales-row-alert td { background: #fff8ee; }

.sales-view-toggle { display: inline-flex; border: 1px solid var(--color-border-strong); border-radius: var(--radius-btn); overflow: hidden; }
.sales-view-toggle a { padding: 6px 12px; font-size: 13px; color: var(--color-text); }
.sales-view-toggle a + a { border-left: 1px solid var(--color-border-strong); }
.sales-view-toggle a.active { background: var(--color-primary); color: #fff; }
.sales-view-toggle a:hover { text-decoration: none; }

.sales-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.sales-board-col { background: var(--color-surface-muted); border-radius: var(--radius); padding: 10px; min-width: 220px; }
.sales-board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.sales-board-head strong { font-size: 14px; }
.sales-board-sum { font-size: 12px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.sales-board-card {
  display: block; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 9px 10px; margin-bottom: 8px; color: var(--color-text);
}
.sales-board-card:hover { border-color: var(--color-primary); text-decoration: none; }
.sales-board-card .title { font-weight: 700; display: block; overflow-wrap: anywhere; }
.sales-board-card .amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.sales-board-more { font-size: 12px; color: var(--color-text-muted); margin: 4px 2px 0; }

.sales-stepper { display: flex; flex-wrap: wrap; gap: 6px; }
.sales-stepper form { display: inline; }
.sales-stepper button {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--color-border-strong); background: var(--color-surface);
  color: var(--color-text); font-size: 13px; cursor: pointer;
}
.sales-stepper button:hover { border-color: var(--color-primary); }
.sales-stepper button[aria-pressed="true"] { background: var(--color-primary); border-color: var(--color-primary); color: #fff; cursor: default; }

.sales-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sales-bizcard {
  display: block; padding: 14px 16px; border-radius: var(--radius); background: var(--color-surface);
  border: 1px solid var(--color-border); color: var(--color-text); box-shadow: var(--shadow-card);
}
.sales-bizcard:hover { border-color: var(--color-primary); text-decoration: none; }
.sales-bizcard .company { font-size: 12px; color: var(--color-text-muted); overflow-wrap: anywhere; }
.sales-bizcard .name { font-size: 17px; font-weight: 800; margin: 2px 0; }
.sales-bizcard .role { font-size: 12.5px; color: var(--color-text-muted); }
.sales-bizcard .contact { margin-top: 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.sales-filter-note {
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 8px 12px; margin-bottom: 12px;
  border-radius: var(--radius-sm); background: var(--color-warning-light); color: var(--color-warning-dark); font-size: 13.5px;
}

.cc-lines-input td { padding: 4px; }
.cc-lines-input .form-control { min-width: 0; padding: 5px 8px; font-size: 13px; }
.cc-num-input { text-align: right; width: 7.5em; font-variant-numeric: tabular-nums; }
.cc-lines { margin-top: 4px; }
.cc-lines > summary { cursor: pointer; font-size: 12px; color: var(--color-accent-dark); }
.cc-lines .cc-table { margin-top: 6px; font-size: 12.5px; }

.rf-sheet { --rf-accent: var(--color-primary); --rf-soft: var(--color-primary-light); border-top: 4px solid var(--rf-accent); }
.rf-report { --rf-accent: var(--color-primary); --rf-soft: var(--color-primary-light); }
.rf-sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.rf-sheet-head h3 { margin: 0; }
.rf-day-form { display: flex; align-items: center; gap: 6px; margin: 0; }
.rf-day-form .form-control { width: auto; }
.rf-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.rf-fields { display: grid; grid-template-columns: 1fr; gap: 14px 20px; }
.rf-fields.rf-double { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .rf-fields.rf-double { grid-template-columns: 1fr; } }
.rf-field { margin: 0; min-width: 0; }
.rf-field.rf-wide { grid-column: 1 / -1; }
.rf-field > label, .rf-label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.rf-req { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--rf-soft); color: var(--rf-accent); vertical-align: 1px; }
.rf-help { margin: 4px 0 0; font-size: 12px; color: var(--color-text-muted); }
.rf-unit { display: flex; align-items: center; gap: 6px; }
.rf-unit .form-control { max-width: 10em; text-align: right; font-variant-numeric: tabular-nums; }
.rf-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.rf-checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; font-size: 14px; }
.rf-submit { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.rf-values { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 20px; margin: 10px 0; }
.rf-values .rf-wide { grid-column: 1 / -1; }
.rf-values dt { font-size: 12px; color: var(--color-text-muted); }
.rf-values dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rf-tag { display: inline-block; padding: 1px 9px; margin: 0 4px 4px 0; border-radius: 999px; background: var(--rf-soft); color: var(--rf-accent); font-size: 12.5px; }
.rf-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.rf-actions form { margin: 0; }
.rf-reject { display: inline-flex; gap: 6px; align-items: center; }
.rf-reject .form-control { width: 14em; padding: 4px 8px; font-size: 13px; }
.rf-comments { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--color-border); }
.rf-comments > summary { cursor: pointer; font-size: 13px; color: var(--color-text-muted); }
.rf-block-title { margin: 12px 0 4px; font-size: 13px; font-weight: 700; color: var(--color-text-muted); }
.rf-form-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rf-form-card {
  --rf-accent: var(--color-primary); --rf-soft: var(--color-primary-light);
  display: block; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--color-border);
  border-top: 4px solid var(--rf-accent); background: var(--color-surface); color: var(--color-text);
}
a.rf-form-card:hover { border-color: var(--rf-accent); text-decoration: none; }
.rf-form-card .rf-icon { font-size: 26px; line-height: 1; }
.rf-form-card h3 { margin: 6px 0 2px; font-size: 16px; }
.rf-form-card p { margin: 6px 0 0; font-size: 12.5px; color: var(--color-text-muted); }
.rf-swatches { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.rp-card { display: flex; flex-direction: column; }
.rp-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rp-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.rp-flow li { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 12px; background: var(--color-surface-alt, var(--color-surface)); }
.rp-flow strong { display: block; margin-bottom: 4px; }
.rp-flow span { font-size: 12.5px; color: var(--color-text-muted); }
.rp-people { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rp-person { font-weight: 400; display: inline-flex; align-items: center; gap: 6px; }
.rp-field-list { margin: 0; padding-left: 1.2em; }
.rp-field-list li { margin-bottom: 4px; }
.rp-field-list .file-meta { margin-left: 8px; }
.rp-waiting { display: flex; flex-wrap: wrap; gap: 6px; }
.wv-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.wv-summary > div { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.wv-summary strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.wv-summary .wv-bad, .wv-bad { color: var(--color-danger, #c0392b); }
.wv-summary .wv-warn, .wv-warn { color: var(--color-warning, #b26a00); }
.wv-summary > div.wv-bad { border-color: var(--color-danger, #c0392b); }
.wv-summary > div.wv-warn { border-color: var(--color-warning, #b26a00); }
.wv-table td { vertical-align: top; }
.wv-row-expired td { background: var(--color-danger-light, #fdecea); }
.wv-kind { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; margin: 0 4px 4px 0; color: #fff; white-space: nowrap; }
.wv-kind-collect { background: #2f6fb5; }
.wv-kind-intermediate { background: #0d9488; }
.wv-kind-final { background: #7c5cbf; }
.wv-common { margin-left: 6px; font-size: 11px; color: var(--color-text-muted); }
.wv-types { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 8px 12px; margin: 0 0 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 12px; }
.wv-types legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.wv-types label { font-weight: 400; display: flex; align-items: flex-start; gap: 6px; }
.wv-permit { border-left: 4px solid var(--color-primary); }
.wv-permit-form .form-row { align-items: flex-start; }
.wc-form .form-row, .wv-permit-form .form-row { flex-wrap: wrap; }
.wc-form .form-row > .form-group, .wv-permit-form .form-row > .form-group { min-width: 11em; }
.wc-row h3 { margin: 0; font-size: 16px; }
.wc-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wc-check li { display: flex; gap: 8px; align-items: flex-start; }
.wc-check .wc-mark { flex: 0 0 1.4em; text-align: center; font-weight: 700; border-radius: 4px; }
.wc-check .wc-ok .wc-mark, .wc-check li.wc-ok .wc-mark { color: var(--color-success, #1b7f3b); }
.wc-check li.wc-ng .wc-mark { color: var(--color-danger, #c0392b); }
.wc-check li.wc-ng { color: var(--color-danger, #c0392b); }
.wc-check li.wc-ng .file-meta { color: inherit; }

.wv-rules { margin: 0; padding-left: 1.2em; }
.wv-rules li { margin-bottom: 8px; }
.pb-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pb-flow li { border: 1px solid var(--color-border); border-left: 4px solid var(--color-border); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.pb-flow .pb-flow-icon { font-size: 20px; line-height: 1; }
.pb-flow .pb-flow-label { font-weight: 600; }
.pb-flow li.pb-flow-done { border-left-color: var(--color-success, #1b7f3b); }
.pb-flow li.pb-flow-done .pb-flow-label::after { content: "　済み"; font-weight: 400; font-size: 12px; color: var(--color-success, #1b7f3b); }
.pb-flow li.pb-flow-current { border-left-color: var(--color-primary); background: var(--color-primary-light, #eef4fd); }
.pb-flow li.pb-flow-current .pb-flow-label::after { content: "　いまここ"; font-weight: 400; font-size: 12px; color: var(--color-primary-dark, #1f4b93); }
.pb-flow li.pb-flow-todo { opacity: .72; }
.pb-flow li.pb-flow-stopped { opacity: .45; }
.pb-table td { vertical-align: top; }
.bq-trades { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.bq-trade { display: grid; grid-template-columns: 1fr 4.5em 5.5em; gap: 6px; align-items: center; }
.bq-trade .bq-trade-name { font-size: 13px; }
.bq-trade .form-control { padding: 4px 6px; font-size: 13px; }
.bq-bids { margin: 0; padding-left: 1.2em; }
.bq-bids li { margin-bottom: 4px; }




.rf-swatches label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.rf-swatches i { display: inline-block; width: 18px; height: 18px; border-radius: 50%; }
.rf-group-list { display: flex; flex-direction: column; gap: 4px; }
.rf-group-list label { font-weight: 400; }
.rf-check-line { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.rf-editor td { vertical-align: top; padding: 4px; }
.rf-editor .form-control { font-size: 13px; padding: 5px 8px; }
.sr-meetings { margin: 10px 0; }
.sr-meetings .sales-list form { margin: 0; }
.sr-add, .sr-links { margin: 12px 0; }
.sr-add > summary, .sr-links > summary { cursor: pointer; font-weight: 600; color: var(--color-primary-dark); }
.sr-add form { margin-top: 10px; }
.sr-submit { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--color-border); }
.sales-list li form { margin: 0; }

.hr-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; }
.hr-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--color-surface-muted); color: var(--color-text-muted); font-size: 13px; }
.hr-steps li.done { background: var(--color-success-light); color: var(--color-success-dark); }
.hr-steps li.current { background: var(--color-primary); color: #fff; font-weight: 700; }
.hr-step-no { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); color: inherit; font-size: 11.5px; font-weight: 700; }
.hr-steps li.current .hr-step-no { background: rgba(255, 255, 255, 0.25); }
.hr-rating { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px; font-weight: 800; font-size: 13px; }
.hr-rating-S { background: #fde7c8; color: #92400e; }
.hr-rating-A { background: var(--color-success-light); color: var(--color-success-dark); }
.hr-rating-B { background: var(--color-primary-light); color: var(--color-primary-dark); }
.hr-rating-C { background: var(--color-warning-light); color: var(--color-warning-dark); }
.hr-rating-D { background: var(--color-danger-light); color: var(--color-danger-dark); }
.hr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hr-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); }
.hr-card:hover { border-color: var(--color-primary); text-decoration: none; }
.hr-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.hr-card-ratings { display: flex; gap: 14px; margin-top: 8px; font-size: 13px; color: var(--color-text-muted); align-items: center; }
.hr-card-cta { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--color-primary-dark); }
.hr-progress { height: 8px; border-radius: 999px; background: var(--color-surface-muted); overflow: hidden; min-width: 120px; }
.hr-progress span { display: block; height: 100%; background: var(--color-success); }
.hr-progress-lg { height: 12px; flex: 1 1 240px; }
.hr-ready { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.hr-dist { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 6px; }
.hr-dist-item { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.hr-goal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px 18px; padding: 12px 0; border-bottom: 1px solid var(--color-surface-muted); }
.hr-goal:last-child { border-bottom: 0; }
@media (max-width: 900px) { .hr-goal { grid-template-columns: 1fr; } }
.hr-goal-no { display: block; font-size: 12px; font-weight: 700; color: var(--color-text-muted); margin-bottom: 4px; }
.hr-goal-sub { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; }
.hr-goal-sub label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 400; }
.hr-goal-sub > .form-control { flex: 1 1 200px; }
.hr-goal-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.hr-score { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--color-surface-muted); display: flex; flex-direction: column; gap: 4px; }
.hr-score-first { background: #eef6f5; }
.hr-score-manager { background: var(--color-primary-light); }
.hr-score-title { font-size: 11.5px; font-weight: 700; color: var(--color-text-muted); }
.hr-score .form-control { padding: 4px 6px; font-size: 13px; }
.hr-score-value { font-size: 13px; font-weight: 600; }
.hr-score-comment { font-size: 12.5px; color: var(--color-text-muted); white-space: pre-wrap; }
.hr-comp-table th[scope="row"] { font-weight: 600; text-align: left; min-width: 180px; }
.hr-comp-table td { min-width: 150px; }
.hr-total-row th, .hr-total-row td { background: var(--color-surface-muted); }
.hr-overall-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.hr-overall { padding: 12px 14px; border-radius: var(--radius); }
.hr-overall.hr-score-self { background: var(--color-surface-muted); }
.hr-overall h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.hr-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.hr-return { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.hr-return .form-control { width: 18em; padding: 4px 8px; font-size: 13px; }
.hr-bonus-card { border-left: 0; }
.hr-total-line { margin: 0 0 8px; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hr-method-list { margin: 0 0 8px; padding-left: 1.2em; line-height: 1.8; font-size: 13.5px; }
.hr-method-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.hr-method-choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); font-weight: 400; cursor: pointer; }
.hr-method-choice:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-light); }
.hr-method-choice input { margin-top: 3px; }

.bd-section-title { font-size: 17px; margin: 22px 0 10px; }
.bd-methods { display: grid; grid-template-columns: 1fr; gap: 0; }
.bd-method > summary { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; list-style: none; }
.bd-method > summary::-webkit-details-marker { display: none; }
.bd-method[open] > summary { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); }
.bd-method-icon { font-size: 26px; line-height: 1; }
.bd-lines td { padding: 3px; }
.bd-lines .form-control { padding: 4px 6px; font-size: 13px; min-width: 0; }

.cm-bar { margin: 0 0 16px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; }
.cm-bar-ctx { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 12px; border-bottom: 1px solid var(--color-border); font-size: 13.5px; }
.cm-bar-name { font-weight: 700; color: var(--color-text); overflow-wrap: anywhere; }
.cm-bar-name:hover { color: var(--color-primary); }
.cm-bar-code { font-size: 12px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.cm-bar-client { font-size: 12.5px; color: var(--color-text-muted); }
.cm-tabs { display: flex; gap: 2px; padding: 4px; overflow-x: auto; scrollbar-width: thin; }
.cm-tab { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: var(--radius-sm); white-space: nowrap; font-size: 13px; color: var(--color-text-muted); }
.cm-tab:hover { background: var(--color-primary-light); color: var(--color-primary); text-decoration: none; }
.cm-tab.is-active { background: var(--color-primary); color: #fff; font-weight: 700; }

.cm-card-table { padding-block: 8px; }
.cm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cm-table { width: 100%; font-size: 13.5px; }
.cm-table th, .cm-table td { padding: 8px 10px; vertical-align: top; }
.cm-table thead th { white-space: nowrap; font-size: 12.5px; color: var(--color-text-muted); }
.cm-table tfoot td { font-weight: 700; border-top: 2px solid var(--color-border); }
.cm-table td:first-child { min-width: 11em; }
.cm-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cm-nowrap { white-space: nowrap; }
.cm-name { font-weight: 700; overflow-wrap: anywhere; }
.cm-sub { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--color-text-muted); }
.cm-muted { color: var(--color-text-muted); font-size: 12.5px; }
.cm-neg { color: var(--color-danger-dark); }
.cm-rate { display: flex; align-items: center; gap: 6px; min-width: 110px; }
.cm-rate-num { min-width: 3.2em; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.cm-rate .pg-meter { flex: 1; margin-top: 0; }
.cm-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cm-flag { font-size: 11px; padding: 1px 6px; font-weight: 600; }

.cm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.cm-toolbar .sales-chips { margin: 0; }
.cm-search { display: flex; align-items: center; gap: 6px; flex: 0 1 340px; min-width: 0; margin: 0; }
.cm-search .form-control { flex: 1; min-width: 0; }
.cm-clear { font-size: 12.5px; white-space: nowrap; }
.cm-filter-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: -4px 0 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--color-primary-light); color: var(--color-text); font-size: 13px; }
.cm-form-hint { margin: 0 0 10px; font-size: 12.5px; color: var(--color-text-muted); }
.cm-foot-link { margin: 4px 0 0; font-size: 12.5px; text-align: right; }
.cm-foot-link a { color: var(--color-text-muted); }

.cm-section-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 0 0 10px; font-size: 16px; }
.cm-section-title .file-meta { font-weight: 400; }
.cm-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }
.cm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cm-step { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 10px 8px 12px; border-left: 4px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); color: var(--color-text); font-size: 13.5px; }
.cm-step-danger { border-left-color: var(--color-danger); background: var(--color-danger-light); }
.cm-step-warning { border-left-color: var(--color-warning); background: var(--color-warning-light); }
.cm-step-info { border-left-color: var(--color-primary); background: var(--color-primary-light); }
.cm-step-text { flex: 1 1 16em; min-width: 0; }
.cm-steps-empty { margin: 0; font-size: 13.5px; color: var(--color-text-muted); }
.cm-note { margin: 0 0 16px; padding: 8px 12px; border: 1px dashed var(--color-border); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--color-text-muted); }
.cm-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.cm-foot form { margin: 0; }

.cm-flow { counter-reset: cm-flow; list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.cm-flow li { counter-increment: cm-flow; position: relative; padding: 10px 12px 10px 40px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.cm-flow li::before { content: counter(cm-flow); position: absolute; left: 10px; top: 10px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--color-primary); color: #fff; font-size: 12px; font-weight: 700; }
.cm-flow strong { display: block; font-size: 14px; }
.cm-flow span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--color-text-muted); }

@media (max-width: 600px) {
  .cm-search { flex: 1 1 100%; }
  .cm-foot-link { text-align: left; }
}
@media print {
  .cm-tabs, .cm-search, .cm-foot, .cm-foot-link, .cm-step .btn { display: none; }
  .cm-bar { border: 0; }
}

.cq-switcher { display: flex; align-items: center; gap: 6px; margin: 0; }
.cq-switcher-label { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }
.cq-switcher .form-control { width: auto; max-width: 260px; padding: 5px 8px; font-size: 13px; }
.cq-picker { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.cq-picker .form-group { margin: 0; flex: 1 1 260px; max-width: 420px; }
.cq-list-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin-bottom: 4px; }
.cq-list-head .sales-chips { margin-bottom: 8px; }
.cq-search { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.cq-search .form-control { width: 16em; max-width: 100%; padding: 5px 8px; font-size: 13px; }
.cq-table td { vertical-align: middle; }
.cq-table tbody tr:hover td { background: var(--color-surface-muted); }
.cq-nowrap { white-space: nowrap; }
.cq-project a { font-weight: 600; }
.cq-notes { max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-row-cancelled td, .cq-row-paid td { color: var(--color-text-muted); }
.cq-row-cancelled td strong { text-decoration: line-through; }
.cq-row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--color-danger); }
.cq-due { margin-right: 4px; font-variant-numeric: tabular-nums; }
.cq-total td { font-weight: 800; border-top: 2px solid var(--color-border); background: var(--color-surface-muted); }
.cq-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cq-inline-form { display: inline; margin: 0; }
.cq-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
.cq-span-2 { grid-column: span 2; }
.cq-num-field { text-align: right; font-variant-numeric: tabular-nums; }
.cq-form-hint { margin-left: 10px; }
.cq-lines-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 10px 0 6px; }
.cq-lines-head h4 { margin: 0; font-size: 14px; }
.cq-lines-input { table-layout: fixed; min-width: 760px; }
.cq-lines-input th { font-size: 12px; font-weight: 600; }
.cq-lines-input .cc-num-input { width: 100%; }
.cq-line-no { text-align: center; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.cq-col-no { width: 2.4em; }
.cq-col-element { width: 17%; }
.cq-col-qty { width: 6.5em; }
.cq-col-unit { width: 5em; }
.cq-col-price { width: 8em; }
.cq-col-amount { width: 9em; }
.cq-col-cat { width: 9.5em; }
.cq-more { margin: 6px 0 12px; }
.cq-more > summary { cursor: pointer; font-size: 12.5px; color: var(--color-text-muted); }
.cq-more[open] > summary { margin-bottom: 6px; }
.sidebar nav a.nav-promo,
.sidebar nav .nav-promo {
  display: block;
  margin: 14px 10px 10px;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: var(--color-sidebar-text);
  text-decoration: none;
  font-size: 12.5px;
  line-height: 1.5;
}
.sidebar nav a.nav-promo:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.nav-promo-img { display: block; width: 100%; height: auto; border-radius: 6px; margin-bottom: 8px; }
.nav-promo-title { display: block; font-size: 12.5px; font-weight: 700; }
.nav-promo-text { display: block; margin-top: 3px; font-size: 11.5px; opacity: .85; }
.nav-promo-go { display: inline-block; margin-top: 6px; font-size: 11.5px; opacity: .9; text-decoration: underline; }
.nav-promo-ad { display: block; margin-top: 6px; font-size: 10.5px; letter-spacing: .04em; opacity: .75; }
@media print { .nav-promo { display: none; } }
.op-watch { max-width: 820px; margin: 0 auto; }
.op-watch-mark { margin: 0 0 4px; font-size: 12px; color: var(--color-text-muted); letter-spacing: .04em; }
.op-watch-title { margin: 0 0 6px; font-size: 22px; }
.op-watch-text { margin: 0 0 14px; color: var(--color-text-muted); }
.op-watch-video, .op-watch-image { display: block; width: 100%; max-height: 62vh; border-radius: 10px; background: #000; }
.op-watch-image { background: transparent; object-fit: contain; }
.op-watch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.op-watch-note { margin: 16px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--color-text-muted); }
@media print { .op-watch { display: none; } }

.ts-table th, .ts-table td { white-space: nowrap; }
.ts-cell { text-align: center; font-size: 12.5px; }
.ts-cell a { text-decoration: none; }
.ts-date { display: block; font-size: 11px; color: var(--color-text-muted); }
.ts-count { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--color-border); font-size: 11px; }
.ts-none { color: var(--color-border-strong, #9aa4b2); }
.ts-done { background: var(--color-surface-muted, #eef2f7); }
.ts-now { background: var(--color-primary-light); font-weight: 700; }
.ts-stopped { background: var(--color-danger-bg, #fdecec); }
.ts-row-stopped td:first-child { border-left: 4px solid var(--color-danger, #c62828); }
.dn-table td, .dn-table th { vertical-align: middle; }
.dn-done td { color: var(--color-text-muted); }
.dn-qty { width: 6em; text-align: right; }
.dn-note-list { margin: 10px 0 0; padding-left: 1.2em; line-height: 2; }
.dn-reason { display: inline-flex; align-items: center; gap: 6px; }
.dn-export { margin-top: 10px; }

.cq-ack { color: var(--color-success, #1b7a3d); font-weight: 700; }
.cq-howto { max-width: 90ch; margin-top: 16px; font-size: 13px; color: var(--color-text-muted); }
.cq-howto > summary { cursor: pointer; font-weight: 600; color: var(--color-text); }
.cq-howto ol { margin: 8px 0; padding-left: 1.4em; line-height: 1.7; }
@media (max-width: 600px) {
  .cq-switcher { width: 100%; }
  .cq-switcher .form-control { flex: 1; max-width: none; }
  .cq-search .form-control { flex: 1 1 auto; width: auto; }
  .cq-span-2 { grid-column: auto; }
  .cq-form-hint { display: block; margin: 6px 0 0; }
}


.cb-switch { display: flex; align-items: center; gap: 6px; margin: 0; }
.cb-switch label { margin: 0; font-size: 12.5px; color: var(--color-text-muted); white-space: nowrap; }
.cb-switch select { width: auto; min-width: 12em; max-width: 22em; }

.cb-alert { margin: -6px 0 12px; }
.cb-alert a { font-size: 12.5px; }
.cb-callout {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 0 0 16px; padding: 10px 14px;
  border: 1px solid var(--color-border); border-left: 4px solid var(--color-warning); border-radius: var(--radius-sm);
  background: var(--color-warning-light); color: var(--color-text); font-size: 13px; line-height: 1.6;
}
.cb-callout-info { border-left-color: var(--color-primary); background: var(--color-primary-light); }

.cb-card-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding-bottom: 10px; margin-bottom: 10px; border-bottom: 2px solid var(--color-border);
}
.card .cb-card-head h2 { margin: 0; padding: 0; border: 0; }
.cb-card-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-hint { margin: 0 0 8px; font-size: 12.5px; color: var(--color-text-muted); }

.cb-table-wrap { max-height: 72vh; overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.cb-table { margin: 0; border-collapse: separate; border-spacing: 0; }
.cb-table td { background: var(--color-surface); border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.cb-table thead th { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--color-border); }
.cb-table .cb-name { position: sticky; left: 0; z-index: 1; min-width: 12em; max-width: 22em; }
.cb-table thead th.cb-name { z-index: 3; }
.cb-table tr.cb-parent > td { background: var(--color-surface-muted); font-weight: 600; }
.cb-table tr.cb-leaf.cb-state-warn > td { background: var(--color-warning-light); }
.cb-table tr.cb-leaf.cb-state-over > td { background: var(--color-danger-light); }
.cb-table tr.cb-state-warn > td.cb-name { box-shadow: inset 3px 0 0 var(--color-warning); }
.cb-table tr.cb-state-over > td.cb-name { box-shadow: inset 3px 0 0 var(--color-danger); }
.cb-table tfoot td {
  position: sticky; bottom: 0; z-index: 1; background: var(--color-surface-muted); font-weight: 800;
  border-top: 2px solid var(--color-border-strong, var(--color-border)); border-bottom: 0;
}
.cb-table tfoot td.cb-name { z-index: 2; }
.cb-lv-2 > .cb-name { padding-left: 24px; }
.cb-lv-3 > .cb-name { padding-left: 40px; }
.cb-lv-4 > .cb-name { padding-left: 56px; }
.cb-lv-2 > .cb-name .cb-name-text::before,
.cb-lv-3 > .cb-name .cb-name-text::before,
.cb-lv-4 > .cb-name .cb-name-text::before { content: '└ '; color: var(--color-text-muted); font-weight: 400; }
.cb-note { display: block; margin-top: 1px; font-size: 11.5px; font-weight: 400; color: var(--color-text-muted); }
.cb-cat { white-space: nowrap; font-size: 12.5px; }
.cb-rate-cell { min-width: 110px; }
.cb-rate { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.cb-rate-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.cb-rate-cell .pg-meter { max-width: 110px; }
.cb-input { max-width: 9.5em; text-align: right; font-variant-numeric: tabular-nums; }
.cb-ops { white-space: nowrap; }
.cb-nowrap { white-space: nowrap; }

.cb-edit > summary { display: inline-block; list-style: none; cursor: pointer; }
.cb-edit > summary::-webkit-details-marker { display: none; }
.cb-edit[open] > summary { margin-bottom: 6px; }
.cb-edit-panel {
  min-width: 280px; max-width: 360px; padding: 10px; white-space: normal; font-weight: 400;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); box-shadow: var(--shadow-card);
}
.cb-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.cb-edit-grid .form-group { margin-bottom: 8px; }
.cb-edit-grid .form-group:first-child,
.cb-edit-grid .form-group:last-child { grid-column: 1 / -1; }
.cb-edit-grid label { font-size: 12px; }
.cb-edit-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-edit-delete { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--color-border); }

.cb-forecast-form { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; margin-top: 12px; }
.cb-forecast-form .form-group { margin: 0; }

.cb-history > summary { font-size: 16px; }
.cb-help { margin: 0 0 16px; font-size: 13px; color: var(--color-text-muted); }
.cb-help > summary { width: fit-content; cursor: pointer; color: var(--color-primary); font-size: 13px; }
.cb-help ul { max-width: 90ch; margin: 8px 0 0; padding-left: 1.3em; line-height: 1.7; }
.cb-help-inline { margin: 0; }
.cb-help-inline[open] { flex-basis: 100%; }

.cb-overview td { vertical-align: middle; }
.cb-overview tr.cb-attn > td:first-child { box-shadow: inset 3px 0 0 var(--color-warning); }
.cb-overview .badge + .badge { margin-left: 4px; }
.cb-foot-note { margin: 10px 0 0; }

.cb-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cb-project-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cb-project-links a {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text);
}
.cb-project-links a:hover { border-color: var(--color-primary); text-decoration: none; }

.cb-first { margin-top: 0; }
.cb-pick { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cb-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-bottom: 14px; }
.cb-choice {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; cursor: pointer; font-weight: 400;
  border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface);
}
.cb-choice:hover { border-color: var(--color-primary); }
.cb-choice.is-muted { opacity: 0.7; }
.cb-choice-icon { font-size: 24px; line-height: 1; }
.cb-choice-text { display: grid; gap: 2px; }
.cb-choice-text strong { font-size: 14px; color: var(--color-text); }
.cb-choice-tag { font-size: 12px; color: var(--color-text-muted); }
.cb-panel { display: none; }
#cb-pick-estimate:checked ~ .cb-panels .cb-panel-estimate,
#cb-pick-history:checked ~ .cb-panels .cb-panel-history,
#cb-pick-target:checked ~ .cb-panels .cb-panel-target,
#cb-pick-copy:checked ~ .cb-panels .cb-panel-copy { display: block; }
#cb-pick-estimate:checked ~ .cb-choices .cb-choice-estimate,
#cb-pick-history:checked ~ .cb-choices .cb-choice-history,
#cb-pick-target:checked ~ .cb-choices .cb-choice-target,
#cb-pick-copy:checked ~ .cb-choices .cb-choice-copy {
  border-color: var(--color-primary); background: var(--color-primary-light); box-shadow: inset 0 0 0 1px var(--color-primary);
}
#cb-pick-estimate:focus-visible ~ .cb-choices .cb-choice-estimate,
#cb-pick-history:focus-visible ~ .cb-choices .cb-choice-history,
#cb-pick-target:focus-visible ~ .cb-choices .cb-choice-target,
#cb-pick-copy:focus-visible ~ .cb-choices .cb-choice-copy { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.cb-panel-desc { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--color-surface-muted); font-size: 13px; line-height: 1.6; }

.cb-draft-head { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; margin-bottom: 8px; }
.cb-draft-head .form-group { flex: 0 0 auto; }
.cb-draft-head .cb-grow { flex: 1 1 260px; }
.cb-lines { margin: 0; border-collapse: separate; border-spacing: 0; }
.cb-lines td { padding: 3px; background: var(--color-surface); }
.cb-lines .form-control { min-width: 0; padding: 4px 6px; font-size: 13px; }
.cb-lines thead th { position: sticky; top: 0; z-index: 2; }
.cb-lines tbody tr:nth-child(even) td { background: var(--color-surface-muted); }
.cb-lines tbody tr:focus-within td { background: var(--color-primary-light); }
.cb-line-no { width: 2.4em; text-align: right; color: var(--color-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cb-w-work { width: 8em; }
.cb-w-item { width: 11em; }
.cb-w-spec { width: 9em; }
.cb-w-qty { width: 6em; }
.cb-w-unit { width: 4.5em; }
.cb-w-price { width: 8em; }
.cb-w-money { width: 10em; }
.cb-w-cat { width: 7.5em; }
.cb-w-note { width: 9em; }
.cb-w-rate { width: 7em; }
.cb-notes { margin-top: 12px; }
.cb-savebar {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin-top: 12px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-surface); box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}
.cb-live { font-size: 13px; color: var(--color-text-muted); }
.cb-live strong { margin-left: 8px; font-size: 18px; color: var(--color-text); font-variant-numeric: tabular-nums; }
.cb-share { min-width: 120px; }
.cb-share .cc-num { display: inline-block; min-width: 3.5em; }
.cb-share .pg-meter { max-width: 120px; }
.cb-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cb-actions form { margin: 0; }
.cb-danger-zone { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--color-border); }
.cb-danger-zone form { margin: 0; }

@media (max-width: 640px) {
  .cb-switch { width: 100%; }
  .cb-switch select { flex: 1 1 auto; min-width: 0; max-width: none; }
  .cb-table .cb-name { min-width: 8.5em; max-width: 11em; }
  .cb-edit-panel { min-width: 230px; }
  .cb-edit-grid { grid-template-columns: 1fr; }
  .cb-choices { grid-template-columns: 1fr 1fr; }
  .cb-choice { padding: 8px 10px; }
  .cb-choice-icon { font-size: 20px; }
  .cb-savebar .btn { flex: 1 1 auto; }
}

@media print {
  .cb-switch, .cb-edit, .cb-card-actions, .cb-help, .cb-forecast-form .btn, .cb-savebar { display: none !important; }
  .cb-table-wrap { max-height: none; overflow: visible; }
  .cb-table thead th, .cb-table .cb-name, .cb-table tfoot td { position: static; }
}

.cr-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 0 0 10px; }
.cr-section-head h2 { display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: 17px; }
.cr-section-lead { margin: -4px 0 12px; max-width: 72ch; font-size: 13.5px; line-height: 1.6; color: var(--color-text-muted); }
.cr-subhead { margin: 18px 0 6px; font-size: 14px; }
.cr-count { font-size: 12.5px; color: var(--color-text-muted); }
.cr-hint { margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); }
.cr-help-list { margin: 10px 0 0; padding-left: 1.2em; font-size: 13px; line-height: 1.75; color: var(--color-text-muted); }
.cr-help-list li + li { margin-top: 4px; }
.cr-more { margin-top: 10px; }
.cr-more > summary { cursor: pointer; font-size: 13px; color: var(--color-primary-dark); }
.cr-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.cr-two > .card { margin: 0; }
.cr-code { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.cr-total > th, .cr-total > td { font-weight: 800; background: var(--color-surface-muted); border-top: 2px solid var(--color-border-strong); }
.cr-cat-table th[scope="row"], .cr-members th[scope="row"], .cr-history th[scope="row"], .cr-rates th[scope="row"] { font-weight: 600; text-align: left; white-space: nowrap; }

.cr-filterbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.cr-filterbar .sales-chips { margin: 0; }
.cr-sort { display: flex; align-items: center; gap: 6px; margin: 0; }
.cr-sort label { margin: 0; font-size: 12.5px; color: var(--color-text-muted); white-space: nowrap; }
.cr-sort .form-control { width: auto; padding: 5px 8px; font-size: 13px; }
.cr-scope { margin: 8px 0 10px; font-size: 13px; color: var(--color-text-muted); }
.cr-table td { vertical-align: middle; }
.cr-name a { font-weight: 700; }
.cr-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; font-size: 12px; color: var(--color-text-muted); }
.cr-row-below > td:first-child { box-shadow: inset 3px 0 0 var(--color-danger); }
.cr-consume-cell { min-width: 120px; }
.cr-consume-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cr-consume-rate { min-width: 3em; font-weight: 700; font-variant-numeric: tabular-nums; }
.cr-consume .pg-meter { max-width: 120px; }
.cr-share-cell { min-width: 130px; }
.cr-share { display: flex; align-items: center; gap: 6px; }
.cr-share-bar { flex: 1 1 auto; max-width: 110px; height: 8px; overflow: hidden; border-radius: 999px; background: var(--color-surface-muted); }
.cr-share-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--color-primary); }
.cr-share-pct { min-width: 3.4em; text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.cr-row-zero > th, .cr-row-zero > td { color: var(--color-text-muted); }
.cr-row-uncat > th { color: var(--color-warning-dark); }
.cr-alert-line { margin: -6px 0 16px; }
.cr-forecast { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px 16px; align-items: start; }
.cr-forecast-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cr-breakdown { width: 100%; min-width: 0; margin: 0; }
.cr-breakdown caption { caption-side: top; padding: 0 0 4px; text-align: left; font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); }
.cr-change { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cr-change.is-down { color: var(--color-danger-dark); }
.cr-change.is-up { color: var(--color-success-dark); }
.cr-row-down > th, .cr-row-down > td { background: var(--color-danger-light); }
.cr-row-latest > th { font-weight: 800; }
@media (max-width: 800px) { .cr-forecast { grid-template-columns: 1fr; } }

.cr-toolbar { padding-block: 12px; }
.cr-toolbar-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0; }
.cr-toolbar-form .form-group { min-width: 140px; margin: 0; }
.cr-toolbar-form .cr-grow { flex: 1 1 260px; }
.cr-toolbar-form label { font-size: 12px; color: var(--color-text-muted); }
.cr-toolbar-form .cr-toolbar-submit { min-width: 0; }
.cr-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--color-border); }
.cr-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cr-presets .pg-month-nav strong { min-width: 6.5em; font-size: 14px; }
.cr-presets-label { margin-right: 2px; font-size: 12px; font-weight: 700; color: var(--color-text-muted); }
.cr-toolbar-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.cr-printbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.cr-picker-lead { margin: 0 0 10px; font-size: 13.5px; color: var(--color-text-muted); }
.cr-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 6px; max-height: 60vh; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.cr-picker li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.cr-picker li:hover { border-color: var(--color-primary); }
.cr-picker a { display: flex; flex-direction: column; min-width: 0; font-weight: 700; }
.cr-picker-name { overflow-wrap: anywhere; }
.cr-picker-tags { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 4px; }
.cr-member-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.cr-report { font-size: 12.5px; }
.cr-report table { width: 100%; border-collapse: collapse; }
.cr-report table.cr-cat-summary { width: auto; min-width: min(100%, 480px); margin-bottom: 12px; }
.cr-report th, .cr-report td { padding: 3px 6px; border: 1px solid var(--color-border); vertical-align: top; }
.cr-report thead th { background: var(--color-surface-muted); font-weight: 700; text-align: center; white-space: nowrap; }
.cr-report .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cr-report .muted { color: var(--color-text-muted); }
.cr-report tr.el-total td { background: var(--color-surface-muted); font-weight: 700; }
.cr-report tr.vendor-total td { background: var(--color-primary-light); font-weight: 800; border-top: 2px solid var(--color-border-strong); }
.cr-report tr.grand-total td { background: var(--color-primary); color: #fff; font-weight: 800; }
.cr-report .vendor-name { font-weight: 800; white-space: nowrap; }
.cr-report-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 3px solid var(--color-primary); }
.cr-report-title { margin: 0; font-size: 20px; letter-spacing: 0.04em; }
.cr-report-sub { font-size: 12px; color: var(--color-text-muted); }
.cr-report-note { margin-top: 8px; }
.cr-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 14px; margin: 0 0 10px; }
.cr-meta dt { font-size: 11.5px; color: var(--color-text-muted); }
.cr-meta dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.cr-scroll { overflow-x: auto; }
.cr-att td.cell { min-width: 30px; padding: 2px 1px; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; }
.cr-att td.cell .mk { display: block; font-size: 10px; letter-spacing: -1px; }
.cr-att .mark-full { background: var(--color-primary-light); }
.cr-att .mark-part { background: var(--color-surface-muted); }
.cr-att .mark-over { background: var(--color-warning-light); }
.cr-att .hol { color: var(--color-danger-dark); }
.cr-att th.day { min-width: 30px; padding: 2px 1px; font-size: 11px; }
.cr-att .name { position: sticky; left: 0; z-index: 1; white-space: nowrap; background: var(--color-surface); }
.cr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; font-size: 12px; }
.cr-legend span { display: inline-flex; align-items: center; gap: 4px; }
.cr-legend .cr-sw { display: inline-block; width: 14px; height: 12px; border: 1px solid var(--color-border); }
.cr-sheet + .cr-sheet { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--color-border); }

.cr-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.cr-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px 20px; }
.cr-field { margin: 0; }
.cr-field label { font-weight: 700; }
.cr-input-unit { display: inline-flex; align-items: center; gap: 6px; }
.cr-input-unit > span { font-size: 13px; color: var(--color-text-muted); }
.cr-check { margin: 0 0 12px; }
.cr-check .cr-hint { display: inline; margin-left: 4px; }
.cr-rate-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 8px; }
.cr-rates-wrap, .cr-elements-wrap { max-height: 60vh; overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.cr-rates thead th, .cr-elements thead th { position: sticky; top: 0; z-index: 1; }
.cr-row-none > th { color: var(--color-text-muted); }
.cr-rowno { width: 3em; text-align: right; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.cr-row-new td { background: var(--color-surface-muted); }
.cr-elements .form-control { padding: 5px 8px; font-size: 13px; }
.cr-savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0 16px; }
.cr-savebar .cr-hint { margin: 0; }
.cr-savebar-sticky { position: sticky; bottom: 0; z-index: 5; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow-card); }

.cr-results { display: grid; gap: 8px; margin-bottom: 14px; }
.cr-result { margin: 0; }
.cr-result-notes { margin-top: 6px; font-size: 13px; }
.cr-result-notes > summary { cursor: pointer; font-weight: 700; }
.cr-result-notes ul { max-height: 14em; margin: 6px 0 0; padding-left: 1.2em; overflow-y: auto; }
.cr-steps { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 4px; padding: 0; list-style: none; }
.cr-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); font-size: 13px; }
.cr-steps-note { margin: 0 0 14px; }
.cr-no { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em; padding: 0 4px; border-radius: 999px; background: var(--color-primary-light); color: var(--color-primary-dark); font-size: 12px; font-weight: 800; }
.cr-tag { padding: 2px 10px; border-radius: 999px; background: var(--color-surface-muted); color: var(--color-text-muted); font-size: 12px; }
.cr-xgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.cr-xbox { padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.cr-xbox h3 { margin: 0 0 8px; font-size: 14px; }
.cr-xactions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-xform { margin: 0; }
.cr-xform .form-group { margin: 0 0 8px; }
.cr-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.cr-upload .form-control { flex: 1 1 220px; min-width: 0; background: var(--color-surface); }

@media (max-width: 640px) {
  .cr-sort { width: 100%; }
  .cr-sort .form-control { flex: 1; }
  .cr-toolbar-form .form-group { flex: 1 1 100%; min-width: 0; }
  .cr-toolbar-actions { margin-left: 0; }
  .cr-report-title { font-size: 17px; }
  .cr-savebar-sticky { padding: 8px 10px; }
}
@media print {
  .cr-toolbar, .cr-printbar, .cr-help, .cr-filterbar, .cr-jump, .cr-more { display: none !important; }
  .card.cr-report-card { padding: 0; border: 0; box-shadow: none; page-break-inside: auto; }
  .cr-section { page-break-inside: auto; }
  .cr-scroll, .cr-section .cc-table-wrap, .cr-rates-wrap, .cr-elements-wrap { max-height: none; overflow: visible !important; }
  .cr-report, .cr-report * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cr-report { color: #000; }
  .cr-report table { font-size: 9.5px; }
  .cr-report th, .cr-report td { padding: 2px 3px; border-color: #c9d3e0; }
  .cr-report thead { display: table-header-group; }
  .cr-report thead th { background: #eef3f8; }
  .cr-report .muted, .cr-report-sub, .cr-meta dt { color: #555; }
  .cr-report tr.el-total td { background: #f6f8fb; }
  .cr-report tr.vendor-total td { background: #e7f1fb; }
  .cr-report tr.grand-total td { background: #002060; color: #fff; }
  .cr-report tr { break-inside: avoid; page-break-inside: avoid; }
  .cr-report-head { border-bottom-color: #002060; }
  .cr-att .mark-full { background: #dcebfa; }
  .cr-att .mark-part { background: #f1f5fa; }
  .cr-att .mark-over { background: #fde7c8; }
  .cr-att .hol { color: #be123c; }
  .cr-att .name { position: static; background: #fff; }
  .cr-sheet { margin-top: 0; padding-top: 0; border-top: 0; break-after: page; page-break-after: always; }
  .cr-sheet:last-child { break-after: auto; page-break-after: auto; }
  .cr-share-bar > span { background: #555; }
  .cr-row-down > th, .cr-row-down > td { background: none; }
  .cr-change.is-down { color: #b00020; }
}
.cq-paid-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cq-paid-date { width: auto; padding: 4px 6px; font-size: 12.5px; }

.mx-muted { color: var(--color-text-muted); font-size: 12.5px; }
.mx-block { display: block; }
.mx-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mx-date { white-space: nowrap; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mx-warn-text { color: var(--color-warning-dark, var(--color-warning)); font-weight: 700; }
.mx-section { margin-bottom: 16px; }
.mx-section-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; }
.mx-count-pill { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--color-warning-light); color: var(--color-text); font-size: 12.5px; font-weight: 700; }
.mx-inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.mx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mx-btn-quiet { opacity: 0.85; }
.mx-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.mx-inline-check { display: inline-flex; align-items: center; gap: 6px; font-weight: normal; margin: 0; }
.mx-fieldset { border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 10px 14px 4px; margin: 12px 0; min-width: 0; }
.mx-fieldset > legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--color-text-muted); }
.mx-savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 20px; padding: 12px 16px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow-card); position: sticky; bottom: 8px; z-index: 2; }
.mx-gap-top { margin-top: 14px; }
.mx-w-md { max-width: 320px; }
.mx-w-sm { max-width: 120px; }
.mx-alert-warn { background: var(--color-warning-light); color: var(--color-text); border: 1px solid var(--color-warning); }
.mx-help > summary { cursor: pointer; font-weight: 700; }
.mx-help ul { margin: 10px 0 0; padding-left: 1.3em; line-height: 1.75; font-size: 13.5px; }

.mx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mx-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.mx-table-wide { min-width: 900px; }
.mx-table th, .mx-table td { vertical-align: top; text-align: left; }
.mx-table tbody th { font-weight: 600; }
.mx-row-pending { background: var(--color-warning-light); }
.mx-row-self > th { box-shadow: inset 3px 0 0 var(--color-primary); }
.mx-row-child > th { padding-left: 22px; font-weight: 500; }
.mx-tree-mark { color: var(--color-text-muted); margin-right: 4px; }
.mx-kind { margin-left: 6px; font-weight: 400; }
.mx-names { font-size: 12.5px; max-width: 28ch; overflow-wrap: anywhere; }
.mx-person { font-weight: 700; }
.mx-add-child { display: inline-block; }
.mx-add-child > summary { cursor: pointer; font-size: 12.5px; color: var(--color-primary-dark); list-style: none; padding: 3px 8px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-sm); }
.mx-add-child > summary::-webkit-details-marker { display: none; }
.mx-add-child[open] > summary { margin-bottom: 6px; }
.mx-add-child-form .form-control { width: 160px; max-width: 100%; padding: 4px 8px; font-size: 13px; }

.mx-queue { border-left: 4px solid var(--color-warning); }
.mx-queue-head { margin-bottom: 8px; }
.mx-queue-head .mx-section-title { margin-bottom: 4px; }
.mx-queue-head p { margin: 0; }
.mx-queue-list { list-style: none; margin: 0; padding: 0; }
.mx-queue-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--color-border); }
.mx-queue-item.is-delete { border-left: 3px solid var(--color-danger); padding-left: 10px; }
.mx-queue-text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; overflow-wrap: anywhere; }

.mx-org { display: flex; flex-direction: column; align-items: stretch; }
.mx-org-root { display: flex; justify-content: center; position: relative; padding-bottom: 18px; }
.mx-org-root::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 2px; height: 18px; background: var(--color-border-strong); }
.mx-org-top { width: min(100%, 460px); padding: 12px 16px; border: 2px solid var(--color-primary); border-radius: var(--radius); background: var(--color-primary-light); color: var(--color-text); }
.mx-org-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding-top: 14px; border-top: 2px solid var(--color-border-strong); }
.mx-org-dept { padding: 10px 12px; border: 1.5px solid var(--color-border-strong); border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow-card); min-width: 0; }
.mx-org-dept.is-pending, .mx-org-group.is-pending { border-style: dashed; }
.mx-org-unassigned { border-style: dashed; background: var(--color-surface-muted); }
.mx-org-dept-head, .mx-org-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.mx-org-dept-head strong { overflow-wrap: anywhere; }
.mx-org-count { margin-left: auto; padding: 0 8px; border-radius: 999px; background: var(--color-surface-muted); color: var(--color-text); font-size: 12.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mx-org-direct { margin: 4px 0 0; }
.mx-org-holders { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; }
.mx-org-holders li { padding: 1px 0; overflow-wrap: anywhere; }
.mx-org-holders-sm { font-size: 12.5px; margin-top: 3px; }
.mx-org-roles { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--color-border-strong); }
.mx-org-pos { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--color-surface-muted); color: var(--color-text-muted); font-size: 11.5px; font-weight: 700; }
.mx-org-groups { list-style: none; margin: 8px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--color-border-strong); }
.mx-org-group { margin: 6px 0 0; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.mx-org-foot { margin: 12px 0 0; }

.mx-create-form .form-row { flex-wrap: wrap; }
.mx-preset { height: auto; max-width: 320px; }
.mx-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 12px; padding: 4px 0 8px; }

.mx-summary { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 18px; }
.mx-summary-main { flex: 1 1 260px; min-width: 0; }
.mx-summary-name { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.mx-summary-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 2px; font-size: 13px; }
.mx-summary .pg-meter { max-width: 320px; }
.mx-logo-thumb { flex: 0 0 auto; width: 96px; height: 64px; object-fit: contain; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: #fff; padding: 4px; }
.mx-logo-empty { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11.5px; line-height: 1.3; color: var(--color-text-muted); background: var(--color-surface-muted); border-style: dashed; }
.mx-missing-head { margin-top: 10px; font-size: 12.5px; color: var(--color-text-muted); }
.mx-missing { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 6px 0 0; padding: 0; }
.mx-missing a { display: inline-block; padding: 2px 10px; border: 1px solid var(--color-border-strong); border-radius: 999px; font-size: 12.5px; color: var(--color-text); background: var(--color-surface); }
.mx-missing a:hover { border-color: var(--color-primary); text-decoration: none; }
.mx-missing a.mx-missing-important { border-color: var(--color-warning); background: var(--color-warning-light); font-weight: 700; }
.mx-form .form-group :target, .mx-form [id^="ci-"]:target { outline: 2px solid var(--color-warning); outline-offset: 2px; }
.mx-logo-current { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 10px; }
.mx-logo-current img { max-width: 240px; max-height: 120px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 4px; background: #fff; }
.mx-method-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 16px; margin: 0 0 10px; }
.mx-method-status dt { font-size: 12px; color: var(--color-text-muted); }
.mx-method-status dd { margin: 2px 0 0; font-size: 15px; }
.mx-rule { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm); border-left: 4px solid var(--color-border-strong); background: var(--color-surface-muted); font-size: 13px; line-height: 1.7; }
.mx-rule-open { border-left-color: var(--color-warning); background: var(--color-warning-light); }
.mx-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.mx-choice { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1.5px solid var(--color-border-strong); border-radius: var(--radius); background: var(--color-surface); font-weight: normal; cursor: pointer; }
.mx-choice:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-light); }
.mx-choice input { margin-top: 3px; }
.mx-choice-body { display: flex; flex-direction: column; gap: 2px; }

.mx-facts-card { margin-bottom: 16px; }
.mx-assign { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.mx-assign-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 10px; border-top: 1px solid var(--color-border); }
.mx-assign-row:first-child { border-top: 0; }
.mx-assign-row.is-child { padding-left: 28px; }
.mx-assign-row.is-on { background: var(--color-primary-light); }
.mx-assign-name { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.mx-assign-pos { width: auto; max-width: 220px; flex: 0 1 200px; }
.mx-role-list { list-style: none; margin: 0; padding: 0; }
.mx-role-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--color-border); }
.mx-role-list li:first-child { border-top: 0; }
.mx-role-name { min-width: 7em; font-weight: 700; font-size: 13px; }

.mx-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.mx-toolbar .sales-chips { margin-bottom: 6px; }
.mx-search { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.mx-search .form-control { width: 220px; max-width: 100%; }
.mx-clear { font-size: 12.5px; }
.mx-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.mx-links a { display: flex; align-items: flex-start; gap: 10px; height: 100%; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); }
.mx-links a:hover { border-color: var(--color-primary); text-decoration: none; }
.mx-links-icon { font-size: 20px; line-height: 1.2; }

@media (max-width: 480px) {
  .mx-org-depts { grid-template-columns: 1fr; }
  .mx-assign-pos { max-width: 100%; flex: 1 1 100%; }
  .mx-savebar { position: static; }
  .mx-queue-item { flex-direction: column; align-items: flex-start; }
}

.mz-muted { color: var(--color-text-muted); }
.mz-sub { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.mz-nowrap { white-space: nowrap; }
.mz-time { font-variant-numeric: tabular-nums; }
.mz-h { margin: 0 0 10px; font-size: 16px; }
.mz-h3 { margin: 0 0 4px; font-size: 14px; }
.mz-hint { margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); }
.mz-text { margin: 0; font-size: 13.5px; line-height: 1.7; }
.mz-inline-form { display: inline-block; margin: 0; }
.mz-kpi-unit { font-size: 14px; font-weight: 600; color: var(--color-text-muted); }
.mz-btn-disabled { opacity: .5; cursor: not-allowed; }
.mz-listbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 4px 0 8px; }
.mz-listbar .sales-chips { margin: 0; }
.mz-listbar-tight { margin-top: 0; }
.mz-result-count { margin: 0; font-size: 13px; }
.mz-howto { margin-top: 16px; }
.mz-howto > summary { cursor: pointer; font-weight: 600; color: var(--color-primary-dark); }
.mz-howto ul { margin: 10px 0 0; padding-left: 1.3em; font-size: 13.5px; line-height: 1.75; color: var(--color-text); }
.mz-howto li + li { margin-top: 4px; }

.mz-cat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; }
.mz-cat-head h2 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.mz-count { font-size: 12.5px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.mz-cat-quiet { background: var(--color-surface-muted); }
.mz-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mz-rtable { width: 100%; border-collapse: collapse; }
.mz-rtable th, .mz-rtable td { padding: 7px 8px; border-bottom: 1px solid var(--color-border); vertical-align: middle; text-align: left; }
.mz-rtable thead th { font-size: 12px; font-weight: 600; color: var(--color-text-muted); white-space: nowrap; }
.mz-rtable .form-control { padding: 4px 6px; min-width: 0; }
.mz-cell-name { min-width: 200px; }
.mz-cell-name .form-control { width: 100%; }
.mz-cell-role { min-width: 84px; }
.mz-role-input { width: 90px; }
.mz-cell-storage { min-width: 180px; }
.mz-cell-storage .form-control + .form-control { margin-top: 4px; }
.mz-cell-actions { white-space: nowrap; }
.mz-cell-actions > * + * { margin-left: 4px; }
.mz-row-draft > td:first-child { box-shadow: inset 3px 0 0 var(--color-warning); }
.mz-row-draft { background: color-mix(in srgb, var(--color-warning-light) 45%, transparent); }
.mz-row-zero { opacity: .62; }
.mz-row-zero:hover, .mz-row-zero:focus-within { opacity: 1; }
.mz-row-pending > td:first-child { box-shadow: inset 3px 0 0 var(--color-danger); }
.mz-row-irregular .mz-cell-name .form-control { color: var(--color-text-muted); }
.mz-mech { display: block; margin-top: 2px; font-size: 11.5px; color: var(--color-text-muted); overflow-wrap: anywhere; }
.mz-badge-link { text-decoration: none; }
.mz-badge-link:hover { text-decoration: underline; }

.mz-progress-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.mz-progress-num { min-width: 180px; font-variant-numeric: tabular-nums; }
.mz-progress-num strong { font-size: 26px; font-weight: 800; margin-left: 6px; }
.mz-progress-label { font-size: 13px; color: var(--color-text-muted); }
.mz-progress-num .pg-meter { max-width: 240px; height: 8px; margin-top: 6px; }
.mz-progress-note { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--color-text-muted); }
.mz-progress-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; }
.mz-progress-action .mz-progress-note { margin: 0; }
.mz-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mz-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--color-border); font-size: 12.5px; color: var(--color-text-muted); background: var(--color-surface); }
.mz-step-no { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11.5px; font-weight: 700; background: var(--color-surface-muted); color: var(--color-text-muted); }
.mz-steps li.is-current { border-color: var(--color-primary); color: var(--color-text); font-weight: 600; }
.mz-steps li.is-current .mz-step-no { background: var(--color-primary-light); color: var(--color-primary-dark); }
.mz-steps li.is-done { color: var(--color-text); }
.mz-steps li.is-done .mz-step-no { background: var(--color-success-light); color: var(--color-success); }
.mz-cat-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin: 0 0 12px; }
.mz-cat-index a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); font-size: 12.5px; }
.mz-cat-index a:hover { border-color: var(--color-primary); text-decoration: none; }
.mz-cat-index a.is-done { background: var(--color-surface-muted); }
.mz-cat-index-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mz-cat-index-num { font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.mz-cat-index .pg-meter { grid-column: 1 / -1; max-width: none; margin-top: 2px; }

.mz-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; margin-top: 12px; }
.mz-form-grid .form-group { margin: 0; }
.mz-span-2 { grid-column: span 2; }
.mz-span-all { grid-column: 1 / -1; }
.mz-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 4px; }

.mz-pending-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.mz-pending-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); }
.mz-pending-item:hover { border-color: var(--color-danger); text-decoration: none; }
.mz-pending-num { flex: none; min-width: 34px; padding: 2px 6px; border-radius: 999px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--color-danger-light); color: var(--color-danger); }
.mz-pending-name { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.mz-pending-name .mz-muted { display: block; font-size: 11.5px; font-weight: 400; }

.mz-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; padding-block: 12px; }
.mz-toolbar .form-group { margin: 0; min-width: 140px; }
.mz-toolbar .form-group.mz-grow { flex: 1 1 220px; }
.mz-toolbar label { font-size: 12px; color: var(--color-text-muted); }
.mz-toolbar-actions { display: flex; gap: 6px; }
.mz-log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mz-log-table th, .mz-log-table td { padding: 6px 8px; border-bottom: 1px solid var(--color-border); vertical-align: top; text-align: left; }
.mz-log-table thead th { font-size: 12px; font-weight: 600; color: var(--color-text-muted); white-space: nowrap; }
.mz-log-table tbody tr:hover { background: var(--color-surface-muted); }
.mz-path code { font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
.mz-fields { max-width: 220px; font-size: 12px; color: var(--color-text-muted); overflow-wrap: anywhere; }
.mz-row-failed > td:first-child { box-shadow: inset 3px 0 0 var(--color-danger); }

.mz-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mz-module { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow-card); }
.mz-module.is-on { border-top: 3px solid var(--color-success); }
.mz-module.is-off { border-top: 3px solid var(--color-border-strong); background: var(--color-surface-muted); }
.mz-module-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.mz-module-head h2 { margin: 0; font-size: 15.5px; }
.mz-module-note { margin: 0; font-size: 12.5px; color: var(--color-warning); }
.mz-module-cap { display: block; font-size: 11.5px; color: var(--color-text-muted); margin-bottom: 2px; }
.mz-module-features ul { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mz-module-features li { padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--color-surface-muted); color: var(--color-text); }
.mz-module.is-off .mz-module-features li { background: var(--color-surface); }
.mz-module-effect { padding: 8px 10px; border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.6; background: var(--color-warning-light); color: var(--color-text); }
.mz-module-effect.is-off { background: var(--color-surface); border: 1px dashed var(--color-border-strong); }
.mz-module-effect p { margin: 0; }
.mz-module-side { margin: 6px 0 0; padding-left: 1.2em; }
.mz-module-action { margin: auto 0 0; padding-top: 4px; }

.mz-state.is-on { border-left: 4px solid var(--color-success); }
.mz-state.is-off { border-left: 4px solid var(--color-border-strong); }
.mz-state-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.mz-state-head .mz-h { margin: 0; }
.mz-state-empty { margin: 0; font-size: 13.5px; }
.mz-warn { margin: 10px 0 0; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; background: var(--color-warning-light); color: var(--color-text); }
.mz-form { max-width: 640px; }
.mz-form .form-group { margin-bottom: 14px; }
.mz-field-error { margin: 4px 0 0; font-size: 12.5px; font-weight: 600; color: var(--color-danger); }
.mz-form .form-control[aria-invalid="true"] { border-color: var(--color-danger); background: var(--color-danger-light); }
.mz-check { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 12px; font-size: 13.5px; cursor: pointer; }
.mz-linklist { margin: 0; padding: 0; list-style: none; }
.mz-linklist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 6px 0; border-bottom: 1px dashed var(--color-border); font-size: 13px; }
.mz-linklist li > a { overflow-wrap: anywhere; word-break: break-all; }
.mz-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; align-items: start; }
.mz-two > .card { margin-bottom: 0; }
.mz-video-preview { max-width: 260px; }

.mz-yr-wrap { margin-bottom: 12px; }
.mz-yr { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 720px; font-size: 12.5px; }
.mz-yr th, .mz-yr td { padding: 5px 4px; border-bottom: 1px solid var(--color-border); text-align: center; }
.mz-yr thead th { font-weight: 600; color: var(--color-text-muted); white-space: nowrap; }
.mz-yr th[scope="row"], .mz-yr thead th:first-child { position: sticky; left: 0; z-index: 1; min-width: 200px; max-width: 280px; padding-right: 10px; text-align: left; background: var(--color-surface); }
.mz-yr th[scope="row"] a { font-weight: 600; }
.mz-yr .is-now { background: var(--color-primary-light); }
.mz-yr thead th.is-now { color: var(--color-primary-dark); }
.mz-yr-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--color-primary); }
.mz-yr td.is-every .mz-yr-dot { width: 100%; max-width: 26px; height: 6px; border-radius: 999px; background: var(--color-primary-dark); opacity: .55; }
.mz-yr tfoot th, .mz-yr tfoot td { font-weight: 700; font-variant-numeric: tabular-nums; border-bottom: 0; }
.mz-yr-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; }
.mz-yr-list { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; }
.mz-yr-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; padding: 4px 0; border-bottom: 1px dashed var(--color-border); }
.mz-cal-select { width: auto; max-width: 100%; }
.mz-cell-freq { min-width: 170px; }
.mz-cell-freq .form-control { width: 100%; }
.mz-approval-link { white-space: nowrap; font-size: 13px; }

@media (max-width: 640px) {
  .mz-form-grid { grid-template-columns: 1fr; }
  .mz-span-2 { grid-column: auto; }
  .mz-two { grid-template-columns: 1fr; }
  .mz-toolbar .form-group { flex: 1 1 100%; min-width: 0; }
  .mz-rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mz-rtable, .mz-rtable tbody, .mz-rtable tr, .mz-rtable td { display: block; width: 100%; }
  .mz-rtable tr { padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
  .mz-rtable td { padding: 4px 0; border-bottom: 0; min-width: 0; }
  .mz-rtable td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--color-text-muted); }
  .mz-rtable td.mz-cell-actions { white-space: normal; }
  .mz-cell-actions > * { margin: 4px 4px 0 0; }
  .mz-role-input { width: 100%; }
  .mz-row-draft > td:first-child, .mz-row-pending > td:first-child { box-shadow: none; }
  .mz-row-draft, .mz-row-pending { border-left: 3px solid var(--color-warning); }
  .mz-row-pending { border-left-color: var(--color-danger); }
  .mz-progress-num strong { font-size: 22px; }
}
@media print {
  .mz-howto, .mz-listbar, .mz-cat-index, .sales-head-actions { display: none !important; }
}

.su-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--color-primary); border-left-width: 4px; border-radius: var(--radius); background: var(--color-primary-light); }
.su-banner-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-width: 0; }
.su-banner-title { font-weight: 700; color: var(--color-primary-dark); white-space: nowrap; }
.su-banner-count { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.su-banner .pg-meter { flex: 0 0 120px; width: 120px; margin-top: 0; background: var(--color-surface); }
.su-banner-next { font-size: 13.5px; color: var(--color-text); overflow-wrap: anywhere; }
.su-banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.su-banner-actions form { margin: 0; }

.su-flash { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--color-success-light); color: var(--color-text); font-size: 13.5px; }
.su-flash.is-error { background: var(--color-danger-light); }
.su-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 24px; align-items: start; }
@media (max-width: 760px) { .su-summary { grid-template-columns: 1fr; } }
.su-progress-label, .su-next-label { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); letter-spacing: 0.04em; }
.su-progress-value { margin: 2px 0 6px; font-size: 15px; font-variant-numeric: tabular-nums; }
.su-progress-value strong { font-size: 30px; font-weight: 800; }
.su-progress .pg-meter { max-width: none; height: 10px; }
.su-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--color-text-muted); }
.su-legend li { display: inline-flex; align-items: center; gap: 5px; }
.su-legend .su-check { flex-basis: 16px; width: 16px; height: 16px; margin: 0; font-size: 11px; }
.su-next { padding: 12px 14px; border: 1px solid var(--color-primary); border-radius: var(--radius); background: var(--color-primary-light); }
.su-next-complete { border-color: var(--color-success); background: var(--color-success-light); }
.su-next-title { margin: 4px 0; font-size: 17px; font-weight: 800; }
.su-banner-setting { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; grid-column: 1 / -1; margin: 0; padding-top: 10px; border-top: 1px dashed var(--color-border); font-size: 13px; color: var(--color-text-muted); }
.su-phase-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.su-phase-head > div { flex: 1; min-width: 0; }
.su-phase-no { flex: 0 0 32px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 800; }
.su-phase.is-finished .su-phase-no { background: var(--color-success-light); color: var(--color-success); }
.su-phase-title { margin: 0; font-size: 17px; }
.su-phase-lead { margin: 2px 0 0; font-size: 13px; color: var(--color-text-muted); }
.su-phase-count { flex: 0 0 auto; padding: 2px 10px; border-radius: 999px; background: var(--color-surface-muted); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.su-steps { margin: 0; padding: 0; list-style: none; }
.su-step { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--color-border); scroll-margin-top: 16px; }
.su-step:first-child { border-top: 0; }
.su-step.is-next { margin: 0 -10px; padding: 12px 10px; border-radius: var(--radius-sm); outline: 2px solid var(--color-primary); outline-offset: -2px; background: var(--color-primary-light); }
.su-step:target { box-shadow: 0 0 0 3px var(--color-primary-light); border-radius: var(--radius-sm); }
.su-check { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; display: grid; place-items: center; border: 2px solid var(--color-border-strong); border-radius: 5px; background: var(--color-surface); font-size: 14px; font-weight: 800; line-height: 1; }
.is-done > .su-check { border-color: var(--color-success); background: var(--color-success); color: var(--color-surface); }
.is-skipped > .su-check { border-color: var(--color-border); background: var(--color-surface-muted); color: var(--color-text-muted); }
.su-step-body { flex: 1; min-width: 0; }
.su-step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.su-step-title { margin: 0; font-size: 15px; }
.su-step.is-done .su-step-title, .su-step.is-skipped .su-step-title { color: var(--color-text-muted); }
.su-tag { padding: 0 7px; border: 1px solid var(--color-border-strong); border-radius: 999px; font-size: 11.5px; color: var(--color-text-muted); white-space: nowrap; }
.su-tag-next { border-color: var(--color-primary); color: var(--color-primary-dark); font-weight: 700; }
.su-state { margin-left: auto; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.su-state-done { color: var(--color-success); }
.su-state-skipped { color: var(--color-text-muted); }
.su-state-todo { color: var(--color-primary-dark); }
.su-why { margin: 4px 0 0; font-size: 13.5px; line-height: 1.6; }
.su-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 4px 0 0; font-size: 12.5px; color: var(--color-text-muted); }
.su-hint { margin: 4px 0 0; font-size: 12.5px; color: var(--color-text-muted); }
.su-hint::before { content: '💡 '; }
.su-step-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.su-inline-form { margin: 0; }
.su-print-only { display: none; }

.su-section-title { margin: 0 0 12px; font-size: 16px; }
.su-guide-card { border-left: 4px solid var(--color-primary); }
.su-guide-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.su-guide-head h2 { margin: 0; font-size: 17px; }
.su-guide-count { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.su-guide-card .pg-meter { max-width: none; height: 8px; margin: 8px 0 10px; }
.su-guide-next { margin: 0; }
.su-guide-next .su-why { display: block; color: var(--color-text-muted); }
.su-guide-done { margin: 0 0 16px; font-size: 13.5px; color: var(--color-text-muted); }
.su-tile-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px 20px; }
.su-tile-group h3 { margin: 0 0 8px; font-size: 13.5px; color: var(--color-text-muted); letter-spacing: 0.04em; }
.su-tile-group .module-home-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 0; }
.su-tile-group .module-home-tile { position: relative; padding: 10px 14px; }
.su-tile-group .module-home-tile.has-badge { padding-right: 46px; }
.su-tile-group .module-home-tile-icon { font-size: 20px; }
.su-tile-badge { position: absolute; top: 8px; right: 10px; min-width: 22px; padding: 0 6px; border: 1px solid var(--color-warning); border-radius: 999px; background: var(--color-warning-light); color: var(--color-text); font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }

@media (max-width: 480px) {
  .su-banner-actions { width: 100%; }
  .su-state { margin-left: 0; }
  .su-step.is-next { margin: 0; }
  .su-phase-head { gap: 8px; }
}
@media print {
  .su-banner-setting, .su-step-actions, .su-flash, .su-legend { display: none !important; }
  .su-print-only { display: block; margin: 0 0 8px; font-size: 12px; }
  .su-summary { display: block; }
  .su-next { margin-top: 10px; border: 1px solid #999; background: #fff; }
  .su-phase { page-break-inside: auto; }
  .su-step { page-break-inside: avoid; }
  .su-step.is-next { margin: 0; padding: 12px 0; outline: 0; background: #fff; }
  .su-check { border-color: #333; }
  .is-done > .su-check { background: #fff; color: #000; }
}

.sales-home-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sales-home-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sales-home-col > .card { margin-bottom: 0; }
.sales-timeline-compact { margin-bottom: 0; }
.sales-timeline-compact .sales-chips { margin-bottom: 6px; }
.sales-timeline-scroll { max-height: 820px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.sales-timeline-compact .sales-feed-day { margin: 10px 0 2px; position: sticky; top: 0; z-index: 1; padding: 2px 0; background: var(--color-surface); }
.sales-timeline-compact .sales-feed-item { grid-template-columns: 24px 1fr; gap: 8px; padding: 5px 0; font-size: 13px; }
.sales-timeline-compact .sales-feed-icon { width: 24px; height: 24px; font-size: 13px; }
.sales-timeline-compact .sales-feed-meta { font-size: 11.5px; }
.sales-timeline-compact .sales-feed-detail { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
@media (max-width: 960px) {
  .sales-home-split { grid-template-columns: 1fr; }
  .sales-timeline-scroll { max-height: 520px; }
}
.ih-section-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 16px; }
.ih-section-title .file-meta { font-weight: 400; }
.ih-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.ih-two > .card { margin-bottom: 0; }

.ih-std-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-bottom: 16px; }
.ih-std-card { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; background: var(--color-surface); border: 1px solid var(--color-border); border-top: 4px solid var(--color-primary); border-radius: var(--radius); box-shadow: var(--shadow-card); color: var(--color-text); min-width: 0; }
.ih-std-card-integration { border-top-color: var(--color-border-strong); background: var(--color-surface-muted); }
.ih-std-head { display: flex; align-items: flex-start; gap: 10px; }
.ih-std-icon { font-size: 28px; line-height: 1; }
.ih-std-name { flex: 1; min-width: 0; }
.ih-std-name h2 { margin: 0; font-size: 17px; }
.ih-std-name h2 a { color: var(--color-text); }
.ih-std-name h2 a:hover { color: var(--color-primary-dark); }
.ih-std-name p { margin: 2px 0 0; font-size: 12.5px; color: var(--color-text-muted); }
.ih-std-desc { margin: 0; font-size: 13px; line-height: 1.6; color: var(--color-text-muted); }
.ih-std-foot { margin-top: auto; padding-top: 4px; }
.ih-chip { flex: 0 0 auto; display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid var(--color-border); background: var(--color-surface-muted); color: var(--color-text-muted); }
.ih-chip-ok { border-color: var(--color-success); background: var(--color-success-light); color: var(--color-text); }
.ih-chip-warn { border-color: var(--color-warning); background: var(--color-warning-light); color: var(--color-text); }
.ih-chip-danger { border-color: var(--color-danger); background: var(--color-danger-light); color: var(--color-danger); }
.ih-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 0; }
.ih-fact { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.ih-fact dt { font-size: 11.5px; color: var(--color-text-muted); }
.ih-fact dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ih-fact.is-alert { background: var(--color-warning-light); box-shadow: inset 0 0 0 1px var(--color-warning); }
.ih-fact-sub { display: block; font-size: 11.5px; font-weight: 600; color: var(--color-danger); }
.ih-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }
.ih-shared-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ih-shared-links a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius-sm); border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text); font-size: 13.5px; }
.ih-shared-links a:hover { border-color: var(--color-primary); color: var(--color-primary-dark); text-decoration: none; }

.ih-list { list-style: none; margin: 0; padding: 0; }
.ih-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 7px 0; border-bottom: 1px solid var(--color-surface-muted); }
.ih-list li:last-child { border-bottom: 0; }
.ih-when { flex: 0 0 auto; min-width: 84px; font-size: 12.5px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ih-what { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.ih-kind { flex: 0 0 auto; padding: 0 8px; border-radius: 999px; font-size: 11.5px; background: var(--color-surface-muted); color: var(--color-text-muted); }
.ih-kind.is-audit { background: var(--color-primary-light); color: var(--color-primary-dark); }
.ih-meter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 8px; }
.ih-meter-row .pg-meter { flex: 1 1 120px; margin-top: 0; }
.ih-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px 20px; }
.ih-group h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0 0 8px; font-size: 13.5px; color: var(--color-text); letter-spacing: 0.02em; }
.ih-group-note { font-size: 11.5px; font-weight: 400; color: var(--color-text-muted); }
.ih-group .module-home-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 0; }
.ih-group .module-home-tile { padding: 10px 14px; }
.ih-group .module-home-tile-icon { font-size: 20px; }
.ih-tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600; vertical-align: middle; background: var(--color-primary-light); color: var(--color-primary-dark); }

.ih-explain { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; margin-bottom: 16px; }
.ih-explain > section { padding: 12px 16px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.ih-explain h2 { margin: 0 0 6px; font-size: 14.5px; }
.ih-explain ul { margin: 0; padding-left: 1.2em; font-size: 13px; line-height: 1.7; color: var(--color-text-muted); }
.ih-explain h3 { margin: 0 0 6px; font-size: 14.5px; }
.ih-integrated { scroll-margin-top: 16px; }
.ih-integrated-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.ih-integrated-head .ih-section-title { margin-bottom: 0; }
.ih-integrated-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ih-integrated-lead { margin: 6px 0 14px; font-size: 13px; line-height: 1.7; color: var(--color-text-muted); }
.ih-integrated .ih-explain > section { background: var(--color-surface-muted); }
.ih-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ih-table { width: 100%; border-collapse: collapse; }
.ih-table th, .ih-table td { padding: 8px 10px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.ih-table thead th { font-size: 12.5px; color: var(--color-text-muted); white-space: nowrap; }
.ih-table .ih-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ih-table td.is-alert { background: var(--color-warning-light); }
.ih-cell-sub { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.ih-table td.is-alert .ih-cell-sub { color: var(--color-danger); }
.ih-nowrap { white-space: nowrap; }
.ih-manual-head h2 { margin: 0 0 4px; font-size: 17px; }
.ih-manual-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ih-manual-actions form { margin: 0; }
.ih-manual-body .manual-section { margin-bottom: 20px; }
.ih-manual-sub { margin: 10px 0 10px 18px; padding-left: 12px; border-left: 3px solid var(--color-border-strong); }
.ih-manual-sub h4 { margin: 0 0 4px; font-size: 14px; }
.ih-manual-sub p { margin: 4px 0; }
@media (max-width: 480px) { .ih-manual-sub { margin-left: 4px; } .ih-std-card { padding: 14px; } }

.id-muted { color: var(--color-text-muted); }
.id-sub { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--color-text-muted); overflow-wrap: anywhere; }
.id-count { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
.id-note { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--color-surface-muted); color: var(--color-text-muted); font-size: 13.5px; }
.id-inline-form { display: inline-flex; margin: 0; }
.id-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 4px; }
.id-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.id-list > h2, .id-history > h2, .id-tools > h2, .id-roles-card > h2, .id-holders > h2, .id-action > h2 { margin: 0 0 12px; font-size: 16px; }

.id-listbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.id-listbar .sales-chips { margin: 0; }
.id-search { display: flex; flex: 0 1 320px; gap: 6px; min-width: 0; margin: 0; }
.id-search .form-control { flex: 1; min-width: 0; padding: 6px 10px; }
.id-result-note { margin: 0 0 8px; font-size: 13px; color: var(--color-text-muted); }
.id-table-wrap { overflow-x: auto; }
.id-rtable td { vertical-align: top; }
.id-cell-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.id-row-mine > td { background: var(--color-warning-light); }
.id-row-mine > td:first-child { box-shadow: inset 3px 0 0 var(--color-warning); }
@media (max-width: 640px) {
  .id-rtable thead { display: none; }
  .id-rtable, .id-rtable tbody, .id-rtable tr, .id-rtable td { display: block; width: 100%; }
  .id-rtable tr { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
  .id-rtable td { position: relative; padding: 3px 0 3px 7em; border: 0; min-width: 0; white-space: normal; }
  .id-rtable td[data-label]::before {
    content: attr(data-label); position: absolute; left: 0; top: 4px; width: 6.5em;
    font-size: 12px; color: var(--color-text-muted);
  }
  .id-rtable td.id-cell-title, .id-rtable td.id-role-name, .id-rtable td:not([data-label]) { padding-left: 0; font-size: 15px; }
  .id-rtable td.id-cell-title::before, .id-rtable td.id-role-name::before { content: none; }
  .id-search { flex-basis: 100%; }
}

.id-facts-card .sales-facts { margin: 0; }
.id-action { border-color: var(--color-warning); background: var(--color-warning-light); }
.id-action > h2 { color: var(--color-warning-dark); }
.id-action > h2 ~ h2 { margin-top: 14px; }
.id-action-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-top: 1px dashed var(--color-border-strong); }
.id-action > h2 + .id-action-item, .id-action > .id-sub + .id-action-item { border-top: 0; padding-top: 4px; }
.id-action-text { flex: 1 1 280px; min-width: 0; }
.id-action-summary { display: block; margin-top: 4px; font-weight: 600; overflow-wrap: anywhere; }
.id-action-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.id-reject-form { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.id-reject-form .form-control { width: 200px; max-width: 100%; padding: 6px 10px; font-size: 13px; }
.id-action-info { border-color: var(--color-border-strong); background: var(--color-surface-muted); }
.id-action-info p { margin: 0; }
.id-action-info p + p { margin-top: 6px; }
.id-doc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.id-doc-head h2 { margin: 0; font-size: 17px; }
.id-ver { font-variant-numeric: tabular-nums; }
.id-docbody {
  margin-top: 14px; padding: 18px 20px; max-width: 80ch; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-surface); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.9;
}
.id-docbody-html { margin-top: 14px; overflow-x: auto; }
.id-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--color-border); }
.id-tl { position: relative; padding: 0 0 18px 14px; scroll-margin-top: 16px; }
.id-tl:last-child { padding-bottom: 0; }
.id-tl::before {
  content: ''; position: absolute; left: -26px; top: 4px; box-sizing: border-box; width: 14px; height: 14px; border-radius: 50%;
  background: var(--color-surface); border: 2px solid var(--color-border-strong);
}
.id-tl.is-approved::before { background: var(--color-success); border-color: var(--color-success); }
.id-tl.is-pending_approval::before { background: var(--color-warning); border-color: var(--color-warning); }
.id-tl.is-draft::before { border-color: var(--color-primary); }
.id-tl.is-rejected::before { background: var(--color-danger); border-color: var(--color-danger); }
.id-tl.is-superseded::before { background: var(--color-surface-muted); }
.id-tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.id-tl-summary { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.id-tl-steps { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; color: var(--color-text-muted); }
.id-step-label { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px; background: var(--color-surface-muted); color: var(--color-text); font-size: 11.5px; font-weight: 700; }
.id-tl-steps .is-rejected { color: var(--color-danger-dark); }
.id-reject-reason { display: block; }
.id-tl-body { margin-top: 6px; }
.id-tl-body > summary { cursor: pointer; font-size: 13px; color: var(--color-primary-dark); }
.id-tl-body .id-docbody { margin-top: 8px; font-size: 14px; }
.id-danger-zone { border-color: var(--color-danger-light); }
.id-danger-zone > h2 { margin: 0 0 6px; font-size: 15px; color: var(--color-danger-dark); }
.id-danger-zone form { margin-top: 10px; }

.id-tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.id-tool { padding: 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.id-tool h3 { margin: 0 0 4px; font-size: 15px; }
.id-tool p { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: var(--color-text-muted); }
.id-tool-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.id-howto ol, .id-howto ul { margin: 8px 0 0; padding-left: 1.4em; font-size: 13.5px; line-height: 1.75; }
.id-howto li + li { margin-top: 4px; }

.id-policy { padding: 32px clamp(18px, 5vw, 48px); border-top: 4px solid var(--color-primary); }
.id-policy-kicker { margin: 0; font-size: 12.5px; letter-spacing: 0.12em; color: var(--color-text-muted); }
.id-policy-title { margin: 6px 0 20px; font-size: 26px; letter-spacing: 0.08em; }
.id-policy-body { max-width: 68ch; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16.5px; line-height: 2; }
.id-policy-body-sm { max-width: none; margin-top: 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--color-surface-muted); font-size: 14px; line-height: 1.8; }
.id-policy-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--color-border); }
.id-policy-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; font-size: 13px; }
.id-policy-meta dt { font-size: 11.5px; color: var(--color-text-muted); }
.id-policy-meta dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.id-policy-sign { margin: 0; font-size: 15px; font-weight: 700; }
.id-policy-empty { border-top-style: dashed; }
.id-policy-textarea { font-size: 15px; line-height: 1.8; }
.id-policy-history { list-style: none; margin: 0; padding: 0; }
.id-policy-history li { padding: 8px 0; border-bottom: 1px solid var(--color-surface-muted); }
.id-policy-history li:last-child { border-bottom: 0; }
.id-policy-history summary { cursor: pointer; }
.id-policy-history summary .id-sub { display: inline; margin-left: 6px; }
@media (max-width: 480px) { .id-policy-title { font-size: 22px; } .id-policy-body { font-size: 15.5px; line-height: 1.9; } }

.id-holders-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px; margin: 0 0 8px; }
.id-holders-list dt { font-size: 12px; color: var(--color-text-muted); }
.id-holders-list dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.id-role-name { min-width: 9em; font-weight: 700; }
.id-pre { min-width: 12em; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.id-cell-actions { white-space: nowrap; }
.id-cell-actions .id-inline-form { margin-left: 4px; }
.id-presets { margin-bottom: 12px; }
.id-presets-label { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--color-text-muted); }
.id-preset-list { display: flex; flex-wrap: wrap; gap: 6px; }
.id-preset {
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--color-border-strong); background: var(--color-surface);
  color: var(--color-text); font: inherit; font-size: 13px; cursor: pointer;
}
.id-preset:hover, .id-preset:focus-visible { border-color: var(--color-primary); color: var(--color-primary-dark); }

.id-steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.id-steps li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--color-border); background: var(--color-surface); font-size: 13px; color: var(--color-text-muted);
}
.id-steps li.is-current { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 700; }
.id-step-no { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--color-surface-muted); color: var(--color-text); font-size: 12px; font-weight: 700; }
.id-steps li.is-current .id-step-no { background: var(--color-primary); color: #fff; }
.id-manual-layout { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.id-manual-layout > .card { margin-bottom: 0; }
.id-toc { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.id-toc h2 { margin: 0 0 8px; font-size: 14px; }
.id-toc ol { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.id-toc li a { display: block; padding: 4px 6px; border-radius: var(--radius-sm); color: var(--color-text); }
.id-toc li a:hover { background: var(--color-surface-muted); text-decoration: none; }
.id-clause { display: inline-block; min-width: 3em; font-weight: 700; color: var(--color-primary-dark); font-variant-numeric: tabular-nums; }
.id-manual { padding: 28px clamp(16px, 4vw, 40px); }
.id-manual-cover { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--color-border); text-align: center; }
.id-manual-cover h2 { margin: 6px 0 4px; font-size: 24px; letter-spacing: 0.06em; }
.id-manual-cover p:last-child { margin: 0; font-weight: 600; }
.id-manual .id-manual-section { margin: 0 0 24px; padding: 0; border: 0; background: none; box-shadow: none; scroll-margin-top: 16px; }
.id-manual-section h3 { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--color-primary-light); font-size: 16px; }
.id-manual-section p { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.85; }
.id-register p { margin: 0 0 10px; }
@media (max-width: 860px) { .id-manual-layout { grid-template-columns: 1fr; } .id-toc { position: static; max-height: 260px; } }

@media print {
  .id-noprint, .id-page .sales-head-actions, .id-page .pg-back, .id-page details.collapsible-card { display: none !important; }
  .id-row-mine > td { background: none; box-shadow: none; }
  .id-docbody { max-width: none; padding: 0; border: 0; }
  .id-policy { padding: 0; border: 0; box-shadow: none; }
  .id-policy-body { max-width: none; font-size: 13pt; }
  .id-manual-layout { display: block; }
  .id-manual { padding: 0; border: 0; box-shadow: none; }
}

.ia-page { min-width: 0; }
.ia-clause { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; background: var(--color-primary-light); color: var(--color-primary-dark); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ia-page .sales-kpi-value small { margin-left: 2px; font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
.ia-plan-note { margin: -6px 0 14px; font-size: 13px; line-height: 1.6; color: var(--color-text-muted); }
.ia-plan-note strong { color: var(--color-text); }
.ia-hint { margin: 4px 0 10px; font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); }
.ia-h2 { margin: 0 0 10px; font-size: 16px; }
.ia-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.ia-card-head h2 { margin: 0; font-size: 16px; }
.ia-count { font-size: 12.5px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ia-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.ia-nowrap { white-space: nowrap; }
.ia-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.ia-text { font-size: 14px; line-height: 1.7; }
.ia-inline-form { display: inline-block; margin: 0; }
.ia-foot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
.ia-summary .sales-facts { margin-top: 12px; }
.ia-howto > summary { cursor: pointer; font-weight: 700; color: var(--color-text-muted); }
.ia-howto ul { margin: 10px 0 0; padding-left: 1.3em; font-size: 13px; line-height: 1.7; color: var(--color-text-muted); }
.ia-howto li + li { margin-top: 4px; }

.ia-toolbar { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.ia-toolbar .sales-chips { margin-bottom: 4px; }
.ia-toolbar .form-group { margin-bottom: 8px; }
.ia-table-wrap { overflow-x: auto; }
.ia-table { width: 100%; border-collapse: collapse; }
.ia-table th, .ia-table td { vertical-align: top; }
.ia-table .ia-td-main { min-width: 14em; }
.ia-table tr.ia-row-done td { color: var(--color-text-muted); }
.ia-table td .pg-meter { max-width: 120px; }
.ia-table td .ia-inline-form { margin: 4px 0 0 4px; }
@media (max-width: 640px) {
  .ia-table thead { display: none; }
  .ia-table, .ia-table tbody, .ia-table tr, .ia-table td { display: block; width: 100%; }
  .ia-table tr { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
  .ia-table td { padding: 3px 0; border: 0; }
  .ia-table td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 5.5em; margin-right: 8px; font-size: 12px; color: var(--color-text-muted); }
  .ia-table td.ia-td-main::before { display: none; }
  .ia-table .ia-td-main { min-width: 0; font-size: 15px; }
  .ia-nowrap { white-space: normal; }
}

.ia-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ia-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); font-size: 13px; color: var(--color-text-muted); }
.ia-step-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--color-surface-muted); font-size: 12px; font-weight: 700; }
.ia-steps li.is-done { border-color: var(--color-success); color: var(--color-text); }
.ia-steps li.is-done .ia-step-no { background: var(--color-success-light); color: var(--color-success); }
.ia-steps li.is-current { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 700; }
.ia-steps li.is-current .ia-step-no { background: var(--color-primary); color: #fff; }

.ia-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 12px; }
.ia-progress .pg-meter { flex: 1 1 200px; max-width: 360px; height: 8px; margin-top: 0; }
.ia-cl-group { margin-top: 16px; }
.ia-cl-group h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--color-border); font-size: 14.5px; }
.ia-cl-item { margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--color-border); border-left: 4px solid var(--color-border-strong); border-radius: var(--radius-sm); background: var(--color-surface); scroll-margin-top: 80px; }
.ia-cl-item.is-conform { border-left-color: var(--color-success); }
.ia-cl-item.is-nonconformity { border-left-color: var(--color-danger); background: var(--color-danger-light); }
.ia-cl-item:target { box-shadow: 0 0 0 2px var(--color-primary); }
.ia-cl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ia-cl-clause { font-size: 12px; font-weight: 700; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ia-cl-text { margin: 4px 0 8px; font-size: 14px; line-height: 1.6; }
.ia-cl-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ia-cl-field { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 12px; font-weight: normal; color: var(--color-text-muted); }
.ia-cl-judge { flex: 0 0 9em; }
.ia-cl-comment { flex: 1 1 14em; min-width: 0; }
.ia-cl-item > .ia-hint, .ia-cl-item > .ia-inline-form { margin: 6px 0 0; }

.ia-snap { display: grid; gap: 12px; }
.ia-snap-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.ia-snap-score-label { font-size: 13px; color: var(--color-text-muted); }
.ia-snap-score-num { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ia-snap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ia-snap-sec { padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.ia-snap-sec h3 { margin: 0 0 6px; font-size: 13px; color: var(--color-text-muted); }
.ia-snap-sec dl { margin: 0; }
.ia-snap-sec dl > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; padding: 5px 0; border-top: 1px dashed var(--color-border); }
.ia-snap-sec dl > div:first-child { border-top: 0; }
.ia-snap-sec dt { flex: 1 1 8em; font-size: 13px; }
.ia-snap-sec dd { margin: 0; font-size: 18px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.ia-snap-sec dd small { margin-left: 2px; font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
.ia-snap-sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--color-text-muted); }
.ia-snap-sec dl > div.is-alert dd { color: var(--color-danger); }
.ia-snap-sec dl > div.is-alert dt::before { content: '●'; margin-right: 4px; font-size: 10px; color: var(--color-danger); }
.ia-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 16px; }
.ia-task-box { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.ia-task-box > strong { display: block; margin-bottom: 6px; font-size: 13.5px; }
.ia-task-box p { margin: 0; }

.ia-approval { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; border-left: 6px solid var(--color-border-strong); }
.ia-approval-pending { border-left-color: var(--color-warning); background: var(--color-warning-light); }
.ia-approval-approved { border-left-color: var(--color-success); }
.ia-approval-main { flex: 1 1 320px; min-width: 0; }
.ia-approval-main p { margin: 4px 0; line-height: 1.6; }
.ia-approval-state { font-size: 20px; font-weight: 800; }
.ia-approval-approved .ia-approval-state { color: var(--color-success); }
.ia-approval-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; color: var(--color-text-muted); }
.ia-approval-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ia-changes { margin-top: 8px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); font-size: 13px; }
.ia-changes ul { margin: 4px 0 0; padding-left: 1.3em; }

.ia-plan { --ia-plan-cols: minmax(9em, 1.6fr) repeat(12, minmax(2.2em, 1fr)) 4em; margin: 4px 0 12px; }
.ia-plan-row { display: grid; grid-template-columns: var(--ia-plan-cols); align-items: center; gap: 4px; }
.ia-plan-headrow { padding-bottom: 4px; border-bottom: 1px solid var(--color-border-strong); font-size: 12px; font-weight: 700; color: var(--color-text-muted); text-align: center; }
.ia-plan-headrow .ia-plan-name, .ia-plan-foot .ia-plan-name { text-align: left; }
.ia-plan-headrow .ia-plan-mh.is-now, .ia-plan-foot .ia-plan-mh.is-now { border-radius: var(--radius-sm); background: var(--color-primary-light); color: var(--color-primary-dark); }
.ia-plan-item { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.ia-plan-name { min-width: 0; }
.ia-plan-name .form-control { font-weight: 600; }
.ia-mcell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 40px; margin: 0; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); font-size: 11px; font-weight: normal; line-height: 1; color: var(--color-text-muted); cursor: pointer; user-select: none; }
.ia-mcell input { margin: 0; accent-color: var(--color-primary); }
.ia-mcell small { display: none; font-size: inherit; }
.ia-mcell.is-now { box-shadow: inset 0 -3px 0 var(--color-primary); }
.ia-mcell:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 700; }
.ia-mcell:has(input:disabled) { cursor: default; }
.ia-mcell:focus-within { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.ia-plan-count { font-size: 12px; color: var(--color-text-muted); text-align: center; white-space: nowrap; }
.ia-plan-count strong { font-size: 16px; color: var(--color-text); font-variant-numeric: tabular-nums; }
.ia-plan-extra { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ia-plan-extra .form-control { flex: 1 1 16em; min-width: 0; }
.ia-plan-del { margin: 4px 0 0; text-align: right; }
.ia-plan-foot { padding-top: 6px; font-size: 12px; font-weight: 700; color: var(--color-text-muted); text-align: center; font-variant-numeric: tabular-nums; }
.ia-add-item { display: flex; flex-wrap: wrap; gap: 8px; }
.ia-add-item .form-control { flex: 1 1 14em; max-width: 22em; }
@media (max-width: 760px) {
  .ia-plan { --ia-plan-cols: repeat(6, minmax(0, 1fr)); }
  .ia-plan-headrow, .ia-plan-foot { display: none; }
  .ia-plan-name { grid-column: 1 / -1; }
  .ia-plan-count { grid-column: 1 / -1; text-align: left; }
  .ia-mcell small { display: inline; }
}

.ia-dept-row { display: grid; grid-template-columns: minmax(8em, 1fr) auto minmax(10em, 2fr) auto; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.ia-dept-name { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.ia-dept-name .file-meta { display: block; font-weight: normal; }
.ia-dept-times { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; font-weight: normal; white-space: nowrap; }
.ia-dept-times .form-control { width: 4.5em; }
.ia-dept-timing { min-width: 0; }
@media (max-width: 640px) {
  .ia-dept-row { grid-template-columns: 1fr auto; }
  .ia-dept-name, .ia-dept-timing { grid-column: 1 / -1; }
}

.ia-cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.ia-cal-toolbar .ia-count { margin-left: auto; }
.ia-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 10px; padding: 0; list-style: none; font-size: 12.5px; color: var(--color-text-muted); }
.ia-legend li { display: inline-flex; align-items: center; gap: 5px; }
.ia-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--color-primary); }
.ia-dot-auto { background: var(--color-success); }
.ia-dot-today { background: var(--color-accent, var(--color-primary)); }
.ia-dot-statutory { background: var(--color-danger-light); box-shadow: inset 0 0 0 1px var(--color-danger); }
.ia-dot-scheduled { background: var(--color-warning-light); box-shadow: inset 0 0 0 1px var(--color-warning); }
.ia-cal-scroll { overflow-x: auto; }
.ia-cal .calendar-event.ia-ev { display: block; width: 100%; text-align: left; border-left: 3px solid var(--color-primary); }
.ia-cal .calendar-event.ia-ev-auto { border-left-color: var(--color-success); background: var(--color-success-light); color: var(--color-text); }
.ia-ev-time { margin-right: 3px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ia-today-tag { margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--color-accent, var(--color-primary)); color: #fff; font-size: 10px; font-weight: 700; vertical-align: 1px; }
@media (max-width: 640px) {
  .ia-cal .calendar-cell { min-height: 58px; padding: 3px; font-size: 11px; }
  .ia-cal .calendar-event { padding: 1px 3px; font-size: 10px; }
  .ia-cal .ia-ev-time, .ia-cal .holiday-tag, .ia-today-tag { display: none; }
  .ia-cal-toolbar .ia-count { width: 100%; margin-left: 0; }
}
.ia-agenda { margin: 0; padding: 0; list-style: none; }
.ia-agenda li { display: flex; align-items: baseline; gap: 8px; padding: 7px 4px; border-top: 1px solid var(--color-border); }
.ia-agenda li:first-child { border-top: 0; }
.ia-agenda li.is-today { border-radius: var(--radius-sm); background: var(--color-primary-light); }
.ia-agenda li.is-past .ia-agenda-date, .ia-agenda li.is-past a { color: var(--color-text-muted); }
.ia-agenda-date { flex: 0 0 6.5em; font-weight: 700; font-variant-numeric: tabular-nums; }
.ia-agenda-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ia-agenda-main .file-meta { display: block; }
.ia-agenda .ia-dot { align-self: center; }
.ia-desc { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--color-surface-muted); }

.ir-clause { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--color-primary-light); color: var(--color-primary-dark); vertical-align: 1px; }
.ir-muted { font-size: 12.5px; font-weight: 400; color: var(--color-text-muted); }
.ir-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--color-text-muted); overflow-wrap: anywhere; }
.ir-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--color-text-muted); }
.ir-warn-text { color: var(--color-warning-dark); font-weight: 600; }
.ir-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ir-pre { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ir-h { margin: 0 0 10px; font-size: 16px; }
.ir-h3 { margin: 14px 0 6px; font-size: 14px; }
.ir-count { display: inline-block; min-width: 1.6em; padding: 0 6px; border-radius: 999px; font-size: 12px; text-align: center; background: var(--color-surface-muted); color: var(--color-text-muted); }
.ir-empty { margin: 4px 0 10px; font-size: 13px; color: var(--color-text-muted); }
.ir-inline-form { display: inline-flex; margin: 0; }
.ir-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ir-foot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.ir-list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.ir-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 20px; }
.ir-grid-2 > * { min-width: 0; margin-bottom: 0; }
.ir-chip-rows .sales-chips { margin-bottom: 8px; }
.ir-filter-note { margin: 0 0 10px; padding: 6px 10px; border-radius: var(--radius-sm); font-size: 13px; background: var(--color-primary-light); color: var(--color-text); }
.ir-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0 0 10px; }
.ir-toolbar .ir-field .form-control { min-width: 12em; }
.ir-howto > summary { cursor: pointer; font-weight: 700; color: var(--color-primary-dark); }
.ir-howto ul { margin: 10px 0 0; padding-left: 1.3em; font-size: 13px; line-height: 1.8; color: var(--color-text-muted); }

.ir-level { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--color-text); background: var(--color-surface-muted); border-left: 4px solid var(--color-border-strong); }
.ir-level-high { background: var(--color-danger-light); border-left-color: var(--color-danger); }
.ir-level-medium { background: var(--color-warning-light); border-left-color: var(--color-warning); }
.ir-level-low { background: var(--color-success-light); border-left-color: var(--color-success); }

.ir-matrix-wrap { overflow-x: auto; }
.ir-matrix { width: 100%; max-width: 440px; margin: 0 auto; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.ir-matrix th { padding: 4px; font-size: 12px; font-weight: 600; text-align: center; color: var(--color-text-muted); }
.ir-matrix tbody th { width: 3em; text-align: right; }
.ir-matrix-corner { width: 5.5em; }
.ir-matrix-corner span { display: block; font-size: 11px; line-height: 1.3; }
.ir-heat { height: 64px; padding: 0; text-align: center; vertical-align: middle; border: 2px solid transparent; border-radius: var(--radius-sm); color: var(--color-text); }
.ir-heat-high { background: var(--color-danger-light); }
.ir-heat-medium { background: var(--color-warning-light); }
.ir-heat-low { background: var(--color-success-light); }
.ir-heat a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60px; height: 100%; color: var(--color-text); text-decoration: none; }
.ir-heat a:hover, .ir-heat a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; border-radius: var(--radius-sm); text-decoration: none; }
.ir-heat-count { font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ir-heat-sub { font-size: 11px; font-weight: 700; color: var(--color-text); }
.ir-heat-zero { color: var(--color-text-muted); opacity: 0.6; }
.ir-heat-here { font-size: 22px; color: var(--color-text); }
.ir-heat.is-active { border-color: var(--color-primary); }
.ir-heat.is-here { border-color: var(--color-text); }
.ir-matrix-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12px; color: var(--color-text-muted); }

.ir-table-wrap { overflow-x: auto; }
.ir-rtable { width: 100%; border-collapse: collapse; }
.ir-rtable th, .ir-rtable td { padding: 8px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.ir-rtable thead th { font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--color-text-muted); }
.ir-cell-title { min-width: 14em; overflow-wrap: anywhere; }
.ir-rtable tr.ir-row-high > td:first-child, .ir-rtable tr.ir-row-overdue > td:first-child, .ir-rtable tr.ir-row-bad > td:first-child,
.ir-rtable tr.ir-legal-action > td:first-child, .ir-rtable tr.ir-legal-overdue > td:first-child { box-shadow: inset 4px 0 0 var(--color-danger); }
.ir-rtable tr.ir-row-medium > td:first-child, .ir-rtable tr.ir-legal-unreviewed > td:first-child, .ir-rtable tr.ir-row-pending > td:first-child { box-shadow: inset 4px 0 0 var(--color-warning); }
.ir-rtable tr.ir-row-low > td:first-child { box-shadow: inset 4px 0 0 var(--color-success); }
.ir-row-closed, .ir-legal-not_applicable { opacity: 0.6; }
.ir-people tr.is-selected > td { background: var(--color-primary-light); }

.ir-obj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.ir-obj { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 14px; border: 1px solid var(--color-border); border-left: 4px solid var(--color-border-strong); border-radius: var(--radius); background: var(--color-surface); }
.ir-obj-in_progress { border-left-color: var(--color-warning); }
.ir-obj-pending_review { border-left-color: var(--color-primary); }
.ir-obj-achieved { border-left-color: var(--color-success); }
.ir-obj-not_achieved, .ir-obj-overdue { border-left-color: var(--color-danger); }
.ir-obj-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ir-obj-title { flex: 1 1 12em; margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.ir-obj-desc { margin: 0; font-size: 13px; white-space: pre-wrap; color: var(--color-text-muted); }
.ir-obj-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5em, 1fr)); gap: 6px 12px; margin: 0; }
.ir-obj-facts dt { font-size: 11.5px; color: var(--color-text-muted); }
.ir-obj-facts dd { margin: 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ir-progress { display: flex; align-items: center; gap: 8px; }
.ir-progress .pg-meter { flex: 1 1 auto; min-width: 60px; max-width: none; margin-top: 0; }
.ir-progress-num { font-size: 12px; white-space: nowrap; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ir-approve { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; background: var(--color-warning-light); color: var(--color-text); }
.ir-followup { font-size: 13px; }
.ir-obj-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 8px; margin: 0; padding-top: 8px; border-top: 1px dashed var(--color-border); }
.ir-field { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 11.5px; font-weight: 400; color: var(--color-text-muted); }
.ir-field .form-control { width: auto; min-width: 0; padding: 4px 6px; }
.ir-obj-form .ir-field { flex: 1 1 7em; }
.ir-obj-form .ir-field-wide { flex: 2 1 12em; }
.ir-obj-form .ir-field .form-control { width: 100%; }
.ir-obj-foot { display: flex; justify-content: flex-end; }

.ir-attn { border-color: var(--color-warning); background: var(--color-warning-light); color: var(--color-text); }
.ir-attn-list { margin: 0; padding: 0; list-style: none; }
.ir-attn-list > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--color-border); }
.ir-attn-list > li:first-child { border-top: 0; }

.ir-check-list { display: grid; gap: 8px; margin: 10px 0 12px; }
.ir-check { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-weight: 400; }
.ir-check input { margin-top: 4px; }

.ir-add { margin: 0 0 12px; padding: 8px 10px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-sm); }
.ir-add > summary { cursor: pointer; font-weight: 700; color: var(--color-primary-dark); }
.ir-add[open] > summary { margin-bottom: 8px; }
.ir-issue-list { display: grid; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.ir-issue { padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.ir-issue .ir-pre { margin: 0 0 4px; }
.ir-issue-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.ir-party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.ir-party { padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.ir-party h4 { margin: 0 0 6px; font-size: 14.5px; overflow-wrap: anywhere; }
.ir-party dl { display: grid; gap: 4px; margin: 0 0 6px; }
.ir-party dt { font-size: 11.5px; color: var(--color-text-muted); }
.ir-party dd { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }

.ir-qual-list { display: flex; flex-wrap: wrap; gap: 4px; }
.ir-qual { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--color-border); background: var(--color-surface-muted); color: var(--color-text); }
.ir-qual.is-expired { border-color: var(--color-danger); background: var(--color-danger-light); }
.ir-qual.is-soon { border-color: var(--color-warning); background: var(--color-warning-light); }
.ir-eff-form { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0 0; }
.ir-eff-form .form-control { width: auto; min-width: 0; padding: 4px 6px; font-size: 12px; }
.ir-eff-form input.form-control { flex: 1 1 9em; }

.ir-bars { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ir-bars > li { display: grid; grid-template-columns: minmax(6em, 9em) minmax(60px, 1fr) auto; align-items: center; gap: 4px 10px; font-size: 13px; }
.ir-bars .pg-meter { max-width: none; height: 8px; margin-top: 0; }
.ir-bars-label { overflow-wrap: anywhere; }
.ir-bars-num { white-space: nowrap; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ir-bars-sub { grid-column: 1 / -1; font-size: 12px; color: var(--color-text-muted); }
.ir-bars-wide > li { padding-bottom: 6px; border-bottom: 1px solid var(--color-border); }

@media (max-width: 860px) {
  .ir-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ir-rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ir-rtable, .ir-rtable tbody, .ir-rtable tr, .ir-rtable td { display: block; width: 100%; }
  .ir-rtable tr { margin-bottom: 8px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
  .ir-rtable td { min-width: 0; padding: 3px 0; border-bottom: 0; }
  .ir-rtable td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--color-text-muted); }
  .ir-rtable tr > td:first-child { box-shadow: none !important; }
  .ir-rtable tr.ir-row-high, .ir-rtable tr.ir-row-overdue, .ir-rtable tr.ir-row-bad, .ir-rtable tr.ir-legal-action, .ir-rtable tr.ir-legal-overdue { border-left: 4px solid var(--color-danger); }
  .ir-rtable tr.ir-row-medium, .ir-rtable tr.ir-legal-unreviewed, .ir-rtable tr.ir-row-pending { border-left: 4px solid var(--color-warning); }
  .ir-rtable tr.ir-row-low { border-left: 4px solid var(--color-success); }
  .ir-cell-title { min-width: 0; }
  .ir-matrix { max-width: none; }
  .ir-heat { height: 52px; }
  .ir-heat a { min-height: 48px; }
  .ir-bars > li { grid-template-columns: minmax(5em, 7em) minmax(50px, 1fr) auto; }
}


.ic-clause { display: inline-block; margin-right: 6px; padding: 1px 8px; border: 1px solid var(--color-border-strong); border-radius: 999px; background: var(--color-surface-muted); color: var(--color-text-muted); font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: 1px; }
.ic-muted { color: var(--color-text-muted); }
.ic-sub { margin: 6px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); }
.ic-label { margin: 0 0 4px; font-size: 12px; font-weight: 700; color: var(--color-text-muted); }
.ic-text + .ic-label, .ic-empty + .ic-label { margin-top: 12px; }
.ic-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.ic-empty { margin: 0; font-size: 13px; color: var(--color-text-muted); }
.ic-sep { margin: 0 4px; color: var(--color-border-strong); }
.ic-count { margin-left: 6px; font-size: 12.5px; font-weight: 600; color: var(--color-text-muted); }
.ic-h { margin: 0 0 12px; font-size: 16px; }
.ic-subhead { margin: 18px 0 8px; font-size: 14px; }
.ic-section-title { margin: 24px 0 10px; font-size: 18px; }
.ic-nowrap { white-space: nowrap; }
.ic-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.ic-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ic-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic-inline-form { display: inline; }
.ic-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 24px; }
.ic-listbar .sales-chips { margin-bottom: 8px; }
.ic-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 4px; }
.ic-card-head .ic-h { margin: 0; }
.ic-kpi-link { color: inherit; }
.ic-kpi-link:hover { color: var(--color-primary-dark); text-decoration: none; }
.ic-kpi-link small { margin-left: 2px; font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
.ic-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ic-table { width: 100%; }
.ic-table th { white-space: nowrap; }
.ic-private { margin: 0 0 14px; padding: 8px 12px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-sm); background: var(--color-surface-muted); font-size: 13px; color: var(--color-text-muted); }

.ic-howto > summary, .ic-search > summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--color-text-muted); }
.ic-howto > summary::-webkit-details-marker, .ic-search > summary::-webkit-details-marker { display: none; }
.ic-howto > summary::before, .ic-search > summary::before { content: '▸'; display: inline-block; margin-right: 6px; transition: transform .15s; }
.ic-howto[open] > summary::before, .ic-search[open] > summary::before { transform: rotate(90deg); }
.ic-howto > summary:hover, .ic-search > summary:hover { color: var(--color-primary-dark); }
.ic-howto ul { max-width: 90ch; margin: 10px 0 0; padding-left: 1.3em; font-size: 13.5px; line-height: 1.8; }
.ic-search[open] > summary { margin-bottom: 10px; }

.ic-mini-steps { display: flex; gap: 3px; margin: 0; padding: 0; list-style: none; }
.ic-mini-steps li { width: 14px; height: 6px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface-muted); }
.ic-mini-steps li.is-done { border-color: var(--color-success); background: var(--color-success); }
.ic-mini-steps li.is-current { border-color: var(--color-primary); background: var(--color-primary); }

.ic-cases { margin: 0; padding: 0; list-style: none; }
.ic-case { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 12px 10px 12px 12px; border-bottom: 1px solid var(--color-border); border-left: 4px solid transparent; }
.ic-case:last-child { border-bottom: 0; }
.ic-case.is-overdue { border-left-color: var(--color-danger); }
.ic-case.is-pending { border-left-color: var(--color-warning); }
.ic-case.is-closed .ic-case-title { color: var(--color-text-muted); }
.ic-case-main { min-width: 0; }
.ic-case-title { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.ic-case-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ic-case-meta { margin-top: 4px; font-size: 12.5px; color: var(--color-text-muted); overflow-wrap: anywhere; }
.ic-case-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.ic-case-due { font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ic-case-extra { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.ic-case-extra > .ic-row-form, .ic-note { flex: 1 1 100%; }
.ic-note { margin: 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .ic-case { grid-template-columns: minmax(0, 1fr); }
  .ic-case-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; }
}

.ic-row-form > summary { display: inline-block; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--color-primary-dark); }
.ic-row-form[open] > summary { margin-bottom: 8px; }
.ic-row-form form { padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); }

.ic-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.ic-steps li { display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-text-muted); font-size: 13px; }
.ic-steps li.is-done { border-color: var(--color-success); background: var(--color-success-light); color: var(--color-success-dark); }
.ic-steps li.is-current { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 700; }
.ic-step-no { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--color-surface-muted); font-size: 11.5px; font-weight: 700; }
.ic-steps li.is-done .ic-step-no { background: var(--color-success); color: #fff; }
.ic-steps li.is-current .ic-step-no { background: var(--color-primary); color: #fff; }

.ic-approve { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--color-warning); border-left-width: 5px; border-radius: var(--radius); background: var(--color-warning-light); }
.ic-approve.is-actionable { border-color: var(--color-primary); background: var(--color-primary-light); }
.ic-approve-text { display: flex; flex: 1 1 260px; flex-direction: column; gap: 2px; min-width: 0; }
.ic-approve-text strong { font-size: 15px; }
.ic-approve-text span { font-size: 13px; }
.ic-approve-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.ic-timeline { margin: 0; padding: 0; list-style: none; }
.ic-tl-item { position: relative; padding: 0 0 18px 38px; }
.ic-tl-item::before { content: ''; position: absolute; top: 28px; bottom: 0; left: 13px; width: 2px; background: var(--color-border); }
.ic-tl-item:last-child { padding-bottom: 0; }
.ic-tl-item:last-child::before { display: none; }
.ic-tl-item.is-done::before { background: var(--color-success); }
.ic-tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 28px; }
.ic-tl-head h3 { margin: 0; font-size: 15px; }
.ic-tl-dot { position: absolute; top: 0; left: 0; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 2px solid var(--color-border-strong); border-radius: 50%; background: var(--color-surface); color: var(--color-text-muted); font-size: 12px; font-weight: 700; }
.ic-tl-item.is-done .ic-tl-dot { border-color: var(--color-success); background: var(--color-success); color: #fff; }
.ic-tl-item.is-current .ic-tl-dot { border-color: var(--color-primary); background: var(--color-primary); color: #fff; box-shadow: 0 0 0 4px var(--color-primary-light); }
.ic-tl-state { padding: 1px 8px; border-radius: 999px; background: var(--color-surface-muted); color: var(--color-text-muted); font-size: 11.5px; }
.ic-tl-item.is-current .ic-tl-state { background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 700; }
.ic-tl-item.is-todo .ic-tl-head h3 { color: var(--color-text-muted); }
.ic-tl-body { margin-top: 6px; font-size: 14px; }
.ic-tl-item.is-current .ic-tl-body { padding: 10px 12px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); background: var(--color-surface-muted); }

.ic-fieldset { margin: 0 0 12px; padding: 10px 12px 2px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); min-width: 0; }
.ic-fieldset legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--color-text-muted); }

.ic-scn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-bottom: 16px; }
.ic-scn { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; border: 1px solid var(--color-border); border-top: 4px solid var(--color-success); border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow-card); }
.ic-scn.is-overdue { border-top-color: var(--color-warning); }
.ic-scn.is-none { border-top-color: var(--color-danger); }
.ic-scn-top { display: flex; flex-wrap: wrap; gap: 4px; }
.ic-scn-title { font-size: 15.5px; font-weight: 700; overflow-wrap: anywhere; }
.ic-scn-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.ic-scn-facts dt { font-size: 11.5px; color: var(--color-text-muted); }
.ic-scn-facts dd { margin: 0; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ic-scn-proc { margin: 0; font-size: 13px; line-height: 1.6; color: var(--color-text-muted); overflow-wrap: anywhere; }
.ic-scn-foot:empty { display: none; }
.ic-procedure .ic-text { font-size: 15px; line-height: 1.9; }

.ic-meetings { margin: 0; padding: 0; list-style: none; }
.ic-meetings li + li { border-top: 1px solid var(--color-border); }
.ic-meeting { display: flex; align-items: center; gap: 14px; padding: 10px 4px; color: inherit; }
.ic-meeting:hover { background: var(--color-surface-muted); text-decoration: none; }
.ic-date-block { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center; width: 58px; padding: 4px 0; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); line-height: 1.15; }
.ic-date-m, .ic-date-w { font-size: 11px; color: var(--color-text-muted); }
.ic-date-d { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ic-meeting-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.ic-meeting-body strong { color: var(--color-primary-dark); }
.ic-meeting-text { font-size: 13.5px; overflow-wrap: anywhere; }
.ic-meeting > .badge { flex: 0 0 auto; }
@media (max-width: 480px) { .ic-meeting { flex-wrap: wrap; } .ic-meeting > .badge { margin-left: 72px; } }
.ic-voices { margin: 0; padding: 0; list-style: none; }
.ic-voice { padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.ic-voice:last-child { border-bottom: 0; }
.ic-voice.is-open { padding-left: 10px; border-left: 4px solid var(--color-warning); }
.ic-voice-head { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.ic-voice-answer { margin: 6px 0 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--color-success-light); font-size: 13px; }
.ic-voice .ic-row-form { margin-top: 8px; }
.ic-minutes section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--color-border); }
.ic-minutes .ic-text { font-size: 15px; line-height: 1.9; }
.ic-spawn { margin-top: 12px; }

.ic-row-attn td:first-child { box-shadow: inset 4px 0 0 var(--color-warning); }
.ic-health-latest .sales-facts dd { font-size: 16px; }

.ic-ky-group + .ic-ky-group { margin-top: 16px; }
.ic-ky-group h3 { margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--color-border); font-size: 14px; color: var(--color-text-muted); }
.ic-ky-list { margin: 0; padding: 0; list-style: none; }
.ic-ky-item { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 10px; padding: 10px 0; border-bottom: 1px dashed var(--color-border); }
.ic-ky-item:last-child { border-bottom: 0; }
.ic-ky-check { display: flex; flex: 1 1 280px; align-items: flex-start; gap: 10px; min-width: 0; margin: 0; font-weight: normal; cursor: pointer; }
.ic-ky-check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--color-primary); }
.ic-ky-q { font-size: 15px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.ic-ky-check input:checked + .ic-ky-q { color: var(--color-success-dark); }
.ic-ky-hints { flex: 1 1 100%; padding-left: 32px; font-size: 13px; color: var(--color-text-muted); }
.ic-ky-hints p { margin: 2px 0; }
.ic-ky-form { counter-reset: ic-ky; }
.ic-ky-form input[name="checked_item_ids"]:checked { counter-increment: ic-ky; }
.ic-ky-count::before { content: counter(ic-ky); }
.ic-ky-count { font-size: 20px; font-variant-numeric: tabular-nums; }
.ic-ky-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow-card); }
.ic-ky-tally { margin: 0; font-size: 15px; }
.ic-print-only { display: none; }

.ic-usage { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; margin: 10px 0 0; padding: 0; list-style: none; }
.ic-usage-row { min-width: 0; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.ic-usage-row.is-over { border-color: var(--color-danger); }
.ic-usage-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ic-usage-now { margin-top: 4px; font-variant-numeric: tabular-nums; }
.ic-usage-now strong { font-size: 22px; font-weight: 800; }
.ic-diff { display: inline-block; margin-left: 4px; font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); white-space: nowrap; }
.ic-diff.is-bad { color: var(--color-danger); }
.ic-diff.is-good { color: var(--color-success-dark); }
.ic-bars { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 6px; }
.ic-hbar { position: relative; display: block; height: 10px; border-radius: 999px; background: var(--color-surface-muted); }
.ic-hbar.is-prev { height: 6px; }
.ic-hbar-fill { display: block; max-width: 100%; height: 100%; border-radius: 999px; background: var(--color-primary); }
.ic-hbar.is-prev .ic-hbar-fill { background: var(--color-border-strong); }
.ic-usage-row.is-over .ic-hbar:not(.is-prev) .ic-hbar-fill { background: var(--color-danger); }
.ic-hbar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--color-text); }
.ic-usage-sub { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ic-vbars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; height: 150px; margin: 10px 0 4px; }
.ic-vbar { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; color: var(--color-text-muted); }
.ic-vbar:hover { color: var(--color-primary-dark); text-decoration: none; }
.ic-vbar-track { display: flex; flex: 1 1 auto; align-items: flex-end; width: 100%; max-width: 32px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--color-surface-muted); }
.ic-vbar-fill { display: block; width: 100%; min-height: 1px; border: 1px solid var(--color-primary); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--color-primary-light); }
.ic-vbar.is-current .ic-vbar-fill { background: var(--color-primary); }
.ic-vbar-label { font-size: 11px; white-space: nowrap; }
.ic-vbar.is-current .ic-vbar-label { color: var(--color-primary-dark); font-weight: 700; }

@media print {
  .ic-print-only { display: block; }
  .ic-print-page .sales-head-actions, .ic-print-page .pg-back, .ic-print-page details.sales-form-card { display: none !important; }
  .ic-howto, .ic-footer, .ic-row-form, .ic-spawn, .ic-approve-actions, .ic-ky-savebar { display: none !important; }
  .ic-ky-print-title { margin: 0 0 4pt; font-size: 16pt; font-weight: 700; }
  .ic-ky-print-head p { margin: 0 0 8pt; }
  .ic-ky-item, .ic-scn, .ic-tl-item { break-inside: avoid; }
  .ic-ky-check input { width: 14pt; height: 14pt; }
  .ic-table-wrap { overflow: visible; }
}

.rs-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.rs-count { padding: 1px 8px; border-radius: 999px; background: var(--color-warning-light); font-size: 12.5px; font-weight: 700; }
.rs-urgent-card { margin-bottom: 12px; padding: 12px 14px; }
.rs-urgent-list { margin: 0; padding: 0; list-style: none; }
.rs-urgent { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 5px 8px; border-top: 1px solid var(--color-border); border-left: 4px solid var(--color-warning); }
.rs-urgent:first-child { border-top: 0; }
.rs-urgent-danger { border-left-color: var(--color-danger); background: var(--color-danger-light); }
.rs-urgent-icon { flex: 0 0 auto; }
.rs-urgent-text { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; font-size: 13.5px; }
.rs-urgent-module { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px; background: var(--color-surface-muted); color: var(--color-text-muted); font-size: 11.5px; font-weight: 700; }
.rs-urgent-link { flex: 0 0 auto; font-size: 13px; white-space: nowrap; }
.rs-more { margin: 6px 0 0; font-size: 12.5px; color: var(--color-text-muted); }

.rs-setup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; border-left: 4px solid var(--color-primary); background: var(--color-primary-light); }
.rs-setup-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-width: 0; }
.rs-setup-main strong { color: var(--color-primary-dark); }
.rs-setup-count { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rs-setup .pg-meter { flex: 0 0 120px; width: 120px; margin-top: 0; background: var(--color-surface); }
.rs-setup-next { font-size: 13.5px; overflow-wrap: anywhere; }

.rs-group { margin: 0 0 14px; }
.rs-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 6px; }
.rs-group-head h2 { margin: 0; font-size: 15.5px; }
.rs-group-head p { margin: 0; font-size: 12.5px; color: var(--color-text-muted); }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.rs-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px 12px; border: 1px solid var(--color-border); border-top: 4px solid var(--color-border-strong); border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow-card); }
.rs-card.has-alert { border-top-color: var(--color-warning); }
.rs-card-head { display: flex; align-items: center; gap: 8px; color: var(--color-text); }
.rs-card-head:hover { text-decoration: none; }
.rs-card-head:hover strong { color: var(--color-primary-dark); }
.rs-card-icon { flex: 0 0 auto; font-size: 22px; line-height: 1; }
.rs-card-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rs-card-name strong { font-size: 15px; }
.rs-card-name span { font-size: 12px; line-height: 1.45; color: var(--color-text-muted); overflow-wrap: anywhere; }
.rs-badge { display: inline-block; padding: 1px 9px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--color-text); background: var(--color-surface-muted); }
.rs-badge-ok { font-weight: 400; color: var(--color-text-muted); }
.rs-badge-danger { border-color: var(--color-danger); background: var(--color-danger-light); }
.rs-badge-warning { border-color: var(--color-warning); background: var(--color-warning-light); }
.rs-badge-info { border-color: var(--color-primary); background: var(--color-primary-light); }
.rs-notice-list { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.rs-notice { padding: 2px 0 2px 8px; border-left: 3px solid var(--color-border-strong); overflow-wrap: anywhere; }
.rs-notice + .rs-notice { margin-top: 4px; }
.rs-notice-danger { border-left-color: var(--color-danger); }
.rs-notice-warning { border-left-color: var(--color-warning); }
.rs-notice-info { border-left-color: var(--color-primary); }
.rs-notice a { color: var(--color-text); }
.rs-notice a:hover { color: var(--color-primary-dark); }
.rs-notice-more { margin-top: 4px; font-size: 12px; color: var(--color-text-muted); }
.rs-links { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 2px; }
.rs-links a { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface-muted); color: var(--color-text); font-size: 12.5px; white-space: nowrap; }
.rs-links a:hover { border-color: var(--color-primary); color: var(--color-primary-dark); text-decoration: none; }
.rs-card-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.rs-card-open { font-size: 12.5px; font-weight: 700; white-space: nowrap; }

.rs-missing h2 { margin: 0 0 6px; font-size: 15px; }
.rs-missing ul { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 12px; padding: 0; list-style: none; font-size: 13.5px; color: var(--color-text-muted); }
.rs-missing li span { margin-right: 4px; }
@media (max-width: 480px) {
  .rs-card { padding: 10px; }
  .rs-setup .pg-meter { flex-basis: 100%; width: 100%; }
}
.exd-tabs a.is-active { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 700; }
.exd-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; margin-bottom: 8px; }
.exd-top > * { min-width: 0; margin-bottom: 0; }
@media (max-width: 900px) { .exd-top { grid-template-columns: 1fr; } }
.exd-section-title { margin: 18px 0 10px; font-size: 16px; }
.exd-figure-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.exd-fig { margin: 0; padding: 12px 14px; }
.exd-fig h3 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; margin: 0 0 8px; font-size: 14.5px; }
.exd-fig h3 a { font-size: 12px; font-weight: 400; }
.exd-fig dl { margin: 0; }
.exd-fig dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 0; border-top: 1px dashed var(--color-border); }
.exd-fig dl > div:first-child { border-top: 0; }
.exd-fig dt { font-size: 12.5px; color: var(--color-text-muted); }
.exd-fig dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.exd-fig dd small { display: block; font-size: 11.5px; font-weight: 400; color: var(--color-text-muted); }
.exd-fig dd.is-alert { color: var(--color-danger); }
.exd-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.exd-link { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-card); }
.exd-link:hover { border-color: var(--color-primary); text-decoration: none; }
.exd-link strong { font-size: 15px; }
.exd-link span { font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); }
.exd-link em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--color-warning-dark); }
.dg-fy-nav { margin: 0 0 14px; }
.dg-fy-nav strong { min-width: 14em; }
.dg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; margin-bottom: 14px; }
.dg-dept { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; border-top: 4px solid var(--color-border-strong); }
.dg-dept-ok { border-top-color: var(--color-success); }
.dg-dept-warn { border-top-color: var(--color-warning); }
.dg-dept-behind { border-top-color: var(--color-danger); }
.dg-dept-none { border-top-style: dashed; }
.dg-dept-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.dg-dept-head h3 { margin: 0 auto 0 0; font-size: 16px; overflow-wrap: anywhere; }
.dg-rev { font-size: 12px; color: var(--color-text-muted); }
.dg-status, .dg-judge, .dg-kind { display: inline-block; padding: 1px 9px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface-muted); color: var(--color-text); font-size: 12px; font-weight: 700; white-space: nowrap; }
.dg-status-approved, .dg-judge-ok { border-color: var(--color-success); background: var(--color-success-light); }
.dg-status-submitted { border-color: var(--color-primary); background: var(--color-primary-light); }
.dg-status-rejected, .dg-judge-behind { border-color: var(--color-danger); background: var(--color-danger-light); }
.dg-judge-warn { border-color: var(--color-warning); background: var(--color-warning-light); }
.dg-status-none { border-style: dashed; font-weight: 400; color: var(--color-text-muted); }
.dg-judge-none, .dg-kind { font-weight: 400; color: var(--color-text-muted); }
.dg-kind { font-size: 11.5px; }
.dg-goal-list { margin: 0; padding: 0; list-style: none; }
.dg-goal-list > li { padding: 8px 0; border-top: 1px dashed var(--color-border); }
.dg-goal-list > li:first-child { border-top: 0; }
.dg-goal-list .pg-meter { max-width: none; }
.dg-goal-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.dg-goal-label { font-weight: 700; overflow-wrap: anywhere; }
.dg-goal-nums { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.dg-goal-nums strong { font-size: 15px; }
.dg-goal-sub { margin: 4px 0 0; font-size: 12px; color: var(--color-text-muted); overflow-wrap: anywhere; }
.dg-muted { font-size: 13px; color: var(--color-text-muted); }
.dg-warn-line { margin: 4px 0 0; padding: 4px 8px; border-left: 3px solid var(--color-warning); background: var(--color-warning-light); font-size: 13px; }
.dg-dept-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.dg-sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--color-text-muted); }
.dg-table th, .dg-table td { padding: 6px 8px; font-size: 13.5px; vertical-align: top; }
.dg-month-wrap table { min-width: 960px; }
.dg-month-table th, .dg-month-table td { font-size: 12.5px; white-space: nowrap; }
.dg-month-table td.dg-future { background: var(--color-surface-muted); color: var(--color-text-muted); }
.dg-monitor-goal + .dg-monitor-goal { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--color-border); }
.dg-monitor-goal h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 15px; }
.dg-num-input { text-align: right; font-variant-numeric: tabular-nums; }
.dg-actual-table .dg-num-input { min-width: 7em; }
.dg-pre { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.dg-workflow h3 { margin-top: 0; }
.dg-workflow-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; }
.dg-workflow-actions > p { flex: 1 1 100%; margin: 0; }
.dg-inline-form { display: inline; margin: 0; }
.dg-reject { flex: 1 1 100%; }
.dg-reject > summary { display: inline-block; list-style: none; cursor: pointer; }
.dg-reject > summary::-webkit-details-marker { display: none; }
.dg-reject form { display: flex; flex-direction: column; gap: 6px; max-width: 560px; margin-top: 8px; }
.dg-reject form .btn { align-self: flex-start; }
.dg-revising { border-left: 4px solid var(--color-primary); background: var(--color-primary-light); }
.dg-route-notice { border-left: 4px solid var(--color-warning); font-size: 13.5px; }
.dg-revising p, .dg-route-notice p { margin: 0; }
.dg-history { margin: 0; padding: 0 0 0 18px; font-size: 13.5px; }
.dg-history li + li { margin-top: 6px; }
.dg-history-at { margin-right: 8px; font-size: 12px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.dg-history-note { display: block; color: var(--color-text-muted); overflow-wrap: anywhere; }
.dg-list { margin: 0; padding-left: 18px; font-size: 13.5px; }
.dg-list li + li { margin-top: 4px; }
.dg-form-top, .dg-form-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; }
.dg-templates { display: flex; flex-wrap: wrap; gap: 8px; }
.dg-goal-row { min-width: 0; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.dg-goal-row legend { padding: 0 6px; font-size: 13.5px; font-weight: 700; }
.dg-goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 4px 12px; }
.dg-goal-grid .form-group { margin-bottom: 6px; }
.dg-goal-grid label small { margin-left: 4px; font-size: 11px; font-weight: 400; color: var(--color-text-muted); }
.dg-span-2 { grid-column: span 2; }
@media (max-width: 480px) { .dg-span-2 { grid-column: auto; } }
.dg-monthly > summary { font-size: 13px; color: var(--color-primary-dark); cursor: pointer; }
.dg-month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 96px), 1fr)); gap: 6px 8px; margin-top: 8px; }
.dg-month-grid label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--color-text-muted); }
.dg-remove { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--color-danger); }
.dg-trend { display: flex; flex-direction: column; gap: 6px; }
.dg-trend-row { display: grid; grid-template-columns: 3em minmax(0, 1fr) minmax(0, 10em); align-items: center; gap: 8px; font-size: 12.5px; }
.dg-trend-month { text-align: right; color: var(--color-text-muted); }
.dg-trend-bars { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dg-bar { display: block; height: 7px; min-width: 2px; border-radius: 999px; }
.dg-bar-target { background: var(--color-border-strong); }
.dg-bar-actual { background: var(--color-primary); }
.dg-trend-num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dg-trend-num small { display: block; font-weight: 400; color: var(--color-text-muted); }
.dg-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 12px; color: var(--color-text-muted); }
.dg-legend .dg-bar { display: inline-block; width: 18px; }
.exd-locked { margin-top: 12px; }
.da-entry-dept { min-width: min(100%, 200px); }
.da-line-dept { min-width: 8.5em; }
.da-dept-tag { color: var(--color-primary-dark); }
.ac-entry-project { min-width: min(100%, 240px); }
.ac-line-project { min-width: 11em; }
.ac-project-tag { color: var(--color-text-muted); }
.ac-note-red { --ac-note: #d64545; }
.ac-note-yellow { --ac-note: #d9a400; }
.ac-note-green { --ac-note: #2f9e5b; }
.ac-note-blue { --ac-note: #2f6fd6; }
.ac-note-purple { --ac-note: #8a4fd0; }
tr.ac-noted > td:first-child { box-shadow: inset 4px 0 0 var(--ac-note); }
.ac-note-dot { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 2px; background: var(--ac-note); vertical-align: -0.05em; margin-right: 2px; }
.ac-note-fields { display: flex; gap: 4px; min-width: 15em; }
.ac-note-color { width: 6.5em; flex: 0 0 auto; }
.ac-note-text { flex: 1 1 8em; min-width: 0; }
.ct-radio { display: block; margin: 4px 0; }
.ct-sub { font-size: 15px; margin: 16px 0 6px; }
.ct-made { margin: 0; padding-left: 1.2em; }
.bd-kind { display: block; margin: 4px 0; }
.bd-understood { display: block; margin: 12px 0 4px; font-weight: 600; }
.fr-row { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 12px 4px; margin: 0 0 10px; min-width: 0; }
.fr-row legend { font-weight: 700; padding: 0 6px; color: var(--color-primary-dark); }
.fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 6.5em), 1fr)); gap: 4px 10px; }
.fr-grid .form-group { margin: 0 0 6px; min-width: 0; }
.fr-wide { grid-column: span 2; }
.fr-full { grid-column: 1 / -1; }
.fr-repair { margin-bottom: 4px; }
@media (max-width: 480px) { .fr-wide { grid-column: 1 / -1; } }
.wp-grade { display: inline-block; padding: 1px 8px; border-radius: 10px; font-weight: 700; font-size: 13px; }
.wp-grade-1 { background: #e6f4ea; color: #1e6b34; }
.wp-grade-2 { background: #fff4d6; color: #7a5200; }
.wp-grade-3 { background: #fde2e2; color: #a61b1b; }
.wp-score { min-height: 2.2em; display: flex; align-items: center; }
.wp-workers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11em), 1fr)); gap: 6px 10px; }
.wp-worker { display: flex; gap: 4px; }
.wp-worker select { width: 4em; flex: 0 0 auto; }
.wp-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.wp-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.wp-photos figure { margin: 0; max-width: 240px; }
.wp-photos img { max-width: 100%; border: 1px solid var(--color-border); border-radius: 4px; }
.wp-stamps { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.wp-stamp-done { color: #a61b1b; font-weight: 600; }
.wp-sub { font-size: 15px; margin: 14px 0 6px; }
.wp-use { display: block; margin: 0 0 8px; font-weight: 600; }
.wp-missing, .wp-files { list-style: none; margin: 0; padding: 0; }
.wp-missing li, .wp-files li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.wp-missing li span { flex: 1 1 14em; }
.cp-inuse { color: var(--color-danger, #c62828); font-size: 13px; margin: 4px 0 0; }
.ac-entry-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; margin: 4px 0 8px; }
.ac-account-search { flex: 1 1 18em; min-width: min(100%, 16em); }
.ac-search-results { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.jp-list { list-style: none; margin: 8px 0 0; padding: 0; }
.jp-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.da-pl-table th a { white-space: nowrap; }
.da-pl-table .da-col-none { background: var(--color-surface-muted, var(--color-bg)); }
.da-pl-table .da-col-total { font-weight: 700; }
.da-pl-table .da-ratio-row th, .da-pl-table .da-ratio-row td { font-size: 12.5px; color: var(--color-text-muted); }
.da-check { margin: 10px 0 0; }
.dg-journal-note { margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg); font-size: 13px; overflow-wrap: anywhere; }
.dg-source { display: inline-block; padding: 1px 8px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 12px; white-space: nowrap; }
.dg-source-journal { border-color: var(--color-primary); color: var(--color-primary-dark); }
.dg-source-deals_won { border-color: var(--color-border-strong); }
.dg-source-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; }
.dg-source-bar .file-meta { flex: 1 1 280px; margin: 0; }
.dg-settings-choices { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; padding: 0; border: 0; }
.dg-settings-choices legend { margin-bottom: 6px; padding: 0; font-size: 13.5px; font-weight: 700; }
.dg-settings-choice { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.da-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--color-border); }
.da-tabs a { padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; color: var(--color-text-muted); font-size: 14px; text-decoration: none; }
.da-tabs a.is-active { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); font-weight: 700; margin-bottom: -1px; }
.da-view-toggle { margin: 0 0 12px; }
.da-pl-table .da-col-common { background: var(--color-bg); }
.da-common-badge { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: var(--color-text-muted); }
.da-pl-table .da-alloc-row th, .da-pl-table .da-alloc-row td { font-size: 12px; color: var(--color-text-muted); }
.da-pl-table .da-alloc-row th { padding-left: 1.5em; font-weight: 400; }
.da-basis + .da-basis { margin-top: 14px; }
.da-basis h3 { margin: 0 0 4px; font-size: 14.5px; }
.da-fallback { margin: 4px 0; font-size: 13px; color: var(--color-warning, var(--color-text)); }
.da-trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; margin-top: 12px; }
.da-trend-chart { min-width: 0; margin: 0; padding: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.da-trend-chart figcaption { margin-bottom: 4px; font-size: 13px; font-weight: 700; }
.da-trend-table .da-trend-focus th, .da-trend-table .da-trend-focus td { font-weight: 700; }
.da-caption { caption-side: top; text-align: left; font-size: 13px; color: var(--color-text-muted); padding-bottom: 4px; }
.da-check-choices { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.da-check-choice { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.da-check-choice small { color: var(--color-text-muted); }
.da-manual > summary { font-size: 13px; color: var(--color-primary-dark); cursor: pointer; }
.da-manual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 6px 10px; margin-top: 6px; }
.da-manual-grid label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--color-text-muted); }
.da-pct { display: flex; align-items: center; gap: 4px; }
.da-pct .form-control { min-width: 0; }
.da-history { margin: 0; padding-left: 18px; font-size: 13px; }
.da-history li + li { margin-top: 6px; }
.da-history-at { margin-right: 8px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.da-history-note { display: block; color: var(--color-text-muted); overflow-wrap: anywhere; }

.sp-plan-h { font-size: 17px; margin: 0 0 10px; }
.sp-plan-h3 { font-size: 14.5px; margin: 16px 0 6px; }
.sp-plan-std { font-size: 12px; font-weight: 400; color: var(--color-text-muted); margin-left: 6px; }
.sp-plan-muted { color: var(--color-text-muted); font-size: 13.5px; }
.sp-plan-sub { display: block; color: var(--color-text-muted); font-size: 12px; }
.sp-plan-alert { color: var(--color-danger-dark); font-weight: 700; }
.sp-plan-sig { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--color-danger-light); color: var(--color-danger-dark); font-size: 12px; font-weight: 700; }
.sp-plan-rev { font-size: 12px; color: var(--color-text-muted); }
.sp-plan-target { display: inline-block; padding: 0 6px; border-radius: var(--radius-sm); font-size: 12px; background: var(--color-surface-muted); }
.sp-plan-target-department { background: var(--color-accent-light); color: var(--color-accent-dark); }
.sp-plan-target-project { background: var(--color-warning-light); color: var(--color-warning-dark); }
.sp-plan-filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sp-plan-fy { display: flex; gap: 6px; align-items: center; }
.sp-plan-fy select { width: auto; }
.sp-plan-table td, .sp-plan-table th { font-size: 14px; vertical-align: top; }
.sp-plan-quick { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sp-plan-ok { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--color-success-light); color: var(--color-success-dark); }
.sp-plan-warns { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sp-plan-warns > li { padding: 6px 10px; border-radius: var(--radius-sm); font-size: 14px; }
.sp-plan-warn-warning { background: var(--color-warning-light); color: var(--color-warning-dark); }
.sp-plan-warn-info { background: var(--color-accent-light); color: var(--color-accent-dark); }
.sp-plan-warn-part { display: inline-block; min-width: 5.5em; font-weight: 700; margin-right: 6px; }
.sp-plan-warnbox > summary { cursor: pointer; font-weight: 700; }
.sp-plan-new .sp-plan-choice { border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 14px; }
.sp-plan-choice legend { font-weight: 700; padding: 0 6px; }
.sp-plan-radio { display: flex; gap: 6px; align-items: center; font-weight: 700; margin: 6px 0; }
.sp-plan-indent { margin-left: 24px; }
.sp-plan-partnav { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0; margin-bottom: 8px; background: var(--color-surface-muted); border-radius: var(--radius-sm); }
.sp-plan-partnav a { padding: 4px 12px; border-radius: var(--radius-sm); text-decoration: none; }
.sp-plan-part { border-left: 4px solid var(--color-border); }
.sp-plan-part-quality { border-left-color: var(--color-accent-dark); }
.sp-plan-part-environment { border-left-color: var(--color-success-dark); }
.sp-plan-part-safety { border-left-color: var(--color-warning-dark); }
.sp-plan-rows { min-width: 640px; }
.sp-plan-rows-wide { min-width: 980px; }
.sp-plan-rows td { padding: 4px 6px; }
.sp-plan-rows .form-control { min-width: 6em; }
.sp-plan-recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sp-plan-rec { display: flex; gap: 8px; align-items: center; }
.sp-plan-savebar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: var(--color-surface-muted); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.sp-pk-list { list-style: none; margin: 0 0 8px; padding: 0; max-height: 420px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.sp-pk-item { padding: 8px 10px; border-bottom: 1px solid var(--color-border); }
.sp-pk-item:last-child { border-bottom: none; }
.sp-pk-item.is-on { background: var(--color-accent-light); }
.sp-pk-label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.sp-pk-text { display: flex; flex-direction: column; gap: 2px; }
.sp-pk-title { font-weight: 700; }
.sp-pk-info { font-size: 12.5px; color: var(--color-text-muted); }
.sp-pk-extra { margin: 6px 0 0 26px; }
.sp-pk-extra label { font-size: 13px; }
.sp-plan-tbl { width: 100%; margin: 0 0 6px; }
.sp-plan-tbl th, .sp-plan-tbl td { font-size: 13.5px; padding: 6px 8px; vertical-align: top; }
.sp-plan-tbl small, .sp-plan-reflist small { display: block; color: var(--color-text-muted); font-size: 12px; }
.sp-plan-text { padding: 6px 10px; border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.sp-plan-reflist { margin: 4px 0 8px; padding-left: 20px; }
.sp-plan-checklist { list-style: none; margin: 4px 0; padding: 0; }
.sp-plan-box { margin-right: 6px; }
.sp-plan-dl { display: grid; gap: 6px; margin: 6px 0; }
.sp-plan-dl > div { display: flex; gap: 10px; }
.sp-plan-dl dt { min-width: 7em; font-weight: 700; }
.sp-plan-dl dd { margin: 0; flex: 1; }
.sp-plan-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.sp-plan-inline { display: inline; margin: 0; }
.sp-plan-reject > summary { list-style: none; display: inline-block; }
.sp-plan-reject[open] > form { margin-top: 8px; display: grid; gap: 6px; max-width: 520px; }
@media (max-width: 600px) { .sp-plan-indent, .sp-pk-extra { margin-left: 0; } .sp-plan-dl > div { flex-direction: column; gap: 2px; } }
.fu-sub { display: block; font-size: 12px; color: var(--color-text-muted); font-weight: normal; }
h2 .fu-sub, h3 .fu-sub, summary .fu-sub { display: inline; margin-left: 4px; }
.fu-year-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.fu-section { margin-bottom: 16px; }
.fu-table-wrap { overflow-x: auto; }
.fu-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fu-table th, .fu-table td { padding: 6px 8px; border-bottom: 1px solid var(--color-border); vertical-align: top; text-align: left; }
.fu-table thead th { background: var(--color-surface-muted); font-weight: 600; white-space: nowrap; }
.fu-dept { background: var(--color-surface-muted); font-weight: 600; min-width: 8em; }
.fu-text { white-space: normal; word-break: break-word; }
.fu-total td { font-weight: 700; border-top: 2px solid var(--color-border-strong); }
.fu-kpi-table td:not(:first-child), .fu-kpi-table th:not(:first-child) { text-align: right; }
.fu-std + .fu-std { margin-top: 20px; }
.fu-std-h { font-size: 15px; margin: 8px 0; }
.fu-pct { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fu-pct .pg-meter { width: 70px; margin-top: 0; }
.fu-judge { display: inline-block; min-width: 1.6em; text-align: center; font-weight: 700; font-size: 16px; }
.fu-judge-good { color: var(--color-success-dark); }
.fu-judge-fair { color: var(--color-warning-dark); }
.fu-judge-poor { color: var(--color-danger-dark); }
.fu-judge-none { color: var(--color-text-muted); }
.fu-pdca-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.fu-pdca-cell { border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--color-surface); }
.fu-pdca-add > summary { cursor: pointer; color: var(--color-primary); font-weight: 600; }
.fu-pdca-h { margin: 0 0 8px; font-size: 14px; }
.fu-pdca-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.fu-pdca-field { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--color-text-muted); }
.fu-pdca-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.fu-pdca-dl dt { font-size: 12px; color: var(--color-text-muted); }
.fu-pdca-dl dd { margin: 0; white-space: normal; word-break: break-word; }
.fu-save { margin-top: 8px; }
.fu-approval .ir-inline-form { margin-top: 8px; }
.fu-history { margin-top: 12px; font-size: 13px; }
.fu-history ul { margin: 6px 0 0; padding-left: 1.2em; color: var(--color-text-muted); }
.fu-obj-more { margin-top: 10px; border-top: 1px dashed var(--color-border); padding-top: 8px; }
.fu-obj-more > summary { cursor: pointer; font-weight: 600; color: var(--color-primary-dark); }
.fu-obj-block { margin-top: 12px; }
.fu-obj-h { margin: 0 0 6px; font-size: 13px; }
.fu-items { list-style: none; margin: 0 0 8px; padding: 0; }
.fu-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.fu-item-text { flex: 1 1 12em; }
.fu-item.is-done .fu-item-text { text-decoration: line-through; color: var(--color-text-muted); }
.fu-item .fu-sub { display: inline; }
.fu-chart { overflow-x: auto; margin-bottom: 8px; }
.fu-check { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
@media (max-width: 640px) {
  .fu-pdca-grid, .fu-pdca-dl { grid-template-columns: 1fr; }
}
.fu-print { font-size: 11px; color: #000; }
.fu-print-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.fu-print-title { font-size: 18px; margin: 0 0 4px; }
.fu-print-h { font-size: 13px; margin: 14px 0 6px; padding-left: 6px; border-left: 4px solid var(--color-primary); }
.fu-stamp { border-collapse: collapse; min-width: 150px; }
.fu-stamp th, .fu-stamp td { border: 1px solid #333; padding: 4px 8px; text-align: center; font-size: 11px; }
.fu-stamp td { height: 48px; }
.fu-print .fu-table { font-size: 10.5px; }
.fu-print .fu-table th, .fu-print .fu-table td { border: 1px solid #999; padding: 3px 5px; }
.fu-print .fu-table-wrap { overflow: visible; }
.fu-summary-box { border: 1px solid #999; padding: 6px 8px; min-height: 48px; }
@media print {
  .fu-print .fu-table tr, .fu-print .fu-std-h { break-inside: avoid; }
  .fu-print-h { break-after: avoid; }
}
.au-picks { display: flex; flex-wrap: wrap; gap: 4px 14px; max-height: 12em; overflow-y: auto; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.au-pick { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: normal; font-size: 13px; }
.au-others { margin-top: 6px; }
.au-note { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--color-border); border-left: 4px solid var(--color-primary); border-radius: var(--radius-sm); background: var(--color-primary-light); font-size: 13.5px; }
.au-pre { white-space: pre-wrap; }
.ia-cl-item.au-cl-observe { border-left-color: var(--color-warning); background: var(--color-warning-light); }
.au-cl-actions { margin-top: 6px; }
.au-savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0; padding: 8px 0; }
.au-cl-form > .au-savebar:first-child { position: sticky; top: 0; z-index: 2; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.au-std { margin-top: 18px; }
.au-std-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 4px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--color-surface-muted); font-size: 15px; }
.au-std-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.au-std-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.au-table td { vertical-align: top; }
@media (max-width: 640px) { .au-picks { max-height: none; } .au-cl-form > .au-savebar:first-child { position: static; } }
.ps-mtable-wrap { overflow-x: auto; margin: 8px 0 4px; }
.ps-mtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ps-mtable th, .ps-mtable td { border: 1px solid var(--color-border-strong); padding: 6px 8px; text-align: left; vertical-align: top; }
.ps-mtable th { background: var(--color-surface-muted); white-space: nowrap; }

.ps-apl-h { font-size: 17px; margin: 0 0 12px; }
.ps-apl-scroll, .ps-cmap-scroll { overflow-x: auto; }
.ps-apl-grid th, .ps-apl-grid td, .ps-apl-monthly th, .ps-apl-monthly td { border: 1px solid var(--color-border); padding: 6px 8px; vertical-align: top; }
.ps-apl-grid thead th, .ps-apl-monthly thead th { background: var(--color-surface-muted); white-space: nowrap; }
.ps-apl-m { width: 2.6em; text-align: center; padding-left: 2px; padding-right: 2px; }
.ps-apl-mark { font-weight: 700; color: var(--color-primary); }
.ps-apl-num { text-align: right; white-space: nowrap; }
.ps-apl-empty, .ps-apl-sub, .ps-cmap-note { color: var(--color-text-muted); font-size: 13.5px; }
.ps-apl-pre { white-space: pre-wrap; }
.ps-apl-inline { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0; }
.ps-apl-months { display: flex; flex-wrap: wrap; gap: 6px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 8px 10px; margin: 0 0 12px; }
.ps-apl-months legend { font-size: 13px; color: var(--color-text-muted); padding: 0 4px; }
.ps-apl-months label { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.ps-apl-sugg { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.ps-apl-sugg label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ps-apl-ops { white-space: nowrap; }
.ps-apl-ops form { display: inline; }
.ps-apl-edit > summary { cursor: pointer; color: var(--color-primary); }
.ps-apl-edit[open] { min-width: min(640px, 80vw); white-space: normal; }
.ps-apl-history { margin: 0; padding-left: 1.2em; font-size: 13.5px; }
.ps-apl-footer { margin-top: 16px; text-align: right; }
.ps-apl-state-draft { border-left: 4px solid var(--color-warning); }
.ps-apl-sr, .ps-pmap-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ps-cmap-table th, .ps-cmap-table td { border: 1px solid var(--color-border); padding: 8px; vertical-align: top; }
.ps-cmap-table thead th { background: var(--color-surface-muted); }
.ps-cmap-clause { min-width: 11em; text-align: left; }
.ps-cmap-no { display: inline-block; min-width: 2.8em; font-weight: 700; color: var(--color-primary); }
.ps-cmap-sub { font-size: 12.5px; color: var(--color-text-muted); margin-bottom: 4px; }
.ps-cmap-list { margin: 6px 0 0; padding-left: 1.1em; }
.ps-cmap-ok { color: var(--color-success); font-weight: 700; }
.ps-cmap-miss { color: var(--color-danger); font-size: 13px; }
.ps-cmap-manual { margin-top: 6px; font-size: 13px; }
.ps-cmap-missing { background: var(--color-danger-light); }
.ps-cmap-row-missing > th { border-left: 4px solid var(--color-danger); }
.ps-cmap-na { text-align: center; color: var(--color-text-muted); }

.ps-pmap-h { font-size: 17px; margin: 0 0 12px; }
.ps-pmap-wrap { display: grid; grid-template-columns: 1fr 44px; gap: 10px; }
.ps-pmap-flow { list-style: none; margin: 0; padding: 0; }
.ps-pmap-band { display: grid; grid-template-columns: 64px 1fr; gap: 10px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.ps-pmap-tag { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius) 0 0 var(--radius); color: #fff; padding: 8px 4px; }
.ps-pmap-p .ps-pmap-tag { background: var(--color-primary-dark); }
.ps-pmap-d .ps-pmap-tag { background: var(--color-success-dark); }
.ps-pmap-c .ps-pmap-tag { background: var(--color-warning-dark); }
.ps-pmap-a .ps-pmap-tag { background: var(--color-danger-dark); }
.ps-pmap-letter { font-size: 24px; font-weight: 800; line-height: 1; }
.ps-pmap-tag-label { font-size: 12px; margin-top: 4px; }
.ps-pmap-stage { padding: 10px 12px 12px 0; }
.ps-pmap-stage-title { font-size: 15.5px; margin: 0 0 8px; }
.ps-pmap-stage-title small { font-weight: 400; color: var(--color-text-muted); font-size: 12.5px; margin-left: 6px; }
.ps-pmap-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ps-pmap-box { border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--color-surface-muted); }
.ps-pmap-box-title { font-size: 13.5px; margin: 0 0 6px; }
.ps-pmap-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.ps-pmap-items li { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.ps-pmap-std { font-size: 11px; font-weight: 700; border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; color: var(--color-text-muted); }
.ps-pmap-value { color: var(--color-text-muted); }
.ps-pmap-alert .ps-pmap-value { color: var(--color-danger); font-weight: 700; }
.ps-pmap-arrow { text-align: center; color: var(--color-text-muted); font-size: 14px; line-height: 1.6; }
.ps-pmap-loop { position: relative; border: 2px dashed var(--color-text-muted); border-left: none; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; display: flex; align-items: center; justify-content: center; }
.ps-pmap-loop-head { position: absolute; top: -12px; left: -6px; color: var(--color-text-muted); }
.ps-pmap-loop-text { writing-mode: vertical-rl; font-size: 13px; font-weight: 700; color: var(--color-text); letter-spacing: 0.1em; }
.ps-pmap-svg-wrap { overflow-x: auto; }
.ps-pmap-svg { display: block; width: 100%; min-width: 560px; }
.ps-pmap-svg-link:hover rect, .ps-pmap-svg-link:focus rect { stroke: var(--color-primary) !important; }
.ps-pmap-caption { font-size: 13.5px; color: var(--color-text-muted); margin: 8px 0 0; }
@media (max-width: 640px) { .ps-pmap-wrap { grid-template-columns: 1fr; } .ps-pmap-loop { margin: 0; padding: 6px; border: 2px dashed var(--color-text-muted); border-radius: var(--radius); } .ps-pmap-loop-text { writing-mode: horizontal-tb; } .ps-pmap-band { grid-template-columns: 48px 1fr; } }
@media print { .ps-pmap-band, .ps-pmap-box, .ps-apl-grid tr { break-inside: avoid; } .ps-pmap-tag { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.ps-cmap-warn { background: var(--color-warning-light); }
.ps-cmap-row-warn > th { border-left: 4px solid var(--color-warning); }
.ps-cmap-warn-text { color: var(--color-warning-dark); font-size: 13px; }
.ps-cmap-reason { color: var(--color-text-muted); font-size: 12.5px; }

.fu-pdca-mine { border-color: var(--color-primary); box-shadow: inset 3px 0 0 var(--color-primary); }

.fu-record-links { margin-top: 10px; font-size: 13px; }
.fu-record-links > ul { margin: 4px 0 0; padding-left: 1.2em; }
.fu-record-links .fu-sub { display: inline; }

.fu-mr { margin-top: 16px; }
.fu-mr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; }
.fu-mr-meta > .fu-sub { display: inline; }
.fu-mr-h { font-size: 14px; margin: 14px 0 6px; padding-left: 6px; border-left: 3px solid var(--color-border-strong); }
.fu-mr-list { margin: 0; padding-left: 1.2em; }
.fu-mr-list > li { margin: 2px 0; word-break: break-word; }
.fu-mr .fu-table { font-size: 12.5px; }

@media (max-width: 640px) {
  .fu-mr .ia-card-head { flex-wrap: wrap; gap: 4px; }
}

.au-locked { scroll-margin-top: 16px; }
.au-locked-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; }
.au-locked-hint { margin: 0 0 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.au-diff-hint { color: var(--color-warning); font-weight: 600; }
.ia-cl-item.au-cm-mixed { border-left-color: var(--color-warning); }
.au-cm-diff { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 8px; padding: 6px 10px; list-style: none; border: 1px dashed var(--color-border); border-radius: var(--radius-sm); font-size: 13px; }
.au-cm-diff li { margin: 0; }
.au-cm-fstd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.au-cm-fstd-label { font-size: 13px; font-weight: 600; }
@media (max-width: 640px) { .au-cm-fstd > .btn { width: 100%; } .au-locked-actions > .btn { width: 100%; text-align: center; } }

.sp-plan-addrow { margin: 6px 0 12px; }
.sp-plan-addrow .btn { white-space: nowrap; }
.sp-plan-enter-default { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.sp-plan-copyopt { border: 1px dashed var(--color-border); border-radius: var(--radius-sm); padding: 8px 12px; margin: 0 0 12px; }
.sp-plan-copyopt > .sp-plan-radio { margin: 0 0 4px; }
.sp-plan-copyopt > .sp-plan-muted { margin: 0; }
.sp-plan-copy > .btn { white-space: normal; text-align: left; }
.sp-plan-records > li { margin: 2px 0; }
@media (max-width: 600px) { .sp-plan-addrow .btn { width: 100%; white-space: normal; } }

.ost-h { font-size: 1.05rem; margin: 0 0 10px; }
.ost-h3 { font-size: 0.95rem; margin: 16px 0 8px; }
.ost-sub { font-size: 0.82rem; color: var(--color-text-muted); margin: 4px 0 0; }
.ost-muted { color: var(--color-text-muted); font-size: 0.85rem; }
.ost-nowrap { white-space: nowrap; }
.ost-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ost-scroll { overflow-x: auto; }
.ost-table { width: 100%; }
.ost-table th[scope="row"] { white-space: nowrap; }
.ost-row-required > th { color: var(--color-text); }
.ost-ops { white-space: nowrap; }
.ost-ops > form { display: inline-block; margin-left: 4px; }
.ost-edit { display: inline-block; vertical-align: top; }
.ost-edit > summary { cursor: pointer; color: var(--color-primary-dark); font-size: 0.85rem; }
.ost-edit[open] { display: block; min-width: min(640px, 80vw); padding: 8px; margin: 6px 0; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); white-space: normal; }
.ost-check { display: flex; gap: 6px; align-items: center; font-weight: normal; }
.ost-suggest strong { color: var(--color-text); }
.ost-alert-text { color: var(--color-danger); }
.ost-ok { margin-bottom: 12px; }

.ost-warnings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ost-warning { padding: 6px 10px; border-radius: var(--radius-sm); border-left: 4px solid var(--color-border-strong); background: var(--color-surface-muted); font-size: 0.9rem; }
.ost-warning-danger { border-left-color: var(--color-danger); background: var(--color-danger-light); }
.ost-warning-warning { border-left-color: var(--color-warning); background: var(--color-warning-light); }
.ost-warning-info { border-left-color: var(--color-primary); background: var(--color-primary-light); }

.ost-chart { display: flex; flex-direction: column; align-items: center; padding: 8px 0; overflow-x: auto; }
.ost-level { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ost-level-gsm { align-items: center; }
.ost-advisor { margin-left: 18px; padding-left: 16px; border-left: 2px dashed var(--color-border-strong); }
.ost-conn { width: 0; height: 18px; border-left: 2px solid var(--color-border-strong); }
.ost-box { min-width: 140px; max-width: 240px; padding: 6px 10px; text-align: center; border: 2px solid var(--color-primary); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-card); }
.ost-box-vacant { border-style: dashed; border-color: var(--color-danger); background: var(--color-danger-light); }
.ost-box-optional { border-style: dotted; border-color: var(--color-border-strong); background: var(--color-surface-muted); color: var(--color-text-muted); box-shadow: none; }
.ost-box-role { font-weight: 700; font-size: 0.82rem; padding-bottom: 3px; margin-bottom: 3px; border-bottom: 1px solid var(--color-border); }
.ost-box-names { display: flex; flex-direction: column; gap: 1px; font-size: 0.92rem; }
.ost-box-empty { color: var(--color-danger); font-size: 0.85rem; }
.ost-box-optional .ost-box-empty { color: var(--color-text-muted); }
.ost-box-sub, .ost-box-note { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 2px; }

.ost-committee { display: flex; flex-direction: column; align-items: center; padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface-muted); }
.ost-committee-title { font-weight: 700; margin-bottom: 6px; }
.ost-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; width: 100%; }
.ost-side { padding: 8px 10px; border: 1px solid var(--color-border); border-top: 3px solid var(--color-accent); border-radius: var(--radius-sm); background: var(--color-surface); }
.ost-side-worker { border-top-color: var(--color-success); }
.ost-side-head { font-weight: 700; font-size: 0.85rem; margin-bottom: 4px; }
.ost-side-list { margin: 0; padding-left: 18px; }
.ost-committee-foot { font-size: 0.8rem; color: var(--color-text-muted); margin: 8px 0 0; text-align: center; }

.ost-history { margin: 0; padding-left: 18px; font-size: 0.85rem; }

@media (max-width: 640px) {
  .ost-level-gsm { flex-direction: column; }
  .ost-advisor { margin: 8px 0 0; padding: 8px 0 0; border-left: none; border-top: 2px dashed var(--color-border-strong); }
  .ost-box { min-width: 120px; }
}


.orr-grade { display: inline-flex; align-items: center; gap: 4px; min-width: 2.2em; justify-content: center; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--color-text); background: var(--color-surface-muted); border-left: 4px solid var(--color-border-strong); }
.orr-grade small { font-size: 11px; font-weight: 600; }
.orr-grade-IV { background: var(--color-danger-light); border-left-color: var(--color-danger); }
.orr-grade-III { background: var(--color-warning-light); border-left-color: var(--color-warning); }
.orr-grade-II { background: var(--color-primary-light); border-left-color: var(--color-primary); }
.orr-grade-I { background: var(--color-success-light); border-left-color: var(--color-success); }
.orr-grade-none { font-weight: 600; font-size: 12px; color: var(--color-text-muted); }

.orr-flow { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.orr-arrow { color: var(--color-text-muted); font-weight: 700; }
.orr-muted { color: var(--color-text-muted); font-size: 12px; margin-left: 4px; }
.orr-note { color: var(--color-text-muted); font-size: 13px; margin: 6px 0; }
.orr-here { color: var(--color-text); font-weight: 700; }

.orr-dist { width: 100%; border-collapse: collapse; }
.orr-dist th, .orr-dist td { padding: 6px 6px; border-bottom: 1px solid var(--color-border); vertical-align: middle; text-align: left; }
.orr-dist th { width: 4.5em; }
.orr-dist-label { font-size: 13px; }
.orr-dist-bar { width: 35%; }
.orr-bar { display: block; height: 10px; min-width: 2px; border-radius: var(--radius-sm); background: var(--color-border-strong); }
.orr-bar-IV { background: var(--color-danger); }
.orr-bar-III { background: var(--color-warning); }
.orr-bar-II { background: var(--color-primary); }
.orr-bar-I { background: var(--color-success); }
.orr-bar-none { background: var(--color-border-strong); }
.orr-dist-count { text-align: right; white-space: nowrap; font-weight: 700; }
.orr-dist-row.is-active { background: var(--color-surface-muted); }
.orr-dist-row.is-active > th { box-shadow: inset 3px 0 0 var(--color-accent); }

.orr-settings-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.orr-settings-form .form-group { margin-bottom: 0; min-width: 16em; }
.orr-legend-box { margin-top: 10px; }
.orr-legend-box > summary { cursor: pointer; font-weight: 600; }
.orr-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.orr-legend-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.orr-legend-table caption { text-align: left; font-weight: 700; padding-bottom: 4px; color: var(--color-text); }
.orr-legend-table th, .orr-legend-table td { border: 1px solid var(--color-border); padding: 4px 6px; vertical-align: top; text-align: left; }
.orr-legend-table th { width: 3.5em; text-align: center; background: var(--color-surface-muted); }
.orr-legend-table td span { color: var(--color-text-muted); }
.orr-legend-table tr.is-here > td { background: var(--color-surface-muted); }
.orr-legend-table tr.is-here > th { box-shadow: inset 3px 0 0 var(--color-accent); }

.orr-summary { display: grid; gap: 6px; margin: 6px 0 12px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface-muted); }
.orr-summary > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.orr-summary-label { display: inline-block; min-width: 9.5em; font-weight: 700; font-size: 13px; }
.orr-score { font-size: 13px; }
.orr-est-row .form-group { min-width: 12em; }
.orr-type { display: inline-block; padding: 1px 6px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--color-text); background: var(--color-surface-muted); border: 1px solid var(--color-border); }
.orr-type-elimination { border-color: var(--color-success); }
.orr-type-engineering { border-color: var(--color-primary); }
.orr-type-administrative { border-color: var(--color-warning); }
.orr-type-ppe { border-color: var(--color-border-strong); }
.orr-measures td { vertical-align: top; }
.orr-measure-done > td { color: var(--color-text-muted); }
.orr-actions { white-space: nowrap; }
.orr-actions > form { display: inline-block; margin: 0 4px 4px 0; }
.orr-add { margin-top: 10px; }
.orr-add > summary { cursor: pointer; font-weight: 600; color: var(--color-primary); }
.orr-add > form { margin-top: 8px; }

@media (max-width: 640px) {
  .orr-dist-bar { display: none; }
  .orr-summary-label { min-width: 0; width: 100%; }
  .orr-actions { white-space: normal; }
}


.ocm-circ { overflow-x: auto; margin-bottom: 16px; }
.ocm-circ-table { border-collapse: collapse; min-width: 100%; table-layout: fixed; }
.ocm-circ-table th,
.ocm-circ-table td { border: 1px solid var(--color-border-strong); text-align: center; padding: 6px 4px; font-size: 13px; }
.ocm-circ-table th { background: var(--color-surface-muted); font-weight: 600; }
.ocm-circ-table td { height: 72px; vertical-align: middle; }
.ocm-circ-table form { margin: 0; }
.ocm-stamp { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; height: 56px; border: 2px solid #b8322a; border-radius: 50%; color: #b8322a; font-size: 11px; line-height: 1.2; }
.ocm-stamp strong { font-size: 12px; max-width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ocm-stamp-undo { display: block; margin-top: 4px; font-size: 11px; }
.ocm-stamp-none { color: var(--color-text-muted); font-size: 12px; }

.ocm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.ocm-attend { width: 100%; border-collapse: collapse; }
.ocm-attend th,
.ocm-attend td { border-bottom: 1px solid var(--color-border); padding: 6px 8px; text-align: left; vertical-align: middle; }
.ocm-attend th { font-size: 12px; color: var(--color-text-muted); font-weight: 600; }
.ocm-attend .ocm-attend-role { white-space: nowrap; width: 30%; }
.ocm-attend .ocm-attend-status { white-space: nowrap; width: 9em; }
.ocm-attend input.form-control { margin: 0; }

.ocm-afd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; padding: 12px 16px; border: 1px solid var(--color-border); border-left: 4px solid var(--color-primary); border-radius: var(--radius); background: var(--color-primary-light); }
.ocm-afd-num { font-size: 30px; font-weight: 700; color: var(--color-primary-dark); }
.ocm-afd-num small { font-size: 14px; font-weight: 600; margin-left: 2px; }
.ocm-afd-sub { font-size: 13px; color: var(--color-text-muted); }

.ocm-comments { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ocm-comment { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 12px; }
.ocm-comment h3 { margin: 0 0 6px; font-size: 14px; }

.ocm-hint { margin: 2px 0 6px; font-size: 12px; color: var(--color-text-muted); line-height: 1.6; }
.ocm-suggest { margin: 6px 0; padding: 8px 10px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-sm); background: var(--color-surface-muted); font-size: 12.5px; white-space: pre-wrap; line-height: 1.6; }
.ocm-suggest-title { display: block; font-weight: 600; margin-bottom: 2px; }
.ocm-note { margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--color-accent); background: var(--color-accent-light); font-size: 13px; line-height: 1.6; }

.ocm-delib-wrap { overflow-x: auto; }
.ocm-delib { width: 100%; border-collapse: collapse; }
.ocm-delib th,
.ocm-delib td { border: 1px solid var(--color-border); padding: 8px; vertical-align: top; text-align: left; }
.ocm-delib thead th { background: var(--color-surface-muted); font-size: 12px; font-weight: 600; }
.ocm-delib .ocm-delib-no { width: 2.5em; text-align: center; color: var(--color-text-muted); }
.ocm-delib .ocm-delib-title { width: 30%; }
.ocm-delib .ocm-delib-title strong { display: block; font-size: 14px; }
.ocm-delib .ocm-delib-result { width: 5.5em; text-align: center; white-space: nowrap; }
.ocm-delib .ocm-delib-mark { font-size: 18px; font-weight: 700; }
.ocm-delib .ocm-delib-content { white-space: pre-wrap; line-height: 1.7; }
.ocm-delib textarea.form-control { min-height: 64px; margin: 0; }
.ocm-extra { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: 13px; }
.ocm-extra label { display: inline-flex; align-items: center; gap: 4px; }
.ocm-num { width: 5.5em; display: inline-block; }
.ocm-radio { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; }
.ocm-radio label { display: inline-flex; align-items: center; gap: 3px; font-weight: normal; white-space: nowrap; }

.ocm-pi { display: grid; gap: 10px; }
.ocm-pi-row { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 8px 12px; }
.ocm-pi-row h3 { margin: 0 0 4px; font-size: 14px; }

.ocm-form-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--color-border); }
.ocm-form-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.ocm-form-section > h2 { margin: 0 0 10px; font-size: 16px; }
.ocm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.ocm-toolbar form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0; }
.ocm-toolbar .form-group { margin: 0; }

@media (max-width: 640px) {
  .ocm-delib .ocm-delib-title { width: auto; }
  .ocm-attend .ocm-attend-role { width: auto; }
}

@media print {
  .ocm-circ-table form, .ocm-stamp-undo, .ocm-toolbar { display: none !important; }
}

.omp-sub { font-size: 0.86rem; color: var(--color-text-muted); margin: 4px 0 8px; }
.omp-muted { color: var(--color-text-muted); }
.omp-pre { white-space: pre-wrap; }
.omp-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.omp-empty { color: var(--color-text-muted); padding: 8px 0; }
.omp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.omp-h { font-size: 1.05rem; margin: 18px 0 8px; padding-left: 8px; border-left: 4px solid var(--color-primary); }
.omp-h:first-child { margin-top: 0; }
.omp-h3 { font-size: 0.98rem; margin: 16px 0 6px; }
.omp-h4 { font-size: 0.92rem; margin: 10px 0 4px; }
.omp-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.omp-create + .omp-create { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--color-border); }
.omp-scroll { overflow-x: auto; max-width: 100%; }
.omp-table { width: 100%; border-collapse: collapse; }
.omp-table th, .omp-table td { vertical-align: top; }
.omp-edit-table td { min-width: 150px; }
.omp-edit-table td.omp-ops { min-width: 110px; white-space: nowrap; }
.omp-edit-table textarea.form-control { min-height: 3.2em; resize: vertical; }
.omp-ops label { display: block; font-size: 0.85rem; margin-bottom: 4px; }
.omp-excluded td { opacity: 0.55; }
.omp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.omp-tsec { padding: 8px 0 12px; border-top: 1px solid var(--color-border); }
.omp-tsec:first-of-type { border-top: none; }
.omp-import { margin-top: 8px; padding: 8px 12px; border: 1px dashed var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.omp-import > summary { cursor: pointer; font-weight: 600; }
.omp-sugg { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.omp-sugg label { display: flex; gap: 6px; align-items: flex-start; }
.omp-tools { background: var(--color-surface-muted); }
.omp-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; font-size: 0.9rem; }
.omp-footer { margin: 16px 0; text-align: right; }
.omp-history { margin: 0; padding-left: 1.2em; font-size: 0.88rem; }
.omp-figures th[scope="row"] { white-space: nowrap; }
.omp-notices > .alert { margin-bottom: 8px; }
.omp-incident-more { margin: 8px 0 12px; padding: 8px 12px; border: 1px dashed var(--color-border); border-radius: var(--radius-sm); }
.omp-incident-more > summary { cursor: pointer; font-weight: 600; }
@media (max-width: 640px) {
  .omp-edit-table td { min-width: 130px; }
  .omp-footer { text-align: left; }
}


.rbm-list-badges { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: 6px; vertical-align: middle; }
.rbm-badge { font-size: 11px; padding: 1px 8px; }
.rbm-clip { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }
.rbm-print-link { white-space: nowrap; font-size: 13px; }

.rbm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }

.rbm-picker { background: var(--color-surface-muted); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.rbm-picker-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.rbm-picker-row > .form-group { flex: 1 1 220px; margin-bottom: 0; }
.rbm-picker-actions { flex: 0 0 auto; padding-bottom: 2px; }
.rbm-picker > .file-meta { margin: 8px 0 0; }

.rbm-entry-form > .form-row { flex-wrap: wrap; }
.rbm-form-section { border: 1px solid var(--color-border, #d9dce3); border-radius: 10px; padding: 10px 14px 4px; margin: 0 0 14px; min-width: 0; }
.rbm-form-section > legend { font-weight: 700; padding: 0 6px; }
.rbm-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.rbm-time-range { display: flex; align-items: center; gap: 6px; }
.rbm-time-range > .form-control { flex: 1 1 0; min-width: 0; }
.rbm-role-inputs { display: flex; flex-direction: column; gap: 4px; }
.rbm-note { font-size: 13px; line-height: 1.6; }
.rbm-note-privacy { border-left: 4px solid var(--color-warning-dark, #b7791f); }
.rbm-sign-note { margin: 4px 0 10px; }

.rbm-attendees { border: 1px dashed var(--color-border, #d9dce3); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; min-width: 0; }
.rbm-attendees > legend { font-weight: 600; padding: 0 4px; }
.rbm-att-group { margin: 6px 0 8px; }
.rbm-att-group-name { margin: 0 0 4px; font-size: 12px; font-weight: 700; color: var(--color-text-muted); }
.rbm-att-list { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.rbm-att-item { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--color-border, #d9dce3); border-radius: 8px; background: #fff; }
.rbm-att-name { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: normal; }
.rbm-att-side { font-size: 12px; padding: 1px 4px; border-radius: 6px; border: 1px solid var(--color-border, #d9dce3); }
.rbm-att-absent { display: inline-flex; align-items: center; gap: 2px; margin: 0; font-size: 12px; font-weight: normal; color: var(--color-danger-dark, #b42318); }
.rbm-guests { margin-top: 8px; }

.rbm-table-wrap { overflow-x: auto; }
.rbm-form-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.rbm-form-table th, .rbm-form-table td { padding: 4px; vertical-align: top; }
.rbm-form-table th { font-size: 12px; text-align: left; white-space: nowrap; }
.rbm-form-table .rbm-no { width: 2.5em; text-align: center; color: var(--color-text-muted); }
.rbm-form-table .form-control { min-width: 7em; }
.rbm-add-rows { margin-top: 6px; }

.rbm-files { list-style: none; padding: 0; margin: 0 0 12px; }
.rbm-file { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; border-bottom: 1px solid var(--color-border, #eceef3); }
.rbm-file > a { word-break: break-all; }
.rbm-inline-form { display: inline; margin: 0; }
.rbm-attach-form { margin-top: 8px; }

.rbm-book-default { max-width: 460px; margin-top: 12px; }
.rbm-samples-wrap { margin-top: 18px; }
.rbm-sample-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.rbm-sample-nav > a { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--color-surface-muted); text-decoration: none; }
.rbm-samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); gap: 16px; align-items: start; }
.rbm-sample { margin: 0; }
.rbm-sample-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.rbm-sample-preview { max-height: 640px; overflow: auto; border: 1px solid var(--color-border, #d9dce3); border-radius: 8px; background: #eef0f4; padding: 8px; }

.rbm-sheet-card { overflow-x: auto; }
.rbm-sheet { position: relative; background: #fff; color: #1f2430; font-size: 12px; line-height: 1.55; }
.rbm-sheet-inline { padding: 6px 4px; }
.rbm-sample-preview .rbm-sheet { padding: 12px 14px; font-size: 11px; box-shadow: 0 0 4px rgba(0, 0, 0, 0.12); }
.rbm-sheet-example { overflow: hidden; }
.rbm-example-mark { position: absolute; top: 40px; right: 18px; font-size: 64px; font-weight: 800; color: rgba(220, 38, 38, 0.14); transform: rotate(-12deg); pointer-events: none; }
.rbm-example-note { margin: 0 0 6px; font-size: 11px; color: #b42318; font-weight: 600; }
.rbm-sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.rbm-doc-title { font-size: 18px; font-weight: 700; margin: 4px 0; letter-spacing: 0.08em; }
.rbm-doc-company { margin: 0; color: #555; }
.rbm-stamps { border-collapse: collapse; flex: 0 0 auto; }
.rbm-stamps th, .rbm-stamps td { border: 1px solid #555; text-align: center; width: 64px; font-size: 10px; padding: 2px; }
.rbm-stamps th { background: #f1f3f7; font-weight: 600; }
.rbm-stamp-who { display: block; font-weight: normal; font-size: 9px; color: #555; }
.rbm-stamps .rbm-stamp-box { height: 54px; }
.rbm-sheet .rbm-info { width: 100%; border-collapse: collapse; margin: 0 0 8px; }
.rbm-sheet .rbm-info th, .rbm-sheet .rbm-info td { border: 1px solid #777; padding: 4px 6px; text-align: left; vertical-align: top; }
.rbm-sheet .rbm-info th { width: 24%; background: #f1f3f7; font-weight: 600; }
.rbm-section { margin-top: 12px; }
.rbm-section-title { font-size: 14px; margin: 0 0 6px; padding-bottom: 3px; border-bottom: 2px solid #4338ca; }
.rbm-block { margin: 6px 0; }
.rbm-block-label { font-weight: 600; margin: 6px 0 3px; }
.rbm-textbox { border: 1px solid #999; padding: 6px 8px; min-height: 40px; }
.rbm-line { margin: 0; }
.rbm-muted { color: #777; }
.rbm-grid { width: 100%; border-collapse: collapse; }
.rbm-grid th, .rbm-grid td { border: 1px solid #777; padding: 4px 5px; vertical-align: top; }
.rbm-grid thead th { background: #f1f3f7; font-weight: 600; }
.rbm-grid .rbm-no { width: 2.5em; text-align: center; white-space: nowrap; }
.rbm-grid .rbm-col-number { text-align: right; white-space: nowrap; }
.rbm-grid .rbm-col-date, .rbm-grid .rbm-col-select { white-space: nowrap; }
.rbm-signs { margin-top: 10px; }
.rbm-sign-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rbm-sign-table th { border: 1px solid #777; background: #f1f3f7; font-weight: 600; padding: 3px; font-size: 11px; }
.rbm-sign-table .rbm-sign-box { border: 1px solid #777; height: 54px; text-align: right; vertical-align: bottom; padding: 3px 6px; }
.rbm-seal { color: #999; font-size: 11px; }
.rbm-sheet-foot { margin-top: 14px; color: #666; font-size: 10px; }

@media (max-width: 640px) {
  .rbm-stamps th, .rbm-stamps td { width: 52px; }
  .rbm-stamps .rbm-stamp-box { height: 44px; }
  .rbm-sheet .rbm-info th { width: 32%; }
  .rbm-att-item { flex-wrap: wrap; }
}

@media print {
  .rbm-actions, .rbm-picker, .rbm-attach-form { display: none !important; }
  .rbm-sample-preview { max-height: none; overflow: visible; }
}

.cw-toolbar { padding-block: 12px; }
.cw-year-nav { margin-bottom: 10px; }
.cw-year-nav strong { min-width: 0; font-size: 15px; }
.cw-filter { align-items: flex-end; }
.cw-filter .cw-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; white-space: nowrap; }
.cw-section { padding-block: 12px; }
.cw-h-sub { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--color-text-muted); }
.cw-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cw-table { table-layout: fixed; min-width: 1100px; font-size: 12.5px; font-variant-numeric: tabular-nums; border-collapse: collapse; }
.cw-table th, .cw-table td { padding: 5px 6px; overflow-wrap: anywhere; }
.cw-table thead th { white-space: normal; line-height: 1.3; font-size: 11.5px; vertical-align: bottom; border-bottom: 2px solid var(--color-border); }
.cw-table td:first-child { min-width: 0; }
.cw-table-summary { min-width: 960px; }
.cw-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cw-date, .cw-code { white-space: nowrap; }
.cw-name a { font-weight: 600; }
.cw-dept > tr > td { border-top: 1px solid var(--color-border); }
.cw-dept + .cw-dept > tr:first-child > td { border-top: 2px solid var(--color-border); }
.cw-subtotal > th, .cw-subtotal > td { background: var(--color-surface-muted); font-weight: 700; }
.cw-total > th, .cw-total > td { font-weight: 700; border-top: 2px solid var(--color-text-muted); background: var(--color-surface-muted); }
.cw-label { text-align: left; }
.cw-count { margin-left: 6px; font-size: 11.5px; font-weight: 400; color: var(--color-text-muted); }
.cw-mark { display: inline-block; margin-left: 3px; padding: 0 3px; border: 1px solid var(--color-border); border-radius: 3px; font-size: 10px; line-height: 1.4; color: var(--color-text-muted); }
.cw-empty { margin: 6px 0; }
.cw-input { width: 100%; min-width: 0; padding: 4px 6px; font-size: 12.5px; }
.cw-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 12px 0 4px; }
.cw-admin label { font-weight: 700; font-size: 13px; }
.cw-admin .cw-input { width: 12em; }
.cw-admin .cw-hint { flex: 1 1 100%; margin: 0; }
.cw-hint { font-size: 12.5px; color: var(--color-text-muted); }
.cw-summary-notes { margin: 6px 0 10px; padding-left: 20px; font-size: 13px; }
.cw-howto ul { margin: 8px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.7; }
@media (max-width: 720px) {
  .cw-filter .cw-check { white-space: normal; }
  .cw-admin .cw-input { width: 100%; }
}
@media print {
  .cw-no-print { display: none !important; }
  .cw-table-wrap { overflow: visible; }
  .cw-table { min-width: 0; font-size: 9pt; }
  .cw-table tr { break-inside: avoid; page-break-inside: avoid; }
  .cw-table thead { display: table-header-group; }
  .cw-input { border: 0; padding: 0; background: none; }
}

.cw-filter > .cw-dept-pick { flex: 1 1 100%; min-width: 0; margin: 0; padding: 0; border: 0; }
.cw-dept-pick > legend { padding: 0; margin-bottom: 4px; font-size: 13px; font-weight: 700; }
.cw-dept-now { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--color-text-muted); }
.cw-dept-list { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cw-dept-list > .cw-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; white-space: nowrap; }
.cw-dept-filter-note { margin: 0 0 10px; }

.cw-share-block { min-width: 0; margin: 4px 0 14px; padding: 8px 12px 12px; border: 1px solid var(--color-border); border-radius: 6px; }
.cw-share-block > legend { padding: 0 4px; font-size: 13px; font-weight: 700; }
.cw-share-block > .cm-form-hint { margin: 0 0 8px; }
.cw-share-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 6px 16px; }
.cw-share-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cw-share-row > select { flex: 1 1 auto; min-width: 0; }
.cw-share-row > .cw-share-pct { flex: 0 0 5.5em; width: 5.5em; min-width: 0; text-align: right; }
.cw-share-unit { flex: 0 0 auto; font-size: 13px; color: var(--color-text-muted); }
.cw-share-errors { margin: 6px 0 0; padding-left: 20px; }

@media (max-width: 480px) {
  .cw-dept-list > .cw-check { white-space: normal; }
  .cw-share-rows { grid-template-columns: 1fr; }
}

.ks-section { margin-bottom: 16px; }
.ks-section > h2 { font-size: 17px; margin: 0 0 10px; }

.ks-disclaimer { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.ks-disclaimer-std { font-size: 13px; }

.ks-tabs { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 4px 0 12px; border-bottom: 1px solid var(--color-border, #dde3ea); }
.ks-tabs > a { padding: 6px 12px; font-size: 14px; color: var(--color-text-muted, #5b6573); border-bottom: 2px solid transparent; text-decoration: none; }
.ks-tabs > a:hover { color: var(--color-primary-dark, #1d4f91); background: var(--color-primary-light, #eef4fb); border-radius: var(--radius-sm, 4px) var(--radius-sm, 4px) 0 0; text-decoration: none; }
.ks-tabs > a.active { color: var(--color-primary-dark, #1d4f91); font-weight: 700; border-bottom-color: var(--color-primary, #2a6fc9); }

.ks-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ks-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ks-table th, .ks-table td { border-bottom: 1px solid var(--color-border, #dde3ea); padding: 6px 8px; text-align: left; vertical-align: top; }
.ks-table thead th { background: var(--color-surface-muted, #f4f6f9); font-size: 13px; white-space: nowrap; }
.ks-table tfoot th, .ks-table tfoot td { background: var(--color-surface-muted, #f4f6f9); font-weight: 700; }
.ks-table-compact { font-size: 13px; }
.ks-table .ks-num, .ks-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ks-table .ks-p, .ks-p { font-weight: 700; font-size: 15px; }
.ks-table .ks-formula { font-size: 12.5px; color: var(--color-text-muted, #5b6573); min-width: 200px; }
.ks-group-row > th { background: var(--color-primary-light, #eef4fb); color: var(--color-primary-dark, #1d4f91); font-size: 13px; }
.ks-center { text-align: center; }
.ks-nowrap { white-space: nowrap; }
.ks-small { font-size: 12px; }
.ks-muted { color: var(--color-text-muted, #5b6573); }
.ks-up { color: var(--color-success-dark, #1f7a3f); font-weight: 700; }
.ks-down { color: var(--color-danger-dark, #b3263e); font-weight: 700; }
.ks-p-chip { display: inline-block; padding: 1px 6px; margin: 1px 0; border: 1px solid var(--color-border, #dde3ea); border-radius: 10px; font-size: 12.5px; white-space: nowrap; background: var(--color-surface, #fff); }

.ks-form-table td { padding: 4px 6px; }
.ks-form-table .form-control { min-width: 0; }
.ks-input-num { text-align: right; min-width: 90px; max-width: 140px; }
.ks-staff-table .form-control { font-size: 13px; padding: 4px 6px; }
.ks-staff-table td { min-width: 90px; }
.ks-select-trade, .ks-select-cat { margin-bottom: 4px; min-width: 130px; }

.ks-stacks { margin-top: 12px; }
.ks-stack-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.ks-stack-label { width: 2.5em; font-weight: 700; text-align: center; }
.ks-stack-total { width: 4.5em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ks-stack { flex: 1; display: flex; height: 18px; background: var(--color-surface-muted, #f4f6f9); border-radius: 4px; overflow: hidden; min-width: 120px; }
.ks-seg { display: block; height: 100%; }
.ks-seg-x1 { background: #2a6fc9; }
.ks-seg-x2 { background: #7fb2e5; }
.ks-seg-y { background: #e08a3c; }
.ks-seg-z { background: #3f9a5b; }
.ks-seg-w { background: #8a63d2; }
.ks-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; padding: 0; margin: 8px 0 4px; font-size: 12.5px; }
.ks-legend > li { display: flex; align-items: center; gap: 5px; }
.ks-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }

.ks-fieldset { border: 1px solid var(--color-border, #dde3ea); border-radius: var(--radius-sm, 6px); padding: 8px 12px 10px; margin: 0 0 12px; }
.ks-fieldset > legend { font-weight: 700; padding: 0 6px; font-size: 14px; }
.ks-fieldset.ks-sub { margin-top: 8px; background: var(--color-surface-muted, #f8f9fb); }
.ks-points { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 10px; background: var(--color-accent-light, #e8f2fa); color: var(--color-accent-dark, #1b5a86); font-size: 12.5px; }
.ks-trade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }
.ks-check, .ks-radio { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; padding: 2px 0; font-weight: normal; }
.ks-radio { margin-bottom: 2px; }
.ks-check-list { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.ks-hint { font-size: 13px; color: var(--color-text-muted, #5b6573); margin: 4px 0 8px; }
.ks-privacy { color: var(--color-warning-dark, #8a5a00); }
.ks-source { font-size: 12.5px; color: var(--color-text-muted, #5b6573); margin: 2px 0; }
.ks-import-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.ks-import-bar .ks-source { flex-basis: 100%; }
.ks-howto { margin: 4px 0 12px; font-size: 13px; }
.ks-howto > summary { cursor: pointer; color: var(--color-primary-dark, #1d4f91); }
.ks-howto ul { margin: 6px 0 0; padding-left: 20px; }
.ks-inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0 4px 4px 0; }
.ks-inline-form .form-control { width: auto; }
.ks-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ks-readonly { border: 0; padding: 0; margin: 0; min-width: 0; }
.ks-reset { margin-top: 12px; }

.ks-warn-list { margin: 6px 0 0; padding-left: 20px; }
.ks-warn-list > li { margin: 2px 0; }
.ks-docs { list-style: none; padding: 0; margin: 0; }
.ks-docs > li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--color-border, #dde3ea); }
.ks-doc-name { font-weight: 700; flex: 1 1 260px; }
.ks-docs .ks-privacy { flex-basis: 100%; margin: 0; }
.ks-unmatched { margin: 0; padding-left: 20px; columns: 2 260px; }
.ks-history ul { margin: 6px 0 0; padding-left: 20px; font-size: 13px; }
.ks-chart { overflow-x: auto; margin-top: 8px; }
.ks-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.ks-grid-2 > .ks-section { margin-bottom: 0; }
.ks-grid-2 + .ks-section { margin-top: 16px; }
.ks-sim-form .form-row { flex-wrap: wrap; }

@media (max-width: 640px) {
  .ks-trade-grid { grid-template-columns: 1fr 1fr; }
  .ks-stack-label { width: 2em; }
  .ks-table { font-size: 13px; }
}

.sd-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.sd-nav > a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface, #fff);
  font-size: 14px;
}
.sd-nav > a:hover { border-color: var(--color-primary); text-decoration: none; }
.sd-section { margin-bottom: 20px; }
.sd-section > h2 { margin-top: 0; }
.sd-subtitle { margin: 24px 0 8px; font-size: 16px; }
.sd-lead { margin: 0 0 10px; line-height: 1.7; }
.sd-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 4px solid var(--color-accent, #4682b4);
  background: var(--color-accent-light, #eef5fb);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.7;
}
.sd-muted { color: var(--color-text-muted); font-size: 13px; }
.sd-zero { color: var(--color-text-muted); }
.sd-nowrap { white-space: nowrap; }
.sd-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--color-warning-light, #fff4d6);
  color: var(--color-warning-dark, #8a5a00);
  font-size: 12px;
  vertical-align: middle;
}
.sd-list { margin: 6px 0 10px; padding-left: 1.4em; line-height: 1.7; }
.sd-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; }
.sd-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; }
.sd-table-wrap > table { min-width: 560px; }
.sd-table-wrap th, .sd-table-wrap td { padding: 6px 8px; border-bottom: 1px solid var(--color-border); vertical-align: middle; text-align: left; }
.sd-table-wrap thead th { background: var(--color-surface-muted, #f4f6fa); font-size: 13px; white-space: nowrap; }
.sd-table-wrap td.num-cell { text-align: right; white-space: nowrap; }

.sd-check { width: 36px; text-align: center; }
.sd-check > input { width: 18px; height: 18px; }
.sd-tree-table tr.sd-parent > td { font-weight: 600; }
.sd-tree-table tr.sd-child > td { font-weight: normal; }
.sd-tree-table tr.sd-child > td:nth-child(2) { padding-left: 28px; }
.sd-branch { color: var(--color-text-muted); }
.sd-impact {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--color-danger-light, #f6c9d3);
  border-radius: 8px;
  background: #fffafa;
}
.sd-impact > h3 { margin-top: 0; }
.sd-impact-table th { font-weight: normal; }
.sd-impact-table tr.sd-zero-row > th, .sd-impact-table tr.sd-zero-row > td { color: var(--color-text-muted); }
.sd-details { margin: 8px 0; }
.sd-details > summary { cursor: pointer; }

.sd-assign-table tr.sd-changed > td { background: var(--color-warning-light, #fff4d6); }
.sd-select { min-width: 160px; max-width: 100%; }

.sd-fieldset { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 6px; }
.sd-fieldset > legend { padding: 0 4px; font-size: 14px; }
.sd-dept-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sd-dept-check { display: inline-flex; align-items: center; gap: 6px; }

.sd-result > h2 { margin: 0 0 8px; font-size: 18px; }
.sd-result code { word-break: break-all; }
.sd-backup { margin: 8px 0 4px; }
.sd-links { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 640px) {
  .sd-nav > a { flex: 1 1 100%; text-align: center; }
  .sd-actions > .btn { flex: 1 1 100%; text-align: center; }
}

.topbar-back { margin-right: auto; font-size: 17px; font-weight: 700; color: var(--color-text); }
.topbar-back:hover { background: var(--color-primary-light); border-color: var(--color-primary); }

.cm-projects-table { min-width: 760px; }
.cm-projects-table td.cm-cell-name { min-width: 16em; }
.cm-projects-table td.cm-cell-dept { min-width: 5.5em; }
.cm-cell-status { display: block; margin-top: 4px; }
.cm-projects-table td.cm-cell-period { min-width: 8.5em; word-break: keep-all; }
.cm-projects-table td.cm-cell-cost .cm-rate { min-width: 0; }
.cm-th-sub { display: block; font-weight: 400; font-size: 11.5px; color: var(--color-text-muted); }
th .cm-th-sub { color: inherit; opacity: 0.82; }
.cm-cell-meta { display: block; margin-top: 2px; font-size: 12.5px; color: var(--color-text-muted); }
.cm-cell-cost .cm-cell-meter { display: block; margin-top: 4px; }
.cm-cell-cost .cm-rate { justify-content: flex-end; }
.cm-projects-table .cm-name { word-break: normal; overflow-wrap: break-word; line-height: 1.5; }
.cm-projects-table .cm-flags { margin-top: 4px; }
@media (max-width: 700px) {
  .cm-projects-table { min-width: 900px; font-size: 13px; }
  .cm-projects-table td.cm-cell-name { min-width: 14em; }
}


.cdi-basis {
  margin: 8px 0 4px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.cdi-basis > legend {
  padding: 0;
  margin-bottom: 6px;
}
.cdi-basis-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}
.cdi-basis-option > input {
  margin-top: 4px;
  flex: 0 0 auto;
}
.cdi-basis-option > span > strong {
  display: block;
}
.cdi-basis-option .cr-hint {
  display: block;
  margin-left: 0;
}
.cdi-basis-option:has(> input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.cdi-match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 4px;
}

.cdi-warn {
  margin-top: 10px;
  padding: 8px 12px;
  border-left: 3px solid var(--color-warning);
  background: var(--color-surface-muted);
  border-radius: 4px;
}
.cdi-warn > .cr-help-list {
  margin: 4px 0 0;
  max-height: 16em;
  overflow-y: auto;
}
.cdi-scope .badge {
  margin-left: 2px;
}

@media (max-width: 600px) {
  .cdi-basis-option {
    padding: 8px 10px;
  }
}

@media print {
  .cdi-match > a {
    display: none;
  }
}


#cb-pick-actuals:checked ~ .cb-panels .cb-panel-actuals { display: block; }
#cb-pick-actuals:checked ~ .cb-choices .cb-choice-actuals {
  border-color: var(--color-primary); background: var(--color-primary-light); box-shadow: inset 0 0 0 1px var(--color-primary);
}
#cb-pick-actuals:focus-visible ~ .cb-choices .cb-choice-actuals { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.cup-code {
  display: inline-block; padding: 0 5px; border-radius: var(--radius-sm); background: var(--color-surface-muted);
  border: 1px solid var(--color-border); font-size: 11px; font-variant-numeric: tabular-nums; color: var(--color-text-muted); line-height: 1.6;
}
.cup-count { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--color-text-muted); }

.cup-filter-form { margin-top: 10px; }
.cup-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 4px 14px; }
.cup-span2 { grid-column: span 2; }
.cup-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cup-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

.cup-wt { padding: 0; overflow: hidden; }
.cup-wt > .cup-summary { padding: 12px 16px; }
.cup-summary {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px;
  cursor: pointer; list-style: none;
}
.cup-summary::-webkit-details-marker { display: none; }
.cup-summary::before { content: '▸'; color: var(--color-text-muted); margin-right: 4px; }
details[open] > .cup-summary::before { content: '▾'; }
.cup-summary-wt { background: var(--color-surface-muted); border-bottom: 1px solid var(--color-border); }
.cup-summary-name { flex: 1 1 220px; font-weight: 700; }
.cup-summary-figs { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.cup-summary-figs > strong { color: var(--color-text); font-size: 15px; }
.cup-subs { padding: 4px 12px 12px; }
.cup-st { border-bottom: 1px solid var(--color-border); }
.cup-st:last-child { border-bottom: 0; }
.cup-st > .cup-summary { padding: 10px 4px; }
.cup-st > .cup-summary .cup-summary-name { font-weight: 600; }
.cup-st > .cc-table-wrap { margin: 0 0 12px; }
.cup-table td { vertical-align: top; }
.cup-table .cup-detail { white-space: nowrap; color: var(--color-text-muted); font-size: 13px; }
.cup-table .cup-item { min-width: 160px; }
.cup-sub-row td { background: var(--color-surface-muted); }
.cup-diff { font-weight: 700; }
.cup-diff.cup-up { color: var(--color-danger); }
.cup-diff.cup-down { color: var(--color-success-dark); }

.cup-code-fields { border: 1px dashed var(--color-border-strong); border-radius: var(--radius-sm); padding: 6px 12px 4px; margin: 6px 0 10px; }
.cup-code-fields > legend { font-size: 12px; color: var(--color-text-muted); padding: 0 4px; }
.cup-code-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0 10px; }
.cup-code-note { display: block; }
.cup-var-table .cup-indent { padding-left: 28px; }
.cup-var-wt td { background: var(--color-surface-muted); }
.cup-flag-over td { background: var(--color-danger-light); }
.cup-flag-under td { background: var(--color-warning-light); }

.cup-opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 16px; }
.cup-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; }
.cup-inline > input { width: 80px; }
.cup-muted td { color: var(--color-text-muted); }
.cup-evidence { font-size: 12px; color: var(--color-text-muted); min-width: 180px; }
.cup-evidence > span { display: block; line-height: 1.5; }
.cup-proposal-table td { vertical-align: top; }
.cup-line-code { display: block; margin-top: 2px; font-size: 11px; color: var(--color-text-muted); white-space: nowrap; }

@media (max-width: 700px) {
  .cup-span2 { grid-column: auto; }
  .cup-summary-figs { width: 100%; }
  .cup-subs { padding: 4px 6px 10px; }
  .cup-wt > .cup-summary { padding: 10px 12px; }
}

@media print {
  .cup-filter, .cup-filter-form { display: none !important; }
  .cup-wt, .cup-st { break-inside: avoid-page; }
}


.cmm-steps { margin: 0 0 12px; }
.cmm-upload { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px 16px; align-items: end; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.cmm-upload .form-group { margin: 0; }
.cmm-upload > .btn { justify-self: start; }
.cmm-mode { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; border: 0; }
.cmm-mode > legend { margin: 0 0 4px; padding: 0; font-size: 13px; font-weight: 700; }
.cmm-mode label { display: inline-flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13px; font-weight: 400; line-height: 1.5; }
.cmm-mode input { margin-top: 3px; }

.cmm-table-wrap { margin: 0 0 8px; }
.cmm-table td, .cmm-table th { vertical-align: middle; }
.cmm-table tbody tr:hover > td, .cmm-table tbody tr:hover > th { background: var(--color-primary-light); }
.cmm-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
input.cmm-num { text-align: right; }
.cmm-heading { font-weight: 700; color: var(--color-text-muted); letter-spacing: 0.02em; }
.cmm-inactive > td { color: var(--color-text-muted); background: var(--color-surface-muted); }
.cmm-ops { white-space: nowrap; }
.cmm-ops > form { display: inline; margin: 0 0 0 4px; }

.cmm-badge-skip { background: var(--color-danger-light); color: var(--color-danger-dark); }
.cmm-notes { margin-top: 10px; }
.cmm-actions { position: sticky; bottom: 0; z-index: 2; padding: 10px 0; background: var(--color-bg); }
.cmm-actions > form { display: inline; margin: 0; }
.cmm-actions .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.cmm-tabs { margin: 0 0 8px; }
.cmm-subtabs { margin: 0 0 12px; padding-left: 12px; border-left: 3px solid var(--color-border); }
.cmm-subtabs .sales-chip { font-size: 12.5px; }
.cmm-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.cmm-search > .form-control { flex: 1 1 240px; max-width: 420px; }
.cmm-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 400; }
.cmm-form { margin: 8px 0 0; }
.cmm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 8px 14px; align-items: end; }
.cmm-grid .form-group { margin: 0; }
.cmm-grid .cmm-check { min-height: 38px; }
.cmm-req { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--color-danger-light); color: var(--color-danger-dark); font-size: 11px; font-weight: 700; }
.cmm-edit { border-left: 4px solid var(--color-primary); }
.cmm-add { margin-bottom: 16px; }

@media (max-width: 640px) {
  .cmm-upload { padding: 10px; }
  .cmm-upload > .btn, .cmm-search > .btn { width: 100%; }
  .cmm-search > .form-control { max-width: none; }
  .cmm-subtabs { padding-left: 8px; }
  .cmm-actions > form, .cmm-actions .btn { flex: 1 1 auto; }
}

@media print {
  .cmm-upload, .cmm-actions, .cmm-add, .cmm-search, .cmm-ops, .cmm-tabs, .cmm-subtabs { display: none !important; }
  .cmm-table tbody tr:hover > td { background: none; }
}

.dcr-h2 { font-size: 16px; margin: 0 0 10px; }
.dcr-sub { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.dcr-neg { color: var(--color-danger-dark); }
.dcr-ok { color: var(--color-success-dark); }
.dcr-warn { color: var(--color-warning-dark); font-weight: 600; }
.dcr-matched { color: var(--color-success-dark); }
.dcr-nowrap { white-space: nowrap; }
.dcr-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dcr-static { padding: 8px 0; font-weight: 600; }
.dcr-span-2 { grid-column: span 2; }

.dcr-figures .sales-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.dcr-head-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.dcr-head-grid > .form-group { margin-bottom: 10px; }
.dcr-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.dcr-inline-form > .form-control { width: auto; min-width: 180px; flex: 1 1 180px; }
.dcr-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dcr-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.dcr-fieldset[disabled] .form-control { background: var(--color-surface-muted); color: var(--color-text); }

.dcr-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
  margin-bottom: 8px;
  background: var(--color-bg);
}
.dcr-tabs > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}
.dcr-tabs > a:hover { border-color: var(--color-primary); color: var(--color-primary-dark); text-decoration: none; }
.dcr-tab-count {
  min-width: 1.6em;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: 12px;
  text-align: center;
}
.dcr-section { scroll-margin-top: 56px; }
.dcr-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.dcr-section-head > h2 { font-size: 17px; margin: 0; }
.dcr-section-total { margin: 0; font-size: 14px; }
.dcr-section-total > strong { font-size: 17px; margin-left: 4px; }
.dcr-section-total > .dcr-sub { display: inline; margin-left: 8px; }
.dcr-section-actions { margin-top: 8px; }

.dcr-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dcr-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dcr-table > thead > tr > th {
  padding: 6px 6px;
  white-space: nowrap;
  font-size: 12.5px;
  background: var(--color-surface-muted);
  border-bottom: 1px solid var(--color-border-strong);
}
.dcr-table > tbody > tr > td { padding: 4px 4px; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.dcr-table > tfoot > tr > th,
.dcr-table > tfoot > tr > td { padding: 6px; border-top: 2px solid var(--color-border-strong); background: var(--color-surface-muted); }
.dcr-table .form-control { padding: 5px 6px; font-size: 13.5px; min-width: 0; }
.dcr-table-cost,
.dcr-table-labor,
.dcr-table-machine { min-width: 1280px; }
.dcr-table-list { min-width: 760px; }
.dcr-table-compact { min-width: 0; }
.dcr-row-empty > td { background: var(--color-bg); }
.dcr-cell-no { width: 2.4em; text-align: center; color: var(--color-text-muted); padding-top: 10px !important; }
.dcr-cell-item { min-width: 200px; }
.dcr-cell-del { white-space: nowrap; }
.dcr-in-num { width: 6.2em; text-align: right; }
.dcr-in-amount { width: 7.6em; }
.dcr-in-unit { width: 4.2em; }
.dcr-in-time { width: 4.6em; text-align: center; }
.dcr-in-tax { width: 6.2em; }
.dcr-in-el { width: 7em; margin-bottom: 3px; }
.dcr-in-cat { width: 9em; }
.dcr-in-budget { width: 11em; }
.dcr-in-code { width: 5.2em; }
.dcr-pair { display: flex; gap: 4px; }
.dcr-codes { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 3px 6px; }
.dcr-code { display: flex; flex-direction: column; margin: 0; font-weight: normal; }
.dcr-code-label { font-size: 11px; color: var(--color-text-muted); }
.dcr-code-name { font-size: 11px; color: var(--color-text-muted); max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcr-manual {
  display: inline-block;
  margin-top: 2px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--color-warning-light);
  color: var(--color-warning-dark);
  font-size: 11px;
}
.dcr-del { display: inline-flex; align-items: center; gap: 4px; font-weight: normal; font-size: 12.5px; color: var(--color-danger-dark); }

.dcr-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  margin: 12px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}
.dcr-outside-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 16px; }
.dcr-outside-actions > form { margin: 0; }
.dcr-check > ul { margin: 6px 0 0; padding-left: 20px; }
.dcr-history { margin: 8px 0 16px; font-size: 13px; color: var(--color-text-muted); }
.dcr-history > ul { margin: 6px 0 0; padding-left: 20px; }
.dcr-item-search { margin: 0 0 12px; padding: 8px 12px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius); background: var(--color-surface); }
.dcr-item-search > summary { cursor: pointer; font-weight: 600; }

.dcr-month-nav { display: flex; gap: 6px; }
.dcr-missing-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 6px 0; border-top: 1px solid var(--color-border); }
.dcr-missing-project { min-width: 220px; font-weight: 600; }
.dcr-missing-project > .dcr-sub { display: inline; margin-left: 6px; font-weight: normal; }
.dcr-day-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.dcr-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  height: 2em;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.dcr-day:hover { text-decoration: none; filter: brightness(0.95); }
.dcr-day-missing { background: var(--color-danger-light); color: var(--color-danger-dark); border: 1px solid #f6c9d3; }
.dcr-day-draft { background: var(--color-warning-light); color: var(--color-warning-dark); border: 1px solid #f5d9a8; }
.dcr-new h2 { font-size: 16px; margin: 0 0 6px; }

@media (max-width: 640px) {
  .dcr-table-cost,
  .dcr-table-labor,
  .dcr-table-machine,
  .dcr-table-list { min-width: 0; }
  .dcr-table > thead { display: none; }
  .dcr-table,
  .dcr-table > tbody,
  .dcr-table > tbody > tr,
  .dcr-table > tbody > tr > td,
  .dcr-table > tfoot,
  .dcr-table > tfoot > tr { display: block; width: 100%; }
  .dcr-table > tbody > tr {
    margin-bottom: 10px;
    padding: 6px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
  }
  .dcr-table > tbody > tr > td {
    display: grid;
    grid-template-columns: 7.5em minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    padding: 4px 0;
    border-bottom: 0;
    text-align: left;
  }
  .dcr-table > tbody > tr > td::before { content: attr(data-label); font-size: 12px; color: var(--color-text-muted); }
  .dcr-table > tbody > tr > td[data-label=""]::before { content: none; }
  .dcr-table > tbody > tr > td.dcr-cell-no { display: block; width: auto; text-align: left; font-weight: 700; padding-top: 0 !important; }
  .dcr-table > tbody > tr > td.dcr-cell-no::before { content: none; }
  .dcr-table > tfoot > tr > th,
  .dcr-table > tfoot > tr > td { display: inline-block; border: 0; }
  .dcr-table .form-control,
  .dcr-in-num,
  .dcr-in-amount,
  .dcr-in-unit,
  .dcr-in-time,
  .dcr-in-tax,
  .dcr-in-el,
  .dcr-in-cat,
  .dcr-in-budget { width: 100%; font-size: 16px; }
  .dcr-in-code { width: 100%; }
  .dcr-codes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dcr-row-empty > td { background: transparent; }
  .dcr-span-2 { grid-column: auto; }
  .dcr-inline-form > .form-control { min-width: 0; width: 100%; }
  .dcr-actions > .btn { flex: 1 1 auto; }
  .dcr-missing-project { min-width: 0; width: 100%; }
}


.dws-badge {
  display: inline-block;
  margin-top: 3px;
  margin-right: 4px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.7;
  text-decoration: none;
  white-space: nowrap;
}
a.dws-badge:hover,
a.dws-badge:focus-visible { text-decoration: underline; }
.dws-badge-linked {
  background: transparent;
  border: 1px solid var(--color-accent-dark);
  font-weight: normal;
}
.dws-row-auto > .dcr-cell-item { border-left: 3px solid var(--color-accent-dark); }
.dws-report-hours { color: var(--color-accent-dark); font-weight: 600; }
.dws-missing { white-space: normal; }

.dws-banner { margin: 8px 0; }
.dws-warn {
  background: var(--color-warning-light);
  color: var(--color-warning-dark);
  border-color: var(--color-warning-light);
}
.dws-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.dws-inline-form { display: inline-flex; margin: 0; }

.dws-not-reported {
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px dashed var(--color-border, #d0d7de);
  border-radius: 6px;
  font-size: 13px;
}
.dws-not-reported > .dcr-sub { display: inline; margin-left: 8px; }
.dws-people { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; padding: 0; list-style: none; }
.dws-people > li::before { content: '・'; }

.dws-worker-note { margin: 4px 0 8px; color: var(--color-success-dark); }

@media (max-width: 640px) {
  .dws-row-auto > .dcr-cell-item { border-left: 0; }
  .dws-row-auto { border-left: 3px solid var(--color-accent-dark); }
  .dws-not-reported > .dcr-sub { display: block; margin-left: 0; }
}

.abt-footer {
  margin-top: 32px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}
.abt-footer > a { color: inherit; text-decoration: underline; }
.abt-footer > a:hover { color: var(--color-text); }
.abt-footer > .abt-sep { opacity: .6; }
.abt-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
}
.abt-facts > dt { font-weight: 700; color: var(--color-text-muted); }
.abt-facts > dd { margin: 0; }
.abt-notices {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.6;
  background: var(--color-bg, #f8fafc);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 12px;
  max-height: 480px;
  overflow: auto;
  margin: 0;
}
@media print {
  .abt-footer { display: none; }
}

.srs-note { margin: 12px 0; }
.srs-note > .ws-list { margin: 6px 0 0; }
.srs-warn { border-left: 4px solid #d97706; }
.srs-table { width: 100%; border-collapse: collapse; }
.srs-table th, .srs-table td { padding: 6px 8px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.srs-table thead th { white-space: nowrap; font-size: 0.9em; }
.srs-table tbody > tr > th { white-space: nowrap; font-weight: 600; }
.srs-amount { width: 9em; max-width: 100%; text-align: right; font-variant-numeric: tabular-nums; }
.srs-select { width: 9em; max-width: 100%; }
.srs-default { display: block; margin-top: 2px; font-size: 0.8em; color: #6b7280; }
.srs-section { font-size: 0.85em; color: #4b5563; }
.srs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 20px; }
.srs-grid > .form-group { margin-bottom: 0; }
.srs-grid > .form-group > label { display: flex; flex-direction: column; gap: 4px; }
.srs-example { margin: 0 0 12px; padding: 10px 12px; background: #f8fafc; border-radius: 6px; line-height: 1.7; }
@media (max-width: 640px) {
  .srs-table th, .srs-table td { padding: 4px; }
  .srs-amount, .srs-select { width: 100%; }
}

.sales-subnav { overflow-y: hidden; }
.module-subnav-bar { display: flex; align-items: stretch; margin: -4px 0 14px; border-bottom: 1px solid var(--color-border); }
.module-subnav-bar > .sales-subnav { flex: 1 1 auto; min-width: 0; margin: 0; border-bottom: 0; }
.module-subnav-more-menu { position: relative; flex: 0 0 auto; display: flex; }
.module-subnav-more-menu > summary {
  display: inline-flex; align-items: center; padding: 8px 12px 9px; white-space: nowrap; cursor: pointer;
  list-style: none; color: var(--color-primary); font-size: 12.5px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.module-subnav-more-menu > summary::-webkit-details-marker { display: none; }
.module-subnav-more-menu > summary:hover,
.module-subnav-more-menu[open] > summary { background: var(--color-primary-light); color: var(--color-primary-dark); }
.module-subnav-more-menu > summary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.module-subnav-more-list {
  position: absolute; top: 100%; right: 0; z-index: 60; min-width: 220px; max-width: min(320px, calc(100vw - 32px));
  max-height: 70vh; overflow-y: auto; display: flex; flex-direction: column; padding: 6px;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}
.module-subnav-more-list a {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--color-text); font-size: 13.5px; white-space: nowrap;
}
.module-subnav-more-list a:hover { background: var(--color-primary-light); color: var(--color-primary-dark); text-decoration: none; }
.module-subnav-more-list a.module-subnav-more-home { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--color-border); border-radius: 0; color: var(--color-primary); font-size: 12.5px; }
@media print { .module-subnav-bar { display: none; } }
.isc-section-title { font-size: 16px; margin: 0 0 10px; }
.isc-subtitle { font-size: 14px; margin: 12px 0 6px; }
.isc-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.isc-center { text-align: center; }
.isc-inline-form { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.isc-ok { color: var(--color-success-dark); font-weight: 600; }
.isc-ng { color: var(--color-danger-dark); font-weight: 600; }
.isc-warn { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--color-warning); background: var(--color-warning-light); color: var(--color-warning-dark); font-size: 13px; }
.isc-alert-warning { background: var(--color-warning-light); border-color: var(--color-warning); color: var(--color-warning-dark); }
.isc-alert-warning a { color: inherit; text-decoration: underline; }
.isc-error-list { margin: 4px 0 0; padding-left: 20px; }
.isc-error-list li { margin: 2px 0; }

.isc-upload-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.isc-upload-form .form-group { flex: 1 1 320px; margin-bottom: 0; }
.isc-search { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; align-items: end; margin: 12px 0; }
.isc-search .form-group { margin-bottom: 0; }
.isc-search-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.isc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.isc-table td, .isc-table th { white-space: nowrap; }
.isc-table td:nth-child(3), .isc-table td:nth-child(8) { white-space: normal; min-width: 140px; }
.isc-about p { margin: 6px 0; line-height: 1.7; }

.isc-review { display: grid; grid-template-columns: minmax(320px, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.isc-review-original { position: sticky; top: 12px; min-width: 0; }
.isc-review-form { min-width: 0; }
.isc-viewer { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; }
.isc-viewer-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border-bottom: 1px solid var(--color-border); background: var(--color-surface-muted); }
.isc-viewer-name { font-weight: 600; word-break: break-all; flex: 1 1 100%; }
.isc-viewer-frame { display: block; width: 100%; height: calc(100vh - 160px); min-height: 480px; border: 0; background: var(--color-surface-muted); }
.isc-viewer-image { display: block; width: 100%; height: auto; max-height: calc(100vh - 160px); object-fit: contain; background: var(--color-surface-muted); }
.isc-raw { margin-top: 8px; font-size: 12px; }
.isc-raw pre { max-height: 240px; overflow: auto; white-space: pre-wrap; word-break: break-all; background: var(--color-surface-muted); padding: 8px; border-radius: 6px; }
.isc-reader-warnings { margin-bottom: 12px; padding: 8px 12px; border-radius: 6px; background: var(--color-warning-light); color: var(--color-warning-dark); font-size: 13px; }
.isc-reader-warnings ul { margin: 4px 0 0; padding-left: 20px; }

.isc-fieldset { border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 12px 12px; margin: 0 0 14px; min-width: 0; }
.isc-fieldset > legend { font-weight: 600; padding: 0 6px; }
.isc-header-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; }
.isc-header-grid .form-group { margin-bottom: 0; min-width: 0; }
.isc-span-2 { grid-column: span 2; }
.isc-radio-group { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.isc-radio-group > legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 4px; }
.isc-radio { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.isc-yen, .isc-qty { text-align: right; font-variant-numeric: tabular-nums; }

.isc-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 10px; }
.isc-bulk select { width: auto; max-width: 100%; min-width: 200px; }
.isc-lines { min-width: 1500px; }
.isc-lines td { vertical-align: top; }
.isc-lines .form-control { min-width: 0; padding: 4px 6px; font-size: 13px; }
.isc-lines td:nth-child(2) { min-width: 180px; }
.isc-lines td:nth-child(3) { min-width: 130px; }
.isc-lines td:nth-child(4) { width: 72px; }
.isc-lines td:nth-child(5) { width: 64px; }
.isc-lines td:nth-child(6), .isc-lines td:nth-child(7) { width: 110px; }
.isc-lines td:nth-child(8) { width: 110px; }
.isc-lines td:nth-child(9) { min-width: 220px; }
.isc-lines td:nth-child(10), .isc-lines td:nth-child(12) { min-width: 120px; }
.isc-lines td:nth-child(11) { min-width: 170px; }
.isc-lines td:nth-child(13) { min-width: 140px; }
.isc-lines tr.is-skip td { background: var(--color-surface-muted); color: var(--color-text-muted); }
.isc-table tr.is-skip td { color: var(--color-text-muted); text-decoration: line-through; }
.isc-source { display: inline-block; margin-top: 2px; font-size: 11px; color: var(--color-accent-dark); background: var(--color-accent-light); border-radius: 999px; padding: 0 6px; }
.isc-delete { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--color-text-muted); cursor: pointer; }
.isc-line-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }

.isc-totals { margin: 0 0 14px; }
.isc-totals-table { width: auto; min-width: 360px; }
.isc-totals-table th[scope="row"] { text-align: left; font-weight: 600; white-space: nowrap; }
.isc-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.isc-form-actions .file-meta { flex: 1 1 100%; margin: 0; }

.isc-posted-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.isc-links { margin: 0; padding-left: 20px; }
.isc-links li { margin: 3px 0; }
.isc-cancel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--color-border); }
.isc-history { margin: 6px 0 0; padding-left: 20px; font-size: 13px; }
.isc-history li { margin: 2px 0; }

.isc-settings-form .form-group { max-width: 560px; }
.isc-notes ul { padding-left: 20px; }
.isc-notes li { margin: 6px 0; line-height: 1.7; }

@media (max-width: 900px) {
  .isc-review { grid-template-columns: minmax(0, 1fr); }
  .isc-review-original { position: static; }
  .isc-viewer-frame { height: 70vh; min-height: 360px; }
  .isc-viewer-image { max-height: none; }
  .isc-header-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .isc-posted-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .isc-header-grid { grid-template-columns: minmax(0, 1fr); }
  .isc-span-2 { grid-column: auto; }
  .isc-totals-table { min-width: 0; width: 100%; }
  .isc-bulk select { min-width: 0; width: 100%; }
}
@media print {
  .isc-review { grid-template-columns: minmax(0, 1fr); }
  .isc-review-original { position: static; }
  .isc-upload, .isc-search, .isc-form-actions, .isc-line-actions, .isc-bulk, .isc-cancel { display: none; }
}

.jr-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.jr-table-wrap > table { min-width: 640px; }

.jr-std-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.jr-std-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; border: 1px solid var(--color-border-strong); background: var(--color-surface-muted); color: var(--color-text); }
.jr-std-iso9001 { border-color: #9cc3e6; background: #eaf3fb; }
.jr-std-iso14001 { border-color: #9fd3b0; background: #ebf7ef; }
.jr-std-iso45001 { border-color: #efc58f; background: #fdf3e6; }

.jr-summary-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.jr-summary-head > .sales-facts { flex: 1 1 420px; min-width: 0; }
.jr-approval { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.jr-inputs { table-layout: fixed; }
.jr-inputs th, .jr-inputs td { vertical-align: top; }
.jr-inputs-common thead th:first-child, .jr-inputs .jr-input-head { width: 200px; }
.jr-input-head strong { display: block; }
.jr-hint { display: block; margin-top: 2px; font-size: 12px; font-weight: normal; color: var(--color-text-muted); }
.jr-figs { list-style: none; margin: 0 0 6px; padding: 0; font-size: 13px; }
.jr-figs li { margin: 0 0 2px; }
.jr-figs li.is-none strong { color: var(--color-text-muted); font-weight: normal; }
.jr-fig-label { color: var(--color-text-muted); }
.jr-fig-sub { margin-left: 4px; font-size: 12px; color: var(--color-text-muted); }
.jr-fig-none { display: block; margin-bottom: 6px; color: var(--color-text-muted); }
.jr-note { width: 100%; min-height: 3.2em; font-size: 13px; resize: vertical; box-sizing: border-box; }
.jr-note-text { white-space: pre-wrap; font-size: 13px; }
.jr-std-sec { margin-top: 18px; }
.jr-std-sec .au-std-title .ia-count { margin-left: 8px; font-weight: normal; }
.jr-fu { margin-top: 8px; }
.jr-fu > summary { cursor: pointer; color: var(--color-text-muted); font-size: 13px; }
.jr-fu .fu-mr { box-shadow: none; margin-top: 6px; }

.jr-items { display: flex; flex-direction: column; gap: 10px; }
.jr-item-row { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 10px; background: var(--color-surface); }
.jr-item-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 10px; }
.jr-item-field { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--color-text-muted); margin: 0; }
.jr-item-field .form-control { font-size: 13px; }
.jr-item-text { margin-top: 6px; }
.jr-item-text textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.jr-scope-title { margin: 14px 0 6px; font-size: 14px; }
.jr-items-table td { vertical-align: top; }

.jr-dest { display: inline-block; margin: 0 8px 4px 0; white-space: nowrap; }
.jr-dest-form { display: inline-flex; align-items: center; gap: 4px; margin: 0 6px 4px 0; }
.jr-std-select { width: auto; min-width: 9em; padding: 2px 6px; font-size: 12px; }

.jr-child-banner a { font-weight: 700; }
.jr-joint-note a { font-weight: 700; }
.jr-joint-row td { background: var(--color-surface-muted); }

@media (max-width: 640px) {
  .jr-summary-head { flex-direction: column; }
  .jr-approval { align-self: flex-start; }
  .jr-item-grid { grid-template-columns: 1fr 1fr; }
  .jr-dest, .jr-dest-form { white-space: normal; }
}

@media print {
  .jr-items-form, .jr-dest-form, .jr-approval form { display: none !important; }
  .jr-table-wrap { overflow: visible; }
  .jr-table-wrap > table { min-width: 0; }
}

.isc-review-bar { display: flex; justify-content: flex-start; margin: 0 0 8px; }
.isc-review.is-collapsed { grid-template-columns: minmax(0, 1fr); }
.isc-review.is-collapsed > .isc-review-original { display: none; }
@media print { .isc-review-bar { display: none; } }
.isc-profiles > .file-meta { margin: 0 0 10px; line-height: 1.7; }
.isc-profiles .isc-table td { vertical-align: middle; }
.isc-profiles .isc-table td:last-child { text-align: right; white-space: nowrap; }
.isc-profile-note { margin-bottom: 10px; }


.bl-form { margin: 0; }
.bl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 4px 16px;
  align-items: end;
}
.bl-grid .form-group { margin-bottom: 10px; min-width: 0; }
.bl-grid .bl-wide { grid-column: span 2; }
.bl-grid .ac-radio { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.bl-grid .ac-radio input { width: auto; margin: 0; }
@media (max-width: 640px) {
  .bl-grid { grid-template-columns: 1fr; }
  .bl-grid .bl-wide { grid-column: auto; }
}
.bl-subtitle { margin: 16px 0 6px; font-size: 14px; color: var(--color-text); }
.bl-fieldset {
  margin: 8px 0 12px;
  padding: 8px 12px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.bl-fieldset legend { padding: 0 6px; font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); }
.bl-check { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 14px; }
.bl-check input { margin: 0; }
.bl-inline { display: inline-block; width: auto; min-width: 9em; margin-left: 4px; }
.bl-center { text-align: center; }

.bl-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 12px 0 0; }
.bl-actions-left { justify-content: flex-start; margin-top: 0; }
.bl-inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }

.bl-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 12px; margin: 0 0 10px; }
.bl-filter .form-group { margin-bottom: 6px; min-width: 150px; }
.bl-filter .form-group.bl-wide { min-width: 240px; flex: 1 1 240px; }
.bl-filter > .btn { margin-bottom: 6px; }
@media (max-width: 640px) {
  .bl-filter .form-group { flex: 1 1 100%; }
}

.bl-input-yen,
.bl-input-price,
.bl-input-qty,
.bl-input-rate { text-align: right; font-variant-numeric: tabular-nums; }
.bl-input-yen { min-width: 7.5em; }
.bl-input-price { min-width: 6.5em; }
.bl-input-qty { min-width: 4.5em; }
.bl-input-unit { min-width: 3.5em; }
.bl-input-rate { width: 5em; display: inline-block; }
.bl-input-code { width: 8em; }
.bl-input-tax { min-width: 8em; }
.bl-input-reduced { min-width: 7.5em; }

.bl-zero { color: var(--color-text-muted); }
.bl-minus { color: var(--color-danger-dark); }
.bl-inactive td { color: var(--color-text-muted); background: var(--color-surface-muted); }
.bl-row-actions { white-space: nowrap; }
.bl-row-actions form { display: inline; margin-left: 4px; }
.bl-edit-table td { padding: 4px 6px; }
.bl-edit-table .form-control { min-width: 6em; }
.bl-rates { max-width: 720px; }
.bl-ledger td, .bl-ledger th { white-space: nowrap; }
.bl-ledger td:nth-child(2) { white-space: normal; min-width: 12em; }

.bl-lines { min-width: 1080px; }
.bl-lines td { padding: 4px 4px; vertical-align: middle; }
.bl-lines .form-control { padding-left: 4px; padding-right: 4px; }
.bl-lines td:nth-child(2) { min-width: 14em; }
.bl-kind { min-width: 6em; }
.bl-heading td { background: var(--color-surface-muted); }
.bl-comment td { color: var(--color-text-muted); font-style: italic; }
.bl-subtotal td { border-top: 1px dashed var(--color-border-strong); }
.bl-reduced { color: var(--color-warning-dark); font-weight: 700; }
.bl-total { margin: 10px 0 0; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.bl-total strong { margin-left: 12px; font-size: 20px; }

.bl-errors { margin: 0; padding-left: 1.2em; }
.bl-warn { color: var(--color-warning-dark); font-size: 13px; }
.bl-checks { margin: 0; padding: 0; list-style: none; }
.bl-checks li { padding: 6px 10px; margin-bottom: 4px; border-radius: var(--radius-sm); font-size: 13.5px; }
.bl-check-warning { background: var(--color-warning-light); }
.bl-check-info { background: var(--color-primary-light); }

.bl-onboard .cm-flow { margin-bottom: 12px; }

@media print {
  .bl-filter,
  .bl-actions,
  .bl-row-actions,
  .bl-lines + template + button { display: none !important; }
  .cm-table-wrap { overflow: visible !important; }
  .bl-lines { min-width: 0; }
}


.bl-seal-current {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px;
}
.bl-seal-preview {
  width: 72px;
  height: 72px;
  object-fit: contain;
  padding: 4px;
  border: 1px dashed var(--border, #cbd5e1);
  border-radius: 6px;
  background: #fff;
}
.bl-seal-preview.bl-seal-jpg {
  mix-blend-mode: multiply;
}

.bps-card .sales-kpis {
  margin-bottom: 12px;
}
.bps-over {
  color: var(--danger, #b91c1c);
  font-weight: 700;
}
.bps-compare {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: var(--surface-muted, #f8fafc);
}
.bps-compare.is-diff {
  border-color: #f59e0b;
  background: #fffbeb;
}
.bps-compare-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 0 6px;
}
.bps-compare-list div {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.bps-compare-list dt {
  font-size: 0.85rem;
  color: var(--text-muted, #475569);
}
.bps-compare-list dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bps-compare form {
  margin-top: 6px;
}
.bps-subtitle {
  font-size: 0.95rem;
  margin: 16px 0 6px;
}

@media (max-width: 600px) {
  .bps-compare-list {
    flex-direction: column;
  }
  .bps-compare-list div {
    flex-direction: column;
    gap: 2px;
  }
}


.bx-help summary { font-weight: 600; }
.bx-steps { margin: 0.5rem 0 1rem 1.25rem; padding: 0; line-height: 1.8; }
.bx-steps li { margin-bottom: 0.4rem; }
.bx-subtitle { font-size: 0.95rem; margin: 1rem 0 0.4rem; }
.bx-notes { margin: 0.25rem 0 0 1.25rem; padding: 0; line-height: 1.7; color: var(--color-text-muted); }
.bx-notes li { margin-bottom: 0.3rem; }
.bx-warn { border-left: 4px solid var(--color-warning); }
.bx-url { word-break: break-all; max-width: 18rem; }
.bx-log td { vertical-align: top; }
.bx-check { display: flex; align-items: center; gap: 0.4rem; }
.bx-join-key { margin-top: 0.75rem; }
.bx-join-key summary { cursor: pointer; color: var(--color-primary); }

.bx-code {
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Courier New', monospace;
  font-size: 0.95rem;
  background: var(--color-surface-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  word-break: break-all;
  user-select: all;
}
.bx-secret-card { border: 2px solid var(--color-warning); }
.bx-secret-table th { width: 11rem; white-space: nowrap; text-align: left; }
.bx-secret { font-size: 1.05rem; letter-spacing: 0.03em; }

.bx-history { margin-top: 0.75rem; }
.bx-history summary { cursor: pointer; color: var(--color-primary); }

.isc-source-filter { margin: 0.5rem 0; }

.bx-reject { display: inline-block; position: relative; }
.bx-reject summary { list-style: none; cursor: pointer; }
.bx-reject summary::-webkit-details-marker { display: none; }
.bx-reject[open] .bx-reject-form {
  position: absolute;
  right: 0;
  z-index: 20;
  width: min(22rem, 90vw);
  margin-top: 0.4rem;
  padding: 0.75rem;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #d0d4e0);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.isc-exchange-view { overflow: auto; }
.bx-invoice {
  padding: 1rem;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #d0d4e0);
  border-radius: 6px;
  font-size: 0.9rem;
}
.bx-invoice-title { text-align: center; letter-spacing: 0.5em; font-size: 1.3rem; margin: 0 0 0.75rem; }
.bx-invoice-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.bx-invoice-to strong { font-size: 1.05rem; border-bottom: 1px solid currentColor; }
.bx-invoice-from { text-align: right; }
.bx-invoice-facts, .bx-invoice-summary { margin-bottom: 0.75rem; }
.bx-invoice-facts th, .bx-invoice-summary th { text-align: left; white-space: nowrap; width: 10rem; }
.bx-invoice-total th, .bx-invoice-total td { font-size: 1.05rem; background: var(--color-primary-light); }
.bx-invoice-lines td { vertical-align: top; }
.bx-invoice-banks ul { margin: 0.25rem 0 0 1.25rem; padding: 0; }
.bx-invoice-banks, .bx-invoice-notes { margin-top: 0.75rem; }
.bx-invoice-notes p { margin: 0.25rem 0 0; white-space: normal; }

@media (max-width: 720px) {
  .bx-invoice-from { text-align: left; }
  .bx-secret-table th { width: auto; }
  .bx-url { max-width: none; }
}

@media print {
  .bx-reject, .bx-join-key { display: none; }
}


.bt-lines th.bt-cost,
.bt-lines td.bt-cost,
.cm-table th.bt-cost,
.cm-table td.bt-cost { background: var(--color-surface-muted); }
.bt-lines th.bt-cost { color: var(--color-warning-dark); }
.bt-input-cat { min-width: 7.5em; }

.cm-table tr.bt-discount td { color: var(--color-danger-dark); font-weight: 600; }

.bt-margin { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin-top: 8px; padding: 8px 12px;
  border: 1px dashed var(--color-warning); border-radius: 6px; background: #fffaf0; }
.bt-margin strong { font-size: 1.05rem; }

.bt-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.bt-reason-form,
.bt-slip-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0; }
.bt-reason-form .bl-inline,
.bt-slip-form .bl-inline { min-width: 14em; }
.bt-links { margin-top: 8px; }

.bt-steps { margin: 6px 0 10px; padding-left: 1.4em; }
.bt-steps li { margin: 2px 0; }
.bt-steps li.bt-current { font-weight: 700; color: var(--color-primary-dark); }
.bt-approve-form { border-top: 1px solid var(--color-border); padding-top: 10px; }

.bt-history { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.bt-history li { padding: 4px 0; border-bottom: 1px solid var(--color-border); }
.bt-history li:last-child { border-bottom: 0; }

.bt-recheck .bt-check { background: #fff8db; border: 1px solid #f2d36b; border-radius: 6px; padding: 8px 10px; }
.bt-recheck .bt-check label { font-weight: 700; }

.bt-sched .form-control { min-width: 6em; }

.bt-kpis { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 4px 0 12px; }
.bt-kpis span { display: flex; flex-direction: column; font-size: .88rem; color: var(--color-text-muted); }
.bt-kpis strong { font-size: 1.15rem; color: var(--color-text); }
.bt-kpis .bt-over strong { color: var(--color-danger); }
.bt-slip-forms { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--color-border); }

.bt-cond-body { white-space: normal; margin: 6px 0 10px; padding: 8px 12px; background: var(--color-surface-muted); border-radius: 6px; font-size: .92rem; line-height: 1.7; }

.bps-contracts { margin: 0 0 10px; font-size: .95rem; }

@media (max-width: 640px) {
  .bt-reason-form .bl-inline,
  .bt-slip-form .bl-inline { min-width: 0; width: 100%; }
  .bt-kpis { gap: 6px 14px; }
}

.module-home-grid:not(.module-home-grid-compact) .module-home-tile-label { min-width: 0; overflow-wrap: anywhere; }


.bt-lines td.bt-calc-out { min-width: 11em; white-space: nowrap; font-size: .86rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

.bt-live-totals { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin-top: 10px; padding: 8px 12px;
  border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface-muted); font-variant-numeric: tabular-nums; }
.bt-live-totals[hidden] { display: none; }
.bt-live-totals strong { font-size: 1.02rem; }
.bt-live-totals .bt-cost-total strong { color: var(--color-warning-dark); }

.bt-withdrawn { font-weight: 600; }

@media (max-width: 640px) {
  .bt-lines td.bt-calc-out { min-width: 8em; white-space: normal; }
}

:root {
  --bt-basic-bg: #eef8ee;
  --bt-basic-border: #cfe7cf;
  --bt-green: #1f7a43;
  --bt-green-dark: #226b43;
  --bt-sum-head: #e3f4f8;
  --bt-total-head: #4a5a6a;
  --bt-row-border: #3490dc;
  --bt-note-red: #c0392b;
}

.bt-action-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; text-align: center; }
.bt-big-submit { font: inherit; font-size: 1.1rem; font-weight: 700; padding: 12px 36px; border-radius: 8px; cursor: pointer;
  color: var(--bt-green-dark); background: var(--color-surface); border: 2px solid var(--bt-green); }
.bt-big-submit:hover, .bt-big-submit:focus-visible { background: var(--bt-green); color: #fff; }
.bt-action-card .bt-actions { margin-top: 0; }
.bt-est-links { display: flex; gap: 8px; }

.bt-est-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 0 0 8px; }
.bt-orient { display: flex; align-items: center; gap: 10px; margin: 0; padding: 4px 10px; border: 1px solid var(--color-border); border-radius: 999px; }
.bt-orient legend { float: left; padding: 0 6px 0 0; font-size: .9rem; }
.bt-slipno { margin-left: auto; font-size: .92rem; color: var(--color-text-muted); }
.bt-slipno strong { color: var(--color-text); }

.bt-basic { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px 24px; padding: 14px 16px; margin-bottom: 14px;
  background: var(--bt-basic-bg); border: 1px solid var(--bt-basic-border); border-radius: 8px; }
.bt-basic.is-collapsed { display: none; }
.bt-basic .form-group { margin-bottom: 8px; }
.bt-basic-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.bt-codepick-row { display: flex; align-items: center; gap: 6px; }
.bt-codepick-row .bt-code { width: 7.5em; flex: 0 0 auto; }
.bt-codepick-row select { flex: 1 1 auto; min-width: 0; }
.bt-find { font: inherit; padding: 4px 8px; border: 1px solid var(--color-border-strong); border-radius: 6px; background: var(--color-surface); cursor: pointer; }
.bt-memo { min-height: 12em; }
.bt-dup-warning { margin: 4px 0 0; color: var(--color-warning-dark); font-size: .88rem; font-weight: 600; }

.bt-lines-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 8px; }
.bt-switch { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border: 1px solid var(--color-border-strong); border-radius: 999px; cursor: pointer; font-size: .92rem; }
.bt-est-form:not(.bt-show-cost) .bt-cost { display: none; }
.bt-est-form:not(.bt-show-title) .bt-title-col { display: none; }

.bt-est-form:not(.bt-show-title) .bt-title-row { display: none; }
.bt-title-row > td { background: #eef3fa; border-top: 2px solid #002060; }
.bt-title-cell { padding: 3px 6px; }
.bt-title-input { width: 100%; font-weight: 700; }
.bt-title-input::placeholder { font-weight: 400; color: #8a93a0; }
.bt-title-add { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; }

.bt-est-form:not(.bt-show-title) .bt-subtotal-row { display: none; }
.bt-subtotal-row > td { background: #f3f6fb; border-bottom: 2px solid #002060; }
.bt-subtotal-amount { font-weight: 700; }

.bt-row-comment .bt-spec,
.bt-row-comment .bl-input-qty,
.bt-row-comment .bl-input-unit,
.bt-row-comment .bl-input-price,
.bt-row-comment .bt-taxtype,
.bt-row-comment .bt-taxrate,
.bt-row-comment .bt-cost input,
.bt-row-comment .dg-rowpick,
.bt-row-comment .bt-deptcol select { visibility: hidden; }
.bt-row-comment .bt-amount, .bt-row-comment .bt-profit { visibility: hidden; }
.bt-row-comment .bt-code { visibility: hidden; }
.bt-row-comment .bt-name-col input[data-lc-field="name"] { font-style: italic; }
.bt-est-lines td { vertical-align: middle; }
.bt-est-lines .bt-no { width: 3em; color: var(--color-text-muted); }
.bt-est-lines .bt-c { text-align: center; }
.bt-rowbtns { white-space: nowrap; }
.bt-rowbtn { font: inherit; width: 1.9em; height: 1.9em; padding: 0; margin-right: 2px; border: 1px solid var(--color-border-strong); border-radius: 4px; background: var(--color-surface); cursor: pointer; line-height: 1; }
.bt-est-lines .bt-code { width: 7em; }
.bt-name-col { min-width: 14em; }
.bt-name-col .bt-spec { margin-top: 3px; font-size: .88rem; }
.bt-taxcol { white-space: nowrap; }
.bt-taxcol select { width: auto; display: inline-block; }
.bt-est-lines td.bt-amount { min-width: 7em; background: var(--color-surface-muted); color: var(--color-text); font-variant-numeric: tabular-nums; }
.bt-est-lines td.bt-profit { min-width: 8em; font-size: .86rem; }
.bt-deptcol select { min-width: 8em; }

.bt-est-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 28px; margin-top: 14px; align-items: start; }
.bt-sum-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bt-sum-table th, .bt-sum-table td { border: 1px solid var(--color-border); padding: 6px 10px; }
.bt-sum-table th { width: 40%; text-align: left; font-weight: 600; background: var(--bt-sum-head); }
.bt-sum-table .bt-sum-gross td { font-size: 1.15rem; font-weight: 700; }
.bt-discount-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bt-discount-cell .bl-input-yen { width: 8em; }
.bt-minus { color: var(--color-danger); font-weight: 700; }
.bt-tax-note { margin: 6px 0 0; color: var(--bt-note-red); font-size: .86rem; text-align: right; }
.bt-calc-note { text-align: right; font-size: .82rem; }

.bt-search { background: var(--bt-basic-bg); border-color: var(--bt-basic-border); }
.bt-search-details > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.bt-search-details > summary::before { content: ''; width: 34px; height: 18px; border-radius: 999px; background: var(--color-border-strong); box-shadow: inset -16px 0 0 2px #fff; transition: box-shadow .15s; }
.bt-search-details[open] > summary::before { background: var(--bt-green); box-shadow: inset 16px 0 0 2px #fff; }
.bt-search-details > summary::-webkit-details-marker { display: none; }
.bt-pills { margin-top: 10px; }
.bt-pill { display: inline-block; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--bt-green); color: var(--bt-green-dark); text-decoration: none; font-size: .9rem; }
.bt-pill.is-active { background: var(--bt-green); color: #fff; }
.bt-list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 12px 0 6px; }
.bt-count { margin: 0; color: var(--color-text-muted); }
.bt-total-box { min-width: 14em; border: 1px solid var(--bt-total-head); border-radius: 6px; overflow: hidden; }
.bt-total-head { background: var(--bt-total-head); color: #fff; padding: 4px 12px; font-size: .88rem; }
.bt-total-amount { padding: 6px 12px; font-size: 1.25rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.bt-pages { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.bt-page { padding: 3px 10px; border: 1px solid var(--color-border); border-radius: 4px; text-decoration: none; }
.bt-page.is-current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.bt-est-list { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: 6px; overflow: hidden; background: var(--color-surface); }
.bt-est-headrow, .bt-est-row { display: grid; grid-template-columns: 2.4em 1.8em minmax(16em, 4fr) minmax(5.5em, 1fr) minmax(6.5em, 1fr) minmax(7.5em, 1.2fr) 5.5em minmax(0, .9fr); }
.bt-est-headrow { background: var(--color-surface-muted); border-bottom: 1px solid var(--color-border-strong); font-size: .84rem; font-weight: 700; color: var(--color-text); text-align: center; }
.bt-est-headrow > span { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 4px; }
.bt-est-headrow small { font-size: .74rem; font-weight: 400; color: var(--color-text-muted); }
.bt-expand-all { width: 1.7em; height: 1.7em; border: 1px solid var(--color-border-strong); border-radius: 4px; background: var(--color-surface); color: var(--color-primary); cursor: pointer; line-height: 1; }
.bt-est-row { border-bottom: 1px solid var(--color-border-strong); border-left: 4px solid var(--bt-row-border); }
.bt-est-row:last-child { border-bottom: 0; }
.bt-est-row.is-received { border-left-color: var(--bt-green); }
.bt-est-row > * { min-width: 0; }
.bt-est-row > div { border-left: 1px solid var(--color-border); }
.bt-est-row > .bt-est-icon, .bt-est-row > .bt-est-info { border-left: 0; }
.bt-est-expand, .bt-est-icon { display: flex; align-items: center; justify-content: center; }
.bt-est-expand > summary { list-style: none; width: 1.7em; height: 1.7em; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-border-strong); border-radius: 4px; color: var(--color-primary); cursor: pointer; }
.bt-est-expand > summary::-webkit-details-marker { display: none; }
.bt-est-expand > summary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.bt-est-expand .bt-exp-minus, .bt-est-expand[open] .bt-exp-plus { display: none; }
.bt-est-expand[open] .bt-exp-minus { display: inline; }
.bt-est-icon { color: var(--color-primary); }
.bt-est-info dl { display: flex; flex-direction: column; margin: 0; }
.bt-est-info dl > div { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); align-items: center; min-height: 1.9em; border-bottom: 1px solid var(--color-border); }
.bt-est-info dl > div:last-child { border-bottom: 0; }
.bt-est-info dt { padding: 2px 8px; color: var(--color-text-muted); font-size: .82rem; }
.bt-est-info dd { margin: 0; padding: 2px 8px; min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.bt-info-code dd { display: flex; align-items: center; gap: 6px; }
.bt-est-info dl > div.bt-info-pair { grid-template-columns: 5.2em minmax(0, 1fr) 5.2em minmax(0, 1fr); }
.bt-info-pair dt:nth-of-type(2) { border-left: 1px solid var(--color-border); }
.bt-est-info { container-type: inline-size; }
@container (max-width: 440px) {
  .bt-est-info dl > div.bt-info-pair { grid-template-columns: 5.2em minmax(0, 1fr); }
  .bt-info-pair dt:nth-of-type(2), .bt-info-pair dd:nth-of-type(2) { border-left: 0; border-top: 1px solid var(--color-border); }
}
.bt-dt-chip { display: inline-block; padding: 0 6px; border-radius: 3px; background: var(--color-primary); color: #fff; font-size: .78rem; font-weight: 700; }
.bt-chip { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--color-primary-light); color: var(--color-primary-dark); font-size: .86rem; }
.bt-chip-received { background: #e6f5ec; color: var(--bt-green-dark); }
.bt-copy-btn { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 1.9em; height: 1.7em; border: 1px solid var(--color-primary); border-radius: 4px; color: var(--color-primary); background: var(--color-surface); text-decoration: none; }
.bt-copy-btn:hover, .bt-copy-btn:focus-visible { background: var(--color-primary-light); }
.bt-est-status { display: flex; flex-direction: column; text-align: center; }
.bt-st-main { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding: 8px 4px; gap: 2px; }
.bt-st-sub { border-top: 1px solid var(--color-border); padding: 4px; }
.bt-processing { color: var(--color-danger); font-size: .82rem; font-weight: 600; }
.bt-est-date { display: flex; flex-direction: column; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; font-size: .9rem; white-space: nowrap; }
.bt-est-amount { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; padding: 6px 10px; font-variant-numeric: tabular-nums; }
.bt-est-amount strong { font-size: 1.12rem; }
.bt-est-print { display: flex; align-items: center; justify-content: center; padding: 4px; }
.bt-print-btn { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--bt-green); color: #fff; font-size: .82rem; font-weight: 700; text-decoration: none; }
.bt-print-btn:hover, .bt-print-btn:focus-visible { background: var(--bt-green-dark); color: #fff; }
.bt-est-memo { padding: 6px 8px; font-size: .86rem; color: var(--color-text-muted); overflow-wrap: anywhere; }
.bt-est-detail { display: none; grid-column: 1 / -1; padding: 10px 12px 14px; border-top: 1px solid var(--color-border-strong); background: var(--color-surface-muted); }
.bt-est-expand[open] ~ .bt-est-detail { display: block; }
.bt-d-wrap { overflow-x: auto; }
.bt-d-lines, .bt-d-history { width: 100%; border-collapse: collapse; font-size: .86rem; background: var(--color-surface); }
.bt-d-lines th, .bt-d-history th { padding: 4px 8px; background: var(--color-surface-muted); border-bottom: 1px solid var(--color-border-strong); font-weight: 700; text-align: left; white-space: nowrap; }
.bt-d-lines td, .bt-d-history td { padding: 3px 8px; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.bt-d-lines .bt-d-no { width: 3em; text-align: right; color: var(--color-text-muted); }
.bt-d-heading td { background: #4a5462; color: #fff; font-weight: 700; }
.bt-d-heading .bt-d-no { color: #fff; }
.bt-d-subtotal td { background: var(--color-surface-muted); font-weight: 700; }
.bt-d-comment td { color: var(--color-text-muted); }
.bt-d-spec { display: block; font-size: .8rem; color: var(--color-text-muted); }
.bt-d-bottom { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px 24px; margin-top: 12px; align-items: start; }
.bt-d-bottom h3 { margin: 0 0 4px; font-size: .88rem; }
.bt-d-bottom h3 + .bt-d-wrap, .bt-d-cond + h3 { margin-top: 10px; }
.bt-d-cond { padding: 6px 8px; min-height: 3em; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 4px; font-size: .86rem; }
.bt-d-totals { width: 100%; border-collapse: collapse; background: var(--color-surface); font-variant-numeric: tabular-nums; }
.bt-d-totals th { width: 45%; padding: 4px 10px; background: #bfe6ee; border: 1px solid var(--color-border); text-align: center; font-weight: 700; font-size: .86rem; color: #1f2d33; }
.bt-d-totals td { padding: 4px 10px; border: 1px solid var(--color-border); text-align: right; }
.bt-d-totals .is-total td { font-weight: 800; }
.bt-list-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.bt-list-pager .bt-pages { margin: 0; }

.bt-dialog { padding: 0; width: min(420px, calc(100vw - 32px)); border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.bt-dialog-wide { width: min(980px, calc(100vw - 32px)); }
.bt-dialog::backdrop { background: rgba(20, 24, 30, .45); }
.bt-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--color-border); }
.bt-dialog-head h2 { margin: 0; font-size: 1.05rem; }
.bt-dialog-x { border: 0; background: transparent; font-size: 1.4rem; line-height: 1; color: var(--color-text-muted); cursor: pointer; }
.bt-dialog-body { padding: 14px 16px; }
.bt-dialog-actions { display: flex; justify-content: center; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--color-border); }
.bt-copy-card .bt-dialog-head .bt-dialog-x { display: none; }
.bt-print-opt { display: flex; align-items: center; gap: 12px; }
.bt-print-help { margin: 10px 0 0; font-size: .84rem; }
.bt-seg { display: inline-flex; gap: 4px; }
.bt-seg label { position: relative; cursor: pointer; }
.bt-seg input { position: absolute; opacity: 0; pointer-events: none; }
.bt-seg span { display: inline-block; padding: 4px 14px; border-radius: 4px; background: var(--color-surface-muted); border: 1px solid var(--color-border-strong); color: var(--color-text); font-weight: 700; }
.bt-seg input:checked + span { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.bt-seg input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.bt-copy-lead { margin: 0 0 12px; font-size: .9rem; }
.bt-cp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.bt-cp-row { display: grid; grid-template-columns: 7em 1.8em minmax(0, 1fr); align-items: center; gap: 6px; padding: 6px 0; }
.bt-cp-label { font-size: .86rem; font-weight: 700; }
.bt-req { display: inline-block; margin-left: 2px; padding: 0 4px; border-radius: 3px; background: var(--color-danger); color: #fff; font-size: .7rem; font-weight: 700; vertical-align: middle; }
.bt-cp-check { display: flex; justify-content: center; }
.bt-cp-check input { width: 1.05em; height: 1.05em; }
.bt-cp-value { min-width: 0; }
.bt-cp-value .form-control:disabled { opacity: .55; }
.bt-cp-value .form-control.is-invalid { border-color: var(--color-danger); }
.bt-cp-error { display: block; margin-top: 2px; color: var(--color-danger); font-size: .8rem; }

@media (max-width: 900px) {
  .bt-basic, .bt-est-bottom { grid-template-columns: minmax(0, 1fr); }
  .bt-est-headrow { display: none; }
  .bt-est-row { grid-template-columns: 2.4em minmax(0, 1fr); }
  .bt-est-row > div { border-left: 0; }
  .bt-est-icon { display: none; }
  .bt-est-info, .bt-est-status, .bt-est-date, .bt-est-amount, .bt-est-print, .bt-est-memo { grid-column: 2 / -1; }
  .bt-est-status, .bt-est-date, .bt-est-amount, .bt-est-print { flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 8px; text-align: left; padding: 2px 8px; }
  .bt-st-main { flex-direction: row; justify-content: flex-start; padding: 0; gap: 8px; }
  .bt-st-sub { border-top: 0; padding: 0; }
  .bt-cp-grid, .bt-d-bottom { grid-template-columns: 1fr; }
  .bt-est-info dl > div.bt-info-pair { grid-template-columns: 5.2em minmax(0, 1fr); }
  .bt-info-pair dt:nth-of-type(2) { border-left: 0; }
  .bt-slipno { margin-left: 0; }
}
@media (max-width: 640px) {
  .bt-basic-pair { grid-template-columns: 1fr; }
}

:root {
  --dg-head: #55699b;
  --dg-head-dark: #4f6698;
  --dg-rule: #3a78b5;
  --dg-th-bg: #e9ecef;
  --dg-stripe: #b9eef0;
  --dg-subtotal: #a8dbe3;
  --dg-green: #1f7a43;
  --dg-green-dark: #176034;
  --dg-red: #c62828;
  --dg-blue: #2f8fe0;
  --dg-teal: #16a3a3;
  --dg-yellow: #fdf6e3;
  --dg-yellow-border: #f0e2b6;
  --dg-selected: #efe58a;
}

.module-subnav-bar > .dg-subnav-rest { display: flex; flex: 0 1 auto; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.dg-subnav-rest a {
  display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px 9px; white-space: nowrap;
  font-size: 13.5px; color: var(--color-text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.dg-subnav-rest a:hover { color: var(--color-primary-dark); text-decoration: none; background: var(--color-primary-light); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.dg-subnav-rest a.active { color: var(--color-primary-dark); font-weight: 700; border-bottom-color: var(--color-primary); }
.dg-subnav-group > summary.dg-subnav-group-summary { color: var(--color-text-muted); font-size: 13.5px; }
.dg-subnav-group > summary.dg-subnav-group-summary.active { color: var(--color-primary-dark); font-weight: 700; box-shadow: inset 0 -2px 0 var(--color-primary); }
.dg-subnav-group-list { left: 0; right: auto; }
.dg-subnav-group-list a.active { background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 700; }
.dg-subnav-label { align-self: center; padding: 2px 8px; margin-right: 2px; border: 1px solid var(--color-border-strong); border-radius: 4px; font-size: 12px; font-weight: 700; color: var(--color-text); white-space: nowrap; }
.dg-nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em; padding: 0 5px; margin-left: 3px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.dg-nav-badge-red { background: var(--dg-red); }
.dg-nav-badge-teal { background: var(--dg-teal); }

.dg-big-icon { display: block; font-size: 1.5rem; line-height: 1; margin-bottom: 4px; }
.bt-action-card .bt-big-submit { display: inline-flex; flex-direction: column; align-items: center; }

.dg-listbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 8px 0; }
.dg-listbar .bt-pages { margin: 0; }
.dg-sumboxes { width: auto; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-left: auto; }
.dg-search .bt-search-details > summary { display: flex; justify-content: center; font-size: 1.25rem; }
.dg-search .bt-search-details > summary::before { order: 2; }
.dg-sumboxes th { background: var(--dg-head); color: #fff; font-weight: 700; font-size: .88rem; padding: 4px 14px; border: 1px solid #fff; text-align: center; white-space: nowrap; }
.dg-sumboxes td { background: var(--color-surface); border: 1px solid var(--color-border); padding: 6px 12px; text-align: right; font-size: 1.08rem; white-space: nowrap; min-width: 7em; }
.dg-sumboxes td.is-strong { font-size: 1.2rem; font-weight: 700; }
.dg-sumbox-note { display: block; font-size: .78rem; color: var(--color-text-muted); }
.dg-count { font-size: 1.5rem; }
.dg-toolrow { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 10px 0 6px; }
.dg-toolrow-center { justify-content: center; }
.dg-toolrow-center .dg-sumboxes { margin-left: 0; }
.dg-tools { display: flex; gap: 8px; }
.dg-period-note { margin: 4px 0; color: var(--color-text); }
.dg-period-title { font-size: 1.2rem; font-weight: 500; margin: 14px 0 8px; }
.dg-sub-title { font-size: 1rem; margin: 16px 0 4px; }

.dg-rule { height: 4px; background: var(--dg-rule); border-radius: 2px; margin: 6px 0 12px; }
.dg-table-wrap { margin-bottom: 8px; }
.dg-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; background: var(--color-surface); }
.dg-table th { background: var(--dg-th-bg); color: var(--color-text); font-weight: 700; text-align: center; padding: 4px 6px; border: 1px solid var(--color-border); white-space: nowrap; }
.dg-table td { padding: 3px 6px; border: 1px solid var(--color-border); vertical-align: top; }
.dg-table tbody tr:nth-child(even) td { background: var(--dg-stripe); }
.dg-table tbody tr:hover td { background: #d9f6f7; }
.dg-table .cm-num { text-align: right; white-space: nowrap; }
.dg-small-head th { font-size: .78rem; }
.dg-c { text-align: center; }
.dg-empty { height: 1.8em; }
.dg-table tr.dg-subtotal td { background: var(--dg-subtotal); font-weight: 600; }
.dg-sub-label { text-align: right; letter-spacing: .1em; }
.dg-table tr.dg-total-row td { background: var(--color-surface); font-weight: 700; border-bottom: 2px solid var(--dg-rule); }
.dg-table tr.dg-site-head td { background: var(--color-primary-light); font-weight: 700; }
.dg-report td { font-size: .9rem; }
.dg-big-num { font-size: 1.1rem; font-weight: 700; }
.dg-inv-no { font-size: .78rem; }
.dg-deferred { font-weight: 700; }

.dg-sbtn { display: inline-block; padding: 1px 8px; border: 0; border-radius: 3px; color: #fff; font: inherit; font-size: .78rem; line-height: 1.6; text-decoration: none; white-space: nowrap; cursor: pointer; }
.dg-sbtn:hover, .dg-sbtn:focus-visible { color: #fff; text-decoration: none; filter: brightness(.92); }
.dg-sbtn-excel, .dg-sbtn-deposit { background: var(--dg-green); }
.dg-sbtn-pdf, .dg-sbtn-delete { background: var(--dg-red); }
.dg-sbtn-invoice { background: var(--dg-blue); }
.dg-sbtn-plain { background: var(--color-surface); color: var(--color-primary-dark); border: 1px solid var(--color-border-strong); }
.dg-sbtn-ok { background: var(--dg-blue); }
.dg-sbtn-plain:hover, .dg-sbtn-plain:focus-visible { color: var(--color-primary-dark); }
.dg-inline-form { display: inline; margin: 0; }
.dg-tbtn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 4px; color: #fff; font-size: .9rem; text-decoration: none; }
.dg-tbtn:hover, .dg-tbtn:focus-visible { color: #fff; text-decoration: none; filter: brightness(.92); }
.dg-btn-blue { background: var(--dg-blue); border-color: var(--dg-blue); font-size: 1.1rem; padding: 10px 24px; }

.dg-closed { display: inline-block; min-width: 7em; padding: 1px 6px; background: var(--dg-green); color: #fff; font-size: .8rem; text-align: center; border-radius: 2px; }
.dg-memo { cursor: help; font-size: .95rem; }
.dg-link-badge { display: inline-block; padding: 1px 6px; border-radius: 3px; color: #fff; font-size: .75rem; white-space: nowrap; }
.dg-link-on { background: var(--dg-blue); }
.dg-link-off { background: #343a40; }
.dg-stage { font-size: .88rem; }
.dg-stage-unbilled { color: var(--dg-red); font-weight: 700; }
.dg-stage-billed { color: var(--dg-blue); font-weight: 700; }
.dg-stage-confirming { color: var(--dg-teal); font-weight: 700; }
.dg-stage-paid { color: var(--dg-green-dark); font-weight: 700; }
.dg-taxunit { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: .85rem; }
.dg-taxunit-slip { background: var(--dg-green); color: #fff; }
.dg-taxunit-line { background: var(--dg-red); color: #fff; }
.dg-remain { color: var(--dg-red); font-size: .8rem; font-weight: 700; }
.dg-row-warn { margin: 2px 0 0; padding: 0; list-style: none; color: var(--dg-red); font-size: .82rem; }
.dg-row-warn li::before { content: '❗ '; }
.dg-closing-badge { float: right; padding: 0 4px; border: 1px solid var(--color-border-strong); border-radius: 3px; font-size: .7rem; color: var(--color-text-muted); }
.dg-party { display: inline-block; min-width: 7em; padding: 0 6px; color: #fff; font-size: .75rem; text-align: center; letter-spacing: .3em; }
.dg-party-supplier { background: var(--dg-green); }
.dg-party-customer { background: var(--dg-blue); }
.dg-url a { overflow-wrap: anywhere; }
.dg-folder { margin-right: 4px; font-size: 1.1rem; }

.dg-basic { background: var(--color-surface); border-color: var(--color-border); }
.dg-slip-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.dg-slip-form:not(.dg-show-kind) .dg-kind-col { display: none; }
.dg-slip-lines tbody tr:nth-child(even) td { background: var(--dg-stripe); }
.dg-slip-lines .bt-no { text-align: center; }
.dg-rowpick { display: flex; align-items: center; gap: 4px; }
.dg-rowpick select { min-width: 8em; }
.dg-slip-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px 24px; margin-top: 12px; align-items: start; }
.dg-slip-totals { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.dg-total-table, .dg-target-table { width: auto; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 22em; }
.dg-total-table th, .dg-target-table th { background: #b5eaf1; border: 1px solid var(--color-border-strong); padding: 5px 10px; font-weight: 500; text-align: center; }
.dg-total-table td, .dg-target-table td { border: 1px solid var(--color-border-strong); padding: 5px 10px; text-align: right; background: var(--color-surface); }
.dg-total-side { font-size: .82rem; }
.dg-total-gross th, .dg-total-gross td { font-size: 1.2rem; font-weight: 700; }
.dg-target-note { display: block; font-size: .72rem; color: var(--color-text-muted); }
.dg-tax-note { text-align: right; }
.dg-cash-box { margin-top: 8px; font-size: .9rem; }
.dg-short { max-width: 14em; }
.dg-inline-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.dg-red-note { color: var(--dg-red); font-weight: 700; font-size: .88rem; }
.dg-dep-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px 28px; align-items: start; }
.dg-dep-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-bottom: 14px; }
.dg-dep-table thead th:first-child { width: 8em; white-space: nowrap; }
.dg-dep-table thead th:nth-child(2) { width: 12em; }
.dg-dep-table thead th { text-align: left; font-size: .9rem; padding: 4px 6px; border-bottom: 1px solid var(--color-border); }
.dg-dep-table tbody th { width: 7em; text-align: left; font-weight: 500; padding: 4px 6px; }
.dg-dep-table td { padding: 3px 6px; vertical-align: top; }
.dg-dep-amount { text-align: right; max-width: 12em; }
.dg-bill-extra { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: .86rem; }
.dg-dep-sum { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.dg-dep-sum > div { display: grid; grid-template-columns: 9em minmax(0, 1fr); align-items: center; gap: 12px; }
.dg-dep-sum dt { font-size: 1.15rem; font-weight: 700; }
.dg-dep-sum dd { margin: 0; padding: 6px 12px; background: var(--color-surface-muted); border: 1px solid var(--color-border); text-align: right; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.dg-dep-total { padding: 10px; border: 2px solid var(--dg-rule); }
.dg-dep-after dt { text-align: right; }
.dg-alloc-view { margin-top: 6px; font-size: .9rem; }

.dg-yellow-panel { background: var(--dg-yellow); border: 1px solid var(--dg-yellow-border); border-radius: 6px; padding: 12px 16px; margin: 10px 0; }
.dg-yellow-panel p { margin: 6px 0 0; font-size: .88rem; }
.dg-issue-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.dg-issue-row label { font-weight: 700; min-width: 6em; }
.dg-issue-btn { font-weight: 700; }
.dg-print-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

.dg-inquiry-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px 16px; align-items: end; }
.dg-inquiry-btn { padding-bottom: 8px; }
.dg-notes ul { margin: 0; padding-left: 1.4em; }
.dg-notes li { margin: 2px 0; }

.dg-two-col { display: grid; grid-template-columns: minmax(14em, 1fr) minmax(0, 3.2fr); gap: 16px 24px; align-items: start; }
.dg-side-list { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: 6px; overflow: hidden; background: var(--color-surface); }
.dg-side-list a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--color-border); color: var(--color-primary-dark); text-decoration: none; font-size: .9rem; }
.dg-side-list a:last-child { border-bottom: 0; }
.dg-side-list a:hover { background: var(--color-primary-light); }
.dg-side-list a.is-selected { background: var(--dg-selected); }
.dg-side-count { color: var(--dg-teal); font-size: .82rem; }
.dg-side-count strong { font-size: 1rem; }
.dg-sec { margin: 14px 0; }
.dg-sec h3 { margin: 0 0 4px; font-size: 1.05rem; }
.dg-sec-red h3 { color: var(--dg-red); }
.dg-sec-blue h3 { color: var(--dg-blue); }
.dg-sec-teal h3 { color: var(--dg-teal); }
.dg-sec-green h3 { color: var(--dg-green-dark); }
.dg-sec-note { margin-left: 8px; font-size: .95rem; }
.dg-sec tfoot td { background: var(--color-surface); }

.dg-kinds { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; border: 0; padding: 0; margin: 0; }
.dg-kinds legend { font-size: .9rem; padding: 0 8px 0 0; float: left; }
.dg-checks summary { cursor: pointer; font-weight: 600; }

@media (max-width: 900px) {
  .dg-slip-bottom, .dg-dep-grid, .dg-two-col, .dg-inquiry-grid { grid-template-columns: 1fr; }
  .dg-sumboxes { margin-left: 0; }
  .dg-slip-totals { justify-content: flex-start; }
  .dg-total-table, .dg-target-table { min-width: 0; width: 100%; }
}
@media print {
  .dg-search, .dg-tools, .dg-yellow-panel, .dg-side-list { display: none; }
  .dg-table tbody tr:nth-child(even) td { background: #eefafa; }
}


.dg-state { display: inline-block; min-width: 4.8em; padding: 1px 6px; border: 1px solid transparent; border-radius: 2px; font-size: .78rem; font-weight: 700; line-height: 1.5; text-align: center; white-space: nowrap; }
.dg-state-black { background: #343a40; border-color: #343a40; color: #fff; }
.dg-state-plain { background: var(--color-surface); border-color: var(--color-border-strong); color: var(--color-text); }
.dg-state-green { background: #1f7a43; border-color: #1f7a43; color: #fff; }
.dg-state-blue { background: var(--dg-blue); border-color: var(--dg-blue); color: #fff; }
.dg-state-orange { background: #f0932b; border-color: #f0932b; color: #fff; }
.dg-state-red { background: var(--dg-red); border-color: var(--dg-red); color: #fff; }
.dg-state-gray { background: #adb5bd; border-color: #adb5bd; color: #fff; }
.dg-state-teal { background: var(--dg-teal); border-color: var(--dg-teal); color: #fff; }

.dg-address { display: inline-flex; align-items: baseline; gap: 2px; overflow-wrap: anywhere; }
.dg-row-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dg-row-actions .cq-paid-date { width: 9.5em; padding: 2px 4px; font-size: .8rem; }
.dg-row-actions .cq-paid-form { display: inline-flex; gap: 4px; align-items: center; }

.cm-dg-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.cm-dg-status label { margin: 0; font-weight: 700; }
.cm-dg-status select { width: auto; }
.cm-dg-money { margin-bottom: 8px; }
.cm-dg-money th label { margin: 0; font-weight: 600; }
.cm-dg-money th .cm-th-sub { display: block; font-size: .72rem; font-weight: 400; color: inherit; opacity: 0.82; }
.cm-dg-money td .form-control { text-align: right; }
.cm-dg-money td input[type="date"] { text-align: left; }
.cm-dg-extra .cw-share-block { margin-bottom: 10px; }
.cm-dg-pickcard { padding-block: 10px; }
.cm-dg-pickcard .bt-codepick { max-width: 44em; margin: 0; }
.cm-dg-newform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; }
.cm-dg-newform .bt-codepick { flex: 1 1 26em; margin: 0; }
.cm-dg-newform .form-group { margin: 0; }
.dg-supplier-text { margin-top: 4px; padding-left: calc(2.4em + 7.5em + 12px); }
.dg-supplier-text .form-control { font-size: .92rem; }
.dg-lines-card .dg-slip-bottom { grid-template-columns: minmax(0, 1fr) auto; }
.bt-lines .bt-amount .form-control { text-align: right; }
.cm-dg-paylines .bt-no { width: 3em; text-align: center; color: var(--color-text-muted); }
.cm-dg-paylines .bt-rowbtns { width: 6.4em; }
.cm-dg-paylines td { padding: 3px 4px; vertical-align: middle; }
.cm-dg-paylines .form-control { min-width: 0; padding: 4px 6px; font-size: 13px; }
.cm-dg-paylines .bl-input-qty, .cm-dg-paylines .bl-input-unit { width: 5em; }
.cm-dg-paylines .bl-input-price, .cm-dg-paylines .bl-input-yen { width: 8em; text-align: right; }

.dcr-action-card .dcr-outside-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.dcr-action-card .dcr-top-actions { margin: 0; }
.bt-basic.dcr-head { display: block; }
.dcr-cell-btns { white-space: nowrap; }
.cm-dg-live strong { margin-left: 4px; }
.cm-dg-zebra > tbody > tr:nth-child(even) > td { background: var(--dg-stripe); }
.cm-dg-zebra > tbody > tr.dcr-row-empty:nth-child(even) > td { background: #dff6f7; }

.main { min-width: 0; }
.dg-table.cm-projects-table { min-width: 0; font-size: 13px; }
.dg-table.cm-projects-table th { white-space: normal; }
.dg-table.cm-projects-table th .cm-th-sub { display: block; font-weight: 400; font-size: .72rem; color: inherit; opacity: 0.82; }
.cm-projects-table td.cm-cell-state { width: 5.6em; }
.cm-projects-table td.cm-cell-code { width: 7em; white-space: normal; word-break: break-all; }
.dg-table.cm-projects-table td.cm-cell-name { min-width: 0; }
.dg-table.cm-projects-table td.cm-cell-dept { min-width: 0; width: 11em; }
.cm-projects-table .cm-cell-period { display: block; margin-top: 3px; font-size: 12.5px; }
.cm-projects-table td.cm-cell-rate { width: 8.5em; }
.cm-cell-memo { display: block; margin-top: 3px; }
.dg-table .cm-cell-meta { display: block; }
.dg-table .cm-rate { min-width: 0; }

.cm-dg-list td .ac-sub, .cm-dg-list td .sales-sub { display: block; white-space: normal; font-size: .78rem; color: var(--color-text-muted); }
.cm-dg-list td { min-width: 0; }
.cm-dg-list details.cc-lines summary { font-size: .82rem; }
.dg-table.dcr-table-list { min-width: 0; }
.dg-table .cb-rate-cell { min-width: 8em; }
.cm-dg-budget.dg-table td { vertical-align: middle; }
.cm-dg-budget.dg-table tbody tr:nth-child(even) td { background: var(--dg-stripe); }

.dg-sumboxes.cm-dg-wideboxes { margin-left: 0; width: 100%; table-layout: fixed; }
.cm-dg-wideboxes th { white-space: normal; padding: 4px 6px; }
.cm-dg-wideboxes td { min-width: 0; white-space: normal; padding: 6px 8px; font-size: 1rem; }
.cm-dg-wideboxes .dg-sumbox-note { white-space: normal; }

.cm-dg-toolbar { background: var(--bt-basic-bg); border-color: var(--bt-basic-border); }
.cm-dg-search-title { margin: 0 0 8px; text-align: center; font-size: 1.25rem; font-weight: 600; }
.cm-dg-report .cr-report thead th { background: var(--dg-th-bg); }
.cm-dg-report .cr-report tbody tr:nth-child(even) td { background: var(--dg-stripe); }
.cm-dg-report .cr-report tr.el-total td { background: var(--dg-subtotal); font-weight: 600; }

.cm-dg-page .page-title { border-bottom: 4px solid var(--dg-rule); padding-bottom: 4px; }
.cm-dg-page .cr-section > h2, .cm-dg-page .cr-section > .cr-section-head h2 { padding-bottom: 4px; border-bottom: 2px solid var(--dg-rule); }
.cm-dg-page .cc-table thead th { background: var(--dg-th-bg); color: var(--color-text); font-weight: 700; text-align: center; border: 1px solid var(--color-border); }
.cm-dg-page .cc-table td { border: 1px solid var(--color-border); }
.cm-dg-page .cc-table tbody tr:nth-child(even) td { background: var(--dg-stripe); }
.cm-dg-page .btn:not(.btn-secondary):not(.btn-danger) { background: var(--color-surface); color: var(--bt-green-dark); border: 2px solid var(--bt-green); font-weight: 700; }
.cm-dg-page .btn:not(.btn-secondary):not(.btn-danger):hover { background: var(--bt-green); color: #fff; }

@media (max-width: 900px) {
  .dg-supplier-text { padding-left: 0; }
  .dg-lines-card .dg-slip-bottom { grid-template-columns: 1fr; }
  .cm-projects-table td.cm-cell-dept, .cm-projects-table td.cm-cell-rate { width: auto; }
}
@media print {
  .cm-dg-toolbar, .cm-dg-pickcard { display: none; }
  .cm-dg-zebra > tbody > tr:nth-child(even) > td, .cm-dg-report .cr-report tbody tr:nth-child(even) td { background: #eefafa; }
}

.main.main-wide { max-width: none; }


.dg-lookup { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 6px; box-shadow: 0 12px 40px rgba(15, 23, 42, 0.35); background: var(--color-surface); color: var(--color-text); }
.dg-lookup::backdrop { background: rgba(15, 23, 42, 0.45); }
.dg-lookup[open] { display: flex; flex-direction: column; }
.dg-lookup-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
.dg-lookup-title { margin: 0; font-size: 1.1rem; font-weight: 500; }
.dg-lookup-close { font: inherit; font-size: 1.4rem; line-height: 1; padding: 2px 8px; border: 0; background: transparent; color: var(--color-text-muted); cursor: pointer; }
.dg-lookup-close:hover, .dg-lookup-close:focus-visible { color: var(--color-text); }
.dg-lookup-form { padding: 12px 16px 4px; }
.dg-lookup-grid { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 6px 12px; align-items: center; }
.dg-lookup-grid label { font-size: .88rem; font-weight: 600; }
.dg-lookup-grid [hidden] { display: none; }
.dg-lookup-btns { display: flex; justify-content: center; gap: 10px; margin: 10px 0 6px; }
.dg-lookup-clear { background: #6c757d; border-color: #6c757d; color: #fff; }
.dg-lookup-go { background: #2f8fe0; border-color: #2f8fe0; color: #fff; }
.dg-lookup-results { margin: 0 16px; overflow: auto; max-height: 50vh; border: 1px solid var(--color-border); }
.dg-lookup-table { margin: 0; }
.dg-lookup-table thead th { position: sticky; top: 0; z-index: 1; }
.dg-lookup-table tbody tr:nth-child(even) td { background: #b9eef0; }
.dg-lookup-pick { font-variant-numeric: tabular-nums; }
.dg-lookup-status { margin: 6px 16px 12px; font-size: .85rem; color: var(--color-text-muted); }

.dg-action-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.dg-action-row > .bt-action-card { flex: 1 1 320px; margin-bottom: 14px; }
.dg-action-row > .dg-preview-card { flex: 0 1 280px; }
.dg-preview-btn { display: inline-flex; flex-direction: column; align-items: center; font: inherit; font-size: 1rem; font-weight: 700; padding: 10px 26px; border-radius: 8px; cursor: pointer; color: #c62828; background: var(--color-surface); border: 2px solid #e53935; }
.dg-preview-btn:hover, .dg-preview-btn:focus-visible { background: #e53935; color: #fff; }

.bt-est-lines .dg-rowpick { display: flex; align-items: center; gap: 4px; }
.bt-est-lines .dg-rowpick select { min-width: 7em; }

.dg-multiplier-diff { color: #e53935; font-weight: 700; }
.dg-table tr.dg-inactive td { color: var(--color-text-muted); }

tbody[data-row-drag] > tr > [data-row-no] { cursor: grab; touch-action: none; user-select: none; position: relative; }
tbody[data-row-drag] > tr > [data-row-no]:hover::before { content: '⋮⋮'; position: absolute; left: 2px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); font-size: .8rem; letter-spacing: -2px; }
tbody[data-row-drag] > tr > [data-row-no]:hover { background: var(--color-primary-light); }
tbody.dg-rows-dragging, tbody.dg-rows-dragging * { cursor: grabbing !important; }
tbody[data-row-drag] > tr.dg-row-dragging > td { background: #fff7cc !important; box-shadow: inset 0 2px 0 #f0b400, inset 0 -2px 0 #f0b400; opacity: .9; }


.dg-compact .form-control { height: 26px; min-height: 26px; padding: 2px 6px; font-size: 12.5px; line-height: 1.4; }
.dg-compact textarea.form-control { height: auto; }
.dg-compact select.form-control { padding-right: 20px; }
.dg-compact .form-group { margin-bottom: 4px; }
.dg-compact label, .dg-compact .form-group > label { font-size: 12px; font-weight: 700; }
.dg-compact .bt-find, .dg-compact .bt-rowbtn { min-width: 24px; height: 24px; padding: 0 3px; font-size: 12px; line-height: 22px; }
.dg-compact .form-control:focus-visible, .dg-compact .bt-find:focus-visible, .dg-compact .bt-rowbtn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }

.dg-compact .bt-basic { padding: 8px 12px; gap: 4px 20px; margin-bottom: 8px; }
.dg-compact .bt-basic .form-group { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); align-items: center; column-gap: 8px; margin-bottom: 3px; }
.dg-compact .bt-basic .form-group > label { margin: 0; }
.dg-compact .bt-basic .form-group > :not(label) { grid-column: 2; }
.dg-compact .bt-basic .bt-basic-right .form-group { grid-template-columns: 1fr; }
.dg-compact .bt-basic .bt-basic-right .form-group > :not(label) { grid-column: 1; }
.dg-compact .bt-basic-pair { gap: 0 16px; }
.dg-compact .bt-codepick-row { gap: 4px; }
.dg-compact .bt-codepick-row .bt-code { width: 7em; }
.dg-compact .bt-memo { min-height: 5em; }
.dg-compact .cm-muted { font-size: 11.5px; }

.dg-compact .cm-table-wrap { overflow-x: auto; }
.dg-lines-compact { table-layout: fixed; width: 100%; min-width: 900px; font-size: 12px; border-collapse: collapse; }
.dg-lines-compact th { height: 26px; padding: 2px 4px; font-size: 12px; background: var(--dg-th-bg, #e9ecef); border: 1px solid var(--color-border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-lines-compact td { height: 30px; padding: 2px 3px; border: 1px solid var(--color-border); vertical-align: middle; }
.dg-lines-compact td .form-control { width: 100%; min-width: 0; }
.dg-lines-compact .bt-rowbtns { white-space: nowrap; }
.dg-lines-compact .bt-rowbtn { width: 20px; min-width: 20px; margin-right: 1px; }
.dg-lines-compact .bt-taxcol { display: flex; gap: 2px; }
.dg-lines-compact .bt-taxcol select { flex: 1 1 50%; width: 50%; min-width: 0; padding: 2px 12px 2px 3px; background-position: right 2px center; }
.dg-lines-compact select.form-control { padding-left: 3px; padding-right: 14px; background-position: right 2px center; }
.dg-lines-compact td.bt-amount { background: var(--color-surface-muted); text-align: right; font-variant-numeric: tabular-nums; }
.dg-lines-compact .dg-rowpick { display: flex; gap: 2px; }
.dg-lines-compact .dg-rowpick .bt-find { flex: 0 0 24px; }
.dg-lines-compact .dg-rowpick select { flex: 1 1 auto; min-width: 0; }
.dg-lines-compact .bt-name-col, .dg-lines-compact .bt-deptcol select { min-width: 0; }
.dg-lines-compact .bt-name-col { white-space: nowrap; }
.dg-lines-compact .bt-name-col .form-control { display: inline-block; width: 61%; vertical-align: middle; }
.dg-lines-compact .bt-name-col .bt-spec { width: 38%; margin: 0 0 0 1%; }
.dg-lines-compact col.dg-col-no { width: 40px; }
.dg-lines-compact col.dg-col-comment { width: 48px; }
.dg-lines-compact col.dg-col-kind { width: 76px; }
.dg-lines-compact col.dg-col-btns { width: 70px; }
.dg-lines-compact col.dg-col-title { width: 9%; }
.dg-lines-compact col.dg-col-code { width: 5%; }
.dg-lines-compact col.dg-col-name { width: 15%; }
.dg-lines-compact col.dg-col-qty { width: 6%; }
.dg-lines-compact col.dg-col-unit { width: 6.5%; }
.dg-lines-compact col.dg-col-price { width: 8%; }
.dg-lines-compact col.dg-col-tax { width: 12.5%; }
.dg-lines-compact col.dg-col-amount { width: 10%; }
.dg-lines-compact col.dg-col-cost { width: 7%; }
.dg-lines-compact col.dg-col-profit { width: 8%; }
.dg-lines-compact col.dg-col-dept { width: 11.5%; }
.dg-lines-compact col.dg-col-note { width: 11%; }
.bt-est-form:not(.bt-show-cost) col.bt-cost, .bt-est-form:not(.bt-show-title) col.bt-title-col, .dg-slip-form:not(.dg-show-kind) col.dg-kind-col { display: none; }

  .dg-compact .bt-sum-table th, .dg-compact .bt-sum-table td,
.dg-compact .dg-total-table th, .dg-compact .dg-total-table td, .dg-compact .dg-target-table th, .dg-compact .dg-target-table td { height: 28px; padding: 3px 8px; font-size: 12.5px; }
.dg-compact .bt-sum-table th, .dg-compact .dg-total-table th, .dg-compact .dg-target-table th { background: #b5eaf1; }
.dg-compact .bt-sum-table .bt-sum-gross td { font-size: 1rem; }
.dg-compact .bt-lines-toolbar { margin-bottom: 4px; font-size: 12px; }
.dg-compact .bt-switch { padding: 1px 10px; font-size: 12px; }
.dg-action-row > .bt-action-card { min-height: 120px; padding-top: 12px; padding-bottom: 12px; }
.dg-compact .dg-dep-table td, .dg-compact .dg-dep-table th { padding: 2px 4px; }
.dg-compact .dg-dep-sum dd { padding: 3px 10px; font-size: 1.05rem; }

.dg-table td { padding: 2px 6px; line-height: 1.45; }
.dg-table th { padding: 3px 6px; }

@media (max-width: 1300px) {
  .dg-compact .bt-basic { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
  .dg-compact .bt-basic .form-group { grid-template-columns: 7.5em minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .dg-compact .bt-basic { grid-template-columns: minmax(0, 1fr); }
  .dg-compact .bt-basic .form-group { grid-template-columns: minmax(0, 1fr); }
  .dg-compact .bt-basic .form-group > :not(label) { grid-column: 1; }
}
.dg-compact .bt-sum-table td.bt-discount-cell { height: auto; flex-wrap: nowrap; gap: 3px; }
.dg-compact .bt-discount-cell .form-control { width: auto; min-width: 0; }
.dg-compact .bt-discount-cell .bl-input-yen { width: 7em; }
.dg-lines-compact td.bt-amount { background: var(--color-surface-muted); }


.dg-discount-row th { white-space: nowrap; }
.dg-discount-label { color: #e53935; letter-spacing: .3em; }
.dg-discount-btn { font: inherit; font-size: .8rem; line-height: 1; min-width: 24px; min-height: 22px; padding: 2px 5px; margin-left: 4px; color: #e53935; background: #fff; border: 1px solid #e53935; border-radius: 3px; cursor: pointer; vertical-align: middle; }
.dg-discount-btn:hover, .dg-discount-btn:focus-visible { background: #e53935; color: #fff; outline: 2px solid #e53935; outline-offset: 1px; }
.dg-discount-amount { color: #e53935; font-weight: 700; }
.dg-trade-totals .bt-sum-table { max-width: 32rem; margin-left: auto; }
.dg-trade-totals .bt-cost-total td span { margin-left: .5em; }

.dg-discount { width: min(460px, calc(100vw - 32px)); }
.dg-discount-form { padding: 4px 18px 8px; }
.dg-discount-sec { margin: 0; padding: 10px 0; border: 0; border-bottom: 1px solid var(--color-border); }
.dg-discount-sec legend, .dg-discount-head { font-weight: 700; font-size: .9rem; margin: 6px 0 4px; padding: 0; }
.dg-discount-radio { display: block; font-size: .9rem; margin: 2px 0; cursor: pointer; }
.dg-discount-num { text-align: right; max-width: 14em; }
.dg-discount-line { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.dg-discount-line > span:first-child { min-width: 8.5em; font-size: .9rem; }
.dg-discount-out { flex: 1 1 auto; padding: 4px 10px; text-align: right; background: var(--color-surface-muted); border: 1px solid var(--color-border); font-variant-numeric: tabular-nums; }
.dg-discount-pct { margin: 4px 0 0; font-size: .85rem; color: var(--color-text-muted); }
.dg-discount-error { margin: 4px 0 0; color: #e53935; font-weight: 700; font-size: .88rem; }
.dg-discount-error:empty { display: none; }
.dg-discount [hidden] { display: none; }

.dg-rowmove { width: min(420px, calc(100vw - 32px)); }
.dg-rowmove-text { margin: 16px 18px 4px; font-size: 1rem; text-align: center; }
.dg-rowmove .dg-lookup-btns { padding: 8px 16px 16px; }
.dg-rowmove-copy { background: #3fbf6a; border-color: #3fbf6a; color: #fff; }

.bt-sum-discount td, .bp-discount td { color: #c62828; }


@media screen {
  .app-shell {
    --page-pad-top: 14px;        
    --page-pad-x: 24px;          
    --page-pad-bottom: 24px;     
    --topbar-gap: 10px;          
    --title-gap: 14px;           
    --head-gap: 12px;            
    --card-pad-y: 16px;          
    --card-pad-x: 18px;          
    --card-gap: 14px;            
    --block-gap: 12px;           
    --card-head-pad: 8px;        
    --card-head-gap: 12px;       
    --field-gap: 12px;           
    --cell-pad-y: 8px;           
    --cell-pad-x: 10px;          
    --tile-gap: 12px;            
    --form-col-min: 240px;       
  }
  .main.main-wide {
    --title-gap: 20px;
    --head-gap: 16px;
    --card-pad-y: 20px;
    --card-pad-x: 20px;
    --card-gap: 20px;
    --block-gap: 16px;
    --card-head-pad: 10px;
    --card-head-gap: 14px;
    --field-gap: 14px;
    --cell-pad-y: 10px;
    --cell-pad-x: 12px;
    --tile-gap: 14px;
  }

  :where(.main:not(.main-wide)) :where(.card) h2 { font-size: 19px; }
  :where(.main:not(.main-wide)) :where(.card) h3 { font-size: 17px; }
  :where(.main:not(.main-wide)) > :where(h2) { font-size: 19px; margin: 18px 0 10px; }
  :where(.card) > :where(:last-child:not(summary)) { margin-bottom: 0; }
}

@media screen {
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) {
    container-type: inline-size;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--form-col-min)), 1fr));
    column-gap: 18px;
    align-items: start;
  }
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > *,
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > div[class="form-row"] > * {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > div[class="form-row"] {
    display: contents;
  }
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > :is(button, .btn, a) {
    justify-self: start;
  }
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > .form-group:has(> :is(select.form-control, input.form-control:is([type="date"], [type="time"], [type="month"], [type="week"], [type="number"], [type="tel"], [type="datetime-local"], [type="color"]))):not(:has(textarea, input[type="checkbox"], input[type="radio"], input[type="file"], table, .form-control ~ .form-control, > :not(label, input, select))),
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > div[class="form-row"] > .form-group:has(> :is(select.form-control, input.form-control:is([type="date"], [type="time"], [type="month"], [type="week"], [type="number"], [type="tel"], [type="datetime-local"], [type="color"]))):not(:has(textarea, input[type="checkbox"], input[type="radio"], input[type="file"], table, .form-control ~ .form-control, > :not(label, input, select))),
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > .form-group:has(> input.form-control:is([type="text"], [type="email"], [type="url"], [type="search"], [type="password"], :not([type]))):not(:has(textarea, input[type="checkbox"], input[type="radio"], input[type="file"], table, .form-control ~ .form-control, > :not(label, input, select))),
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > div[class="form-row"] > .form-group:has(> input.form-control:is([type="text"], [type="email"], [type="url"], [type="search"], [type="password"], :not([type]))):not(:has(textarea, input[type="checkbox"], input[type="radio"], input[type="file"], table, .form-control ~ .form-control, > :not(label, input, select))) {
    grid-column: auto;
  }
}
@media screen {
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > .form-group > :is(input.form-control:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select.form-control),
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > div[class="form-row"] > .form-group > :is(input.form-control:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select.form-control) {
    max-width: 48rem;
  }
}
@container (min-width: 780px) {
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > .form-group:has(> input.form-control:is([type="text"], [type="email"], [type="url"], [type="search"], [type="password"], :not([type]))):not(:has(textarea, input[type="checkbox"], input[type="radio"], input[type="file"], table, .form-control ~ .form-control, > :not(label, input, select))),
  .main:not(.main-wide) .card > form:not([class]):has(> .form-group ~ .form-group, > div[class="form-row"]) > div[class="form-row"] > .form-group:has(> input.form-control:is([type="text"], [type="email"], [type="url"], [type="search"], [type="password"], :not([type]))):not(:has(textarea, input[type="checkbox"], input[type="radio"], input[type="file"], table, .form-control ~ .form-control, > :not(label, input, select))) {
    grid-column: span 2;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: var(--card-gap, 20px);
  margin-bottom: var(--card-gap, 20px);
}
.card-grid > .card { margin-bottom: 0; min-width: 0; }
.card-grid-start { align-items: start; }

@media screen and (min-width: 1400px) {
  .ic-detail-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--card-gap, 20px);
    align-items: start;
    margin-bottom: var(--card-gap, 20px);
  }
  .ic-detail-split > .card { margin-bottom: 0; }
}

@media screen and (min-width: 1101px) {
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

@media screen and (min-width: 1200px) {
  .main:not(.main-wide) .card table:not([class]):not([style]):not(:has(tr > :nth-child(4))) {
    width: auto;
    min-width: min(100%, 720px);
  }
}

@media screen {
  .main:not(.main-wide) :is(.sales-lead, .appearance-lead) { max-width: 62em; }
  .main:not(.main-wide) :is(.pg-note, .wr-disclaimer, .cq-howto, .ic-howto ul, .sc-help ul) { max-width: 72em; }
}


.isc-type { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; border: 1px solid transparent; }
.isc-type-invoice { background: var(--color-primary-light); color: var(--color-primary-dark); border-color: var(--color-border-strong); }
.isc-type-receipt { background: var(--color-success-light); color: var(--color-success-dark); border-color: #bfe8cc; }
.isc-type-delivery { background: var(--color-warning-light); color: var(--color-warning-dark); border-color: var(--color-warning); }
.isc-type-quote_order { background: var(--color-surface-muted); color: var(--color-text); border-color: var(--color-border-strong); }

.isc-type-filter { margin-top: 8px; }
.isc-list-table td:nth-child(3), .isc-list-table td:nth-child(8) { white-space: nowrap; min-width: 0; }
.isc-list-table td:nth-child(4), .isc-list-table td:nth-child(9) { white-space: normal; min-width: 140px; }

.isc-upload-form .isc-doc-type-choice { flex: 0 1 240px; }
.isc-doc-type-choice .file-meta { margin: 4px 0 0; }

.isc-doc-type-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; padding: 8px 10px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.isc-doc-type-now { font-weight: 600; margin-right: auto; }
.isc-doc-type-select { width: auto; min-width: 180px; max-width: 100%; }

.isc-deliveries { background: var(--color-warning-light); border-color: var(--color-warning); }
.isc-delivery-list { list-style: none; margin: 6px 0 0; padding: 0; }
.isc-delivery-list li { margin: 4px 0; }
.isc-delivery-list label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.isc-delivery-list input[type="checkbox"] { margin: 0 4px 0 0; }

.isc-receipt-rates { width: 100%; max-width: 640px; }
.isc-receipt-rates th[scope="row"] { white-space: nowrap; font-weight: 600; }
.isc-receipt-rates .form-control { min-width: 110px; }
.isc-receipt-rates tfoot th, .isc-receipt-rates tfoot td { border-top: 2px solid var(--color-border-strong); font-weight: 600; }
.isc-receipt-items { margin-top: 8px; font-size: 13px; }
.isc-receipt-items ul { margin: 4px 0 0; padding-left: 20px; columns: 2 220px; }

.isc-lines.isc-lines-delivery { min-width: 1250px; }
.isc-lines.isc-lines-delivery td:nth-child(9) { min-width: 220px; }
.isc-lines.isc-lines-delivery td:nth-child(10) { min-width: 120px; }
.isc-lines.isc-lines-delivery td:nth-child(11) { min-width: 140px; }
.isc-lines.isc-lines-quote_order { min-width: 960px; }
.isc-lines.isc-lines-quote_order td:nth-child(9) { min-width: 160px; }

@media (max-width: 720px) {
  .isc-doc-type-now { flex: 1 1 100%; margin-right: 0; }
  .isc-doc-type-select { flex: 1 1 100%; }
  .isc-upload-form .isc-doc-type-choice { flex: 1 1 100%; }
  .isc-receipt-items ul { columns: 1; }
}

.ai-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ai-pre { white-space: pre-wrap; margin: 0; line-height: 1.7; }
.ai-h3 { display: block; font-size: 14px; font-weight: 700; margin: 10px 0 6px; color: var(--color-navy); }
.ai-list { margin: 4px 0 8px; padding-left: 1.3em; }
.ai-list li { margin: 2px 0; line-height: 1.6; }
.ai-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.ai-card-head h2 { margin: 0; }
.ai-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 14px; }
.ai-inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 14px; }
.ai-inline-check { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ai-foot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

.ai-action-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; }
.ai-action-form .file-meta { margin: 0; }
.ai-btn { border-color: #7c6fd6; color: #4b3fb0; background: #f4f2fd; }
.ai-btn:hover:not([disabled]) { background: #e9e5fb; }
.ai-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.ai-bar { margin: 0 0 12px; }
.ai-off-note { flex: 1 1 100%; margin: 4px 0 0; font-size: 13px; color: var(--color-text-muted); }
.ai-off-note a { margin-left: 4px; }
form[aria-busy="true"] .ai-btn, form[aria-busy="true"] button { cursor: progress; }

.ai-notice { margin: 0 0 10px; padding: 8px 12px; border-left: 4px solid #7c6fd6; background: #f4f2fd; border-radius: var(--radius-sm); font-size: 13px; color: #3b3486; }
.ai-proposal { border: 1px solid #c9c2f2; background: #fcfbff; }
.ai-proposal-title { margin-top: 0; font-size: 16px; color: #3b3486; }
.ai-proposal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 20px; }
.ai-apply-form { display: grid; gap: 6px; margin: 8px 0 12px; }
.ai-apply-form textarea { width: 100%; min-height: 8em; }
.ai-apply-form .btn { justify-self: start; }
.ai-tasks-form { display: grid; gap: 8px; }
.ai-tasks-form .btn { justify-self: start; }
.ai-actions-table td { vertical-align: top; }
.ai-actions-table td:first-child { width: 3.5em; text-align: center; }
.ai-actions-table input[type="text"] { min-width: 12em; }
.ai-actions-table .file-meta { display: block; margin-top: 2px; }
.ai-summary-card { border-left: 4px solid #7c6fd6; }
.ai-summary-card h3 { margin-top: 0; }

.ai-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 20px; }
.ai-switches { display: grid; gap: 6px; margin: 4px 0 8px; }
.ai-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.ai-switch input { width: 18px; height: 18px; }
.ai-switch-label { font-weight: 600; min-width: 10em; }
.ai-switch .file-meta { margin: 0; }
.ai-switch.is-disabled { background: var(--color-surface-muted); color: var(--color-text-muted); }
.ai-price { width: 8em; display: inline-block; text-align: right; }
.ai-price-table td { white-space: nowrap; }
.ai-usage-table tfoot th, .ai-usage-table tfoot td { border-top: 2px solid var(--color-border-strong); font-weight: 700; }
.ai-usage-table .file-meta { display: block; font-weight: normal; }
.ai-data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 20px; margin: 8px 0; }
.ai-data-block { padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.ai-data-block .file-meta { margin: 6px 0 0; font-weight: 600; }

.ai-fieldset { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0 0 12px; min-width: 0; }
.ai-fieldset > legend { font-weight: 600; padding: 0 6px; }
.ai-choices { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ai-choice { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0; }
.ai-date-range, .ai-scope-pickers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; }
.ai-date-range label, .ai-scope-pickers label { display: inline-flex; align-items: center; gap: 6px; }
.ai-date-range .form-control, .ai-scope-pickers .form-control { width: auto; min-width: 10em; }
.ai-date-range .file-meta { margin: 0; }
.ai-digest-body .ai-section { margin-bottom: 12px; }
.ai-digest-body textarea { width: 100%; }
.ai-digest-table td { vertical-align: top; }

.isc-shared-ai a { margin-left: 4px; }

@media (max-width: 640px) {
  .ai-actions-table input[type="text"] { min-width: 0; width: 100%; }
  .ai-date-range .form-control, .ai-scope-pickers .form-control { width: 100%; }
  .ai-switch-label { min-width: 0; }
}

@media print {
  .ai-action-form, .ai-bar, .ai-proposal { display: none !important; }
}


.topbar-ai-btn {
  flex: 0 0 auto;
  margin: 0 -8px 0 4px;
  padding: 3px 10px;
  border: 1px solid #c9c2f2;
  border-radius: 999px;
  background: #f4f2fd;
  color: #4b3fb0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}
.topbar-ai-btn:hover { background: #e9e5fb; }
.topbar-ai-btn:focus-visible { outline: 2px solid #7c6fd6; outline-offset: 1px; }

.ai-ask-box { border: 1px solid #c9c2f2; background: #fcfbff; }
.ai-ask-form { display: grid; gap: 6px; }
.ai-ask-label { font-weight: 600; color: #3b3486; }
.ai-ask-input { width: 100%; min-height: 72px; resize: vertical; font-size: 15px; line-height: 1.6; }
.ai-ask-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ai-ask-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; }
.ai-ask-example { border-radius: 999px; }
.ai-ask-example[disabled] { opacity: 0.55; cursor: not-allowed; }
.ai-ask-off { border-left: 4px solid var(--color-warning); background: var(--color-warning-light); }
.ai-ask-off .ai-off-note { margin: 0; font-size: 14px; color: var(--color-text); }

.ai-ask-history { margin-top: 16px; }
.ai-ask-history-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ai-ask-history-head h2 { margin: 0; font-size: 18px; }
.ai-ask-item { display: grid; gap: 10px; }
.ai-ask-item.is-error { border-left: 4px solid var(--color-danger); }
.ai-ask-q,
.ai-ask-a { display: grid; grid-template-columns: 28px 1fr; gap: 4px 10px; align-items: start; }
.ai-ask-q p { margin: 2px 0 0; font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.ai-ask-q .file-meta { grid-column: 2; }
.ai-ask-q-mark,
.ai-ask-a-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
}
.ai-ask-q-mark { background: var(--color-primary-light); color: var(--color-primary-dark); }
.ai-ask-a-mark { background: #ece8fc; color: #4b3fb0; }
.ai-ask-answer { min-width: 0; line-height: 1.75; word-break: break-word; }
.ai-ask-answer p { margin: 0 0 8px; }
.ai-ask-h { margin: 10px 0 4px; font-size: 15px; color: #3b3486; }
.ai-ask-answer > .ai-ask-h:first-child { margin-top: 2px; }
.ai-ask-list { margin: 0 0 8px; padding-left: 1.4em; }
.ai-ask-list li { margin: 2px 0; }
.ai-ask-answer a { font-weight: 600; }

.ai-ask-sources { margin-left: 38px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--color-surface-muted); font-size: 13px; }
.ai-ask-sources-title { margin: 0 0 4px; font-weight: 600; color: var(--color-text-muted); }
.ai-ask-sources ul { margin: 0; padding-left: 1.2em; }
.ai-ask-sources li { margin: 2px 0; }
.ai-ask-sources a { margin-left: 6px; white-space: nowrap; }
.ai-ask-source-name { font-weight: 600; }
.ai-ask-meta { margin: 0 0 0 38px; font-size: 12px; color: var(--color-text-muted); }

@media (max-width: 768px) {
  .topbar-ai-btn { margin-right: -6px; }
  .ai-ask-sources,
  .ai-ask-meta { margin-left: 0; }
  .ai-ask-q,
  .ai-ask-a { grid-template-columns: 24px 1fr; }
  .ai-ask-q-mark,
  .ai-ask-a-mark { width: 24px; height: 24px; font-size: 12px; }
}

@media print {
  .ai-ask-box,
  .ai-ask-history-head form,
  .topbar-ai-btn { display: none; }
}


.ai-draft-off { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.ai-draft-off .ai-off-note { flex: 0 1 auto; margin: 0; }

.ai-draft-dialog { width: min(1000px, calc(100vw - 32px)); }
.ai-draft-dialog[open] { overflow: auto; }
.ai-draft-form { padding: 12px 16px 4px; }
.ai-draft-form textarea { width: 100%; }
.ai-draft-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 12px; }
.ai-draft-sent { margin: 6px 0 0; }
.ai-draft-status { margin: 4px 0 8px; min-height: 1.4em; font-size: 13px; color: #3b3486; }

.ai-draft-refs { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.ai-draft-refs legend { padding: 0 4px; font-weight: 600; font-size: .9rem; }
.ai-draft-search { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.ai-draft-search input { flex: 1 1 220px; min-width: 0; }
.ai-draft-reflist { max-height: 14em; overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.ai-draft-reflist:empty { display: none; }
.ai-draft-ref { display: grid; grid-template-columns: auto 8em 6.5em minmax(8em, 1fr) minmax(6em, 12em) 7.5em auto; align-items: center; gap: 2px 8px; padding: 4px 8px; border-bottom: 1px solid var(--color-border); font-size: 13px; cursor: pointer; }
.ai-draft-ref:last-child { border-bottom: 0; }
.ai-draft-ref:hover { background: #f4f2fd; }
.ai-draft-ref-no { font-weight: 600; font-variant-numeric: tabular-nums; }
.ai-draft-ref-date { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ai-draft-ref-subject, .ai-draft-ref-customer { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-draft-ref-amount { text-align: right; font-variant-numeric: tabular-nums; }

.ai-badge { display: inline-block; margin: 0 2px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--color-border); font-size: 11px; line-height: 1.6; white-space: nowrap; color: var(--color-text-muted); background: var(--color-surface); }
.ai-badge-won { border-color: #2e7d32; color: #1b5e20; background: #e8f5e9; }
.ai-badge-lost { border-color: #9e9e9e; color: #616161; background: #f5f5f5; }
.ai-badge-past { border-color: #1e6fb8; color: #0d4a80; background: #e7f1fb; }
.ai-badge-master { border-color: #2e7d32; color: #1b5e20; background: #e8f5e9; }
.ai-badge-ai { border-color: #7c6fd6; color: #3b3486; background: #f4f2fd; }
.ai-badge-check { border-color: #d97706; color: #92400e; background: #fff7e6; font-weight: 600; }

.ai-draft-result { padding: 4px 16px 16px; border-top: 1px solid var(--color-border); }
.ai-draft-result[hidden] { display: none; }
.ai-draft-warn p { margin: 2px 0; }
.ai-draft-table { font-size: 13px; }
.ai-draft-table td { vertical-align: top; }
.ai-draft-table td:first-child { width: 3em; text-align: center; }
.ai-draft-table [hidden] { display: none; }
.ai-draft-line.is-heading td { font-weight: 600; background: #f3f6f9; }
.ai-draft-line.is-comment td { color: var(--color-text-muted); }
.ai-draft-spec, .ai-draft-reason { display: block; margin-top: 2px; }
.ai-draft-table .cm-num .ai-badge { display: block; width: fit-content; margin: 2px 0 0 auto; }
.ai-draft-apply { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.ai-draft-result textarea { width: 100%; }

.bt-est-lines tr.bt-ai-row > td { background: #f8f6ff; }
.bt-est-lines tr.bt-ai-row.is-check > td { background: #fffaf0; }
.bt-ai-mark { display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 3px; font-size: 10px; font-weight: 700; line-height: 1.5; color: #fff; background: #7c6fd6; vertical-align: middle; cursor: help; }
.bt-ai-mark.is-check { background: #d97706; }
.ai-draft-applied { margin: 4px 0; padding: 4px 10px; border-left: 4px solid #7c6fd6; background: #f4f2fd; font-size: 13px; color: #3b3486; }

@media (max-width: 640px) {
  .ai-draft-ref { grid-template-columns: auto 1fr auto; }
  .ai-draft-ref-date, .ai-draft-ref-customer { grid-column: 2 / 3; }
  .ai-draft-ref-subject { grid-column: 2 / 4; }
}

@media screen {
  .dg-table.cm-projects-table td { padding-top: 5px; padding-bottom: 5px; line-height: 1.35; vertical-align: top; }
  .cm-projects-table .cm-cell-name .cm-name { font-weight: 700; }
  .cm-projects-table .cm-cell-name .cm-flags { display: inline-flex; margin: 0 0 0 8px; vertical-align: 1px; gap: 4px; }
  .cm-projects-table .cm-cell-name .cm-flag { font-size: 10.5px; padding: 0 5px; line-height: 1.5; }
  .cm-projects-table .cm-cell-meta { margin-top: 2px; font-size: 12px; line-height: 1.35; }
  .cm-projects-table .cm-cell-meta .dg-address { white-space: nowrap; }
  .cm-projects-table .cm-cell-period { margin-top: 2px; font-size: 12px; }
  .cm-projects-table .cm-cell-state .dg-state, .cm-projects-table .cm-cell-state .badge { padding: 1px 6px; font-size: 11.5px; }
  .cm-projects-table .cm-cell-cost .cm-cell-meter { margin-top: 2px; }
  .cm-projects-table .cm-cell-rate .cm-sub { margin-top: 1px; font-size: 11.5px; }
  .cm-projects-table .cm-cell-rate .cm-cell-memo { display: inline; margin: 0 6px 0 0; }
}
table.dg-sumboxes > thead th[scope] { background: var(--dg-head, #5b7bb0); color: #fff; }
@media screen {
  .sidebar .brand-block { position: relative; }
  .sidebar-open-btn {
    display: none; position: fixed; top: 8px; left: 8px; z-index: 50; width: 36px; height: 32px; padding: 0;
    border: 1px solid var(--color-border-strong); border-radius: 6px;
    background: var(--color-surface); color: var(--color-text); font-size: 18px; font-weight: 700; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  }
  .sidebar-open-btn:hover { background: var(--color-primary-light); border-color: var(--color-primary); color: var(--color-primary-dark); }
  .sidebar-open-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
}
@media screen and (min-width: 801px) {
  html.sidebar-collapsed .sidebar { display: none; }
  html.sidebar-collapsed .sidebar-open-btn:not([hidden]) { display: block; }
  html.sidebar-collapsed .main { padding-left: 52px; }
}
@media (max-width: 800px) {
  .sidebar-open-btn { display: none !important; }
}

.ms-table td { vertical-align: middle; }
.ms-kana { display: block; font-size: 11px; line-height: 1.2; color: var(--color-text-muted); letter-spacing: .02em; }
.ms-name { display: block; line-height: 1.35; }
.ms-code a { font-variant-numeric: tabular-nums; }
.ms-code .dg-state { margin-bottom: 2px; }
.ms-stamp { font-size: 12.5px; line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ms-sub { font-size: 12px; color: var(--color-text-muted); }
.ms-sub-line { display: block; font-size: 12.5px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.ms-online { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 2px; background: #343a40; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ms-tools { margin: 8px 0 4px; }
.ms-note { margin-top: 10px; }

.ms-contact > span { display: block; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ms-contact > span > span[aria-hidden] { display: inline-block; width: 1.3em; }

.ms-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ms-taxlabel { font-size: 12px; color: var(--color-text-muted); }

.ms-login-ok { display: inline-block; padding: 3px 10px; border-radius: 3px; background: var(--dg-green, #3fbf6a); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ms-login-none { display: inline-block; padding: 3px 10px; border-radius: 3px; border: 1px solid var(--color-border-strong); color: var(--color-text-muted); font-size: 12px; white-space: nowrap; }

.ms-preview { max-width: 28em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-muted); }
.ms-cc-body { min-height: 16em; font-family: inherit; line-height: 1.6; }
.ms-delete { margin-top: 12px; }

.bt-basic .ms-wide-left { flex: 1 1 100%; max-width: none; }

.ms-radios { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.ms-radios > legend { width: 100%; margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--color-text); }
.ms-radios .bl-check { margin: 0; }
.ms-radios > p { width: 100%; margin: 2px 0 0; }

.ms-types { margin-top: 12px; }
.ms-types textarea { max-width: 24em; }

.ms-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 10px; border-bottom: 2px solid var(--dg-rule, #3a78b5); }
.ms-tab { display: inline-block; padding: 7px 16px 6px; border: 1px solid var(--color-border); border-bottom: 0; border-radius: 4px 4px 0 0; background: var(--color-surface-muted, #f4f5f7); color: var(--color-text); font-size: 14px; }
.ms-tab:hover { text-decoration: none; background: var(--color-primary-light); }
.ms-tab.is-current { background: var(--dg-rule, #3a78b5); border-color: var(--dg-rule, #3a78b5); color: #fff; font-weight: 700; }
.ms-tab.is-disabled { color: var(--color-text-muted); opacity: .6; cursor: not-allowed; }
.ms-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ms-upload input[type="file"] { flex: 1 1 320px; max-width: 640px; }
.ms-template { display: inline-flex; margin-top: 10px; }
.ms-guide { margin: 0; padding-left: 1.4em; line-height: 1.8; }
.ms-required { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 3px; background: var(--dg-red, #e53935); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.6; vertical-align: 1px; }
.ms-col-note { display: block; margin-left: 1.2em; color: var(--color-text-muted); font-size: 12.5px; line-height: 1.5; }
.ms-preview-table td { vertical-align: top; }
.ms-err { color: var(--dg-red, #e53935); font-size: 13px; line-height: 1.5; }
.ms-warn { color: #8a6d00; font-size: 13px; line-height: 1.5; }
.ms-pv-error td { background: #fff1f1; }

.mx-master-fields { margin-top: 4px; }
.mx-master-form { display: flex; flex-wrap: wrap; gap: 4px; }
.mx-master-form .form-control { width: 9em; min-width: 0; }
.mx-master-form .form-control[name="note"] { width: 14em; }

@media (max-width: 720px) {
  .ms-stamp { white-space: normal; }
  .ms-contact > span { white-space: normal; }
  .ms-preview { max-width: 12em; }
  .ms-upload input[type="file"] { flex-basis: 100%; }
}


.ci-seal-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.ci-seal-slot { border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 12px; background: var(--color-surface); }
.ci-seal-current { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; }
.ci-seal-thumb { width: 96px; height: 96px; object-fit: contain; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 6px; }
.ci-seal-empty { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; margin: 6px 0 10px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-sm); color: var(--color-text-muted); font-size: 12px; background: var(--color-surface-muted); }
.ci-notify-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }

.bl-issuer-view { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 20px; margin: 8px 0 12px; }
.bl-issuer-view > div { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.bl-issuer-view dt { font-size: 12px; color: var(--color-text-muted); }
.bl-issuer-view dd { margin: 2px 0 0; font-size: 14px; word-break: break-all; }

.ps-assign { margin-top: 16px; }
.ps-notice { border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); padding: 10px 16px; margin: 10px 0 14px; }
.ps-notice h3 { margin: 0 0 6px; font-size: 16px; }
.ps-notice h3 span { color: var(--color-warning); }
.ps-notice ul { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.8; }
.ps-warn { color: var(--color-danger); }
.ps-actions { margin: 8px 0; }
.ps-table { border-collapse: collapse; min-width: 720px; width: auto; font-size: 13px; }
.ps-table th,
.ps-table td { border: 1px solid var(--color-border); padding: 4px 10px; vertical-align: middle; }
.ps-table thead th { background: var(--color-surface-muted); text-align: center; font-weight: 700; }
.ps-emp-head { min-width: 220px; }
.ps-plan-head { min-width: 150px; }
.ps-plan-head span { display: block; }
.ps-plan-name { font-size: 15px; }
.ps-plan-role { font-size: 11px; color: var(--color-text-muted); font-weight: 400; }
.ps-plan-limit { font-size: 11px; font-weight: 700; border-top: 1px solid var(--color-border); margin-top: 4px; padding-top: 2px; }
.ps-plan-count { font-size: 11px; color: var(--color-text-muted); font-weight: 400; }
.ps-emp { text-align: left; font-weight: 400; background: var(--color-surface); }
.ps-emp span { display: block; }
.ps-emp-code { color: var(--color-primary); }
.ps-emp-kana { font-size: 10px; color: var(--color-text-muted); }
.ps-emp-dept { display: inline !important; color: var(--color-text-muted); }
.ps-login-cell { text-align: center; }
.ps-login { display: inline-block; padding: 6px 12px; border-radius: var(--radius-btn); background: var(--color-surface-muted); color: var(--color-text-muted); font-size: 12px; }
.ps-login-on { background: var(--color-success); color: #fff; }
.ps-cell { text-align: center; }
.ps-check { display: inline-flex; position: relative; cursor: pointer; }
.ps-check input { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.ps-check-box { display: inline-block; width: 44px; height: 44px; border: 2px solid var(--color-border-strong); border-radius: 3px; background: #fff; position: relative; }
.ps-check input:checked + .ps-check-box { background: var(--color-primary); border-color: var(--color-primary); }
.ps-check input:checked + .ps-check-box::after { content: ''; position: absolute; left: 14px; top: 5px; width: 11px; height: 22px; border: solid #fff; border-width: 0 5px 5px 0; transform: rotate(45deg); }
.ps-check input:focus-visible + .ps-check-box { outline: 3px solid var(--color-primary-light); outline-offset: 2px; }
.ps-check input:disabled + .ps-check-box { opacity: 0.55; cursor: not-allowed; }
.ps-top-note { display: block; font-size: 10px; color: var(--color-text-muted); }
.ps-cell-derived { background: var(--color-surface-muted); }
.ps-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 3px; border: 1px dashed var(--color-border-strong); color: var(--color-text-muted); font-size: 18px; }
.ps-mark.is-on { border-style: solid; color: var(--color-primary); }
.ps-limits { margin-top: 14px; }
.ps-limits summary { cursor: pointer; font-weight: 700; }
.ps-limits-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; margin-top: 10px; }
.ps-limits-form .mz-muted { flex-basis: 100%; margin: 0; }
.ps-limit-input { width: 8em; }

.ol-range { flex-basis: 100%; }
.ol-range-inputs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ol-range-inputs .form-control { width: auto; min-width: 11em; }
.ol-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ol-preset { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.ol-preset:hover { background: var(--color-success-dark); color: #fff; }
.ol-preset.is-active { box-shadow: 0 0 0 3px var(--color-success-light); }

.ss-wrap { border: 1px solid var(--color-border-strong); border-radius: var(--radius); background: var(--color-surface); padding: 0 16px 16px; }
.ss-tabs { display: flex; margin: 0 -16px 16px; border-bottom: 1px solid var(--color-border-strong); }
.ss-tab { flex: 1; padding: 8px 16px; font-weight: 700; color: #fff; background: #808080; text-decoration: none; }
.ss-tab:first-child { border-top-left-radius: var(--radius); }
.ss-tab:last-child { border-top-right-radius: var(--radius); }
.ss-tab.is-active { background: var(--color-surface); color: var(--color-text-muted); }
.ss-tab:hover { text-decoration: none; filter: brightness(1.05); }
.ss-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.ss-panel { margin: 0; }
.ss-panel h2 { margin: 0 0 10px; font-size: 18px; }
.ss-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--color-border); margin-bottom: 10px; }
.ss-panel-head h2 { font-size: 24px; }
.ss-table { width: 100%; border-collapse: collapse; }
.ss-table th,
.ss-table td { border: 1px solid var(--color-border); padding: 6px 10px; text-align: left; font-weight: 400; }
.ss-table .ss-note { display: block; }
.ss-switch-cell { width: 110px; text-align: center !important; }
.ss-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.ss-switch input { position: absolute; opacity: 0; width: 40px; height: 22px; margin: 0; cursor: pointer; }
.ss-switch-track { display: inline-block; width: 40px; height: 22px; border-radius: 11px; background: #fff; border: 1px solid var(--color-border-strong); position: relative; transition: background 0.15s; }
.ss-switch-thumb { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--color-border-strong); transition: left 0.15s, background 0.15s; }
.ss-switch input:checked + .ss-switch-track { background: var(--color-primary); border-color: var(--color-primary); }
.ss-switch input:checked + .ss-switch-track .ss-switch-thumb { left: 21px; background: #fff; }
.ss-switch input:focus-visible + .ss-switch-track { outline: 3px solid var(--color-primary-light); outline-offset: 2px; }
.ss-note { font-size: 12px; color: var(--color-text-muted); }
.ss-note-warn { color: var(--color-warning-dark); }
.ss-note-pending { color: var(--color-text-muted); font-style: normal; }
.ss-off-note { margin: 0 0 8px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--color-warning-light); font-size: 13px; }
.ss-help ul { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.8; }
.ss-warn { color: var(--color-danger); }
.ss-actions { margin-top: 16px; }
.ss-lead { margin: 0 0 12px; font-size: 13px; color: var(--color-text-muted); }
.ss-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.ss-input-short { width: 6em; display: inline-block; }

@media (max-width: 640px) {
  .ss-tabs { flex-direction: column; }
  .ss-tab:first-child,
  .ss-tab:last-child { border-radius: 0; }
  .ps-check input,
  .ps-check-box { width: 36px; height: 36px; }
  .ps-check input:checked + .ps-check-box::after { left: 11px; top: 3px; width: 9px; height: 19px; border-width: 0 4px 4px 0; }
}

@media print {
  .ol-presets,
  .ps-actions,
  .ps-limits { display: none; }
}

.wk-grid { border: 1px solid var(--color-border); border-radius: 10px; overflow-x: auto; overflow-y: hidden; background: var(--color-surface); }
.wk-row { display: grid; grid-template-columns: repeat(7, minmax(96px, 1fr)); }
.wk-head { background: var(--color-surface-muted, #f4f6f9); border-bottom: 1px solid var(--color-border); }
.wk-day { display: flex; align-items: baseline; justify-content: center; gap: 4px; padding: 8px 4px; font-size: 13px; color: var(--color-text); border-left: 1px solid var(--color-border); }
.wk-day:first-child, .wk-cell:first-child { border-left: 0; }
.wk-md { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.wk-dow { color: var(--color-text-muted); font-size: 12px; }
.wk-day.is-sat .wk-md, .wk-day.is-sat .wk-dow { color: #14539e; }
.wk-day.is-sun .wk-md, .wk-day.is-sun .wk-dow { color: var(--color-danger-dark, #b3123a); }
.wk-day.is-sat { background: #eef5fd; }
.wk-day.is-sun { background: #fdf0f2; }
.wk-day.is-today { background: var(--color-primary); }
.wk-day.is-today .wk-md, .wk-day.is-today .wk-dow { color: #fff; }
.wk-today-badge { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--color-primary); font-size: 11px; font-weight: 700; line-height: 1.6; }
.wk-cell { display: flex; flex-direction: column; gap: 4px; min-height: 104px; padding: 6px; border-left: 1px solid var(--color-border); }
.wk-cell.is-sat { background: #f7fbff; }
.wk-cell.is-sun { background: #fff8f9; }
.wk-cell.is-today { background: var(--color-primary-light); box-shadow: inset 0 0 0 2px var(--color-primary); }
.wk-chip { display: flex; gap: 6px; align-items: baseline; padding: 3px 6px; border-radius: 6px; border-left: 3px solid var(--color-primary); background: var(--color-surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); color: var(--color-text); font-size: 12px; line-height: 1.35; text-decoration: none; min-width: 0; }
.wk-chip:hover { background: var(--color-primary-light); text-decoration: none; }
.wk-time { flex: 0 0 auto; font-weight: 700; color: var(--color-primary); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.wk-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wk-more { font-size: 11.5px; color: var(--color-primary); padding-left: 4px; }
@media (max-width: 800px) {
  .ws-grid { overflow-x: auto; }
  .ws-row { grid-template-columns: repeat(7, minmax(96px, 1fr)); min-width: 672px; }
}
.icon-toolbar { --itb-tile-bg: #dce7f8; --itb-tile-line: #b7cbee; }
.icon-toolbar.itb-tone-teal { --itb-tile-bg: #d6f1ea; --itb-tile-line: #a9dccd; }
.icon-toolbar.itb-tone-green { --itb-tile-bg: #d9f2e3; --itb-tile-line: #ade0c1; }
.icon-toolbar.itb-tone-orange { --itb-tile-bg: #ffe6cf; --itb-tile-line: #f6c595; }
.icon-toolbar.itb-tone-purple { --itb-tile-bg: #e9e2ff; --itb-tile-line: #cbbcf6; }
.icon-toolbar.itb-tone-indigo { --itb-tile-bg: #e1e5fb; --itb-tile-line: #bcc4f0; }
.icon-toolbar.itb-tone-amber { --itb-tile-bg: #fff0c9; --itb-tile-line: #f0d68a; }
.icon-toolbar.itb-tone-red { --itb-tile-bg: #ffdfe4; --itb-tile-line: #f6b5c0; }
.icon-toolbar.itb-tone-gray { --itb-tile-bg: #e9edf2; --itb-tile-line: #cdd4dd; }

:root nav.sales-subnav.icon-toolbar {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; overflow: visible; padding: 6px; margin: -4px 0 12px;
  border: 1px solid var(--color-border); border-radius: 10px;
  background: linear-gradient(180deg, var(--color-surface, #fff) 0%, var(--color-surface-muted, #f1f4f8) 100%);
}
:root nav.sales-subnav.icon-toolbar a:not([role]),
:root nav.sales-subnav.icon-toolbar .itb-dd > summary {
  position: relative; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px;
  flex: 0 0 auto; min-width: 84px; max-width: 112px; min-height: 62px; padding: 6px 6px 5px; margin: 0;
  border: 1px solid var(--color-border); border-radius: 8px;
  background: linear-gradient(180deg, var(--color-surface, #fff) 0%, var(--color-surface-muted, #eef2f7) 100%);
  color: var(--color-text); font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; white-space: normal;
  text-decoration: none; list-style: none; cursor: pointer; box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
:root nav.sales-subnav.icon-toolbar .itb-dd > summary::-webkit-details-marker { display: none; }
:root nav.sales-subnav.icon-toolbar a:not([role]):hover,
:root nav.sales-subnav.icon-toolbar .itb-dd > summary:hover,
:root nav.sales-subnav.icon-toolbar .itb-dd[open] > summary {
  transform: translateY(-1px); border-color: var(--color-primary); color: var(--color-text); text-decoration: none;
  background: linear-gradient(180deg, var(--color-surface, #fff) 0%, var(--color-primary-light) 100%); box-shadow: 0 3px 8px rgba(15, 23, 42, .14);
}
:root nav.sales-subnav.icon-toolbar a:not([role]).active,
:root nav.sales-subnav.icon-toolbar .itb-dd > summary.active {
  transform: none; border-color: var(--color-primary); color: var(--color-primary-dark, #1d4f91); font-weight: 700;
  background: var(--color-primary-light);
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, .15), inset 0 -3px 0 var(--color-primary);
}
:root nav.sales-subnav.icon-toolbar a:not([role]):focus-visible,
:root nav.sales-subnav.icon-toolbar .itb-dd > summary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.icon-toolbar .itb-ico { display: flex; align-items: center; justify-content: center; flex: 0 0 30px; width: 30px; height: 30px; }
.icon-toolbar .itb-ico > svg { display: block; width: 30px; height: 30px; }
.icon-toolbar .itb-tile {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--itb-tile-bg); box-shadow: inset 0 0 0 1px var(--itb-tile-line);
}
.icon-toolbar .itb-emoji { font-size: 18px; line-height: 1; }
.icon-toolbar .itb-label {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 100%;
  overflow-wrap: anywhere; white-space: normal;
}
.icon-toolbar .itb-caret { margin-left: 2px; font-size: 10px; opacity: .7; }
.icon-toolbar .itb-badges { position: absolute; top: -7px; right: -6px; z-index: 1; display: flex; gap: 2px; }
.icon-toolbar .itb-badges .dg-nav-badge { margin-left: 0; box-shadow: 0 0 0 2px var(--color-surface, #fff); }
.icon-toolbar .itb-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--color-danger); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; box-shadow: 0 0 0 2px var(--color-surface, #fff);
}
:root nav.sales-subnav.icon-toolbar .module-subnav-divider { align-self: stretch; flex: 0 0 1px; height: auto; margin: 6px 2px; }
.icon-toolbar .dg-subnav-label { align-self: center; }
.icon-toolbar > .itb-seg { display: flex; flex: 0 0 auto; align-items: stretch; gap: 6px; }
.icon-toolbar .itb-dd { position: relative; flex: 0 0 auto; display: flex; }
:root nav.sales-subnav.icon-toolbar .itb-dd > .module-subnav-more-list { top: calc(100% + 4px); left: 0; right: auto; z-index: 80; }
:root nav.sales-subnav.icon-toolbar .itb-dd-end > .module-subnav-more-list,
:root nav.sales-subnav.icon-toolbar .itb-dd > .module-subnav-more-list.itb-dd-flip { left: auto; right: 0; }
:root nav.sales-subnav.icon-toolbar .module-subnav-more-list a {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 0; border: 0; border-radius: var(--radius-sm, 6px);
  background: none; color: var(--color-text); font-size: 13.5px; font-weight: 400; white-space: nowrap; box-shadow: none;
}
:root nav.sales-subnav.icon-toolbar .module-subnav-more-list a:hover { background: var(--color-primary-light); color: var(--color-primary-dark); text-decoration: none; }
:root nav.sales-subnav.icon-toolbar .module-subnav-more-list a.active { background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 700; }
:root nav.sales-subnav.icon-toolbar .module-subnav-more-list a.module-subnav-more-home {
  margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--color-border); border-radius: 0; color: var(--color-primary); font-size: 12.5px;
}
.icon-toolbar .itb-mini { display: flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; height: 22px; }
.icon-toolbar .itb-mini svg { display: block; width: 22px; height: 22px; }
.icon-toolbar .itb-mini .itb-tile { width: 22px; height: 22px; border-radius: 6px; }
.icon-toolbar .itb-mini .itb-emoji { font-size: 14px; }

:root[data-ui-theme] nav.sales-subnav.icon-toolbar { background: var(--color-surface-muted); border-radius: var(--radius, 8px); }
:root[data-ui-theme] nav.sales-subnav.icon-toolbar a:not([role]),
:root[data-ui-theme] nav.sales-subnav.icon-toolbar .itb-dd > summary { background: var(--color-surface); border-radius: var(--radius-sm, 6px); box-shadow: none; transform: none; }
:root[data-ui-theme] nav.sales-subnav.icon-toolbar a:not([role]):hover,
:root[data-ui-theme] nav.sales-subnav.icon-toolbar .itb-dd > summary:hover,
:root[data-ui-theme] nav.sales-subnav.icon-toolbar .itb-dd[open] > summary { background: var(--color-primary-light); box-shadow: none; transform: none; }
:root[data-ui-theme] nav.sales-subnav.icon-toolbar a:not([role]).active,
:root[data-ui-theme] nav.sales-subnav.icon-toolbar .itb-dd > summary.active {
  background: var(--color-primary-light); border-color: var(--color-primary); color: var(--color-primary-dark); box-shadow: inset 0 -3px 0 var(--color-primary);
}
:root[data-ui-theme="ledger"] nav.sales-subnav.icon-toolbar a:not([role]).active,
:root[data-ui-theme="ledger"] nav.sales-subnav.icon-toolbar .itb-dd > summary.active { box-shadow: inset 0 -3px 0 var(--color-accent); }
:root[data-ui-theme="site"] nav.sales-subnav.icon-toolbar a:not([role]),
:root[data-ui-theme="site"] nav.sales-subnav.icon-toolbar .itb-dd > summary { border: 2px solid #1b1b19; color: #1b1b19; font-weight: 700; }
:root[data-ui-theme="site"] nav.sales-subnav.icon-toolbar a:not([role]).active,
:root[data-ui-theme="site"] nav.sales-subnav.icon-toolbar .itb-dd > summary.active { background: #1b1b19; color: #f2c200; box-shadow: inset 0 -4px 0 #f2c200; }
:root[data-ui-theme="night"] .icon-toolbar .itb-tile { background: rgba(255, 255, 255, .08); }

@media (max-width: 800px) {
  :root nav.sales-subnav.icon-toolbar { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding: 5px; gap: 5px; }
  :root nav.sales-subnav.icon-toolbar a:not([role]),
  :root nav.sales-subnav.icon-toolbar .itb-dd > summary { min-width: 70px; max-width: 92px; min-height: 56px; padding: 5px 4px 4px; font-size: 11px; }
  :root nav.sales-subnav.icon-toolbar a:not([role]):hover,
  :root nav.sales-subnav.icon-toolbar .itb-dd > summary:hover,
  :root nav.sales-subnav.icon-toolbar .itb-dd[open] > summary { transform: none; }
  .icon-toolbar .itb-badges { top: 2px; right: 2px; }
  :root nav.sales-subnav.icon-toolbar .itb-dd > .module-subnav-more-list,
  :root nav.sales-subnav.icon-toolbar .itb-dd > .module-subnav-more-list.itb-dd-flip {
    position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; z-index: 1000; min-width: 0; max-width: none; max-height: 60vh;
    box-shadow: 0 -6px 28px rgba(15, 23, 42, .28);
  }
}
@media print { :root nav.sales-subnav.icon-toolbar { display: none; } }

.wk-day-link { display: inline-flex; align-items: baseline; gap: 4px; color: inherit; text-decoration: none; border-radius: 4px; padding: 0 4px; }
.wk-day-link:hover { text-decoration: underline; background: rgba(255, 255, 255, .5); }
.wk-cell { position: relative; }
.wk-add { position: absolute; top: 3px; right: 4px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--color-primary); background: var(--color-surface); border: 1px solid var(--color-border); text-decoration: none; opacity: .45; }
.wk-cell:hover .wk-add, .wk-add:focus-visible { opacity: 1; }
@media (hover: none) { .wk-add { opacity: 1; } }
.wk-add:hover { background: var(--color-primary); color: #fff; text-decoration: none; }
.wk-cell .wk-chip:first-of-type { margin-right: 22px; }
.calendar-cell .date-add-link { display: inline-block; color: inherit; text-decoration: none; border-radius: 4px; padding: 0 3px; }
.calendar-cell .date-add-link:hover { background: var(--color-primary-light); text-decoration: underline; }
.sitm-table th.sitm-flag { width: 116px; text-align: center; font-size: 12.5px; line-height: 1.3; }
.sitm-table th.sitm-flag .sitm-flag-note { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: var(--color-text-muted, #667); }
.sitm-table th.sitm-name { text-align: left; font-weight: 700; max-width: 300px; }
.sitm-table th.sitm-name .sitm-source { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 400; color: var(--color-text-muted, #667); }
.sitm-table tr.sitm-group th { background: var(--color-surface-muted, #eef2f7); font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; text-align: left; padding: 5px 8px; }
.sitm-table td.sb-center input[type="checkbox"] { width: 18px; height: 18px; }
@media (max-width: 800px) {
  .sitm-table th.sitm-flag { width: auto; font-size: 12px; }
  .sitm-table th.sitm-flag .sitm-flag-note { display: none; }
}

@media (min-width: 801px) {
  .dg-action-row > .dg-preview-card { order: -1; }
}

.vh-due { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.vh-due-expired { background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.vh-due-warn { background: var(--color-warning-light, #fef3e2); color: #a35b00; }
.vh-due-soon { background: var(--color-surface-muted, #eef2f7); color: var(--color-text-muted, #56607a); }
.vh-due-days { display: block; font-size: 11px; color: var(--color-text-muted, #667); }
.vh-kind { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 11.5px; font-weight: 700; }
.vh-kind-vehicle { background: #e4edfb; color: #1f4e8c; }
.vh-kind-heavy { background: #fdf0d9; color: #8a5a00; }
.vh-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.vh-plate { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.vh-retired td { opacity: 0.6; }
.vh-table td { vertical-align: top; }
.vh-dues { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.vh-due-item { padding: 5px 10px; border: 1px solid var(--color-border, #dde1e6); border-radius: 8px; font-size: 12.5px; background: var(--color-surface, #fff); }
.vh-due-item.vh-due-expired { border-color: var(--color-danger, #c0392b); }
.vh-due-item.vh-due-warn { border-color: #d79a3a; }

.ac-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.ac-badge-ok { background: var(--color-success-light, #e3f4e8); color: #1d6b37; }
.ac-badge-ng { background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.ac-badge-part { background: var(--color-warning-light, #fef3e2); color: #a35b00; }
.ac-timing { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 11.5px; font-weight: 700; }
.ac-timing-before { background: #e4edfb; color: #1f4e8c; }
.ac-timing-after { background: #efe7f7; color: #5b3b86; }
.ac-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.ac-val { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.ac-over { display: block; font-size: 11.5px; font-weight: 700; color: var(--color-danger, #c0392b); }
.ac-none { color: var(--color-text-muted, #889); font-size: 12px; }
.ac-row-ng td { background: var(--color-danger-light, #fde3ea); }
.ac-table td { vertical-align: top; }
.ac-dateform { align-items: center; gap: 8px; }
.ac-dateform input[type="date"] { max-width: 180px; }

.dv-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.dv-ng { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.dv-row-ng td { background: var(--color-warning-light, #fef3e2); }
.dv-table td { vertical-align: top; }
.dv-calc { display: inline-block; padding: 6px 10px; border-radius: 8px; background: var(--color-surface-muted, #eef2f7); font-size: 13px; }
.dv-dateform { align-items: center; gap: 8px; }
.dv-dateform input[type="date"] { max-width: 180px; }
.dv-report a { font-weight: 700; }

.fu-full { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 700; background: #e4edfb; color: #1f4e8c; }
.fu-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.fu-table td { vertical-align: top; }
.fu-dateform { align-items: center; gap: 8px; }
.fu-dateform input[type="date"] { max-width: 180px; }
.fu-eff b { font-size: 15px; }

.mt-type { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; background: var(--color-surface-muted, #eef2f7); color: var(--color-text, #223); white-space: nowrap; }
.mt-type-inspection { background: #e4edfb; color: #1f4e8c; }
.mt-type-periodic, .mt-type-specific, .mt-type-selfCheck { background: #e3f4e8; color: #1d6b37; }
.mt-type-repair { background: #fdf0d9; color: #8a5a00; }
.mt-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.mt-sync { display: block; font-size: 11px; font-weight: 700; color: #1d6b37; }
.mt-table td { vertical-align: top; }
.mt-dateform { align-items: center; gap: 8px; }
.mt-dateform input[type="date"] { max-width: 180px; }

.vi-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.vi-badge-ok { background: var(--color-success-light, #e3f4e8); color: #1d6b37; }
.vi-badge-ng { background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.vi-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.vi-none { color: var(--color-text-muted, #889); font-size: 12px; }
.vi-row-ng td { background: var(--color-danger-light, #fde3ea); }
.vi-table td { vertical-align: top; }
.vi-check-table th.vi-item { text-align: left; font-weight: 600; width: 36%; }
.vi-choices { white-space: nowrap; }
.vi-choice { display: inline-flex; align-items: center; gap: 3px; margin-right: 10px; font-size: 12.5px; }
.vi-choice-ng { color: var(--color-danger, #c0392b); font-weight: 700; }
.vi-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.vi-rank li { display: flex; align-items: baseline; gap: 6px; padding: 4px 10px; border: 1px solid var(--color-border, #dde1e6); border-radius: 999px; font-size: 12.5px; }
.vi-rank-count { font-weight: 700; color: var(--color-danger, #c0392b); }
.vi-dateform { align-items: center; gap: 8px; }
.vi-dateform input[type="date"] { max-width: 180px; }

.vcst-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); font-weight: 400; }
.vcst-table td { vertical-align: top; }
.vcst-total { font-weight: 700; }
.vcst-rate b { font-size: 14px; color: var(--color-primary-dark, #123b82); }
.vcst-foot td { background: var(--color-surface-muted, #eef2f7); font-weight: 700; }
.vcst-form { align-items: center; gap: 8px; flex-wrap: wrap; }
.vcst-form input[type="date"] { max-width: 180px; }
.vcst-form select { max-width: 240px; }
.vcst-label { margin-left: 8px; }

.rv-grid th.rv-veh-col { width: 130px; }
.rv-grid th.rv-day { text-align: center; font-size: 12.5px; }
.rv-grid th.rv-day .rv-dow { display: block; font-size: 11px; font-weight: 400; }
.rv-grid th.rv-dow-0 { color: #c0392b; }
.rv-grid th.rv-dow-6 { color: #1f4e8c; }
.rv-grid th.rv-today { background: var(--color-primary-light, #e4edfb); }
.rv-grid th.rv-veh { text-align: left; font-size: 12.5px; vertical-align: top; }
.rv-grid td.rv-cell { vertical-align: top; min-width: 84px; padding: 3px; position: relative; }
.rv-grid td.rv-busy { background: var(--color-surface-muted, #eef2f7); }
.rv-chip { display: block; margin-bottom: 2px; padding: 2px 5px; border-radius: 5px; background: #e4edfb; color: #1f4e8c; font-size: 11.5px; text-decoration: none; }
.rv-chip:hover { background: #d3e2f7; text-decoration: none; }
.rv-chip-time { font-weight: 700; margin-right: 3px; }
.rv-chip-who { white-space: nowrap; }
.rv-add { display: inline-block; padding: 0 4px; color: var(--color-text-muted, #889); font-size: 12px; text-decoration: none; }
.rv-add:hover { color: var(--color-primary, #1f4e8c); }
.rv-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); font-weight: 400; }
.rv-status { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.rv-status-reserved { background: #e4edfb; color: #1f4e8c; }
.rv-status-done { background: var(--color-success-light, #e3f4e8); color: #1d6b37; }
.rv-status-cancelled { background: var(--color-surface-muted, #eef2f7); color: var(--color-text-muted, #667); }
.rv-row-off td { opacity: 0.6; }
.rv-weeknav { align-items: center; gap: 8px; }
.rv-table td { vertical-align: top; }

.ic-type { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--color-surface-muted, #eef2f7); }
.ic-type-accident { background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.ic-type-selfDamage { background: var(--color-warning-light, #fef3e2); color: #a35b00; }
.ic-type-violation { background: #efe7f7; color: #5b3b86; }
.ic-type-nearMiss { background: #e4edfb; color: #1f4e8c; }
.ic-injury { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.ic-safety { display: block; font-size: 11px; color: #1d6b37; font-weight: 700; }
.ic-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.ic-row-acc td { background: rgba(253, 227, 234, 0.45); }
.ic-table td { vertical-align: top; }
.ic-privacy { border-left: 4px solid var(--color-warning, #d79a3a); }
.ic-dateform { align-items: center; gap: 8px; }
.ic-dateform input[type="date"] { max-width: 180px; }

.lic-due { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.lic-due-expired { background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.lic-due-warn { background: var(--color-warning-light, #fef3e2); color: #a35b00; }
.lic-due-soon { background: #e4edfb; color: #1f4e8c; }
.lic-days { display: inline-block; margin-left: 5px; font-size: 11px; color: var(--color-text-muted, #667); white-space: nowrap; }
.lic-ok { font-size: 11.5px; color: #1d6b37; font-weight: 700; }
.lic-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.lic-add { font-size: 11.5px; }
.lic-table td { vertical-align: top; }
.lic-row-ng td { background: rgba(253, 227, 234, 0.45); }
.lic-quals { margin: 0; padding-left: 1.1em; }
.lic-quals li { margin: 0 0 3px; font-size: 12.5px; }
.lic-q-vehicle { font-weight: 700; }
.lic-q-date { display: block; font-size: 11.5px; font-weight: 400; color: var(--color-text-muted, #667); }
.lic-privacy { border-left: 4px solid var(--color-info, #3a7bd5); }
.lic-class { margin-right: 10px; }

.vjn-kind { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.vjn-kind-fuel { background: #e4edfb; color: #1f4e8c; }
.vjn-kind-maintenance { background: var(--color-warning-light, #fef3e2); color: #a35b00; }
.vjn-acc { font-size: 12.5px; white-space: nowrap; }
.vjn-acc-none { font-size: 12px; color: var(--color-danger, #c0392b); font-weight: 700; }
.vjn-row-ng td { background: rgba(253, 227, 234, 0.35); }
.vjn-table td { vertical-align: top; }
.vjn-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.vjn-table td:nth-child(2), .vjn-table td:nth-child(3) { white-space: nowrap; }

.cn-due { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.cn-due-over { background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.cn-due-warn { background: var(--color-warning-light, #fef3e2); color: #a35b00; }
.cn-due-soon { background: #e4edfb; color: #1f4e8c; }
.cn-ok { font-size: 11.5px; color: #1d6b37; font-weight: 700; }
.cn-unknown { font-size: 11.5px; color: var(--color-text-muted, #667); }
.cn-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.cn-row-ng td { background: rgba(253, 227, 234, 0.45); }
.cn-table td { vertical-align: top; }
.cn-table td:nth-child(2), .cn-table td:nth-child(4) { white-space: nowrap; }
.cn-meter { margin-left: 10px; font-size: 12px; font-weight: 400; color: var(--color-text-muted, #667); }
.cn-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.cn-input { max-width: 110px; text-align: right; }
.cn-settings td { vertical-align: middle; }
.mt-part { margin-right: 10px; }

.td-head { border-top: 4px solid var(--color-primary, #2f6fb3); }
.td-head-ng { border-top-color: var(--color-danger, #c0392b); }
.td-date { margin: 0 0 4px; font-size: 13px; color: var(--color-text-muted, #667); font-weight: 700; }
.td-headline { margin: 0 0 6px; font-size: 18px; font-weight: 800; line-height: 1.4; }
.td-progress { margin: 0 0 8px; font-size: 12.5px; color: var(--color-text-muted, #667); }
.td-vehicle { margin: 0; font-size: 14px; }
.td-vehicle-label { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; background: var(--color-surface-muted, #eef2f7); }
.td-vehicle-none { font-size: 12.5px; color: var(--color-text-muted, #667); }
.td-sub { margin-left: 8px; font-size: 11.5px; color: var(--color-text-muted, #667); font-weight: 400; }
.td-resv { margin: 6px 0 0; font-size: 12.5px; }
.td-resv-item { display: inline-block; margin-right: 10px; }
.td-steps { list-style: none; margin: 0; padding: 0; }
.td-step { margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--color-border, #dde3ea); border-left: 5px solid var(--color-border, #dde3ea); border-radius: 8px; background: var(--color-surface, #fff); }
.td-step.is-next { border-left-color: var(--color-primary, #2f6fb3); box-shadow: 0 1px 6px rgba(47, 111, 179, 0.15); }
.td-step.is-done { border-left-color: #1d6b37; }
.td-step.is-ng { border-left-color: var(--color-danger, #c0392b); background: rgba(253, 227, 234, 0.35); }
.td-step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.td-no { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--color-surface-muted, #eef2f7); font-size: 12px; font-weight: 800; }
.td-step-title { margin: 0; font-size: 16px; font-weight: 800; }
.td-state { padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.td-state-done { background: #e3f3e8; color: #1d6b37; }
.td-state-todo { background: #e4edfb; color: #1f4e8c; }
.td-state-any { background: var(--color-surface-muted, #eef2f7); color: var(--color-text-muted, #667); }
.td-state-ng { background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.td-step-lead { margin: 6px 0 0; font-size: 12.5px; color: var(--color-text-muted, #667); }
.td-step-meta { margin: 4px 0 0; font-size: 12px; font-weight: 700; }
.td-step-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.td-btn { min-width: 160px; text-align: center; }
@media (max-width: 640px) {
  .td-step { padding: 12px; }
  .td-step-actions { flex-direction: column; }
  .td-btn, .td-btn-sub { width: 100%; min-width: 0; padding-top: 12px; padding-bottom: 12px; font-size: 15px; }
  .td-headline { font-size: 17px; }
}

.vp-list { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0 0 12px; padding: 0; }
.vp-item { width: 180px; }
.vp-link { display: block; }
.vp-img { width: 180px; height: 135px; object-fit: cover; border: 1px solid var(--color-border, #dde3ea); border-radius: 6px; background: var(--color-surface-muted, #eef2f7); }
.vp-cap { margin: 4px 0 0; font-size: 12.5px; font-weight: 700; word-break: break-all; }
.vp-meta { margin: 2px 0 0; font-size: 11.5px; color: var(--color-text-muted, #667); }
.vp-del { margin: 4px 0 0; }
.vp-form { border-top: 1px solid var(--color-border, #dde3ea); padding-top: 12px; }
.vp-form input[type="file"] { padding: 6px; }
@media (max-width: 640px) {
  .vp-item, .vp-img { width: 100%; }
  .vp-img { height: 200px; }
}
@media print {
  .vp-form, .vp-del { display: none; }
  .vp-img { width: 120px; height: 90px; }
}

.nst-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.nst-switch { font-size: 15px; font-weight: 700; }
.nst-addr { font-size: 12.5px; }
.nst-noaddr { font-size: 12px; color: var(--color-text-muted, #667); }
.nst-result { margin: 0; font-size: 14px; }
.nst-reason { margin: 4px 0 0; font-size: 12.5px; color: var(--color-danger, #c0392b); }

.yb-head { border-bottom: 2px solid var(--color-primary, #2f6fb3); padding-bottom: 8px; margin-bottom: 12px; }
.yb-company { margin: 0 0 2px; font-size: 12.5px; color: var(--color-text-muted, #667); }
.yb-title { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.yb-vehicle { margin: 0; font-size: 14px; }
.yb-sub { margin-left: 10px; font-size: 12px; color: var(--color-text-muted, #667); }
.yb-table td, .yb-table th { vertical-align: top; }
.yb-table td:first-child { white-space: nowrap; }
.yb-ng { display: inline-block; margin-left: 5px; font-size: 11px; font-weight: 700; color: var(--color-danger, #c0392b); }
.yb-cost { margin-top: 8px; }
.yb-foot { margin: 14px 0 0; font-size: 11.5px; color: var(--color-text-muted, #667); text-align: right; }
@media print {
  .yb-sheet { border: none; box-shadow: none; padding: 0; }
  .yb-table { font-size: 11px; }
  .yb-table tr, .yb-sheet h3 { break-inside: avoid; }
  .yb-head { break-after: avoid; }
}

.vex-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.vex-rule p { margin: 0 0 6px; }
.vex-rule p:last-child { margin-bottom: 0; }
.vex-rule code { background: var(--color-surface-muted, #eef2f7); padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.vex-table td { vertical-align: top; }
.vex-table td:first-child { white-space: nowrap; }
.vex-cols { columns: 3 180px; margin: 0; padding-left: 1.4em; font-size: 12.5px; }
.vex-cols li { margin: 0 0 2px; break-inside: avoid; }

.vcl-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.vcl-rule p { margin: 0 0 6px; }
.vcl-rule p:last-child { margin-bottom: 0; }
.vcl-table td { vertical-align: top; }
.vcl-table td:nth-child(2) { white-space: nowrap; }
.vcl-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); font-weight: 400; }
.vcl-norate { color: var(--color-danger, #c0392b); font-weight: 700; }
.vcl-row-ng td { background: rgba(253, 227, 234, 0.35); }
.vcl-new { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; background: #e4edfb; color: #1f4e8c; }
.vcl-state { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; background: var(--color-surface-muted, #eef2f7); }
.vcl-state-confirmed { background: #e3f3e8; color: #1d6b37; }
.vcl-state-submitted { background: var(--color-warning-light, #fef3e2); color: #a35b00; }

.ut-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.ut-table td, .ut-table th { vertical-align: top; }
.ut-table td:first-child { white-space: nowrap; }
.ut-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); font-weight: 400; }
.ut-level { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.ut-level-high { background: #e3f3e8; color: #1d6b37; }
.ut-level-mid { background: #e4edfb; color: #1f4e8c; }
.ut-level-low { background: var(--color-warning-light, #fef3e2); color: #a35b00; }
.ut-level-none { background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.ut-row-low td { background: rgba(254, 243, 226, 0.4); }
.ut-rate-cell { white-space: nowrap; }
.ut-bar { display: inline-block; width: 60px; height: 8px; margin-right: 6px; border-radius: 4px; background: var(--color-surface-muted, #eef2f7); overflow: hidden; vertical-align: middle; }
.ut-bar-fill { display: block; height: 100%; background: var(--color-primary, #2f6fb3); }
.ut-rate { font-weight: 700; }
@media print {
  .ut-table { font-size: 11px; }
  .ut-bar { border: 1px solid #999; }
}

.rex-tabs { display: flex; gap: 8px; margin: 0 0 12px; }
.rex-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.rex-rule p { margin: 0 0 6px; }
.rex-rule p:last-child { margin-bottom: 0; }
.rex-rule code { background: var(--color-surface-muted, #eef2f7); padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.rex-table td { vertical-align: top; }
.rex-table td:first-child { white-space: nowrap; }
.rex-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.rex-cols { columns: 3 160px; margin: 0; padding-left: 1.4em; font-size: 12.5px; }
.rex-cols li { margin: 0 0 2px; break-inside: avoid; }
.rex-export .bl-grid { max-width: 520px; }

.dr-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.dr-card { border-left: 4px solid var(--color-border, #dde3ea); }
.dr-card-care { border-left-color: var(--color-danger, #c0392b); }
.dr-name { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.dr-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); font-weight: 400; }
.dr-ok { font-size: 12px; color: #1d6b37; font-weight: 700; }
.dr-due { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; }
.dr-due-expired { background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.dr-due-warn { background: var(--color-warning-light, #fef3e2); color: #a35b00; }
.dr-due-soon { background: #e4edfb; color: #1f4e8c; }
.dr-points { margin-top: 10px; }
.dr-points-title { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; }
.dr-point-list { margin: 0; padding-left: 1.2em; }
.dr-point { margin: 0 0 3px; font-size: 13px; }
.dr-point-high { color: var(--color-danger, #c0392b); font-weight: 700; }
.dr-point-mid { color: #a35b00; }
.dr-point-low { color: var(--color-text-muted, #667); }
.dr-details { margin-top: 8px; font-size: 12.5px; }
.dr-details summary { cursor: pointer; font-weight: 700; }
.dr-missing, .dr-incidents { margin: 6px 0 0; padding-left: 1.2em; }
.dr-missing li, .dr-incidents li { margin: 0 0 2px; }
@media print {
  .dr-card { break-inside: avoid; }
  .dr-details[open] summary { font-weight: 700; }
}

.postal-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; }
.postal-message { font-size: 12px; color: var(--color-text-muted, #667); }
.postal-message.is-error { color: var(--color-danger, #c0392b); font-weight: 700; }
.pc-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.pc-state { margin: 0 0 6px; font-size: 14px; }
.pc-ready { color: #1d6b37; font-weight: 700; }
.pc-none { color: var(--color-text-muted, #667); }
.pc-steps { margin: 0 0 12px; padding-left: 1.3em; font-size: 13px; }
.pc-steps li { margin: 0 0 6px; }
.pc-steps code, .bk-env code { font-size: 12px; }
.bk-list { margin: 0 0 10px; padding-left: 1.2em; font-size: 12.5px; }
.bk-state { margin: 0 0 8px; font-size: 14px; }
.bk-ok { color: #1d6b37; font-weight: 700; }
.bk-todo { color: #a35b00; font-weight: 700; }
.bk-ng { color: var(--color-danger, #c0392b); font-weight: 700; }
.bk-env { background: var(--color-surface-muted, #eef2f7); padding: 10px 12px; border-radius: 6px; overflow-x: auto; font-size: 12.5px; }
.bk-takeout { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12.5px; }
.bk-takeout th, .bk-takeout td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--color-border, #dfe4ea); vertical-align: middle; }
.bk-takeout th { color: var(--color-text-muted, #5b6572); font-weight: 600; }
.bk-takeout .bl-actions { margin: 0; }
@media (max-width: 600px) { .bk-takeout, .bk-takeout tbody, .bk-takeout tr, .bk-takeout td { display: block; width: 100%; }
  .bk-takeout thead { display: none; }
  .bk-takeout tr { border-bottom: 1px solid var(--color-border, #dfe4ea); padding: 6px 0; }
  .bk-takeout td { border: 0; padding: 2px 0; } }

.bs-approval { display: inline-flex; gap: 4px; margin-left: 6px; }

.mn-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.mn-over { color: var(--color-danger, #c0392b); font-weight: 700; }
.mn-ok { font-size: 11.5px; color: #1d6b37; font-weight: 700; }
.mn-todo { font-size: 11.5px; color: #a35b00; font-weight: 700; }
.mn-row-ng td { background: var(--color-danger-bg, #fff6f8); }
.mn-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.mn-rule p { margin: 0 0 6px; }
.mn-rule p:last-child { margin-bottom: 0; }

.ye-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.ye-refund { color: #1d6b37; font-weight: 700; }
.ye-collect { color: var(--color-danger, #c0392b); font-weight: 700; }
.ye-zero { color: var(--color-text-muted, #667); }
.ye-settlement { margin: 10px 0 0; font-size: 15px; font-weight: 700; }
.ye-year { display: flex; align-items: center; gap: 8px; }
.ye-slip { background: #fff; color: #000; padding: 24px; max-width: 720px; margin: 0 auto; }
.ye-slip h1 { font-size: 18px; margin: 0 0 4px; text-align: center; }
.ye-slip-year { text-align: center; margin: 0 0 16px; font-size: 13px; }
.ye-slip-head, .ye-slip-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.ye-slip-head th, .ye-slip-head td, .ye-slip-table th, .ye-slip-table td { border: 1px solid #333; padding: 6px 8px; font-size: 13px; }
.ye-slip-head th, .ye-slip-table th { background: #f2f2f2; text-align: left; width: 45%; }
.ye-num { text-align: right; font-variant-numeric: tabular-nums; }
.ye-slip-note { font-size: 12.5px; margin: 8px 0; }
.ye-slip-caution { font-size: 11.5px; color: #444; margin: 4px 0 0; }

.el-tabs { margin: 0 0 12px; }

.sc-lock { border-left: 4px solid var(--color-warning, #e0a03a); }
.sc-lock.is-locked { background: var(--color-warning-light, #fef3e2); }
.sc-lock-form { margin-top: 8px; }
.sc-lock-inline { display: inline-block; }

.pj-state { margin: 0 0 8px; font-size: 13.5px; }
.pj-ok { color: #1d6b37; font-weight: 700; }
.pj-none { color: #a35b00; font-weight: 700; }
.pj-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.pj-rule p { margin: 0 0 6px; }
.pj-rule p:last-child { margin-bottom: 0; }
.pj-form { margin-top: 12px; border-top: 1px solid var(--color-border, #dde3ea); padding-top: 12px; }
.pj-csv { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }
.pj-table td, .pj-table th { font-size: 12.5px; }

.sd-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.sd-ok { font-size: 11.5px; color: #1d6b37; font-weight: 700; }
.sd-todo { font-size: 11.5px; color: #a35b00; font-weight: 700; }
.sd-due { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.sd-due-expired { background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.sd-due-warn { background: var(--color-warning-light, #fef3e2); color: #a35b00; }
.sd-due-soon { background: #e4edfb; color: #1f4e8c; }
.sd-row-todo td { background: var(--color-surface-muted, #f6f8fb); }
.sd-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.sd-form, .sd-filter { margin-top: 12px; border-top: 1px solid var(--color-border, #dde3ea); padding-top: 12px; }

.pt-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.pt-ok { font-size: 11.5px; color: #1d6b37; font-weight: 700; }
.pt-low { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--color-warning-light, #fef3e2); color: #a35b00; }
.pt-ng { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--color-danger-light, #fde3ea); color: var(--color-danger, #c0392b); }
.pt-row-ng td { background: var(--color-danger-bg, #fff6f8); }
.pt-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }

.nm-check { display: block; margin: 0 0 6px; font-size: 13.5px; }
.nm-levels { border: 1px solid var(--color-border, #dde3ea); border-radius: 6px; padding: 10px 12px; }
.nm-levels legend { font-size: 12.5px; font-weight: 700; padding: 0 4px; }
.nm-last { margin: 0 0 6px; font-size: 14px; }
.nm-samples { margin: 0; padding-left: 1.2em; font-size: 12.5px; }

.bnr-panel { padding-bottom: 8px; }
.bnr-list { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.bnr-item { width: 200px; }
.bnr-link { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border: 1px solid var(--color-border, #dde3ea); border-radius: 8px; text-decoration: none; background: var(--color-surface, #fff); }
.bnr-link:hover { border-color: var(--color-primary, #2f6fb3); box-shadow: 0 1px 6px rgba(47, 111, 179, 0.15); }
.bnr-img { width: 100%; height: 72px; object-fit: contain; }
.bnr-noimg { font-size: 30px; line-height: 1; }
.bnr-title { font-size: 13.5px; font-weight: 700; text-align: center; word-break: break-word; }
.bnr-tab { margin-left: 4px; font-size: 11px; }
.bnr-note { margin: 4px 0 0; font-size: 11.5px; color: var(--color-text-muted, #667); text-align: center; }
.bnr-thumb { width: 90px; height: 40px; object-fit: contain; background: var(--color-surface-muted, #eef2f7); border-radius: 4px; }
.bnr-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.bnr-url { font-size: 12px; word-break: break-all; }
.bnr-off td { background: var(--color-surface-muted, #eef2f7); }
.bnr-state-on { font-size: 11.5px; font-weight: 700; color: #1d6b37; }
.bnr-state-off { font-size: 11.5px; font-weight: 700; color: var(--color-text-muted, #667); }
.bnr-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.bnr-current { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12.5px; }
@media (max-width: 640px) { .bnr-item { width: 100%; } }

.dlv-rule { border-left: 4px solid var(--color-info, #3a7bd5); }
.dlv-rule p { margin: 0 0 6px; }
.dlv-rule p:last-child { margin-bottom: 0; }
.dlv-table td { vertical-align: top; }
.dlv-table td:nth-child(2) { white-space: nowrap; }
.dlv-sub { display: block; font-size: 11.5px; color: var(--color-text-muted, #667); }
.dlv-stale { color: var(--color-danger, #c0392b); font-weight: 700; }
.dlv-state { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.dlv-state-open { background: var(--color-warning-light, #fef3e2); color: #a35b00; }
.dlv-state-done { background: #e3f3e8; color: #1d6b37; }
.dlv-row-old td { background: rgba(254, 243, 226, 0.4); }
.dlv-note { max-width: 420px; margin-top: 10px; }

.bt-est-lines.dg-lines-compact:not(.dg-slip-lines) col.dg-col-code { width: 6%; }
.bt-est-lines.dg-lines-compact:not(.dg-slip-lines) col.dg-col-name { width: 20.5%; }
.bt-est-lines.dg-lines-compact:not(.dg-slip-lines) col.dg-col-unit { width: 5.5%; }
.bt-est-lines.dg-lines-compact:not(.dg-slip-lines) col.dg-col-tax { width: 14.5%; }
.bt-est-lines.dg-lines-compact:not(.dg-slip-lines) col.dg-col-amount { width: 9%; }
.bt-est-lines.dg-lines-compact:not(.dg-slip-lines) col.dg-col-dept { width: 10%; }
.bt-est-lines.dg-lines-compact:not(.dg-slip-lines) col.dg-col-note { width: 8%; }
.dg-lines-compact .bt-taxcol select.bt-taxtype { flex: 0 0 47%; width: 47%; padding-right: 14px; text-overflow: clip; }
.dg-lines-compact .bt-taxcol select.bt-taxrate { flex: 1 1 53%; width: 53%; padding-right: 14px; text-overflow: clip; }
.bt-switch input[type=checkbox] { appearance: none; -webkit-appearance: none; position: relative; width: 30px; height: 16px; margin: 0; border-radius: 999px; background: var(--color-border-strong); cursor: pointer; transition: background-color .15s; flex: 0 0 auto; }
.bt-switch input[type=checkbox]::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.bt-switch input[type=checkbox]:checked { background: var(--color-primary); }
.bt-switch input[type=checkbox]:checked::after { transform: translateX(14px); }
.bt-switch input[type=checkbox]:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .bt-switch input[type=checkbox], .bt-switch input[type=checkbox]::after { transition: none; } }
.bt-sum-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.bt-sum-tax th.bt-sum-group { width: 22%; text-align: center; vertical-align: middle; }
.bt-sum-tax th { width: 30%; }
@media (max-width: 640px) { .bt-sum-pair { grid-template-columns: 1fr; } }

.bt-search-details > summary.bt-search-head { display: flex; justify-content: center; font-size: 1.2rem; }
.bt-search-details > summary.bt-search-head::before { order: 2; }
.bt-s-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.bt-s-rows-bottom { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--bt-basic-border, var(--color-border)); }
.bt-s-row { display: grid; grid-template-columns: 7em minmax(0, 1fr); align-items: center; gap: 8px; }
.bt-s-label { font-size: .86rem; font-weight: 700; }
.bt-s-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; }
.bt-s-period .form-control { width: auto; min-width: 9.5em; }
.bt-s-period .bt-s-month { min-width: 9em; }
.bt-s-quick { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.bt-s-quick-btn { padding: 3px 9px; border: 0; border-radius: 4px; background: var(--bt-green); color: #fff; font-size: .8rem; font-weight: 700; cursor: pointer; }
.bt-s-quick-btn:hover, .bt-s-quick-btn:focus-visible { background: var(--bt-green-dark); }
.bt-s-code { width: 16em; max-width: 100%; }
.bt-s-check { display: inline-flex; align-items: center; gap: 5px; font-size: .9rem; cursor: pointer; }
.bt-s-note { font-size: .82rem; }
.bt-s-own { color: var(--color-primary-dark); font-weight: 700; }
.bt-s-other { color: #8a5200; font-weight: 700; }
.bt-s-select { width: 16em; max-width: 100%; }
.bt-s-detail { margin-top: 10px; }
.bt-s-detail > summary { cursor: pointer; color: var(--color-primary); font-size: .88rem; }
.bt-s-detail > .bl-grid { margin-top: 8px; }
.bt-s-actions { justify-content: center; }
@media (max-width: 640px) {
  .bt-s-row { grid-template-columns: 1fr; gap: 2px; }
  .bt-s-period .form-control { min-width: 0; flex: 1 1 8em; }
}

.dg-row-toggle { display: inline-flex; align-items: center; justify-content: center; width: 1.7em; height: 1.7em; padding: 0; border: 1px solid var(--color-border-strong); border-radius: 4px; background: var(--color-surface); color: var(--color-primary); cursor: pointer; line-height: 1; }
.dg-row-toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.dg-row-toggle .dg-rt-minus, .dg-row-toggle[aria-expanded="true"] .dg-rt-plus { display: none; }
.dg-row-toggle[aria-expanded="true"] .dg-rt-minus { display: inline; }
.dg-detail-row > td { padding: 8px 12px 12px 40px; background: var(--color-surface-muted); }
.dg-detail-wrap { overflow-x: auto; }
.dg-detail-table { width: 100%; border-collapse: collapse; background: var(--color-surface); font-size: .86rem; }
.dg-detail-table th { padding: 4px 8px; background: var(--color-surface-muted); border-bottom: 1px solid var(--color-border-strong); font-weight: 700; white-space: nowrap; }
.dg-detail-table td { padding: 3px 8px; border-bottom: 1px solid var(--color-border); }
.dg-detail-sum td { font-weight: 700; background: var(--color-surface-muted); }
.dg-dep-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.dg-dep-part h4 { margin: 0 0 4px; font-size: .88rem; }
@media (max-width: 640px) { .dg-dep-breakdown { grid-template-columns: 1fr; } .dg-detail-row > td { padding-left: 8px; } }

.dg-il-head { margin: 0 0 6px; font-size: 1rem; }
.dg-il-closing { margin: 0 0 10px; font-size: 1.05rem; }
.dg-il-summary { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dg-il-summary th { padding: 6px 8px; background: var(--color-surface-muted); border: 1px solid var(--color-border); font-size: .84rem; white-space: nowrap; }
.dg-il-summary td { padding: 8px; border: 1px solid var(--color-border); }
.dg-il-site { margin: 14px 0 6px; font-size: 1.02rem; }
.dg-il-site:first-child { margin-top: 0; }
.dg-il-sum td { background: #bfe6ee; color: #1f2d33; font-weight: 700; }

.dg-saved-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.dg-sa-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 12px; min-height: 92px; }
.dg-sa-card form { margin: 0; }
.dg-ib-group { display: inline-flex; border: 1px solid var(--color-primary); border-radius: 6px; overflow: hidden; }
.dg-ib-group .dg-ib { border: 0; border-radius: 0; border-right: 1px solid var(--color-primary); }
.dg-ib-group .dg-ib:last-child { border-right: 0; }
.dg-ib { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; padding: 6px 10px; border: 1px solid var(--color-primary); border-radius: 6px; background: var(--color-surface); color: var(--color-primary); font: inherit; font-size: .82rem; text-decoration: none; cursor: pointer; }
.dg-ib:hover, .dg-ib:focus-visible { background: var(--color-primary-light); text-decoration: none; }
.dg-ib-icon { font-size: 1.35rem; line-height: 1.1; }
.dg-ib-pdf { border-color: var(--color-danger); color: var(--color-danger); }
.dg-ib-pdf:hover, .dg-ib-pdf:focus-visible { background: var(--color-danger-light); }
.dg-ib-danger { border-color: var(--color-danger); color: var(--color-danger); }
.dg-ib-danger:hover, .dg-ib-danger:focus-visible { background: var(--color-danger-light); }
.dg-ib-sub { font-size: .8rem; }
.dg-sa-note { font-size: .82rem; }
.dg-slipno { display: flex; align-items: center; gap: 4px; }
.dg-slipno .form-control { flex: 1 1 auto; min-width: 0; }
.dg-nav-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1.9em; height: 1.9em; border-radius: 4px; background: var(--color-primary); color: #fff; font-weight: 700; text-decoration: none; }
.dg-nav-btn:hover, .dg-nav-btn:focus-visible { background: var(--color-primary-dark); color: #fff; text-decoration: none; }
.dg-nav-btn.is-disabled { background: var(--color-border-strong); cursor: default; }
.dg-audit-table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: .82rem; }
.dg-audit-table th { padding: 3px 6px; background: var(--color-surface-muted); border: 1px solid var(--color-border); font-weight: 700; white-space: nowrap; }
.dg-audit-wrap { overflow-x: auto; }
.dg-audit-table td { padding: 3px 6px; border: 1px solid var(--color-border); text-align: center; white-space: nowrap; }
@media (max-width: 640px) { .dg-saved-actions { grid-template-columns: 1fr; } }

.dg-sa-status { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .86rem; text-align: center; }
.dg-short-nav .dg-short { flex: 0 1 12em; }
.dg-bill-note { display: block; margin-top: 2px; font-size: .8rem; }

.dg-audit-wrap { max-width: 100%; }
@media (max-width: 640px) {
  .dg-dep-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1200px) {
  .dg-toolrow > table.dg-sumboxes:not(.cm-dg-wideboxes) { display: block; max-width: 100%; overflow-x: auto; }
}
fieldset { min-width: 0; }
@media (max-width: 640px) {
  .btn { white-space: normal; max-width: 100%; }
  select.form-control, input.form-control, textarea.form-control { max-width: 100%; min-width: 0; }
  main :where(div, section, article, aside, nav, form, header, fieldset, ul, ol, li, label) { min-width: 0; }
  main .form-row { flex-wrap: wrap; }
}
.sc-default-submit, .ws-visually-hidden, .ic-visually-hidden, .ps-apl-sr, .ps-pmap-sr, .sp-plan-enter-default, .ost-sr, .omp-sr,
.mz-rtable thead, .ir-rtable thead { left: 0; }
.badge-electronic { background: var(--color-primary-light); color: var(--color-primary); margin-right: 4px; }
.mt-sources { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.mt-source { border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 12px; background: var(--color-surface); }
.mt-source-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mt-source-head .file-meta { margin-left: auto; }
.mt-source-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mt-source-actions form { margin: 0; }
.mt-player { display: block; width: 100%; max-width: 560px; margin-top: 8px; }
video.mt-player { max-height: 320px; background: #000; }
.mt-text { margin-top: 6px; }
.mt-text summary { cursor: pointer; color: var(--color-primary); font-size: 13px; }
.mt-text form { display: grid; gap: 6px; margin-top: 6px; }
.mt-pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; background: var(--color-bg, #f6f7f9); border-radius: 6px; padding: 8px 10px; max-height: 360px; overflow: auto; margin: 6px 0 0; }
.mt-upload { border-top: 1px dashed var(--color-border); padding-top: 12px; margin-top: 4px; }
.mt-members { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.mt-fieldset { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 12px 10px; margin: 0 0 14px; min-width: 0; }
.mt-fieldset legend { padding: 0 6px; font-weight: 600; font-size: 14px; }
.mt-agenda-row { display: grid; gap: 4px; margin-bottom: 10px; }
.mt-actions td { vertical-align: top; }
.mt-committee { margin: 0 0 14px; }
.mt-committee summary { cursor: pointer; font-weight: 600; }
.mt-targets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.mt-targets form { margin: 0; }
.mt-expanded { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; }
.mt-engines label { display: inline-flex; gap: 6px; align-items: center; margin: 3px 0; }

.fl-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-size: .95rem; }
.fl-crumbs a { text-decoration: none; padding: 3px 8px; border-radius: 999px; background: var(--color-surface-muted); color: inherit; }
.fl-crumbs a:hover, .fl-crumbs a:focus-visible { background: var(--color-primary-light, #dce7f8); }
.fl-crumbs [aria-current="page"] { padding: 3px 8px; font-weight: 700; }
.fl-sep { color: var(--color-text-muted, #6b7683); }
.fl-tools .ac-filter { margin: 0; }
.fl-check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; align-items: start; }
.fl-grid .card { margin: 0; }
.fl-starter { margin-top: 10px; }
.fl-rename, .fl-del { margin-top: 10px; }
.fl-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 12px 0; }
.fl-folder { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; gap: 2px 10px; align-items: center;
  padding: 12px; border: 1px solid var(--color-border, #dde3ea); border-radius: 10px; background: var(--color-surface, #fff);
  text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.fl-folder:hover, .fl-folder:focus-visible { border-color: var(--color-primary, #3b6fc4); box-shadow: 0 2px 8px rgba(59, 111, 196, .15); transform: translateY(-1px); }
.fl-folder-icon { grid-row: 1 / span 2; font-size: 1.7rem; text-align: center; }
.fl-folder-name { font-weight: 700; }
.fl-folder-meta { font-size: .82rem; color: var(--color-text-muted, #6b7683); }
.fl-table td:first-child { min-width: 14em; }
.fl-kind { margin-right: 6px; }
.fl-actions { white-space: nowrap; }
.fl-actions form, .fl-actions details { display: inline-block; margin: 0 0 0 4px; vertical-align: middle; }
.fl-move summary { list-style: none; cursor: pointer; }
.fl-move summary::-webkit-details-marker { display: none; }
.fl-move[open] { position: relative; }
.fl-move[open] form { position: absolute; z-index: 5; right: 0; top: calc(100% + 4px); width: 260px; display: grid; gap: 6px;
  padding: 10px; border: 1px solid var(--color-border, #dde3ea); border-radius: 8px; background: var(--color-surface, #fff); box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
@media (max-width: 720px) {
  .fl-actions { white-space: normal; }
  .fl-move[open] form { position: static; width: auto; box-shadow: none; }
}

.rs-kpis .sales-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.rs-kpis .sales-kpi { padding: 8px 12px; }
.rs-kpis .sales-kpi-value { font-size: 19px; }
.fl-movefolder { margin-top: 10px; }

.br-count { margin: 0 0 10px; font-size: 13.5px; }
.br-area { margin-bottom: 14px; }
.br-area-head { margin-bottom: 8px; }
.br-area-head h2 { margin: 0 0 2px; font-size: 16px; }
.br-area-head p { margin: 0; font-size: 12.5px; color: var(--color-text-muted); }
.br-area-ok { margin: 0 0 10px; font-size: 12.5px; color: var(--color-text-muted); }
.br-area .alerts-panel, .br-area .card { margin-bottom: 10px; }
.fr-home-links { margin-bottom: 12px; }
.fl-link { margin: 0 0 10px; font-size: 13px; }

.mc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 10px; }
.mc-month { display: flex; align-items: center; gap: 10px; }
.mc-month h2 { margin: 0; font-size: 18px; }
.mc-pick { display: flex; align-items: center; gap: 8px; margin: 0; }
.mc-pick label { font-size: 12.5px; color: var(--color-text-muted); }
.mc-pick select { width: auto; }
.mc-progress-text { margin: 0 0 6px; font-size: 13px; color: var(--color-text-muted); }
.mc-steps { list-style: none; margin: 16px 0 10px; padding: 0; display: grid; gap: 10px; }
.mc-step { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 14px; padding: 12px 14px; border: 1px solid var(--color-border); border-left: 4px solid var(--color-warning); border-radius: var(--radius); background: var(--color-surface); }
.mc-step.is-done { border-left-color: var(--color-success); background: var(--color-surface-muted); }
.mc-step-no { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--color-primary-light); color: var(--color-primary-dark); }
.mc-step-body { flex: 1 1 260px; min-width: 0; }
.mc-step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mc-step-head h3 { margin: 0; font-size: 15px; }
.mc-step-note { margin: 4px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--color-text-muted); }
.mc-step-sum { margin: 4px 0 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mc-step-action { flex: 0 0 auto; margin-left: auto; }

.bl-grid.sj-grid { align-items: start; }
.bl-grid.sj-grid .form-group .file-meta { display: block; margin-top: 2px; }

.bt-price-history { margin-top: 14px; }
.bt-price-history > summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.bt-price-history .bt-ph-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.bt-price-history .bt-ph-tools input[type="search"] { max-width: 280px; }
.bt-price-history .cm-table-wrap { max-height: 320px; overflow-y: auto; }
.bt-price-history .bp-sub { display: block; font-size: 11px; color: #6b7688; }

.dg-slip-form:not(.bt-show-cost) .bt-cost { display: none; }
.dg-slip-form:not(.bt-show-cost) col.bt-cost { display: none; }
.dg-slip-form .bt-margin { display: flex; gap: 16px; flex-wrap: wrap; align-items: baseline; margin-top: 8px; }

.auth-page-promo {
  align-items: stretch;
  gap: 48px;
  padding: 40px 32px;
  background: linear-gradient(135deg, #0b2545 0%, #14386b 55%, #1b4f9c 100%);
}
.auth-page-promo .auth-card {
  align-self: center;
  order: 2;
  flex: 0 0 380px;
}
.auth-promo {
  order: 1;
  align-self: center;
  max-width: 560px;
  color: #eef3fb;
}
.auth-promo-lead {
  margin: 0 0 6px;
  font-size: 15px;
  letter-spacing: 0.18em;
  color: #9fc0ef;
}
.auth-promo-title {
  margin: 0 0 14px;
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: #fff;
}
.auth-promo-title span {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  font-style: italic;
  letter-spacing: 0.12em;
  color: #9fc0ef;
}
.auth-promo-text { margin: 0 0 22px; font-size: 15px; line-height: 1.9; color: #d7e3f5; }
.auth-promo-points { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.auth-promo-points li {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid #5b9bff;
  border-radius: 0 8px 8px 0;
}
.auth-promo-points strong { font-size: 15px; color: #fff; }
.auth-promo-points span { font-size: 13px; line-height: 1.8; color: #cfdcf0; }
.auth-promo-label { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.14em; color: #9fc0ef;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.auth-promo-legend { letter-spacing: normal; color: #7fe0c8; font-size: 11px; }
.auth-promo-modules li.is-mine { border-color: rgba(127,224,200,.55); background: rgba(127,224,200,.14); color: #eaf6ff; }
.auth-promo-mine { margin-left: 6px; color: #7fe0c8; font-weight: 700; }
.auth-promo-modules { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.auth-promo-modules li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
}
.auth-promo-note { margin: 0; font-size: 12.5px; color: #9fc0ef; }
.auth-promo-ad { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, .10); font-size: 12.5px; line-height: 1.8; color: #d7e3f5; }
.auth-promo-ad strong { display: block; color: #fff; }
.auth-promo-ad a { color: #fff; text-decoration: underline; }
.auth-ad { display: flex; gap: 12px; align-items: center; margin-top: 20px; padding: 12px;
  border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-subtle, #f5f8fd);
  color: inherit; text-decoration: none; }
a.auth-ad:hover { border-color: var(--color-accent); }
.auth-ad-img { width: 84px; height: auto; border-radius: 6px; flex-shrink: 0; }
.auth-ad-body { min-width: 0; }
.auth-ad-mark { display: block; font-size: 10.5px; color: var(--color-text-muted); letter-spacing: .04em; }
.auth-ad-title { display: block; font-size: 13px; font-weight: 700; margin-top: 2px; }
.auth-ad-text { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.auth-ad-go { display: inline-block; font-size: 12px; margin-top: 4px; text-decoration: underline; }

@media (max-width: 1000px) {
  .auth-page-promo { flex-direction: column; align-items: center; gap: 24px; padding: 24px 14px; }
  .auth-page-promo .auth-card { order: 1; flex: 0 0 auto; width: 100%; max-width: 380px; box-sizing: border-box; }
  .auth-promo { order: 2; width: 100%; max-width: 560px; }
  .auth-promo-title { font-size: 32px; }
  .auth-promo-points { gap: 8px; }
  .auth-promo-points li { padding: 10px 12px; }
}
@media (max-width: 420px) {
  .auth-page-promo .auth-card { padding: 22px 18px; }
  .auth-promo-title { font-size: 28px; }
  .auth-promo-modules li { font-size: 12px; padding: 4px 9px; }
}

.hlp-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1200;
  display: flex;
  width: min(460px, 100vw);
  height: 100vh;
  background: var(--color-surface, #fff);
  border-left: 1px solid var(--color-border, #dfe3e8);
  box-shadow: -8px 0 24px rgba(0, 0, 0, .12);
}
.hlp-drawer[hidden] { display: none; }
.hlp-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  outline: none;
}
.hlp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1199;
  background: rgba(0, 0, 0, .18);
}
.hlp-backdrop[hidden] { display: none; }

.hlp-head {
  position: relative;
  flex: 0 0 auto;
  padding: 14px 44px 12px 16px;
  border-bottom: 1px solid var(--color-border, #dfe3e8);
  background: var(--color-surface-muted, #f5f6f8);
}
.hlp-title { margin: 0; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.hlp-sub { margin: 2px 0 0; font-size: 12px; color: var(--color-text-muted, #6b7280); }
.hlp-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--color-border, #dfe3e8);
  border-radius: 6px;
  background: var(--color-surface, #fff);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.hlp-close:hover { background: var(--color-bg, #eef1f5); }

.hlp-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px 20px;
  font-size: 13.5px;
  line-height: 1.85;
}
.hlp-loading { padding: 20px 16px; color: var(--color-text-muted, #6b7280); }
.hlp-empty { color: var(--color-text-muted, #6b7280); }

.hlp-sec + .hlp-sec { margin-top: 18px; }
.hlp-sec > h3 {
  margin: 0 0 8px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--color-primary, #2f6fd0);
  font-size: 14px;
}
.hlp-body h4 { margin: 14px 0 4px; font-size: 13.5px; }
.hlp-body p { margin: 0 0 8px; overflow-wrap: anywhere; }
.hlp-body ul, .hlp-body ol { margin: 0 0 10px; padding-left: 1.4em; }
.hlp-body li + li { margin-top: 3px; }
.hlp-body code {
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--color-surface-muted, #f5f6f8);
  font-size: 12.5px;
}
.hlp-table-wrap { overflow-x: auto; margin: 0 0 10px; }
.hlp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.hlp-table th, .hlp-table td {
  padding: 5px 7px;
  border: 1px solid var(--color-border, #dfe3e8);
  text-align: left;
  vertical-align: top;
}
.hlp-table thead th { background: var(--color-surface-muted, #f5f6f8); white-space: nowrap; }

.hlp-faq { list-style: none; margin: 0; padding: 0; }
.hlp-faq > li + li { margin-top: 6px; }
.hlp-faq summary {
  padding: 7px 9px;
  border: 1px solid var(--color-border, #dfe3e8);
  border-radius: 6px;
  background: var(--color-surface-muted, #f5f6f8);
  cursor: pointer;
  font-weight: 600;
}
.hlp-faq-answer { padding: 8px 10px 2px; overflow-wrap: anywhere; }
.hlp-faq-from { margin: 0 0 6px 10px; font-size: 11.5px; color: var(--color-text-muted, #6b7280); }

.hlp-more > summary {
  padding: 7px 0;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border, #dfe3e8);
}

.hlp-foot {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-top: 1px solid var(--color-border, #dfe3e8);
  background: var(--color-surface-muted, #f5f6f8);
}
.hlp-foot p { margin: 0 0 8px; font-size: 12px; color: var(--color-text-muted, #6b7280); }

@media (max-width: 700px) {
  .hlp-drawer { width: 100vw; }
}

@media print {
  .hlp-drawer, .hlp-backdrop { display: none !important; }
}

.pdz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pdz-card { border: 1px solid var(--border, #d6dbe3); border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.pdz-card.pdz-on { border-color: var(--primary, #3490dc); box-shadow: 0 0 0 2px rgba(52,144,220,.18); }
.pdz-shot { position: relative; width: 100%; padding-top: 141.4%; overflow: hidden; background: #eef1f5; border-bottom: 1px solid var(--border, #d6dbe3); }
.pdz-shot iframe { position: absolute; top: 0; left: 0; width: 794px; height: 1123px; border: 0;
  transform: scale(.29); transform-origin: 0 0; pointer-events: none; background: #fff; }
.pdz-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.pdz-body h3 { margin: 0; font-size: 15px; }
.pdz-body p { margin: 0; font-size: 12.5px; color: var(--muted, #5b6675); line-height: 1.5; }
.pdz-mine { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--muted, #5b6675); }
.pdz-now { color: var(--primary, #3490dc); font-weight: 600; }
.pdz-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pdz-acts .btn { padding: 4px 10px; font-size: 12.5px; }
.pdz-knobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; margin: 12px 0 16px; }
.pdz-color { height: 38px; padding: 2px 4px; }
.pdz-use { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; align-items: end; }
.pdz-use button { grid-column: 1 / -1; justify-self: start; }
.pdz-inline { display: inline; }
@media (max-width: 640px) {
  .pdz-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .pdz-shot iframe { transform: scale(.2); }
  .pdz-shot { padding-top: 141.4%; }
}
.pdz-live { display: grid; grid-template-columns: 1fr 260px; gap: 18px; align-items: start; margin: 12px 0 16px; }
.pdz-live .pdz-knobs { margin: 0; }
.pdz-live-shot { width: 260px; border: 1px solid var(--border, #d6dbe3); border-radius: 6px; }
.pdz-live-shot iframe { transform: scale(.327); }
@media (max-width: 860px) {
  .pdz-live { grid-template-columns: 1fr; }
  .pdz-live-shot { width: 100%; max-width: 260px; }
}
.pdz-shot.pdz-land { padding-top: 70.7%; }
.pdz-shot.pdz-land iframe { width: 1123px; height: 794px; transform: scale(.205); }
.pdz-live-shot.pdz-land iframe { transform: scale(.2315); }
.pdz-dir { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; }
.pdz-dir .btn { padding: 4px 12px; font-size: 13px; }
.pdz-dir .btn.active { background: var(--primary, #3490dc); color: #fff; border-color: var(--primary, #3490dc); }
.pdz-dir label { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 640px) { .pdz-shot.pdz-land iframe { transform: scale(.142); } }
.pdz-badge { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 3px 9px; border-radius: 999px;
  background: var(--primary, #3490dc); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }

.ac-slip { table-layout: fixed; min-width: 62rem; }
.ac-slip th { text-align: center; font-size: 13px; letter-spacing: .08em; }
.ac-slip th.js-amt, .ac-slip td.js-amt { width: 7.6em; }
.ac-slip th.js-tax, .ac-slip td.js-tax { width: 6.6em; }
.ac-slip th.js-site, .ac-slip td.js-site { width: 11%; }
.ac-slip th.js-memo, .ac-slip td.js-memo { width: 17%; }
.ac-slip td { vertical-align: top; padding: 4px 5px; }
.ac-slip td.js-amt input { text-align: right; font-variant-numeric: tabular-nums; font-size: 15px; }
.js-side .js-sub { font-size: 12.5px; padding: 3px 6px; }
.js-note { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ac-slip td.js-memo input[type="text"] { width: 100%; }
.ac-slip td.js-memo { border-left: 2px solid var(--border, #d6dbe3); border-right: 2px solid var(--border, #d6dbe3); }
.ac-slip th.js-memo { border-left: 2px solid var(--border, #d6dbe3); border-right: 2px solid var(--border, #d6dbe3); }
.ac-slip { border-collapse: collapse; }
.ac-slip th, .ac-slip td { border: 1px solid var(--color-border); }
.ac-slip thead th {
  padding: 5px 6px; border-bottom: 2px solid var(--color-border-strong, #9aa4b2);
  background: var(--color-surface-muted, #eef2f7); color: var(--color-text);
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em;
}
.ac-slip th.js-no, .ac-slip td.js-no { width: 2.2em; text-align: center; color: var(--color-text-muted); font-size: 12px; }
.ac-slip td .form-control {
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  padding: 3px 5px; height: auto; min-height: 0;
}
.ac-slip td .form-control:focus {
  background: var(--color-primary-light); outline: 2px solid var(--color-primary); outline-offset: -2px;
}
.ac-slip td select.form-control { appearance: auto; }
.ac-slip td.js-amt .form-control { text-align: right; font-variant-numeric: tabular-nums; font-size: 15px; }
.ac-slip td.js-memo, .ac-slip th.js-memo { border-left: 2px solid var(--color-border-strong, #9aa4b2); border-right: 2px solid var(--color-border-strong, #9aa4b2); }
.ac-slip tbody tr:nth-child(even) td { background: transparent; }
.ac-slip tbody tr:hover td { background: var(--color-bg); }
@media (max-width: 900px) {
  .ac-slip { table-layout: auto; }
  .js-note { grid-template-columns: 1fr; }
}

.pv-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-amount strong { font-size: 15px; }
.pv-blocked td { color: var(--color-text-muted); }
.pv-blocker { color: var(--color-danger, #c62828); font-size: 12.5px; }
.pv-over { color: var(--color-danger, #c62828); font-size: 12.5px; }
.pv-inline { display: inline; margin: 0; }
.pv-make { align-items: flex-end; }

.ls-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ls-table td { vertical-align: middle; }
.ls-late td { background: var(--color-warning-light); }
.ls-soon { border-left: 4px solid var(--color-warning); }
.ls-soon h2 { margin-top: 0; font-size: 15px; }
.ls-search { display: flex; gap: 6px; align-items: center; margin: 8px 0 10px; }
.ls-search .form-control { flex: 1 1 18em; max-width: 26em; }

.tg-kind { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.tg-kind-receivable { background: var(--color-primary, #3490dc); color: #fff; }
.tg-kind-payable { background: var(--color-danger, #c62828); color: #fff; }
.tg-table td { vertical-align: middle; }
.tg-table .tg-due { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tg-late td { background: var(--color-danger-bg, #fdecec); }
.tg-ops { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; }
.tg-inline { display: inline; margin: 0; }
.tg-soon { border-left: 4px solid var(--color-danger, #c62828); }
.tg-soon h2 { margin-top: 0; font-size: 15px; }
.tg-search { display: flex; gap: 6px; align-items: center; margin: 8px 0 10px; }
.tg-search .form-control { flex: 1 1 18em; max-width: 26em; }
.tg-form .ac-amount { width: 100%; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .tg-ops { justify-content: flex-start; }
}

.js-side { display: grid; grid-template-rows: auto auto; gap: 2px; }
.js-r1, .js-r2 { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; min-height: 1.95em; }
.js-side > *, .js-r1 > *, .js-r2 > *, .js-note > * { min-width: 0; }
.ac-slip .ac-amount { width: 100%; }
.js-acc-pick { position: relative; grid-template-columns: minmax(0, 1fr) 1.4em; gap: 1px; }
.js-acc-pick .ac-account { min-width: 0; }
.js-pick { width: 1.4em; padding: 0; border: 0; background: none; color: var(--color-text-muted); font-size: 10px; line-height: 1; cursor: pointer; }
.js-pick:hover { color: var(--color-text); }
.ac-js .js-acc-value { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html:not(.ac-js) .js-acc-pick { grid-template-columns: minmax(0, 1fr); }
html:not(.ac-js) .js-acc-pick .ac-code, html:not(.ac-js) .js-pick { display: none; }
.ac-code { text-align: left; }
.ac-code-hits { position: absolute; z-index: 30; top: calc(100% + 2px); left: 0; min-width: 22em; max-height: 15em; overflow-y: auto;
  display: flex; flex-direction: column; padding: 3px; border: 1px solid var(--color-border-strong, #9aa4b2); border-radius: var(--radius-sm);
  background: var(--color-surface, #fff); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.ac-code-hits[hidden] { display: none; }
.ac-code-hit { padding: 4px 8px; border: 0; border-radius: 3px; background: none; text-align: left; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.ac-code-hit:hover { background: var(--color-bg); }
.ac-code-hit.is-on { background: var(--color-primary, #3490dc); color: #fff; }
.ac-code-none { margin: 0; padding: 4px 8px; font-size: 13px; color: var(--color-text-muted); }
.ac-keys { position: sticky; bottom: 0; z-index: 20; margin-top: 10px; padding: 6px 0 4px; border-top: 1px solid var(--color-border); background: var(--color-surface, #fff); }
.ac-guide { margin: 0 0 5px; font-size: 12.5px; color: var(--color-text-muted); }
.ac-guide b { color: var(--color-text); }
.ac-keyrow { display: flex; flex-wrap: wrap; gap: 5px; }
.ac-key { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border: 1px solid var(--color-border-strong, #9aa4b2);
  border-radius: 4px; background: var(--color-bg); font-size: 12.5px; line-height: 1.6; cursor: pointer; }
.ac-key:hover { background: var(--color-surface-muted, #eef2f7); }
.ac-key-k { min-width: 2.4em; padding: 1px 4px; border-radius: 3px; background: var(--color-border-strong, #9aa4b2); color: #fff;
  font-size: 11.5px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.ac-key-go .ac-key-k { background: var(--color-primary, #3490dc); }
@media (max-width: 900px) {
  .ac-code-hits { min-width: 0; width: 100%; }
}

.ac-entry-split { display: grid; grid-template-columns: minmax(16rem, 21rem) minmax(0, 1fr); gap: 0 18px; align-items: start; }
.ac-entry-head { position: sticky; top: 8px; padding: 10px 12px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted, var(--color-bg)); }
.ac-head-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.ac-head-title { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--color-text-muted); }
.ac-entry-head .form-group { margin-bottom: 10px; }
.ac-entry-head .ac-entry-tools { display: block; margin: 0; }
.ac-entry-head .ac-account-search { flex: none; min-width: 0; }
.ac-entry-main { min-width: 0; }
.ac-entry-split.is-collapsed { grid-template-columns: 2.6rem minmax(0, 1fr); }
.ac-entry-split.is-collapsed .ac-entry-head { padding: 8px 4px; }
.ac-entry-split.is-collapsed .ac-head-bar { flex-direction: column; gap: 6px; margin: 0; }
.ac-entry-split.is-collapsed .ac-head-title { writing-mode: vertical-rl; letter-spacing: .12em; }
.ac-entry-split.is-collapsed .ac-head-body { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1100px) {
  .ac-entry-split, .ac-entry-split.is-collapsed { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ac-entry-head { position: static; margin-bottom: 12px; }
  .ac-entry-split.is-collapsed .ac-head-title { writing-mode: horizontal-tb; }
  .ac-entry-split.is-collapsed .ac-head-bar { flex-direction: row; }
  .ac-entry-head .ac-entry-tools { display: flex; }
}

.cal-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; margin: 6px 0 14px; }
.cal-pick { display: flex; align-items: flex-start; gap: 6px; padding: 4px 6px; border-radius: 4px; font-size: 13px; line-height: 1.5; }
.cal-pick:hover { background: var(--hover, #f3f6fa); }
.cal-pick input { margin-top: 3px; flex: none; }
.cal-pick strong { font-variant-numeric: tabular-nums; margin-right: 4px; }
.cal-setup .form-row { gap: 18px; }
.cal-table td.num, .cal-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cal-table tr.cal-zero td { color: var(--muted, #5b6675); }
.cal-confirm { margin-top: 14px; }
.cal-inline { display: inline; }
tr.cal-off td { color: var(--muted, #5b6675); text-decoration: line-through; }

.pa-table td.num, .pa-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pa-table .pa-in { min-width: 150px; }
.pa-table .pa-amount { text-align: right; font-variant-numeric: tabular-nums; }
.pa-sub { display: block; font-size: 11.5px; color: var(--muted, #5b6675); }
.pa-rate { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--muted, #5b6675); }
.pa-sum { font-size: 15px; }
.pa-sum strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.pa-setup .form-row { gap: 18px; align-items: end; }
.pa-inline { display: inline; }
tr.pa-done td { background: var(--ok-bg, #eef7f0); }
tr.pa-minus td { background: #fdeceb; }
tr.pa-over td { background: #fff7e6; }
tr.pa-off td { color: var(--muted, #5b6675); text-decoration: line-through; }

.pdc-table td.num, .pdc-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pdc-table tfoot th { font-size: 15px; }
.pdc-table tr.pdc-off td { opacity: .45; }
.pdc-warn { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px;
  background: #fff3cd; color: #7a5b00; }
.pdc-inline { display: inline; }
tr.pdc-cancelled td { color: var(--muted, #5b6675); text-decoration: line-through; }

@media (max-width: 800px) {
  .form-control:not(table *),
  input:not([type='hidden']):not([type='checkbox']):not([type='radio']):not(table *),
  select:not(table *),
  textarea:not(table *) {
    font-size: 16px;
  }
  .form-control:not(table *),
  .btn:not(table *) {
    min-height: 44px;
  }
}

@media (max-width: 800px) {
  .sidebar { padding: 6px 8px; }
  .sidebar nav { align-items: center; }
  .sidebar nav a.nav-promo,
  .sidebar nav .nav-promo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 0 6px;
    padding: 8px 10px;
    white-space: nowrap;
  }
  .nav-promo-img,
  .nav-promo-text,
  .nav-promo-go { display: none; }
  .nav-promo-title,
  .nav-promo-ad { display: inline; margin: 0; }

  .topbar .role-tag { display: none; }
}

.nav-howto { margin: 12px 10px 0; }
.nav-howto-open {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--color-sidebar-chip-border, rgba(255, 255, 255, .2));
  border-radius: 10px;
  background: var(--color-sidebar-chip, rgba(255, 255, 255, .1));
  color: var(--color-sidebar-chip-text, #fff);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.nav-howto-open:hover { background: var(--color-sidebar-chip-hover, rgba(255, 255, 255, .18)); }
.nav-howto-play { flex: 0 0 auto; font-size: 11px; opacity: .9; }
.nav-howto-text { min-width: 0; }
.nav-howto-label { display: block; font-weight: 700; }
.nav-howto-title {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  opacity: .8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-howto-box {
  position: fixed;
  left: 10px;
  bottom: 10px;
  width: min(560px, 46vw);
  background: var(--color-sidebar-bg, #002060);
  box-shadow: var(--shadow-pop, 0 6px 18px rgba(16, 32, 96, .14));
  z-index: 60;
  padding: 10px;
  border: 1px solid var(--color-sidebar-chip-border, rgba(255, 255, 255, .2));
  border-radius: 10px;
  background: var(--color-sidebar-chip, rgba(255, 255, 255, .1));
  color: var(--color-sidebar-chip-text, #fff);
}
.nav-howto-head { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 4px; }
.nav-howto-now { margin: 0; flex: 1 1 auto; font-size: 12.5px; font-weight: 700; }
.nav-howto-x {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: -4px -2px 0 0;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.nav-howto-x:hover { background: var(--color-danger, #e11d48); border-color: var(--color-danger, #e11d48); }
.nav-howto-lead { margin: 0 0 8px; font-size: 11.5px; opacity: .85; line-height: 1.5; }
.nav-howto-video {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: #000;
  object-fit: contain;
  object-position: top center;
}
.nav-howto-picks { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.nav-howto-pick {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.nav-howto-pick:hover { background: rgba(255, 255, 255, .14); }
.nav-howto-pick.is-now { background: #fff; color: var(--color-sidebar-bg, #002060); font-weight: 700; border-color: #fff; }
.nav-howto-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; }
.nav-howto-note { font-size: 11px; opacity: .75; line-height: 1.5; }
.nav-howto-close {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 18px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--color-sidebar-bg, #002060);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.nav-howto-close:hover { background: var(--color-danger, #e11d48); color: #fff; }
@media print { .nav-howto { display: none; } }

@media (max-width: 800px) {
  .nav-howto { margin: 0 0 0 6px; }
  .nav-howto-open { width: auto; white-space: nowrap; padding: 8px 10px; }
  .nav-howto-title { display: none; }
  .nav-howto-box { left: 8px; right: 8px; top: 70px; bottom: auto; width: auto; background: var(--color-sidebar-bg, #002060); }
}

.il-gates { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 24px; }
.il-gate > .bl-subtitle { margin: 10px 0 4px; }
.il-gate ul { margin: 0; padding-left: 1.2em; }
.il-gate li { margin: 2px 0; line-height: 1.6; }

.cc-addr { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; word-break: break-all; }
.cc-ping, .cc-pingall { margin: 0; display: inline-block; }
.cc-pingall { margin: 0 0 12px; }

.bt-codepick-empty { margin: 4px 0 0; font-size: 12px; line-height: 1.6; }
