/* Practo-Style Sidebar */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden
}

.sidebar {
  width: 220px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  transition: all .3s ease;
  z-index: 100;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15)
}

.sidebar.collapsed {
  width: 70px
}

.sidebar-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .15)
}

.sidebar-header img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2)
}

.sidebar-header h2,
.sidebar-header h3 {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0.5px
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .sidebar-header h3,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-footer span {
  display: none
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s;
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 2px;
  position: relative
}

.nav-item:hover {
  background: rgba(255, 255, 255, .1);
  color: #ffffff
}

.nav-item.active {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, .4)
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0
}

.nav-label {
  white-space: nowrap;
  overflow: hidden
}

.nav-badge {
  position: absolute;
  right: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4)
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: #cbd5e1;
  font-weight: bold;
  font-size: 11px;
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  transition: all .2s;
}

.logout-btn:hover {
  color: #ffffff;
  background: rgba(239, 68, 68, .8);
  box-shadow: 0 4px 12px rgba(239, 68, 68, .3)
}

.support-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity .2s;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  border-radius: 6px;
  width: 100%
}

.support-link:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1)
}

.support-link img {
  height: 28px;
  margin-bottom: 4px;
  object-fit: contain
}

.support-link .support-text {
  font-size: 9px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  font-weight: 600
}

.support-link .support-number {
  font-size: 10px;
  color: #ffffff;
  font-weight: 800;
  margin-top: 2px
}

.sidebar.collapsed .support-link .support-text,
.sidebar.collapsed .support-link .support-number,
.sidebar.collapsed .logout-btn span {
  display: none;
}

.sidebar-toggle {
  position: absolute;
  right: -12px;
  top: 20px;
  width: 24px;
  height: 24px;
  background: #0d9488;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid #fff;
  font-size: 10px;
  color: #fff;
  z-index: 71;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  transition: transform 0.2s
}

.sidebar-toggle:hover {
  transform: scale(1.1)
}

.content-area {
  flex: 1;
  margin-left: 220px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: margin-left .3s ease;
  background-color: #f8fafc
}

.sidebar.collapsed~.content-area,
.content-area.expanded {
  margin-left: 70px
}

.content-area>.content-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden
}

.nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, .15);
  margin: 8px 12px
}

.nav-section-label {
  font-size: 9px;
  font-weight: 800;
  color: #329c93;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 8px 12px 4px;
  white-space: nowrap;
  overflow: hidden
}

/* Module pages */
.module-page {
  display: none;
  padding: 16px 20px
}

.module-page.active {
  display: block
}

/* Invoice print styles */
@media print {

  .sidebar,
  .no-print {
    display: none !important
  }

  .content-area {
    margin-left: 0 !important
  }

  .module-page {
    padding: 0 !important
  }
}

/* Responsive */
@media(max-width:1024px) {
  .sidebar {
    width: 70px
  }

  .sidebar .nav-label,
  .sidebar-header h2,
  .sidebar-header h3,
  .sidebar-footer span,
  .nav-section-label,
  .support-link .support-text,
  .support-link .support-number {
    display: none
  }

  .content-area {
    margin-left: 70px
  }

  .sidebar-toggle {
    display: none
  }
}

@media(max-width:768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 250px;
    z-index: 100;
  }

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

  .sidebar .nav-label,
  .sidebar-header h2,
  .sidebar-header h3,
  .sidebar-footer span,
  .nav-section-label,
  .support-link .support-text,
  .support-link .support-number {
    display: block
  }

  .content-area {
    margin-left: 0 !important;
  }

  .sidebar-toggle {
    display: none
  }
}