/* ============================================
   ERP-UI.CSS ΓÇö Modern ERP interface layer
   Loads after base styles; preserves class API
   ============================================ */

/* ---- App shell ---- */
body {
  font-size: var(--font-size-base);
  background: var(--page-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.06), transparent),
    linear-gradient(180deg, var(--page-bg) 0%, var(--page-bg-subtle) 100%);
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-end) 100%);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: var(--shadow-sidebar);
}

.sidebar-header {
  padding: var(--space-4) var(--space-4) var(--space-3);
  border-bottom: 1px solid var(--sidebar-border);
  background: rgba(255, 255, 255, 0.02);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.logo-name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-tight);
}

.logo-tag {
  font-size: 10px;
  color: var(--sidebar-text);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.sidebar-nav {
  padding: var(--space-2) 0 var(--space-4);
}

.nav-section {
  margin-bottom: var(--space-1);
  padding: 0 var(--space-3);
}

.nav-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-2) var(--space-2) var(--space-1);
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

.nav-section-head .nav-label {
  padding: 0;
  flex: 1;
  text-align: left;
}

.nav-chevron {
  width: 14px;
  height: 14px;
  color: var(--sidebar-text);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.nav-section--collapsed .nav-chevron {
  transform: rotate(-90deg);
}

.nav-section-body {
  overflow: hidden;
  transition: max-height var(--transition-slow), opacity var(--transition);
  max-height: 600px;
}

.nav-sublabel {
  display: block;
  padding: var(--space-2) var(--space-3) var(--space-1);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.85;
}

.nav-item--sub {
  padding-left: calc(var(--space-3) + 8px);
  font-size: 13px;
}

.nav-item--sub .nav-icon {
  display: none;
}

.nav-section--collapsed .nav-section-body {
  max-height: 0;
  opacity: 0;
}

.nav-label {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.9px;
  color: var(--sidebar-text);
}

.nav-item {
  padding: 9px var(--space-3);
  border-radius: var(--radius);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  margin-bottom: 2px;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: inset 3px 0 0 var(--sidebar-active-border);
}

.nav-item.active::before {
  display: none;
}

.nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.75;
}

.nav-item.active .nav-icon {
  color: var(--sidebar-active-border);
  opacity: 1;
}

.nav-badge {
  font-size: 10px;
  min-width: 20px;
  height: 20px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}

.sidebar-footer {
  background: var(--sidebar-search-bg);
  border-top: 1px solid var(--sidebar-border);
}

.btn-backup {
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.btn-backup:hover {
  background: var(--sidebar-hover);
  border-color: var(--sidebar-border);
}

/* ---- Header ---- */
.top-header {
  height: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  padding: 0 var(--space-6);
}

.top-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 50%, transparent 100%);
  opacity: 0.5;
  pointer-events: none;
}

.top-header {
  position: sticky;
}

.breadcrumb {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.breadcrumb-module {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  letter-spacing: var(--letter-tight);
  line-height: var(--line-height-tight);
}

.breadcrumb-path {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-date {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  padding: 6px 12px;
  background: var(--page-bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
}

.backup-status {
  border: 1px solid rgba(5, 150, 105, 0.25);
  font-size: var(--font-size-xs);
}

.currency-badge {
  border: 1px solid var(--color-primary-muted);
  font-weight: var(--font-weight-bold);
}

.theme-toggle {
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ---- Page content ---- */
.page-content {
  padding: var(--space-6) var(--space-6) var(--space-10);
  max-width: var(--content-max-width);
}

/* ---- Page header ---- */
.page-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-color-subtle);
}

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: var(--letter-tight);
}

.page-subtitle {
  font-size: var(--font-size-md);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* ---- Cards ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(180deg, var(--card-bg) 0%, var(--page-bg-subtle) 100%);
}

.card-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
}

.card-footer {
  background: var(--page-bg-subtle);
}

/* ---- Dashboard hero ---- */
.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-6);
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--color-primary) 0%, #1d4ed8 55%, #4f46e5 100%);
  border-radius: var(--radius-lg);
  color: white;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.28);
  position: relative;
  overflow: hidden;
}

.dashboard-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.dashboard-hero-content {
  position: relative;
  z-index: 1;
}

.dashboard-hero-greeting {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--space-1);
}

.dashboard-hero-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: var(--letter-tight);
  line-height: var(--line-height-tight);
}

.dashboard-hero-sub {
  font-size: var(--font-size-md);
  opacity: 0.9;
  margin-top: var(--space-2);
}

.dashboard-hero-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.dashboard-hero-actions .period-filter {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.dashboard-hero-actions .period-btn {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
}

.dashboard-hero-actions .period-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.dashboard-hero-actions .period-btn.active {
  background: white;
  color: var(--color-primary-dark);
}

/* Quick module links */
.module-shortcuts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.module-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}

.module-shortcut:hover {
  border-color: var(--color-primary-muted);
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.module-shortcut-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.module-shortcut-icon svg {
  width: 20px;
  height: 20px;
}

.module-shortcut-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}

.module-shortcut:hover .module-shortcut-label {
  color: var(--color-primary-dark);
}

/* ---- Stat cards ---- */
.stat-card {
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  border-left: 3px solid transparent;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card--revenue { border-left-color: var(--color-success); }
.stat-card--expenses { border-left-color: var(--color-danger); }
.stat-card--profit { border-left-color: var(--color-primary); }
.stat-card--cash { border-left-color: var(--color-info); }

.stat-card--blue { border-left-color: var(--color-info); }
.stat-card--green { border-left-color: var(--color-success); }
.stat-card--purple { border-left-color: var(--color-accent); }
.stat-card--orange { border-left-color: var(--color-warning); }
.stat-card--red { border-left-color: var(--color-danger); }

.stat-card--revenue::after,
.stat-card--expenses::after,
.stat-card--profit::after,
.stat-card--cash::after {
  display: none;
}

.stat-card-label {
  font-size: var(--font-size-xs);
  letter-spacing: 0.6px;
}

.stat-card-value {
  font-size: 26px;
  font-weight: var(--font-weight-extrabold);
  font-variant-numeric: tabular-nums;
}

.stat-card-value--sm {
  font-size: var(--font-size-lg);
}

.stat-card-value--positive { color: var(--color-success); }
.stat-card-value--negative { color: var(--color-danger); }

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
}

/* ---- Tables ---- */
.data-table thead th {
  padding: 12px 16px;
  font-size: 10.5px;
  letter-spacing: 0.6px;
  background: var(--table-header-bg);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  color: var(--text-secondary);
}

.data-table tbody tr:hover {
  background: var(--table-row-hover);
}

.data-table tbody tr:nth-child(even) {
  background: var(--table-row-stripe);
}

.table-sticky thead th {
  background: var(--card-bg);
  box-shadow: 0 1px 0 var(--border-color);
}

.cell-actions {
  opacity: 1;
  gap: 2px;
}

.action-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
}

.page-btn {
  border-radius: var(--radius);
  min-width: 32px;
  height: 32px;
}

.page-btn.active {
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.page-ellipsis {
  border: none;
  background: none;
  cursor: default;
  pointer-events: none;
}

/* ---- Forms ---- */
.form-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.form-control {
  padding: 10px 14px;
  font-size: var(--font-size-md);
  background: var(--input-bg);
  border-radius: var(--radius);
  border-color: var(--border-color);
}

.form-control:hover:not(:disabled) {
  border-color: var(--border-color-strong);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-control:invalid:not(:placeholder-shown):not(:focus) {
  border-color: var(--color-danger);
}

.form-group--error .form-control {
  border-color: var(--color-danger);
}

.form-group--error .form-error {
  display: block;
}

.form-error {
  display: none;
}

.form-section-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-color-subtle);
}

/* ---- Buttons ---- */
.btn {
  padding: 9px 18px;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.btn--primary {
  background: linear-gradient(180deg, #3b82f6 0%, var(--color-primary) 100%);
  border-color: var(--color-primary-dark);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn--primary:hover {
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn--ghost {
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--page-bg-subtle);
}

/* ---- Filter bar ---- */
.filter-bar {
  padding: var(--space-3) var(--space-5);
  background: var(--page-bg-subtle);
  gap: var(--space-3);
}

.search-input {
  padding: 9px 14px 9px 36px;
  border-radius: var(--radius);
  background: var(--input-bg);
  border-color: var(--border-color);
}

.search-input:focus {
  background: var(--input-bg);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-select {
  padding: 8px 32px 8px 12px;
  border-radius: var(--radius);
  background: var(--input-bg);
  font-weight: var(--font-weight-medium);
}

.period-filter {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.period-btn {
  padding: 8px 14px;
  font-size: var(--font-size-sm);
}

/* ---- Tabs ---- */
.tab-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background: var(--card-bg);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 1px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  padding: var(--space-2) var(--space-3);
  gap: var(--space-2);
}

.tab-btn {
  padding: 14px 18px;
  font-size: var(--font-size-md);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn.active {
  background: var(--color-primary-light);
  border-bottom-color: var(--color-primary);
  color: var(--color-primary-dark);
}

/* ---- Modals ---- */
.modal-overlay {
  background: var(--overlay-bg);
  backdrop-filter: blur(6px);
}

.modal-box {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: var(--space-5) var(--space-6) var(--space-4);
  background: var(--page-bg-subtle);
}

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.modal-body {
  padding: var(--space-5) var(--space-6);
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  background: var(--page-bg-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

:root[data-theme="dark"] .modal-footer,
:root[data-theme="dark"] .modal-header {
  background: var(--page-bg-subtle);
}

/* ---- Toasts ---- */
.toast {
  border-radius: var(--radius-md);
  border-left-width: 4px;
  box-shadow: var(--shadow-lg);
}

/* ---- Confirm ---- */
.confirm-box {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

/* ---- Empty state ---- */
.empty-state {
  padding: var(--space-10) var(--space-6);
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary-muted) 100%);
}

/* ---- Loading ---- */
.loading-spinner {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* ---- Activity ---- */
.activity-item:hover {
  background: var(--page-bg-subtle);
}

/* ---- Export bar ---- */
.export-bar .btn {
  box-shadow: none;
}

/* ---- Pagination ---- */
.pagination {
  background: var(--page-bg-subtle);
  padding: var(--space-3) var(--space-5);
}

/* ---- Alerts / banners ---- */
.overdue-banner {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.alert {
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.alert--info { border-color: rgba(2, 132, 199, 0.2); }
.alert--success { border-color: rgba(5, 150, 105, 0.2); }
.alert--warning { border-color: rgba(217, 119, 6, 0.2); }
.alert--danger { border-color: rgba(220, 38, 38, 0.2); }

/* ---- Inline loading ---- */
.loading-inline {
  min-height: 200px;
}

/* ---- Responsive ---- */
@media (max-width: 1280px) {
  .module-shortcuts {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-hero-actions {
    width: 100%;
    overflow-x: auto;
  }

  .module-shortcuts {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .top-header {
    padding: 0 var(--space-4);
  }

  .page-content {
    padding: var(--space-4);
  }

  .module-shortcuts {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card-value {
    font-size: 22px;
  }

  .nav-section-head {
    pointer-events: none;
  }

  .nav-chevron {
    display: none;
  }
}

@media (max-width: 480px) {
  .module-shortcuts {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-hero-title {
    font-size: var(--font-size-xl);
  }
}

/* ============================================
   ERP TREE NAVIGATION
   ============================================ */

.sidebar-search {
  position: relative;
  padding: var(--space-2) var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: var(--space-2);
}

.sidebar-search__icon {
  position: absolute;
  left: calc(var(--space-3) + 10px);
  top: 50%;
  transform: translateY(calc(-50% - 4px));
  width: 14px;
  height: 14px;
  color: #64748b;
  pointer-events: none;
}

.sidebar-search__input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--sidebar-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--sidebar-text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.sidebar-search__input::placeholder { color: #64748b; }
.sidebar-search__input:focus {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.erp-nav-tree {
  padding: 0 var(--space-2) var(--space-2);
}

.erp-nav-group {
  margin-bottom: 2px;
}

.erp-nav-group--l1 {
  margin-bottom: 0;
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
}

.erp-nav-group--l1:first-child {
  border-top: none;
  padding-top: 0;
}

.erp-nav-group--l1 + .erp-nav-group--l1 {
  margin-top: var(--space-1);
}

.erp-nav-group__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: background var(--transition-fast);
}

.erp-nav-group__head:hover {
  background: var(--sidebar-hover);
}

/* Level 1 ΓÇö Main modules */
.erp-nav-group__head--l1 {
  padding: 10px var(--space-3);
  font-size: 13px;
  font-weight: 700;
  color: var(--sidebar-text-active);
  border-radius: var(--radius);
}

.erp-nav-group__head--l1 .erp-nav-icon {
  width: 18px;
  height: 18px;
  color: var(--sidebar-active-border);
  flex-shrink: 0;
}

/* Level 2 ΓÇö Section headers */
.erp-nav-group--l2 {
  margin: 2px var(--space-2);
  border-top: 1px solid var(--sidebar-border);
}

.erp-nav-group--l2:first-child {
  border-top: none;
}

.erp-nav-group__head--l2 {
  padding: 7px var(--space-2) 7px calc(var(--space-3) + 4px);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sidebar-text);
}

.erp-nav-group__head--l2 .erp-nav-icon {
  width: 14px;
  height: 14px;
  color: var(--sidebar-text);
  flex-shrink: 0;
}

.erp-nav-group__head--l3 {
  padding: 6px var(--space-2) 6px calc(var(--space-3) + 12px);
  font-size: 11px;
  font-weight: 600;
  color: var(--sidebar-text);
}

.erp-nav-group__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-nav-chevron {
  width: 12px;
  height: 12px;
  color: var(--sidebar-text);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.erp-nav-group--collapsed > .erp-nav-group__head .erp-nav-chevron {
  transform: rotate(-90deg);
}

.erp-nav-group__body {
  overflow: hidden;
  max-height: 1200px;
  opacity: 1;
  transition: max-height 0.28s ease, opacity 0.2s ease;
}

.erp-nav-group--collapsed > .erp-nav-group__body {
  max-height: 0;
  opacity: 0;
}

.erp-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px var(--space-3);
  margin: 1px var(--space-1);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
}

.erp-nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.erp-nav-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: inset 3px 0 0 var(--sidebar-active-border);
}

.erp-nav-link--l2 {
  padding-left: calc(var(--space-3) + 8px);
  font-size: 13px;
}

.erp-nav-link--l3 {
  padding-left: calc(var(--space-3) + 22px);
  font-size: 12px;
}

.erp-nav-link--l4 {
  padding-left: calc(var(--space-3) + 34px);
  font-size: 12px;
}

.erp-nav-link .erp-nav-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.75;
}

.erp-nav-link.active .erp-nav-icon,
.erp-nav-link:hover .erp-nav-icon {
  opacity: 1;
}

/* Submenu tree connectors */
.erp-nav-link--tree::before {
  content: '├─';
  flex-shrink: 0;
  width: 18px;
  font-size: 11px;
  line-height: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: rgba(148, 163, 184, 0.7);
  margin-right: -2px;
}

.erp-nav-link--tree-last::before {
  content: '└─';
}

.erp-nav-link--tree.erp-nav-link--l3 {
  padding-left: calc(var(--space-3) + 8px);
}

.erp-nav-link--tree.erp-nav-link--l4 {
  padding-left: calc(var(--space-3) + 14px);
}

.erp-nav-link--tree.erp-nav-link--l5,
.erp-nav-link--tree.erp-nav-link--l6 {
  padding-left: calc(var(--space-3) + 20px);
}

.erp-nav-link__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-nav-badge {
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--color-danger);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.erp-nav-badge:empty { display: none; }

.erp-nav--hidden { display: none !important; }

/* Collapsed sidebar ΓÇö icon rail */
.sidebar.sidebar--collapsed .sidebar-search { display: none; }

.sidebar.sidebar--collapsed .erp-nav-tree {
  padding: 0 6px;
}

.sidebar.sidebar--collapsed .erp-nav-group__body {
  display: none;
}

.sidebar.sidebar--collapsed .erp-nav-group__head {
  justify-content: center;
  padding: 9px 6px;
}

.sidebar.sidebar--collapsed .erp-nav-group__label,
.sidebar.sidebar--collapsed .erp-nav-chevron,
.sidebar.sidebar--collapsed .erp-nav-link__text,
.sidebar.sidebar--collapsed .erp-nav-badge,
.sidebar.sidebar--collapsed .erp-nav-link--tree::before {
  display: none;
}

.sidebar.sidebar--collapsed .erp-nav-group--l1 {
  margin-bottom: 2px;
  padding-top: 0;
  border-top: 1px solid var(--sidebar-border);
  border-radius: 0;
  background: none;
}

.sidebar.sidebar--collapsed .erp-nav-group--l1:first-child {
  border-top: none;
}

.sidebar.sidebar--collapsed .erp-nav-link {
  justify-content: center;
  padding: 9px 6px;
}

.sidebar.sidebar--collapsed .erp-nav-link[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--sidebar-tooltip-bg);
  color: var(--sidebar-tooltip-text);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--sidebar-border);
  z-index: 300;
}

.sidebar.sidebar--collapsed .erp-nav-link[data-tooltip]:hover::after,
.sidebar.sidebar--collapsed .erp-nav-group__head[data-tooltip]:hover::after {
  opacity: 1;
}

.sidebar.sidebar--collapsed .erp-nav-group__head--l1[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--sidebar-tooltip-bg);
  color: var(--sidebar-tooltip-text);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 300;
}

.sidebar-search__input {
  background: var(--sidebar-search-bg);
  color: var(--sidebar-text-active);
  border: 1px solid var(--sidebar-border);
}

/* ---- Book accounting dashboard ---- */
.book-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.book-dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--page-bg-subtle) 100%);
}

.book-dash-header__title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  letter-spacing: var(--letter-tight);
  margin: 0;
}

.book-dash-header__subtitle {
  margin: var(--space-1) 0 0;
  font-size: var(--font-size-md);
  color: var(--text-secondary);
}

.book-dash-header__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: var(--space-3) var(--space-5);
}

.book-dash-meta-label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.book-dash-meta-value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.book-dash-status--active { color: var(--color-success); }
.book-dash-status--inactive { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════
   Phase 225 — Global Full-Page UI Standard (presentation only)
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --erp-page-max-width: 1280px;
  --erp-page-max-width-wide: 1440px;
  --erp-page-max-width-narrow: 820px;
  --erp-control-height: 40px;
}

/* Page shell — all editable/read-only full-page workflows */
.erp-page,
.book-qt-form-page,
.book-cust-page[class*="-form-page"],
.book-tax-settings-page[class*="-form-page"],
.book-payroll-rules-page[class*="-form-page"],
.book-holiday-calendar-page,
.book-leave-calendar-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
  min-width: 0;
  padding-bottom: var(--space-6);
}

.erp-page--narrow,
.book-expense-category-form-page,
.book-leave-type-form-page,
.book-hr-leave-type-form-page,
.book-dash-punch-correct-form-page,
.book-emp-missing-punch-form-page,
.book-admin-reset-pwd-form-page,
.book-acct-change-pwd-form-page,
.book-leave-info-form-page {
  max-width: var(--erp-page-max-width-narrow);
}

.erp-page--wide,
.book-qt-form-page.book-po-form-page,
.book-qt-form-page.book-bill-form-page,
.book-qt-form-page.book-inv-form-page,
.book-qt-form-page.book-je-form-page,
.book-qt-form-page.book-bpay-form-page {
  max-width: var(--erp-page-max-width-wide);
}

/* Header hierarchy */
.erp-page-header,
.book-coa-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.erp-page-header__main,
.book-coa-form-header__main {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.erp-page-back,
.book-coa-form-header .btn--ghost.btn--sm,
.book-ast-back,
[class*="-form-page"] .btn--ghost.btn--sm[id*="back"],
[class*="-form-page"] .btn--ghost.btn--sm[id*="Back"] {
  align-self: flex-start;
  font-weight: var(--font-weight-medium);
}

.erp-page-title,
.book-coa-form-title {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  line-height: 1.25;
}

.erp-page-subtitle,
.erp-page-eyebrow,
.book-coa-form-eyebrow {
  margin: 0;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.erp-page-desc,
.book-coa-form-identity {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Content sections / cards */
.erp-page-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.erp-page-section,
.erp-card {
  padding: var(--space-5);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card, none);
}

.erp-page .book-qt-section,
.book-qt-form-page .book-qt-section,
.book-cust-page[class*="-form-page"] .book-qt-section {
  padding: var(--space-5);
}

.erp-page .book-qt-section:not(.card),
.book-qt-form-page .book-qt-section:not(.card),
.book-cust-page[class*="-form-page"] .book-qt-section:not(.card) {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.erp-card-header,
.erp-page-section__title,
.book-qt-section__title,
.form-section-title {
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-color);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.erp-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

/* Form grid */
.erp-form-grid,
.book-coa-form-fields,
.book-qt-form-page .form-row-2,
.book-cust-page[class*="-form-page"] .form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.erp-form-grid--1,
.erp-form-span-2,
.book-coa-form-span-2,
.grid-col-span-2 {
  grid-column: 1 / -1;
}

.erp-form-field,
.erp-page .form-group,
.book-qt-form-page .form-group,
.book-cust-page[class*="-form-page"] .form-group {
  margin-bottom: 0;
  min-width: 0;
}

.erp-page .form-label,
.book-qt-form-page .form-label,
.book-cust-page[class*="-form-page"] .form-label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}

.erp-page .form-control,
.book-qt-form-page .form-control,
.book-cust-page[class*="-form-page"] .form-control {
  min-height: var(--erp-control-height);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
}

.erp-page textarea.form-control,
.book-qt-form-page textarea.form-control,
.book-cust-page[class*="-form-page"] textarea.form-control {
  min-height: 96px;
}

/* Toolbars & action areas */
.erp-toolbar,
.book-cust-toolbar,
.book-ast-action-bar,
.book-ast-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.erp-toolbar__actions,
.book-cust-toolbar__left,
.book-cust-toolbar__right,
.book-ast-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

/* Page header action clusters — keep Add + Export on one row when width allows */
.book-cust-header__actions,
.book-dash-header__actions,
.book-rpt-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex: 0 0 auto;
  min-width: 0;
}

.book-export-actions,
.book-cust-export,
.erp-toolbar .toolbar-actions,
.erp-toolbar .action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

.erp-toolbar .btn,
.erp-toolbar > button,
.erp-toolbar__actions .btn,
.erp-toolbar__actions > button,
.book-cust-toolbar .btn,
.book-cust-toolbar > button,
.book-cust-toolbar__left > .btn,
.book-cust-toolbar__left > button,
.book-ast-action-bar .btn,
.book-ast-action-bar > button,
.book-cust-header__actions .btn,
.book-cust-header__actions > button,
.book-dash-header__actions .btn,
.book-dash-header__actions > button,
.book-rpt-header__actions .btn,
.book-rpt-header__actions > button {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  white-space: nowrap;
  min-height: var(--erp-control-height, 40px);
  padding-inline: var(--space-3);
}

.erp-form-actions,
.erp-page-footer,
.book-coa-form-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.erp-form-actions .btn,
.erp-page-footer .btn,
.book-coa-form-header__actions .btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  white-space: nowrap;
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
}

/* Phase 226A — Accounting book selector & export action standard */
.erp-book-selector,
.erp-dash-book-select,
.erp-reports-book-select {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex: 0 1 auto;
}

.erp-book-selector__flag,
.erp-dash-book-select__flag,
.erp-reports-book-select__flag {
  font-size: 18px;
  line-height: 1;
  flex: 0 0 auto;
}

.erp-book-selector__input,
.erp-dash-book-select__input,
.erp-reports-book-select__input,
.book-tax-book-select {
  min-height: var(--erp-control-height, 40px);
  height: var(--erp-control-height, 40px);
  padding-inline: var(--space-3);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-semibold, 600);
  min-width: 10rem;
  max-width: 20rem;
  width: auto;
  flex: 1 1 auto;
}

.erp-dash-book-filter,
.erp-sales-toolbar__book,
.erp-expenses-toolbar__book,
.erp-banking-toolbar__book {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.erp-dash-book-filter__label,
.erp-sales-toolbar__label,
.erp-expenses-toolbar__label,
.erp-banking-toolbar__label,
.erp-reports-filter__label {
  font-size: var(--font-size-xs, 11px);
  font-weight: var(--font-weight-bold, 700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  white-space: nowrap;
  margin: 0;
}

.book-cust-page .book-dash-header__subtitle,
.book-cust-page .book-dash-scope__book {
  font-weight: var(--font-weight-semibold, 600);
}

.book-cust-export.book-export-actions,
.book-cust-toolbar .book-export-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex: 0 0 auto;
}

.book-cust-export .book-export-actions__btn,
.book-cust-export .btn[data-export] {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  white-space: nowrap;
  min-height: var(--erp-control-height, 40px);
  padding-inline: var(--space-3);
}

@media (max-width: 768px) {
  .erp-book-selector__input,
  .erp-dash-book-select__input,
  .erp-reports-book-select__input,
  .book-tax-book-select {
    max-width: none;
    width: 100%;
  }

  .erp-dash-book-filter,
  .erp-sales-toolbar__book,
  .erp-expenses-toolbar__book,
  .erp-banking-toolbar__book {
    width: 100%;
  }
}

/* Module / tab navigation */
.erp-tab-list,
.tab-list.book-ast-module-tabs,
.tab-list.book-hr-org-tabs,
.book-hr-leave-page .tab-list.book-ast-rpt-tabs,
.book-hr-shift-page .tab-list.book-ast-rpt-tabs,
.book-hr-ot-page .tab-list.book-ast-rpt-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
}

.erp-tab-button,
.erp-tab-list .tab-btn,
.tab-list.book-ast-module-tabs .tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
  margin-bottom: 0;
  border-bottom: none;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.erp-tab-button.active,
.erp-tab-list .tab-btn.active,
.tab-list.book-ast-module-tabs .tab-btn.active {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.book-dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.book-dash-kpi {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  border-left: 3px solid var(--border-color);
}

.book-dash-kpi--revenue { border-left-color: var(--color-success); }
.book-dash-kpi--profit { border-left-color: var(--color-primary); }
.book-dash-kpi--cash { border-left-color: var(--color-info); }
.book-dash-kpi--receivable { border-left-color: var(--color-warning); }

.book-dash-kpi__label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.book-dash-kpi__value {
  font-size: 28px;
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  margin: var(--space-2) 0;
  font-variant-numeric: tabular-nums;
}

.book-dash-kpi__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.book-dash-trend {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xs);
}

.book-dash-trend--up { color: var(--color-success); }
.book-dash-trend--down { color: var(--color-danger); }

.book-dash-row {
  display: grid;
  gap: var(--space-4);
}

.book-dash-row--2 { grid-template-columns: repeat(2, 1fr); }

.book-dash-health__status {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
}

.book-dash-health__status--ok {
  background: color-mix(in srgb, var(--color-success) 12%, transparent);
  color: var(--color-success);
}

.book-dash-health__status--warn {
  background: color-mix(in srgb, var(--color-warning) 12%, transparent);
  color: var(--color-warning);
}

.book-dash-health__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.book-dash-health__metric {
  display: block;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
}

.book-dash-health__metric--status {
  font-size: var(--font-size-md);
  color: var(--color-success);
}

.book-dash-health__caption {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.book-dash-position__row + .book-dash-position__row {
  margin-top: var(--space-4);
}

.book-dash-position__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.book-dash-bar {
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--page-bg-subtle);
  overflow: hidden;
}

.book-dash-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition);
}

.book-dash-bar--assets .book-dash-bar__fill { background: var(--color-info); }
.book-dash-bar--liabilities .book-dash-bar__fill { background: var(--color-warning); }
.book-dash-bar--equity .book-dash-bar__fill { background: var(--color-primary); }

.book-dash-bar--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.book-dash-cashflow__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.book-dash-cashflow__item {
  padding: var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--page-bg-subtle);
}

.book-dash-cashflow__label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.book-dash-cashflow__item--in strong { color: var(--color-success); }
.book-dash-cashflow__item--out strong { color: var(--color-danger); }
.book-dash-cashflow__item--net strong { color: var(--color-primary); }

.book-dash-bank__name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.book-dash-bank__balance,
.book-dash-bank__recon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.book-dash-bank__label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.book-dash-actions__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.book-dash-action-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  font-family: inherit;
  text-align: left;
}

.book-dash-action-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.book-dash-action-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

.book-dash-scope {
  padding: var(--space-4) var(--space-5);
  border: 1px dashed var(--border-color);
  background: var(--page-bg-subtle);
}

.book-dash-scope__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.book-dash-scope__book {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin: var(--space-1) 0;
}

.book-dash-scope__detail {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.book-dash-scope__warn {
  margin-top: var(--space-2);
  color: var(--color-warning);
}

.book-dash-chart-card {
  height: 100%;
}

@media (max-width: 1100px) {
  .book-dash-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .book-dash-health__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-dash-kpi-grid,
  .book-dash-row--2,
  .book-dash-cashflow__grid,
  .book-dash-actions__grid,
  .book-dash-header__meta {
    grid-template-columns: 1fr;
  }
}

/* ---- Operations Letter Management dashboard ---- */

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

.book-lm-kpi--clickable {
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.book-lm-kpi--clickable:hover,
.book-lm-kpi--clickable:focus-visible {
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.book-lm-section-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0;
}

.book-lm-quick-actions__primary .btn--primary {
  min-width: 11rem;
}

.book-lm-attention-table th,
.book-lm-attention-table td {
  font-size: var(--font-size-sm);
}

.book-lm-empty-state h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

@media (max-width: 1100px) {
  .book-lm-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .book-lm-kpi-grid { grid-template-columns: 1fr; }
}

/* ---- Operations Letter Register ---- */

.book-lm-reg-page .book-lm-reg-toolbar .book-lm-reg-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.book-lm-seg {
  display: inline-flex;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.book-lm-seg-btn {
  border: none;
  background: var(--surface-2, #f8fafc);
  padding: 6px 12px;
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.book-lm-seg-btn.is-active {
  background: var(--color-primary);
  color: #fff;
}

.book-lm-seg-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.book-lm-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.book-lm-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2, #f1f5f9);
  font-size: var(--font-size-sm);
}

.book-lm-filter-chip__x {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.book-lm-dir-fixed {
  padding-top: 6px;
}

.book-lm-reg-page--incoming .book-lm-reg-toolbar,
.book-lm-reg-page--outgoing .book-lm-reg-toolbar {
  border-left: 3px solid var(--color-info, #0ea5e9);
}

.book-lm-reg-page--drafts .book-lm-reg-toolbar {
  border-left: 3px solid var(--color-warning, #f59e0b);
}

.book-lm-reg-page--archived .book-lm-reg-toolbar {
  border-left: 3px solid var(--text-muted, #64748b);
}

.book-lm-page-header__group {
  margin: 0 0 4px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.book-lm-page-header .book-lm-page-header__panel {
  margin-bottom: 0;
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.book-lm-reg-toolbar__header .card-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.book-lm-filter-chip--locked {
  background: var(--surface-3, #e2e8f0);
  font-weight: var(--font-weight-medium);
}

.book-lm-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.book-lm-report-card .card-header {
  align-items: flex-start;
}

.book-lm-report-count {
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  white-space: nowrap;
}

.book-lm-fu-seg {
  flex-wrap: wrap;
}

.book-lm-fu-kpi {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  padding: 12px;
  background: var(--surface-1, #fff);
}

.book-lm-fu-kpi.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.book-lm-fu-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.book-lm-report-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.book-lm-month-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.book-lm-month-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-2, #f8fafc);
}

.book-lm-month-stat__label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.book-lm-month-stat__value {
  font-weight: var(--font-weight-semibold);
}

.book-lm-monthly-card {
  grid-column: 1 / -1;
}

.book-lm-fu-status {
  font-size: 10px;
  letter-spacing: 0.03em;
}

@media (max-width: 960px) {
  .book-lm-reports-grid { grid-template-columns: 1fr; }
}

.book-lm-reg-table-wrap {
  overflow-x: auto;
}

.book-lm-reg-table th .book-lm-sort-th {
  border: none;
  background: transparent;
  font: inherit;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  padding: 0;
}

.book-lm-reg-table th .book-lm-sort-th.is-active {
  color: var(--color-primary);
}

.book-lm-ref-link {
  padding: 0;
  font-weight: inherit;
}

.book-lm-dir-badge {
  font-size: 10px;
  letter-spacing: 0.03em;
}

.book-lm-fu-overdue {
  color: var(--color-danger);
}

.book-lm-row-actions .btn {
  white-space: nowrap;
}

.book-letter-subject-cell {
  max-width: 280px;
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}

.book-lm-attention-empty {
  padding: 20px 16px;
}

.book-lm-reg-empty h3,
.book-el-reg-empty h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.book-lm-reg-search-row .book-export-actions,
.book-el-reg-search-row .book-export-actions {
  flex-shrink: 0;
}

.book-el-ver-current {
  background: var(--surface-2, #f8fafc);
}

.book-el-ver-current-badge {
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-left: 6px;
}

/* Employee Letter Management UI (book-el-*) */

.book-el-page-header__group {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.book-el-page-header .book-el-page-header__panel {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  padding: 16px 20px;
  background: var(--surface-1, #fff);
}

.book-el-reg-toolbar__header .card-title {
  font-size: var(--font-size-sm);
}

.book-el-reg-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.book-el-reg-search-row .form-control {
  flex: 1;
  min-width: 0;
}

.book-el-reg-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.book-el-reg-table-wrap {
  overflow-x: auto;
}

.book-el-reg-table th,
.book-el-reg-table td {
  vertical-align: middle;
}

.book-el-row-actions {
  white-space: nowrap;
}

.book-el-row-actions .btn {
  margin-left: 4px;
}

.book-el-status-badge,
.book-el-default-badge {
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.book-el-reg-empty h3 {
  font-size: var(--font-size-lg);
}

.book-el-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 16px;
}

.book-el-preview-banner {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius-md, 8px);
  padding: 10px 14px;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: #856404;
}

.book-el-workflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.book-el-workflow-step {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color, #e5e7eb);
  font-size: var(--font-size-sm);
  background: var(--surface-2, #f8fafc);
  color: var(--text-muted);
}

.book-el-workflow-step.is-current {
  border-color: var(--color-primary, #2563eb);
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-primary, #2563eb);
  font-weight: var(--font-weight-semibold);
}

.book-el-workflow-step.is-done {
  border-color: var(--color-success, #16a34a);
  color: var(--color-success, #16a34a);
}

.book-el-doc-preview {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  padding: 16px;
  background: #fff;
  min-height: 120px;
}

.book-el-validation-blocked {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md, 8px);
  padding: 10px 14px;
}

.book-el-validation-level--ok { color: #15803d; font-weight: 600; }

.book-el-validation-level--warn { color: #b45309; font-weight: 600; }

.book-el-validation-level--fail { color: #b91c1c; font-weight: 600; }

.book-el-ver-current {
  background: rgba(37, 99, 235, 0.04);
}

.book-el-ver-current-badge {
  font-size: 9px;
  vertical-align: middle;
}

.book-el-ph-key {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 6px;
  background: #f1f5f9;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
}

.book-el-error-panel {
  border-left: 4px solid var(--color-danger, #dc2626);
}

@media (max-width: 960px) {
  .book-el-reg-filters { grid-template-columns: 1fr 1fr; }
  .book-el-row-actions .btn { display: inline-block; margin-bottom: 4px; }
}

@media (max-width: 640px) {
  .book-el-reg-filters { grid-template-columns: 1fr; }
}

/* Company Letter Management UI (book-cl-*) */

.book-cl-reg-table th,
.book-cl-reg-table td { vertical-align: middle; }

.book-cl-rich-editor__toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--surface-2, #f8fafc); border-bottom: 1px solid var(--border-color, #e5e7eb); }

.book-cl-rich-editor { border: 1px solid var(--border-color, #e5e7eb); border-radius: 8px; overflow: hidden; }

.book-cl-rich-editor__body { min-height: 280px; padding: 12px; background: #fff; line-height: 1.6; }

.book-cl-status-badge { font-size: 11px; }

.book-cl-row-actions .btn { margin-bottom: 4px; }

.book-cl-sample-badge { margin-left: 6px; }

/* ---- Book customers module ---- */
.book-cust-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-cust-header__desc {
  margin: var(--space-2) 0 0;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.book-cust-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-cust-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
}

.book-cust-toolbar__right {
  flex: 1;
  min-width: 280px;
}

.book-cust-toolbar__right .filter-bar {
  margin: 0;
}

.book-cust-export {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.book-cust-table-card .book-cust-cards {
  display: none;
}

.book-cust-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  margin-bottom: var(--space-3);
}

.book-cust-card__name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.book-cust-card__line {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.book-cust-card__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-3) 0;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.book-cust-card__label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.book-cust-type-row {
  display: flex;
  gap: var(--space-4);
}

.book-cust-type-opt {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  cursor: pointer;
}

.book-cust-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.book-cust-detail-field {
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-cust-detail-field span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: 2px;
}

.book-cust-stmt-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-color);
}

.book-cust-stmt-grid {
  display: grid;
  gap: var(--space-2);
}

.book-cust-stmt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-cust-stmt-row--total {
  background: color-mix(in srgb, var(--color-primary) 8%, var(--page-bg-subtle));
  border-color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

@media (max-width: 1200px) {
  .book-cust-kpi { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .book-cust-kpi { grid-template-columns: repeat(2, 1fr); }
  .book-cust-table-wrap { display: none; }
  .book-cust-table-card .book-cust-cards { display: block; padding: var(--space-3); }
  .book-cust-contact-grid { grid-template-columns: 1fr; }
  .book-cust-toolbar { flex-direction: column; align-items: stretch; }
}

/* ---- Asset register (LKR) ---- */
.book-ast-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-ast-page .tab-list.book-ast-module-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  border-bottom: 1px solid var(--border-color);
}

.book-ast-page .tab-list.book-ast-module-tabs .tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
  margin-bottom: 0;
  border-bottom: none;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  white-space: nowrap;
}

.book-ast-page .tab-list.book-ast-module-tabs .tab-btn.active {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-bottom-color: transparent;
}

.book-ast-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
}

.book-ast-status-kpi .book-ast-kpi-filter {
  cursor: pointer;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.book-ast-status-kpi .book-ast-kpi-filter:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.book-ast-toolbar {
  flex-wrap: wrap;
  gap: var(--space-3);
}

.book-ast-toolbar__filters .filter-bar {
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-ast-density {
  display: inline-flex;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.book-ast-density .btn {
  border-radius: 0;
  border: none;
}

.book-ast-density .btn.active {
  background: color-mix(in srgb, var(--color-primary) 12%, var(--card-bg));
  color: var(--color-primary);
}

.book-ast-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-ast-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-primary) 10%, var(--page-bg-subtle));
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, var(--border-color));
  font-size: 12px;
}

.book-ast-chip__clear {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  color: var(--text-muted);
}

.book-ast-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.book-ast-badge__dot {
  font-size: 10px;
  line-height: 1;
}

.book-ast-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.book-ast-icon-cell {
  width: 48px;
}

.book-ast-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-cust-table--compact td,
.book-cust-table--compact th {
  padding: 6px 10px;
  font-size: 12px;
}

.book-ast-menu {
  position: relative;
  display: inline-block;
}

.book-ast-menu summary {
  list-style: none;
  cursor: pointer;
}

.book-ast-menu summary::-webkit-details-marker {
  display: none;
}

.book-ast-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 160px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 120;
  padding: var(--space-1);
  display: flex;
  flex-direction: column;
}

.book-ast-menu__panel button,
.book-ast-menu__item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  width: 100%;
}

.book-ast-menu__panel button:hover,
.book-ast-menu__item:hover {
  background: var(--page-bg-subtle);
}

.book-ast-row-menu .book-ast-menu__panel {
  right: 0;
}

.book-ast-row-menu .book-ast-menu__panel--fixed {
  position: fixed;
  right: auto;
}

.book-ast-table-card,
.book-cust-table-card.book-ast-table-card {
  overflow: visible;
}

.book-ast-table-wrap,
.book-hr-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

.book-ast-actions-col,
.book-ast-actions-col .cell-actions {
  overflow: visible;
  position: relative;
}

.book-ast-row-menu[open] {
  z-index: 130;
}

/* SPA-safe row action dropdown */
.book-row-action {
  position: relative;
  display: inline-block;
}

.book-row-action__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 180px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 200;
  padding: var(--space-1);
  flex-direction: column;
}

.book-row-action__panel[hidden] {
  display: none !important;
}

.book-row-action__panel:not([hidden]) {
  display: flex;
}

.book-row-action__panel--fixed {
  position: fixed;
  right: auto;
}

.book-row-action__item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  width: 100%;
  color: var(--text-primary);
}

.book-row-action__item:hover {
  background: var(--page-bg-subtle);
}

.book-row-action__item--danger {
  color: var(--color-danger, #dc2626);
}

.book-row-action__item--danger:hover {
  background: #fef2f2;
}

.book-row-action__hint {
  display: block;
  padding: 6px 12px;
}

.book-row-action__toggle--dots {
  min-width: 32px;
  font-size: 1.1rem;
  line-height: 1;
  padding: 4px 8px;
}

.book-row-action--open {
  z-index: 210;
}

.book-ast-code-link {
  padding: 0;
  font-weight: 600;
}

.book-ast-mobile-card__head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.book-ast-mobile-card__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.book-ast-table-card .book-ast-mobile-cards {
  display: none;
}

.book-ast-detail__hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
}

.book-ast-detail__identity {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  margin-top: var(--space-3);
}

.book-ast-detail__code {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.book-ast-detail__title {
  margin: 0 0 var(--space-2);
  font-size: 1.5rem;
}

.book-ast-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--text-secondary);
}

.book-ast-detail__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-ast-info-card {
  padding: var(--space-4);
}

.book-ast-skeleton {
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--page-bg-subtle) 25%, color-mix(in srgb, var(--border-color) 40%, var(--page-bg-subtle)) 50%, var(--page-bg-subtle) 75%);
  background-size: 200% 100%;
  animation: book-ast-shimmer 1.2s ease-in-out infinite;
}

.book-ast-skeleton--header { height: 120px; }
.book-ast-skeleton--kpi { height: 88px; }
.book-ast-skeleton--toolbar { height: 56px; }
.book-ast-skeleton--table { height: 320px; }
.book-ast-skeleton--card { height: 200px; }

@keyframes book-ast-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 1200px) {
  .book-ast-detail .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .book-ast-table-wrap { display: none; }
  .book-ast-table-card .book-ast-mobile-cards { display: block; }
  .book-ast-action-bar { flex-direction: column; align-items: stretch; }
  .book-ast-detail__hero { flex-direction: column; }
  .book-ast-detail__hero-actions { width: 100%; }
  .book-ast-detail__hero-actions .btn { flex: 1; }
  .book-ast-cat-table-card:not(.book-ast-cat-table-card--cards) .book-ast-table-wrap { display: none; }
  .book-ast-cat-grid--visible,
  .book-ast-cat-table-card:not(.book-ast-cat-table-card--cards) .book-ast-cat-grid {
    display: grid;
    padding: var(--space-3);
  }
}

/* ---- Asset categories (LKR) ---- */
.book-ast-cat-page .book-ast-desc-cell {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-ast-view-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2px;
}

.book-ast-view-switch__sep {
  color: var(--text-muted);
  font-size: 12px;
  user-select: none;
}

.book-ast-view-switch .btn.active {
  background: color-mix(in srgb, var(--color-primary) 12%, var(--card-bg));
  color: var(--color-primary);
}

.book-ast-cat-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}

.book-ast-cat-grid--visible {
  display: grid;
  padding: var(--space-4);
}

.book-ast-cat-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.book-ast-cat-card__head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.book-ast-cat-card__body {
  flex: 1;
  min-width: 0;
}

.book-ast-cat-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-ast-cat-card__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
}

.book-ast-menu__hint {
  display: block;
  padding: 8px 12px;
  line-height: 1.35;
}

.book-ast-cat-detail .book-ast-detail__title {
  font-size: 1.35rem;
}

@media (max-width: 992px) {
  .book-ast-cat-page .book-ast-desc-cell,
  .book-ast-loc-page .book-ast-desc-cell {
    max-width: 160px;
  }
}

/* ---- Asset locations (LKR) ---- */
.book-ast-loc-dist {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.book-ast-loc-dist__row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 1fr auto;
  align-items: center;
  gap: var(--space-3);
}

.book-ast-loc-dist__label {
  font-size: 13px;
  font-weight: 500;
}

.book-ast-loc-dist__bar-wrap {
  height: 8px;
  background: var(--page-bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.book-ast-loc-dist__bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  min-width: 4px;
  transition: width 0.3s ease;
}

.book-ast-loc-dist__count {
  font-weight: 600;
  font-size: 13px;
  min-width: 24px;
  text-align: right;
}

.book-ast-loc-detail .book-ast-detail__title {
  font-size: 1.35rem;
}

@media (max-width: 768px) {
  .book-ast-loc-page .book-ast-cat-table-card:not(.book-ast-cat-table-card--cards) .book-ast-table-wrap { display: none; }
  .book-ast-loc-page .book-ast-cat-grid--visible,
  .book-ast-loc-page .book-ast-cat-table-card:not(.book-ast-cat-table-card--cards) .book-ast-cat-grid {
    display: grid;
    padding: var(--space-3);
  }
  .book-ast-loc-dist__row {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
  .book-ast-asn-table-wrap { display: none; }
  .book-ast-asn-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-3);
  }
  .book-ast-asn-filters .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .book-ast-asn-detail .grid-3 { grid-template-columns: 1fr; }
}

/* ---- Asset assignments (LKR) ---- */
.book-ast-asn-cards {
  display: none;
}

.book-ast-asn-toolbar .book-cust-toolbar__left {
  flex: 1;
  min-width: 0;
}

.book-ast-asn-filters .filter-select {
  min-width: 120px;
}

.book-ast-asn-employee-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: var(--space-2);
}

.book-ast-asn-asset-list {
  margin: 0;
  padding-left: var(--space-4);
  font-size: 13px;
}

.book-ast-asn-asset-list li {
  margin-bottom: var(--space-2);
}

.book-ast-asn-page .book-dash-kpi-grid {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1200px) {
  .book-ast-asn-page .book-dash-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .book-ast-asn-page .book-dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Asset transactions (LKR) ---- */
.book-ast-trx-page .book-dash-kpi-grid {
  grid-template-columns: repeat(5, 1fr);
}

.book-ast-trx-filters {
  padding: var(--space-4);
}

.book-ast-trx-filters__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.book-ast-trx-filters__actions {
  display: flex;
  gap: var(--space-2);
}

.book-ast-trx-cards {
  display: none;
}

.book-ast-trx-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.book-ast-trx-card__amount {
  font-weight: 600;
  font-size: 15px;
  margin: var(--space-2) 0 var(--space-3);
}

.book-ast-trx-modal__hero {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.book-ast-trx-journal {
  margin-top: var(--space-2);
}

@media (max-width: 1200px) {
  .book-ast-trx-page .book-dash-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .book-ast-trx-filters__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-ast-trx-page .book-dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .book-ast-trx-table-wrap { display: none; }
  .book-ast-trx-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-3);
  }
  .book-ast-trx-filters__grid { grid-template-columns: 1fr; }
  .book-ast-trx-modal .grid-3,
  .book-ast-trx-modal .grid-2 { grid-template-columns: 1fr; }
}

/* ---- Asset depreciation (LKR) ---- */
.book-ast-dep-page .book-dash-kpi-grid {
  grid-template-columns: repeat(5, 1fr);
}

.book-ast-dep-workflow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.book-ast-dep-workflow__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  min-width: 100px;
  opacity: 0.45;
}

.book-ast-dep-workflow__step--active,
.book-ast-dep-workflow__step--done { opacity: 1; }

.book-ast-dep-workflow__step--done .book-ast-dep-workflow__num {
  background: var(--color-success);
  color: #fff;
}

.book-ast-dep-workflow__step--active .book-ast-dep-workflow__num {
  background: var(--color-primary);
  color: #fff;
}

.book-ast-dep-workflow__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--page-bg-subtle);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.book-ast-dep-workflow__label {
  font-size: 12px;
  text-align: center;
  font-weight: 500;
}

.book-ast-dep-workflow__arrow {
  color: var(--text-muted);
  font-size: 14px;
}

.book-ast-dep-cards { display: none; }

.book-ast-dep-audit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
  font-size: 13px;
}

.book-ast-dep-audit-empty { padding: var(--space-2) 0; }

@media (max-width: 1200px) {
  .book-ast-dep-page .book-dash-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .book-ast-dep-page .book-dash-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .book-ast-dep-table-wrap { display: none; }
  .book-ast-dep-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-3);
  }
  .book-ast-dep-workflow { flex-direction: column; }
  .book-ast-dep-workflow__arrow { transform: rotate(90deg); }
}

/* ---- Asset maintenance (LKR) ---- */
.book-ast-maint-page .book-dash-kpi-grid,
.book-ast-maint-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-ast-maint-filters {
  padding: var(--space-4);
}

.book-ast-maint-filters__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.book-ast-maint-filters__actions {
  display: flex;
  gap: var(--space-2);
}

.book-ast-maint-cards {
  display: none;
}

.book-ast-maint-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.book-ast-maint-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.book-ast-maint-card__identity {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.book-ast-maint-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--space-2) 0;
  font-size: var(--font-size-sm);
}

@media (max-width: 1200px) {
  .book-ast-maint-page .book-dash-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .book-ast-maint-filters__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-ast-maint-page .book-dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .book-ast-maint-table-wrap { display: none; }
  .book-ast-maint-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-3);
  }
  .book-ast-maint-filters__grid { grid-template-columns: 1fr; }
  .book-ast-maint-modal .form-row-2 { grid-template-columns: 1fr; }
}

/* ---- Asset reports (LKR) ---- */
.book-ast-rpt-page .book-dash-kpi-grid,
.book-ast-rpt-kpi {
  grid-template-columns: repeat(7, 1fr);
}

.book-ast-rpt-tabs {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}

.book-ast-rpt-filters {
  padding: var(--space-4);
}

.book-ast-rpt-filters__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.book-ast-rpt-filters__actions {
  display: flex;
  gap: var(--space-2);
}

.book-ast-rpt-cards {
  display: none;
}

.book-ast-rpt-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.book-ast-rpt-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.book-ast-rpt-card__amount {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin: var(--space-2) 0;
}

.book-ast-rpt-chart__row {
  display: grid;
  grid-template-columns: minmax(100px, 140px) 1fr minmax(90px, auto);
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
}

.book-ast-rpt-chart__bar-wrap {
  height: 8px;
  background: var(--page-bg-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.book-ast-rpt-chart__bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  min-width: 2px;
}

.book-ast-rpt-chart__value {
  text-align: right;
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .book-ast-rpt-page .book-dash-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .book-ast-rpt-filters__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-ast-rpt-page .book-dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .book-ast-rpt-table-wrap { display: none; }
  .book-ast-rpt-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-3);
  }
  .book-ast-rpt-filters__grid { grid-template-columns: 1fr; }
  .book-ast-rpt-tabs { overflow-x: auto; flex-wrap: nowrap; }
}

@media print {
  .book-ast-rpt-page .book-ast-action-bar,
  .book-ast-rpt-tabs,
  .book-ast-rpt-filters,
  .book-cust-toolbar { display: none !important; }
}

/* ---- Human Resources ΓÇö Employees ---- */
.book-hr-emp-page .book-dash-kpi-grid,
.book-hr-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-hr-filters {
  padding: var(--space-4);
}

.book-hr-filters__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.book-hr-filters__actions {
  display: flex;
  gap: var(--space-2);
}

.book-hr-emp-cards {
  display: none;
}

.book-hr-emp-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.book-hr-emp-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2);
}

.book-hr-emp-tabs {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}

.book-hr-emp-detail .grid .stat-card {
  min-height: 108px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-2);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

.book-hr-emp-detail .stat-card-header {
  align-items: flex-start;
  gap: var(--space-2);
}

.book-hr-emp-detail .stat-card-label {
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
}

.book-hr-emp-detail .stat-card-value {
  line-height: 1.25;
  word-break: break-word;
  margin-top: auto;
}

.book-hr-emp-detail .stat-card-value--sm {
  font-size: var(--font-size-md);
}

.book-hr-biometric-disabled {
  padding: var(--space-3);
  background: var(--page-bg-subtle);
  opacity: 0.85;
}

.book-hr-biometric-placeholder {
  border-style: dashed;
}

@media (max-width: 1200px) {
  .book-hr-emp-page .book-dash-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .book-hr-filters__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-hr-emp-page .book-dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .book-hr-table-wrap { display: none; }
  .book-hr-emp-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-3);
  }
  .book-hr-filters__grid { grid-template-columns: 1fr; }
  .book-hr-emp-tabs { overflow-x: auto; flex-wrap: nowrap; }
}

/* ---- Book estimates module ---- */
.book-est-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-est-header__counts {
  grid-template-columns: repeat(4, minmax(100px, 1fr));
}

.book-est-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-est-table-card .book-est-cards {
  display: none;
}

.book-est-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  margin-bottom: var(--space-3);
}

.book-est-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-est-card__name {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.book-est-card__meta {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-est-card__amount {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.book-est-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-est-report-item {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-est-report-item span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

@media (max-width: 1200px) {
  .book-est-kpi { grid-template-columns: repeat(2, 1fr); }
  .book-est-header__counts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-est-table-wrap { display: none; }
  .book-est-table-card .book-est-cards { display: block; padding: var(--space-3); }
  .book-est-reports-grid { grid-template-columns: 1fr; }
}

/* ---- Book invoices module ---- */
.book-inv-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-inv-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-inv-table-card .book-inv-cards {
  display: none;
}

.book-inv-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  margin-bottom: var(--space-3);
}

.book-inv-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-inv-card__name {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.book-inv-card__meta {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-inv-card__amounts {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.book-inv-card__amounts span:last-child {
  color: var(--text-muted);
}

.book-inv-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-inv-report-item {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-inv-report-item span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-inv-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-inv-form .form-section-title {
  margin: var(--space-3) 0 var(--space-2);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

@media (max-width: 1200px) {
  .book-inv-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-inv-table-wrap { display: none; }
  .book-inv-table-card .book-inv-cards { display: block; padding: var(--space-3); }
  .book-inv-reports-grid { grid-template-columns: 1fr; }
}

/* ---- Book purchase orders module ---- */
.book-po-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-po-header__counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.book-po-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-po-table-card .book-po-cards {
  display: none;
}

.book-po-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  background: var(--surface-card);
}

.book-po-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-po-card__name {
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-1);
}

.book-po-card__meta {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-po-card__amount {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
}

.book-po-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-po-report-item {
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
}

.book-po-report-item span {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-po-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-po-timeline__item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.book-po-timeline__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: 5px;
  flex-shrink: 0;
}

.book-po-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── PO full-page form + receive ── */
.book-po-form-page,
.book-po-receive-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-po-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-po-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-po-form-page .book-qt-section,
.book-po-receive-page .book-qt-section {
  padding: var(--space-5);
}

.book-po-form-page .book-qt-section__title,
.book-po-receive-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-po-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-po-items-table-wrap,
.book-po-receive-table-wrap {
  overflow-x: auto;
}

.book-po-items-table {
  width: 100%;
  min-width: 640px;
}

.book-po-items-table .col-type { width: 110px; min-width: 100px; }
.book-po-items-table .col-qty { width: 90px; min-width: 80px; }
.book-po-items-table .col-rate { width: 110px; min-width: 100px; }
.book-po-items-table .col-tax { width: 90px; min-width: 80px; }
.book-po-items-table .col-amt { width: 120px; min-width: 100px; }
.book-po-items-table .col-rm { width: 44px; min-width: 44px; }

.book-po-form-aside {
  position: sticky;
  top: var(--space-4);
}

.book-po-totals-card {
  padding: var(--space-5);
}

.book-po-totals {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-po-totals-row {
  display: grid;
  grid-template-columns: 1fr minmax(0, 140px);
  gap: var(--space-3);
  align-items: center;
}

.book-po-totals-row span {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.book-po-totals-row--grand span {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-po-totals-row--grand .form-control {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

.book-po-totals-meta {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-color);
}

.book-po-receive-note {
  margin: 0 0 var(--space-4);
}

.book-po-receive-table {
  width: 100%;
  min-width: 480px;
}

.book-po-receive-table .col-pending { width: 100px; min-width: 80px; }
.book-po-receive-table .col-receive { width: 140px; min-width: 120px; }

@media (max-width: 960px) {
  .book-po-form-layout {
    grid-template-columns: 1fr;
  }

  .book-po-form-aside {
    position: static;
  }

  .book-po-form-page .book-coa-form-header__actions,
  .book-po-receive-page .book-coa-form-header__actions {
    flex-wrap: wrap;
  }

  .book-po-form-page .book-coa-form-header__actions .btn,
  .book-po-receive-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 1200px) {
  .book-po-kpi { grid-template-columns: repeat(2, 1fr); }
  .book-po-header__counts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-po-table-wrap { display: none; }
  .book-po-table-card .book-po-cards { display: block; padding: var(--space-3); }
  .book-po-reports-grid { grid-template-columns: 1fr; }
}

/* ---- Book bills module ---- */
.book-bill-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-bill-header__counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.book-bill-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-bill-table-card .book-bill-cards {
  display: none;
}

.book-bill-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  background: var(--surface-card);
}

.book-bill-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-bill-card__name {
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-1);
}

.book-bill-card__meta {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-bill-card__amounts {
  display: flex;
  justify-content: space-between;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
}

.book-bill-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-bill-report-item {
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
}

.book-bill-report-item span {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-bill-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── Bill full-page form ── */
.book-bill-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-bill-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-bill-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-bill-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-bill-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-bill-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-bill-form-copy-note {
  margin: 0 0 var(--space-2);
}

.book-bill-items-table-wrap {
  overflow-x: auto;
}

.book-bill-items-table {
  width: 100%;
  min-width: 640px;
}

.book-bill-items-table .col-type { width: 110px; min-width: 100px; }
.book-bill-items-table .col-qty { width: 90px; min-width: 80px; }
.book-bill-items-table .col-rate { width: 110px; min-width: 100px; }
.book-bill-items-table .col-tax { width: 90px; min-width: 80px; }
.book-bill-items-table .col-amt { width: 120px; min-width: 100px; }
.book-bill-items-table .col-rm { width: 44px; min-width: 44px; }

.book-bill-form-aside {
  position: sticky;
  top: var(--space-4);
}

.book-bill-totals-card {
  padding: var(--space-5);
}

.book-bill-totals {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-bill-totals-row {
  display: grid;
  grid-template-columns: 1fr minmax(0, 140px);
  gap: var(--space-3);
  align-items: center;
}

.book-bill-totals-row span {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.book-bill-totals-row--grand span {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-bill-totals-row--grand .form-control {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

.book-bill-totals-meta {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-color);
}

@media (max-width: 960px) {
  .book-bill-form-layout {
    grid-template-columns: 1fr;
  }

  .book-bill-form-aside {
    position: static;
  }

  .book-bill-form-page .book-coa-form-header__actions {
    flex-wrap: wrap;
  }

  .book-bill-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 1200px) {
  .book-bill-kpi { grid-template-columns: repeat(2, 1fr); }
  .book-bill-header__counts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-bill-table-wrap { display: none; }
  .book-bill-table-card .book-bill-cards { display: block; padding: var(--space-3); }
  .book-bill-reports-grid { grid-template-columns: 1fr; }
}

/* ---- Book receipts module ---- */
.book-rcp-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-rcp-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-rcp-table-card .book-rcp-cards {
  display: none;
}

.book-rcp-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  margin-bottom: var(--space-3);
}

.book-rcp-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-rcp-card__name {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.book-rcp-card__meta {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-rcp-card__amount {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.book-rcp-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-rcp-report-item {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-rcp-report-item span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-rcp-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-rcp-form .form-section-title {
  margin: var(--space-3) 0 var(--space-2);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

/* ── Sales Receipt full-page form ── */
.book-rcp-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-rcp-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-rcp-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-rcp-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-rcp-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-rcp-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-rcp-pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.book-rcp-pay-method {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.book-rcp-alloc-table-wrap {
  overflow-x: auto;
}

.book-rcp-alloc-table {
  width: 100%;
  min-width: 480px;
}

.book-rcp-alloc-table .col-due { width: 140px; min-width: 120px; }
.book-rcp-alloc-table .col-pay { width: 160px; min-width: 140px; }

.book-rcp-form-aside {
  position: sticky;
  top: var(--space-4);
}

.book-rcp-amount-card {
  padding: var(--space-5);
}

.book-rcp-amount-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-rcp-amount-fields .form-group {
  margin-bottom: 0;
}

.book-rcp-amount-meta {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-color);
}

@media (max-width: 1100px) {
  .book-rcp-form-layout {
    grid-template-columns: 1fr;
  }

  .book-rcp-form-aside {
    position: static;
  }
}

@media (max-width: 768px) {
  .book-rcp-form-page .book-coa-form-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .book-rcp-form-page .book-coa-form-header__actions {
    width: 100%;
    justify-content: stretch;
  }

  .book-rcp-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .book-rcp-form-aside {
    min-width: 0;
  }
}

@media (max-width: 1200px) {
  .book-rcp-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-rcp-table-wrap { display: none; }
  .book-rcp-table-card .book-rcp-cards { display: block; padding: var(--space-3); }
  .book-rcp-reports-grid { grid-template-columns: 1fr; }
}

/* ---- Book bill payments module ---- */
.book-bpay-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-bpay-header__counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.book-bpay-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-bpay-table-card .book-bpay-cards {
  display: none;
}

.book-bpay-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  margin-bottom: var(--space-3);
}

.book-bpay-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-bpay-card__name {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.book-bpay-card__meta {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-bpay-card__amount {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.book-bpay-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-bpay-report-item {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-bpay-report-item span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-bpay-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── Bill Payment full-page form ── */
.book-bpay-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-bpay-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-bpay-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-bpay-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-bpay-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-bpay-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-bpay-pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.book-bpay-pay-method {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.book-bpay-prepay-note {
  margin: calc(var(--space-2) * -1) 0 var(--space-3);
}

.book-bpay-alloc-table-wrap {
  overflow-x: auto;
}

.book-bpay-alloc-table {
  width: 100%;
  min-width: 480px;
}

.book-bpay-alloc-table .col-due { width: 140px; min-width: 120px; }
.book-bpay-alloc-table .col-pay { width: 160px; min-width: 140px; }

.book-bpay-form-aside {
  position: sticky;
  top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-bpay-amount-card {
  padding: var(--space-5);
}

.book-bpay-amount-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-bpay-amount-fields .form-group {
  margin-bottom: 0;
}

.book-bpay-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-color);
}

.book-bpay-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
}

.book-bpay-summary-item span {
  color: var(--text-muted);
}

.book-bpay-alloc-status-wrap {
  margin-top: var(--space-3);
}

.book-bpay-amount-meta {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-color);
}

.book-bpay-gl-preview {
  padding: var(--space-5);
}

.book-bpay-gl-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--border-color);
}

.book-bpay-gl-line:last-child {
  border-bottom: none;
}

@media (max-width: 1100px) {
  .book-bpay-form-layout {
    grid-template-columns: 1fr;
  }

  .book-bpay-form-aside {
    position: static;
  }
}

@media (max-width: 768px) {
  .book-bpay-form-page .book-coa-form-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .book-bpay-form-page .book-coa-form-header__actions {
    width: 100%;
    justify-content: stretch;
  }

  .book-bpay-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .book-bpay-form-aside {
    min-width: 0;
  }
}

.book-bpay-form .form-section-title {
  margin: var(--space-3) 0 var(--space-2);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-bpay-form .bill-alloc-table {
  width: 100%;
  margin: var(--space-2) 0;
}

.book-bpay-form .bill-alloc-table th,
.book-bpay-form .bill-alloc-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 1200px) {
  .book-bpay-kpi { grid-template-columns: repeat(2, 1fr); }
  .book-bpay-header__counts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-bpay-table-wrap { display: none; }
  .book-bpay-table-card .book-bpay-cards { display: block; padding: var(--space-3); }
  .book-bpay-reports-grid { grid-template-columns: 1fr; }
}

/* ---- Book expenses module ---- */
.book-exp-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-exp-header__counts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-exp-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-exp-table-card .book-exp-cards {
  display: none;
}

.book-exp-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  margin-bottom: var(--space-3);
}

.book-exp-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-exp-card__name {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.book-exp-card__meta {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-exp-card__amount {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.book-exp-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-exp-report-item {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-exp-report-item span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-exp-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-exp-form .form-section-title {
  margin: var(--space-3) 0 var(--space-2);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

/* ── Expense full-page form ── */
.book-exp-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-exp-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-exp-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-exp-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-exp-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-exp-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-exp-form-copy-note {
  margin: 0 0 var(--space-2);
}

.book-exp-pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.book-exp-pay-method {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.book-exp-form-aside {
  position: sticky;
  top: var(--space-4);
}

.book-exp-amount-card {
  padding: var(--space-5);
}

.book-exp-amount-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-exp-total-field .form-control {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

@media (max-width: 960px) {
  .book-exp-form-layout {
    grid-template-columns: 1fr;
  }

  .book-exp-form-aside {
    position: static;
  }

  .book-exp-form-page .book-coa-form-header__actions {
    flex-wrap: wrap;
  }

  .book-exp-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

.book-exp-attachment {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}

.book-exp-attachment__preview {
  max-width: 100%;
  max-height: 240px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

@media (max-width: 1200px) {
  .book-exp-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-exp-table-wrap { display: none; }
  .book-exp-table-card .book-exp-cards { display: block; padding: var(--space-3); }
  .book-exp-reports-grid { grid-template-columns: 1fr; }
}

/* ---- Book bank accounts module ---- */
.book-bank-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-bank-header__counts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-bank-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-bank-kpi__status {
  font-size: var(--font-size-lg);
}

.book-bank-table-card .book-bank-cards {
  display: none;
}

.book-bank-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  margin-bottom: var(--space-3);
}

.book-bank-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-bank-card__type {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-bank-card__balance {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.book-bank-card__meta {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.book-bank-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-bank-report-item {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-bank-report-item span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-bank-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── Bank account full-page form ── */
.book-bank-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-bank-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-bank-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-bank-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-bank-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-bank-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-bank-type-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.book-bank-form-aside {
  position: sticky;
  top: var(--space-4);
}

.book-bank-form-note-card {
  padding: var(--space-5);
}

.book-bank-form-note {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .book-bank-form-layout {
    grid-template-columns: 1fr;
  }

  .book-bank-form-aside {
    position: static;
  }

  .book-bank-form-page .book-coa-form-header__actions {
    flex-wrap: wrap;
  }

  .book-bank-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

.book-bank-form .form-section-title {
  margin: var(--space-3) 0 var(--space-2);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

@media (max-width: 1200px) {
  .book-bank-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-bank-table-wrap { display: none; }
  .book-bank-table-card .book-bank-cards { display: block; padding: var(--space-3); }
  .book-bank-reports-grid { grid-template-columns: 1fr; }
}

/* ---- Book transactions module ---- */
.book-btx-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-btx-header__counts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-btx-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-btx-kpi__status {
  font-size: var(--font-size-lg);
}

.book-btx-table-card .book-btx-cards {
  display: none;
}

.book-btx-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  margin-bottom: var(--space-3);
}

.book-btx-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-btx-card__meta {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-btx-card__amount {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-1);
}

.book-btx-card__desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.book-btx-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-btx-report-item {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-btx-report-item span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-btx-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── Bank transaction full-page form ── */
.book-btx-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-btx-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-btx-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-btx-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-btx-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-btx-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-btx-type-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.book-btx-form-aside {
  position: sticky;
  top: var(--space-4);
}

.book-btx-form-note-card {
  padding: var(--space-5);
}

.book-btx-form-note {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .book-btx-form-layout {
    grid-template-columns: 1fr;
  }

  .book-btx-form-aside {
    position: static;
  }

  .book-btx-form-page .book-coa-form-header__actions {
    flex-wrap: wrap;
  }

  .book-btx-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 1200px) {
  .book-btx-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-btx-table-wrap { display: none; }
  .book-btx-table-card .book-btx-cards { display: block; padding: var(--space-3); }
  .book-btx-reports-grid { grid-template-columns: 1fr; }
}

/* ── Bank transfer full-page form ── */
.book-trf-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-trf-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-trf-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-trf-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-trf-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-trf-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-trf-form-aside {
  position: sticky;
  top: var(--space-4);
}

.book-trf-form-note-card {
  padding: var(--space-5);
}

.book-trf-form-note {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .book-trf-form-layout {
    grid-template-columns: 1fr;
  }

  .book-trf-form-aside {
    position: static;
  }

  .book-trf-form-page .book-coa-form-header__actions {
    flex-wrap: wrap;
  }

  .book-trf-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

/* ΓöÇΓöÇ AUD Bank Transfers ΓöÇΓöÇ */
.book-trf-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-trf-header__counts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-trf-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-trf-kpi__acct {
  font-size: var(--font-size-md);
}

.book-trf-table-card .book-trf-cards {
  display: none;
}

.book-trf-table .book-trf-arrow {
  width: 32px;
  text-align: center;
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

.book-trf-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  margin-bottom: var(--space-3);
}

.book-trf-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-trf-card__flow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.book-trf-card__arrow {
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

.book-trf-card__amount {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-1);
}

.book-trf-card__meta {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.book-trf-detail-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--page-bg-subtle);
}

.book-trf-detail-flow__acct {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  text-align: center;
}

.book-trf-detail-flow__label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.book-trf-detail-flow__arrow {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

.book-trf-form__arrow {
  text-align: center;
  padding: var(--space-2) 0;
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.book-trf-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-trf-report-item {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-trf-report-item span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-trf-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (max-width: 1200px) {
  .book-trf-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-trf-table-wrap { display: none; }
  .book-trf-table-card .book-trf-cards { display: block; padding: var(--space-3); }
  .book-trf-reports-grid { grid-template-columns: 1fr; }
  .book-trf-detail-flow { flex-direction: column; }
  .book-trf-detail-flow__arrow { transform: rotate(90deg); }
}

/* ΓöÇΓöÇ AUD Bank Reconciliation ΓöÇΓöÇ */
.book-brec-page,
.book-brec-work,
.book-brec-report {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-brec-header__counts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.book-brec-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-brec-table-card .book-brec-cards {
  display: none;
}

.book-brec-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  margin-bottom: var(--space-3);
}

.book-brec-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-brec-card__meta,
.book-brec-card__period {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.book-brec-card__amount {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-3);
}

.book-brec-start-form {
  border: 1px solid var(--border-color);
}

.book-brec-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--page-bg-subtle);
}

.book-brec-preview__item span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-brec-preview__diff--ok { color: var(--color-success); }
.book-brec-preview__diff--warn { color: var(--color-danger); }

.book-brec-form__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.book-brec-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-brec-report-item {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-brec-report-item span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-brec-work-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.book-brec-work-stat {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.book-brec-work-stat span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.book-brec-diff--ok strong { color: var(--color-success); }
.book-brec-diff--warn strong { color: var(--color-danger); }

.book-brec-diff-banner {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.book-brec-diff-banner.book-brec-diff--ok {
  background: var(--color-success-light);
  color: var(--color-success-text);
  border: 1px solid var(--color-success);
}

.book-brec-diff-banner.book-brec-diff--warn {
  background: var(--color-warning-light);
  color: var(--color-warning-text);
  border: 1px solid var(--color-warning);
}

.book-brec-progress__header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-2);
}

.book-brec-progress__bar {
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.book-brec-progress__fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.book-brec-work-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-4);
}

.book-brec-work-toolbar__left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.book-brec-dropzone {
  padding: var(--space-2) var(--space-4);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.book-brec-dropzone:hover,
.book-brec-dropzone--active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.book-brec-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.book-brec-split__scroll {
  max-height: 420px;
  overflow: auto;
}

.book-brec-row--selected {
  background: var(--color-primary-light) !important;
}

.book-brec-row--matched {
  opacity: 0.85;
}

.book-brec-matched-tag {
  color: var(--color-success);
  font-weight: var(--font-weight-bold);
}

.book-brec-match-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--page-bg-subtle);
  margin-bottom: var(--space-2);
}

.book-brec-match-pair__side {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
}

.book-brec-match-pair__date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.book-brec-match-pair__badge {
  padding: var(--space-1) var(--space-2);
  background: var(--color-success-light);
  color: var(--color-success-text);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .book-brec-kpi,
  .book-brec-work-stats { grid-template-columns: repeat(2, 1fr); }
  .book-brec-split { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .book-brec-table-wrap { display: none; }
  .book-brec-table-card .book-brec-cards { display: block; padding: var(--space-3); }
  .book-brec-reports-grid { grid-template-columns: 1fr; }
  .book-brec-preview { grid-template-columns: 1fr; }
  .book-brec-match-pair { grid-template-columns: 1fr; text-align: center; }
}

/* ΓöÇΓöÇ Chart of Accounts ΓöÇΓöÇ */
.book-coa-page,
.book-coa-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-coa-table-card {
  padding: var(--space-4);
}

.book-coa-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-coa-empty {
  padding: var(--space-2) 0;
}

.book-coa-table-wrap {
  overflow-x: auto;
}

.book-coa-header__counts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-coa-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-coa-group__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: none;
  background: var(--page-bg-subtle);
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.book-coa-group__chevron {
  color: var(--text-muted);
  width: 16px;
}

.book-coa-group__count {
  margin-left: auto;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.book-coa-group__body {
  border-top: 1px solid var(--border-color);
}

.book-coa-row--child td:nth-child(2) {
  padding-left: var(--space-6);
}

.book-coa-lock {
  opacity: 0.85;
}

.book-coa-type-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.book-coa-type--asset { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.book-coa-type--liability { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.book-coa-type--equity { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.book-coa-type--revenue { background: rgba(16, 185, 129, 0.12); color: #059669; }
.book-coa-type--expense { background: rgba(249, 115, 22, 0.12); color: #ea580c; }

.book-coa-group__head.book-coa-type--asset { border-left: 4px solid #2563eb; }
.book-coa-group__head.book-coa-type--liability { border-left: 4px solid #dc2626; }
.book-coa-group__head.book-coa-type--equity { border-left: 4px solid #7c3aed; }
.book-coa-group__head.book-coa-type--revenue { border-left: 4px solid #059669; }
.book-coa-group__head.book-coa-type--expense { border-left: 4px solid #ea580c; }

.book-coa-system-banner {
  padding: var(--space-3) var(--space-4);
  background: var(--color-warning-light);
  color: var(--color-warning-text);
  border: 1px solid var(--color-warning);
  font-size: var(--font-size-sm);
}

.book-coa-mapping-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-coa-mapping-item {
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-coa-mapping-item span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

@media (max-width: 1200px) {
  .book-coa-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-coa-mapping-grid { grid-template-columns: 1fr; }
  .book-coa-table-wrap { overflow-x: auto; }
}

/* ── Chart of Accounts — opening balance form ── */
.book-coa-opening-balance-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
}

.book-coa-opening-balance-form__body {
  padding: var(--space-5);
}

.book-coa-opening-balance-form-page .book-coa-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (max-width: 768px) {
  .book-coa-opening-balance-form-page .book-coa-form-fields {
    grid-template-columns: 1fr;
  }

  .book-coa-opening-balance-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

/* ── Chart of Accounts — account mapping / system conversion form ── */
.book-coa-mapping-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
}

.book-coa-mapping-form__body {
  padding: var(--space-5);
}

.book-coa-mapping-form__actions {
  flex-wrap: wrap;
}

.book-coa-convert-swap {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

@media (max-width: 768px) {
  .book-coa-mapping-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

/* ── Chart of Accounts — create/edit form ── */
.book-coa-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-coa-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-coa-form-header__main {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.book-coa-form-header__titles {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.book-coa-form-eyebrow {
  margin: 0;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.book-coa-form-title {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  line-height: 1.25;
}

.book-coa-form-identity {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.book-coa-form-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.book-coa-form-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full, 999px);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--border-color);
  background: var(--page-bg-subtle);
  color: var(--text-secondary);
}

.book-coa-form-badge--active {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.book-coa-form-badge--inactive {
  border-color: var(--border-color);
  background: var(--page-bg-subtle);
  color: var(--text-muted);
}

.book-coa-form-badge--system,
.book-coa-form-badge--locked {
  border-color: rgba(245, 158, 11, 0.35);
  background: var(--color-warning-light);
  color: var(--color-warning-text);
}

.book-coa-form-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.book-coa-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--space-4);
  align-items: start;
}

.book-coa-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-coa-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-coa-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-coa-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.book-coa-context-item {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-coa-context-item__label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}

.book-coa-context-item__value {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

.book-coa-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-coa-form-span-2 {
  grid-column: 1 / -1;
}

.book-coa-parent-field .book-coa-parent-search {
  margin-bottom: var(--space-2);
}

.book-coa-parent-select {
  max-height: 220px;
}

.book-coa-form-system-banner {
  margin-bottom: var(--space-4);
  border-radius: var(--radius);
}

.book-coa-toggle-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-coa-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--page-bg-subtle);
}

.book-coa-toggle-row__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.book-coa-toggle-row__label {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

.book-coa-toggle-row__hint {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  line-height: 1.45;
}

.book-coa-form-aside {
  position: sticky;
  top: var(--space-4);
}

.book-coa-summary-card {
  padding: var(--space-5);
}

.book-coa-form-page .book-qt-summary__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-color);
}

.book-coa-form-page .book-qt-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--font-size-sm);
}

.book-coa-form-page .book-qt-summary-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.book-coa-form-page .book-qt-summary-row .book-coa-type-pill {
  font-size: var(--font-size-xs);
  padding: 2px 8px;
}

.book-coa-summary-system strong {
  color: var(--color-warning-text);
}

.book-coa-form-page .book-qt-summary__posting {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-color);
}

@media (max-width: 1100px) {
  .book-coa-form-layout {
    grid-template-columns: 1fr;
  }

  .book-coa-form-aside {
    position: static;
  }
}

@media (max-width: 768px) {
  .book-coa-form-header {
    flex-direction: column;
  }

  .book-coa-form-header__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .book-coa-context-grid,
  .book-coa-form-fields {
    grid-template-columns: 1fr;
  }

  .book-coa-form-span-2 {
    grid-column: auto;
  }

  .book-coa-toggle-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .book-coa-toggle {
    align-self: flex-end;
  }
}

/* ── Party master forms (customers, vendors) — full-page ── */
.book-cust-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-cust-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 880px;
}

.book-cust-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-cust-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-cust-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-cust-form-page .book-cust-type-row {
  margin-top: var(--space-1);
}

@media (max-width: 768px) {
  .book-cust-form-main {
    max-width: none;
  }
}

/* ── Estimate full-page form ── */
.book-est-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-est-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-est-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-est-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-est-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-est-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-est-items-table-wrap {
  overflow-x: auto;
}

.book-est-items-table {
  width: 100%;
  min-width: 560px;
}

.book-est-items-table .col-qty { width: 100px; min-width: 90px; }
.book-est-items-table .col-rate { width: 120px; min-width: 100px; }
.book-est-items-table .col-amt { width: 120px; min-width: 100px; }
.book-est-items-table .col-rm { width: 44px; }

.book-est-customer-preview {
  margin-top: var(--space-1);
}

.book-est-customer-preview__full {
  grid-column: 1 / -1;
}

.book-est-form-aside {
  position: sticky;
  top: var(--space-4);
}

.book-est-totals-card {
  padding: var(--space-5);
}

.book-est-totals {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-est-totals-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.book-est-totals-row span {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.book-est-totals-row--grand {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 2px solid var(--color-primary);
}

.book-est-totals-row--grand span {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

.book-est-totals-row--grand input {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

.book-est-totals-meta {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-color);
}

@media (max-width: 1100px) {
  .book-est-form-layout {
    grid-template-columns: 1fr;
  }

  .book-est-form-aside {
    position: static;
  }
}

@media (max-width: 768px) {
  .book-est-form-page .book-coa-form-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .book-est-form-page .book-coa-form-header__actions {
    width: 100%;
    justify-content: stretch;
  }

  .book-est-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .book-est-form-aside {
    min-width: 0;
  }
}

/* ── Invoice full-page form ── */
.book-inv-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-inv-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-inv-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-inv-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-inv-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-inv-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-inv-items-table-wrap {
  overflow-x: auto;
}

.book-inv-items-table {
  width: 100%;
  min-width: 560px;
}

.book-inv-items-table .col-qty { width: 100px; min-width: 90px; }
.book-inv-items-table .col-rate { width: 120px; min-width: 100px; }
.book-inv-items-table .col-amt { width: 120px; min-width: 100px; }
.book-inv-items-table .col-rm { width: 44px; }

.book-inv-customer-preview {
  margin-top: var(--space-1);
}

.book-inv-customer-preview__full {
  grid-column: 1 / -1;
}

.book-inv-form-aside {
  position: sticky;
  top: var(--space-4);
}

.book-inv-totals-card {
  padding: var(--space-5);
}

.book-inv-totals {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-inv-totals-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.book-inv-totals-row span {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.book-inv-totals-row--grand {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 2px solid var(--color-primary);
}

.book-inv-totals-row--grand span {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

.book-inv-totals-row--grand input {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

.book-inv-totals-meta {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-color);
}

@media (max-width: 1100px) {
  .book-inv-form-layout {
    grid-template-columns: 1fr;
  }

  .book-inv-form-aside {
    position: static;
  }
}

@media (max-width: 768px) {
  .book-inv-form-page .book-coa-form-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .book-inv-form-page .book-coa-form-header__actions {
    width: 100%;
    justify-content: stretch;
  }

  .book-inv-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .book-inv-form-aside {
    min-width: 0;
  }
}

/* ── Invoice receive payment full-page ── */
.book-inv-pay-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-inv-pay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-inv-pay-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-inv-pay-page .book-qt-section {
  padding: var(--space-5);
}

.book-inv-pay-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-inv-pay-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-inv-pay-alloc-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-inv-pay-alloc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
}

.book-inv-pay-alloc-row span {
  color: var(--text-muted);
}

.book-inv-pay-aside {
  position: sticky;
  top: var(--space-4);
}

.book-inv-pay-summary-card {
  padding: var(--space-5);
}

.book-inv-pay-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-inv-pay-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
}

.book-inv-pay-summary-row span {
  color: var(--text-muted);
}

.book-inv-pay-summary-row--grand {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 2px solid var(--color-primary);
}

.book-inv-pay-summary-row--grand span {
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}

@media (max-width: 960px) {
  .book-inv-pay-layout {
    grid-template-columns: 1fr;
  }

  .book-inv-pay-aside {
    position: static;
  }

  .book-inv-pay-page .book-coa-form-header__actions {
    flex-wrap: wrap;
  }

  .book-inv-pay-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

/* ── Opening Balance full-page session ── */
.book-opening-balance-form-page,
.book-ob-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  max-width: 100%;
  min-width: 0;
}

.book-opening-balance-journal-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
}

.book-ob-journal-card {
  padding: var(--space-5);
}

.book-ob-journal-meta {
  font-size: var(--font-size-sm);
}

.book-ob-journal-table tfoot th {
  border-top: 2px solid var(--border-color);
  font-weight: var(--font-weight-bold);
}

/* ── Expense Category full-page form ── */
.book-expense-category-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  padding-bottom: var(--space-6);
}

.book-expense-category-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-leave-type-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  padding-bottom: var(--space-6);
}

.book-leave-type-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-hr-leave-type-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  padding-bottom: var(--space-6);
}

.book-hr-leave-type-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-dash-punch-correct-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 820px;
  padding-bottom: var(--space-6);
}

.book-dash-punch-correct-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-emp-missing-punch-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 820px;
  padding-bottom: var(--space-6);
}

.book-emp-missing-punch-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-admin-reset-pwd-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 820px;
  padding-bottom: var(--space-6);
}

.book-admin-reset-pwd-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-acct-change-pwd-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 820px;
  padding-bottom: var(--space-6);
}

.book-acct-change-pwd-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-dash-punch-correct-form .grid-col-span-2 {
  grid-column: 1 / -1;
}

.book-leave-info-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 820px;
  padding-bottom: var(--space-6);
}

/* ── Full-page Leave & Holiday Calendars (modern ERP layout) ── */
.book-holiday-calendar-page,
.book-leave-calendar-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-bottom: var(--space-6);
  max-width: 1200px;
}

.book-holiday-calendar-page .book-hr-leave-inline-cal,
.book-leave-calendar-page .book-hr-leave-inline-cal {
  max-width: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: none;
  overflow: hidden;
}

.erp-calendar-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.erp-calendar-header__back {
  margin-top: 2px;
  color: var(--text-muted);
  font-weight: 500;
}

.erp-calendar-header__back:hover,
.erp-calendar-header__back:focus-visible {
  color: var(--text-primary);
  background: var(--page-bg);
}

.erp-calendar-header__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.erp-calendar-header__context {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.erp-calendar-header__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

.erp-calendar-header__meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.erp-calendar-header__actions {
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.erp-calendar-mgmt-btn {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary, var(--text-muted));
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.erp-calendar-mgmt-btn:hover,
.erp-calendar-mgmt-btn:focus-visible {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--border-color));
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 6%, var(--card-bg));
}

.erp-calendar-card__body {
  padding: var(--space-5);
}

.erp-calendar-legend {
  margin-bottom: var(--space-4);
}

.book-holiday-calendar-page .erp-calendar-legend .book-hr-leave-cal-legend,
.book-leave-calendar-page .erp-calendar-legend .book-hr-leave-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: 0;
}

.book-holiday-calendar-page .book-hr-leave-cal-legend-item,
.book-leave-calendar-page .book-hr-leave-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary, var(--text-primary));
}

.book-holiday-calendar-page .book-hr-leave-cal-legend-item::before,
.book-leave-calendar-page .book-hr-leave-cal-legend-item::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.book-holiday-calendar-page .book-hr-leave-cal-legend-item.book-hr-leave-cal-cell--approved::before,
.book-leave-calendar-page .book-hr-leave-cal-legend-item.book-hr-leave-cal-cell--approved::before {
  background: var(--color-success, #16a34a);
}

.book-holiday-calendar-page .book-hr-leave-cal-legend-item.book-hr-leave-cal-cell--pending::before,
.book-leave-calendar-page .book-hr-leave-cal-legend-item.book-hr-leave-cal-cell--pending::before {
  background: var(--color-warning, #d97706);
}

.book-holiday-calendar-page .book-hr-leave-cal-legend-item.book-hr-leave-cal-cell--holiday::before,
.book-leave-calendar-page .book-hr-leave-cal-legend-item.book-hr-leave-cal-cell--holiday::before {
  background: var(--color-primary, #2563eb);
}

.book-holiday-calendar-page .book-hr-leave-cal-legend-item.book-hr-leave-cal-cell--weekend::before,
.book-leave-calendar-page .book-hr-leave-cal-legend-item.book-hr-leave-cal-cell--weekend::before {
  background: var(--text-muted);
}

.erp-calendar-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--page-bg);
}

.book-holiday-calendar-page .erp-calendar-toolbar .book-hr-leave-cal-nav,
.book-leave-calendar-page .erp-calendar-toolbar .book-hr-leave-cal-nav {
  display: contents;
}

.book-holiday-calendar-page .erp-calendar-toolbar .book-hr-leave-cal-nav .btn,
.book-leave-calendar-page .erp-calendar-toolbar .book-hr-leave-cal-nav .btn {
  min-width: 88px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--card-bg);
}

.book-holiday-calendar-page .erp-calendar-toolbar .book-hr-leave-cal-nav .btn:hover,
.book-leave-calendar-page .erp-calendar-toolbar .book-hr-leave-cal-nav .btn:focus-visible,
.book-holiday-calendar-page .erp-calendar-toolbar .book-hr-leave-cal-nav .btn:hover,
.book-leave-calendar-page .erp-calendar-toolbar .book-hr-leave-cal-nav .btn:focus-visible {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--border-color));
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 6%, var(--card-bg));
}

.book-holiday-calendar-page .erp-calendar-toolbar #hol-cal-prev,
.book-leave-calendar-page .erp-calendar-toolbar #leave-cal-prev {
  grid-column: 1;
  justify-self: start;
}

.book-holiday-calendar-page .erp-calendar-toolbar #hol-cal-next,
.book-leave-calendar-page .erp-calendar-toolbar #leave-cal-next {
  grid-column: 3;
  justify-self: end;
}

.erp-calendar-toolbar__title {
  grid-column: 2;
  text-align: center;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.erp-calendar-grid-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-holiday-calendar-page .erp-calendar-grid-wrap .book-hr-leave-cal-grid,
.book-leave-calendar-page .erp-calendar-grid-wrap .book-hr-leave-cal-grid {
  min-width: 640px;
  gap: 6px;
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.book-holiday-calendar-page .book-hr-leave-cal-dow,
.book-leave-calendar-page .book-hr-leave-cal-dow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 0 var(--space-2);
  margin-bottom: var(--space-1);
  border-bottom: 1px solid var(--border-color);
}

.book-holiday-calendar-page .book-hr-leave-cal-cell,
.book-leave-calendar-page .book-hr-leave-cal-cell {
  min-height: 92px;
  padding: var(--space-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.book-holiday-calendar-page .book-hr-leave-cal-cell:hover,
.book-leave-calendar-page .book-hr-leave-cal-cell:hover {
  border-color: color-mix(in srgb, var(--color-primary) 25%, var(--border-color));
  box-shadow: 0 1px 3px color-mix(in srgb, var(--text-primary) 6%, transparent);
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--empty,
.book-leave-calendar-page .book-hr-leave-cal-cell--empty {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--empty:hover,
.book-leave-calendar-page .book-hr-leave-cal-cell--empty:hover {
  box-shadow: none;
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--weekend,
.book-leave-calendar-page .book-hr-leave-cal-cell--weekend {
  background: color-mix(in srgb, var(--text-muted) 7%, var(--card-bg));
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--holiday,
.book-leave-calendar-page .book-hr-leave-cal-cell--holiday {
  background: color-mix(in srgb, var(--color-primary, #2563eb) 10%, var(--card-bg));
  border-color: color-mix(in srgb, var(--color-primary, #2563eb) 28%, var(--border-color));
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--approved,
.book-leave-calendar-page .book-hr-leave-cal-cell--approved {
  background: color-mix(in srgb, var(--color-success, #16a34a) 12%, var(--card-bg));
  border-color: color-mix(in srgb, var(--color-success, #16a34a) 30%, var(--border-color));
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--pending,
.book-leave-calendar-page .book-hr-leave-cal-cell--pending {
  background: color-mix(in srgb, var(--color-warning, #d97706) 12%, var(--card-bg));
  border-color: color-mix(in srgb, var(--color-warning, #d97706) 30%, var(--border-color));
}

.book-holiday-calendar-page .book-hr-leave-cal-day,
.book-leave-calendar-page .book-hr-leave-cal-day {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--weekend .book-hr-leave-cal-day,
.book-leave-calendar-page .book-hr-leave-cal-cell--weekend .book-hr-leave-cal-day {
  color: var(--text-muted);
}

.book-holiday-calendar-page .book-hr-leave-cal-tag,
.book-leave-calendar-page .book-hr-leave-cal-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-secondary, var(--text-primary));
  background: color-mix(in srgb, var(--text-muted) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--text-muted) 18%, transparent);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--approved .book-hr-leave-cal-tag,
.book-leave-calendar-page .book-hr-leave-cal-cell--approved .book-hr-leave-cal-tag {
  background: color-mix(in srgb, var(--color-success, #16a34a) 16%, var(--card-bg));
  border-color: color-mix(in srgb, var(--color-success, #16a34a) 28%, transparent);
  color: color-mix(in srgb, var(--color-success, #16a34a) 85%, var(--text-primary));
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--approved .book-hr-leave-cal-tag::before,
.book-leave-calendar-page .book-hr-leave-cal-cell--approved .book-hr-leave-cal-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--color-success, #16a34a);
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--pending .book-hr-leave-cal-tag,
.book-leave-calendar-page .book-hr-leave-cal-cell--pending .book-hr-leave-cal-tag {
  background: color-mix(in srgb, var(--color-warning, #d97706) 16%, var(--card-bg));
  border-color: color-mix(in srgb, var(--color-warning, #d97706) 28%, transparent);
  color: color-mix(in srgb, var(--color-warning, #d97706) 85%, var(--text-primary));
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--holiday .book-hr-leave-cal-tag,
.book-leave-calendar-page .book-hr-leave-cal-cell--holiday .book-hr-leave-cal-tag {
  background: color-mix(in srgb, var(--color-primary, #2563eb) 14%, var(--card-bg));
  border-color: color-mix(in srgb, var(--color-primary, #2563eb) 26%, transparent);
  color: color-mix(in srgb, var(--color-primary, #2563eb) 80%, var(--text-primary));
}

.book-holiday-calendar-page .book-hr-leave-cal-cell--weekend .book-hr-leave-cal-tag,
.book-leave-calendar-page .book-hr-leave-cal-cell--weekend .book-hr-leave-cal-tag {
  background: color-mix(in srgb, var(--text-muted) 12%, var(--card-bg));
  border-color: color-mix(in srgb, var(--text-muted) 22%, transparent);
  color: var(--text-muted);
}

@media (max-width: 992px) {
  .erp-calendar-header {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .erp-calendar-header__back {
    justify-self: start;
  }

  .erp-calendar-header__actions {
    justify-self: start;
  }

  .book-holiday-calendar-page .book-hr-leave-cal-cell,
  .book-leave-calendar-page .book-hr-leave-cal-cell {
    min-height: 72px;
  }
}

@media (max-width: 768px) {
  .erp-calendar-toolbar {
    grid-template-columns: 1fr;
    gap: var(--space-2);
    text-align: center;
  }

  .book-holiday-calendar-page .erp-calendar-toolbar #hol-cal-prev,
  .book-leave-calendar-page .erp-calendar-toolbar #leave-cal-prev,
  .book-holiday-calendar-page .erp-calendar-toolbar #hol-cal-next,
  .book-leave-calendar-page .erp-calendar-toolbar #leave-cal-next,
  .erp-calendar-toolbar__title {
    grid-column: 1;
    justify-self: center;
  }

  .book-holiday-calendar-page .book-hr-leave-cal-cell,
  .book-leave-calendar-page .book-hr-leave-cal-cell {
    min-height: 64px;
    padding: var(--space-1);
  }

  .book-holiday-calendar-page .book-hr-leave-cal-day,
  .book-leave-calendar-page .book-hr-leave-cal-day {
    font-size: 0.8125rem;
  }
}

.book-leave-info-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-ast-rpt-cols-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  padding-bottom: var(--space-6);
}

.book-ast-rpt-cols-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-ast-rpt-cols-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.book-ast-rpt-cols-check {
  margin: 0;
}

@media (max-width: 640px) {
  .book-ast-rpt-cols-grid {
    grid-template-columns: 1fr;
  }
}

.book-overtime-type-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  padding-bottom: var(--space-6);
}

.book-overtime-type-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-overtime-global-rules-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  padding-bottom: var(--space-6);
}

.book-overtime-global-rules-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-employment-type-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  padding-bottom: var(--space-6);
}

.book-employment-type-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-work-calendar-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 820px;
  padding-bottom: var(--space-6);
}

.book-work-calendar-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-load-sl-holidays-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  padding-bottom: var(--space-6);
}

.book-load-sl-holidays-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-shift-assignment-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 820px;
  padding-bottom: var(--space-6);
}

.book-shift-assignment-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-asset-transfer-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 820px;
  padding-bottom: var(--space-6);
}

.book-asset-transfer-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-asset-location-transfer-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 820px;
  padding-bottom: var(--space-6);
}

.book-asset-location-transfer-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-asset-disposal-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 920px;
  padding-bottom: var(--space-6);
}

.book-asset-disposal-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-biometric-device-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 920px;
  padding-bottom: var(--space-6);
}

.book-biometric-device-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-biometric-rebuild-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  padding-bottom: var(--space-6);
}

.book-biometric-rebuild-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-biometric-manual-sync-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  padding-bottom: var(--space-6);
}

.book-biometric-manual-sync-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-biometric-manual-sync-device {
  background: var(--page-bg-subtle, #f8fafc);
  pointer-events: none;
}

.book-salary-advance-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 920px;
  padding-bottom: var(--space-6);
}

.book-salary-advance-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-payroll-run-wizard-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 960px;
  padding-bottom: var(--space-6);
}

.book-payroll-run-wizard-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-payroll-run-wizard-form-page .book-payroll-run-emp-list {
  max-height: 360px;
  overflow-y: auto;
}

.book-employee-loan-disburse-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 920px;
  padding-bottom: var(--space-6);
}

.book-employee-loan-disburse-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-employee-loan-payment-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 920px;
  padding-bottom: var(--space-6);
}

.book-employee-loan-payment-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-employee-expense-reject-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 920px;
  padding-bottom: var(--space-6);
}

.book-employee-expense-reject-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-employee-expense-pay-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 920px;
  padding-bottom: var(--space-6);
}

.book-employee-expense-pay-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-ob-header-sticky {
  position: sticky;
  top: 0;
  z-index: 30;
}

.book-ob-header {
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.book-ob-header__status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.book-ob-header__locked-icon {
  font-size: var(--font-size-lg);
  opacity: 0.85;
}

.book-ob-status-badge {
  font-size: var(--font-size-sm);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.book-ob-badge--draft {
  background: var(--color-info-light);
  color: var(--color-info-text);
}

.book-ob-badge--locked {
  background: #f1f5f9;
  color: var(--text-secondary);
}

.book-ob-summary {
  grid-template-columns: repeat(4, 1fr);
}

.book-ob-summary-card {
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
}

.book-ob-summary-card__value {
  font-size: var(--font-size-xl);
}

.book-ob-fy-select {
  max-width: 100px;
  min-height: 32px;
  font-size: var(--font-size-sm);
  margin-top: var(--space-1);
}

.book-ob-diff-strip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: 12px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.book-ob-diff-strip--neutral {
  background: var(--page-bg-subtle);
  color: var(--text-muted);
}

.book-ob-diff-strip--ok {
  background: var(--color-success-light);
  color: var(--color-success-text);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.book-ob-diff-strip--warn {
  background: var(--color-danger-light);
  color: var(--color-danger-text);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.book-ob-diff-strip__icon {
  font-size: var(--font-size-md);
}

.book-ob-diff-strip__label {
  font-weight: var(--font-weight-bold);
}

.book-ob-diff-strip__value {
  margin-left: auto;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
}

.book-ob-toolbar {
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}

.book-ob-toolbar__filters {
  flex: 1;
  min-width: 280px;
}

.book-ob-toolbar__toggles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

.book-ob-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  user-select: none;
}

.book-ob-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.book-ob-toggle__track {
  width: 36px;
  height: 20px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.book-ob-toggle__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: var(--shadow-xs);
}

.book-ob-toggle input:checked + .book-ob-toggle__track {
  background: var(--color-primary);
}

.book-ob-toggle input:checked + .book-ob-toggle__track .book-ob-toggle__knob {
  transform: translateX(16px);
}

.book-ob-validation-panel {
  border-radius: 12px;
  border: 1px solid var(--color-warning);
  background: var(--color-warning-light);
  padding: var(--space-4);
}

.book-ob-validation-panel__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--color-warning-text);
}

.book-ob-validation-panel__icon {
  font-size: var(--font-size-lg);
}

.book-ob-validation-panel__summary {
  margin: var(--space-3) 0 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.book-ob-validation-panel__summary--ok {
  color: var(--color-success-text);
}

.book-ob-validation-panel__summary--fail {
  color: var(--color-danger-text);
}

.book-ob-table-card {
  padding: 0;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.book-ob-table-wrap {
  overflow-x: auto;
}

.book-ob-groups {
  display: flex;
  flex-direction: column;
}

.book-ob-groups--large {
  max-height: 65vh;
  overflow-y: auto;
}

.book-ob-row {
  content-visibility: auto;
  contain-intrinsic-size: auto 44px;
}

.book-ob-empty {
  padding: var(--space-6);
}

.book-ob-group__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: none;
  background: var(--page-bg-subtle);
  cursor: pointer;
  text-align: left;
}

.book-ob-group__head.book-coa-type--asset { border-left: 4px solid #2563eb; }
.book-ob-group__head.book-coa-type--liability { border-left: 4px solid #dc2626; }
.book-ob-group__head.book-coa-type--equity { border-left: 4px solid #7c3aed; }
.book-ob-group__head.book-coa-type--revenue { border-left: 4px solid #059669; }
.book-ob-group__head.book-coa-type--expense { border-left: 4px solid #ea580c; }

.book-ob-group__chevron {
  color: var(--text-muted);
  width: 16px;
  flex-shrink: 0;
}

.book-ob-group__count {
  margin-left: auto;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.book-ob-group__body {
  border-top: 1px solid var(--border-color-subtle);
}

.book-ob-table {
  font-size: var(--font-size-sm);
}

.book-ob-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-color-subtle);
}

.book-ob-table tbody td {
  padding: var(--space-2) var(--space-3);
  vertical-align: middle;
}

.book-ob-col-account { width: 38%; min-width: 200px; }
.book-ob-col-type { width: 12%; }
.book-ob-col-normal { width: 14%; }
.book-ob-col-amount { width: 22%; }
.book-ob-col-status { width: 14%; }

.book-ob-row--child .book-ob-account-code,
.book-ob-row--child .book-ob-account-name {
  padding-left: var(--space-4);
}

.book-ob-row--parent {
  background: var(--page-bg-subtle);
}

.book-ob-account-code {
  font-family: var(--font-mono);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}

.book-ob-account-name {
  color: var(--text-primary);
}

.book-ob-lock {
  opacity: 0.85;
  margin-right: var(--space-1);
}

.book-ob-normal-bal {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.book-ob-normal-bal--debit { color: #2563eb; }
.book-ob-normal-bal--credit { color: #7c3aed; }

.book-ob-table .ob-amount {
  max-width: 160px;
  margin-left: auto;
  min-height: 36px;
  font-variant-numeric: tabular-nums;
  border-radius: 8px;
}

.book-ob-amount-display {
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-medium);
}

.book-ob-amount-display--muted {
  color: var(--text-muted);
}

.book-ob-amount-empty {
  color: var(--text-muted);
}

.book-ob-status {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.book-ob-status--editable { color: var(--color-info-text); }
.book-ob-status--entered { color: var(--color-success-text); }
.book-ob-status--readonly { color: var(--text-muted); }
.book-ob-status--locked { color: var(--text-secondary); }
.book-ob-status--empty { color: var(--text-muted); }

.book-ob-totals-bar {
  position: sticky;
  bottom: 64px;
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  padding: var(--space-3) var(--space-5);
  background: #fff;
  border: 1px solid var(--border-color-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.book-ob-totals-bar__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.book-ob-totals-bar__label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.book-ob-totals-bar__value {
  font-size: var(--font-size-md);
  font-variant-numeric: tabular-nums;
}

.book-ob-totals-bar__item--ok .book-ob-totals-bar__value {
  color: var(--color-success);
}

.book-ob-totals-bar__item--warn .book-ob-totals-bar__value {
  color: var(--color-danger);
}

.book-ob-totals-bar__validation {
  margin-left: auto;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
}

.book-ob-totals-bar__validation--ok {
  background: var(--color-success-light);
  color: var(--color-success-text);
}

.book-ob-totals-bar__validation--warn {
  background: var(--color-warning-light);
  color: var(--color-warning-text);
}

.book-ob-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  border-radius: 12px 12px 0 0;
  justify-content: flex-end;
  margin: 0 calc(-1 * var(--space-2));
  padding: var(--space-3) var(--space-5);
}

.book-ob-action-bar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-left: auto;
}

.book-ob-page:not(:has(.book-ob-action-bar)) .book-ob-totals-bar {
  bottom: 0;
}

.book-ob-history-card {
  padding: 0;
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.book-ob-history-card__head {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-color-subtle);
}

.book-ob-history-card__title {
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
}

.book-ob-history-card .book-ob-table-wrap {
  padding: var(--space-3) var(--space-5) var(--space-4);
}

.book-ob-history-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  padding: var(--space-4) !important;
}

.book-ob-locked-note {
  text-align: center;
  padding: var(--space-2);
}

.book-ob-validation {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.book-ob-check {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: 8px;
  border: 1px solid var(--border-color-subtle);
  background: #fff;
}

.book-ob-check__icon {
  flex-shrink: 0;
  font-size: var(--font-size-md);
}

.book-ob-check--ok { border-color: var(--color-success); }
.book-ob-check--warn { border-color: var(--color-warning); }
.book-ob-check--fail { border-color: var(--color-danger); }

@media (max-width: 1200px) {
  .book-ob-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-ob-summary { grid-template-columns: 1fr; }
  .book-ob-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .book-ob-toolbar__toggles {
    flex-direction: column;
    align-items: flex-start;
  }
  .book-ob-totals-bar {
    bottom: 72px;
    flex-direction: column;
    align-items: stretch;
  }
  .book-ob-totals-bar__validation {
    margin-left: 0;
  }
  .book-ob-action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .book-ob-action-bar__actions {
    justify-content: flex-end;
  }
  .book-ob-col-type,
  .book-ob-col-normal {
    display: none;
  }
}

/* ΓöÇΓöÇ Journal Entries ΓöÇΓöÇ */
.book-je-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-je-header__counts {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.book-je-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-je-period-kpi .book-je-period-bal {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
}

.book-je-period-debit { color: var(--color-info, #3b82f6); }
.book-je-period-credit { color: var(--color-success); }

.book-je-table-card .book-je-cards { display: none; }

.book-je-source {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-je-th-debit,
.book-je-debit { color: var(--color-info, #3b82f6); }

.book-je-th-credit,
.book-je-credit { color: var(--color-success); }

.book-je-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}

.book-je-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.book-je-card__amount {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: var(--space-2) 0;
}

.book-je-card__source {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.book-je-card__meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-je-locked-banner {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-warning-light);
  border: 1px solid var(--color-warning);
  font-size: var(--text-sm);
}

.book-je-detail-field {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
}

.book-je-detail-field span {
  color: var(--text-muted);
  min-width: 100px;
}

.book-je-lines-title {
  margin: var(--space-4) 0 var(--space-3);
  font-size: var(--text-base);
}

.book-je-totals-row td {
  border-top: 2px solid var(--border-color);
  padding-top: var(--space-3);
}

.book-je-balance {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
}

.book-je-balance--ok {
  background: var(--color-success-light);
  color: var(--color-success);
}

.book-je-balance--bad {
  background: var(--color-danger-light, #fef2f2);
  color: var(--color-danger);
}

.book-je-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
}

.book-je-reversal-info {
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  color: var(--text-muted);
}

.book-je-form-totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--bg-subtle, var(--surface-2));
  border-radius: var(--radius-md);
}

.book-je-form-diff--ok { color: var(--color-success); }
.book-je-form-diff--bad { color: var(--color-danger); }

.book-je-form-source {
  margin-bottom: var(--space-3);
  margin-top: var(--space-3);
}

.book-je-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.book-je-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.book-je-form-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.book-je-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-je-form-page .book-qt-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-je-form-page .book-coa-form-fields .form-group {
  margin-bottom: 0;
}

.book-je-form-table-wrap {
  overflow-x: auto;
}

.book-je-form-table {
  width: 100%;
  min-width: 560px;
}

.book-je-form-table .col-rm {
  width: 44px;
  min-width: 44px;
}

.book-je-form-aside {
  position: sticky;
  top: var(--space-4);
}

.book-je-balance-card {
  padding: var(--space-5);
}

.book-je-form-totals--aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: 0;
  padding: 0;
  background: transparent;
}

.book-je-form-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
}

.book-je-form-total-row span {
  color: var(--text-muted);
}

.book-je-form-total-row--diff {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-color);
}

.book-je-balance-card .book-je-balance {
  margin-top: var(--space-4);
}

.book-je-back-inline {
  margin-bottom: var(--space-2);
}

@media (max-width: 960px) {
  .book-je-form-layout {
    grid-template-columns: 1fr;
  }

  .book-je-form-aside {
    position: static;
  }

  .book-je-form-page .book-coa-form-header__actions {
    flex-wrap: wrap;
  }

  .book-je-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 1200px) {
  .book-je-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-je-kpi { grid-template-columns: 1fr; }
  .book-je-table-wrap { display: none; }
  .book-je-table-card .book-je-cards { display: block; padding: var(--space-3); }
  .book-je-form-totals { grid-template-columns: 1fr; }
}

/* ΓöÇΓöÇ General Ledger ΓöÇΓöÇ */
.book-gl-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-gl-filters__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.book-gl-filters__head .card-title {
  margin: 0;
  font-size: var(--text-base);
}

.book-gl-filters--collapsed .book-gl-filters__body {
  display: none;
}

.book-gl-filters__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.book-gl-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 38px;
  font-size: var(--text-sm);
}

.book-gl-export-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.book-gl-export-bar__actions {
  display: flex;
  gap: var(--space-2);
}

.book-gl-report__sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-1, var(--card-bg));
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-4);
}

.book-gl-report__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.book-gl-report__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.book-gl-report__account {
  font-size: var(--text-lg);
  font-weight: 700;
}

.book-gl-report__opening strong {
  display: block;
  font-size: var(--text-lg);
}

.book-gl-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.book-gl-summary__item {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-subtle, var(--surface-2));
  font-size: var(--text-sm);
}

.book-gl-summary__item span {
  display: block;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.book-gl-th-debit,
.book-gl-debit { color: var(--color-info, #3b82f6); }

.book-gl-th-credit,
.book-gl-credit { color: var(--color-success); }

.book-gl-desc {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-gl-source {
  max-width: 160px;
}

.book-gl-closing-row td {
  border-top: 2px solid var(--border-color);
  background: var(--bg-subtle, var(--surface-2));
}

.book-gl-je-link,
.book-gl-source-link {
  padding: 0;
  font-size: inherit;
}

.book-gl-type-group {
  margin-bottom: var(--space-4);
}

.book-gl-type-group__head {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-weight: 700;
  font-size: var(--text-sm);
}

.book-gl-type-group__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-gl-all-acct__head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-1, var(--card-bg));
  cursor: pointer;
  text-align: left;
}

.book-gl-all-acct__head:hover {
  border-color: var(--color-primary);
}

.book-gl-all-acct__meta {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  font-size: var(--text-sm);
}

@media (max-width: 1200px) {
  .book-gl-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-gl-summary { grid-template-columns: 1fr; }
  .book-gl-export-bar { flex-direction: column; align-items: stretch; }
}

/* ΓöÇΓöÇ Trial Balance ΓöÇΓöÇ */
.book-tb-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-tb-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-tb-filters__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.book-tb-filters__head .card-title { margin: 0; }

.book-tb-filters--collapsed .book-tb-filters__body { display: none; }

.book-tb-filters__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.book-tb-radio-group {
  display: flex;
  gap: var(--space-4);
  min-height: 38px;
  align-items: center;
  font-size: var(--text-sm);
}

.book-tb-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.book-tb-export-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.book-tb-export-bar__actions { display: flex; gap: var(--space-2); }

.book-tb-report__sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-1, var(--card-bg));
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
}

.book-tb-asat__label {
  color: var(--text-muted);
  margin-right: var(--space-2);
  font-size: var(--text-sm);
}

.book-tb-group { margin-bottom: var(--space-3); }

.book-tb-group__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--bg-subtle, var(--surface-2));
  cursor: pointer;
  text-align: left;
}

.book-tb-group__count,
.book-tb-group__sub {
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.book-tb-group__body {
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-tb-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-1, var(--card-bg));
}

.book-tb-sort { cursor: pointer; user-select: none; }
.book-tb-sort:hover { color: var(--color-primary); }

.book-tb-th-debit, .book-tb-debit { color: var(--color-info, #3b82f6); }
.book-tb-th-credit, .book-tb-credit { color: var(--color-success); }

.book-tb-subtotal td {
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle, var(--surface-2));
}

.book-tb-grand-total {
  padding: var(--space-4);
  border-top: 2px solid var(--border-color);
}

.book-tb-grand-row td {
  font-size: var(--text-base);
  padding-top: var(--space-3);
}

.book-tb-status {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  text-align: center;
}

.book-tb-status--ok {
  background: var(--color-success-light);
  border: 1px solid var(--color-success);
  color: var(--color-success);
}

.book-tb-status--bad {
  background: var(--color-danger-light, #fef2f2);
  border: 2px solid var(--color-danger);
  color: var(--color-danger);
}

.book-tb-status__value {
  font-size: var(--text-lg);
  font-weight: 700;
}

.book-tb-status__diff { font-size: var(--text-sm); margin-top: var(--space-1); }

.book-tb-footer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid var(--border-color);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.book-tb-footer span { margin-right: var(--space-2); }

.book-tb-acct-link { padding: 0; font-size: inherit; }

@media (max-width: 1200px) {
  .book-tb-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-tb-kpi { grid-template-columns: 1fr; }
  .book-tb-export-bar { flex-direction: column; align-items: stretch; }
  .book-tb-footer { grid-template-columns: 1fr; }
}

.book-tb-journal-warn {
  padding: var(--space-3) var(--space-4);
  background: var(--color-danger-light, #fef2f2);
  border: 2px solid var(--color-danger);
  color: var(--color-danger);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}

.book-tb-diagnostics { margin-bottom: var(--space-3); }

.book-tb-diag-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.book-tb-diag-grid > div {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-subtle, var(--surface-2));
  font-size: var(--text-sm);
}

.book-tb-diag-grid span {
  display: block;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

@media print {
  .book-tb-filters, .book-tb-export-bar, .book-dash-scope, .book-tb-header .book-cust-header__desc, .book-tb-diagnostics { display: none !important; }
  .book-tb-report__sticky { position: static; }
  .book-tb-group__body[hidden] { display: block !important; }
}

/* ΓöÇΓöÇ Balance Sheet ΓöÇΓöÇ */
.book-bs-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-bs-kpi { grid-template-columns: repeat(4, 1fr); }

.book-bs-filters__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.book-bs-filters__head .card-title { margin: 0; }
.book-bs-filters--collapsed .book-bs-filters__body { display: none; }

.book-bs-filters__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.book-bs-radio-group,
.book-bs-check {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  font-size: var(--text-sm);
  min-height: 38px;
}

.book-bs-export-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.book-bs-export-bar__actions { display: flex; gap: var(--space-2); }

.book-bs-report__sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-1, var(--card-bg));
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-4);
}

.book-bs-report__heading {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xl);
  text-align: center;
  letter-spacing: 0.06em;
}

.book-bs-asat { text-align: center; font-size: var(--text-sm); color: var(--text-muted); }

.book-bs-body { padding: var(--space-4); }

.book-bs-major { margin-bottom: var(--space-5); }

.book-bs-major__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--border-color);
}

.book-bs-subsection { margin-bottom: var(--space-3); }

.book-bs-subsection__head {
  width: 100%;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-subtle, var(--surface-2));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
}

.book-bs-subsection__body { margin-top: var(--space-2); }

.book-bs-table .book-bs-amt { font-variant-numeric: tabular-nums; }
.book-bs-amt--prev { color: var(--text-muted); }
.book-bs-amt--loss { color: var(--color-danger); }

.book-bs-subtotal td { background: var(--bg-subtle, var(--surface-2)); }

.book-bs-total-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-2);
  border-radius: var(--radius-md);
  font-weight: 700;
}

.book-bs-total-line--compare { grid-template-columns: 1fr auto auto; }

.book-bs-total-line--assets { background: rgba(59, 130, 246, 0.08); border: 1px solid var(--color-info, #3b82f6); }
.book-bs-total-line--liab { background: rgba(239, 68, 68, 0.06); border: 1px solid var(--color-danger); }
.book-bs-total-line--equity { background: rgba(16, 185, 129, 0.08); border: 1px solid var(--color-success); }

.book-bs-total-val { font-variant-numeric: tabular-nums; text-align: right; }

.book-bs-profit-row td { font-style: italic; }

.book-bs-equation {
  margin: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  text-align: center;
}

.book-bs-equation--ok {
  background: var(--color-success-light);
  border: 1px solid var(--color-success);
  color: var(--color-success);
}

.book-bs-equation--bad {
  background: var(--color-danger-light, #fef2f2);
  border: 2px solid var(--color-danger);
  color: var(--color-danger);
}

.book-bs-equation__formula { font-weight: 600; margin-bottom: var(--space-2); }
.book-bs-equation__status { font-size: var(--text-lg); font-weight: 700; }

.book-bs-footer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid var(--border-color);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.book-bs-acct-link { padding: 0; font-size: inherit; }

@media (max-width: 1200px) {
  .book-bs-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-bs-kpi { grid-template-columns: 1fr; }
  .book-bs-export-bar { flex-direction: column; align-items: stretch; }
  .book-bs-footer { grid-template-columns: 1fr; }
  .book-bs-total-line--compare { grid-template-columns: 1fr; }
}

@media print {
  .book-bs-filters, .book-bs-export-bar, .book-dash-scope, .book-bs-header .book-cust-header__desc { display: none !important; }
  .book-bs-report__sticky { position: static; }
  .book-bs-subsection__body[hidden] { display: block !important; }
}

/* ΓöÇΓöÇ Profit & Loss ΓöÇΓöÇ */
.book-pl-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-pl-kpi { grid-template-columns: repeat(4, 1fr); }

.book-pl-filters__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.book-pl-filters__head .card-title { margin: 0; }
.book-pl-filters--collapsed .book-pl-filters__body { display: none; }

.book-pl-filters__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.book-pl-radio-group,
.book-pl-check {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  font-size: var(--text-sm);
  min-height: 38px;
}

.book-pl-export-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.book-pl-export-bar__actions { display: flex; gap: var(--space-2); }

.book-pl-report__sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-1, var(--card-bg));
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-4);
}

.book-pl-report__heading {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xl);
  text-align: center;
  letter-spacing: 0.06em;
}

.book-pl-period { text-align: center; font-size: var(--text-sm); color: var(--text-muted); }

.book-pl-body { padding: var(--space-4); }

.book-pl-section { margin-bottom: var(--space-4); }

.book-pl-section__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-align: left;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-subtle, var(--surface-2));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
}

.book-pl-section__total {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.book-pl-section--revenue .book-pl-section__head { border-left: 3px solid var(--color-success, #10b981); }
.book-pl-section--expense .book-pl-section__head { border-left: 3px solid var(--color-danger, #ef4444); }

.book-pl-section__body { margin-top: var(--space-2); }

.book-pl-table .book-pl-amt { font-variant-numeric: tabular-nums; }
.book-pl-amt--prev { color: var(--text-muted); }

.book-pl-subtotal td { background: var(--bg-subtle, var(--surface-2)); font-weight: 600; }

.book-pl-net {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  margin: 0 var(--space-4) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: var(--text-lg);
}

.book-pl-net--compare { grid-template-columns: 1fr auto auto; }

.book-pl-net--profit {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--color-success, #10b981);
  color: var(--color-success, #10b981);
}

.book-pl-net--loss {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid var(--color-danger, #ef4444);
  color: var(--color-danger, #ef4444);
}

.book-pl-net-val { font-variant-numeric: tabular-nums; text-align: right; }

.book-pl-warn {
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-warning, #f59e0b);
  background: rgba(245, 158, 11, 0.08);
  color: var(--text-primary);
}

.book-pl-warn ul { margin: var(--space-2) 0 0; padding-left: var(--space-4); }

.book-pl-footer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid var(--border-color);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.book-pl-acct-link { padding: 0; font-size: inherit; }

.book-pl-chevron { width: 1rem; flex-shrink: 0; }

@media (max-width: 1200px) {
  .book-pl-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-pl-kpi { grid-template-columns: 1fr; }
  .book-pl-export-bar { flex-direction: column; align-items: stretch; }
  .book-pl-footer { grid-template-columns: 1fr; }
  .book-pl-net--compare { grid-template-columns: 1fr; }
}

@media print {
  .book-pl-filters, .book-pl-export-bar, .book-dash-scope, .book-pl-header .book-cust-header__desc { display: none !important; }
  .book-pl-report__sticky { position: static; }
  .book-pl-section__body[hidden] { display: block !important; }
}

/* ΓöÇΓöÇ Cash Flow Statement ΓöÇΓöÇ */
.book-cf-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-cf-kpi { grid-template-columns: repeat(4, 1fr); }

.book-cf-filters__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.book-cf-filters__head .card-title { margin: 0; }
.book-cf-filters--collapsed .book-cf-filters__body { display: none; }

.book-cf-filters__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.book-cf-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  font-size: var(--text-sm);
  min-height: 38px;
}

.book-cf-export-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.book-cf-export-bar__actions { display: flex; gap: var(--space-2); }

.book-cf-report__sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-1, var(--card-bg));
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-4);
}

.book-cf-report__heading {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xl);
  text-align: center;
  letter-spacing: 0.06em;
}

.book-cf-period,
.book-cf-method { text-align: center; font-size: var(--text-sm); color: var(--text-muted); }

.book-cf-body { padding: var(--space-4); }

.book-cf-section { margin-bottom: var(--space-4); }

.book-cf-section__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-align: left;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-subtle, var(--surface-2));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
}

.book-cf-section__total {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.book-cf-section--operating .book-cf-section__head { border-left: 3px solid var(--color-info, #3b82f6); }
.book-cf-section--investing .book-cf-section__head { border-left: 3px solid var(--color-warning, #f59e0b); }
.book-cf-section--financing .book-cf-section__head { border-left: 3px solid var(--color-primary, #6366f1); }

.book-cf-section__body { margin-top: var(--space-2); }

.book-cf-table .book-cf-amt { font-variant-numeric: tabular-nums; }
.book-cf-amt--in { color: var(--color-success, #10b981); }
.book-cf-amt--out { color: var(--color-danger, #ef4444); }
.book-cf-amt--prev { color: var(--text-muted); }

.book-cf-subtotal td { background: var(--bg-subtle, var(--surface-2)); font-weight: 600; }

.book-cf-internal {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-subtle, var(--surface-2));
}

.book-cf-internal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

.book-cf-summary {
  margin: 0 var(--space-4) var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-subtle, var(--surface-2));
}

.book-cf-summary--compare .book-cf-summary__row {
  grid-template-columns: 1fr auto auto;
}

.book-cf-summary__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
}

.book-cf-summary__row--bold {
  font-weight: 700;
  font-size: var(--text-base);
  border-top: 2px solid var(--border-color);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
}

.book-cf-summary__operator {
  text-align: center;
  color: var(--text-muted);
  font-weight: 600;
  padding: var(--space-1) 0;
}

.book-cf-summary__val { font-variant-numeric: tabular-nums; text-align: right; }

.book-cf-reconcile {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
}

.book-cf-reconcile--ok {
  background: var(--color-success-light);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.book-cf-reconcile--warn {
  background: var(--color-danger-light, #fef2f2);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

.book-cf-warn {
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-warning, #f59e0b);
  background: rgba(245, 158, 11, 0.08);
}

.book-cf-warn ul { margin: var(--space-2) 0 0; padding-left: var(--space-4); }

.book-cf-footer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid var(--border-color);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.book-cf-line-link,
.book-cf-chevron { padding: 0; font-size: inherit; }
.book-cf-chevron { width: 1rem; flex-shrink: 0; }

@media (max-width: 1200px) {
  .book-cf-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .book-cf-kpi { grid-template-columns: 1fr; }
  .book-cf-export-bar { flex-direction: column; align-items: stretch; }
  .book-cf-footer { grid-template-columns: 1fr; }
  .book-cf-summary--compare .book-cf-summary__row { grid-template-columns: 1fr; }
}

@media print {
  .book-cf-filters, .book-cf-export-bar, .book-dash-scope, .book-cf-header .book-cust-header__desc { display: none !important; }
  .book-cf-report__sticky { position: static; }
  .book-cf-section__body[hidden] { display: block !important; }
}

/* ΓöÇΓöÇ Inter-Book Transfer Center ΓöÇΓöÇ */
.ibt-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ibt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.ibt-header__bridge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-subtle, var(--surface-2));
  border: 1px solid var(--border-color);
}

.ibt-bridge-book {
  font-weight: 700;
  font-size: var(--text-sm);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

.ibt-bridge-book--aud { background: rgba(59, 130, 246, 0.12); color: var(--color-info, #3b82f6); }
.ibt-bridge-book--lkr { background: rgba(16, 185, 129, 0.12); color: var(--color-success, #10b981); }
.ibt-bridge-arrow { font-size: var(--text-lg); color: var(--text-muted); }

.ibt-kpi { grid-template-columns: repeat(4, 1fr); }
.ibt-kpi__split {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-base);
}

.ibt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.ibt-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  flex: 1;
  min-width: 240px;
}

.ibt-toolbar__filters .form-control { min-width: 160px; }
.ibt-toolbar__actions { display: flex; gap: var(--space-2); }

.ibt-dir {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
}

.ibt-dir--aud-lkr { background: rgba(59, 130, 246, 0.1); color: var(--color-info, #3b82f6); }
.ibt-dir--lkr-aud { background: rgba(16, 185, 129, 0.1); color: var(--color-success, #10b981); }

.ibt-detail-nav { margin-bottom: calc(var(--space-2) * -1); }

.ibt-detail { padding: var(--space-4); }

.ibt-detail__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.ibt-detail__ref { margin: 0 0 var(--space-2); font-size: var(--text-xl); }
.ibt-detail__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.ibt-detail-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-subtle, var(--surface-2));
  border: 1px solid var(--border-color);
}

.ibt-detail-flow__book {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.ibt-detail-flow__book--src { text-align: left; }
.ibt-detail-flow__book--dst { text-align: right; }

.ibt-detail-flow__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ibt-detail-flow__mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.ibt-detail-flow__rate { font-size: var(--text-sm); color: var(--text-muted); }
.ibt-detail-flow__arrow { font-size: var(--text-2xl); color: var(--color-primary); }

.ibt-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.ibt-detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.ibt-detail-notes { margin-bottom: var(--space-3); font-size: var(--text-sm); }
.ibt-detail-warn {
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-danger-light, #fef2f2);
  color: var(--color-danger);
  font-size: var(--text-sm);
}

.ibt-detail-journals h4 { margin: 0 0 var(--space-2); font-size: var(--text-sm); }
.ibt-journal-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.ibt-form-card { padding: var(--space-4); }
.ibt-radio-group {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-sm);
}

.ibt-form-books {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-3);
  align-items: end;
  margin-bottom: var(--space-4);
}

.ibt-form-book__val {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-subtle, var(--surface-2));
  border: 1px solid var(--border-color);
  font-weight: 600;
}

.ibt-form-arrow {
  text-align: center;
  font-size: var(--text-xl);
  color: var(--color-primary);
  padding-bottom: var(--space-2);
}

.ibt-converted {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid var(--color-primary, #6366f1);
  border-radius: var(--radius-md);
}

.ibt-converted strong { font-size: var(--text-lg); color: var(--color-primary); }
.ibt-form-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }

.ibt-available-rate {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid var(--color-success, #10b981);
  border-radius: var(--radius-md);
}

.ibt-available-rate__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ibt-available-rate__value {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-success, #10b981);
}

@media (max-width: 1200px) {
  .ibt-kpi { grid-template-columns: repeat(2, 1fr); }
  .ibt-detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ibt-kpi { grid-template-columns: 1fr; }
  .ibt-toolbar { flex-direction: column; align-items: stretch; }
  .ibt-detail-flow,
  .ibt-form-books { grid-template-columns: 1fr; }
  .ibt-detail-flow__book--dst { text-align: left; }
  .ibt-detail-grid { grid-template-columns: 1fr; }
}

/* ΓöÇΓöÇ Exchange Rates (Transfer Center) ΓöÇΓöÇ */
.xrt-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.xrt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.xrt-header__pairs {
  display: flex;
  gap: var(--space-2);
}

.xrt-pair-tab {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-subtle, var(--surface-2));
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

.xrt-pair-tab--active {
  background: var(--color-primary, #6366f1);
  color: #fff;
  border-color: var(--color-primary, #6366f1);
}

.xrt-kpi { grid-template-columns: repeat(4, 1fr); }
.xrt-kpi--highlight { border: 1px solid var(--color-success, #10b981); }
.xrt-kpi__rate { font-size: var(--text-lg); }
.xrt-kpi__split {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-sm);
}
.xrt-kpi--up .book-dash-kpi__value { color: var(--color-success); }
.xrt-kpi--down .book-dash-kpi__value { color: var(--color-danger); }

.xrt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.xrt-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  flex: 1;
}

.xrt-toolbar__filters .form-control { min-width: 140px; }
.xrt-toolbar__actions { display: flex; gap: var(--space-2); }

.xrt-panels {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-4);
}

.xrt-chart-wrap {
  position: relative;
  height: 220px;
  padding: var(--space-3);
}

.xrt-history-card .card-header,
.xrt-chart-card .card-header { padding: var(--space-3) var(--space-4); }

.xrt-history-table { font-size: var(--text-sm); }

.xrt-row--active { background: rgba(16, 185, 129, 0.06); }
.xrt-row--current { background: rgba(99, 102, 241, 0.08); font-weight: 600; }

.xrt-currency {
  font-weight: 600;
  font-size: var(--text-sm);
}

.xrt-detail-nav { margin-bottom: calc(var(--space-2) * -1); }

.xrt-detail { padding: var(--space-4); }

.xrt-detail__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.xrt-detail__pair { margin: 0 0 var(--space-2); font-size: var(--text-xl); }
.xrt-detail__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.xrt-detail-rate {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.xrt-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.xrt-detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.xrt-detail-notes,
.xrt-detail-history { margin-top: var(--space-3); font-size: var(--text-sm); }

.xrt-detail-warn {
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--color-warning, #f59e0b);
  font-size: var(--text-sm);
}

.xrt-form-card { padding: var(--space-4); }
.xrt-form-preview {
  padding: var(--space-3);
  margin: var(--space-3) 0;
  font-weight: 600;
  background: var(--bg-subtle, var(--surface-2));
  border-radius: var(--radius-md);
}
.xrt-form-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }

@media (max-width: 1200px) {
  .xrt-kpi { grid-template-columns: repeat(2, 1fr); }
  .xrt-panels { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .xrt-kpi { grid-template-columns: 1fr; }
  .xrt-toolbar { flex-direction: column; align-items: stretch; }
  .xrt-detail-grid { grid-template-columns: 1fr; }
}

/* ΓöÇΓöÇ Transfer History (th-*) ΓöÇΓöÇ */
.th-page { display: flex; flex-direction: column; gap: var(--space-4); }

.th-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.th-header__badge {
  display: inline-block;
  margin-top: var(--space-2);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary);
}

.th-header__bridge { display: flex; align-items: center; gap: var(--space-2); }

.th-kpi { grid-template-columns: repeat(4, 1fr); }

.th-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  flex-wrap: wrap;
}

.th-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  flex: 1;
}

.th-toolbar__filters .form-control { min-width: 140px; }
.th-toolbar__actions { display: flex; gap: var(--space-2); }

.th-dir {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.th-dir--aud-lkr { background: rgba(59, 130, 246, 0.1); color: var(--color-info, #3b82f6); }
.th-dir--lkr-aud { background: rgba(16, 185, 129, 0.1); color: var(--color-success, #10b981); }

.th-table-card { overflow: hidden; }
.th-table-wrap { max-height: none; }
.th-rate-cell { font-variant-numeric: tabular-nums; }
.th-rev-hint { margin-top: var(--space-1); }

.th-detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: calc(var(--space-2) * -1);
}

.th-detail { padding: var(--space-4); }

.th-detail__head { margin-bottom: var(--space-4); }

.th-detail__title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-lg);
}

.th-detail__ref-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.th-detail-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle, var(--surface-2));
  border: 1px solid var(--border-color);
}

.th-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.th-detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.th-detail-notes {
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.th-rate-snapshot {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.th-rate-snapshot h4 { margin: 0 0 var(--space-3); font-size: var(--text-sm); }

.th-rate-snapshot__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.th-rate-snapshot__grid > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.th-rate-snapshot__note { margin: var(--space-3) 0 0; }

.th-journals-section { margin-bottom: var(--space-4); }
.th-journals-section h3 { margin: 0 0 var(--space-3); font-size: var(--text-base); }

.th-journals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.th-journal-card {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--surface-1, var(--card-bg));
}

.th-journal-card--empty { opacity: 0.7; }

.th-journal-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.th-journal-card__head h4 { margin: 0; font-size: var(--text-sm); }
.th-journal-card__num { font-size: var(--text-sm); }

.th-journal-card__lines { margin-bottom: var(--space-3); }

.th-journal-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border-color);
}

.th-journal-line:last-child { border-bottom: none; }
.th-journal-line__side { color: var(--text-muted); font-weight: 600; }
.th-journal-line__amt { font-variant-numeric: tabular-nums; font-weight: 600; }

.th-journal-nav { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.th-reversal {
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.04);
}

.th-reversal h4 { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--color-danger); }
.th-reversal__links { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.th-audit { padding: var(--space-3) var(--space-4); }
.th-audit h4 { margin: 0 0 var(--space-3); font-size: var(--text-sm); }

.th-audit__list { display: flex; flex-direction: column; gap: var(--space-2); }

.th-audit-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-subtle, var(--surface-2));
  font-size: var(--text-sm);
}

.th-audit-row__action { font-weight: 600; color: var(--color-primary); }
.th-audit-row__time { color: var(--text-muted); white-space: nowrap; }

@media print {
  .sidebar, .topbar, .th-toolbar, .th-detail-nav, .pagination { display: none !important; }
  .th-page { gap: 0; }
}

@media (max-width: 1200px) {
  .th-kpi { grid-template-columns: repeat(2, 1fr); }
  .th-journals-grid { grid-template-columns: 1fr; }
  .th-detail-grid, .th-rate-snapshot__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .th-kpi { grid-template-columns: 1fr; }
  .th-toolbar { flex-direction: column; align-items: stretch; }
  .th-detail-flow { grid-template-columns: 1fr; text-align: center; }
  .th-detail-grid, .th-rate-snapshot__grid { grid-template-columns: 1fr; }
  .th-audit-row { grid-template-columns: 1fr; }
}

/* ΓöÇΓöÇ Asset Management (ast-*) ΓöÇΓöÇ */
.ast-page { display: flex; flex-direction: column; gap: var(--space-4); }

.ast-header { margin-bottom: 0; }
.ast-header--compact { padding: var(--space-4) var(--space-5); }

.ast-kpi { grid-template-columns: repeat(4, 1fr); }
.ast-status-kpi { grid-template-columns: repeat(5, 1fr); }

.ast-panels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.ast-panel { overflow: hidden; }

.ast-chart { display: flex; flex-direction: column; gap: var(--space-3); }

.ast-chart-row__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
}

.ast-chart-bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle, var(--surface-2));
  overflow: hidden;
}

.ast-chart-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary), var(--color-info, #3b82f6));
}

.ast-lifecycle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

.ast-lifecycle__arrow { color: var(--color-primary); }

.ast-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.ast-toolbar__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

.ast-table .cell-amount { font-variant-numeric: tabular-nums; }

.ast-dep-preview {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
}

.ast-report-tabs { border-bottom: 1px solid var(--border-color); }
.ast-report-body { padding: var(--space-4); }

@media print {
  .sidebar, .topbar, .ast-toolbar, .ast-report-tabs { display: none !important; }
}

@media (max-width: 1200px) {
  .ast-kpi { grid-template-columns: repeat(2, 1fr); }
  .ast-status-kpi { grid-template-columns: repeat(3, 1fr); }
  .ast-panels { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .ast-kpi, .ast-status-kpi { grid-template-columns: 1fr; }
  .ast-toolbar { flex-direction: column; align-items: stretch; }
}

/* HR Organization Setup */
.book-hr-org-page .book-hr-org-tabs {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}

.book-hr-org-cards {
  display: none;
  padding: var(--space-3);
  gap: var(--space-3);
}

.book-hr-org-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.book-hr-org-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.book-hr-org-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.book-hr-org-card__actions .book-ast-row-menu {
  width: 100%;
}

.book-hr-org-page .book-hr-org-kpi-6 {
  grid-template-columns: repeat(6, 1fr);
}

.book-hr-org-tab-intro {
  padding: var(--space-4);
}

.book-hr-org-holiday-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
}

.book-hr-org-weekend-card .card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.book-hr-org-weekend-branch {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.book-hr-org-weekend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-hr-org-weekend-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: var(--space-2);
}

.book-hr-org-weekend-day {
  font-size: 0.875rem;
  font-weight: 600;
}

.book-hr-org-branch-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  max-height: 160px;
  overflow-y: auto;
}

.book-hr-org-branch-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
}

@media (max-width: 1200px) {
  .book-hr-org-page .book-hr-org-kpi-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .book-hr-org-page .book-hr-org-kpi-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-hr-org-weekend-grid,
  .book-hr-org-branch-checks {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 768px) {
  .book-hr-org-page .book-hr-table-wrap {
    display: none;
  }

  .book-hr-org-cards {
    display: flex;
    flex-direction: column;
  }

  .book-hr-org-page .book-ast-action-bar {
    flex-wrap: wrap;
  }
}

.book-hr-shift-page .book-hr-org-tabs,
.book-hr-shift-page .tab-list.book-ast-rpt-tabs,
.book-hr-ot-page .book-hr-org-tabs,
.book-hr-ot-page .tab-list.book-ast-rpt-tabs {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}

/* Employee Add/Edit ΓÇö tabbed ERP form */
.book-hr-emp-form-modal {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 0;
}

.book-hr-emp-form-tabs {
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: var(--space-1);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}

.book-hr-emp-form-tabs .tab-btn {
  font-size: 0.8125rem;
  padding: 6px 12px;
  white-space: nowrap;
}

.book-hr-emp-form-panels {
  max-height: min(62vh, 520px);
  overflow-y: auto;
  padding-right: var(--space-1);
}

.book-hr-emp-form-panel {
  display: none;
}

.book-hr-emp-form-panel.active {
  display: block;
}

.book-hr-emp-form-card {
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.book-hr-emp-photo-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-4);
  align-items: start;
}

.book-hr-emp-photo-preview,
.book-hr-emp-photo-placeholder {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.book-hr-emp-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.book-hr-payroll-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.book-hr-radio-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--bg-subtle);
}

.book-hr-radio-card:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.book-hr-payroll-excluded {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
}

.book-hr-shift-preview {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
}

.book-hr-shift-preview__title {
  font-weight: 600;
  margin-bottom: 4px;
}

.book-hr-shift-preview__time {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-2);
}

.book-hr-emp-shift-stats,
.book-hr-emp-shift-rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.book-hr-emp-shift-stats div,
.book-hr-emp-shift-rules div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8125rem;
}

.book-hr-comp-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 200px;
  overflow-y: auto;
}

.book-hr-comp-check {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-2);
  align-items: center;
  font-size: 0.875rem;
}

.book-hr-pending-docs {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.book-hr-pending-doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .book-hr-payroll-toggle,
  .book-hr-emp-shift-stats,
  .book-hr-emp-shift-rules,
  .book-hr-ro-grid {
    grid-template-columns: 1fr;
  }

  .book-hr-emp-photo-row {
    grid-template-columns: 1fr;
  }
}

.book-hr-ro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3) var(--space-4);
}

.book-hr-ro-grid--statutory {
  grid-template-columns: repeat(2, 1fr);
}

.book-hr-ro-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-color);
}

.book-hr-ro-field__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.book-hr-ro-field__value {
  font-weight: 600;
  font-size: 0.9375rem;
}

.book-hr-payroll-empty {
  padding: var(--space-4);
  text-align: center;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.book-hr-payroll-warn {
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
  font-size: 0.875rem;
}

.book-hr-payroll-nav {
  padding: var(--space-3);
  border-top: 1px solid var(--border-color);
  margin-top: var(--space-2);
}

.book-hr-stat-ro-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-color);
}

.book-hr-stat-ro-value {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.book-hr-payroll-disabled {
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--text-muted) 6%, var(--card-bg));
}

.book-hr-payroll-disabled .form-section-title {
  color: var(--text-muted);
}

.book-hr-stat-source {
  margin-top: var(--space-1);
  margin-bottom: var(--space-2);
}

/* Payroll Rules (LKR) settings page */
.book-payroll-rules-page {
  max-width: 100%;
}

.book-payroll-rules-header {
  margin-bottom: var(--space-4);
}

.book-payroll-rules-banner.settings-banner--info {
  background: color-mix(in srgb, var(--info, #3b82f6) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--info, #3b82f6) 25%, transparent);
}

.book-payroll-rules-tabs {
  flex-wrap: wrap;
  gap: var(--space-1);
}

.book-payroll-rules-card {
  margin-bottom: var(--space-4);
}

.book-payroll-tax-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 920px;
  padding-bottom: var(--space-6);
}

.book-payroll-tax-form-page .book-qt-section {
  padding: var(--space-5);
}

.book-transaction-tax-form-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 960px;
  padding-bottom: var(--space-6);
}

.book-transaction-tax-form-page .book-qt-section {
  padding: var(--space-5);
}

@media (max-width: 768px) {
  .book-transaction-tax-form-page .book-coa-form-header__actions {
    flex-wrap: wrap;
  }

  .book-transaction-tax-form-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

.book-payroll-gl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.book-payroll-gl-readonly {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-payroll-gl-readonly-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.book-payroll-gl-readonly-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.book-payroll-gl-readonly-value {
  font-size: 0.875rem;
  font-weight: 600;
}

.book-payroll-gl-readonly-value--ok {
  color: var(--color-success, #047857);
}

.book-payroll-gl-readonly-value--missing {
  color: var(--color-danger, #dc2626);
}

.settings-inline-link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.book-payroll-tax-arch {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .book-payroll-gl-grid {
    grid-template-columns: 1fr;
  }
}

/* Tax Configuration (LKR) settings page */
.book-tax-settings-page {
  max-width: 100%;
}

.book-tax-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-tax-toolbar .filter-bar {
  margin: 0;
}

.book-tax-table-card .card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.book-tax-settings-header {
  margin-bottom: var(--space-4);
}

.book-tax-settings-banner.settings-banner--info {
  background: color-mix(in srgb, var(--info, #3b82f6) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--info, #3b82f6) 25%, transparent);
}

.book-tax-settings-link {
  color: var(--color-primary);
  text-decoration: underline;
}

.book-tax-settings-tabs {
  flex-wrap: wrap;
  gap: var(--space-1);
}

.book-tax-income-estimate__input {
  max-width: 140px;
}

.book-tax-income-estimate__suffix {
  font-weight: 600;
  font-size: var(--text-md, 1rem);
}

.book-tax-slab-table-wrap {
  overflow-x: auto;
}

.book-tax-calc-modal__summary {
  display: grid;
  gap: 10px;
}

.book-tax-calc-modal__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.book-tax-calc-modal__row--emphasis strong {
  font-size: 1.05rem;
}

.book-tax-calc-modal__footer {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.book-tax-settings-card {
  margin-bottom: var(--space-4);
}

.book-tax-modal-section {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-3);
}

.book-tax-modal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.book-tax-apply-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

.book-tax-gl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.book-tax-posting-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.book-tax-journal-block {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  font-size: 0.875rem;
}

.book-tax-journal-title {
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.book-tax-journal-line {
  padding: var(--space-1) 0;
}

.book-tax-journal-line span {
  display: inline-block;
  width: 2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.book-tax-example {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-3);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}

.book-tax-arch {
  padding: var(--space-4);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}

.book-tax-arch__title {
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--border-color);
}

.book-tax-arch__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.book-tax-arch__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.book-tax-arch__list {
  margin: var(--space-1) 0;
  padding-left: var(--space-4);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .book-tax-gl-grid,
  .book-tax-posting-grid,
  .book-tax-arch__cols,
  .book-tax-apply-grid {
    grid-template-columns: 1fr;
  }
}

/* Hikvision Biometric Integration */
.book-hr-bio-page .book-hr-bio-banner.settings-banner--info {
  background: color-mix(in srgb, var(--info, #3b82f6) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--info, #3b82f6) 25%, transparent);
}

.book-hr-bio-flow__steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  padding: var(--space-2) 0;
}

.book-hr-bio-flow__steps span:nth-child(odd) {
  padding: var(--space-1) var(--space-2);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.book-hr-bio-modal-section {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-3);
}

.book-hr-bio-modal-section:last-child {
  border-bottom: none;
}

.book-hr-bio-csv-help code {
  display: block;
  padding: var(--space-2);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.book-hr-bio-enroll-status {
  font-size: 0.875rem;
}

/* ---- Leave Management ---- */
.book-hr-leave-page .book-hr-leave-kpi {
  grid-template-columns: repeat(6, 1fr);
}

.book-hr-leave-page .book-hr-org-tabs,
.book-hr-leave-page .tab-list.book-ast-rpt-tabs {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}

.book-hr-leave-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
}

.book-hr-leave-actions .book-cust-export {
  display: flex;
  gap: var(--space-1);
  margin-left: auto;
}

.book-hr-leave-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
  line-height: 1.45;
}

.book-hr-leave-expand-btn {
  min-width: 28px;
  padding: 2px 6px;
  font-size: 0.75rem;
}

.book-hr-leave-expand-panel {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  margin: var(--space-2) 0;
}

.book-hr-leave-expand-row td {
  background: var(--bg-subtle);
  border-top: none;
}

.book-hr-leave-profile-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-hr-leave-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.book-hr-leave-list li {
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--border-color);
}

.book-hr-leave-list li:last-child {
  border-bottom: none;
}

.book-hr-leave-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-hr-leave-settings-grid div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.book-hr-leave-reports {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.book-hr-leave-report-card {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.book-hr-leave-holiday-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-hr-leave-weekend-summary {
  padding: var(--space-4);
}

.book-hr-leave-inline-cal .card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.book-hr-leave-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.book-hr-leave-cal-header {
  text-align: center;
  font-size: 1rem;
}

.book-hr-leave-weekend-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-hr-leave-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.book-hr-leave-cal-dow {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: var(--space-1);
}

.book-hr-leave-cal-cell {
  min-height: 72px;
  padding: var(--space-1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.75rem;
}

.book-hr-leave-cal-cell--empty {
  background: transparent;
  border-color: transparent;
}

.book-hr-leave-cal-cell--weekend {
  background: color-mix(in srgb, var(--text-muted) 8%, var(--card-bg));
}

.book-hr-leave-cal-cell--holiday {
  background: color-mix(in srgb, var(--info, #3b82f6) 12%, var(--card-bg));
  border-color: color-mix(in srgb, var(--info, #3b82f6) 30%, transparent);
}

.book-hr-leave-cal-cell--approved {
  background: color-mix(in srgb, var(--color-success, #22c55e) 14%, var(--card-bg));
  border-color: color-mix(in srgb, var(--color-success, #22c55e) 35%, transparent);
}

.book-hr-leave-cal-cell--pending {
  background: color-mix(in srgb, var(--color-warning, #f59e0b) 14%, var(--card-bg));
  border-color: color-mix(in srgb, var(--color-warning, #f59e0b) 35%, transparent);
}

.book-hr-leave-cal-day {
  font-weight: 600;
}

.book-hr-leave-cal-tag {
  font-size: 0.625rem;
  line-height: 1.2;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-hr-leave-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-hr-leave-cal-legend-item {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  border: 1px solid var(--border-color);
}

@media (max-width: 1400px) {
  .book-hr-leave-page .book-hr-leave-kpi {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .book-hr-leave-page .book-hr-leave-kpi {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-hr-leave-reports {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-hr-leave-actions .book-cust-export {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .book-hr-leave-page .book-hr-leave-kpi {
    grid-template-columns: 1fr;
  }

  .book-hr-leave-reports {
    grid-template-columns: 1fr;
  }

  .book-hr-leave-settings-grid {
    grid-template-columns: 1fr;
  }

  .book-hr-leave-cal-cell {
    min-height: 48px;
  }

  .book-hr-leave-page .book-cust-table-wrap {
    display: none;
  }
}

/* ---- Payroll ΓÇö Salary Components ---- */
.book-payroll-comp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.book-payroll-comp-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-payroll-comp-page .book-payroll-comp-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-payroll-comp-page .book-cust-toolbar__right .filter-bar {
  width: 100%;
  justify-content: flex-end;
}

.action-btn--duplicate:hover {
  background: var(--color-warning-light);
  color: var(--color-warning-text, var(--color-warning));
}

.action-btn--assign:hover {
  background: var(--color-info-light);
  color: var(--color-info);
}

@media (max-width: 1200px) {
  .book-payroll-comp-page .book-payroll-comp-kpi {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-payroll-grp-page .book-payroll-grp-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-payroll-comp-page .book-payroll-comp-kpi {
    grid-template-columns: 1fr;
  }

  .book-payroll-comp-header__actions {
    width: 100%;
  }

  .book-payroll-comp-header__actions .btn {
    width: 100%;
  }

  .book-payroll-grp-page .book-payroll-grp-kpi {
    grid-template-columns: 1fr;
  }

  .book-payroll-grp-header__actions {
    width: 100%;
  }

  .book-payroll-grp-header__actions .btn {
    width: 100%;
  }

  .book-payroll-grp-detail .book-ast-detail__hero-actions {
    flex-wrap: wrap;
  }
}

/* ---- Payroll ΓÇö Salary Groups ---- */
.book-payroll-grp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.book-payroll-grp-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-payroll-grp-page .book-payroll-grp-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-payroll-grp-page .book-cust-toolbar__right .filter-bar {
  width: 100%;
  justify-content: flex-end;
}

/* ---- Payroll ΓÇö Employee Salary Setup ---- */
.book-payroll-ess-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.book-payroll-ess-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-payroll-ess-page .book-payroll-ess-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-payroll-ess-page .book-cust-toolbar__right .filter-bar {
  width: 100%;
  justify-content: flex-end;
}

.book-payroll-ess-form {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-4);
  align-items: start;
  margin-bottom: var(--space-4);
}

.book-payroll-ess-form__summary {
  position: sticky;
  top: var(--space-2);
}

.book-payroll-ess-summary {
  padding: var(--space-4);
  background: var(--page-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
}

.book-payroll-ess-summary__rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.book-payroll-ess-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
}

.book-payroll-ess-summary__row span {
  color: var(--text-muted);
}

.book-payroll-ess-summary__row strong {
  font-size: var(--font-size-base);
  white-space: nowrap;
}

.book-payroll-ess-summary__row--net strong {
  color: var(--color-primary);
  font-size: var(--font-size-lg);
}

.book-payroll-ess-summary__row--total strong {
  color: var(--color-success);
  font-size: var(--font-size-lg);
}

.book-payroll-ess-summary__divider {
  height: 1px;
  background: var(--border-color, #e2e8f0);
  margin: var(--space-2) 0;
}

.book-payroll-ess-form__footer {
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding-top: var(--space-4);
}

.book-payroll-ess-comp-table .data-table th,
.book-payroll-ess-comp-table .data-table td {
  font-size: var(--font-size-sm);
}

@media (max-width: 1200px) {
  .book-payroll-ess-page .book-payroll-ess-kpi {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-payroll-ess-form {
    grid-template-columns: 1fr;
  }

  .book-payroll-ess-form__summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .book-payroll-ess-page .book-payroll-ess-kpi {
    grid-template-columns: 1fr;
  }

  .book-payroll-ess-header__actions {
    width: 100%;
  }

  .book-payroll-ess-header__actions .btn {
    width: 100%;
  }

  .book-payroll-ess-detail .book-ast-detail__hero-actions {
    flex-wrap: wrap;
  }
}

/* ---- Payroll ΓÇö Salary Advances ---- */
.book-payroll-adv-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.book-payroll-adv-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-payroll-adv-page .book-payroll-adv-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-payroll-adv-page .book-cust-toolbar__right .filter-bar {
  width: 100%;
  justify-content: flex-end;
}

.action-btn--approve:hover {
  background: var(--color-success-light);
  color: var(--color-success);
}

@media (max-width: 1200px) {
  .book-payroll-adv-page .book-payroll-adv-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-payroll-adv-page .book-payroll-adv-kpi {
    grid-template-columns: 1fr;
  }

  .book-payroll-adv-header__actions {
    width: 100%;
  }

  .book-payroll-adv-header__actions .btn {
    width: 100%;
  }

  .book-payroll-adv-detail .book-ast-detail__hero-actions {
    flex-wrap: wrap;
  }
}

/* ---- Payroll ΓÇö Monthly Payroll ---- */
.book-payroll-run-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.book-payroll-run-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-payroll-run-page .book-payroll-run-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-payroll-run-page .book-cust-toolbar__right .filter-bar {
  width: 100%;
  justify-content: flex-end;
}

.book-payroll-run-badge--paid {
  background: #065f46;
  color: #ecfdf5;
}

.book-payroll-run-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.book-payroll-run-summary__card {
  padding: var(--space-4);
  background: var(--page-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 8px);
}

.book-payroll-run-summary__card span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}

.book-payroll-run-summary__card strong {
  font-size: var(--font-size-lg);
}

.book-payroll-run-summary__card--net strong {
  color: var(--color-primary);
}

.book-payroll-run-summary__card--total strong {
  color: var(--color-success);
}

.book-payroll-run-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.book-payroll-run-flow__step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md, 8px);
  background: var(--page-bg, #f1f5f9);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.book-payroll-run-flow__step--done {
  background: var(--color-success-light, #dcfce7);
  color: var(--color-success);
}

.book-payroll-run-flow__step--current {
  background: var(--color-primary-light, #dbeafe);
  color: var(--color-primary);
  font-weight: 600;
}

.book-payroll-run-flow__arrow {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

.book-payroll-run-wizard__steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-payroll-run-wizard__step {
  font-size: var(--font-size-xs);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm, 6px);
  background: var(--page-bg, #f1f5f9);
  color: var(--text-muted);
}

.book-payroll-run-wizard__step--active {
  background: var(--color-primary-light, #dbeafe);
  color: var(--color-primary);
  font-weight: 600;
}

.book-payroll-run-wizard__step--done {
  background: var(--color-success-light, #dcfce7);
  color: var(--color-success);
}

.book-payroll-run-emp-list {
  max-height: 220px;
  overflow-y: auto;
}

@media (max-width: 1200px) {
  .book-payroll-run-page .book-payroll-run-kpi {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-payroll-run-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-payroll-run-page .book-payroll-run-kpi {
    grid-template-columns: 1fr;
  }

  .book-payroll-run-header__actions {
    width: 100%;
  }

  .book-payroll-run-header__actions .btn {
    width: 100%;
  }

  .book-payroll-run-detail .book-ast-detail__hero-actions {
    flex-wrap: wrap;
  }

  .book-payroll-run-summary {
    grid-template-columns: 1fr;
  }
}

/* ---- Payroll ΓÇö Payslips ---- */
.book-payroll-ps-header .book-dash-header__meta {
  margin-top: var(--space-1);
}

.book-payroll-ps-page .book-payroll-ps-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-payroll-ps-page .book-cust-toolbar__right .filter-bar {
  width: 100%;
  justify-content: flex-end;
}

.book-payroll-ps-kpi__money {
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.book-payroll-ps-badge--paid {
  background: #065f46;
  color: #ecfdf5;
}

.book-payroll-ps-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.book-payroll-ps-bulk__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-payroll-ps-check {
  width: 36px;
}

.book-payroll-ps-preview__frame {
  padding: 0;
  overflow: hidden;
}

.book-payroll-ps-preview__iframe {
  width: 100%;
  min-height: 900px;
  border: 0;
  background: #fff;
}

@media (max-width: 1200px) {
  .book-payroll-ps-page .book-payroll-ps-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-payroll-ps-page .book-payroll-ps-kpi {
    grid-template-columns: 1fr;
  }

  .book-payroll-ps-bulk {
    flex-direction: column;
    align-items: stretch;
  }

  .book-payroll-ps-bulk__actions .btn {
    width: 100%;
  }

  .book-payroll-ps-preview__iframe {
    min-height: 640px;
  }
}

/* ΓöÇΓöÇ Payroll Reports (Accounting-style) ΓöÇΓöÇ */
.book-payroll-rpt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-payroll-rpt-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-payroll-rpt-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  padding: 0 var(--space-4) var(--space-4);
}

.book-payroll-rpt-categories .form-section-title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-payroll-rpt-dashboard {
  margin-bottom: var(--space-4);
}

.book-payroll-rpt-nav__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.book-payroll-rpt-nav__card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.book-payroll-rpt-nav__card--active {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--surface-card));
  box-shadow: var(--shadow-sm);
}

.book-payroll-rpt-nav__label {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.book-payroll-rpt-nav__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.book-payroll-rpt-page .book-cust-toolbar__right .filter-bar {
  width: 100%;
  justify-content: flex-end;
}

.book-payroll-rpt-page .book-payroll-rpt-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-payroll-rpt-kpi__money {
  font-size: clamp(1rem, 1.6vw, 1.35rem);
}

.book-payroll-rpt-export__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0 var(--space-4);
}

.book-payroll-rpt-export__actions--flush {
  padding: 0;
}

.book-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.book-payroll-rpt-export__opts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: 0 var(--space-4) var(--space-4);
}

@media (max-width: 1100px) {
  .book-payroll-rpt-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-payroll-rpt-page .book-payroll-rpt-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .book-payroll-rpt-nav {
    grid-template-columns: 1fr;
  }

  .book-payroll-rpt-page .book-payroll-rpt-kpi {
    grid-template-columns: 1fr;
  }

  .book-payroll-rpt-header__actions {
    width: 100%;
  }

  .book-payroll-rpt-export__actions .book-export-actions .btn {
    flex: 1 1 auto;
  }
}

/* ── Salary Bank Transfer report page ── */
.book-sbt-page {
  max-width: 100%;
}

.book-sbt-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
}

.book-sbt-notice__icon {
  font-size: 1.25rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.book-sbt-notice__title {
  display: block;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

.book-sbt-notice__text {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.book-sbt-options__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
}

.book-sbt-options__col {
  min-width: 0;
}

.book-sbt-period-status {
  margin-top: calc(-1 * var(--space-2));
  margin-bottom: var(--space-2);
}

.book-sbt-letterhead-indicator {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.book-sbt-letterhead-indicator__label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.book-sbt-kpi-grid .book-sbt-kpi--total {
  border-left-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 6%, var(--surface-card));
}

.book-sbt-summary-detail__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-color);
  font-size: var(--text-sm);
}

.book-sbt-warn-text {
  color: var(--color-warning, #b45309);
  font-weight: 600;
}

.book-sbt-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-sbt-table {
  min-width: 960px;
  table-layout: fixed;
  width: 100%;
}

.book-sbt-table th,
.book-sbt-table td {
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.book-sbt-col-no { width: 4%; }
.book-sbt-col-employee { width: 18%; }
.book-sbt-col-amount { width: 12%; }
.book-sbt-col-account { width: 16%; }
.book-sbt-col-bank { width: 16%; }
.book-sbt-col-branch { width: 14%; }
.book-sbt-col-acct-name { width: 14%; }
.book-sbt-col-epf { width: 6%; }
.book-sbt-col-etf { width: 6%; }

.book-sbt-acct-num {
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.92em;
  letter-spacing: 0.02em;
}

.book-sbt-table__total td {
  font-weight: 700;
  border-top: 2px solid var(--border-color);
  background: var(--page-bg-subtle, #f8fafc);
}

.book-sbt-table__total-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--text-xs);
}

.book-sbt-doc-preview__stage {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--page-bg-subtle, #f1f5f9);
  overflow: hidden;
}

.book-sbt-doc-preview__iframe {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 0;
  background: #fff;
}

@media (max-width: 900px) {
  .book-sbt-options__grid {
    grid-template-columns: 1fr;
  }

  .book-sbt-page .book-payroll-rpt-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .book-sbt-page .book-payroll-rpt-kpi {
    grid-template-columns: 1fr;
  }
}

/* ── ETF R4 Remittance report page ── */
.book-etf-r4-page {
  max-width: 100%;
}

.book-etf-r4-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
}

.book-etf-r4-notice__icon {
  font-size: 1.25rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.book-etf-r4-notice__title {
  display: block;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

.book-etf-r4-notice__text,
.book-etf-r4-notice__link {
  margin: 0 0 var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.book-etf-r4-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
}

.book-etf-r4-meta-label {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.book-etf-r4-meta-value {
  font-weight: 600;
  font-size: var(--text-sm);
}

.book-etf-r4-remittance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
}

.book-etf-r4-clarifications {
  grid-column: 1 / -1;
}

.book-etf-r4-totals__rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px dashed var(--border-color);
}

.book-etf-r4-totals__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-sm);
}

.book-etf-r4-totals__row span {
  color: var(--text-muted);
}

.book-etf-r4-totals__grand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.book-etf-r4-totals__grand strong {
  font-size: var(--text-lg);
  color: var(--color-primary);
}

.book-etf-r4-totals__hint {
  margin: var(--space-3) 0 0;
}

.book-etf-r4-kpi-grid .book-etf-r4-kpi--total {
  border-left-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 6%, var(--surface-card));
}

.book-etf-r4-deflist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-5);
}

.book-etf-r4-deflist__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.book-etf-r4-deflist__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.book-etf-r4-deflist__value {
  font-size: var(--text-sm);
  font-weight: 600;
  word-break: break-word;
}

.book-etf-r4-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-etf-r4-table {
  min-width: 640px;
  table-layout: fixed;
  width: 100%;
}

.book-etf-r4-col-employee { width: 36%; }
.book-etf-r4-col-nic { width: 18%; }
.book-etf-r4-col-member { width: 18%; }
.book-etf-r4-col-amount { width: 28%; }

.book-etf-r4-table th,
.book-etf-r4-table td {
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.book-etf-r4-table__total td {
  font-weight: 700;
  border-top: 2px solid var(--border-color);
  background: var(--page-bg-subtle, #f8fafc);
}

.book-etf-r4-table__total-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--text-xs);
}

.book-etf-r4-table-note {
  margin: var(--space-3) 0 0;
}

@media (max-width: 900px) {
  .book-etf-r4-remittance-grid,
  .book-etf-r4-meta-grid,
  .book-etf-r4-deflist {
    grid-template-columns: 1fr;
  }

  .book-etf-r4-page .book-payroll-rpt-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .book-etf-r4-page .book-payroll-rpt-kpi {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Leave Reports (Payroll Reports framework) ΓöÇΓöÇ */
.book-leave-rpt-page .book-payroll-rpt-nav {
  padding: 0 var(--space-4) var(--space-4);
}

.book-leave-rpt-page .book-cust-toolbar__right .filter-bar {
  width: 100%;
  justify-content: flex-end;
}

.book-leave-rpt-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-leave-rpt-header .book-dash-header__title {
  font-size: var(--text-xl);
}

@media (max-width: 1100px) {
  .book-leave-rpt-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .book-leave-rpt-kpi {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Inventory ΓÇö Items (Accounting-style) ΓöÇΓöÇ */
.book-inv-items-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-inv-items-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-inv-items-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-inv-items-kpi {
  grid-template-columns: repeat(6, 1fr);
}

.book-inv-items-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-inv-items-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-inv-items-kpi__money {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.book-inv-items-toolbar .filter-bar,
.book-inv-items-filter-bar {
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-inv-items-toolbar .search-bar,
.book-inv-items-filter-bar .search-wrapper {
  flex: 1 1 220px;
  min-width: 220px;
}

.book-inv-items-filter-bar .filter-select {
  min-width: 140px;
}

.book-inv-items-filter-count {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, var(--border-color));
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-inv-items-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--border-color));
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-inv-items-cat-badge--muted {
  color: var(--text-muted);
  background: var(--page-bg-subtle);
  border-color: var(--border-color);
}

.book-inv-items-code {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-family: var(--font-mono, ui-monospace, monospace);
}

.book-inv-items-name {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-inv-items-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-inv-items-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-inv-items-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-inv-items-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-inv-items-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-inv-items-table tbody tr:last-child td {
  border-bottom: none;
}

.book-inv-items-table-card .pagination {
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-inv-items-header__actions .btn--primary {
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.book-inv-items-header__actions .btn--ghost:hover {
  background: var(--page-bg-subtle);
  border-color: var(--border-color);
}

.book-inv-items-table .book-ast-actions-col .cell-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}

@media (max-width: 1400px) {
  .book-inv-items-kpi {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .book-inv-items-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-inv-items-header__actions {
    width: 100%;
  }

  .book-inv-items-header__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .book-inv-items-header__actions .btn--primary {
    flex: 1 1 100%;
  }

  .book-inv-items-filter-bar .filter-select,
  .book-inv-items-filter-bar .btn {
    flex: 1 1 calc(50% - var(--space-2));
  }
}

@media (max-width: 640px) {
  .book-inv-items-kpi {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Inventory ΓÇö Categories (Accounting-style) ΓöÇΓöÇ */
.book-inv-cat-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-inv-cat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-inv-cat-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-inv-cat-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-inv-cat-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-inv-cat-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-inv-cat-section__title {
  margin-bottom: var(--space-3);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-inv-cat-section-toolbar .filter-bar,
.book-inv-cat-filter-bar {
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-inv-cat-filter-bar .search-wrapper {
  flex: 1 1 220px;
  min-width: 220px;
}

.book-inv-cat-filter-bar .filter-select {
  min-width: 140px;
}

.book-inv-cat-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-info);
  background: color-mix(in srgb, var(--color-info) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-info) 18%, var(--border-color));
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-inv-cat-type-badge--muted {
  color: var(--text-muted);
  background: var(--page-bg-subtle);
  border-color: var(--border-color);
}

.book-inv-cat-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-inv-cat-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-inv-cat-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-inv-cat-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-inv-cat-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-inv-cat-table tbody tr:last-child td {
  border-bottom: none;
}

.book-inv-cat-table .book-ast-actions-col .cell-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}

.book-inv-cat-header__actions .btn--primary {
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

@media (max-width: 1100px) {
  .book-inv-cat-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-inv-cat-header__actions {
    width: 100%;
  }

  .book-inv-cat-header__actions .btn {
    flex: 1 1 auto;
  }

  .book-inv-cat-filter-bar .filter-select,
  .book-inv-cat-filter-bar .btn {
    flex: 1 1 calc(50% - var(--space-2));
  }
}

@media (max-width: 640px) {
  .book-inv-cat-kpi {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Inventory ΓÇö Stock In (Accounting-style) ΓöÇΓöÇ */
.book-inv-si-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-inv-si-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-inv-si-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-inv-si-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-inv-si-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-inv-si-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-inv-si-kpi__money {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.book-inv-si-toolbar .filter-bar,
.book-inv-si-filter-bar {
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-inv-si-filter-bar .search-wrapper {
  flex: 1 1 220px;
  min-width: 220px;
}

.book-inv-si-filter-bar .filter-select {
  min-width: 130px;
}

.book-inv-si-ref-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--text-secondary);
  background: var(--page-bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-inv-si-ref-badge--muted {
  color: var(--text-muted);
}

.book-inv-si-item-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}

.book-inv-si-item-name {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-inv-si-item-cat .book-inv-items-cat-badge {
  font-size: 10px;
  padding: 2px 8px;
}

.book-inv-si-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-inv-si-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-inv-si-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-inv-si-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-inv-si-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-inv-si-table tbody tr:last-child td {
  border-bottom: none;
}

.book-inv-si-table-card .pagination {
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-inv-si-table .book-ast-actions-col .cell-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}

.book-inv-si-detail-card {
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.book-inv-si-header__actions .btn--primary {
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

@media (max-width: 1400px) {
  .book-inv-si-kpi {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .book-inv-si-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-inv-si-header__actions {
    width: 100%;
  }

  .book-inv-si-header__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .book-inv-si-header__actions .btn--primary {
    flex: 1 1 100%;
  }

  .book-inv-si-filter-bar .filter-select,
  .book-inv-si-filter-bar .btn {
    flex: 1 1 calc(50% - var(--space-2));
  }
}

@media (max-width: 640px) {
  .book-inv-si-kpi {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Inventory ΓÇö Stock Out (Accounting-style) ΓöÇΓöÇ */
.book-inv-so-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-inv-so-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-inv-so-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-inv-so-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-inv-so-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-inv-so-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-inv-so-kpi__money {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.book-inv-so-toolbar .filter-bar,
.book-inv-so-filter-bar {
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-inv-so-filter-bar .search-wrapper {
  flex: 1 1 220px;
  min-width: 220px;
}

.book-inv-so-filter-bar .filter-select {
  min-width: 130px;
}

.book-inv-so-ref-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--text-secondary);
  background: var(--page-bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-inv-so-ref-badge--muted {
  color: var(--text-muted);
}

.book-inv-so-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-inv-so-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-inv-so-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-inv-so-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-inv-so-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-inv-so-table tbody tr:last-child td {
  border-bottom: none;
}

.book-inv-so-table-card .pagination {
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-inv-so-table .book-ast-actions-col .cell-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}

.book-inv-so-detail-card {
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.book-inv-so-header__actions .btn--primary {
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

@media (max-width: 1400px) {
  .book-inv-so-kpi {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .book-inv-so-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-inv-so-header__actions {
    width: 100%;
  }

  .book-inv-so-header__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .book-inv-so-header__actions .btn--primary {
    flex: 1 1 100%;
  }

  .book-inv-so-filter-bar .filter-select,
  .book-inv-so-filter-bar .btn {
    flex: 1 1 calc(50% - var(--space-2));
  }
}

@media (max-width: 640px) {
  .book-inv-so-kpi {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Inventory ΓÇö Item Assignments (Accounting-style) ΓöÇΓöÇ */
.book-inv-asn-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-inv-asn-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-inv-asn-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-inv-asn-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
}

.book-inv-asn-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-inv-asn-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-inv-asn-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-inv-asn-toolbar .filter-bar,
.book-inv-asn-filter-bar {
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-inv-asn-filter-bar .search-wrapper {
  flex: 1 1 220px;
  min-width: 220px;
}

.book-inv-asn-filter-bar .filter-select {
  min-width: 130px;
}

.book-inv-asn-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-inv-asn-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-inv-asn-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-inv-asn-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-inv-asn-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-inv-asn-table tbody tr:last-child td {
  border-bottom: none;
}

.book-inv-asn-table-card .pagination {
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-inv-asn-table .book-ast-actions-col .cell-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.book-inv-asn-item-cell .book-inv-items-name {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-inv-asn-detail-card {
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.book-inv-asn-header__actions .btn--primary {
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

@media (max-width: 1400px) {
  .book-inv-asn-kpi {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .book-inv-asn-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-inv-asn-header__actions {
    width: 100%;
  }

  .book-inv-asn-header__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .book-inv-asn-header__actions .btn--primary {
    flex: 1 1 100%;
  }

  .book-inv-asn-filter-bar .filter-select,
  .book-inv-asn-filter-bar .btn {
    flex: 1 1 calc(50% - var(--space-2));
  }
}

@media (max-width: 640px) {
  .book-inv-asn-kpi {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Inventory ΓÇö Locations (Accounting-style) ΓöÇΓöÇ */
.book-inv-loc-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-inv-loc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-inv-loc-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-inv-loc-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-inv-loc-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-inv-loc-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-inv-loc-kpi__money {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.book-inv-loc-toolbar .filter-bar,
.book-inv-loc-filter-bar {
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-inv-loc-filter-bar .search-wrapper {
  flex: 1 1 220px;
  min-width: 220px;
}

.book-inv-loc-filter-bar .filter-select {
  min-width: 140px;
}

.book-inv-loc-name {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-inv-loc-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-inv-loc-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-inv-loc-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-inv-loc-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-inv-loc-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-inv-loc-table tbody tr:last-child td {
  border-bottom: none;
}

.book-inv-loc-table-card .pagination {
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-inv-loc-table .book-ast-actions-col .cell-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}

.book-inv-loc-detail-card {
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.book-inv-loc-header__actions .btn--primary {
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

@media (max-width: 1400px) {
  .book-inv-loc-kpi {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .book-inv-loc-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-inv-loc-header__actions {
    width: 100%;
  }

  .book-inv-loc-header__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .book-inv-loc-header__actions .btn--primary {
    flex: 1 1 100%;
  }

  .book-inv-loc-filter-bar .filter-select,
  .book-inv-loc-filter-bar .btn {
    flex: 1 1 calc(50% - var(--space-2));
  }
}

@media (max-width: 640px) {
  .book-inv-loc-kpi {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Inventory ΓÇö Reports (Accounting-style) ΓöÇΓöÇ */
.book-inv-rpt-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-inv-rpt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-inv-rpt-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-inv-rpt-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-inv-rpt-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-inv-rpt-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-inv-rpt-kpi__money {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.book-inv-rpt-categories .form-section-title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-inv-rpt-page .book-inv-rpt-nav {
  padding: 0 var(--space-4) var(--space-4);
}

.book-inv-rpt-toolbar .filter-bar,
.book-inv-rpt-filter-bar {
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-inv-rpt-filter-bar .search-wrapper {
  flex: 1 1 220px;
  min-width: 220px;
}

.book-inv-rpt-filter-bar .filter-select {
  min-width: 130px;
}

.book-inv-rpt-loc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-info);
  background: color-mix(in srgb, var(--color-info) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-info) 18%, var(--border-color));
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-inv-rpt-loc-badge--muted {
  color: var(--text-muted);
  background: var(--page-bg-subtle);
  border-color: var(--border-color);
}

.book-inv-rpt-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-inv-rpt-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-inv-rpt-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-inv-rpt-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-inv-rpt-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-inv-rpt-table tbody tr:last-child td {
  border-bottom: none;
}

.book-inv-rpt-table-card .pagination {
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-inv-rpt-total-footer {
  padding: var(--space-4);
  text-align: right;
  font-size: var(--font-size-md);
  border-top: 1px solid var(--border-color);
  background: var(--page-bg-subtle);
}

.book-inv-rpt-detail-card {
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

@media (max-width: 1400px) {
  .book-inv-rpt-kpi {
    grid-template-columns: repeat(3, 1fr);
  }

  .book-inv-rpt-page .book-payroll-rpt-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .book-inv-rpt-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-inv-rpt-header__actions {
    width: 100%;
  }

  .book-inv-rpt-filter-bar .filter-select,
  .book-inv-rpt-filter-bar .btn {
    flex: 1 1 calc(50% - var(--space-2));
  }
}

@media (max-width: 640px) {
  .book-inv-rpt-kpi {
    grid-template-columns: 1fr;
  }

  .book-inv-rpt-page .book-payroll-rpt-nav {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Intelligence ΓÇö Financial Reports (Accounting-style) ΓöÇΓöÇ */
.book-fin-rpt-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-fin-rpt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-fin-rpt-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-fin-rpt-header__actions .btn {
  border-radius: var(--radius-md);
  min-height: 34px;
}

.book-fin-rpt-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-fin-rpt-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-fin-rpt-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-fin-rpt-kpi__money {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.book-fin-rpt-kpi__value--pos,
.book-fin-rpt-amount--pos {
  color: var(--color-success);
}

.book-fin-rpt-kpi__value--neg,
.book-fin-rpt-amount--neg {
  color: var(--color-danger);
}

.book-fin-rpt-kpi--inline {
  grid-template-columns: repeat(3, 1fr);
}

.book-fin-rpt-categories .form-section-title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-fin-rpt-page .book-fin-rpt-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 var(--space-4) var(--space-4);
}

.book-fin-rpt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-4);
}

.book-fin-rpt-period {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--page-bg-subtle);
  box-shadow: var(--shadow-xs);
}

.book-fin-rpt-period-btn {
  border: none;
  border-right: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  transition: background 0.15s, color 0.15s;
}

.book-fin-rpt-period-btn:last-child {
  border-right: none;
}

.book-fin-rpt-period-btn:hover {
  background: color-mix(in srgb, var(--color-primary) 8%, var(--card-bg));
  color: var(--color-primary);
}

.book-fin-rpt-period-btn.active {
  background: color-mix(in srgb, var(--color-primary) 12%, var(--card-bg));
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

.book-fin-rpt-date-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-fin-rpt-date-input {
  min-width: 150px;
  border-radius: var(--radius-md);
}

.book-fin-rpt-date-sep {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.book-fin-rpt-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-fin-rpt-grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-4);
  align-items: start;
}

.book-fin-rpt-summary-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-fin-rpt-summary-card .form-section-title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-fin-rpt-summary-body {
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.book-fin-rpt-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.book-fin-rpt-summary-table td {
  padding: var(--space-2) 0;
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--border-color);
}

.book-fin-rpt-summary-table tr:last-child td {
  border-bottom: none;
}

.book-fin-rpt-summary-label {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-fin-rpt-summary-sub {
  padding-left: var(--space-4) !important;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

.book-fin-rpt-summary-divider td {
  border-top: 2px solid var(--border-color);
  padding-top: var(--space-3);
}

.book-fin-rpt-summary-total td {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  border-top: 2px solid var(--border-color);
  padding-top: var(--space-3);
}

.book-fin-rpt-metrics {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-fin-rpt-metric-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-fin-rpt-metric-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-fin-rpt-metric-value {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-fin-rpt-chart-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-fin-rpt-chart-card .form-section-title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-fin-rpt-chart-body {
  position: relative;
  min-height: 280px;
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.book-fin-rpt-chart-body canvas {
  width: 100% !important;
  max-height: 320px;
}

.book-fin-rpt-chart-body--donut {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-fin-rpt-chart-body--donut canvas {
  max-height: 280px;
  max-width: 280px;
}

.book-fin-rpt-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-fin-rpt-table-card .form-section-title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-fin-rpt-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-fin-rpt-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-fin-rpt-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-fin-rpt-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-fin-rpt-table tbody tr:last-child td {
  border-bottom: none;
}

.book-fin-rpt-table-total td {
  font-weight: var(--font-weight-bold);
  background: var(--page-bg-subtle);
  border-top: 2px solid var(--border-color);
}

.book-fin-rpt-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--border-color));
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-fin-rpt-progress {
  height: 6px;
  background: var(--page-bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-1);
  min-width: 80px;
}

.book-fin-rpt-progress__fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  min-width: 2px;
}

.book-fin-rpt-progress__fill--ok {
  background: var(--color-success);
}

.book-fin-rpt-progress__fill--warn {
  background: var(--color-warning);
}

.book-fin-rpt-progress__fill--danger {
  background: var(--color-danger);
}

.book-fin-rpt-empty {
  padding: var(--space-6);
  text-align: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-fin-rpt-banner {
  border-radius: var(--radius-md);
}

@media (max-width: 1400px) {
  .book-fin-rpt-kpi {
    grid-template-columns: repeat(3, 1fr);
  }

  .book-fin-rpt-page .book-fin-rpt-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .book-fin-rpt-kpi {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-fin-rpt-grid-2 {
    grid-template-columns: 1fr;
  }

  .book-fin-rpt-kpi--inline {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-fin-rpt-header__actions {
    width: 100%;
  }

  .book-fin-rpt-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .book-fin-rpt-period {
    width: 100%;
  }

  .book-fin-rpt-period-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .book-fin-rpt-date-filter {
    width: 100%;
  }

  .book-fin-rpt-date-input {
    flex: 1 1 calc(50% - var(--space-2));
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .book-fin-rpt-kpi,
  .book-fin-rpt-kpi--inline {
    grid-template-columns: 1fr;
  }

  .book-fin-rpt-page .book-fin-rpt-nav {
    grid-template-columns: 1fr;
  }

  .book-fin-rpt-chart-body {
    min-height: 220px;
  }
}

/* ΓöÇΓöÇ Intelligence ΓÇö Tax Center (Accounting-style) ΓöÇΓöÇ */
.book-tax-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-tax-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-tax-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-tax-header__actions .btn {
  border-radius: var(--radius-md);
  min-height: 34px;
}

.book-tax-banner.settings-banner--info {
  background: color-mix(in srgb, var(--info, #3b82f6) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--info, #3b82f6) 25%, transparent);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.book-tax-banner svg {
  flex-shrink: 0;
  color: var(--color-info);
  margin-top: 2px;
}

.book-tax-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-tax-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-tax-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-tax-kpi__money {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.book-tax-kpi__meta {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.book-tax-rate-card__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
}

.book-tax-rate-card__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.book-tax-rate-card__value {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--text-primary);
}

.book-tax-reconciliation__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  padding: 0 var(--space-4) var(--space-4);
}

.book-tax-reconciliation__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}

.book-tax-reconciliation__value {
  font-size: var(--text-lg);
  font-weight: 600;
}

.book-tax-summary-table__badge {
  margin-left: var(--space-2);
  vertical-align: middle;
}

@media (max-width: 900px) {
  .book-tax-reconciliation__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .book-tax-reconciliation__grid {
    grid-template-columns: 1fr;
  }
}

.book-tax-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-4);
}

.book-tax-toolbar__left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.book-tax-toolbar__label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
  white-space: nowrap;
}

.book-tax-year-select {
  min-width: 110px;
  border-radius: var(--radius-md);
}

.book-tax-period {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--page-bg-subtle);
  box-shadow: var(--shadow-xs);
}

.book-tax-period-btn {
  border: none;
  border-right: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  transition: background 0.15s, color 0.15s;
}

.book-tax-period-btn:last-child {
  border-right: none;
}

.book-tax-period-btn:hover {
  background: color-mix(in srgb, var(--color-primary) 8%, var(--card-bg));
  color: var(--color-primary);
}

.book-tax-period-btn.active {
  background: color-mix(in srgb, var(--color-primary) 12%, var(--card-bg));
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

.book-tax-date-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-tax-date-input {
  min-width: 150px;
  border-radius: var(--radius-md);
}

.book-tax-date-sep {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.book-tax-analytics__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  padding: 0 var(--space-4) var(--space-4);
}

.book-tax-analytics .form-section-title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-tax-analytics__card {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-tax-analytics__label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-tax-analytics__value {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-tax-categories .form-section-title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-tax-page .book-tax-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 var(--space-4) var(--space-4);
}

.book-tax-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-tax-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-tax-table-card .form-section-title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-tax-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-tax-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-tax-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-tax-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-tax-table tbody tr:last-child td {
  border-bottom: none;
}

.book-tax-amount--pos {
  color: var(--color-success);
}

.book-tax-amount--neg {
  color: var(--color-danger);
}

.book-tax-amount--warn {
  color: var(--color-warning);
}

.book-tax-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--border-color));
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-tax-progress {
  height: 6px;
  background: var(--page-bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-1);
  min-width: 80px;
}

.book-tax-progress__fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  min-width: 2px;
}

.book-tax-deductible-card {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-tax-deductible-card .form-section-title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-tax-deductible-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  padding: var(--space-4);
}

.book-tax-deductible-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-tax-deductible-value {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-tax-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.book-tax-detail-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-tax-detail-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-tax-detail-value {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

@media (max-width: 1200px) {
  .book-tax-kpi {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-tax-analytics__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-tax-page .book-tax-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-tax-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-tax-header__actions {
    width: 100%;
  }

  .book-tax-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .book-tax-period {
    width: 100%;
  }

  .book-tax-period-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .book-tax-date-filter {
    width: 100%;
  }

  .book-tax-date-input {
    flex: 1 1 calc(50% - var(--space-2));
    min-width: 0;
  }

  .book-tax-deductible-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .book-tax-kpi,
  .book-tax-analytics__grid,
  .book-tax-detail-grid {
    grid-template-columns: 1fr;
  }

  .book-tax-page .book-tax-nav {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   Phase 162 - Management Reports & Tax Center presentation layer
   Every rule below is scoped to the Management Reports root
   (.book-fin-rpt-page = #reports) or the Tax Center root
   (.book-tax-page = #taxes) so that no styling can reach HR, accounting,
   asset, inventory or quote screens that share these utility class names.
   ========================================================================= */

/* ---- Section shell (scoped: book-qt-section is shared by 24 modules) ---- */
.book-fin-rpt-page .book-qt-section,
.book-tax-page .book-qt-section {
  padding: var(--space-5);
}

.book-fin-rpt-page .book-qt-section__title,
.book-tax-page .book-qt-section__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
}

/* ---- Page header ---- */
.book-fin-rpt-page .book-dash-header__main,
.book-tax-page .book-dash-header__main {
  flex: 1 1 320px;
  min-width: 0;
}

.book-fin-rpt-page .book-rpt-header__actions,
.book-tax-page .book-rpt-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ---- Category tab nav ---- */
.book-fin-rpt-page .book-fin-rpt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.book-fin-rpt-page .book-fin-rpt-tabs .btn {
  border-radius: var(--radius-full);
  min-height: 34px;
}

/* Active tab: filled colour plus a ring, so state is not colour-only */
.book-fin-rpt-page .book-fin-rpt-tabs .btn--primary {
  font-weight: var(--font-weight-bold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.book-fin-rpt-page .book-fin-rpt-tabs .btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---- Shared report filter panel ---- */
.book-fin-rpt-page .book-rpt-filters,
.book-tax-page .book-rpt-filters {
  margin-bottom: var(--space-4);
}

/* The panel carries both book-qt-section and book-rpt-filters; the inner
   head/body/actions rows own the padding, so drop the section padding. */
.book-fin-rpt-page .book-qt-section.book-rpt-filters,
.book-tax-page .book-qt-section.book-rpt-filters {
  padding: 0;
}

.book-fin-rpt-page .book-rpt-filters__head,
.book-tax-page .book-rpt-filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5) 0;
}

.book-fin-rpt-page .book-rpt-filters__head .book-qt-section__title,
.book-tax-page .book-rpt-filters__head .book-qt-section__title {
  margin: 0;
}

.book-fin-rpt-page .book-rpt-filters__body,
.book-tax-page .book-rpt-filters__body {
  padding: var(--space-4) var(--space-5);
}

.book-fin-rpt-page .book-rpt-filters__actions,
.book-tax-page .book-rpt-filters__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5) var(--space-4);
  border-top: 1px solid var(--border-color);
  background: var(--page-bg-subtle);
}

.book-fin-rpt-page .book-rpt-scope,
.book-tax-page .book-rpt-scope {
  margin-bottom: var(--space-4);
}

/* ---- Two-column labelled filter grid (labels above fields) ---- */
.book-tax-page .book-tax-filters__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.book-tax-page .book-tax-filters__field {
  min-width: 0;
}

.book-tax-page .book-tax-filters__field--full {
  grid-column: 1 / -1;
}

.book-tax-page .book-tax-filters__grid .form-label {
  display: block;
  margin-bottom: var(--space-2);
}

.book-tax-page .book-tax-book-select {
  width: 100%;
  max-width: 360px;
}

/* Keep the date pair compact instead of stretching across the full row */
.book-tax-page .book-tax-filters .book-tax-date-filter .book-tax-date-input {
  flex: 0 0 190px;
  width: 190px;
  min-width: 0;
}

/* ---- Report category cards (Overview grid + Financial group grid) ---- */
.book-fin-rpt-page .book-mgmt-rpt-groups,
.book-tax-page .book-mgmt-rpt-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Financial tab: the five report groups become a card grid instead of
   full-width stacked sections. */
/* align-items: start keeps each category card at its natural height; with
   stretch, single-report categories left a large dead area under the card. */
.book-fin-rpt-page .book-mgmt-rpt-groups--grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: start;
}

.book-fin-rpt-page .book-mgmt-rpt-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  height: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-fin-rpt-page .book-mgmt-rpt-group__title,
.book-tax-page .book-mgmt-rpt-group__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  margin: 0;
}

/* Inside the category-card grid the group title is the card heading, so it
   gets full prominence instead of the small uppercase section-label style. */
.book-fin-rpt-page .book-mgmt-rpt-groups--grid .book-mgmt-rpt-group__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  text-transform: none;
  letter-spacing: var(--letter-tight);
  color: var(--text-primary);
  line-height: 1.3;
}

.book-fin-rpt-page .book-mgmt-rpt-group__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-color);
}

.book-fin-rpt-page .book-mgmt-rpt-group__desc {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.45;
}

.book-fin-rpt-page .book-mgmt-rpt-group__count {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  margin: var(--space-1) 0 0;
  padding: 2px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, var(--border-color));
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-fin-rpt-page .book-mgmt-rpt-cards,
.book-tax-page .book-mgmt-rpt-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: stretch;
}

/* Inside a group card the report entries stack in one column */
.book-fin-rpt-page .book-mgmt-rpt-groups--grid .book-mgmt-rpt-cards {
  grid-template-columns: 1fr;
}

.book-fin-rpt-page .book-mgmt-rpt-card,
.book-tax-page .book-mgmt-rpt-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-3);
  height: 100%;
  min-height: 132px;
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.book-fin-rpt-page .book-mgmt-rpt-card:hover,
.book-tax-page .book-mgmt-rpt-card:hover {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--border-color));
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-fin-rpt-page .book-mgmt-rpt-card:focus-within,
.book-tax-page .book-mgmt-rpt-card:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

/* Selected report: left rule + ring, so selection is not colour-only */
.book-fin-rpt-page .book-mgmt-rpt-card--active,
.book-tax-page .book-mgmt-rpt-card--active {
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--border-color));
  border-left: 3px solid var(--color-primary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 22%, transparent);
}

.book-fin-rpt-page .book-mgmt-rpt-card__head,
.book-tax-page .book-mgmt-rpt-card__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.book-fin-rpt-page .book-mgmt-rpt-card__title,
.book-tax-page .book-mgmt-rpt-card__title {
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  line-height: 1.3;
}

.book-fin-rpt-page .book-mgmt-rpt-card__desc,
.book-tax-page .book-mgmt-rpt-card__desc {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.45;
}

.book-fin-rpt-page .book-mgmt-rpt-card .btn,
.book-tax-page .book-mgmt-rpt-card .btn {
  align-self: flex-start;
}

/* Overview tab "N Reports" count pill */
.book-fin-rpt-page .book-mgmt-rpt-card--group .book-mgmt-rpt-card__head > p:last-of-type {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, var(--border-color));
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ---- Report view header ---- */
.book-fin-rpt-page .book-fin-rpt-view-header,
.book-tax-page .book-fin-rpt-view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-fin-rpt-page .book-fin-rpt-view-header__main,
.book-tax-page .book-fin-rpt-view-header__main {
  flex: 1 1 280px;
  min-width: 0;
}

.book-fin-rpt-page .book-fin-rpt-view-header__title,
.book-tax-page .book-fin-rpt-view-header__title {
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-fin-rpt-page .book-fin-rpt-view-header__desc,
.book-tax-page .book-fin-rpt-view-header__desc {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* ---- Misc table helpers used by both report modules ---- */
.book-fin-rpt-page .book-fin-rpt-kpi--6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-fin-rpt-page .book-fin-rpt-total-row td,
.book-tax-page .book-fin-rpt-total-row td {
  font-weight: var(--font-weight-bold);
  background: var(--page-bg-subtle);
  border-top: 2px solid var(--border-color);
}

.book-fin-rpt-page .book-fin-rpt-table-section td {
  background: var(--page-bg-subtle);
  color: var(--text-secondary);
}

.book-fin-rpt-page .book-fin-rpt-perbook-card {
  grid-column: 1 / -1;
}

.book-fin-rpt-page .book-fin-rpt-perbook-card .book-qt-section__title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-fin-rpt-page .book-fin-rpt-perbook-card__note {
  padding: 0 var(--space-4);
  margin-bottom: var(--space-3);
}

/* =========================== Tax Center =========================== */

/* Compact disclaimer: visible but not dominant */
.book-tax-page .book-tax-banner.settings-banner--info {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  line-height: 1.45;
  align-items: center;
}

/* Active Tax Types: secondary info card, deliberately quieter than the
   four financial KPI cards. */
.book-tax-page .book-tax-secondary {
  display: grid;
  grid-template-columns: minmax(0, 440px);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.book-tax-page .book-tax-secondary-card {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--page-bg-subtle);
}

.book-tax-page .book-tax-secondary-card > div:first-child {
  flex: 0 0 auto;
}

.book-tax-page .book-tax-secondary-card__label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.book-tax-page .book-tax-secondary-card__value {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.book-tax-page .book-tax-secondary-card__meta {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

/* Tax Type Summary: right-aligned monetary summary table */
.book-tax-page .book-tax-type-summary {
  margin-bottom: var(--space-4);
}

/* Card-level section titles need the card's inner padding */
.book-tax-page .book-tax-table-card > .book-qt-section__title,
.book-fin-rpt-page .book-fin-rpt-table-card > .book-qt-section__title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-tax-page .book-tax-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.book-tax-page .book-tax-summary-table th,
.book-tax-page .book-tax-summary-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.book-tax-page .book-tax-summary-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.book-tax-page .book-tax-summary-table td.book-tax-summary-table__num,
.book-tax-page .book-tax-summary-table th.book-tax-summary-table__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.book-tax-page .book-tax-summary-table tbody tr:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-tax-page .book-tax-summary-table tbody tr:last-child td {
  border-bottom: none;
}

.book-tax-page .book-tax-summary-table__type {
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

/* Tax report cards: two columns */
.book-tax-page .book-tax-report-cards {
  margin-bottom: var(--space-4);
}

.book-tax-page .book-tax-report-cards .book-mgmt-rpt-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.book-tax-page .book-tax-rpt-card {
  min-height: 124px;
}

/* ---- Tax Liability (quarterly) sub-view ----
   Renders inside the hub scroll context; a leading rule and label give it
   its own visual identity without introducing a route. */
.book-tax-page .book-tax-report-region {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 2px solid var(--border-color);
}

.book-tax-page .book-tax-report-region__eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-primary);
}

.book-tax-page .book-tax-liability-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Current quarter row: tinted background AND a left rule AND bold text, so
   the emphasis never depends on colour alone. */
.book-tax-page .book-tax-quarter-row--current > td {
  background: color-mix(in srgb, var(--color-primary) 7%, var(--card-bg));
  font-weight: var(--font-weight-semibold);
}

.book-tax-page .book-tax-quarter-row--current > td:first-child {
  box-shadow: inset 3px 0 0 var(--color-primary);
}

.book-tax-page .book-tax-quarter-badge {
  margin-left: var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  white-space: nowrap;
}

/* Deductible summary as three prominent KPI cards */
.book-tax-page .book-tax-deductible-summary {
  display: flex;
  flex-direction: column;
}

.book-tax-page .book-tax-kpi--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-tax-page .book-tax-deductible-item {
  min-width: 0;
}

/* Percentage bar driven by a custom property instead of a width literal */
.book-tax-page .book-tax-progress__fill {
  width: var(--pct, 0%);
}

.book-tax-page .book-tax-pct-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 96px;
  max-width: 180px;
  margin-left: auto;
}

.book-tax-page .book-tax-pct-cell .book-tax-progress {
  width: 100%;
  margin-bottom: 0;
}

.book-tax-page .book-tax-pct-cell__value {
  font-variant-numeric: tabular-nums;
}

/* ---- Responsive ---- */
@media (max-width: 1400px) {
  .book-fin-rpt-page .book-mgmt-rpt-groups--grid,
  .book-fin-rpt-page .book-mgmt-rpt-cards,
  .book-tax-page .book-mgmt-rpt-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-fin-rpt-page .book-mgmt-rpt-groups--grid .book-mgmt-rpt-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .book-fin-rpt-page .book-fin-rpt-kpi--6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-tax-page .book-tax-kpi--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .book-tax-page .book-tax-filters__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .book-fin-rpt-page .book-rpt-filters__head,
  .book-tax-page .book-rpt-filters__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .book-fin-rpt-page .book-rpt-filters__actions,
  .book-tax-page .book-rpt-filters__actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .book-fin-rpt-page .book-rpt-filters__actions .btn,
  .book-tax-page .book-rpt-filters__actions .btn {
    width: 100%;
  }

  .book-fin-rpt-page .book-mgmt-rpt-groups--grid,
  .book-fin-rpt-page .book-mgmt-rpt-cards,
  .book-tax-page .book-mgmt-rpt-cards,
  .book-tax-page .book-tax-report-cards .book-mgmt-rpt-cards {
    grid-template-columns: 1fr;
  }

  .book-tax-page .book-tax-secondary {
    grid-template-columns: 1fr;
  }

  .book-fin-rpt-page .book-dash-header__actions.book-rpt-header__actions,
  .book-tax-page .book-dash-header__actions.book-rpt-header__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .book-fin-rpt-page .book-fin-rpt-kpi--6,
  .book-tax-page .book-tax-kpi--3 {
    grid-template-columns: 1fr;
  }

  .book-fin-rpt-page .book-fin-rpt-view-header,
  .book-tax-page .book-fin-rpt-view-header {
    flex-direction: column;
  }
}

/* ΓöÇΓöÇ Administration ΓÇö Users (Accounting-style) ΓöÇΓöÇ */
.book-user-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-user-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-user-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-user-header__actions .btn {
  border-radius: var(--radius-md);
  min-height: 34px;
}

.book-user-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-user-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-user-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-user-toolbar .filter-bar,
.book-user-filter-bar {
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-user-filter-bar .search-wrapper {
  flex: 1 1 220px;
  min-width: 220px;
}

.book-user-filter-bar .filter-select {
  min-width: 130px;
}

.book-user-filter-count {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--border-color));
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-user-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-user-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-user-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-user-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-user-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-user-table tbody tr:last-child td {
  border-bottom: none;
}

.book-user-table-card .pagination {
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-user-table .book-ast-actions-col .cell-actions {
  justify-content: flex-end;
}

.book-user-email {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.book-user-login {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}

.book-user-emp-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.book-user-position {
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.book-user-position-sub {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.book-user-menu-btn {
  min-width: 34px;
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: 1px;
}

.book-user-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-user-role-badge--admin {
  color: var(--color-info-text);
  background: var(--color-info-light);
}

.book-user-role-badge--accountant {
  color: var(--color-success-text);
  background: var(--color-success-light);
}

.book-user-role-badge--hr {
  color: #6d28d9;
  background: color-mix(in srgb, #8b5cf6 14%, var(--card-bg));
  border: 1px solid color-mix(in srgb, #8b5cf6 22%, var(--border-color));
}

.book-user-role-badge--employee,
.book-user-role-badge--default {
  color: var(--text-secondary);
  background: var(--page-bg-subtle);
  border: 1px solid var(--border-color);
}
.book-user-role-badge--finance,
.book-user-role-badge--sales {
  color: var(--color-info-text);
  background: var(--color-info-light);
}

.book-user-role-badge--payroll,
.book-user-role-badge--inventory,
.book-user-role-badge--assets,
.book-user-role-badge--dept {
  color: #0f766e;
  background: color-mix(in srgb, #14b8a6 14%, var(--card-bg));
  border: 1px solid color-mix(in srgb, #14b8a6 22%, var(--border-color));
}

.book-user-role-badge--audit {
  color: #92400e;
  background: color-mix(in srgb, #f59e0b 16%, var(--card-bg));
  border: 1px solid color-mix(in srgb, #f59e0b 24%, var(--border-color));
}

.book-user-info-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.book-user-info-banner svg {
  flex-shrink: 0;
  color: var(--color-info);
  margin-top: 2px;
}

.book-user-info-banner__title {
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-1);
}

.book-user-info-banner__text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.book-user-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-user-detail-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-user-detail-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-user-detail-value {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.book-user-form-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.book-user-form-card .form-section-title {
  margin-bottom: var(--space-3);
}

.book-user-form-note {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

@media (max-width: 1400px) {
  .book-user-kpi {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .book-user-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-user-header__actions {
    width: 100%;
  }

  .book-user-filter-bar .filter-select,
  .book-user-filter-bar .btn {
    flex: 1 1 calc(50% - var(--space-2));
  }

  .book-user-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .book-user-kpi {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Administration ΓÇö Roles (Accounting-style) ΓöÇΓöÇ */
.book-role-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-role-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-role-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-role-header__actions .btn {
  border-radius: var(--radius-md);
  min-height: 34px;
}

.book-role-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-role-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-role-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-role-toolbar .filter-bar,
.book-role-filter-bar {
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-role-filter-bar .search-wrapper {
  flex: 1 1 220px;
  min-width: 220px;
}

.book-role-filter-bar .filter-select {
  min-width: 130px;
}

.book-role-filter-count {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--border-color));
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-role-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-role-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-role-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-role-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-role-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-role-table tbody tr:last-child td {
  border-bottom: none;
}

.book-role-table-card .pagination {
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-role-name-cell {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.book-role-name {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-role-type-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--color-info-text);
  background: var(--color-info-light);
  border-radius: var(--radius-full);
}

.book-role-type-badge--custom {
  color: var(--text-secondary);
  background: var(--page-bg-subtle);
  border: 1px solid var(--border-color);
}

.book-role-desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  max-width: 360px;
}

.book-role-access-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-role-access-badge--full {
  color: var(--color-danger-text);
  background: var(--color-danger-light);
}

.book-role-access-badge--mgmt {
  color: var(--color-info-text);
  background: var(--color-info-light);
}

.book-role-access-badge--dept {
  color: #6d28d9;
  background: color-mix(in srgb, #8b5cf6 14%, var(--card-bg));
  border: 1px solid color-mix(in srgb, #8b5cf6 22%, var(--border-color));
}

.book-role-access-badge--employee,
.book-role-access-badge--custom {
  color: var(--text-secondary);
  background: var(--page-bg-subtle);
  border: 1px solid var(--border-color);
}

.book-role-menu-btn {
  min-width: 34px;
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: 1px;
}

.book-role-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-role-detail-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

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

.book-role-detail-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-role-detail-value {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.book-role-detail-value--text {
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.book-role-perm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  max-height: 320px;
  overflow-y: auto;
  padding-right: var(--space-1);
}

.book-role-perm-card {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.book-role-perm-card__title {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  text-transform: capitalize;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.book-role-perm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.book-role-perm-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.book-role-perm-item svg {
  flex-shrink: 0;
  color: var(--color-success);
}

.book-role-form-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.book-role-form-card .form-section-title {
  margin-bottom: var(--space-3);
}

@media (max-width: 1400px) {
  .book-role-kpi {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .book-role-kpi {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-role-perm-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .book-role-header__actions {
    width: 100%;
  }

  .book-role-filter-bar .filter-select,
  .book-role-filter-bar .btn {
    flex: 1 1 calc(50% - var(--space-2));
  }

  .book-role-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .book-role-kpi {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Administration ΓÇö Permissions (Accounting-style) ΓöÇΓöÇ */
.book-perm-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: 88px;
}

.book-perm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-perm-header__actions .btn {
  border-radius: var(--radius-md);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.book-perm-kpi {
  grid-template-columns: repeat(4, 1fr);
}

.book-perm-kpi__value {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.book-perm-role-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-perm-role-card__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: var(--space-4);
  align-items: end;
}

.book-perm-role-card__label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.book-perm-role-card__name {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.book-perm-role-card__desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.book-perm-role-select {
  border-radius: var(--radius-md);
  min-width: 220px;
}

.book-perm-toolbar .filter-bar,
.book-perm-filter-bar {
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-perm-filter-bar .search-wrapper {
  flex: 1 1 220px;
  min-width: 220px;
}

.book-perm-filter-bar .filter-select {
  min-width: 140px;
}

.book-perm-groups-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-perm-group-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-perm-group-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.book-perm-group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-perm-group-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--border-color));
  border-radius: var(--radius-full);
}

.book-perm-group-card__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.book-perm-toggle-card {
  position: relative;
  display: block;
  cursor: pointer;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.book-perm-toggle-card:hover {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--border-color));
  box-shadow: var(--shadow-sm);
}

.book-perm-toggle-card--on {
  border-color: color-mix(in srgb, var(--color-success) 35%, var(--border-color));
  background: color-mix(in srgb, var(--color-success) 4%, var(--card-bg));
}

.book-perm-toggle-card--off {
  opacity: 0.92;
}

.book-perm-toggle-card:has(.perm-cb:disabled) {
  cursor: not-allowed;
  opacity: 0.78;
}

.book-perm-toggle-card:has(.perm-cb:disabled):hover {
  border-color: var(--border-color);
  box-shadow: none;
}

.book-perm-toggle-card__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.book-perm-toggle-card__body {
  padding: var(--space-3) var(--space-4);
  padding-right: 56px;
  min-height: 96px;
}

.book-perm-toggle-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.book-perm-toggle-card__module {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.35px;
  color: var(--text-muted);
}

.book-perm-toggle-card__status {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.35px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.book-perm-toggle-card__status--on {
  color: var(--color-success-text);
  background: var(--color-success-light);
}

.book-perm-toggle-card__status--off {
  color: var(--text-secondary);
  background: var(--page-bg-subtle);
}

.book-perm-toggle-card__title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.book-perm-toggle-card__desc {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.book-perm-toggle-card__switch {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 40px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  transition: background 0.2s;
}

.book-perm-toggle-card--on .book-perm-toggle-card__switch {
  background: var(--color-success);
}

.book-perm-toggle-card__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s;
}

.book-perm-toggle-card--on .book-perm-toggle-card__knob {
  transform: translateX(18px);
}

.book-perm-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.book-perm-save-bar__hint {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.book-perm-save-bar__hint--dirty {
  color: var(--color-warning);
  font-weight: var(--font-weight-semibold);
}

.book-perm-empty {
  padding: var(--space-6);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

@media (max-width: 1200px) {
  .book-perm-group-card__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .book-perm-kpi {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-perm-role-card__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .book-perm-kpi,
  .book-perm-group-card__grid {
    grid-template-columns: 1fr;
  }

  .book-perm-save-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .book-perm-header__actions {
    width: 100%;
  }
}

/* ΓöÇΓöÇ Administration ΓÇö Audit Logs (Accounting-style) ΓöÇΓöÇ */

/* â”€â”€ Administration â€” Permission matrix & forms â”€â”€ */
.book-perm-view-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

.book-perm-matrix-card {
  padding: 0;
  overflow: hidden;
}

.book-perm-matrix-table th,
.book-perm-matrix-table td {
  vertical-align: middle;
}

.book-perm-matrix-table th:not(:first-child):not(:nth-child(2)),
.book-perm-matrix-table td:not(:first-child):not(:nth-child(2)) {
  width: 72px;
}

.book-perm-matrix-cb {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.book-perm-matrix-cb:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.book-audit-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-audit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-audit-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-audit-header__actions .btn {
  border-radius: var(--radius-md);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.book-audit-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-audit-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-audit-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-audit-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-4);
}

.book-audit-toolbar .filter-bar,
.book-audit-filter-bar {
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.book-audit-filter-bar .search-wrapper {
  flex: 1 1 220px;
  min-width: 220px;
}

.book-audit-filter-bar .filter-select,
.book-audit-date-input {
  min-width: 130px;
  border-radius: var(--radius-md);
}

.book-audit-date-sep {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.book-audit-filter-count {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--border-color));
  border-radius: var(--radius-full);
}

.book-audit-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.book-audit-view-toggle .btn {
  border-radius: 0;
  border: none;
}

.book-audit-view-toggle .btn.active {
  background: color-mix(in srgb, var(--color-primary) 12%, var(--card-bg));
  color: var(--color-primary);
}

.book-audit-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-audit-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-audit-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.book-audit-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-audit-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-audit-table tbody tr:last-child td {
  border-bottom: none;
}

.book-audit-table-card .pagination {
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-audit-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}

.book-audit-date__primary {
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
}

.book-audit-date__secondary {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.book-audit-desc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 320px;
}

.book-audit-desc__primary {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

.book-audit-desc__secondary {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.book-audit-ref {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.book-audit-mod-badge,
.book-audit-act-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-audit-mod-badge--auth {
  color: var(--color-info-text);
  background: var(--color-info-light);
}

.book-audit-mod-badge--banking {
  color: var(--color-success-text);
  background: var(--color-success-light);
}

.book-audit-mod-badge--settings {
  color: #6d28d9;
  background: color-mix(in srgb, #8b5cf6 14%, var(--card-bg));
  border: 1px solid color-mix(in srgb, #8b5cf6 22%, var(--border-color));
}

.book-audit-mod-badge--users,
.book-audit-mod-badge--default {
  color: var(--text-secondary);
  background: var(--page-bg-subtle);
  border: 1px solid var(--border-color);
}

.book-audit-mod-badge--journal {
  color: var(--color-warning-text);
  background: var(--color-warning-light);
}

.book-audit-act-badge--login {
  color: var(--color-success-text);
  background: var(--color-success-light);
}

.book-audit-act-badge--logout,
.book-audit-act-badge--default {
  color: var(--text-secondary);
  background: var(--page-bg-subtle);
  border: 1px solid var(--border-color);
}

.book-audit-act-badge--create {
  color: var(--color-info-text);
  background: var(--color-info-light);
}

.book-audit-act-badge--edit {
  color: var(--color-warning-text);
  background: var(--color-warning-light);
}

.book-audit-act-badge--delete {
  color: var(--color-danger-text);
  background: var(--color-danger-light);
}

.book-audit-act-badge--approve {
  color: #6d28d9;
  background: color-mix(in srgb, #8b5cf6 14%, var(--card-bg));
  border: 1px solid color-mix(in srgb, #8b5cf6 22%, var(--border-color));
}

.book-audit-menu-btn {
  min-width: 34px;
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: 1px;
}

.book-audit-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.book-audit-detail-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

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

.book-audit-detail-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.book-audit-detail-value {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.book-audit-detail-value--text {
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.book-audit-timeline-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: none;
  border: none;
  background: transparent;
}

.book-audit-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: var(--space-2);
}

.book-audit-timeline-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  position: relative;
}

.book-audit-timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.book-audit-timeline-item__dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--border-color);
  border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 1px var(--border-color);
}

.book-audit-timeline-item--active .book-audit-timeline-item__dot {
  background: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.book-audit-timeline-item__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.book-audit-timeline-item__desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.book-audit-timeline-item__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.book-audit-timeline-item__time .book-audit-date {
  flex-direction: row;
  gap: var(--space-2);
  align-items: center;
}

.book-audit-empty {
  padding: var(--space-6);
  border-radius: var(--radius-md);
}

@media (max-width: 1400px) {
  .book-audit-kpi {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .book-audit-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .book-audit-header__actions {
    width: 100%;
  }

  .book-audit-toolbar {
    flex-direction: column;
  }

  .book-audit-filter-bar .filter-select,
  .book-audit-filter-bar .btn,
  .book-audit-date-input {
    flex: 1 1 calc(50% - var(--space-2));
    min-width: 0;
  }

  .book-audit-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .book-audit-kpi {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Administration ΓÇö Demo Data (Accounting-style) ΓöÇΓöÇ */
.book-demo-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.book-demo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.book-demo-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.book-demo-header__actions .btn {
  border-radius: var(--radius-md);
  min-height: 34px;
}

.book-demo-status-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-demo-status-card__head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.book-demo-status-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-primary) 12%, var(--card-bg));
  color: var(--color-primary);
  flex-shrink: 0;
}

.book-demo-status-card__main {
  flex: 1;
  min-width: 200px;
}

.book-demo-status-card__sub {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: var(--space-1) 0 0;
}

.book-demo-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.book-demo-status-item--wide {
  grid-column: 1 / -1;
}

.book-demo-status-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.book-demo-status-value {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.book-demo-status-value--highlight {
  color: var(--color-primary);
}

.book-demo-kpi {
  grid-template-columns: repeat(5, 1fr);
}

.book-demo-kpi .book-dash-kpi {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-demo-kpi .book-dash-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.book-demo-actions__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.book-demo-action-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border-top: 3px solid var(--border-color);
}

.book-demo-action-card--primary {
  border-top-color: var(--color-success);
}

.book-demo-action-card--warning {
  border-top-color: var(--color-warning);
}

.book-demo-action-card--danger {
  border-top-color: var(--color-danger);
}

.book-demo-action-card__title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.book-demo-action-card__desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
}

.book-demo-action-card__note {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin: 0;
}

.book-demo-analytics-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: var(--space-4);
  align-items: start;
}

.book-demo-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-demo-table-card .form-section-title {
  padding: var(--space-4) var(--space-4) 0;
}

.book-demo-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-demo-table thead th {
  background: var(--page-bg-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
}

.book-demo-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.book-demo-table tbody tr.book-ast-row:hover {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--card-bg));
}

.book-demo-store {
  font-size: var(--font-size-sm);
}

.book-demo-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.book-demo-cat-badge--hr {
  color: var(--color-info-text);
  background: var(--color-info-light);
}

.book-demo-cat-badge--inv {
  color: var(--color-success-text);
  background: var(--color-success-light);
}

.book-demo-cat-badge--acct {
  color: #6d28d9;
  background: color-mix(in srgb, #8b5cf6 14%, var(--card-bg));
  border: 1px solid color-mix(in srgb, #8b5cf6 22%, var(--border-color));
}

.book-demo-cat-badge--assets {
  color: var(--color-warning-text);
  background: var(--color-warning-light);
}

.book-demo-cat-badge--system {
  color: var(--text-secondary);
  background: var(--page-bg-subtle);
  border: 1px solid var(--border-color);
}

.book-demo-sources-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-demo-sources-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.book-demo-source-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 1fr minmax(40px, auto);
  gap: var(--space-2);
  align-items: center;
  font-size: var(--font-size-sm);
}

.book-demo-source-row__label {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-demo-source-row__bar-wrap {
  height: 8px;
  background: var(--page-bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.book-demo-source-row__bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  min-width: 2px;
}

.book-demo-source-row__value {
  font-weight: var(--font-weight-bold);
  text-align: right;
}

.book-demo-included__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.book-demo-included-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-demo-included-card__title {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.book-demo-included-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.book-demo-included-card__list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.book-demo-included-card__list svg {
  flex-shrink: 0;
  color: var(--color-success);
}

.book-demo-login-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.book-demo-login-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.book-demo-login-item {
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--page-bg-subtle);
}

.book-demo-login-role {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.book-demo-login-user {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

.book-demo-login-warning {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.book-demo-empty {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

@media (max-width: 1200px) {
  .book-demo-kpi {
    grid-template-columns: repeat(3, 1fr);
  }

  .book-demo-analytics-grid {
    grid-template-columns: 1fr;
  }

  .book-demo-included__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .book-demo-actions__grid,
  .book-demo-status-grid {
    grid-template-columns: 1fr;
  }

  .book-demo-kpi {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-demo-login-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .book-demo-header__actions {
    width: 100%;
  }

  .book-demo-header__actions .btn {
    flex: 1 1 100%;
  }

  .book-demo-kpi,
  .book-demo-included__grid,
  .book-demo-login-grid {
    grid-template-columns: 1fr;
  }
}

/* ΓöÇΓöÇ Employee Import / Export ΓöÇΓöÇ */
.book-ast-action-bar.card {
  overflow: visible;
}

.book-emp-export-wrap {
  position: relative;
  display: inline-flex;
}

.book-emp-export-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1000;
  min-width: 200px;
  padding: var(--space-1);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.book-emp-export-panel--fixed {
  position: fixed;
}

.book-emp-export-panel[hidden] {
  display: none !important;
}

.book-emp-export-item {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: none;
  background: transparent;
  text-align: left;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.book-emp-export-item:hover {
  background: var(--bg-subtle);
}

.book-emp-import-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 1120px;
  padding-bottom: var(--space-6);
}

.book-emp-import-page .book-qt-section {
  padding: var(--space-5);
}

.book-emp-import-page__body {
  overflow: hidden;
}

@media (max-width: 768px) {
  .book-emp-import-page .book-coa-form-header__actions {
    flex-wrap: wrap;
  }

  .book-emp-import-page .book-coa-form-header__actions .btn {
    flex: 1 1 auto;
  }
}

.book-emp-import-desc {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.book-emp-import-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-color);
}

.book-emp-import-step {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.book-emp-import-step--active {
  color: var(--text-primary);
}

.book-emp-import-step--current .book-emp-import-step__num {
  background: var(--color-primary);
  color: #fff;
}

.book-emp-import-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-subtle);
  font-size: 0.65rem;
  font-weight: 700;
}

.book-emp-import-section {
  margin-bottom: var(--space-4);
}

.book-emp-import-section__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.book-emp-import-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  text-align: center;
  background: var(--bg-subtle);
  transition: border-color 0.15s, background 0.15s;
}

.book-emp-import-dropzone--active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.book-emp-import-dropzone__icon {
  font-size: 2rem;
  margin-bottom: var(--space-2);
}

.book-emp-import-dropzone__title {
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
}

.book-emp-import-dropzone__or {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin: var(--space-2) 0;
}

.book-emp-import-dropzone__hint {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  margin-top: var(--space-2);
}

.book-emp-import-fileinfo {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  display: grid;
  gap: var(--space-1);
}

.book-emp-import-summary {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.book-emp-import-summary__item {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

.book-emp-import-summary__item--valid { color: #059669; background: #ecfdf5; }
.book-emp-import-summary__item--warn { color: #d97706; background: #fffbeb; }
.book-emp-import-summary__item--error { color: #dc2626; background: #fef2f2; }

.book-emp-import-table-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.book-emp-import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-xs);
}

.book-emp-import-table th,
.book-emp-import-table td {
  padding: var(--space-2);
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

.book-emp-import-table th {
  background: var(--bg-subtle);
  font-weight: var(--font-weight-bold);
  position: sticky;
  top: 0;
}

.book-emp-import-badge {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.book-emp-import-msg {
  font-size: 0.65rem;
  margin-top: 2px;
  line-height: 1.3;
}

.book-emp-import-msg--error { color: #dc2626; }
.book-emp-import-msg--warn { color: #d97706; }

.book-emp-import-note {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

.book-emp-import-progress {
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.book-emp-import-progress__label {
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
}

.book-emp-import-progress__bar {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.book-emp-import-progress__fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.book-emp-import-results__title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
}

.book-emp-import-results__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.book-emp-import-results__stat {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-color);
}

.book-emp-import-results__stat span {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.book-emp-import-results__stat strong {
  font-size: var(--font-size-xl);
}

.book-emp-import-results__stat--success strong { color: #059669; }
.book-emp-import-results__stat--skip strong { color: #d97706; }
.book-emp-import-results__stat--fail strong { color: #dc2626; }

.book-emp-import-dup-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (max-width: 640px) {
  .book-emp-import-results__stats {
    grid-template-columns: 1fr;
  }
  .book-emp-import-step__label {
    display: none;
  }
}

/* â”€â”€ Enterprise RBAC â”€â”€ */
.book-rbac-checks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.book-rbac-check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--page-bg-subtle);
  font-size: var(--font-size-sm);
}

.book-rbac-mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-2);
}

.book-rbac-mod-card {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.book-rbac-mod-card--on {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.06);
}

.book-rbac-yes {
  color: var(--color-success);
  font-weight: var(--font-weight-semibold);
}

.book-rbac-scope {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

/* HR Manager Command Center (Phase 137) */
.book-hr-command-center .book-hr-command-kpi {
  margin-bottom: var(--space-4);
}

.book-hr-command-center .book-hr-chart-card {
  min-height: 280px;
}

.book-hr-command-center .book-hr-chart-card__body {
  position: relative;
  min-height: 220px;
}

.book-hr-command-center .book-hr-chart-card canvas {
  max-height: 240px;
}

.book-hr-dash-chart-card {
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: none;
}

.book-hr-dash-chart-panel {
  position: relative;
  min-height: 200px;
  padding: var(--space-3) var(--space-4) var(--space-4);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-top: 1px solid #eef2f7;
  border-radius: 0 0 var(--radius-md, 8px) var(--radius-md, 8px);
}

.book-hr-dash-chart-panel canvas {
  background: transparent !important;
}

.book-hr-page .book-dash-chart-card.book-hr-dash-chart-card .book-hr-dash-chart-panel,
.book-hr-command-center .book-hr-chart-card .book-hr-dash-chart-panel {
  min-height: 220px;
}

.book-hr-command-center .book-hr-panel-card .card-body {
  padding-top: 0;
}

.book-hr-command-center .book-hr-dash-quick-panel {
  margin-top: var(--space-4);
}

@media (max-width: 1024px) {
  .book-hr-command-center .book-dash-row--2 {
    grid-template-columns: 1fr;
  }
}

/* HR Manager Portal — HrPageLayout shell pages (Phase 137) */
.book-hr-portal-page .book-hr-portal-kpi .book-dash-kpi__value {
  font-variant-numeric: tabular-nums;
}

.book-hr-portal-search {
  min-width: 200px;
  max-width: 280px;
}

.book-hr-portal-chart__body {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-hr-portal-chart__placeholder {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  border: 1px dashed #cbd5e1;
  position: relative;
  overflow: hidden;
}

.book-hr-portal-chart__placeholder::after {
  content: 'Chart preview';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.book-hr-portal-dev-banner {
  border: 1px dashed color-mix(in srgb, var(--primary, #6366f1) 35%, #e2e8f0);
  background: color-mix(in srgb, var(--primary, #6366f1) 4%, #fff);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.book-hr-portal-dev-banner__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4338ca;
  background: color-mix(in srgb, #6366f1 12%, #fff);
  border: 1px solid color-mix(in srgb, #6366f1 25%, #e2e8f0);
}

@media (max-width: 768px) {
  .book-hr-portal-page .book-dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-hr-portal-search {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .book-hr-portal-page .book-dash-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* HR Employee Management (Phase 138) */
.book-hr-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.book-hr-detail-row:last-child {
  border-bottom: none;
}

.book-hr-timeline-item {
  padding-left: var(--space-3);
  border-left: 2px solid color-mix(in srgb, var(--primary, #6366f1) 35%, #e2e8f0);
}

.book-dash-row--hr-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: var(--space-4);
  align-items: start;
}

.book-dash-row--hr-full .book-hr-portal-main {
  max-width: none;
  grid-column: 1 / -1;
  width: 100%;
}

.book-hr-portal-main {
  min-width: 0;
}

.book-hr-portal-side {
  position: sticky;
  top: var(--space-4);
}

.book-hr-portal-quick__head {
  margin-bottom: var(--space-3);
}

.book-hr-portal-quick__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.book-hr-portal-quick__actions .book-hr-portal-quick__btn {
  justify-content: flex-start;
  width: 100%;
}

.book-hr-action-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.book-hr-action-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius, 8px);
  background: var(--surface, #fff);
  color: var(--text-primary, #0f172a);
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: var(--font-weight-semibold, 600);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.book-hr-action-card:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #e2e8f0);
  background: color-mix(in srgb, var(--primary, #6366f1) 4%, #fff);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.book-hr-action-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.book-hr-action-card__label {
  line-height: 1.3;
}

.book-hr-standard-layout-page .book-hr-standard-table-card {
  max-width: none;
  grid-column: 1 / -1;
  width: 100%;
}

.book-hr-standard-layout-page .book-hr-standard-table-wrap {
  min-height: 400px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.book-hr-standard-layout-page .book-hr-action-card-section {
  margin-top: var(--space-4);
  width: 100%;
}

@media (min-width: 768px) {
  .book-hr-action-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .book-hr-action-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .book-dash-row--hr-main {
    grid-template-columns: 1fr;
  }

  .book-hr-portal-side {
    position: static;
  }

  .book-hr-portal-quick__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .book-hr-portal-quick__actions .book-hr-portal-quick__btn {
    width: auto;
  }
}

/* Global KPI card typography (Pre-Phase 140B) */
:is(
  .erp-kpi-grid,
  .book-dash-kpi-grid,
  .book-cust-kpi,
  .book-hr-kpi,
  .book-hr-command-kpi,
  .book-hr-portal-kpi,
  .analytics-dash-kpis
) > :is(
  .erp-kpi-card,
  .stat-card,
  .book-dash-kpi,
  .book-fin-rpt-metric-card
) {
  container-type: inline-size;
  container-name: kpi-card;
  min-width: 0;
  height: auto;
  min-height: 7.5rem;
}

.erp-dashboard :is(.erp-kpi-grid, .erp-kpi-grid--modern) > :is(.erp-kpi-card, .stat-card) {
  height: auto;
  min-height: 7.5rem;
  justify-content: space-between;
}

:is(
  .erp-kpi-grid,
  .book-dash-kpi-grid,
  .book-cust-kpi,
  .book-hr-kpi,
  .book-hr-command-kpi,
  .book-hr-portal-kpi,
  .analytics-dash-kpis
) :is(
  .stat-card-label,
  .erp-kpi-card__label,
  .book-dash-kpi__label
) {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
  line-height: 1.35;
  letter-spacing: 0.03em;
}

:is(
  .erp-kpi-grid,
  .book-dash-kpi-grid,
  .book-cust-kpi,
  .book-hr-kpi,
  .book-hr-command-kpi,
  .book-hr-portal-kpi,
  .analytics-dash-kpis
) :is(
  .stat-card-header,
  .erp-kpi-card__top
) {
  align-items: flex-start;
}

:is(
  .erp-kpi-grid,
  .book-dash-kpi-grid,
  .book-cust-kpi,
  .book-hr-kpi,
  .book-hr-command-kpi,
  .book-hr-portal-kpi,
  .analytics-dash-kpis
) :is(
  .stat-card-value,
  .erp-kpi-card__value,
  .book-dash-kpi__value
) {
  font-size: clamp(0.9375rem, 3.5cqi + 0.55rem, 1.625rem);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

:is(
  .erp-kpi-grid,
  .book-dash-kpi-grid,
  .book-cust-kpi,
  .book-hr-kpi,
  .book-hr-command-kpi,
  .book-hr-portal-kpi,
  .analytics-dash-kpis
) :is(
  .stat-card-meta,
  .erp-kpi-card__meta,
  .book-dash-kpi__footer,
  .stat-card-footer,
  .erp-kpi-card__footer
) {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.3;
}

@container kpi-card (max-width: 155px) {
  :is(
    .erp-kpi-grid,
    .book-dash-kpi-grid,
    .book-cust-kpi,
    .book-hr-kpi,
    .book-hr-command-kpi,
    .book-hr-portal-kpi,
    .analytics-dash-kpis
  ) :is(
    .stat-card-value,
    .erp-kpi-card__value,
    .book-dash-kpi__value
  ) {
    font-size: clamp(0.8125rem, 3cqi + 0.45rem, 1.125rem);
  }
}

@container kpi-card (max-width: 140px) {
  :is(
    .erp-kpi-grid,
    .book-dash-kpi-grid,
    .book-cust-kpi,
    .book-hr-kpi,
    .book-hr-command-kpi,
    .book-hr-portal-kpi,
    .analytics-dash-kpis
  ) :is(
    .stat-card-label,
    .erp-kpi-card__label,
    .book-dash-kpi__label
  ) {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  :is(
    .erp-kpi-grid,
    .book-dash-kpi-grid,
    .book-cust-kpi,
    .book-hr-kpi,
    .book-hr-command-kpi,
    .book-hr-portal-kpi,
    .analytics-dash-kpis
  ) :is(
    .stat-card-value,
    .erp-kpi-card__value,
    .book-dash-kpi__value
  ) {
    font-size: clamp(0.875rem, 2.8cqi + 0.5rem, 1.25rem);
  }
}

/* Finance Dashboard KPI grid (Pre-Phase 140) — typography via global KPI rules above */
.erp-finance-dash .erp-kpi-grid--finance {
  grid-template-columns: repeat(auto-fill, minmax(min(11.25rem, 100%), 1fr));
  align-items: stretch;
}

@media (max-width: 1100px) {
  .erp-finance-dash .erp-kpi-grid--finance {
    grid-template-columns: repeat(auto-fill, minmax(min(10rem, 100%), 1fr));
  }
}

@media (max-width: 768px) {
  .erp-finance-dash .erp-kpi-grid--finance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .erp-finance-dash .erp-kpi-grid--finance {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* HR Attendance Portal (Phase 139) */
.book-hr-att-cal-cell--absent,
.book-hr-leave-cal-legend-item.book-hr-att-cal-cell--absent {
  background: color-mix(in srgb, var(--color-danger, #ef4444) 12%, var(--card-bg));
  border-color: color-mix(in srgb, var(--color-danger, #ef4444) 30%, transparent);
}

.book-hr-att-cal-cell--leave,
.book-hr-leave-cal-legend-item.book-hr-att-cal-cell--leave {
  background: color-mix(in srgb, var(--info, #3b82f6) 10%, var(--card-bg));
  border-color: color-mix(in srgb, var(--info, #3b82f6) 28%, transparent);
}

.book-hr-att-cal-cell--missing,
.book-hr-leave-cal-legend-item.book-hr-att-cal-cell--missing {
  background: color-mix(in srgb, var(--color-warning, #f59e0b) 16%, var(--card-bg));
  border-color: color-mix(in srgb, var(--color-warning, #f59e0b) 40%, transparent);
}

.book-hr-mp-table .book-hr-standard-table-wrap,
.book-hr-mp-table.book-hr-standard-table-wrap {
  overflow-x: auto;
}

.book-hr-mp-table .book-hr-mp-punch {
  display: inline-block;
  min-width: 4.5rem;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.book-hr-mp-table th:nth-child(n+5):nth-child(-n+8),
.book-hr-mp-table td:nth-child(n+5):nth-child(-n+8) {
  min-width: 6.5rem;
}

/* Phase 225 — Global full-page responsive standard */
@media (max-width: 1024px) {
  .erp-form-grid,
  .book-coa-form-fields,
  .book-qt-form-page .form-row-2,
  .book-cust-page[class*="-form-page"] .form-row-2 {
    grid-template-columns: 1fr;
  }

  .book-coa-form-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .erp-page-header,
  .book-coa-form-header {
    flex-direction: column;
    align-items: stretch;
  }

  .book-cust-header__actions,
  .book-dash-header__actions,
  .book-rpt-header__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .erp-form-actions,
  .erp-page-footer,
  .book-coa-form-header__actions {
    justify-content: stretch;
  }

  .erp-form-actions .btn,
  .erp-page-footer .btn,
  .book-coa-form-header__actions .btn,
  .book-cust-header__actions .btn,
  .book-dash-header__actions .btn {
    flex: 1 1 auto;
  }

  .erp-page .book-qt-section,
  .book-qt-form-page .book-qt-section,
  .book-cust-page[class*="-form-page"] .book-qt-section {
    padding: var(--space-4);
  }

  .erp-calendar-header {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .erp-calendar-header__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .erp-page-title,
  .book-coa-form-title {
    font-size: var(--font-size-lg);
  }

  .erp-tab-list,
  .tab-list.book-ast-module-tabs,
  .tab-list.book-hr-org-tabs {
    padding: var(--space-2);
  }
}

/* Phase 227 — Application Updates admin screen */
.book-au-kv {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: var(--space-2) var(--space-4);
  margin: 0;
}
.book-au-kv dt {
  margin: 0;
  font-weight: 600;
  color: var(--color-text-muted, #64748b);
}
.book-au-kv dd {
  margin: 0;
}
.sidebar-app-version {
  padding: 0 var(--space-3) var(--space-2);
  line-height: 1.35;
  opacity: 0.85;
}
.book-au-status-grid {
  margin-top: var(--space-2);
}
