/* =====================
   GLOBAL
===================== */
body {
  font-family: 'Inter', sans-serif;
  background-color: #052129;
  color: #e2e8f0;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =====================
   CARD
===================== */
.card {
  border: none;
  border-radius: 12px;
  background-color: #000814;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  color: #e2e8f0;
}

.card-header {
  border-bottom: 1px solid #2a2d3a;
  background-color: #000814;
  color: #e2e8f0;
}

.card-body {
  color: #e2e8f0;
}

/* =====================
   SIDEBAR
===================== */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background-color: #1a1b24;
  border-right: 1px solid #2a2d3a;
}

.sidebar-header {
  font-size: 18px;
  color: #fff;
}

.sidebar .nav-link {
  color: #8b95a5;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar .nav-link i {
  margin-right: 10px;
  color: #8b95a5;
}

.sidebar .nav-link:hover {
  background-color: rgba(45, 212, 191, 0.08);
  color: #2dd4bf;
}

.sidebar .nav-link:hover i {
  color: #2dd4bf;
}

.sidebar .nav-link.active {
  background-color: rgba(45, 212, 191, 0.12);
  color: #2dd4bf;
  font-weight: 600;
}

.sidebar .nav-link.active i {
  color: #2dd4bf;
}

.sidebar .nav-link.disabled {
  color: #5a6170;
  cursor: not-allowed;
}

.submenu {
    padding-left: 18px;
    margin-top: 6px;
}

.submenu .submenu {
    padding-left: 14px;
}

.submenu .nav-link {
    font-size: 14px;
    padding: 6px 0;
    color: #8b95a5;
}

.submenu .nav-link.active {
    color: #2dd4bf;
    font-weight: 600;
}

.nav-link .bi-chevron-down {
    transition: transform 0.2s ease;
    color: #5a6170;
}

.nav-link[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

/* Sidebar accordion toggle */
.sidebar .nav-link[data-bs-toggle="collapse"] {
  color: #c4cad4;
}

.sidebar .nav-link[data-bs-toggle="collapse"]:hover {
  color: #fff;
  background-color: rgba(255,255,255,0.04);
}

.sidebar .nav-link[data-bs-toggle="collapse"] span {
  color: inherit;
}

/* =====================
   TOPBAR
===================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #000814 !important;
  border-bottom: 1px solid #2a2d3a;
}

.topbar h5 {
  color: #fff;
}

.topbar img {
    object-fit: cover;
}

.topbar .dropdown-menu {
    border-radius: 12px;
    min-width: 220px;
    background-color: #000814;
    border: 1px solid #2a2d3a;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.topbar .dropdown-item {
    font-size: 14px;
    padding: 8px 14px;
    color: #c4cad4;
}

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

.topbar .dropdown-item i {
    font-size: 16px;
    color: #8b95a5;
}

.topbar .dropdown-item.text-danger {
    color: #f87171;
}

.topbar .dropdown-item.text-danger i {
    color: #f87171;
}

.topbar .dropdown-item.active {
    background-color: rgba(45, 212, 191, 0.12);
    color: #2dd4bf;
}

.topbar .dropdown-divider {
    border-color: #2a2d3a;
}

/* Branch dropdown */
.topbar .btn-outline-secondary {
    border-color: #2a2d3a;
    color: #c4cad4;
}

.topbar .btn-outline-secondary:hover {
    background-color: rgba(255,255,255,0.06);
    color: #fff;
    border-color: #3a3d4a;
}

.topbar .text-muted {
    color: #8b95a5 !important;
}

/* =====================
   KPI CARDS
===================== */
.kpi-card {
  transition: all 0.3s ease;
  background-color: #000814;
  border: 1px solid #2a2d3a;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  border-color: #3a3d4a;
}

.kpi-card small {
  color: #8b95a5;
}

.kpi-card h3 {
  font-weight: 700;
  margin: 8px 0;
  color: #fff;
}

/* =====================
   TABLES
===================== */
.table {
  color: #c4cad4;
  border-color: #2a2d3a;
}

.table tr {
  transition: background 0.2s ease;
  border-bottom-color: #2a2d3a;
}

.table tr:hover {
  background-color: #2f3e46;
}

.table td {
  padding: 14px 16px;
  vertical-align: middle;
  color: #c4cad4;
}

.table th {
  color: #8b95a5;
  font-weight: 600;
  font-size: 13px;
  border-bottom-color: #2a2d3a;
  background-color: #1a1b24;
}

.table-bordered {
  border-color: #2a2d3a !important;
}

.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td {
  border-color: #2a2d3a;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(255,255,255,0.02);
}

.table>:not(caption)>*>* {
 background-color: #000814;
}



.active>.page-link, .page-link.active {
    z-index: 3;
    color: #0f1117;
    background-color: #2dd4bf;
    border-color: #2dd4bf;
}


.disabled>.page-link, .page-link.disabled {
    color: rgb(139 149 165);
    pointer-events: none;
    background-color: #252736;
    border-color: #252736;
}
/* =====================
   BADGES
===================== */
.badge {
  border-radius: 999px;
  font-weight: 500;
  padding: 6px 12px;
}

.badge.bg-success {
  background-color: #16a34a !important;
  color: #fff;
}

.badge.bg-warning {
  background-color: #ca8a04 !important;
  color: #fff;
}

.badge.bg-danger {
  background-color: #dc2626 !important;
  color: #fff;
}

.badge.bg-info {
  background-color: #0891b2 !important;
  color: #fff;
}

.badge.bg-secondary {
  background-color: #4b5563 !important;
  color: #e5e7eb;
}

/* =====================
   BUTTONS
===================== */
.btn-primary {
  background-color: #2dd4bf !important;
  border-color: #2dd4bf !important;
  color: #0f1117 !important;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #25b8a3 !important;
  border-color: #25b8a3 !important;
}

.btn-secondary {
  background-color: #374151 !important;
  border-color: #374151 !important;
  color: #e2e8f0 !important;
}

.btn-secondary:hover {
  background-color: #4b5563 !important;
}

.btn-danger {
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}

.btn-warning {
  background-color: #ca8a04 !important;
  border-color: #ca8a04 !important;
  color: #fff !important;
}

.btn-info {
  background-color: #0891b2 !important;
  border-color: #0891b2 !important;
  color: #fff !important;
}

.btn-outline-primary {
  border-color: #2dd4bf !important;
  color: #2dd4bf !important;
  background: transparent;
}

.btn-outline-primary:hover {
  background-color: rgba(45, 212, 191, 0.12) !important;
}

.btn-success {
  background-color: #16a34a !important;
  border-color: #16a34a !important;
  color: #fff !important;
}

/* =====================
   FORM CONTROLS
===================== */
.form-control,
.form-select {
  background-color: #252736 !important;
  border: 1px solid #2a2d3a !important;
  color: #e2e8f0 !important;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.form-control:focus,
.form-select:focus {
  border-color: #2dd4bf !important;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15) !important;
  background-color: #252736 !important;
}

.form-control::placeholder {
  color: #5a6170;
}

.form-control:disabled,
.form-control[readonly] {
  background-color: #000814 !important;
  color: #8b95a5 !important;
}

.form-select option {
  background-color: #252736;
  color: #e2e8f0;
}

.form-label {
  color: #c4cad4;
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 6px;
}

.form-check-input {
  background-color: #252736;
  border-color: #2a2d3a;
}

.form-check-input:checked {
  background-color: #2dd4bf;
  border-color: #2dd4bf;
}

.form-check-label {
  color: #c4cad4;
  font-size: 14px;
}

textarea.form-control {
  resize: vertical;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 991px) {
  .sidebar {
    display: none;
  }
}

/* =====================
   DATATABLE CONTROLS
===================== */
.dataTables_wrapper {
  font-size: 14px;
  color: #c4cad4;
}

.dataTables_length label,
.dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  font-weight: 500;
  color: #8b95a5;
}

.dataTables_length select {
  border-radius: 8px;
  border: 1px solid #2a2d3a;
  padding: 6px 10px;
  background-color: #252736;
  color: #e2e8f0;
}

.dataTables_filter input {
  border-radius: 8px;
  border: 1px solid #2a2d3a;
  padding: 6px 12px;
  width: 220px;
  background-color: #252736;
  color: #e2e8f0;
}

.dataTables_filter input:focus {
  outline: none;
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

/* =====================
   PAGINATION
===================== */
.dataTables_paginate {
  display: flex;
  align-items: center;
}

.dataTables_paginate .paginate_button {
  border: none !important;
  background: transparent !important;
  padding: 6px 10px;
  margin: 0 2px;
  border-radius: 8px;
  color: #8b95a5 !important;
}

.dataTables_paginate .paginate_button.current {
  background-color: #2dd4bf !important;
  color: #0f1117 !important;
  font-weight: 600;
}

.dataTables_paginate .paginate_button:hover {
  background-color: rgba(45, 212, 191, 0.12) !important;
  color: #2dd4bf !important;
}

.dataTables_paginate .paginate_button.disabled {
  color: #3a3d4a !important;
}

/* =====================
   INFO TEXT
===================== */
.dataTables_info {
  color: #8b95a5;
}

.dataTables_length {
    width: 200px;
}

/* =====================
   GLOBAL AJAX LOADER
===================== */
.global-loader {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 23, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-loader .spinner-border {
  color: #2dd4bf;
  width: 2.5rem;
  height: 2.5rem;
}

/* =====================
   MODAL (DARK)
===================== */
.modal-content {
  background-color: #000814;
  border: 1px solid #2a2d3a;
  border-radius: 14px;
  color: #e2e8f0;
}

.modal-header {
  border-bottom: 1px solid #2a2d3a;
  background-color: #000814;
}

.modal-header .modal-title {
  color: #fff;
  font-weight: 600;
}

.modal-header .btn-close {
  filter: invert(1);
  opacity: 0.6;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-body {
  background-color: #000814;
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid #2a2d3a;
  background-color: #000814;
}

/* Modal subtitle */
.modal-subtitle {
  font-size: 13px;
  color: #8b95a5;
  margin-top: 2px;
}

/* Modal tabs */
.modal-tabs .nav-link {
  color: #8b95a5;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  border-radius: 0;
}

.modal-tabs .nav-link.active {
  color: #2dd4bf;
  border-bottom-color: #2dd4bf;
  background: none;
}

.modal-tabs .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.04);
}

/* =====================
   EMPLOYEE SECTIONS (inside modal tabs)
===================== */
.employee-section {
    background: #252736;
    border-radius: 14px;
    margin-bottom: 20px;
}

.employee-section-body {
    padding: 20px;
}

.employee-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.employee-section-subtitle {
    font-size: 13px;
    color: #8b95a5;
    margin-bottom: 18px;
}

.employee-form .form-group {
    margin-bottom: 16px;
}

.employee-form label {
    font-size: 13px;
    font-weight: 500;
    color: #c4cad4;
    margin-bottom: 6px;
}

/* =====================
   EMPLOYEE TAB SECTIONS (Family, Doc, Illness, etc.)
===================== */
.employee-family-section,
.employee-doc-section,
.employee-illness-section,
.employee-additions-section,
.employee-deductions-section,
.employee-leave-section {
    background: #252736;
    border-radius: 14px;
}

.employee-family-header,
.employee-doc-header,
.employee-illness-header,
.employee-additions-header,
.employee-deductions-header,
.employee-leave-header {
    padding: 16px 20px;
    border-bottom: 1px solid #2a2d3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.employee-family-title,
.employee-doc-title,
.employee-illness-title,
.employee-additions-title,
.employee-deductions-title,
.employee-leave-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.employee-family-body,
.employee-doc-body,
.employee-illness-body,
.employee-additions-body,
.employee-deductions-body,
.employee-leave-body {
    padding: 16px 20px 20px;
}

/* Shared inline tables */
.family-table,
.document-table,
.illness-table,
.additions-table,
.deductions-table,
.leave-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.family-table thead th,
.document-table thead th,
.illness-table thead th,
.additions-table thead th,
.deductions-table thead th,
.leave-table thead th {
    font-size: 12px;
    font-weight: 600;
    color: #8b95a5;
    text-transform: uppercase;
    border: none;
    padding: 6px 8px;
}

.family-table tbody tr,
.document-table tbody tr,
.illness-table tbody tr,
.additions-table tbody tr,
.deductions-table tbody tr,
.leave-table tbody tr {
    background: #000814;
    border-radius: 10px;
}

.family-table tbody td,
.document-table tbody td,
.illness-table tbody td,
.additions-table tbody td,
.deductions-table tbody td,
.leave-table tbody td {
    border: none;
    padding: 8px;
    vertical-align: middle;
    color: #c4cad4;
}

.family-table tbody tr td:first-child,
.document-table tbody tr td:first-child,
.illness-table tbody tr td:first-child,
.additions-table tbody tr td:first-child,
.deductions-table tbody tr td:first-child,
.leave-table tbody tr td:first-child {
    border-radius: 10px 0 0 10px;
}

.family-table tbody tr td:last-child,
.document-table tbody tr td:last-child,
.illness-table tbody tr td:last-child,
.additions-table tbody tr td:last-child,
.deductions-table tbody tr td:last-child,
.leave-table tbody tr td:last-child {
    border-radius: 0 10px 10px 0;
}

.family-table .form-control,
.document-table .form-control,
.illness-table .form-control,
.additions-table .form-control,
.deductions-table .form-control,
.leave-table .form-control {
    border-radius: 8px;
    font-size: 13px;
    padding: 8px 10px;
}

/* Remove buttons */
.family-remove-btn,
.document-remove-btn,
.illness-remove-btn,
.additions-remove-btn,
.deductions-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 0;
    line-height: 1;
}

.document-file-hint {
    font-size: 12px;
    color: #8b95a5;
    margin-top: 4px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: #8b95a5;
}

.empty-state i {
  font-size: 28px;
  color: #3a3d4a;
  margin-bottom: 10px;
}

/* =====================
   EMPLOYEE TABS (modal nav)
===================== */
.employee-tabs .nav-link {
  font-weight: 500;
  padding: 10px 16px;
  color: #8b95a5;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  border-radius: 0;
  font-size: 14px;
}

.employee-tabs .nav-link.active {
  color: #2dd4bf;
  border-bottom-color: #2dd4bf;
  background: none;
}

.employee-tabs .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.04);
}

.employee-tabs .nav-link.tab-disabled {
  color: #3a3d4a;
  cursor: not-allowed;
}

.employee-tabs .nav-link.tab-disabled:hover {
  background: none;
  color: #3a3d4a;
}

/* =====================
   AVATAR INITIALS
===================== */
.avatar-initials {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

/* =====================
   ACTION BUTTONS (kebab / icon group)
===================== */
.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2a2d3a;
  background: transparent;
  color: #8b95a5;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0 2px;
}

.action-btn:hover {
  background-color: #252736;
  color: #fff;
  border-color: #3a3d4a;
}

.action-btn.btn-edit:hover {
  color: #2dd4bf;
  border-color: #2dd4bf;
}

.action-btn.btn-delete:hover {
  color: #f87171;
  border-color: #f87171;
}

.action-btn.btn-view:hover {
  color: #60a5fa;
  border-color: #60a5fa;
}

/* =====================
   UTILITY OVERRIDES
===================== */
.text-muted {
  color: #8b95a5 !important;
}

.border {
  border-color: #2a2d3a !important;
}

.bg-light {
  background-color: #252736 !important;
}

.bg-white {
  background-color: #000814 !important;
}

.shadow-sm {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

.dropdown-menu {
  background-color: #000814;
  border-color: #2a2d3a;
}

.dropdown-item {
  color: #c4cad4;
}

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

.dropdown-divider {
  border-color: #2a2d3a;
}

hr {
  border-color: #2a2d3a;
}

/* =====================
   BREADCRUMB
===================== */
.breadcrumb-item {
  color: #8b95a5;
  font-size: 13px;
}

.breadcrumb-item a {
  color: #2dd4bf;
}

.breadcrumb-item.active {
  color: #c4cad4;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #5a6170;
}

/* =====================
   PAGETITLE
===================== */
.pagetitle h1 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 4px;
}

/* =====================
   RESPONSIVE OVERFLOW FIX
===================== */
@media (max-width: 992px) {
    .employee-family-body,
    .employee-doc-body,
    .employee-illness-body,
    .employee-additions-body,
    .employee-deductions-body,
    .employee-leave-body {
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .employee-section-body {
        padding: 18px;
    }
}
