/* =====================================================================
   HR System — Theme (Sample-based, Baloo Da 2 + Tiro Bangla)
   ===================================================================== */

/* ---------- Sidebar themes ---------- */
.sidebar-dark {
  background: linear-gradient(180deg, var(--sb-bg-dark) 0%, var(--sb-bg-dark-2) 100%);
  color: #cdd6f4;
  border-color: rgba(255,255,255,0.08);
}
.sidebar-dark .sb-item:hover                    { background: rgba(255,255,255,0.06); }
.sidebar-dark .sb-item.active.style-soft        { background: var(--sb-accent-soft); color: var(--sb-accent); }
.sidebar-dark .sb-item.active.style-solid       { background: var(--sb-accent); color: #ffffff; }
.sidebar-dark .sb-divider                       { border-color: rgba(255,255,255,0.08); }
.sidebar-dark .sb-muted                         { color: #9399b2; }

.sidebar-light {
  background: var(--sb-bg-light);
  color: #334155;
  border-color: #e2e8f0;
}
.sidebar-light .sb-item:hover                   { background: #f1f5f9; }
.sidebar-light .sb-item.active.style-soft       { background: var(--sb-accent-soft); color: var(--sb-accent); }
.sidebar-light .sb-item.active.style-solid      { background: var(--sb-accent); color: #ffffff; }
.sidebar-light .sb-divider                      { border-color: #e2e8f0; }
.sidebar-light .sb-muted                        { color: #94a3b8; }

.sidebar-custom {
  background: var(--sb-bg-custom);
  color: var(--sb-text-custom);
  border-color: rgba(255,255,255,0.1);
}
.sidebar-custom .sb-item:hover                  { background: rgba(255,255,255,0.1); }
.sidebar-custom .sb-item.active.style-soft      { background: rgba(255,255,255,0.15); }
.sidebar-custom .sb-item.active.style-solid     { background: var(--sb-accent); color: #ffffff; }
.sidebar-custom .sb-divider                     { border-color: rgba(255,255,255,0.12); }
.sidebar-custom .sb-muted                       { opacity: 0.65; }

/* ---------- Sidebar scrollbar (hover-reveal) ---------- */
#sidebar nav { scrollbar-width: none; }
#sidebar nav::-webkit-scrollbar { width: 6px; }
#sidebar nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 10px; transition: background .3s; }
#sidebar:hover nav { scrollbar-width: thin; scrollbar-color: var(--sb-accent) transparent; }
#sidebar:hover nav::-webkit-scrollbar-thumb { background: var(--sb-accent); opacity: .6; }

/* ---------- Sidebar font sizing ---------- */
#sidebar { font-size: 15.4px; }
#sidebar .sb-item { font-size: 0.96rem; }
#sidebar .sb-section-label { font-size: 12px; }

/* ---------- Active indicator bar ---------- */
.sb-item.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; background: var(--sb-accent); border-radius: 0 4px 4px 0;
}

/* ---------- Submenu ---------- */
.submenu          { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.submenu.open     { max-height: 500px; }
.sb-item .chevron { transition: transform .2s; }
.sb-item.expanded .chevron { transform: rotate(90deg); }
.submenu-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem .5rem 2.75rem;
  font-size: .88rem; border-radius: .5rem;
  transition: background .15s;
  color: inherit; text-decoration: none;
}
.submenu-item:hover         { background: rgba(127,127,127,.1); }
.submenu-item.active        { color: var(--sb-accent); font-weight: 600; }
.submenu-item .dot          { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
.submenu-item.active .dot   { opacity: 1; }

/* ---------- Classic inputs (used in forms) ---------- */
.classic-input,
.classic-select,
.classic-textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: .625rem .75rem;
  font-size: .875rem;
  width: 100%;
  color: #1e293b;
  transition: all .15s;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}
.classic-input:focus,
.classic-select:focus,
.classic-textarea:focus {
  outline: none;
  border-color: var(--sb-accent);
  box-shadow: 0 0 0 3px var(--sb-accent-soft), inset 0 1px 2px rgba(0,0,0,0.04);
}
.dark .classic-input,
.dark .classic-select,
.dark .classic-textarea {
  background: #1e293b; border-color: #475569; color: #e2e8f0;
}
.classic-label {
  display: block; font-size: .75rem; font-weight: 600;
  color: #475569; margin-bottom: .375rem;
  text-transform: uppercase; letter-spacing: .03em;
}
.dark .classic-label { color: #94a3b8; }
.classic-label .req { color: #ef4444; margin-left: 2px; }

/* ---------- Swatches ---------- */
.swatch { transition: transform .15s ease; }
.swatch:hover  { transform: scale(1.15); }
.swatch.selected { box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor; }
.dark .swatch.selected { box-shadow: 0 0 0 2px #1e293b, 0 0 0 4px currentColor; }

/* ---------- Cards ---------- */
.soft-card { box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.04); }
.dark .soft-card { box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 20px rgba(0,0,0,0.15); }

/* ---------- Global scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }

/* ---------- Animations ---------- */
@keyframes growBar { from { width: 0; height: 0; } }
.progress-bar { animation: growBar 1.2s ease-out; }

/* ---------- Dropdown ---------- */
.dropdown { display: none; }
.dropdown.show { display: block; }

/* ---------- Numerals (tabular) ---------- */
.num { font-family: 'Inter', 'Baloo Da 2', sans-serif; font-variant-numeric: tabular-nums; }

/* ---------- Mobile sidebar ---------- */
@media (max-width: 1023px) {
  #sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
    transform: translateX(-100%);
    transition: transform .3s ease;
    width: 280px;
  }
  #sidebar.open { transform: translateX(0); }
  #sidebarBackdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 40; opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
  }
  #sidebarBackdrop.open { opacity: 1; pointer-events: auto; }
}