/* ===== PARTNER ZONE — Shared Layout Styles ===== */

.pz-layout {
  display: flex;
  min-height: 100vh;
  background: var(--color-bg);
}

/* Sidebar */
.pz-sidebar {
  width: 280px;
  background: linear-gradient(180deg, #0B3D91 0%, #092E6E 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}
.pz-sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pz-sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; margin-bottom: 16px;
}
.pz-sidebar-logo svg { width: 32px; height: 38px; }
.pz-sidebar-logo-text { display: flex; flex-direction: column; }
.pz-sidebar-logo-name {
  font-family: var(--font-display); font-size: 0.95rem;
  font-weight: 800; color: #fff;
}
.pz-sidebar-logo-sub {
  font-size: 0.65rem; color: rgba(255,255,255,0.4); font-style: italic;
}
.pz-zone-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(232,98,42,0.15); border: 1px solid rgba(232,98,42,0.3);
  color: var(--sky-orange);
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 5px 12px; border-radius: 100px;
}

.pz-sidebar-nav { flex: 1; padding: 16px 0; }
.pz-nav-section { margin-bottom: 8px; }
.pz-nav-section-title {
  font-family: var(--font-display); font-size: 9px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.3); padding: 8px 20px;
}
.pz-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 400;
  color: rgba(255,255,255,0.65); text-decoration: none;
  transition: all 150ms ease; border-left: 3px solid transparent;
}
.pz-nav-item:hover {
  background: rgba(255,255,255,0.05); color: #fff;
}
.pz-nav-item.active {
  background: rgba(255,255,255,0.08); color: #fff;
  border-left-color: var(--sky-orange); font-weight: 500;
}
.pz-nav-icon { width: 20px; text-align: center; font-size: 14px; opacity: 0.7; }
.pz-nav-item.active .pz-nav-icon { opacity: 1; }
.pz-nav-badge {
  margin-left: auto; background: var(--sky-orange); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 10px;
}

.pz-sidebar-footer {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08);
}
.pz-user { display: flex; align-items: center; gap: 10px; }
.pz-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff; font-weight: 600;
}
.pz-user-info { flex: 1; }
.pz-user-name {
  font-family: var(--font-display); font-size: 12px; font-weight: 600; color: #fff;
}
.pz-user-role { font-size: 10px; color: rgba(255,255,255,0.4); }
.pz-logout {
  color: rgba(255,255,255,0.4); font-size: 12px;
  text-decoration: none; transition: color 150ms;
}
.pz-logout:hover { color: var(--sky-orange); }

/* Main content */
.pz-main {
  flex: 1; margin-left: 280px; padding: 32px;
}
.pz-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.pz-topbar h1 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 800; color: var(--color-text);
}
.pz-topbar-actions { display: flex; gap: 12px; }
.pz-btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: var(--text-xs);
  color: var(--color-text-muted); text-decoration: none; transition: all 150ms;
}
.pz-btn-back:hover { border-color: var(--sky-blue); color: var(--sky-blue); }

/* Welcome card */
.pz-welcome {
  background: linear-gradient(135deg, #0B3D91 0%, #1B5EA8 100%);
  border-radius: var(--radius-xl); padding: 32px 36px;
  color: #fff; margin-bottom: 32px;
  position: relative; overflow: hidden;
}
.pz-welcome::after {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(232,98,42,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.pz-welcome h2 {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700;
  margin-bottom: 8px; position: relative; z-index: 2;
}
.pz-welcome p {
  font-size: var(--text-sm); color: rgba(255,255,255,0.7);
  max-width: 600px; line-height: 1.6; position: relative; z-index: 2;
}

/* Quick stats */
.pz-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 32px;
}
.pz-stat-card {
  background: var(--color-surface); border-radius: var(--radius-lg);
  padding: 20px; border: 1px solid var(--color-border-light);
}
.pz-stat-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 12px;
}
.pz-stat-icon.blue { background: var(--sky-blue-light); }
.pz-stat-icon.orange { background: var(--sky-orange-light); }
.pz-stat-number {
  font-family: var(--font-display); font-size: 1.5rem;
  font-weight: 800; color: var(--color-text);
}
.pz-stat-label {
  font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px;
}

/* Section */
.pz-section { margin-bottom: 32px; }
.pz-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.pz-section-title {
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 700; color: var(--color-text);
}
.pz-section-link {
  font-size: var(--text-xs); color: var(--sky-blue);
  font-weight: 600; text-decoration: none;
}
.pz-section-link:hover { text-decoration: underline; }

/* File cards grid */
.pz-files-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.pz-file-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg); padding: 20px;
  text-align: center; transition: all 200ms ease;
  text-decoration: none; color: inherit; display: block;
}
.pz-file-card:hover {
  border-color: var(--sky-blue); box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.pz-file-thumb {
  width: 100%; height: 140px; background: var(--color-bg);
  border-radius: var(--radius-md); margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pz-file-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pz-file-thumb-icon { font-size: 36px; opacity: 0.3; }
.pz-file-name {
  font-family: var(--font-display); font-size: var(--text-sm);
  font-weight: 600; color: var(--color-text); margin-bottom: 4px;
}
.pz-file-meta { font-size: var(--text-xs); color: var(--color-text-muted); }
.pz-file-badge {
  display: inline-block; margin-top: 8px; padding: 3px 10px;
  border-radius: 100px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.pz-file-badge.pdf { background: #FEE2E2; color: #DC2626; }
.pz-file-badge.dwg { background: #DBEAFE; color: #2563EB; }
.pz-file-badge.bim { background: #D1FAE5; color: #059669; }

/* Category cards */
.pz-category-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.pz-category-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg); padding: 24px;
  display: flex; align-items: flex-start; gap: 16px;
  transition: all 200ms ease; text-decoration: none; color: inherit;
}
.pz-category-card:hover {
  border-color: var(--sky-blue); box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.pz-category-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--sky-blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.pz-category-info h3 {
  font-family: var(--font-display); font-size: var(--text-base);
  font-weight: 700; color: var(--color-text); margin-bottom: 4px;
}
.pz-category-info p {
  font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5;
}
.pz-category-count {
  font-size: var(--text-xs); color: var(--sky-blue);
  font-weight: 600; margin-top: 6px;
}

/* News / Activity feed */
.pz-feed { display: flex; flex-direction: column; gap: 12px; }
.pz-feed-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px; background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg); transition: all 150ms;
  text-decoration: none; color: inherit;
}
.pz-feed-item:hover {
  border-color: var(--sky-blue); box-shadow: var(--shadow-sm);
}
.pz-feed-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.pz-feed-icon.blue { background: var(--sky-blue-light); }
.pz-feed-icon.orange { background: var(--sky-orange-light); }
.pz-feed-icon.green { background: #D1FAE5; }
.pz-feed-body { flex: 1; }
.pz-feed-title {
  font-family: var(--font-display); font-size: 13px;
  font-weight: 700; color: var(--color-text); margin-bottom: 2px;
}
.pz-feed-desc {
  font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5;
}
.pz-feed-date {
  font-size: 10px; color: var(--color-text-faint); margin-top: 4px;
}

/* Mobile sidebar toggle */
.pz-mobile-toggle {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 200;
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--sky-blue); border: none; color: #fff;
  font-size: 20px; cursor: pointer; box-shadow: var(--shadow-md);
  align-items: center; justify-content: center;
}

@media (max-width: 960px) {
  .pz-mobile-toggle { display: flex; }
  .pz-sidebar { transform: translateX(-100%); transition: transform 300ms ease; }
  .pz-sidebar.open { transform: translateX(0); }
  .pz-main { margin-left: 0; padding: 24px 16px; padding-top: 64px; }
  .pz-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .pz-stats { grid-template-columns: 1fr; }
  .pz-files-grid { grid-template-columns: 1fr; }
}
