/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f5f6fb;
  --sidebar-bg: #fff;
  --primary: #6366f1;
  --primary-soft: #eef2ff;
  --text: #1f2937;
  --muted: #000000;
  --backgroundcol: #d1a5ee;
}

body {
  font-family: Poppins, sans-serif;
  background: var(--bg);
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: 250px;
  height: 100vh;
  background: var(--backgroundcol);
  position: fixed;
  left: 0;
  top: 0;
  padding: 16px;
  border-right: 1px solid #e5e7eb;
  transition: left 0.3s ease;
  z-index: 1000;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* brand vertical stack */
.brand-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.brand-img {
  display: block;
  height: 40px;
  width: auto;
}

.brand-img-desktop {
  display: block;
}

.brand-img-mobile {
  display: none;
}

.brand h2 {
  font-size: 18px;
  color: var(--text);
}

.close-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  display: none;
}

/* MENU */
.menu {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.menu-link i {
  font-size: 14px;
}

.menu-link:hover,
.menu-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.menu-group .submenu {
  display: none;
  flex-direction: column;
  padding-left: 30px;
  gap: 4px;
  margin-top: 4px;
}

.menu-group.open .submenu {
  display: flex;
}

.submenu a {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.submenu a:hover {
  background: #f3f4ff;
  color: var(--primary);
}

/* ============ TOPBAR ============ */
.topbar {
  height: 60px;
  background: var(--backgroundcol);
  margin-left: 250px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 900;
  width: calc(100% - 250px);
  box-sizing: border-box;
}

.hamburger {
  display: none;
  font-size: 20px;
  background: none;
  border: none;
}

.topbar-title {
  font-size: 14px;
  color: #6b7280;
}

.topbar-title .current {
  color: #111827;
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.company-name {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

.avatar-wrapper {
  position: relative;
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.avatar-circle.multi-pulse::before,
.avatar-circle.multi-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  opacity: 0;
}

.avatar-circle.multi-pulse::before {
  border-color: rgba(23, 59, 104, 0.8); /* blue */
  animation: ringPulse1 1.8s ease-out infinite;
}

.avatar-circle.multi-pulse::after {
  border-color: rgba(94, 15, 56, 0.8); /* pink */
  animation: ringPulse2 2s ease-out infinite;
}

@keyframes ringPulse1 {
  0%   { transform: scale(0.9); opacity: 0.8; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes ringPulse2 {
  0%   { transform: scale(0.9); opacity: 0.6; }
  60%  { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

.avatar-circle.small {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.profile-popup {
  position: absolute;
  right: 0;
  top: 40px;
  width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
  padding: 12px;
  display: none;
  animation: fadeIn 0.18s ease-out;
  z-index: 1001;
}

.profile-popup.open {
  display: block;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.profile-info {
  font-size: 12px;
}

.profile-name {
  font-weight: 600;
  color: #111827;
}

.profile-email {
  color: #6b7280;
}

.profile-menu {
  list-style: none;
  margin-top: 8px;
}

.profile-menu li a {
  display: block;
  padding: 6px 4px;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
}

.profile-menu li a:hover {
  background: #f3f4ff;
  color: var(--primary);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ CONTENT WRAPPER ============ */
.content-wrapper {
  margin-left: 250px;
  padding: 16px 20px 24px;
  background: var(--bg);
  min-height: calc(100vh - 60px);
  box-sizing: border-box;
}

.pp-page {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* FILTER BAR */
.pp-filter-card {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.pp-filter-left label {
  font-size: 13px;
  color: #374151;
}

.pp-filter-left select {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  margin: 0 4px;
  font-size: 13px;
}

.pp-filter-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pp-date-group,
.pp-search-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pp-date-group label,
.pp-search-group label {
  font-size: 12px;
  color: #6b7280;
}

.pp-date-group input,
.pp-search-group input {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  font-size: 13px;
  min-width: 140px;
}

/* TABLE */
.pp-table-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  padding: 18px 18px 14px;
}

.pp-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.pp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pp-table thead {
  background: #f9fafb;
}

.pp-table th,
.pp-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.pp-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
}

.pp-table td {
  color: #374151;
}

.user-block p,
.order-block p {
  font-size: 13px;
  line-height: 1.4;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .pp-filter-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .pp-filter-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .sidebar {
    left: -260px;
  }

  .sidebar.open {
    left: 0;
  }

  .hamburger {
    display: block;
  }

  .close-btn {
    display: block;
  }

  .topbar {
    margin-left: 0;
    width: 100%;
    padding: 0 12px;
  }

  .content-wrapper {
    margin-left: 0;
    padding: 12px 12px 18px;
  }

  .pp-filter-card {
    padding: 10px;
  }

  .pp-filter-right {
    flex-direction: column;
    align-items: stretch;
  }

  .pp-date-group input,
  .pp-search-group input {
    width: 100%;
  }

  .profile-popup {
    right: -20px;
  }

  /* mobile logo switch */
  .brand-img-desktop {
    display: none;
  }

  .brand-img-mobile {
    display: block;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .pp-table th,
  .pp-table td {
    padding: 8px 8px;
  }

  .company-name {
    display: none;
  }
}
