* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f5f6fb;
  --sidebar-bg: #fff;
  --primary: #6366f1;
  --primary-soft: #eef2ff;
  --text: #1f2933;
  --muted: #000000;
  --backgroundcol: #d1a5ee;
}

body {
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, 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: flex-start;
  justify-content: space-between;
  gap: 10px;
}

/* Brand vertical stack */
.brand-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-grow: 1;
}

.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 {
  background: none;
  border: none;
  font-size: 18px;
  display: none;
  cursor: pointer;
}

/* 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;
  transition: all 0.2s ease;
}

.menu-link i { font-size: 16px; }

.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-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
}

.submenu-link:hover,
.submenu-link.active { color: var(--primary); }

/* TOPBAR */
.topbar {
  height: 60px;
  background: var(--backgroundcol);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 0 20px;
}

.hamburger {
  display: none;
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.topbar-title {
  font-size: 14px;
  color: #6b7280;
  white-space: nowrap;
}

.topbar-title .current {
  color: #111827;
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.company-name {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

/* Avatar Enhanced Multi-Color Animation */
.avatar-wrapper { position: relative; }

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(3px);
  position: relative;
  overflow: hidden;
}

.avatar-circle.multi-pulse {
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.8);
  animation: multiPulse 2s infinite;
}

.avatar-circle.multi-pulse::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    rgba(99, 102, 241, 0.6),
    rgba(96, 165, 250, 0.6),
    rgba(248, 113, 113, 0.6),
    rgba(34, 197, 94, 0.6),
    rgba(251, 191, 36, 0.6),
    rgba(99, 102, 241, 0.6)
  );
  animation: rotateGlow 3s linear infinite;
  border-radius: 50%;
  z-index: -1;
}

@keyframes multiPulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.8); }
  70% { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

@keyframes rotateGlow {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.95); opacity: 0.9; }
  50% { opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(360deg) scale(1.05); opacity: 0.9; }
}

.avatar-circle.small {
  width: 28px;
  height: 28px;
  font-size: 13px;
  background: var(--primary);
  color: #fff;
}

.profile-popup {
  position: absolute;
  right: 0;
  top: 45px;
  width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  padding: 12px;
  display: none;
  z-index: 1001;
  animation: fadeIn 0.2s ease-out;
}

.profile-popup.open { display: block; }

.profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 10px;
}

.profile-info { font-size: 12px; }
.profile-name { font-weight: 600; color: #111827; margin: 0; }
.profile-email { color: #6b7280; margin: 0; }

.profile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-menu li a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.profile-menu li a:hover {
  background: #f3f4ff;
  color: var(--primary);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* MAIN CONTENT */
.main-wrapper {
  padding: 80px 20px 20px;
  min-height: calc(100vh - 60px);
  background: var(--bg);
}

@media (min-width: 769px) {
  .topbar { margin-left: 250px; width: calc(100% - 250px); }
  .main-wrapper { margin-left: 250px; }
}

.right-section {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.breadcrumb {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 15px;
}

.breadcrumb span {
  color: #374151;
  font-weight: 500;
}

/* CARD */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  margin-bottom: 16px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #111827;
}

/* TOP SECTION */
.website-logos {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.field-group {
  margin-bottom: 14px;
}

.field-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}

.file-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn.secondary {
  background: #4b5563;
}

.btn.full-width {
  width: 100%;
  text-align: center;
}

.btn:hover {
  opacity: 0.9;
}

.file-label {
  font-size: 12px;
  color: #6b7280;
}

.preview-box {
  margin-top: 8px;
  height: 70px;
  border-radius: 8px;
  border: 1px dashed #e5e7eb;
  background: #f9fafb;
}

.preview-box.small {
  height: 40px;
  width: 40px;
}

.website-data-top-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1.2fr;
  gap: 16px;
}

.input {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}

.input:focus {
  border-color: var(--primary);
}

/* BOTTOM SECTION */
.website-data-bottom-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.4fr;
  gap: 16px;
}

.column {
  display: flex;
  flex-direction: column;
}

.small-text {
  font-size: 12px;
  margin-bottom: 8px;
}

.muted {
  color: #6b7280;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.editor-toolbar button {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
  cursor: pointer;
}

.editor-toolbar button i {
  font-size: 11px;
}

.editor-area {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  font-size: 13px;
  resize: vertical;
  min-height: 160px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .website-logos { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .website-data-top-grid { grid-template-columns: 1fr 1fr; }
  .website-data-bottom-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar { left: -260px; }
  .sidebar.open { left: 0; }
  .hamburger { display: flex !important; }
  .close-btn { display: block; }
  .topbar { padding: 0 12px; }
  .main-wrapper { padding: 80px 15px 20px; margin-left: 0; }
  .website-logos,
  .website-data-top-grid,
  .website-data-bottom-grid { grid-template-columns: 1fr; }
  .brand-img-desktop { display: none; }
  .brand-img-mobile { display: block; height: 32px; }
}

@media (max-width: 480px) {
  .company-name { display: none; }
  .topbar { padding: 0 10px; }
  .topbar-title { font-size: 13px; }
  .main-wrapper { padding: 75px 10px 15px; }
  .profile-popup { right: 0; width: 180px; }
}
