:root {
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 80px;
  --header-height: 70px;
  --primary-color: #1995ad;
  --primary-hover: #e7473c;
  --sidebar-bg: #ffffff;
  --sidebar-hover: #f8f9fa;
  --sidebar-active: #e7f5f8;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --text-white: #ffffff;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --border-color: #e9ecef;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

ul,li {
  list-style: none;
  padding: 0;
  margin: 0;
}

button a {
  color: var(--text-white);
}

/* CSS (blur + disabled feel) */
.blur-field {
    filter: blur(2px);
    pointer-events: none;
    background-color: #f8f9fa;
}

.blur-field.editing {
    filter: none;
    pointer-events: auto;
    background-color: #fff;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  /*overflow-x: hidden;*/
}

#selectedList .tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #f1f3f5;
    border: 1px solid #ced4da;
    border-radius: 2px;
    font-size: 12px;
  }
  #selectedList .tag button {
    border: none;
    background: transparent;
    margin-left: 6px;
    cursor: pointer;
  }
  
/*custom date*/
.date-wrapper { position: relative; width: 160px; }

.calendar-box {
  position: absolute;
  top: 38px;
  left: 0;
  width: 260px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0,0,0,.15);
  padding: 10px;
  display: none;
  z-index: 9999;
}

.cal-header { display:flex; gap:4px; margin-bottom:5px; align-items:center; }
.cal-header select { font-size:12px; }

.nav-btn {
  border:none; background:#e9ecef; padding:3px 8px;
  border-radius:4px; cursor:pointer;
}

.cal-days,.cal-dates {
  display:grid; grid-template-columns:repeat(7,1fr);
  text-align:center; font-size:12px;
}

.cal-days span { font-weight:600; color:#666; }
.cal-dates span { padding:5px 0; cursor:pointer; border-radius:4px; }
.cal-dates span:hover { background:#e9ecef; }
.cal-dates .active { background:#ffe066; font-weight:700; }

.cal-footer {
  display:flex; justify-content:space-between; margin-top:8px;
}
.table-responsive,
.card,
.content-wrapper {
  overflow: visible !important;
}

  
/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--text-primary);
  transition: var(--transition);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  border-right: 1px solid var(--border-color);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  min-height: var(--header-height);
  background: var(--sidebar-bg);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
}

.logo i {
  font-size: 24px;
  color: var(--primary-color);
}

.logo-text {
  transition: var(--transition);
  white-space: nowrap;
  color: var(--text-primary);
  font-weight: 600;
}

.sidebar.collapsed .logo-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: var(--transition);
  display: none;
}

.sidebar-toggle-btn:hover {
  background: var(--sidebar-hover);
  color: var(--primary-color);
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.nav-menu {
  list-style: none;
}

.nav-item {
  margin: 5px 0;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 5px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  gap: 15px;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--primary-color);
}

.nav-item.active>.nav-link {
  background: var(--sidebar-active);
  color: var(--primary-color);
  border-left: 3px solid var(--primary-color);
  font-weight: 500;
}

.nav-link i:first-child {
  font-size: 18px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-text {
  transition: var(--transition);
  white-space: nowrap;
}

.sidebar.collapsed .nav-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.submenu-icon {
  margin-left: auto;
  font-size: 12px;
  transition: var(--transition);
}

.sidebar.collapsed .submenu-icon {
  display: none;
}

/* Submenu */
.has-submenu>.nav-link {
  cursor: pointer;
}

.submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  background: var(--bg-secondary);
  opacity: 0;
}

.has-submenu.active>.submenu {
  max-height: 500px;
  opacity: 1;
}

.has-submenu.active>.nav-link .submenu-icon {
  transform: rotate(180deg);
}

.submenu li {
  position: relative;
}

.submenu li a {
  display: flex;
  align-items: center;
  padding: 5px 20px 5px 55px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  gap: 10px;
  cursor: pointer;
}

.submenu li a:hover {
  background: var(--sidebar-hover);
  color: var(--primary-color);
  padding-left: 60px;
}

.submenu li a.active {
  background: var(--sidebar-hover);
  color: var(--primary-color);
  padding-left: 60px;
}

.submenu li a i:first-child {
  font-size: 6px;
}

/* Nested submenu (second level) */
.submenu .has-submenu>a .submenu-icon {
  margin-left: auto;
  font-size: 10px;
  transition: var(--transition);
}

.submenu .has-submenu.active>a .submenu-icon {
  transform: rotate(180deg);
}

.submenu-level-2 {
  background: var(--bg-primary);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  list-style: none;
}

.submenu .has-submenu.active>.submenu-level-2 {
  max-height: 300px;
  opacity: 1;
}

.submenu-level-2 li a {
  padding-left: 75px;
}

.submenu-level-2 li a:hover {
  padding-left: 80px;
}

.sidebar.collapsed .submenu {
  display: none;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: var(--sidebar-bg);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar i {
  font-size: 18px;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-name {
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .user-details {
  display: none;
}

.logout-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.logout-btn:hover {
  background: var(--sidebar-hover);
  color: var(--primary-hover);
}

.sidebar.collapsed .logout-btn {
  margin: 0 auto;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  margin-left: var(--sidebar-width);
  transition: var(--transition);
  min-height: 100vh;
}

.sidebar.collapsed~.main-content {
  margin-left: var(--sidebar-collapsed-width);
}

/* Top Header */
.top-header {
  height: var(--header-height);
  background: var(--bg-primary);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-primary);
  padding: 8px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-icons {
  display: flex;
  gap: 10px;
}

.icon-btn {
  position: relative;
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

.badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--primary-hover);
  color: var(--text-white);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.user-profile {
  position: relative;
}

.user-profile .profile-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  object-fit: cover;
  transition: var(--transition);
  border: 2px solid transparent;
}

.user-profile .profile-img:hover {
  border-color: var(--primary-color);
}

/* User Dropdown Menu */
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-primary);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  border: 1px solid var(--border-color);
  padding: 8px 0;
}

.user-profile.active .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 14px;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

.dropdown-item i {
  font-size: 16px;
  color: var(--text-secondary);
  width: 20px;
  text-align: center;
  transition: var(--transition);
}

.dropdown-item:hover i {
  color: var(--primary-color);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 0;
}

/* Content Wrapper */
.content-wrapper {
  padding: 30px;
}

/* Status Badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  text-transform: uppercase;
}

.status-badge.active {
  background-color: #e6f9ed;
  color: #198754;
  border: 1px solid #198754;
}

.status-badge.deactive {
  background-color: #fff2f2;
  color: #dc3545;
  border: 1px solid #dc3545;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media screen and (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar.collapsed~.main-content {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

}

@media screen and (max-width: 768px) {
  .top-header {
    padding: 0 15px;
  }

  .content-wrapper {
    padding: 15px;
  }

  .page-title {
    font-size: 20px;
  }
}

@media screen and (max-width: 480px) {
  .header-right {
    gap: 10px;
  }

}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}



/* content styles */

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-primary);
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-white);
}

.stat-icon.blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.green {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon.orange {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-icon.red {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.stat-info h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.stat-info p {
  color: var(--text-secondary);
  font-size: 14px;
}


/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.content-card {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow);
  /*overflow: hidden;*/
}

.card-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-sm:not(.cal-footer .btn-sm) {
  padding: 6px 15px;
  background: var(--primary-color);
  color: var(--text-white);
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-sm:hover {
  background: var(--primary-hover);
}

.card-body {
  padding: 25px;
  padding: 0 20px 20px 20px;
}

/* Card */
.card {
  margin-bottom: 30px;
  border: none;
  border-radius: 5px;
  box-shadow: 0px 0 30px rgba(1, 41, 112, 0.1);
}

.card-header,
.card-footer {
  border-color: #ebeef4;
  background-color: #fff;
  color: #798eb3;
  padding: 15px;
}

.card-title {
  padding: 20px 0 15px 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--primary-color);
  font-family: "Poppins", sans-serif;
}

.card-title span {
  color: var(--text-secondary) ;
  font-size: 14px;
  font-weight: 400;
}

.card-img-overlay {
  background-color: rgba(255, 255, 255, 0.6);
}

/* Action Buttons */
.action-btns {
    text-align: center;
    white-space: nowrap;
}

.edit-btn, .delete-btn {
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
    margin: 0 2px;
}

.edit-btn {
    background-color: #f0f7ff;
    color: var(--primary-color);
}

.edit-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.delete-btn {
    background-color: #fff5f5;
    color: #ff4d4d;
}

.delete-btn:hover {
    background-color: #ff4d4d;
    color: white;
}
