/* Theme B — Neo Gentelella (theme.css) */

/* Reset / base */
:root{
  --brand:#1f6fb2; /* main blue */
  --brand-dark:#174f80;
  --text:#222;
  --muted:#6c757d;
  --card:#ffffff;
  --bg:#f4f6f9;
}
html {
  overflow-x: hidden;
  width: 100%;
}

body{
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg);
  color:var(--text);
  margin:0;
  padding:0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* SIDEBAR */
#sidebar{
  position:fixed;
  left:0; top:0;
  width:60px; height:100vh;
  background:linear-gradient(180deg,var(--brand),var(--brand-dark));
  color:#fff;
  z-index:1100;
  display:flex; flex-direction:column; align-items:center;
  padding-top:8px;
}
.sidebar-item{
  width:100%; text-align:center; padding:8px 0; cursor:pointer; position:relative;
}
.sidebar-item i{ font-size:16px; color:#fff; }
.sidebar-item:hover{ background: rgba(255,255,255,0.03); }

/* Floating label - only show when no submenu */
.hover-label{
  position:absolute; left:60px; top:50%; transform:translateY(-50%); 
  background: #0b2740; color:#fff; padding:6px 12px; border-radius:6px; 
  white-space:nowrap; opacity:0; pointer-events:none; transition:all .18s;
  box-shadow: 0 8px 20px rgba(10,25,40,0.35);
  z-index: 1199;
}
.sidebar-item:hover .hover-label{ 
  opacity:1; 
  transform:translate(10px,-50%); 
}
/* Hide label when submenu container exists - submenu will cover it */
.sidebar-item:hover .submenu-container {
  display: block;
}
/* When submenu is shown, ensure label is hidden */
.sidebar-item:hover:has(.submenu-container) .hover-label {
  opacity: 0 !important;
  display: none !important;
}

/* Floating submenu card */
.submenu-container{
  position:absolute; 
  left:60px; 
  top:50%;
  transform: translateY(-10%);
  display:none;
  min-width:160px; 
  max-width: 180px;
  background: linear-gradient(180deg,var(--brand),var(--brand-dark));
  color:#fff; 
  border-radius:8px; 
  overflow:hidden;
  box-shadow:0 10px 30px rgba(16,40,80,0.12);
  z-index: 1200;
  padding: 0;
}
.sidebar-item:hover .submenu-container{ 
  display:block; 
}
/* Submenu header */
.submenu-header{
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  background-color: rgba(255,255,255,0.1);
  text-align: center;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Submenu separator line */
.submenu-separator{
  height: 1px;
  background-color: rgba(255,255,255,0.4);
  margin: 4px 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.submenu-container a{
  display: flex;
  align-items: center;
  padding: 6px 12px;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.15s;
  white-space: nowrap;
  position: relative;
  font-size: 13px;
  text-align: left;
}
.submenu-container a::before {
  content: '•';
  font-size: 10px;
  margin-right: 8px;
  color: #fff;
  opacity: 0.8;
}
.submenu-container a i{
  font-size: 14px;
  margin-right: 8px;
}
.submenu-container a:hover{
  background-color: rgba(255,255,255,0.1);
  color: #fff;
}

/* Floating submenu labels */
.submenu-label{
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 12px;
  background: #0b2740;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.18s;
  box-shadow: 0 8px 20px rgba(10,25,40,0.35);
  z-index: 1300;
  font-size: 12px;
}
.submenu-container a:hover .submenu-label{
  opacity: 1;
  transform: translate(5px, -50%);
}

/* Header */
.top-header {
    height: 45px !important;
    padding: 0 14px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #2278c3;
    border-bottom: 1px solid #e6edf6;
    position: fixed;
    top: 0;
    left: 60px;
    right: 0;
    width: calc(100% - 60px);
    z-index: 1050;
    box-sizing: border-box;
}

.top-header .btn-sm{
  padding: 0.25rem 0.5rem;
}
.top-header .d-flex > * {
  margin: 0;
}

/* Header Icons Styling */
.top-header .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.top-header .dropdown-toggle:hover {
    background-color: rgba(23, 79, 128, 0.1);
}

    .top-header .fa-bell {
        font-size: 18px !important;
        color: #ffffff !important;
        transition: color 0.2s;
    }

.top-header .fa-caret-down {
    font-size: 10px !important;
    color: #6c757d !important;
    transition: color 0.2s;
}

    .top-header .dropdown-toggle:hover .fa-bell,
    .top-header .dropdown-toggle:hover .fa-caret-down {
        color: #ffffff !important;
    }

/* User Profile Icon */
.top-header img.rounded-circle {
    width: 32px !important;
    height: 32px !important;
    object-fit: cover;
    border: 2px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s;
}

.top-header img.rounded-circle:hover {
    border-color: #174f80;
    box-shadow: 0 0 0 2px rgba(23, 79, 128, 0.1);
}

/* User Profile Tag Design */
.user-profile-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #174f80;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

    .user-profile-tag:hover {
        background-color: #174f80;
    }

.user-profile-tag .user-icon {
    font-size: 14px;
    color: #ffffff;
}

.user-profile-tag .user-name {
    color: #ffffff;
    font-weight: 500;
}

.user-separator {
    color: #ffff;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.7;
}

.user-circle-icon {
    width: 36px;
    height: 36px;
    border: 2px solid #174f80;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: #174f80;
    cursor: pointer;
    transition: all 0.2s;
}

.user-circle-icon:hover {
    background-color: rgba(23, 79, 128, 0.1);
    border-color: #174f80;
}

.user-circle-icon i {
    font-size: 16px;
    color: #174f80;
}

/* Header spacing */
.top-header .d-flex.align-items-center.gap-1 {
    gap: 12px !important;
}

/* Toggle switch alignment in header */
.top-header .form-check {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}
.brand-title{ font-weight:600; color:var(--brand-dark); margin:0; }

/* Main content */
#content {
    margin-left: 60px;
    margin-top: 45px !important; /* exact header height */
    padding: 5px 5px;
    overflow-x: hidden;
    max-width: calc(100vw - 60px);
    box-sizing: border-box;
    padding-bottom: 60px; /* Space for footer */
}

/* Footer */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 60px;
    right: 0;
    height: 45px;
    background-color: #ffffff;
    border-top: 1px solid #e1e1e1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
    font-size: 12px;
}

.footer-text {
    color: #6c757d;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link {
    color: #174f80;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #0f3a5c;
    text-decoration: underline;
}

.footer-separator {
    color: #dee2e6;
    font-size: 12px;
}

/* Dark mode footer */
body.dark .app-footer {
    background-color: var(--card);
    border-top-color: #2a3441;
}

body.dark .footer-text {
    color: var(--muted);
}

body.dark .footer-link {
    color: var(--text);
}

body.dark .footer-link:hover {
    color: #ffffff;
}

body.dark .footer-separator {
    color: #2a3441;
}



/* Cards */
.card{
  background:var(--card); border-radius:10px; padding:18px; box-shadow:0 6px 18px rgba(16,40,80,0.06);
}
/* Compact card for DataTables */
.card .table-responsive {
  margin: -6px;
  padding: 0;
  overflow-x: auto;
  max-width: 100%;
}
.card table.dataTable {
  margin: 0;
  width: 100% !important;
  max-width: 100%;
}
.card h5 + .table-responsive {
  margin-top: 12px;
}

/* KPI small text */
.kpi-sub{ color:var(--muted); font-size:13px; }

/* KPI Cards */
.kpi-card {
    border: 1px solid #e1e1e1;
    transition: all 0.2s;
}

.kpi-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.kpi-card .card-body {
    padding: 1rem !important;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: #212529;
    margin: 0.5rem 0;
    line-height: 1.2;
}

.kpi-change {
    font-size: 12px;
    font-weight: 500;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(23, 79, 128, 0.1);
    border-radius: 8px;
    color: #174f80;
    font-size: 20px;
}

/* Chart Cards */
.card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
}

/* DataTables overrides */
table.dataTable{
  border-radius: 8px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #d0d7de;
  font-size: 13px;
  width: 100% !important;
}
table.dataTable thead th,
table.dataTable thead.table-light th{ 
  background:linear-gradient(180deg,var(--brand),var(--brand-dark)) !important; 
  color:#fff !important; 
  border-radius: 0;
  border: 1px solid #d0d7de !important;
  border-bottom: 2px solid #d0d7de !important;
  font-weight: 600;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
table.dataTable thead th:first-child{
  border-radius: 8px 0 0 0;
  border-left: 1px solid #d0d7de !important;
}
table.dataTable thead th:last-child{
  border-radius: 0 8px 0 0;
  border-right: 1px solid #d0d7de !important;
}

/* Apply same styling to regular tables (not just DataTables) */
table:not(.dataTable) thead.table-light th{ 
  background:linear-gradient(180deg,var(--brand),var(--brand-dark)) !important; 
  color:#fff !important; 
  border-radius: 0;
  border: 1px solid #d0d7de !important;
  border-bottom: 2px solid #d0d7de !important;
  font-weight: 600;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
table:not(.dataTable) thead.table-light th:first-child{
  border-radius: 8px 0 0 0;
  border-left: 1px solid #d0d7de !important;
}
table:not(.dataTable) thead.table-light th:last-child{
  border-radius: 0 8px 0 0;
  border-right: 1px solid #d0d7de !important;
}

table:not(.dataTable) tbody td{
  border: 1px solid #d0d7de;
  padding: 5px 12px;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.4;
}

/* Dark mode for regular tables */
body.dark table:not(.dataTable) thead.table-light th{
  border-color: #2a3441 !important;
  border-bottom-color: #3a4551 !important;
}
body.dark table:not(.dataTable) tbody td{
  border-color: #2a3441;
}
body.dark table:not(.dataTable) tbody tr:hover td{
  background-color: #1a2332;
}
table.dataTable tbody td{
  border: 1px solid #d0d7de;
  padding: 5px 12px;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.4;
}
table.dataTable tbody tr{
  height: auto;
}
table.dataTable tbody tr:last-child td:first-child{
  border-bottom-left-radius: 8px;
}
table.dataTable tbody tr:last-child td:last-child{
  border-bottom-right-radius: 8px;
}
table.dataTable tbody tr:hover td{
  background-color: #f8f9fa;
}
/* Compact DataTable wrapper */
.dataTables_wrapper {
  padding: 0;
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 12px;
  padding: 0;
}
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  padding: 4px 4px;
  font-size: 8px;
  border-radius: 4px;
}
.dataTables_wrapper .dataTables_info {
  padding: 4px 0;
  font-size: 13px;
}
.dataTables_wrapper .dataTables_paginate {
  padding: 1px 0;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 1px 4px;
  font-size: 8px;
  margin: 0;
  border-radius: 1px;
  border: 1px solid #dee2e6;
  background-color: #f8f9fa;
  color: #6c757d !important;
  cursor: pointer;
  transition: all 0.2s;
  min-width: auto;
  height: auto;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background-color: #e9ecef;
  color: #495057 !important;
  border-color: #dee2e6;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background-color: #174f80 !important;
  color: #ffffff !important;
  border-color: #174f80 !important;
  font-weight: 500;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #f8f9fa;
  color: #adb5bd !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  background-color: #f8f9fa;
  color: #adb5bd !important;
  border-color: #dee2e6;
}

/* Dark mode */
body.dark{
  --card:#174f80; --bg:#1f6fb2; --text:#e6eef8; --muted:#96a2b6;
  background-color: #1f6fb2 !important;
}
body.dark .top-header{ background-color:#3399ff; border-color:#122033; }
body.dark .submenu-container{ background:linear-gradient(180deg,var(--brand),var(--brand-dark)); color:#fff; box-shadow:0 10px 30px rgba(2,8,21,0.7); }
body.dark .submenu-container a{ color:#fff; }
body.dark .submenu-container a:hover{ background-color:rgba(255,255,255,0.1); color:#fff; }
body.dark .hover-label{ background:#031428; }
body.dark .submenu-label{ background:#031428; color:#fff; }
body.dark .card{ background:var(--card); color:var(--text); box-shadow: none; }
body.dark .card-header{ 
  background-color: var(--card) !important; 
  border-bottom-color: #2a3441 !important; 
  color: var(--text) !important; 
}
body.dark .card-body{ 
  background-color: var(--card) !important; 
  color: var(--text) !important; 
}
body.dark .breadcrumb-home-icon {
  color: var(--text) !important;
}
body.dark .breadcrumb-separator {
  color: var(--muted) !important;
}
body.dark .breadcrumb-item {
  color: var(--muted) !important;
}
body.dark .breadcrumb-item.active {
  color: var(--text) !important;
}
body.dark .breadcrumb-item:hover {
  color: var(--text) !important;
}

/* Dark mode KPI Cards */
body.dark .kpi-card {
  background-color: var(--card) !important;
  border-color: #2a3441 !important;
}

body.dark .kpi-value {
  color: var(--text) !important;
}

body.dark .kpi-icon {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--text) !important;
}

body.dark .card h5 {
  color: var(--text) !important;
}
body.dark table.dataTable{
  border-color: #2a3441;
}
body.dark table.dataTable thead th,
body.dark table.dataTable thead.table-light th{
  border-color: #2a3441 !important;
  border-bottom-color: #3a4551 !important;
}
body.dark table.dataTable tbody td{
  border-color: #2a3441;
}
body.dark table.dataTable tbody tr:hover td{
  background-color: #1a2332;
}
body.dark .dataTables_wrapper .dataTables_length select,
body.dark .dataTables_wrapper .dataTables_filter input {
  background: var(--card);
  border-color: #2a3441;
  color: var(--text);
}
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
  color: var(--text);
}
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #1a2332;
  color: var(--text);
}

/* Small helpers */
.p-2-5{ padding:10px; }

/* Kanban */
.kanban-board{ display:flex; gap:16px; align-items:flex-start; }
.kanban-column{ min-width:260px; background:rgba(255,255,255,0.95); padding:12px; border-radius:8px; }
.kanban-card{ background:#fff; padding:10px; margin-bottom:8px; border-radius:6px; box-shadow:0 6px 14px rgba(15,40,80,0.06); cursor:grab; }

/* Chat */
.chat-window{ height:420px; overflow-y:auto; background: #fff; padding:12px; border-radius:8px; }

/* Upload */
.dropzone{
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  border:2px dashed rgba(31,111,178,0.18); padding:28px; text-align:center; border-radius:10px;
}

/* Mobile Menu Toggle Button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1200;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1099;
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-overlay.show {
  display: block;
  opacity: 1;
}

/* Responsive tweaks */
@media (max-width:768px){
  .mobile-menu-btn {
    display: block;
  }
  
  #sidebar{ 
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 260px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  
  #sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .top-header{ 
    margin-left:0; 
    padding-left: 60px !important;
  }
  
  #content{ 
    margin-left:0; 
    margin-top:56px !important; 
  }
  
  /* Adjust submenu for mobile */
  .submenu-container {
    position: static;
    transform: none;
    margin-left: 0;
    margin-top: 8px;
    width: 100%;
    min-width: unset;
    border-radius: 6px;
  }
  
  .hover-label {
    display: none;
  }
  
  /* Show sidebar items with labels on mobile */
  .sidebar-item {
    padding: 12px 16px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .sidebar-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
  }
  
  .sidebar-item .hover-label {
    position: static;
    transform: none;
    opacity: 1;
    background: transparent;
    padding: 0;
    box-shadow: none;
    font-size: 14px;
    display: block;
  }
  
  .sidebar-item:hover .hover-label {
    transform: none;
  }
}

/* Breadcrumb-style Page Header - Simple Format */
.page-header-breadcrumb {
    padding: 2px 0;
    margin-bottom: 1rem;
}

.breadcrumb-nav-simple {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.breadcrumb-home-icon {
    font-size: 16px;
    color: #174f80;
    margin-right: 2px;
}

.breadcrumb-separator {
    color: #174f80;
    font-size: 13px;
    margin: 0 4px;
    font-weight: normal;
}

.breadcrumb-item {
    color: #174f80;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

    .breadcrumb-item:hover {
        color: #174f80;
        text-decoration: underline;
        cursor: pointer;
    }

    .breadcrumb-item.active {
        color: #174f80;
        font-weight: bolder;
        cursor: default;
    }

.breadcrumb-item.active:hover {
    text-decoration: none;
    color: #212529;
}

/* Button Styling */
.btn-primary {
    background-color: #174f80 !important;
    border-color: #174f80 !important;
    color: #ffffff !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    transition: all 0.2s ease;
}

/* Task form buttons - reduced height */
.d-flex.justify-content-end button[form="taskForm"],
.d-flex.justify-content-end .btn-primary[form="taskForm"],
.d-flex.justify-content-end .btn-light {
    padding: 0.25rem 0.75rem !important;
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
    min-height: auto !important;
}

.btn-primary:hover {
    background-color: #0f3a5c !important;
    border-color: #0f3a5c !important;
    color: #ffffff !important;
}

.btn-primary:focus,
.btn-primary:active {
    background-color: #0a2d47 !important;
    border-color: #0a2d47 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(23, 79, 128, 0.25) !important;
}

.btn-primary:disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    opacity: 0.65;
}

/* Button variants with brand color */
.btn-outline-primary {
    color: #174f80 !important;
    border-color: #174f80 !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: #174f80 !important;
    border-color: #174f80 !important;
    color: #ffffff !important;
}

/* Small button variant */
.btn-sm.btn-primary {
    padding: 0.2rem 0.5rem !important;
    font-size: 10px !important;
    background-color: #174f80 !important;
    border-color: #174f80 !important;
}

.btn-sm.btn-primary:hover {
    background-color: #0f3a5c !important;
    border-color: #0f3a5c !important;
}

/* DataTables Length Menu Styling */
.dataTables_length {
    margin-bottom: 1rem;
    font-size: 12px;
}

.dataTables_length label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: normal;
    margin-bottom: 0;
}

.dataTables_length select {
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    color: #212529;
    min-width: 70px;
}

.dataTables_length select:focus {
    border-color: #174f80;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(23, 79, 128, 0.25);
}

/* DataTables Info and Pagination */
.dataTables_info {
    font-size: 9px;
    color: #6c757d;
    padding-top: 0.1rem;
}

.dataTables_paginate {
    font-size: 8px;
    padding-top: 0.1rem;
}

.dataTables_paginate .paginate_button {
    padding: 1px 4px;
    margin: 0;
    border: 1px solid #dee2e6;
    border-radius: 1px;
    background-color: #f8f9fa;
    color: #6c757d !important;
    cursor: pointer;
    transition: all 0.2s;
    min-width: auto;
    height: auto;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 400;
}

.dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    background-color: #e9ecef;
    color: #495057 !important;
    border-color: #dee2e6;
}

.dataTables_paginate .paginate_button.current {
    background-color: #174f80 !important;
    color: #ffffff !important;
    border-color: #174f80 !important;
    font-weight: 500;
}

.dataTables_paginate .paginate_button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
    color: #adb5bd !important;
}

.dataTables_paginate .paginate_button.disabled:hover {
    background-color: #f8f9fa;
    color: #adb5bd !important;
    border-color: #dee2e6;
}

/* DataTables Search */
.dataTables_filter {
    margin-bottom: 1rem;
    font-size: 12px;
    text-align: right !important;
    float: right !important;
}

.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: normal;
    margin-bottom: 0;
    justify-content: flex-end;
    float: right;
}

.dataTables_filter input {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-left: 8px;
}

.dataTables_filter input:focus {
    border-color: #174f80;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(23, 79, 128, 0.25);
}

/* Ensure DataTables wrapper aligns filter to right */
.dataTables_wrapper .dataTables_filter {
    text-align: right !important;
    float: right !important;
}

.dataTables_wrapper .dataTables_filter label {
    float: right;
    text-align: right;
    justify-content: flex-end;
}

/* DataTable Controls Wrapper */
.datatable-controls-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.datatable-controls-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.datatable-controls-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Add Task Button */
.btn-add-task {
    background-color: #174f80 !important;
    border: 1px solid #dee2e6 !important;
    color: #ffff !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.btn-add-task:hover {
    background-color: #f8f9fa !important;
    border-color: #174f80 !important;
    color: #174f80 !important;
}

.btn-add-task i {
    font-size: 12px !important;
}

/* Move DataTables controls into wrapper */
.datatable-controls-left .dataTables_length {
    margin-bottom: 0 !important;
    margin-right: 0;
}

.datatable-controls-right .dataTables_filter {
    margin-bottom: 0 !important;
    float: none !important;
    margin-right: 0;
}

.datatable-controls-right .dataTables_filter label {
    margin-bottom: 0;
}

.datatable-controls-left .dataTables_length label {
    margin-bottom: 0;
}

/* Compact Form Styling */
.form-control {
    padding: 0.35rem 0.6rem !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    height: auto !important;
}

.form-control:focus {
    padding: 0.35rem 0.6rem !important;
    font-size: 12px !important;
}

.form-label {
    font-size: 12px !important;
    margin-bottom: 0.35rem !important;
    font-weight: 500 !important;
}

.form-select {
    padding: 0.35rem 0.6rem !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    height: auto !important;
}

textarea.form-control {
    padding: 0.35rem 0.6rem !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    min-height: auto !important;
}

/* Compact form spacing */
.mb-4 {
    margin-bottom: 1rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

/* Nav Tabs Styling */
.nav-tabs {
    border-bottom: 1px solid #2278c3 !important;
    margin-bottom: 0 !important;
    background-color: #2278c3 !important;
}

.nav-tabs .nav-link {
    color: #ffffff !important;
    border: 1px solid transparent !important;
    border-top-left-radius: 0.375rem !important;
    border-top-right-radius: 0.375rem !important;
    padding: 0.5rem 1rem !important;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
    margin-bottom: -1px !important;
    opacity: 0.7 !important;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef transparent !important;
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    opacity: 1 !important;
}

.nav-tabs .nav-link.active {
    background-color: #ffffff !important;
    color: #2278c3 !important;
    border-color: #2278c3 #2278c3 transparent !important;
    border-bottom-color: transparent !important;
    font-weight: 500 !important;
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
}

.nav-tabs .nav-link.active:hover {
    background-color: #ffffff !important;
    color: #2278c3 !important;
    border-color: #2278c3 #2278c3 transparent !important;
    border-bottom-color: transparent !important;
}

/* Dark mode nav tabs */
body.dark .nav-tabs {
    border-bottom-color: #2278c3 !important;
    background-color: #2278c3 !important;
}

body.dark .nav-tabs .nav-link {
    color: #ffffff !important;
    opacity: 0.7 !important;
}

body.dark .nav-tabs .nav-link:hover {
    border-color: #2a3441 #2a3441 #2278c3 !important;
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    opacity: 1 !important;
}

body.dark .nav-tabs .nav-link.active {
    background-color: var(--card) !important;
    color: #2278c3 !important;
    border-color: #2278c3 #2278c3 transparent !important;
    opacity: 1 !important;
}

body.dark .nav-tabs .nav-link.active:hover {
    background-color: #2278c3 !important;
    color: #ffffff !important;
}

/* Tab Pane Styling */
.tab-content {
    margin-top: 0 !important;
}

.tab-pane {
    border: 1px solid #174f80 !important;
    border-top: none !important;
    border-radius: 0 0 0.375rem 0.375rem !important;
    padding: 1rem !important;
    background-color: #ffffff !important;
    margin-top: -1px !important;
    position: relative !important;
    z-index: 0 !important;
}

/* Dark mode tab pane */
body.dark .tab-pane {
    border-color: #174f80 !important;
    background-color: var(--card) !important;
    color: var(--text) !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

/* Compact card */
.card {
    padding: 0rem !important;
    background-color: #ffffff !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 0rem;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.card-header {
    padding: 0.75rem 1rem !important;
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #e1e1e1 !important;
    border-radius: 8px 8px 0 0 !important;
    margin: 0 !important;
}

.card-body {
    padding: 5px !important;
}

/* Compact row spacing */
.row.g-3 {
    --bs-gutter-y: 0.5rem !important;
    --bs-gutter-x: 0.75rem !important;
}

/* Compact headings in forms */
h5 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
}

h5.mb-3 {
    margin-bottom: 0.75rem !important;
}

/* Compact text muted */
.text-muted {
    font-size: 11px !important;
}

small.text-muted {
    font-size: 10px !important;
}

/* Compact form check */
.form-check {
    margin-bottom: 0.5rem !important;
}

.form-check-label {
    font-size: 12px !important;
}

.form-check-input {
    width: 1rem !important;
    height: 1rem !important;
    margin-top: 0.15rem !important;
}

/* Toggle Switch Styling - Clean Design */
.form-switch .form-check-input {
    width: 2.5rem !important;
    height: 1.25rem !important;
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 2rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%236c757d'/%3e%3c/svg%3e") !important;
    background-position: left 0.125rem center !important;
    background-size: 1rem 1rem !important;
    background-repeat: no-repeat !important;
    margin-top: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.form-switch .form-check-input:checked {
    background-color: #174f80 !important;
    border-color: #174f80 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    background-position: right 0.125rem center !important;
}

.form-switch .form-check-input:focus {
    border-color: #174f80 !important;
    box-shadow: 0 0 0 0.2rem rgba(23, 79, 128, 0.25) !important;
    outline: 0 !important;
}

/* Dark Mode Toggle Specific */
#darkModeToggle {
    width: 2.75rem !important;
    height: 1.5rem !important;
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 2rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.5' fill='%236c757d'/%3e%3c/svg%3e") !important;
    background-position: left 0.2rem center !important;
    background-size: 1.1rem 1.1rem !important;
    background-repeat: no-repeat !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#darkModeToggle:checked {
    background-color: #174f80 !important;
    border-color: #174f80 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.5' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    background-position: right 0.2rem center !important;
}

#darkModeToggle:focus {
    border-color: #174f80 !important;
    box-shadow: 0 0 0 0.2rem rgba(23, 79, 128, 0.25) !important;
    outline: 0 !important;
}

/* Icon Button Styling */
.btn-icon {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    transition: all 0.2s ease !important;
}

.btn-icon i {
    font-size: 12px !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.btn-icon.btn-sm {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
}

.btn-icon.btn-sm i {
    font-size: 11px !important;
}

.btn-icon.btn-light-primary {
    background-color: rgba(23, 79, 128, 0.1) !important;
    border-color: rgba(23, 79, 128, 0.2) !important;
    color: #174f80 !important;
}

.btn-icon.btn-light-primary:hover {
    background-color: #174f80 !important;
    border-color: #174f80 !important;
    color: #ffffff !important;
}

.btn-icon.btn-light-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border-color: rgba(220, 53, 69, 0.2) !important;
    color: #dc3545 !important;
}

.btn-icon.btn-light-danger:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

/* Action buttons gap */
.d-flex.gap-2 {
    gap: 0.5rem !important;
}

/* Compact file input */
input[type="file"].form-control {
    padding: 0.25rem 0.5rem !important;
    font-size: 11px !important;
}

/* Compact alert */
.alert {
    padding: 0.5rem 0.75rem !important;
    font-size: 12px !important;
    margin-bottom: 0.75rem !important;
}

.alert-danger {
    font-size: 12px !important;
}

/* Compact validation messages */
.text-danger {
    font-size: 11px !important;
}

span.text-danger {
    font-size: 11px !important;
    display: block;
    margin-top: 0.25rem;
}
/* Metronic-style Multiselect */
.metronic-multiselect {
    position: relative;
    width: 100%;
}

.tmpl-item-row {
    align-items: flex-start !important;
}

/* Template-task assignee picker: larger height + better alignment */
#projectTemplateTasksChecklist .metronic-multiselect .multiselect-input {
    min-height: 48px;
    padding-top: 10px;
    padding-bottom: 10px;
}

#projectTemplateTasksChecklist .metronic-multiselect .multiselect-tags {
    min-height: 28px;
}

#projectTemplateTasksChecklist .metronic-multiselect .multiselect-tag {
    padding: 6px 12px;
    font-size: 13px;
}

#projectTemplateTasksChecklist .metronic-multiselect .multiselect-placeholder {
    font-size: 14px;
}

#projectTemplateTasksChecklist .metronic-multiselect .multiselect-dropdown {
    max-height: 360px;
}

.multiselect-input {
    position: relative;
    min-height: 38px;
    padding: 6px 40px 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

    .multiselect-input:hover {
        border-color: var(--brand);
    }

    .multiselect-input.active {
        border-color: var(--brand);
        box-shadow: 0 0 0 3px rgba(31, 111, 178, 0.1);
    }

.multiselect-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-height: 24px;
}

.multiselect-placeholder {
    color: #999;
    font-size: 14px;
}

.multiselect-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f5f5f5;
    color: #333;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

    .multiselect-tag .tag-remove {
        cursor: pointer;
        color: #999;
        font-size: 14px;
        line-height: 1;
        padding: 0;
        background: none;
        border: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 16px;
        height: 16px;
        transition: color 0.2s;
        margin-left: 2px;
    }

        .multiselect-tag .tag-remove:hover {
            color: #333;
        }

.multiselect-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 12px;
    transition: transform 0.3s;
    pointer-events: none;
}

.multiselect-input.active .multiselect-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow: hidden;
    flex-direction: column;
}

    .multiselect-dropdown.show {
        display: flex;
    }

.multiselect-search {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

    .multiselect-search input {
        padding-left: 12px;
        padding-right: 12px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        width: 100%;
        box-sizing: border-box;
    }

        .multiselect-search input:focus {
            border-color: var(--brand);
            box-shadow: 0 0 0 2px rgba(31, 111, 178, 0.1);
        }

.multiselect-options {
    max-height: 240px;
    overflow-y: auto;
    padding: 8px;
}

.multiselect-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

    .multiselect-option:hover {
        background: #f8f9fa;
    }

    .multiselect-option input[type="checkbox"] {
        margin-right: 10px;
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: var(--brand);
    }

    .multiselect-option span {
        flex: 1;
        font-size: 14px;
        color: #333;
    }

    .multiselect-option input[type="checkbox"]:checked + span {
        font-weight: 500;
        color: var(--brand-dark);
    }

/* Clickable multiselect option (no checkbox) */
.multiselect-option-clickable {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

    .multiselect-option-clickable:hover {
        background: #f8f9fa;
    }

    .multiselect-option-clickable.selected {
        background: #e7f3ff;
        font-weight: 500;
        color: var(--brand-dark);
    }

    .multiselect-option-clickable.selected:hover {
        background: #d0e7ff;
    }

    .multiselect-option-clickable span {
        flex: 1;
        font-size: 14px;
        color: #333;
    }

    .multiselect-option-clickable.selected span {
        color: var(--brand-dark);
    }

/* Dark mode for multiselect */
body.dark .multiselect-input {
    background: var(--card);
    border-color: #2a3441;
    color: var(--text);
}

body.dark .multiselect-placeholder {
    color: var(--muted);
}

body.dark .multiselect-tag {
    background: #2a3441;
    color: var(--text);
}

    body.dark .multiselect-tag .tag-remove {
        color: var(--muted);
    }

        body.dark .multiselect-tag .tag-remove:hover {
            color: var(--text);
        }

body.dark .multiselect-dropdown {
    background: var(--card);
    border-color: #2a3441;
}

body.dark .multiselect-search {
    border-bottom-color: #2a3441;
}

    body.dark .multiselect-search input {
        background: var(--card);
        border-color: #2a3441;
        color: var(--text);
    }

body.dark .multiselect-option {
    color: var(--text);
}

    body.dark .multiselect-option:hover {
        background: #1a2332;
    }

    body.dark .multiselect-option span {
        color: var(--text);
    }

    body.dark .multiselect-option input[type="checkbox"]:checked + span {
        color: var(--brand);
    }

body.dark .multiselect-option-clickable {
    color: var(--text);
}

    body.dark .multiselect-option-clickable:hover {
        background: #2a3441;
    }

    body.dark .multiselect-option-clickable.selected {
        background: #1a3a5c;
        color: var(--brand-light);
    }

    body.dark .multiselect-option-clickable.selected:hover {
        background: #1e4a6e;
    }

    body.dark .multiselect-option-clickable span {
        color: var(--text);
    }

    body.dark .multiselect-option-clickable.selected span {
        color: var(--brand-light);
    }

/* PAGE LOADER */
.page-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.page-loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.page-loader-content {
    text-align: center;
    background: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 200px;
}

.page-loader-spinner {
    margin-bottom: 1rem;
}

.page-loader-text {
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

body.dark .page-loader-content {
    background: #2a3441;
}

body.dark .page-loader-text {
    color: #e9ecef;
}
