/* ===== HEADER ===== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 44px;
  background: #111827;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.app-header .logo {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-right: 20px;
  white-space: nowrap;
  opacity: 0.9;
}

/* ===== NAVIGATION ===== */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #9ca3af;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-tab.active {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ===== DROPDOWN ===== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #1f2937;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  min-width: 200px;
  overflow: hidden;
  z-index: 200;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: block;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #d1d5db;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-dropdown-item.active {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

.nav-dropdown-item + .nav-dropdown-item {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== HEADER RIGHT ===== */
.header-right {
  margin-left: auto;
}

.btn-logout {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-admin {
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* ===== PAGE LAYOUT ===== */
.container {
  max-width: 98%;
  margin: 8px auto;
  padding: 0 10px;
}

.header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

h1 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.actions {
  display: flex;
  gap: 15px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== FILTER SECTION ===== */
.filter-section {
  background: white;
  padding: 4px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-section label {
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */
@media (max-width: 1024px) {
  .header-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 0 12px;
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 5px;
  }

  .container {
    margin: 20px auto;
    padding: 0 10px;
  }

  .actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-full-sync {
    width: 100%;
  }

  .filter-section {
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-divider {
    display: none;
  }
}
