/* Matrack Reseller Commission Portal - Layout Styles */

/* App Wrapper */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--color-gray-100);
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--color-navy);
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 1000;
}

/* Sidebar Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-teal), var(--color-teal-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.sidebar-brand .brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand .brand-name {
  color: white;
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-heading);
  line-height: 1;
}

.sidebar-brand .brand-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  margin-top: 2px;
}

/* Navigation Sections */
.nav-section {
  padding: 16px 0;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 20px;
  margin-bottom: 4px;
}

/* Navigation Links */
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--color-teal);
}

.nav-link.active {
  color: white;
  background: rgba(0, 166, 147, 0.1);
  border-left-color: var(--color-teal);
  font-weight: 500;
}

.nav-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* Main Content */
.main-content {
  margin-left: 260px;
  padding: 24px;
  flex-grow: 1;
  width: calc(100% - 260px);
}

/* App Header */
.app-header {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-gray-200);
}

.page-title {
  font-size: 24px;
  color: var(--color-navy);
  margin: 0;
  font-family: var(--font-heading);
}

.breadcrumb {
  font-size: 13px;
  color: var(--color-gray-600);
  margin-top: 4px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.badge-role {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 166, 147, 0.1), rgba(0, 166, 147, 0.05));
  color: var(--color-teal);
  border: 1px solid rgba(0, 166, 147, 0.2);
}

/* Logout Button - Professional styling */
.header-actions button,
.header-actions form button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  color: var(--color-gray-700);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-actions button:hover,
.header-actions form button:hover {
  background: var(--color-gray-50, #fafafa);
  border-color: var(--color-gray-400);
  color: var(--color-gray-800);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.header-actions button i,
.header-actions form button i {
  font-size: 14px;
  color: var(--color-gray-500);
}

.header-actions button:hover i,
.header-actions form button:hover i {
  color: #dc2626;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1100;
  width: 40px;
  height: 40px;
  background: white;
  border: none;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.mobile-toggle i {
  font-size: 20px;
  color: var(--color-navy);
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.sidebar-overlay.show {
  display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 16px;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .app-header {
    padding: 12px 16px;
    margin-top: 60px;
  }

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

  .header-actions {
    gap: 8px;
  }

  .badge-role {
    font-size: 11px;
    padding: 4px 8px;
  }

  #logoutBtn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
  .sidebar {
    width: 220px;
  }

  .main-content {
    margin-left: 220px;
    width: calc(100% - 220px);
  }
}
