/* ============================= RESET & BASE STYLES ============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: #333;
}

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

/* ============================= HEADER & NAVIGATION ============================= */
.navbar-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  height: 70px;
}

.navbar-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 20px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 24px;
  font-weight: bold;
}

.navbar-brand img {
  width: 50px;
  height: 50px;
  border-radius: 5px;
  border: 2px solid white;
}

.navbar-brand h1 {
  font-size: 20px;
  margin: 0;
}

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

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

.user-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.user-name {
  font-size: 14px;
  opacity: 0.9;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: all 0.3s;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.sidebar-toggle-desktop {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s;
  display: none;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle-desktop:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

@media (max-width: 768px) {
  .sidebar-toggle {
    display: flex;
  }
}

@media (min-width: 769px) {
  .sidebar-toggle-desktop {
    display: flex;
  }
}

/* ============================= SIDEBAR OVERLAY (Mobile Only) ============================= */
.sidebar-overlay {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100vh - 70px);
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (min-width: 769px) {
  .sidebar-overlay {
    display: none !important;
  }
}

/* ============================= SIDEBAR NAVIGATION ============================= */
.sidebar {
  position: fixed;
  left: 0;
  top: 70px;
  width: 280px;
  height: calc(100vh - 70px);
  background: white;
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 999;
  transition: width 0.3s ease, transform 0.3s ease;
  transform: translateX(0);
}

/* Desktop: Sidebar minimize mode */
.sidebar.minimized {
  width: 80px;
}

.sidebar.minimized .nav-link span:not(.nav-icon),
.sidebar.minimized .nav-arrow {
  display: none;
}

.sidebar.minimized .nav-link {
  justify-content: center;
  padding: 14px 0;
}

.sidebar.minimized .nav-icon {
  width: auto;
}

.sidebar.minimized .nav-submenu {
  display: none !important;
}

/* Mobile: Sidebar hidden mode */
@media (max-width: 768px) {
  .sidebar {
    width: 280px;
    transform: translateX(-280px);
  }

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

  .sidebar.minimized {
    width: 280px;
    transform: translateX(-280px);
  }

  .sidebar.minimized.active {
    transform: translateX(0);
  }
}

@media (min-width: 769px) {
  .sidebar {
    transform: translateX(0) !important;
  }

  .sidebar.minimized {
    transform: translateX(0) !important;
  }
}

.nav-menu {
  list-style: none;
  padding: 20px 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.nav-link:hover {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding-left: 25px;
}

.nav-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-link.active {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-left: 4px solid #667eea;
}

.nav-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.nav-link.has-submenu .nav-arrow {
  transform: rotate(-90deg);
}

.nav-link.has-submenu.open .nav-arrow {
  transform: rotate(0deg);
}

.nav-submenu {
  display: none;
  list-style: none;
  background: #f5f7fa;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}


.nav-submenu.show {
  display: block;
  max-height: 500px;
}

.nav-submenu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 50px;
  color: #666;
  font-size: 13px;
  transition: all 0.3s;
}

.nav-submenu li a:hover {
  background: #e8ecf1;
  color: #667eea;
  padding-left: 55px;
}

/* ============================= MAIN CONTENT ============================= */
.main-content {
  margin-left: 280px;
  margin-top: 70px;
  padding: 30px;
  min-height: calc(100vh - 70px);
  transition: margin-left 0.3s ease;
}

.main-content.sidebar-minimized {
  margin-left: 80px;
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
  }

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

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

/* ============================= ANNOUNCEMENT BAR ============================= */
.announcement-bar {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  font-size: 13px;
}

.announcement-bar.hidden {
  display: none;
}

.announcement-bar i {
  min-width: 20px;
  flex-shrink: 0;
}

.announcement-marquee {
  animation: scroll 30s linear infinite;
  white-space: nowrap;
}

@keyframes scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ============================= PROFILE CARD ============================= */
.profile-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-bottom: 30px;
  overflow: hidden;
}

.profile-grid-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}

.profile-header {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 25px;
  align-items: start;
  margin-bottom: 20px;
  padding-bottom: 0;
  border-bottom: none;
}

.profile-avatar {
  width: 120px;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  border: 3px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 48px;
  font-weight: bold;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 5px;
}

.profile-info p {
  color: #666;
  font-size: 14px;
  margin: 5px 0;
}

.profile-badge {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  margin-top: 10px;
  font-weight: 600;
}

.profile-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.profile-card {
  background: #f5f7fa;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.profile-card-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-card-value {
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

/* ============================= LEAVE SUMMARY ============================= */
.leave-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0;
}

.leave-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.leave-number {
  font-size: 24px;
  font-weight: bold;
  min-width: 60px;
  text-align: center;
}

.leave-label {
  font-size: 12px;
  opacity: 0.9;
  flex: 1;
  text-align: left;
  margin-left: 15px;
}

/* ============================= NOTIFICATION CARDS ============================= */
.notification-section {
  margin-bottom: 30px;
}

.notification-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
}

.notification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.notification-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  cursor: pointer;
  text-align: center;
  border-top: 4px solid #667eea;
}

.notification-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.notification-card a {
  color: inherit;
}

.notification-card p {
  color: #666;
  font-size: 12px;
  margin-bottom: 10px;
}

.notification-number {
  font-size: 36px;
  font-weight: bold;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 10px 0;
}

.notification-title {
  font-size: 13px;
  color: #333;
  font-weight: 600;
}

/* ============================= ADMIN SECTION ============================= */
.admin-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #e0e0e0;
}

.admin-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #c33;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.admin-card {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.admin-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.admin-card a {
  color: white;
  text-decoration: none;
}

.admin-card h4 {
  font-size: 14px;
  margin: 10px 0;
  font-weight: 600;
}

/* ============================= FOOTER ============================= */
.footer {
  background: white;
  border-top: 1px solid #e0e0e0;
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-top: 30px;
}

.footer p {
  margin: 5px 0;
}

/* ============================= LMS SPECIFIC STYLES ============================= */
.lms-container {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lms-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  text-align: center;
}

.lms-header h1 {
  font-size: 24px;
  margin: 0 0 10px 0;
}

.lms-status {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 4px solid;
  font-weight: 500;
  text-align: center;
}

.search-section {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================= RESPONSIVE ============================= */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: flex;
  }

  .sidebar-toggle-desktop {
    display: none !important;
  }

  .sidebar {
    width: 100%;
    transform: translateX(-100%);
  }

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

  .main-content {
    margin-left: 0;
    padding: 20px;
  }

  .navbar-header {
    height: 60px;
  }

  .navbar-brand h1 {
    font-size: 16px;
  }

  .profile-header {
    grid-template-columns: 1fr;
  }

  .profile-grid-wrapper {
    grid-template-columns: 1fr;
  }

  .leave-summary {
    grid-template-columns: 1fr;
  }

  .notification-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lms-container {
    padding: 15px;
  }

  .lms-header {
    padding: 15px;
  }

  .lms-header h1 {
    font-size: 18px;
  }

  .search-section {
    flex-direction: column;
  }

  .search-input {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .navbar-header-content {
    padding: 0 10px;
  }

  .navbar-brand {
    gap: 8px;
  }

  .navbar-brand img {
    width: 35px;
    height: 35px;
  }

  .navbar-brand h1 {
    display: none;
  }

  .navbar-right {
    gap: 10px;
  }

  .user-name {
    display: none;
  }

  .main-content {
    padding: 15px;
  }

  .profile-section {
    padding: 15px;
  }

  .notification-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .lms-container {
    padding: 12px;
  }
}

@media print {
  .navbar-header{
    display: none;
  }
  .sidebar-overlay{
    display: none;
  }
  .navbar-right{
    display: none;
  }
  .sidebar{
    display: none;
  }
  
}