.portal-page {
  margin: 0;
  background: #f6f7f9;
  color: #1f2937;
}

.gg-topbar {
  min-height: 116px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 104px;
  background: #fff;
  color: #111827;
  border-bottom: 1px solid #dbe2ea;
}

.gg-brand {
  display: inline-flex;
  align-items: center;
  color: #111827;
  text-decoration: none;
}

.gg-brand img {
  width: 170px;
  max-height: 92px;
}

.gg-topbar nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  flex: 1;
}

.gg-topbar nav a {
  color: #334155;
  text-decoration: none;
  font-size: 15px;
}

.gg-settings-link {
  font-size: 20px;
}

.gg-logout-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid #dbe2ea;
  border-radius: 6px;
  background: #fff;
}

.gg-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px;
}

.gg-main-wide {
  max-width: 1280px;
  padding: 32px 0;
}

.gg-main-wide .ggcrm-dashboard {
  min-height: 836px;
}

.ggcrm-dashboard .ggcrm-content-body {
  padding: 32px;
}

.ggcrm-dashboard .ggcrm-stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ggcrm-dashboard .ggcrm-chart-section {
  margin-top: 0;
}

.ggcrm-dashboard .ggcrm-chart-container {
  min-height: 300px;
}

.ggcrm-dashboard .ggcrm-chart-bars {
  align-items: end;
}

.ggcrm-dashboard .ggcrm-chart-bar-item:nth-child(1) .ggcrm-chart-bar {
  background: #3b82f6 !important;
}

.ggcrm-dashboard .ggcrm-chart-bar-item:nth-child(2) .ggcrm-chart-bar {
  background: #eab308 !important;
}

.ggcrm-dashboard .ggcrm-chart-bar-item:nth-child(3) .ggcrm-chart-bar {
  background: #f59e0b !important;
}

.ggcrm-dashboard .ggcrm-chart-bar-item:nth-child(4) .ggcrm-chart-bar {
  background: #f97316 !important;
}

.ggcrm-dashboard .ggcrm-chart-bar-item:nth-child(5) .ggcrm-chart-bar {
  background: #a855f7 !important;
}

.ggcrm-dashboard .ggcrm-chart-bar-item:nth-child(6) .ggcrm-chart-bar {
  background: #6366f1 !important;
}

.ggcrm-dashboard .ggcrm-chart-bar-item:nth-child(7) .ggcrm-chart-bar {
  background: #22c55e !important;
}

.ggcrm-dashboard .gg-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
}

.ggcrm-dashboard .ggcrm-kanban-header strong {
  font-size: 0.875rem;
  color: #334155;
}

.ggcrm-dashboard .ggcrm-kanban-header span {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #fff;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #e2e8f0;
}

.ggcrm-dashboard .ggcrm-stage-select {
  min-width: 150px;
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.ggcrm-inline-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
}

.ggcrm-action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ggcrm-btn-danger {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.ggcrm-btn-danger:hover {
  background-color: #fecaca;
}

.ggcrm-card-link {
  margin-top: 10px;
  padding: 0;
  border: none;
  background: transparent;
  color: #d97706;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ggcrm-notes-panel {
  padding: 20px;
  display: grid;
  gap: 16px;
  min-height: 420px;
}

.ggcrm-note-delete {
  float: right;
  border: none;
  background: transparent;
  color: #991b1b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ggcrm-add-note {
  display: grid;
  gap: 10px;
}

#ggcrm-import-form input[type="file"] {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}

.gg-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.gg-agent-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.gg-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffba43;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}

.gg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.gg-module {
  display: grid;
  gap: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  color: #1f2937;
  text-decoration: none;
}

.gg-module i {
  color: #c89116;
  font-size: 22px;
}

.gg-module span {
  color: #6b7280;
  font-size: 14px;
}

.gg-crm-shell {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 248px 1fr;
  background: #f6f7fb;
}

.gg-crm-side {
  background: #111827;
  color: #e5e7eb;
  padding: 24px 18px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.gg-crm-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #ffba43;
  color: #111827;
  font-weight: 800;
  margin-bottom: 16px;
}

.gg-crm-side a {
  color: #d1d5db;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.gg-crm-side a.active,
.gg-crm-side a:hover {
  background: rgba(255, 186, 67, 0.16);
  color: #fff;
}

.gg-crm-main {
  padding: 28px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.gg-crm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.gg-kicker {
  margin: 0 0 4px;
  color: #c89116;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}

.gg-crm-head h1 {
  margin: 0;
  font-size: 28px;
  color: #111827;
}

.gg-crm-head p {
  margin: 6px 0 0;
  color: #6b7280;
}

.gg-agent-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

.gg-agent-mini span {
  display: block;
  color: #6b7280;
  font-size: 13px;
}

.gg-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gg-stats > div {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px;
}

.gg-stats span,
.gg-stats em {
  display: block;
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

.gg-stats strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 30px;
  color: #111827;
}

.gg-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.gg-pipeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.gg-stage {
  min-height: 92px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  padding: 14px;
}

.gg-stage span {
  display: block;
  color: #6b7280;
  font-size: 12px;
}

.gg-stage strong {
  display: block;
  margin-top: 12px;
  font-size: 26px;
}

.gg-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.gg-section-title h2 {
  margin: 0;
}

.gg-section-title span {
  color: #6b7280;
  font-size: 13px;
}

.gg-table-wrap {
  overflow-x: auto;
}

.gg-leads {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.gg-leads th,
.gg-leads td {
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 10px;
  vertical-align: middle;
}

.gg-leads th {
  color: #6b7280;
  font-weight: 700;
  background: #f9fafb;
}

.gg-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fff4d8;
  color: #8a5b00;
  font-weight: 700;
  font-size: 12px;
}

@media (max-width: 760px) {
  .gg-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .gg-topbar nav {
    flex-wrap: wrap;
  }

  .gg-crm-shell {
    grid-template-columns: 1fr;
  }

  .gg-crm-side {
    display: none;
  }

  .gg-crm-main {
    padding: 18px;
  }

  .gg-crm-head,
  .gg-agent-mini {
    align-items: flex-start;
    flex-direction: column;
  }

  .gg-stats,
  .gg-pipeline {
    grid-template-columns: 1fr;
  }
}
