/* ==========================================================================
   Partner Zone Shared Styles
   Used by: partner-zone.html, channel-partner-profile.html, channel-partner-dashboard.html
   ========================================================================== */

/* ---- Layout ---- */
.zone-wrap {
  visibility: hidden;
  opacity: 0;
  max-width: 1400px;
  margin: 24px auto;
  padding: 0 28px;
  pointer-events: none;
}
.zone-wrap.authenticated {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto;
}

/* ---- Page Header ---- */
.zone-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.zone-page-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}
.zone-page-header .subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ---- Tabs ---- */
.zone-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
}
.zone-tab {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.zone-tab:hover {
  color: var(--text);
}
.zone-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.zone-tab-content {
  display: none;
}
.zone-tab-content.active {
  display: block;
}

/* ---- Search Bar ---- */
.zone-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}
.zone-search-input {
  flex: 1;
  max-width: 400px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px 14px 10px 38px;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}
.zone-search-input:focus {
  border-color: var(--accent);
}
.zone-search-input::placeholder {
  color: var(--muted);
}
.zone-search-count {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---- Card Grid ---- */
.zone-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 18px;
}

/* ---- Partner / Disti Card ---- */
.zone-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.zone-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--text) 8%, transparent);
  transform: translateY(-2px);
}
.zone-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.zone-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.zone-card-name span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zone-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.zone-card-actions .zone-btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  font-size: 14px;
}
.zone-card-actions .zone-btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.zone-card-actions .zone-btn-icon-danger:hover {
  border-color: var(--bad, #b91c1c);
  color: var(--bad, #b91c1c);
  background: color-mix(in srgb, var(--bad, #b91c1c) 8%, transparent);
}
.zone-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.zone-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.zone-card-detail {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---- Card Sections (assets, GTM) ---- */
.zone-card-section {
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  padding-top: 10px;
  margin-top: auto;
}
.zone-card-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.zone-card-assets {
  display: flex;
  gap: 8px;
  overflow: hidden;
}
.zone-card-asset-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zone-card-asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.zone-card-asset-thumb .asset-placeholder {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
  padding: 2px;
}
.zone-card-gtm-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.zone-card-gtm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}
.zone-card-gtm-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.zone-card-gtm-status.published { background: var(--ok); }
.zone-card-gtm-status.draft { background: var(--warn); }
.zone-card-gtm-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zone-card-gtm-views {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

/* ---- Pagination ---- */
.zone-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 16px 0;
}
.zone-pagination button {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.zone-pagination button:hover:not(:disabled) {
  border-color: var(--accent);
}
.zone-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}
.zone-pagination button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.zone-pagination .page-info {
  font-size: 13px;
  color: var(--muted);
}

/* ---- Badges ---- */
.zone-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.zone-badge-role {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}
.zone-badge-role.owner {
  background: color-mix(in srgb, var(--ok) 15%, transparent);
  color: var(--ok);
}
.zone-badge-role.editor {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}
.zone-badge-role.generate {
  background: color-mix(in srgb, var(--warn) 15%, transparent);
  color: var(--warn);
}
.zone-badge-role.viewer {
  background: color-mix(in srgb, var(--muted) 15%, transparent);
  color: var(--muted);
}
.zone-badge-type {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.zone-badge-source {
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  color: var(--muted);
  font-weight: 500;
}
.zone-badge-count {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  font-size: 12px;
  padding: 2px 10px;
}

/* ---- Access Panel (below hero) ---- */
.pz-access-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.pz-access-badge {
  font-size: 12px;
  padding: 4px 12px;
  gap: 6px;
  border-radius: 8px;
}
.pz-access-admin {
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent);
}
.pz-access-disti {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.pz-access-disti.owner {
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
}
.pz-access-disti.editor {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.pz-access-role-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  margin-left: 2px;
}

/* ---- Empty State ---- */
.zone-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.zone-empty-icon {
  font-size: 36px;
  margin-bottom: 16px;
  opacity: 0.4;
  color: var(--muted);
}
.zone-empty h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.zone-empty p {
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto;
}

/* ---- Buttons ---- */
.zone-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.zone-btn:hover {
  border-color: var(--accent);
}
.zone-btn-primary {
  background: linear-gradient(135deg, var(--accent), #ffb86c);
  color: #fff;
  border: none;
}
.zone-btn-primary:hover {
  opacity: 0.9;
}
.zone-btn-danger {
  background: color-mix(in srgb, var(--bad) 10%, transparent);
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 30%, transparent);
}
.zone-btn-danger:hover {
  background: color-mix(in srgb, var(--bad) 20%, transparent);
}
.zone-btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

/* ---- Profile Page Sections ---- */
.zone-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.zone-section h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- ACL Table ---- */
.zone-acl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.zone-acl-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.zone-acl-table td {
  padding: 10px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  color: var(--text);
  vertical-align: middle;
}
.zone-acl-table tr:last-child td {
  border-bottom: none;
}
.zone-acl-table select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
}

/* ---- Access Grant Form ---- */
.zone-access-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.zone-access-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}
.zone-access-form input,
.zone-access-form select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.zone-access-form input:focus,
.zone-access-form select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---- Danger Zone ---- */
.zone-danger {
  background: color-mix(in srgb, var(--bad) 5%, var(--card));
  border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent);
  border-radius: 14px;
  padding: 24px;
  margin-top: 32px;
}
.zone-danger h2 {
  color: var(--bad);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px 0;
}
.zone-danger p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 16px 0;
}

/* ---- Confirm Dialog Overlay ---- */
.zone-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.zone-confirm-dialog {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  max-width: 440px;
  width: 90%;
}
.zone-confirm-dialog h3 {
  color: var(--bad);
  font-size: 18px;
  margin: 0 0 12px 0;
}
.zone-confirm-dialog p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px 0;
}
.zone-confirm-dialog input {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.zone-confirm-dialog input:focus {
  outline: none;
  border-color: var(--bad);
}
.zone-confirm-dialog .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ---- Canvas Link Card ---- */
.zone-canvas-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 10px;
}
.zone-canvas-link .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.zone-canvas-link .info .label {
  font-size: 13px;
  color: var(--muted);
}
.zone-canvas-link .info .version {
  font-size: 12px;
  color: var(--muted);
}

/* ---- Partner List in Disti Profile ---- */
.zone-partner-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.zone-partner-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.zone-partner-item:hover {
  border-color: var(--accent);
}
.zone-partner-item .name {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}
.zone-partner-item .meta {
  font-size: 12px;
  color: var(--muted);
}

/* ---- Toast Notification ---- */
.zone-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10001;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.zone-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.zone-toast.success {
  background: color-mix(in srgb, var(--ok) 15%, var(--card));
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
}
.zone-toast.error {
  background: color-mix(in srgb, var(--bad) 15%, var(--card));
  color: var(--bad);
  border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent);
}

/* ---- Loading Spinner ---- */
.zone-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}
.zone-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: zone-spin 0.8s linear infinite;
}
@keyframes zone-spin {
  to { transform: rotate(360deg); }
}
.zone-loading p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
}

/* ---- Back Link ---- */
.zone-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.zone-back:hover {
  color: var(--accent);
}

/* ---- Manage Access Modal (inline) ---- */
.zone-access-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.zone-access-dialog {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  max-width: 540px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
}
.zone-access-dialog h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px 0;
}
.zone-access-dialog .dialog-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.zone-access-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  gap: 10px;
}
.zone-access-user-row:last-child { border-bottom: none; }
.zone-access-user-email {
  font-size: 13px;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zone-access-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ==========================================================================
   Partner Zone Hub — Hero, Sections, Knowledge Base, Dashboard CTA
   ========================================================================== */

/* ---- Hero Section ---- */
.pz-hero {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 48px;
  padding: 40px 0 0;
}
.pz-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text);
}
.pz-hero .pz-hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.6;
}
.pz-hero .pz-hero-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
}

/* ---- Section Dividers ---- */
.pz-section {
  margin-bottom: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.pz-section-header {
  margin-bottom: 24px;
}
.pz-section-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.pz-section-header .pz-section-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* ---- GrowthCanvas Showcase (adapted from growthguru) ---- */
.pz-canvas-showcase {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin: 16px auto 24px;
  max-width: 1100px;
}
.pz-canvas-text-animator {
  flex: 0 0 42%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.pz-canvas-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0 14px;
  border-radius: 10px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateX(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease, padding 0.4s ease;
  cursor: default;
}
.pz-canvas-item.active {
  opacity: 1;
  max-height: 100px;
  padding: 10px 14px;
  overflow: visible;
  transform: translateX(0);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.pz-canvas-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.pz-canvas-icon svg {
  width: 18px;
  height: 18px;
}
.pz-canvas-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 3px;
}
.pz-canvas-description {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}
/* Dot indicators for canvas items */
.pz-canvas-dots {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-left: 12px;
}
.pz-canvas-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 30%, transparent);
  transition: background 0.3s, transform 0.3s;
}
.pz-canvas-dot.active {
  background: var(--accent);
  transform: scale(1.25);
}
.pz-canvas-image-container {
  flex: 1;
  min-width: 0;
}
.pz-canvas-image-container img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--text) 8%, transparent);
}

/* ---- Knowledge Base Content Cards ---- */
.pz-kb-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.pz-kb-filters .zone-search-input {
  min-width: 200px;
}
.pz-kb-filters select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}
.pz-kb-filters select:focus {
  outline: none;
  border-color: var(--accent);
}
.pz-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.pz-content-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
}
.pz-content-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--text) 8%, transparent);
  transform: translateY(-2px);
}
.pz-content-card .pz-content-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  margin-bottom: 10px;
  align-self: flex-start;
}
.pz-content-card .pz-content-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pz-content-card .pz-content-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.pz-content-card .pz-content-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.pz-content-card .pz-content-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pz-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
.pz-view-all:hover {
  opacity: 0.8;
}

/* ---- Dashboard CTA Card ---- */
.pz-dashboard-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  background: color-mix(in srgb, var(--accent) 6%, var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 14px;
  flex-wrap: wrap;
}
.pz-dashboard-cta-info h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.pz-dashboard-cta-info p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  max-width: 560px;
  line-height: 1.5;
}
.pz-dashboard-cta .zone-btn-primary {
  white-space: nowrap;
  font-size: 15px;
  padding: 12px 28px;
}

/* ==========================================================================
   CPD (Channel Partner Dashboard) — Shared Theme Bridge + Layout
   Used by all channel-partner-*.html pages
   ========================================================================== */

/* ---- Theme Variable Bridge ----
   Maps dashboard's short custom vars to theme-lightlavender tokens so all
   existing selectors using var(--bg), var(--card), var(--accent) etc. resolve
   correctly without rewriting any individual rules.
   ------------------------------------------------------------------ */
.theme-lightlavender {
  --bg:     var(--bg-color);           /* #ffffff */
  --card:   var(--grey-50);            /* #f8fafc */
  --text:   var(--text-color);         /* #111827 */
  --muted:  var(--grey-500);           /* #64748b */
  --accent: var(--primary-purple);     /* #7c3aed */
  --ok:     var(--accent-green);       /* #10b981 */
  --warn:   #f59e0b;
  --bad:    #ef4444;
  --line:   var(--border-color);       /* #e2e8f0 */
  /* Purple gradient replaces orange gradient for primary action buttons */
  --cpd-btn-gradient: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 100%);
}

/* Override orange-to-tan gradient buttons in the lightlavender theme */
.theme-lightlavender .btn-create,
.theme-lightlavender .btn-submit,
.theme-lightlavender .btn-view-canvas,
.theme-lightlavender .zone-btn-primary {
  background: var(--cpd-btn-gradient);
}
.theme-lightlavender .gtm-month {
  color: var(--primary-purple);
  background: rgba(124, 58, 237, 0.1);
}
.theme-lightlavender .pill {
  background: var(--cpd-btn-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.theme-lightlavender .kpi-value {
  color: var(--primary-purple);
}
.theme-lightlavender .revenue-legend-item.active,
.theme-lightlavender .partner-alpha-item.selected {
  background: color-mix(in srgb, var(--primary-purple) 12%, transparent);
  color: var(--primary-purple);
}

/* ---- CPD Layout: Persistent Side Nav + Main ---- */
.cpd-layout {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 72px); /* subtract top-banner height */
}

.cpd-sidenav {
  width: 220px;
  flex-shrink: 0;
  background: var(--grey-50, #f8fafc);
  border-right: 1px solid var(--line, #e2e8f0);
  padding: 20px 0;
  position: sticky;
  top: 72px; /* match top-banner height */
  height: calc(100vh - 72px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.cpd-sidenav-header {
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  margin-bottom: 8px;
}

.cpd-sidenav-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted, #64748b);
  margin-bottom: 8px;
}

.cpd-disti-select {
  width: 100%;
  background: var(--bg, #ffffff);
  color: var(--text, #111827);
  border: 1px solid var(--line, #e2e8f0);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-sizing: border-box;
}
.cpd-disti-select:focus {
  outline: none;
  border-color: var(--accent, #7c3aed);
}

.cpd-sidenav-nav {
  list-style: none;
  margin: 4px 0 0 0;
  padding: 0 8px;
  flex: 1;
}
.cpd-sidenav-nav li {
  margin-bottom: 2px;
}

.cpd-sidenav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted, #64748b);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.cpd-sidenav-item:hover {
  background: color-mix(in srgb, var(--accent, #7c3aed) 8%, transparent);
  color: var(--accent, #7c3aed);
}
.cpd-sidenav-item.active {
  background: color-mix(in srgb, var(--accent, #7c3aed) 12%, transparent);
  color: var(--accent, #7c3aed);
  font-weight: 600;
}
.cpd-sidenav-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.cpd-sidenav-item.active svg,
.cpd-sidenav-item:hover svg {
  opacity: 1;
}

.cpd-sidenav-footer {
  padding: 16px 16px 0;
  border-top: 1px solid var(--line, #e2e8f0);
  margin-top: auto;
}

/* ---- CPD Main Content ---- */
.cpd-main {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  padding: 28px 32px;
}

/* ---- CPD Page Header ---- */
.cpd-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  flex-wrap: wrap;
}
.cpd-page-header h1 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--text, #111827);
  margin: 0;
  letter-spacing: -0.01em;
}

/* ---- Shared Dashboard Card/Grid styles (used across all CPD pages) ---- */
.dashboard-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-bottom: 24px; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.card h2 { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--text); }
.card h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; }
.chart-placeholder { color: var(--muted); font-size: 14px; text-align: center; padding: 32px; }
.loading-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.7); display: flex; align-items: center; justify-content: center; z-index: 10; border-radius: 14px; }
.spinner { border: 3px solid rgba(124,58,237,0.2); border-top: 3px solid var(--accent, #7c3aed); border-radius: 50%; width: 40px; height: 40px; animation: cpd-spin 0.8s linear infinite; }
@keyframes cpd-spin { to { transform: rotate(360deg); } }

/* KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi-card { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px; text-align: center; }
.kpi-value { font-size: 32px; font-weight: 700; color: var(--accent); margin: 8px 0; }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kpi-sublabel { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* GTM Timeline */
.gtm-timeline { display: flex; flex-direction: column; gap: 12px; max-height: 600px; overflow-y: auto; padding-right: 8px; }
.gtm-activity { background: var(--bg); border-left: 4px solid var(--accent); border-radius: 8px; padding: 14px; transition: all 0.2s; }
.gtm-activity:hover { border-left-width: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.gtm-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.gtm-title { font-size: 14px; font-weight: 600; color: var(--text); }
.gtm-month { font-size: 12px; font-weight: 600; color: var(--accent); padding: 4px 10px; border-radius: 6px; }
.gtm-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.gtm-detail { font-size: 12px; }
.gtm-detail-label { color: var(--muted); margin-bottom: 2px; }
.gtm-detail-value { font-weight: 600; color: var(--text); }
.gtm-partner { font-size: 11px; color: var(--muted); margin-top: 8px; font-style: italic; }

/* Filters */
.filters { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-group label { font-size: 13px; color: var(--muted); }
.filter-group select, .filter-group input { background: var(--card); border: 1px solid var(--line); color: var(--text); padding: 6px 10px; border-radius: 8px; font-size: 13px; }

/* Revenue Chart */
.revenue-bars { display: flex; flex-direction: column; gap: 20px; padding: 20px 0; }
.revenue-chart-container { display: flex; flex-direction: column; gap: 12px; }
.revenue-legend { display: flex; gap: 20px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.revenue-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; cursor: pointer; padding: 6px 12px; border-radius: 6px; transition: all 0.2s; border: 2px solid transparent; }
.revenue-legend-item:hover { background: var(--bg); }
.revenue-legend-item.active { border-color: var(--accent); background: var(--bg); }
.revenue-legend-item.inactive { opacity: 0.4; }
.revenue-legend-color { width: 16px; height: 16px; border-radius: 4px; }
.revenue-legend-color.ai-business { background: linear-gradient(135deg,#3b82f6,#60a5fa); }
.revenue-legend-color.cloud-platforms { background: linear-gradient(135deg,#10b981,#34d399); }
.revenue-legend-color.security { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.revenue-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 20px; }
.revenue-table th { background: var(--bg); color: var(--muted); font-weight: 600; text-align: left; padding: 10px; border-bottom: 2px solid var(--line); text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px; }
.revenue-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.revenue-table tr:hover { background: var(--bg); }
.revenue-table .period-col { font-weight: 600; color: var(--text); }
.revenue-table .ai-col { color: #3b82f6; } .revenue-table .cloud-col { color: #10b981; }
.revenue-table .security-col { color: #f59e0b; } .revenue-table .total-col { font-weight: 700; color: var(--accent); }
.revenue-chart-bars { display: flex; gap: 16px; align-items: flex-end; height: 320px; padding: 24px 10px 10px; background: var(--bg); border-radius: 8px; overflow-x: auto; }
.revenue-period-group { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 90px; flex: 1; height: 100%; border-right: 1px solid var(--line); padding: 0 8px; }
.revenue-period-group:last-child { border-right: none; }
.revenue-bars-group { display: flex; gap: 4px; align-items: flex-end; flex: 1; width: 100%; }
.revenue-bar-column { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1; min-width: 20px; position: relative; height: 100%; }
.revenue-bar-fill-vertical { width: 100%; border-radius: 4px 4px 0 0; transition: height 0.5s ease; position: relative; min-height: 4px; }
.revenue-bar-fill-vertical.ai-business { background: linear-gradient(180deg,#60a5fa,#3b82f6); }
.revenue-bar-fill-vertical.cloud-platforms { background: linear-gradient(180deg,#34d399,#10b981); }
.revenue-bar-fill-vertical.security { background: linear-gradient(180deg,#fbbf24,#f59e0b); }
.revenue-bar-value { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 600; color: var(--text); white-space: nowrap; }
.revenue-period-label { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; word-wrap: break-word; max-width: 90px; }

/* Designations */
.designation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.designation-item { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; transition: all 0.2s; }
.designation-item:hover { border-color: var(--accent); }
.designation-name { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.designation-count { font-size: 24px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.designation-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* Partner Performance List */
.partner-list { display: flex; flex-direction: column; gap: 10px; max-height: 500px; overflow-y: auto; padding-right: 8px; }
.partner-item { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s; cursor: pointer; }
.partner-item:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.partner-name { font-size: 14px; font-weight: 600; color: var(--text); }
.partner-stats { display: flex; gap: 16px; font-size: 12px; }
.partner-stat { color: var(--muted); }
.partner-stat strong { color: var(--text); font-weight: 600; }

/* ---- Responsive — Zone pages ---- */
@media (max-width: 900px) {
  .zone-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  .pz-canvas-showcase {
    flex-direction: column;
    gap: 16px;
  }
  .pz-canvas-text-animator {
    flex: none;
    width: 100%;
  }
  .pz-content-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}
@media (max-width: 768px) {
  .zone-wrap {
    padding: 0 12px;
  }
  .zone-card-grid {
    grid-template-columns: 1fr;
  }
  .zone-page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .zone-access-form {
    flex-direction: column;
  }
  .zone-tabs {
    overflow-x: auto;
  }
  .zone-search-input {
    max-width: 100%;
  }
  .pz-content-grid {
    grid-template-columns: 1fr;
  }
  .pz-dashboard-cta {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
  .pz-dashboard-cta-info p {
    max-width: none;
  }
  .pz-hero {
    padding: 24px 0 0;
  }
}

/* ---- Responsive — CPD Side Nav ---- */
@media (max-width: 900px) {
  .cpd-layout {
    flex-direction: column;
  }
  .cpd-sidenav {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px;
    gap: 4px;
    border-right: none;
    border-bottom: 1px solid var(--line, #e2e8f0);
  }
  .cpd-sidenav-header {
    width: 100%;
    padding: 0 8px 10px;
    border-bottom: none;
    margin-bottom: 4px;
  }
  .cpd-sidenav-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    width: 100%;
  }
  .cpd-sidenav-nav li {
    margin-bottom: 0;
  }
  .cpd-sidenav-item {
    padding: 7px 12px;
    font-size: 13px;
  }
  .cpd-sidenav-footer {
    display: none;
  }
  .cpd-main {
    padding: 16px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .col-12, .col-8, .col-6, .col-4, .col-3 {
    grid-column: span 1;
  }
}
