﻿body {
  background-color: #f5f7fb;
}

.navbar-brand-text {
  font-weight: 700;
  letter-spacing: 0.05em;
}

.content-section.d-none {
  display: none !important;
}

#overview-cards .card {
  min-height: 120px;
}

/* Dashboard icon color helpers */
.icon-blue { color: #206bc4; }
.icon-green { color: #2fb344; }
.icon-teal { color: #12b886; }
.icon-red { color: #f03e3e; }
.icon-orange { color: #f76707; }
.icon-blue-bg { background-color: rgba(32,107,196,.12); color: #206bc4; }
.icon-green-bg { background-color: rgba(47,179,68,.12); color: #2fb344; }
.icon-teal-bg { background-color: rgba(18,184,134,.12); color: #12b886; }
.icon-red-bg { background-color: rgba(240,62,62,.12); color: #f03e3e; }
.icon-orange-bg { background-color: rgba(247,103,7,.12); color: #f76707; }
.icon-purple { color: #7048e8; }
.icon-purple-bg { background-color: rgba(112,72,232,.12); color: #7048e8; }
.icon-cyan { color: #15aabf; }
.icon-cyan-bg { background-color: rgba(21,170,191,.12); color: #15aabf; }

/* Subtle hover lift for cards */
.card-hover-rise { transition: transform .15s ease, box-shadow .15s ease; }
.card-hover-rise:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.08); }

/* Count-up subtle animation (fade-in) */
.js-count { opacity: 0.95; transition: opacity .4s ease; }
.card-hover-rise:hover .js-count { opacity: 1; }

.list-group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.avatar-clickable {
  cursor: zoom-in;
}
.avatar-clickable:focus {
  outline: 2px solid var(--tblr-primary);
  outline-offset: 2px;
}

.badge-soft {
  background-color: rgba(68, 84, 195, 0.12);
  color: #4454c3;
}

.modal-dialog-end {
  margin: 0;
  height: 100%;
}

.modal-dialog-end .modal-content {
  height: 100%;
  border-radius: 0;
}

/* Centered, responsive, resizable modal */
.resizable-modal {
  /* keep dialog centered; constrain width to viewport */
  max-width: min(92vw, 1100px) !important;
  width: auto;
}
.resizable-modal .modal-content {
  display: flex;
  flex-direction: column;
  resize: both;
  overflow: hidden; /* body handles its own scroll */
  min-width: 480px;
  min-height: 320px;
  max-height: calc(100vh - 10vh); /* avoid viewport overflow */
}
.resizable-modal .modal-body {
  flex: 1 1 auto;
  overflow: auto; /* only show if needed */
}

/* Nav group collapse behavior */
.nav-group > ul {
  display: none;
}
.nav-group.open > ul {
  display: block;
}

/* Auto鈥慼ide scrollbars: default hidden/transparent, visible while scrolling */
.auto-hide-scrollbar {
  scrollbar-width: thin;                 /* Firefox */
  scrollbar-color: transparent transparent;
}
.auto-hide-scrollbar.scrolling {
  scrollbar-color: rgba(0,0,0,.35) transparent; /* Firefox visible */
}
.auto-hide-scrollbar::-webkit-scrollbar {
  width: 8px; height: 8px;
}
.auto-hide-scrollbar::-webkit-scrollbar-thumb {
  background: transparent; border-radius: 4px;
}
.auto-hide-scrollbar.scrolling::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.35);
}

.approval-hero {
  background: linear-gradient(120deg, #0c5adb, #2a7bff 38%, #0abde3);
  color: #f8fbff;
  border: none;
}
.approval-hero .card-title,
.approval-hero h2 {
  color: #fff;
}
.approval-hero p {
  color: rgba(255,255,255,0.82);
}
.approval-hero .badge {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
}
.approval-hero .mini-stat {
  min-width: 140px;
}
.mini-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.glassy {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 12px 14px;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  color: #fff;
}
.glassy .text-secondary {
  color: rgba(255,255,255,0.78) !important;
}
.approvals-table th,
.approvals-table td {
  vertical-align: middle;
}
.approvals-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.approvals-actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.timeline {
  position: relative;
  padding-left: 0.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 2px;
  left: 10px;
  background: #dfe3eb;
}
.timeline-item {
  position: relative;
  padding-left: 28px;
  margin-bottom: 16px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-item-marker {
  position: absolute;
  left: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--tblr-primary);
  box-shadow: 0 0 0 3px rgba(32,107,196,0.12);
}
.timeline-item-content {
  background: #fff;
  border: 1px solid #e6e9f0;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 6px 12px -10px rgba(0,0,0,0.45);
}

/* Nav icons (Tabler-style) */
.navbar-vertical .nav-link .nav-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: .5rem;
}
.navbar-vertical .nav-link .nav-link-icon .icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
  opacity: .9;
}

/* Override active nav color to blue for contrast */
.navbar-vertical .nav-link.active,
.navbar-vertical .nav-link.active .nav-link-title {
  color: var(--tblr-primary) !important;
}

/* Sidebar hover/focus state should also be blue, not white */
.navbar-vertical .nav-link:hover,
.navbar-vertical .nav-link:focus,
.navbar-vertical .nav-link:hover .nav-link-title,
.navbar-vertical .nav-link:focus .nav-link-title {
  color: var(--tblr-primary) !important;
}

/* Keep active + hover consistent */
.navbar-vertical .nav-link.active:hover,
.navbar-vertical .nav-link.active:focus,
.navbar-vertical .nav-link.active:hover .nav-link-title,
.navbar-vertical .nav-link.active:focus .nav-link-title {
  color: var(--tblr-primary) !important;
}

/* Optional: subtle active background like Tabler */
.navbar-vertical .nav-link.active {
  background-color: rgba(var(--tblr-primary-rgb, 68, 84, 195), 0.15);
  border-radius: .375rem;
}

.nav-group > .nav {
  margin-top: 0.25rem;
}
.nav-group .nav-link {
  padding-left: 0;
}
/* .nav-group .nav-link .nav-link-title {
  font-weight: 500;
} */

/* Brand logo scaling: width 75%, height 50% and centered */
#site-logo {
  transform: scale(0.75, 0.5);
  transform-origin: center center;
}

/* Center brand content in vertical navbar */
.navbar-vertical .navbar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.navbar-vertical .navbar-brand .navbar-brand-text {
  margin-left: .5rem;
}

/* Tree selectors for roles & permissions */
.menu-tree {
  max-height: 440px;
  overflow-y: auto;
  background-color: #f8f9fd;
}
.menu-tree .tree-node {
  padding: .25rem .25rem;
}
.menu-tree .tree-children {
  margin-left: .75rem;
  border-left: 1px dashed #d0d4e4;
  padding-left: .75rem;
}

/* Lightweight modal overlay */
body.modal-open {
  overflow: hidden;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1050;
}
.modal-overlay.is-open {
  display: flex;
}
.modal-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 18px 48px -12px rgba(15, 23, 42, 0.45);
  width: min(520px, 100%);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-card-lg {
  width: min(760px, 100%);
}
.modal-card-xl {
  width: min(1024px, 100%);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e8ecf4;
}
.modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}
.modal-body .form-hint {
  font-size: 0.75rem;
}
.modal-card .btn-close {
  border: none;
  background: transparent;
  width: 1.5rem;
  height: 1.5rem;
  opacity: 0.65;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-card .btn-close::before {
  content: '\00d7';
}
.modal-card .btn-close:hover {
  opacity: 1;
}

@media (max-width: 576px) {
  .modal-card {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .modal-body {
    padding: 1rem;
  }
}
.share-link-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.share-link-group .form-control {
  flex: 1 1 auto;
  min-width: 240px;
}
.share-link-actions {
  display: flex;
  gap: 0.5rem;
}
.share-doc {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.share-qr {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
}
.share-qr img {
  max-width: 240px;
  border: 1px solid #e8ecf4;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
}
.modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid #e8ecf4;
  text-align: right;
}
.modal-footer .btn + .btn {
  margin-left: 0.5rem;
}

/* Salary page */
.salary-card .card-header {
  border-bottom: 1px solid #e2e6f0;
}
.salary-modal-card {
  width: min(1120px, 100%);
  max-height: 92vh;
}
.salary-batch-card {
  width: min(1200px, 100%);
  max-height: 92vh;
}
.salary-batch-toolbar .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5b82;
}
.salary-batch-summary {
  font-size: 0.85rem;
}
.salary-batch-table table {
  min-width: 720px;
}
.salary-batch-table th,
.salary-batch-table td {
  white-space: nowrap;
}
.salary-batch-table tbody td {
  vertical-align: middle;
}
.salary-batch-table .form-control {
  min-width: 90px;
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
}
.salary-batch-table .form-control[type="number"] {
  text-align: right;
}
.salary-form {
  width: 100%;
}
.salary-section {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.salary-section-title {
  background: linear-gradient(90deg, #f3f6ff 0%, #f8faff 100%);
  padding: 0.55rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2a55;
  border-bottom: 1px solid #d9d9d9;
}
.salary-subsection-title {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4f5e89;
  background: #f9fbff;
  border-bottom: 1px solid #e0e6f3;
}
.salary-tax-subsection {
  border-top: 1px solid #e4e8f7;
  background: #fbfcff;
  padding-bottom: 0.35rem;
}
.salary-tax-subsection + .salary-tax-subsection {
  margin-top: 0.35rem;
}
.salary-tax-subsection-title {
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #a11f1f;
  background: #f6f9ea;
  border-bottom: 1px solid #e4e8f7;
}
.salary-tax-subsection .salary-field-grid {
  background-color: transparent;
}
.salary-field-grid {
  display: grid;
  gap: 0;
  background-color: #ffffff;
}
.salary-field-grid.columns-2 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.salary-field-grid.columns-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.salary-field-grid.columns-4 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.salary-field {
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.65rem;
  border-right: 1px solid #d9d9d9;
  border-bottom: 1px solid #d9d9d9;
  min-height: 84px;
}
.salary-field.salary-field-derived input[readonly] {
  background-color: #f7f8fc;
  cursor: not-allowed;
}
.salary-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4b5b82;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}
.salary-field .form-control {
  font-size: 0.82rem;
  border-color: #d1d9ed;
  background-color: #fbfcff;
}
.salary-field .form-control:focus {
  border-color: #8ca7ff;
  box-shadow: 0 0 0 0.15rem rgba(76, 110, 245, 0.15);
}
.salary-employee-picker {
  position: relative;
}
.salary-employee-picker .salary-employee-options {
  position: absolute;
  inset: calc(100% + 4px) 0 auto 0;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  box-shadow: 0 14px 32px -16px rgba(15, 23, 42, 0.45);
  max-height: 220px;
  overflow-y: auto;
  z-index: 60;
}
.salary-employee-option {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 0.5rem 0.75rem;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 0.82rem;
  color: #1f2a55;
}
.salary-employee-option:hover {
  background: #f3f6ff;
}
.salary-employee-option.disabled {
  color: #9aa4c9;
  cursor: default;
  pointer-events: none;
}
.salary-employee-option.disabled:hover {
  background: transparent;
}
.salary-employee-option-code {
  font-weight: 600;
}
.salary-employee-option-name {
  font-size: 0.78rem;
}
.salary-employee-option-native {
  font-size: 0.75rem;
  color: #5d6ba3;
}
.salary-form-actions .btn {
  min-width: 140px;
}
.salary-record-table {
  overflow-x: auto;
}
.salary-record-table .table {
  border: 1px solid #e2e6f0;
  border-radius: 8px;
  min-width: 1400px;
  white-space: nowrap;
}
.salary-record-table thead th {
  background: #f3f6ff;
  font-weight: 600;
  border: 1px solid #d9d9d9;
}
.salary-record-table thead th.salary-header-placeholder {
  color: transparent;
  user-select: none;
}
.salary-record-table tbody td {
  vertical-align: middle;
}
.salary-record-table thead th,
.salary-record-table tbody td {
  white-space: nowrap;
  padding: 0.5rem 0.75rem;
}
.salary-record-table .btn-group .btn {
  min-width: 64px;
}

@media (max-width: 768px) {
  .salary-field {
    min-height: 72px;
  }
  .salary-form-actions .btn {
    flex: 1 1 auto;
  }
}

.salary-timeline .card {
  border-color: #dce2f4;
}

.salary-timeline .text-secondary {
  font-size: 0.78rem;
}

.asset-card .card-body {
  border: 1px solid rgba(32, 107, 196, 0.08);
  border-radius: 10px;
}

.asset-card dl {
  margin-bottom: 0.5rem;
}

.asset-card dt {
  font-weight: 500;
  color: #868e96;
}

/* Organization topology */
.org-topology {
  position: relative;
  padding: 1.5rem;
  border: 1px solid rgba(9, 31, 93, 0.12);
  border-radius: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
  min-height: 520px;
}
/* Organization topology */
.org-topology {
  position: relative;
  padding: 1.5rem;
  border: 1px solid rgba(9, 31, 93, 0.12);
  border-radius: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
  min-height: 520px;
}
.orgchart-wrapper {
  width: 100%;
  min-height: 520px;
}
.orgchart-placeholder {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c7c9e;
}
.orgchart-wrapper .boc-dark,
.orgchart-wrapper .boc-light {
  border-radius: 24px;
  background: transparent;
}
.orgchart-wrapper [data-boc-content] {
  min-height: 520px;
}
.orgchart-wrapper [data-n-id="virtual-root"] {
  display: none !important;
}

/* Approver picker */
.approver-picker {
  position: relative;
  border: 1px solid #dce2f4;
  border-radius: 12px;
  padding: 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
}
.approver-picker.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  z-index: 1;
}
.approver-picker-body {
  border: 1px dashed #d0d7e9;
  border-radius: 10px;
  padding: 0.5rem;
  background: #fbfcff;
}
.approver-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.35rem;
  border: 1px solid #e5ebff;
  border-radius: 8px;
  background: #f4f7ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.approver-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: #e9f1ff;
  border: 1px solid #d5e2ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.approver-chip .btn {
  font-size: 0.9rem;
}
.approver-options {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #e5ebff;
  border-radius: 8px;
}
.approver-option {
  cursor: pointer;
  border: 0;
  border-bottom: 1px solid #eef2fb;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.approver-option:last-child {
  border-bottom: 0;
}
.approver-option:hover {
  background: #f6f9ff;
}
.approver-option.active {
  background: #f0f6ff;
  border-color: #d5e2ff;
}
.approver-option .form-check-input {
  margin-top: 0;
}
.approver-empty {
  padding: 0.5rem 0.75rem;
}

/* Performance assessment */
.assessment-template-wrapper table {
  font-size: 13px;
  text-align: center;
  border-color: #dfe3e8;
}
.assessment-template-wrapper thead th {
  background: #f6f8fb;
  font-weight: 600;
}
.assessment-template-wrapper thead th:first-child {
  background: linear-gradient(90deg, #f1f5ff 0%, #f6f8fb 60%, #f6f8fb 100%);
}
.assessment-template-wrapper td input {
  text-align: center;
}
.assessment-members {
  min-height: 36px;
}
.assessment-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef3ff;
  border: 1px solid #d7e2ff;
  font-size: 12px;
  color: #23395d;
  cursor: pointer;
  transition: all 0.15s ease;
  border-radius: 999px;
}
.assessment-member-chip .badge {
  background: #d7e2ff;
  color: #23395d;
}
.assessment-member-chip.is-muted {
  background: #f3f4f6;
  border-color: #e2e6ed;
  color: #8c96a8;
  opacity: 0.8;
}
.assessment-member-chip:focus {
  outline: 2px solid #aac6ff;
  outline-offset: 1px;
}
.assessment-members button {
  border: none;
  background: none;
}
