/**
 * Safari Island HR — Global UI overlay
 * Loaded after module CSS. Tokens live in theme.css.
 */

html { background: var(--bg-app); }

::selection {
  background: var(--sir-primary-soft);
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

body.app-shell,
body.login-page {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
}

h1, .page-title {
  font-size: 1.85rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.25rem;
  color: var(--text-primary);
}

.sir-page-kicker {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.lb-toolbar-card h2,
.lb-toolbar-card .h5 {
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-transform: none;
  margin: 0;
}

.card-header,
.section-title,
.dw-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text-secondary);
}

.app-content {
  padding: 1.75rem 1.75rem 2.5rem;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.app-sidebar-brand {
  padding: 1.2rem 1rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 0.15rem;
}

.app-sidebar-brand img {
  width: 120px;
  max-height: 72px;
}

.app-sidebar-brand-text {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-inverse);
  line-height: 1.3;
}

.app-sidebar-brand-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.92);
}

.app-sidebar.is-collapsed .app-sidebar-brand-sub,
.app-sidebar.is-collapsed .nav-group-label {
  display: none;
}

.nav-group-label {
  padding: 1rem 0.85rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.nav-section-toggle {
  color: rgba(243, 245, 244, 0.72);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.nav-section-toggle i:first-child,
.nav-link-item i {
  width: 1.15rem;
  font-size: 1.05rem;
  color: rgba(243, 245, 244, 0.62);
}

.nav-link-item {
  color: rgba(243, 245, 244, 0.86);
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: 8px;
  padding: 0.48rem 0.8rem;
}

.nav-link-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link-item.active {
  background: rgba(201, 168, 76, 0.18);
  color: #fff;
  box-shadow: inset 2px 0 0 #C9A84C;
}

.nav-link-item.active i,
.nav-link-item:hover i {
  color: #E4D08A;
}

.app-sidebar-footer {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
}

.app-sidebar.is-collapsed .nav-link-item,
.app-sidebar.is-collapsed .nav-section-toggle {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* ── Topbar ──────────────────────────────────────────────── */
.app-topbar {
  height: var(--topbar-height);
  background: var(--bg-topbar);
  border-bottom: none;
  box-shadow: none;
  padding: 0 1.5rem;
  backdrop-filter: blur(16px);
}

.app-topbar-toggle,
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.app-topbar-toggle:hover,
.theme-toggle-btn:hover {
  border: none;
  color: var(--brand-primary);
  background: var(--sir-primary-soft);
}

.app-topbar-search { max-width: 440px; }

.app-topbar-search .form-control {
  height: 42px;
  border-radius: 10px;
  background: var(--bg-muted);
  border-color: transparent;
  font-size: 0.875rem;
}

.app-topbar-search .form-control:focus {
  background: var(--bg-surface);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(36, 58, 122, 0.16);
}

.topbar-user-btn {
  border: none;
  border-radius: 10px;
  background: var(--bg-muted);
}

.topbar-avatar {
  background: var(--brand-primary);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 8px;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  transition: background var(--sir-transition), border-color var(--sir-transition), color var(--sir-transition);
}

.btn-sm,
.btn.btn-sm {
  min-height: 34px;
  padding: 0.28rem 0.7rem;
  font-size: 0.8125rem;
}

.btn .bi { font-size: 16px; vertical-align: -0.12em; }

.btn-primary {
  background: var(--brand-primary) !important;
  background-image: none !important;
  border: 1px solid var(--brand-primary) !important;
  color: #fff !important;
  box-shadow: none;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--sir-primary-hover) !important;
  border-color: var(--sir-primary-hover) !important;
}

.btn-secondary,
.btn-outline-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover,
.btn-secondary:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-outline-primary {
  color: var(--brand-primary);
  border-color: rgba(36, 58, 122, 0.35);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

.btn-success { background: var(--success) !important; border-color: var(--success) !important; color: #fff !important; }
.btn-danger { background: var(--danger) !important; border-color: var(--danger) !important; }

.lb-action-btn,
.lv-action-btn {
  width: 2.05rem;
  height: 2.05rem;
  min-height: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.lb-action-btn .bi,
.lv-action-btn .bi { font-size: 16px; }

/* ── Cards / KPI ─────────────────────────────────────────── */
.card,
.lb-toolbar-card,
.table-card,
.dw-box,
.card-chart,
.lv-toolbar-card,
.lv-table-card,
.lv-filter-card,
.lb-table-card,
.lb-dept-tabs-card {
  background: var(--bg-card);
  border: 0.5pt solid rgba(20, 22, 31, 0.14);
  box-shadow: none;
  border-radius: var(--radius-md);
}

.card-header {
  border-bottom: 0.5pt solid rgba(20, 22, 31, 0.14);
}

.kpi-card {
  background: var(--bg-card);
  border: 0.5pt solid rgba(20, 22, 31, 0.14);
  box-shadow: none;
  border-radius: var(--radius-md);
  padding: 1.1rem 1.15rem;
}

.kpi-card::before { display: none; }

.kpi-card .kpi-value,
.sir-stat-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}

.kpi-card .kpi-label,
.sir-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.sir-stat-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  height: 100%;
}

.sir-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sir-primary-soft);
  color: var(--brand-primary);
  flex-shrink: 0;
  font-size: 18px;
}

.sir-stat-icon.is-success { background: var(--sir-success-soft); color: var(--success); }
.sir-stat-icon.is-warning { background: var(--sir-warning-soft); color: var(--warning); }
.sir-stat-icon.is-danger { background: var(--sir-danger-soft); color: var(--danger); }
.sir-stat-icon.is-info { background: var(--sir-info-soft); color: var(--info); }
.sir-stat-icon.is-gold { background: var(--sir-gold-soft); color: var(--sir-gold-dark); }

.sir-stat-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.sir-stat-progress {
  height: 6px;
  border-radius: 99px;
  background: var(--bg-muted);
  overflow: hidden;
  margin-top: 0.65rem;
}

.sir-stat-progress > span {
  display: block;
  height: 100%;
  background: var(--brand-primary);
  border-radius: 99px;
}

.sir-kpi-hero .sir-stat-value { font-size: 2.05rem; }

.sir-compact-kpi .sir-stat-value { font-size: 1.35rem; }
.sir-compact-kpi { padding: 0.9rem 1rem; }

/* ── Forms ───────────────────────────────────────────────── */
.form-control,
.form-select {
  min-height: 44px;
  border-radius: 8px;
  border-color: var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
}

.form-control-sm,
.form-select-sm { min-height: 36px; }

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(36, 58, 122, 0.16);
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

/* ── Tables ──────────────────────────────────────────────── */
.table,
table.dataTable {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: var(--bg-subtle);
  --bs-table-hover-bg: var(--sir-primary-soft);
  --bs-table-border-color: var(--border-color);
  --bs-table-color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.table thead th,
table.dataTable thead th,
.g-table th,
.staff-list-table thead th,
.leave-balance-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-subtle) !important;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  border-bottom: 0.5pt solid rgba(20, 22, 31, 0.14) !important;
  border-top: 0;
  padding: 0.7rem 0.85rem;
}

.table tbody td,
table.dataTable tbody td {
  padding: 0.78rem 0.85rem;
  border-color: rgba(20, 22, 31, 0.14);
  border-width: 0.5pt;
  vertical-align: middle;
}

.badge {
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  border-radius: 6px;
  padding: 0.28em 0.55em;
}

.badge.bg-success { background: var(--sir-success-soft) !important; color: var(--success) !important; }
.badge.bg-warning { background: var(--sir-warning-soft) !important; color: var(--warning) !important; }
.badge.bg-danger { background: var(--sir-danger-soft) !important; color: var(--danger) !important; }
.badge.bg-primary { background: var(--sir-primary-soft) !important; color: var(--brand-primary) !important; }
.badge.bg-info { background: var(--sir-info-soft) !important; color: var(--info) !important; }
.badge.bg-secondary { background: var(--bg-muted) !important; color: var(--text-secondary) !important; }

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

.nav-tabs {
  border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
  border: 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 0.7rem 0.9rem;
}

.nav-tabs .nav-link.active {
  background: transparent;
  color: var(--brand-primary);
  box-shadow: inset 0 -2px 0 var(--brand-primary);
}

.pagination .page-link {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-secondary);
  border-radius: 8px !important;
  margin: 0 0.12rem;
}

.pagination .page-item.active .page-link {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

.modal-content {
  background: var(--bg-elevated);
  border: none;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.dropdown-menu {
  background: var(--bg-elevated);
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
}

.dropdown-item { border-radius: 8px; font-size: 0.875rem; }
.dropdown-item:hover { background: var(--bg-hover); }

.empty-state {
  text-align: center;
  padding: 2.25rem 1rem;
  color: var(--text-muted);
}

.empty-state .bi {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.surface-panel {
  background: var(--bg-subtle);
  border: none;
}

.lv-legend,
.lb-legend,
.wp-guide-card,
.sr-guide-card,
.lr-guide-card,
.ar-guide-card {
  background: var(--bg-subtle);
  border-color: var(--border-color);
}

/* Login */
body.login-page {
  background: var(--bg-app);
}

.login-header {
  background: var(--sir-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.login-header-tagline {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(201, 168, 76, 0.92);
}

.login-card .card-body h5 {
  font-size: 1.6rem;
  font-weight: 650;
}

.login-page .btn-primary { min-height: 46px; }

.login-footer {
  font-size: 12px;
  color: var(--text-muted);
}

[data-theme="dark"] .python-status-item__meta,
[data-theme="dark"] .python-status-item__row dt {
  color: var(--text-muted);
}

.app-sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

@media (max-width: 1366px) {
  .app-content { padding: 1.35rem 1.25rem 2rem; }
  h1, .page-title { font-size: 1.65rem; }
}

@media (max-width: 991.98px) {
  .app-content { padding: 1.1rem 0.9rem 1.75rem; }
}

.nav-section-items {
  display: block !important;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 180ms ease, opacity 180ms ease;
}

.nav-section.is-open .nav-section-items {
  max-height: 48rem;
  opacity: 1;
}

.app-sidebar.is-collapsed .nav-link-item,
.app-sidebar.is-collapsed .nav-section-toggle {
  position: relative;
}

@media (hover: hover) {
  .app-sidebar.is-collapsed .nav-link-item:hover::after,
  .app-sidebar.is-collapsed .nav-section-toggle:hover::after,
  .app-sidebar.is-collapsed .nav-link-item:focus-visible::after,
  .app-sidebar.is-collapsed .nav-section-toggle:focus-visible::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--sir-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 1080;
    box-shadow: var(--sir-shadow-md);
    pointer-events: none;
  }
}

.lv-filter-tabs .nav-link,
.lb-dept-tabs .nav-link,
.nav-pills .nav-link {
  border-radius: 8px;
}

.lv-filter-tabs .nav-link.active,
.lb-dept-tabs .nav-link.active,
.nav-pills .nav-link.active {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
  box-shadow: none;
}

.staff-status-badge {
  border-radius: 6px;
  text-transform: none;
  letter-spacing: 0.02em;
}

.staff-status-badge--active {
  background: var(--sir-success-soft) !important;
  color: var(--success) !important;
}

.staff-status-badge--inactive {
  background: var(--bg-muted) !important;
  color: var(--text-secondary) !important;
}

.employee-profile-page .ep-header-card .card-body {
  background: var(--bg-card);
}

.ep-profile-photo,
.ep-profile-photo-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 14px;
}

.ep-field dt {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 12px;
  font-weight: 600;
}

.btn-tertiary {
  background: transparent;
  border: 0;
  color: var(--brand-primary);
  min-height: 40px;
}

.btn-tertiary:hover {
  background: var(--sir-primary-soft);
  color: var(--sir-primary-hover);
}

.btn-icon {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-shell .btn-dark {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

.app-shell .btn-dark:hover {
  background: var(--sir-primary-hover);
  border-color: var(--sir-primary-hover);
  color: #fff;
}

.form-floating > .form-control,
.form-floating > .form-select {
  min-height: 46px;
  height: 46px;
}

.table-responsive {
  border-radius: var(--radius-md);
}

.report-card {
  transition: border-color var(--sir-transition), box-shadow var(--sir-transition);
}

.report-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.card-chart .card-body {
  min-height: 220px;
}

.attendance-page .btn-primary,
.leave-page .btn-primary {
  box-shadow: none !important;
}

body.app-shell .btn:disabled,
body.app-shell .btn.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.is-submitting .btn[type="submit"] {
  pointer-events: none;
  opacity: 0.75;
}

@media (max-width: 767.98px) {
  .app-topbar {
    gap: 0.5rem;
    padding: 0 0.75rem;
  }
  .app-topbar-search { max-width: none; }
  .app-topbar-search .form-control { height: 38px; }
  .topbar-user-btn { max-width: 44px; padding-right: 0.35rem; }
  .toast-container-premium {
    top: auto;
    bottom: 16px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Light: 0.5pt light-black hairline on cards, KPIs, tables */
html[data-theme="light"] body.app-shell .card,
html[data-theme="light"] body.app-shell .kpi-card,
html[data-theme="light"] body.app-shell .table-card,
html[data-theme="light"] body.app-shell .dw-box,
html[data-theme="light"] body.app-shell .card-chart,
html[data-theme="light"] body.app-shell .lb-toolbar-card,
html[data-theme="light"] body.app-shell .lb-table-card,
html[data-theme="light"] body.app-shell .lb-dept-tabs-card,
html[data-theme="light"] body.app-shell .lv-toolbar-card,
html[data-theme="light"] body.app-shell .lv-table-card,
html[data-theme="light"] body.app-shell .lv-filter-card,
html[data-theme="light"] body.app-shell .wp-guide-card,
html[data-theme="light"] body.app-shell .sr-guide-card,
html[data-theme="light"] body.app-shell .lr-guide-card,
html[data-theme="light"] body.app-shell .ar-guide-card,
html[data-theme="light"] body.app-shell .hr-guide-card,
html[data-theme="light"] body.app-shell .report-card,
html[data-theme="light"] body.app-shell .surface-panel,
html[data-theme="light"] body.app-shell .login-card,
html[data-theme="light"] body.app-shell .ep-header-card,
html[data-theme="light"] body.app-shell .monthly-view-toolbar,
html[data-theme="light"] body.app-shell .monthly-grid-card,
html[data-theme="light"] body.app-shell .monthly-hero-card,
html[data-theme="light"] body.login-page .login-card {
  border: 0.5pt solid rgba(20, 22, 31, 0.14) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app-shell .card-header,
html[data-theme="light"] body.app-shell .card-footer,
html[data-theme="light"] body.app-shell .modal-header,
html[data-theme="light"] body.app-shell .modal-footer,
html[data-theme="light"] body.app-shell .dw-title,
html[data-theme="light"] body.app-shell .filter-bar,
html[data-theme="light"] body.app-shell .leave-module-nav,
html[data-theme="light"] body.app-shell .attendance-module-nav,
html[data-theme="light"] body.app-shell .list-group-item,
html[data-theme="light"] body.app-shell .nav-tabs {
  border-color: rgba(20, 22, 31, 0.14) !important;
  border-width: 0.5pt !important;
}

html[data-theme="light"] .app-topbar {
  border-bottom: none !important;
  box-shadow: none !important;
  background: rgba(243, 238, 228, 0.88);
}

html[data-theme="light"] .app-topbar-toggle,
html[data-theme="light"] .theme-toggle-btn,
html[data-theme="light"] .topbar-user-btn {
  border: none !important;
  background: var(--bg-muted) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .app-topbar-search .form-control {
  border: none !important;
  background: var(--bg-muted) !important;
  box-shadow: none;
}

html[data-theme="light"] .app-topbar-search .form-control:focus {
  background: var(--bg-surface) !important;
  box-shadow: 0 0 0 3px rgba(36, 58, 122, 0.16);
}

html[data-theme="light"] body.app-shell .btn-outline-primary {
  background: var(--sir-primary-soft);
  border-color: transparent !important;
  color: var(--brand-primary);
}

html[data-theme="light"] body.app-shell .btn-outline-primary:hover,
html[data-theme="light"] body.app-shell .btn-outline-primary:focus {
  background: var(--brand-primary);
  border-color: transparent !important;
  color: #fff;
}

html[data-theme="light"] body.app-shell .btn-outline-secondary,
html[data-theme="light"] body.app-shell .btn-secondary {
  background: var(--bg-muted);
  border-color: transparent !important;
  color: var(--text-secondary);
}

html[data-theme="light"] body.app-shell .btn-outline-secondary:hover,
html[data-theme="light"] body.app-shell .btn-secondary:hover {
  background: #e6e9e5;
  color: var(--text-primary);
  border-color: transparent !important;
}

html[data-theme="light"] body.app-shell .dropdown-menu,
html[data-theme="light"] body.app-shell .global-search-dropdown,
html[data-theme="light"] body.app-shell .modal-content,
html[data-theme="light"] body.app-shell .alert,
html[data-theme="light"] body.app-shell .pagination .page-link {
  border: 0.5pt solid rgba(20, 22, 31, 0.14) !important;
}

html[data-theme="light"] body.app-shell .table,
html[data-theme="light"] body.app-shell table.dataTable {
  --bs-table-border-color: rgba(20, 22, 31, 0.14);
}

html[data-theme="light"] body.app-shell .table thead th,
html[data-theme="light"] body.app-shell table.dataTable thead th,
html[data-theme="light"] body.app-shell .g-table th {
  border-bottom: 0.5pt solid rgba(20, 22, 31, 0.14) !important;
}

html[data-theme="light"] body.app-shell .table tbody td,
html[data-theme="light"] body.app-shell table.dataTable tbody td,
html[data-theme="light"] body.app-shell .g-table td {
  border-color: rgba(20, 22, 31, 0.14);
  border-width: 0.5pt;
}

html[data-theme="light"] body.app-shell .lv-legend,
html[data-theme="light"] body.app-shell .lb-legend,
html[data-theme="light"] body.app-shell .wizard-step,
html[data-theme="light"] body.app-shell .wizard-steps-premium .step-indicator {
  border: 0.5pt solid rgba(20, 22, 31, 0.14);
}

html[data-theme="light"] body.app-shell .report-card:hover {
  border-color: rgba(0, 0, 0, 0.28);
}

/* Dark keeps hairline contrast so panels don't melt into the canvas */
html[data-theme="dark"] body.app-shell .card,
html[data-theme="dark"] body.app-shell .kpi-card,
html[data-theme="dark"] body.app-shell .table-card,
html[data-theme="dark"] body.app-shell .dw-box,
html[data-theme="dark"] body.app-shell .card-chart,
html[data-theme="dark"] body.app-shell .lb-toolbar-card,
html[data-theme="dark"] body.app-shell .lb-table-card,
html[data-theme="dark"] body.app-shell .lv-toolbar-card,
html[data-theme="dark"] body.app-shell .lv-table-card,
html[data-theme="dark"] body.app-shell .lv-filter-card,
html[data-theme="dark"] body.app-shell .report-card,
html[data-theme="dark"] body.app-shell .login-card,
html[data-theme="dark"] body.login-page .login-card {
  border: 1px solid var(--border-color) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .app-topbar {
  border-bottom: 1px solid var(--border-color) !important;
}

html[data-theme="dark"] .app-topbar-toggle,
html[data-theme="dark"] .theme-toggle-btn,
html[data-theme="dark"] .topbar-user-btn {
  border: 1px solid var(--border-color) !important;
  background: var(--bg-elevated) !important;
}

html[data-theme="dark"] .app-topbar-search .form-control {
  border: 1px solid var(--border-color) !important;
  background: var(--bg-input) !important;
}

html[data-theme="dark"] body.app-shell .card-header,
html[data-theme="dark"] body.app-shell .modal-header,
html[data-theme="dark"] body.app-shell .modal-footer {
  border-bottom-color: var(--border-color) !important;
}

@media print {
  .app-sidebar,
  .app-topbar,
  .sidebar-backdrop,
  .no-print,
  .lb-toolbar-card .btn,
  .theme-toggle-btn,
  .app-topbar-actions,
  .dropdown-menu {
    display: none !important;
  }
  .app-main-wrapper { margin-left: 0 !important; }
  .app-content { padding: 0; }
  .card, .table-card { box-shadow: none; border-color: #ccc; }
  body, .app-shell { background: #fff !important; }
}
