We n/* ============================================
   V2 APP FRAME STYLES
   Uses design tokens from colors.css
   ============================================ */

/* Mobile Desktop Banner */
.mobile-desktop-banner {
  display: none;
  background: var(--gradient);
  color: white;
  text-align: center;
  padding: 12px 40px 12px 16px;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.mobile-desktop-banner button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
@media (max-width: 768px) {
  .mobile-desktop-banner {
    display: block;
  }
}

/* Utility */
.hidden {
  display: none !important;
}

/* ============================================
   APP LAYOUT SHELL
   ============================================ */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
  flex: 1;
  width: 100%;
  padding: var(--space-3xl);
  background: var(--white);
  box-sizing: border-box;
}

.page-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-2xl);
}

/* ============================================
   QUICK ACTION MODAL
   ============================================ */
.quick-action-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.quick-action-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.quick-action-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 420px;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.quick-action-modal-overlay.active .quick-action-modal {
  transform: scale(1);
}

.quick-action-modal-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  background: none;
  border: none;
  color: var(--gray-mid);
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.quick-action-modal-close:hover {
  color: var(--black);
  background: var(--gray-background);
}

.quick-action-modal-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--black);
  margin: 0 0 var(--space-sm) 0;
}

.quick-action-modal-subtitle {
  font-size: var(--text-md);
  color: var(--gray-dark);
  margin: 0 0 var(--space-xl) 0;
}

.quick-action-search {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--gray-background);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
}

.quick-action-search svg {
  color: var(--gray-mid);
  flex-shrink: 0;
}

.quick-action-search input {
  flex: 1;
  border: none;
  background: none;
  font-size: var(--text-md);
  color: var(--black);
  outline: none;
}

.quick-action-search input::placeholder {
  color: var(--gray-mid);
}

.quick-action-buttons {
  display: flex;
  gap: var(--space-md);
}

.quick-action-browse-btn {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-md);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.quick-action-browse-btn:hover {
  background: var(--black);
}



/* ============================================
   PAGE CONTENT CONTAINERS
   ============================================ */
.marketplace-container,
.activity-container,
.studio-container,
.library-container,
.favorites-container,
.account-container {
  max-width: 1425px;
  margin: 0 auto;
  padding-left: 100px;
  padding-right: 100px;
}

.activity-container,
.studio-container,
.library-container,
.favorites-container,
.account-container {
  max-width: 1000px;
}

/* ============================================
   MARKETPLACE PAGE
   ============================================ */
.marketplace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.marketplace-search,
.library-search {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--gray-background);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  min-width: 280px;
}
.marketplace-search svg,
.library-search svg {
  color: var(--gray-mid);
  flex-shrink: 0;
}
.marketplace-search input,
.library-search input {
  border: none;
  background: none;
  font-size: var(--text-sm);
  color: var(--black);
  outline: none;
  width: 100%;
  font-family: inherit;
}
.marketplace-search input::placeholder,
.library-search input::placeholder {
  color: var(--gray-mid);
}

.library-search {
  margin-bottom: var(--space-2xl);
  max-width: 400px;
  min-width: auto;
}

/* Activity Stats Bar */
.activity-stats-bar {
  display: flex;
  gap: var(--space-3xl);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--gray-light);
}

/* Shared Tab Styles */
.marketplace-tabs,
.activity-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--gray-light);
  padding-bottom: var(--space-sm);
}

.marketplace-tab,
.activity-tab {
  padding: var(--space-md) var(--space-xl);
  border: none;
  background: none;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--gray-dark);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all var(--transition-fast);
  position: relative;
}
.marketplace-tab:hover,
.activity-tab:hover {
  color: var(--black);
}
.marketplace-tab.active,
.activity-tab.active {
  color: var(--black);
}
.marketplace-tab.active::after,
.activity-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--fuchsia);
}

/* Product/Framework Cards Grid */
.marketplace-grid,
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-2xl);
}

.library-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.framework-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.framework-card:hover {
  border-color: var(--gray-mid);
  box-shadow: var(--shadow-md);
}

.framework-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-sm);
  color: var(--black);
}

.framework-description {
  font-size: var(--text-sm);
  color: var(--gray-dark);
  line-height: 1.5;
}

.framework-card {
  padding: var(--space-xl);
}

.framework-description {
  margin-bottom: var(--space-lg);
}

.framework-tag {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--gray-background);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--gray-mid);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.activity-empty,
.favorites-empty,
.studio-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl) var(--space-xl);
  text-align: center;
  color: var(--gray-mid);
}
.activity-empty svg,
.favorites-empty svg {
  margin-bottom: var(--space-xl);
  opacity: 0.5;
}
.activity-empty h3,
.favorites-empty h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--black);
  margin-bottom: var(--space-sm);
}
.activity-empty p,
.favorites-empty p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-xl);
}

.studio-empty {
  background: var(--gray-background);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  font-size: var(--text-sm);
}

.activity-cta,
.favorites-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: background var(--transition-fast);
}
.activity-cta:hover,
.favorites-cta:hover {
  background: var(--bg-hover-dark);
}

/* ============================================
   CREATOR STUDIO
   ============================================ */
.studio-intro,
.library-intro {
  margin-bottom: var(--space-2xl);
  color: var(--gray-dark);
}

.library-intro {
  margin-bottom: var(--space-xl);
}

.studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-4xl);
}

.studio-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--transition-fast);
}
.studio-card:hover {
  border-color: var(--gray-mid);
  box-shadow: var(--shadow-md);
}

.studio-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-lg);
  color: var(--fuchsia);
}
.studio-card-icon svg {
  width: 100%;
  height: 100%;
}

.studio-card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-sm);
}

.studio-card-description {
  font-size: var(--text-sm);
  color: var(--gray-dark);
  margin-bottom: var(--space-xl);
}

.studio-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.studio-card-cta:hover {
  background: var(--bg-hover-dark);
}

.studio-section {
  margin-top: var(--space-4xl);
}

.studio-section-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-xl);
}

/* ============================================
   ACCOUNT PAGE
   ============================================ */
.account-container {
  max-width: 640px;
  margin: 0 auto;
}

.account-header {
  margin-bottom: var(--space-2xl);
}

.account-header .page-title {
  margin-bottom: var(--space-sm);
}

.page-subtitle {
  color: var(--gray-dark);
  font-size: var(--text-md);
}

.account-section-label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--gray-mid);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.account-section {
  margin-bottom: var(--space-2xl);
}

.account-activity {
  margin-bottom: var(--space-2xl);
}

.activity-stats {
  display: flex;
  gap: var(--space-3xl);
}

.activity-stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--black);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--gray-mid);
}

.account-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--gray-light);
}

.account-row:last-child {
  border-bottom: none;
}

.account-row-content {
  flex: 1;
}

.account-row-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--black);
}

.account-row-value {
  font-size: var(--text-sm);
  color: var(--black);
}

.account-row-value.secondary {
  color: var(--gray-dark);
  font-size: var(--text-xs);
}

.account-row-action {
  background: none;
  border: none;
  color: var(--gray-dark);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: 0;
}

.account-row-action:hover {
  color: var(--black);
}

.account-edit-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-family: inherit;
  color: var(--black);
  background: var(--white);
  margin-bottom: var(--space-sm);
}

.account-edit-input:focus {
  outline: none;
  border-color: var(--fuchsia);
}

.account-edit-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.account-save-btn {
  padding: 6px 16px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
}

.account-cancel-btn {
  padding: 6px 16px;
  background: none;
  color: var(--gray-dark);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  cursor: pointer;
}

.account-verified-badge {
  color: var(--fuchsia);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.google-account-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.google-icon {
  flex-shrink: 0;
}

.subscription-card {
  padding: var(--space-xl);
}

.subscription-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-xl);
}

.plan-name {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-md);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plan-features li {
  font-size: var(--text-sm);
  color: var(--gray-dark);
  padding: var(--space-xs) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.plan-features li::before {
  content: "✓";
  color: var(--black);
}

.subscription-price {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
}

.subscription-actions {
  display: flex;
  gap: var(--space-md);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  
  .marketplace-header {
    flex-direction: column;
    align-items: stretch;
  }
  .marketplace-search {
    min-width: auto;
  }
  .marketplace-tabs,
  .activity-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================
   PLATFORM ADMIN
   ============================================ */
.platform-admin-link {
  background: var(--gray-background);
  font-weight: var(--font-semibold) !important;
  border-radius: var(--radius-sm);
}

.admin-container {
  max-width: 1425px;
  margin: 0 auto;
}

.admin-header {
  margin-bottom: var(--space-lg);
}

.admin-tabs {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--gray-light);
}

.admin-tab {
  padding: var(--space-md) var(--space-lg);
  color: var(--gray-dark);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
}

.admin-tab:hover {
  color: var(--black);
}

.admin-tab.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

.tab-count {
  color: var(--gray-mid);
  font-weight: var(--font-normal);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.admin-stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-xl-soft);
}

.admin-stat-card .stat-label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--black);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
  text-transform: none;
}

.admin-stat-card .stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--black);
  margin-bottom: var(--space-sm);
}

.stat-change {
  font-size: var(--text-xs);
  color: var(--gray-mid);
}

.stat-change.positive {
  color: var(--positive);
}

.stat-change.negative {
  color: var(--negative);
}

.admin-panels {
  display: grid;
  grid-template-columns: 3fr 2fr 2fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.admin-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-xl-soft);
}

.admin-panel.full-width {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.panel-header h3 {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
}

.panel-link {
  font-size: var(--text-sm);
  color: var(--gray-dark);
  text-decoration: none;
}

.panel-link:hover {
  color: var(--black);
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 0;
}

.activity-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon svg {
  color: var(--gray-mid);
  width: 14px;
  height: 14px;
}

.activity-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.activity-text {
  font-size: 14px;
  font-weight: 300;
  color: var(--black);
}

.activity-time {
  font-size: 14px;
  font-weight: 300;
  color: var(--gray-mid);
  white-space: nowrap;
  text-align: right;
}

.quick-stats {
  display: flex;
  flex-direction: column;
}

.quick-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-light);
}

.quick-stat-row:last-child {
  border-bottom: none;
}

.quick-stat-label {
  font-size: 14px;
  font-weight: 300;
  color: var(--gray-dark);
}

.quick-stat-value {
  font-size: 14px;
  font-weight: 300;
  color: var(--black);
}

/* Admin Toolbar */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.toolbar-filters {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.search-input {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
}

.search-input input {
  border: none;
  background: none;
  outline: none;
  font-size: var(--text-sm);
  min-width: 150px;
}

.filter-select {
  padding: var(--space-sm) var(--space-md);
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-sm);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.filter-select:focus {
  outline: none;
  border-color: var(--black);
}

.filter-select-sm {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-xs);
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.results-count {
  font-size: var(--text-sm);
  color: var(--gray-mid);
}

.btn-primary {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: var(--font-medium);
  font-family: inherit;
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
  border-radius: var(--radius-full, 30px);
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn-primary:hover {
  opacity: 0.85;
}
.btn-secondary {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: var(--font-medium);
  font-family: inherit;
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-full, 30px);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-secondary:hover {
  border-color: var(--black);
}

.btn-secondary-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-xs);
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Admin Table */
.admin-table-container {
  overflow-x: auto;
  margin-bottom: var(--space-xl);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  table-layout: auto;
}

.admin-table td:last-child,
.admin-table th:last-child {
  width: 44px;
  text-align: center;
}

.admin-table th {
  text-align: left;
  padding: var(--space-md) var(--space-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--gray-mid);
  letter-spacing: 0.05em;
  border-bottom: 1.5px solid var(--black);
  white-space: nowrap;
}

.admin-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.admin-table th.sortable:hover {
  color: var(--black);
}

.sort-icon {
  margin-left: 4px;
  vertical-align: middle;
  opacity: 0.25;
}

.admin-table th.sortable:hover .sort-icon {
  opacity: 0.5;
}

.admin-table th.sortable.sort-asc .sort-icon .sort-up,
.admin-table th.sortable.sort-desc .sort-icon .sort-down {
  fill: var(--black);
  opacity: 1;
}

.admin-table th.sortable.sort-asc .sort-icon,
.admin-table th.sortable.sort-desc .sort-icon {
  opacity: 1;
}

.admin-table td {
  padding: var(--space-md) var(--space-sm);
  border-bottom: 1px solid var(--gray-light);
  vertical-align: middle;
}

.admin-table .text-center {
  text-align: center;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: var(--font-semibold);
  color: var(--black);
  flex-shrink: 0;
}

.user-cell .user-name {
  font-weight: var(--font-medium);
  color: var(--black);
}

.status-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.status-badge.active,
.status-badge.completed {
  color: var(--positive);
}

.status-badge.pending,
.status-badge.in_progress {
  color: var(--neutral);
}

.status-badge.failed,
.status-badge.inactive {
  color: var(--negative);
}

.status-badge.paid {
  color: var(--positive);
}

.action-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--gray-mid);
}

.table-action {
  color: var(--gray-dark);
  text-decoration: none;
  font-size: var(--text-xs);
  margin-right: var(--space-sm);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.table-action:hover {
  color: var(--black);
}

.activity-actions {
  white-space: nowrap;
}

.action-retry {
  color: var(--primary);
}

.action-retry:hover {
  color: var(--primary-dark, var(--primary));
}

.action-delete {
  color: var(--error, #c0392b);
}

.action-delete:hover {
  color: var(--error-dark, #a93226);
}

.status-badge.processing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--gray-light, #ddd);
  border-top-color: var(--gray-dark, #333);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-hint {
  font-size: var(--text-xs);
  color: var(--gray-mid);
  font-weight: 300;
}

.action-log {
  color: var(--gray-dark);
}

.error-log-row td {
  padding-top: 0 !important;
  padding-bottom: var(--space-md) !important;
  border-bottom: none !important;
}

.error-log {
  background: var(--gray-bg, #f8f8f8);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-md);
  margin-left: 0;
}

.error-log-header {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--gray-dark);
  margin-bottom: var(--space-sm);
}

.retry-count {
  color: var(--gray-mid);
  font-weight: 300;
}

.error-log-body {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--gray-dark);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
}

.activity-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-user-name {
  color: var(--black);
  text-decoration: none;
}

.activity-user-name:hover {
  text-decoration: underline;
}

.activity-user-email {
  color: var(--gray-mid);
}

.activity-detail-text {
  vertical-align: middle;
}

.activity-table {
  table-layout: fixed;
  width: 100%;
}

.activity-table th:nth-child(1),
.activity-table td:nth-child(1) { width: 140px; white-space: nowrap; padding-right: var(--space-xl); }

.activity-table th:nth-child(2),
.activity-table td:nth-child(2) { width: 12%; }

.activity-table th:nth-child(3),
.activity-table td:nth-child(3) { }

.activity-table th:nth-child(4),
.activity-table td:nth-child(4) { width: 14%; }

.activity-table th:nth-child(5),
.activity-table td:nth-child(5) { }

.activity-table th:nth-child(6),
.activity-table td:nth-child(6) { width: 80px; text-align: right; }

.activity-table th:nth-child(7),
.activity-table td:nth-child(7) { width: 40px; text-align: right; vertical-align: middle; }

.activity-email-cell {
  color: var(--gray-mid);
}

.activity-table td {
  font-size: 14px;
  font-weight: 300;
  vertical-align: middle;
  border-bottom: none;
  padding: 6px var(--space-lg);
}

.activity-table th {
  font-size: 14px;
  font-weight: 300;
  text-transform: none;
  letter-spacing: normal;
  padding: 6px var(--space-lg);
}

.case-row {
  cursor: pointer;
}

.case-row:hover td {
  background: var(--gray-bg, #f8f8f8);
}

.support-case-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-2xl);
}

.case-header {
  margin-bottom: var(--space-2xl);
}

.case-back {
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-mid);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.case-back:hover {
  color: var(--black);
}

.case-title {
  font-size: 24px;
  font-weight: var(--font-semibold);
  margin: var(--space-md) 0 var(--space-xs);
  letter-spacing: -0.01em;
}

.case-meta {
  font-size: 13px;
  font-weight: 300;
  color: var(--gray-mid);
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.case-section-label {
  font-size: var(--text-xs, 11px);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-mid);
  margin-bottom: var(--space-md);
}

.case-report-info {
  background: var(--gray-bg, #f8f8f8);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.case-report-detail {
  font-size: 14px;
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.case-report-title {
  color: var(--gray-mid);
}

.case-timeline {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-xl);
}

.timeline-entries {
  margin-bottom: var(--space-lg);
}

.timeline-entry {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  position: relative;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-mid);
  flex-shrink: 0;
  margin-top: 6px;
}

.action-status_change .timeline-dot,
.action-assignment .timeline-dot {
  background: var(--primary, #2563eb);
}

.action-pickup .timeline-dot {
  background: var(--black);
}

.action-action .timeline-dot {
  background: var(--primary, #2563eb);
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  font-size: 14px;
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.timeline-author {
  font-weight: var(--font-medium);
}

.timeline-action {
  font-size: 11px;
  color: var(--gray-mid);
  background: var(--gray-bg, #f4f4f4);
  padding: 1px 6px;
  border-radius: 3px;
}

.timeline-time {
  color: var(--gray-mid);
  margin-left: auto;
}

.timeline-text {
  font-size: 14px;
  font-weight: 300;
  margin-top: 2px;
  line-height: 1.5;
}

.note-form {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--gray-light);
}

.note-textarea {
  width: 100%;
  font-size: 14px;
  font-weight: 300;
  font-family: inherit;
  color: var(--black);
  background: var(--off-white, #FAFAFA);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-md, 8px);
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.note-textarea:focus {
  outline: none;
  border-color: var(--black);
  background: var(--white);
}

.note-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-sm);
}

.support-case-sidebar {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-xl);
  height: fit-content;
  position: sticky;
  top: var(--space-xl);
}

.sidebar-section {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--gray-light);
}

.sidebar-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-section .filter-select {
  width: 100%;
}

.sidebar-user {
  font-size: 14px;
  font-weight: 300;
}

.sidebar-user-name {
  color: var(--black);
  text-decoration: none;
  font-weight: var(--font-medium);
}

.sidebar-user-name:hover {
  text-decoration: underline;
}

.sidebar-user-email {
  color: var(--gray-mid);
  margin-top: 2px;
}

.sidebar-user-tier {
  color: var(--gray-mid);
  margin-top: 2px;
}

.support-table {
  table-layout: fixed;
  width: 100%;
}

.support-table td,
.support-table th {
  font-size: 14px;
  font-weight: 300;
  vertical-align: middle;
  padding: var(--space-md) var(--space-lg);
}

.support-table td {
  border-bottom: 1px solid var(--gray-light);
}

.support-table th {
  text-transform: none;
  letter-spacing: normal;
  border-bottom: 1.5px solid var(--black);
}

.support-table th:nth-child(1),
.support-table td:nth-child(1) { width: 60px; }

.support-table th:nth-child(2),
.support-table td:nth-child(2) { width: 12%; }

.support-table th:nth-child(3),
.support-table td:nth-child(3) { }

.support-table th:nth-child(4),
.support-table td:nth-child(4) { }

.support-table th:nth-child(5),
.support-table td:nth-child(5) { width: 12%; }

.support-table th:nth-child(6),
.support-table td:nth-child(6) { width: 120px; }

.support-table th:nth-child(7),
.support-table td:nth-child(7) { width: 130px; white-space: nowrap; }

.support-table th:nth-child(8),
.support-table td:nth-child(8) { width: 50px; text-align: center; }

.support-table th:nth-child(9),
.support-table td:nth-child(9) { width: 40px; text-align: center; }

.support-email-cell {
  color: var(--gray-mid);
}

.products-table {
  table-layout: auto;
  width: 100%;
  min-width: 900px;
}

.products-table td,
.products-table th {
  font-size: 14px;
  font-weight: 300;
  vertical-align: middle;
  padding: var(--space-md) var(--space-lg);
  overflow: hidden;
  text-overflow: ellipsis;
}

.products-table td {
  border-bottom: 1px solid var(--gray-light);
}

.products-table th {
  text-transform: none;
  letter-spacing: normal;
  border-bottom: 1.5px solid var(--black);
}

.products-table td,
.products-table th {
  white-space: nowrap;
}

.product-type-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-mid);
}

.product-detail-section {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.product-detail-section:last-child {
  margin-bottom: 0;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.product-detail-field {
  margin-bottom: var(--space-md);
}

.product-detail-field label {
  display: block;
  font-size: var(--text-xs, 11px);
  font-weight: var(--font-semibold);
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.product-detail-value {
  font-size: 14px;
  font-weight: 300;
  color: var(--black);
  line-height: 1.5;
}

.product-expect-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-expect-list li {
  font-size: 14px;
  font-weight: 300;
  color: var(--black);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.product-expect-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--gray-mid);
  font-weight: bold;
}

.product-fields-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-field-item {
  display: flex;
  gap: var(--space-lg);
  font-size: 14px;
  font-weight: 300;
  padding: 4px 0;
}

.product-field-key {
  font-family: monospace;
  font-size: 13px;
  color: var(--gray-mid);
  min-width: 180px;
}

.product-field-label {
  color: var(--black);
}

.product-edit-input,
.product-edit-textarea {
  width: 100%;
  font-size: 14px;
  font-weight: 300;
  font-family: inherit;
  color: var(--black);
  background: var(--off-white, #FAFAFA);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-md, 8px);
  padding: 10px 14px;
  line-height: 1.5;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.product-edit-input:focus,
.product-edit-textarea:focus {
  outline: none;
  border-color: var(--black);
  background: var(--white);
}

.product-edit-textarea {
  resize: vertical;
  min-height: 70px;
}

.product-save-btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: var(--font-medium);
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full, 30px);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.product-save-btn:hover {
  opacity: 0.85;
}

.product-save-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.action-pickup-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--gray-dark);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-xs);
  font-family: inherit;
  font-weight: 300;
}

.action-pickup-btn:hover {
  color: var(--black);
}

.action-pickup-btn svg {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

.case-status-icon {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  vertical-align: middle;
}

.case-status-icon svg {
  vertical-align: middle;
}

.case-status-icon.case-active {
  color: var(--amber);
}

.case-status-icon.case-active:hover {
  color: var(--black);
}

.case-status-icon.case-resolved {
  color: var(--success, #16a34a);
}

.case-status-icon.case-resolved:hover {
  color: var(--black);
}

.event-name {
  font-weight: var(--font-medium);
}

.event-detail {
  font-size: var(--text-xs);
  color: var(--gray-mid);
}

.empty-state {
  text-align: center;
  padding: var(--space-3xl) !important;
  color: var(--gray-mid);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
}

.page-btn {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
}

.page-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-dots {
  color: var(--gray-mid);
}

/* Billing Panels */
.billing-panels {
  grid-template-columns: 1fr 1fr;
}

.simple-table {
  width: 100%;
  font-size: var(--text-sm);
}

.simple-table th {
  text-align: left;
  padding: var(--space-sm) 0;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--gray-mid);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gray-light);
}

.simple-table td {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--gray-light);
}

.simple-table tr:last-child td {
  border-bottom: none;
}

.panel-filters {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

/* Settings */
.settings-section {
  margin-bottom: var(--space-2xl);
}

.settings-section-label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--gray-mid);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.settings-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--gray-light);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row-content {
  flex: 1;
}

.settings-row-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--black);
}

.settings-row-desc {
  font-size: var(--text-xs);
  color: var(--gray-mid);
}

.settings-input {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  min-width: 200px;
  text-align: right;
}

.settings-input-sm {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  width: 60px;
  text-align: center;
}

.api-key-display {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.api-key-masked {
  font-family: monospace;
  font-size: var(--text-sm);
  color: var(--gray-dark);
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.api-status {
  font-size: var(--text-xs);
}

.api-status.active {
  color: var(--positive);
}

/* Admin Modal */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.admin-modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--gray-light);
}

.admin-modal-header h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray-dark);
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--black);
}

.admin-modal-body {
  padding: var(--space-xl);
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--gray-light);
  background: var(--gray-background);
}

.form-group {
  margin-bottom: var(--space-md);
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--gray-dark);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.form-input,
.form-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: var(--text-md);
  transition: border-color 0.15s;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--fuchsia);
}

.form-input.readonly {
  background: var(--gray-background);
  color: var(--gray-dark);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--fuchsia);
}

.checkbox-text {
  font-weight: 500;
}

.form-help {
  font-size: var(--text-xs);
  color: var(--gray-mid);
  margin-top: var(--space-xs);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-icon:hover {
  background: var(--gray-background);
}

.btn-icon-danger:hover {
  background: var(--negative-light, #FEE2E2);
  color: var(--negative);
}

.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Tier badges */
.tier-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

.tier-badge.tier-free {
  background: var(--gray-light);
  color: #374151;
}

.tier-badge.tier-individual {
  background: #DBEAFE;
  color: #1D4ED8;
}

.tier-badge.tier-professional {
  background: #F3E8FF;
  color: #7C3AED;
}

.tier-badge.tier-unlimited {
  background: #FEF3C7;
  color: var(--neutral);
}

/* Admin badge */
.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #FEE2E2;
  color: var(--negative);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
}

.admin-badge.inactive {
  background: transparent;
  color: var(--gray-mid);
}

/* Admin Responsive */
@media (max-width: 1024px) {
  .admin-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .admin-panels {
    grid-template-columns: 1fr;
  }
  .billing-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-filters {
    flex-direction: column;
  }
  .admin-tabs {
    overflow-x: auto;
  }
}

/* ============================================
   USER ADMIN STYLES
   Organization management interface
   ============================================ */

.user-admin {
  padding: var(--space-xl);
  max-width: 1200px;
  margin: 0 auto;
}

.user-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-xl);
}

.user-admin-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
  margin: 0 0 4px 0;
}

.user-admin-subtitle {
  font-size: 14px;
  color: var(--gray-dark);
  margin: 0;
}

.user-admin-tabs {
  display: flex;
  gap: var(--space-xl);
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: var(--space-xl);
}

.user-admin-tab {
  padding: var(--space-md) 0;
  font-size: 14px;
  color: var(--gray-dark);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.user-admin-tab:hover {
  color: var(--black);
}

.user-admin-tab.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

.tab-count {
  background: var(--gray-background);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  margin-left: 4px;
}

/* Start Page */
.user-admin-start {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.start-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--black);
  margin: 0 0 8px 0;
}

.start-subtitle {
  font-size: 18px;
  color: var(--gray-dark);
  margin: 0 0 40px 0;
}

.start-form {
  width: 100%;
  max-width: 480px;
}

.start-input, .start-select {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid var(--gray-light);
  border-radius: 40px;
  font-size: 16px;
  margin-bottom: 12px;
  background: white;
}

.start-form-row {
  display: flex;
  gap: 12px;
}

.start-form-row .start-select {
  flex: 1;
}

.start-button {
  padding: 16px 32px;
  background: var(--black);
  color: white;
  border: none;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.start-footer {
  margin-top: 32px;
  font-size: 14px;
  color: var(--gray-dark);
}

.start-link {
  color: var(--fuchsia);
  text-decoration: none;
}

.enterprise-info {
  margin: 32px 0;
  padding: 24px 32px;
  background: var(--background-secondary);
  border-radius: 12px;
  text-align: left;
  max-width: 480px;
}

.enterprise-info p {
  margin: 0 0 16px 0;
  color: var(--gray-dark);
}

.enterprise-features {
  margin: 0;
  padding-left: 20px;
  color: var(--black);
}

.enterprise-features li {
  margin-bottom: 8px;
}

.white-label-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  text-align: center;
  color: var(--gray-dark);
}

.white-label-locked svg {
  margin-bottom: 16px;
  color: var(--text-tertiary);
}

.white-label-locked p {
  margin: 0 0 8px 0;
}

.white-label-locked .hint {
  font-size: 14px;
  color: var(--text-tertiary);
}

.white-label-locked a {
  color: var(--fuchsia);
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: white;
  border: none;
  border-radius: 12px;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-dark);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--black);
}

.stat-change {
  font-size: 12px;
  margin-top: 8px;
}

.stat-change.positive { color: var(--positive); }
.stat-change.negative { color: var(--negative); }

.stat-subtext {
  font-size: 12px;
  color: var(--gray-dark);
  margin-top: 4px;
}

/* Dashboard Panels */
.dashboard-panels {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-xl);
}

.activity-panel, .status-panel {
  background: white;
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  padding: var(--space-xl);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.panel-header h3, .panel-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.view-all-link {
  font-size: 13px;
  color: var(--gray-dark);
  text-decoration: none;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}


/* Status Panel */
.status-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.status-label {
  color: var(--gray-dark);
}

.status-value {
  font-weight: 500;
  color: var(--black);
}

.status-value.green { color: var(--positive); }
.status-value.orange { color: var(--neutral); }

/* Team Avatars */
.team-avatars {
  display: flex;
  align-items: center;
  gap: -8px;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.team-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-background);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  margin-right: -8px;
  border: 2px solid white;
}

.team-avatar.more {
  background: var(--black);
  color: white;
}

.manage-team-link {
  font-size: 13px;
  color: var(--gray-dark);
  text-decoration: none;
  margin-left: 16px;
}

/* Team Page */
.team-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.seats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xl);
  background: var(--gray-background);
  border-radius: 12px;
}

.seats-info {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.seats-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-dark);
  letter-spacing: 0.5px;
}

.seats-value {
  font-size: 24px;
  font-weight: 700;
}

.seats-percent {
  font-size: 13px;
  color: var(--gray-dark);
}

.seats-progress {
  width: 120px;
  height: 6px;
  background: var(--gray-light);
  border-radius: 3px;
  overflow: hidden;
}

.seats-progress-fill {
  height: 100%;
  background: var(--black);
  border-radius: 3px;
}

.team-filters {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  flex: 1;
  max-width: 300px;
}

.search-box svg {
  width: 16px;
  height: 16px;
  color: var(--gray-dark);
}

.search-box input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  font-size: 14px;
  background: white;
}

.team-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--gray-dark);
}

/* Team Table */
.team-table {
  background: white;
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  overflow: hidden;
}

.team-table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 48px;
  padding: var(--space-md) var(--space-lg);
  background: var(--gray-background);
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-dark);
  letter-spacing: 0.5px;
}

.team-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 48px;
  padding: var(--space-lg);
  align-items: center;
  border-top: 1px solid var(--gray-light);
}

.team-row:first-child {
  border-top: none;
}

.col-member {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
}

.member-avatar.small {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.member-info {
  display: flex;
  flex-direction: column;
}

.member-name {
  font-size: 14px;
  font-weight: 500;
}

.member-email {
  font-size: 12px;
  color: var(--gray-dark);
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background: var(--gray-background);
}

.action-btn svg {
  width: 20px;
  height: 20px;
  color: var(--gray-dark);
}

/* Team Pagination */
.team-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination-info {
  font-size: 13px;
  color: var(--gray-dark);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray-light);
  border-radius: 6px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--black);
}

.pagination-current {
  width: 32px;
  height: 32px;
  background: var(--black);
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
}

/* ── Projects Admin Tab ───────────────────────── */
.projects-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.projects-count {
  font-size: var(--font-size-sm);
  color: var(--gray-mid);
  margin: 0;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.projects-empty {
  text-align: center;
  padding: var(--space-12) 0;
  color: var(--gray-mid);
  font-size: var(--font-size-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.project-card {
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  background: var(--white);
  overflow: visible;
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  transition: background 0.15s;
  overflow: visible;
}

.project-card-header:hover {
  background: var(--gray-background);
}

.project-card-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--black);
  margin-bottom: 4px;
}

.project-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--gray-mid);
}

.project-badge {
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--gray-background);
  color: var(--gray-dark);
}

.project-chevron {
  color: var(--gray-mid);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.project-card-body {
  border-top: 1px solid var(--gray-light);
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.project-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.project-section-header {
  display: flex;
  align-items: center;
}

.project-section-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--black);
  flex: 1;
}

.project-section-desc {
  font-size: var(--font-size-xs);
  color: var(--gray-mid);
  margin: 0;
  line-height: 1.6;
}

.project-members-list {
  display: flex;
  flex-direction: column;
}

.project-member-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--gray-light);
}

.project-member-row:last-child {
  border-bottom: none;
}

.project-member-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--gray-background);
  color: var(--gray-dark);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project-member-info {
  flex: 1;
  min-width: 0;
}

.project-member-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--black);
}

.project-member-email {
  font-size: var(--font-size-xs);
  color: var(--gray-mid);
}

.project-member-role-badge {
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--gray-background);
  color: var(--gray-mid);
  flex-shrink: 0;
}

.project-member-role-badge.admin,
.project-member-role-badge.owner {
  background: rgba(255, 0, 170, 0.08);
  color: var(--fuchsia);
}

.project-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-mid);
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color 0.15s;
  flex-shrink: 0;
}

.project-remove-btn:hover {
  color: var(--negative);
}

.project-add-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.project-member-select {
  flex: 1;
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  color: var(--black);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}

.project-member-select:focus {
  border-color: var(--fuchsia);
}

.project-add-btn {
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.project-add-btn:hover {
  opacity: 0.8;
}

.project-add-note {
  font-size: var(--font-size-xs);
  color: var(--gray-mid);
  margin: 0;
  line-height: 1.5;
}

.project-add-error {
  font-size: var(--font-size-xs);
  color: var(--negative);
  white-space: nowrap;
}

.project-docs-list {
  display: flex;
  flex-direction: column;
}

.project-doc-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--gray-light);
  font-size: var(--font-size-sm);
  color: var(--gray-dark);
}

.project-doc-row:last-child {
  border-bottom: none;
}

.project-doc-name {
  flex: 1;
  color: var(--black);
  font-size: var(--font-size-sm);
}

.project-doc-date {
  font-size: var(--font-size-xs);
  color: var(--gray-mid);
  white-space: nowrap;
}

.project-doc-input {
  display: none;
}

.project-upload-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--gray-dark);
  border: 1px dashed var(--gray-light);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  align-self: flex-start;
  margin-top: var(--space-1);
}

.project-upload-trigger:hover {
  border-color: var(--fuchsia);
  color: var(--fuchsia);
}

.project-upload-status {
  font-size: var(--font-size-xs);
  min-height: 16px;
  margin-top: var(--space-1);
}

.project-empty-note {
  font-size: var(--font-size-sm);
  color: var(--gray-mid);
  margin: var(--space-2) 0;
}

.admin-cancel-btn {
  background: none;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  color: var(--gray-dark);
  cursor: pointer;
  transition: background 0.15s;
}

.admin-cancel-btn:hover {
  background: var(--gray-background);
}

.project-action-btn {
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-5);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.project-action-btn:hover {
  opacity: 0.8;
}

.project-action-btn.danger {
  background: var(--negative);
}

.project-cancel-btn {
  background: none;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  color: var(--gray-dark);
  cursor: pointer;
  transition: background 0.15s;
}

.project-cancel-btn:hover {
  background: var(--gray-background);
}

.project-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-mid);
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.project-modal-close:hover {
  color: var(--black);
}

.project-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.project-form-group:last-child {
  margin-bottom: 0;
}

.project-form-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--black);
}

.project-form-input {
  width: 100%;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  color: var(--black);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.project-form-input:focus {
  border-color: var(--fuchsia);
}

.project-kebab-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-mid);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}

.project-kebab-btn:hover {
  color: var(--black);
  background: var(--gray-background);
}

.project-card-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.project-card-actions {
  position: relative;
  margin-right: var(--space-2);
}

.project-kebab-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 160px;
  z-index: 300;
  overflow: visible;
}

.project-kebab-menu.open {
  display: block;
}

.project-kebab-option {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: none;
  border: none;
  text-align: left;
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s;
}

.project-kebab-option:hover {
  background: var(--gray-background);
}

.project-kebab-option.delete {
  color: var(--negative);
}

.project-kebab-option.delete:hover {
  background: var(--negative-bg);
}

.project-confirm-text {
  font-size: var(--font-size-sm);
  color: var(--black);
  margin: 0 0 var(--space-2) 0;
}

.project-confirm-sub {
  font-size: var(--font-size-xs);
  color: var(--gray-mid);
  margin: 0;
  line-height: 1.6;
}

.project-toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  color: var(--white);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  z-index: 2000;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Usage & Billing */
.billing-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.current-plan-section h3,
.usage-section h3,
.billing-section h3,
.payment-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 var(--space-lg) 0;
}

.plan-card {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  background: white;
}

.plan-badge {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.plan-badge.free { background: var(--gray-background); color: #374151; }
.plan-badge.individual { background: #DBEAFE; color: #1D4ED8; }
.plan-badge.professional { background: #FFE4F4; color: var(--pink); }
.plan-badge.unlimited { background: var(--black); color: white; }

.plan-details {
  flex: 1;
}

.plan-name {
  display: block;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.plan-features {
  font-size: 13px;
  color: var(--gray-dark);
}

.plan-price {
  text-align: right;
}

.price-amount {
  font-size: 28px;
  font-weight: 700;
}

.price-period {
  display: block;
  font-size: 13px;
  color: var(--gray-dark);
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.section-header h3 {
  margin: 0;
}

/* Usage Table */
.usage-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.usage-period {
  font-size: 14px;
  color: var(--gray-dark);
}

.usage-tab-group {
  display: flex;
  gap: 4px;
}

.usage-tab {
  padding: 6px 12px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--gray-dark);
  cursor: pointer;
  border-radius: 6px;
}

.usage-tab.active {
  background: var(--gray-background);
  color: var(--black);
  font-weight: 500;
}

.usage-table {
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  overflow: hidden;
}

.usage-table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr 1fr;
  padding: var(--space-md) var(--space-lg);
  background: var(--gray-background);
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-dark);
  letter-spacing: 0.5px;
}

.usage-row {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr 1fr;
  padding: var(--space-lg);
  align-items: center;
  border-top: 1px solid var(--gray-light);
}

.product-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--gray-background);
  border-radius: 12px;
  font-size: 12px;
}

/* Billing Table */
.billing-table {
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  overflow: hidden;
}

.billing-row {
  display: grid;
  grid-template-columns: 120px 2fr 100px 80px 48px;
  padding: var(--space-lg);
  align-items: center;
  border-top: 1px solid var(--gray-light);
}

.billing-row:first-child {
  border-top: none;
}

.billing-date {
  font-size: 14px;
  color: var(--gray-dark);
}

.billing-desc {
  font-size: 14px;
}

.billing-amount {
  font-size: 14px;
  font-weight: 500;
}

.billing-status {
  font-size: 12px;
}

.billing-status.paid { color: var(--positive); }
.billing-status.pending { color: var(--neutral); }
.billing-status.failed { color: var(--negative); }

/* Payment Method */
.payment-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
}

.card-brand {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.card-brand.visa { background: #1A1F71; }
.card-brand.mastercard { background: #EB001B; }
.card-brand.amex { background: #006FCF; }

.card-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-number {
  font-size: 14px;
  font-weight: 500;
}

.card-expiry {
  font-size: 12px;
  color: var(--gray-dark);
}

.no-payment {
  font-size: 14px;
  color: var(--gray-dark);
  padding: var(--space-lg);
  border: 1px dashed var(--gray-light);
  border-radius: 12px;
}

.no-payment a {
  color: var(--fuchsia);
}

/* Mini Progress */
.mini-progress {
  height: 4px;
  background: var(--gray-light);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  background: var(--black);
  border-radius: 2px;
}

/* Branding Page */
.branding-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.branding-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-dark);
  letter-spacing: 0.5px;
  margin: 0;
}

.branding-card {
  padding: var(--space-xl);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  background: white;
}

.branding-row {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--gray-light);
}

.branding-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.branding-row:first-child {
  padding-top: 0;
}

.branding-field {
  flex: 1;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.field-hint {
  font-size: 12px;
  color: var(--gray-dark);
}

.logo-upload {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo-preview {
  height: 40px;
  max-width: 160px;
  object-fit: contain;
}

.logo-placeholder {
  padding: 10px 20px;
  background: var(--gray-background);
  border-radius: 8px;
  font-size: 13px;
  color: var(--gray-dark);
}

.logo-size {
  font-size: 11px;
  color: var(--gray-dark);
}

.branding-input, .branding-select {
  width: 280px;
  padding: 10px 14px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  font-size: 14px;
}

/* Color Picker */
.color-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-picker input[type="color"] {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.color-hex {
  width: 90px;
  padding: 8px 12px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  font-size: 13px;
  font-family: monospace;
}

/* Gradient Row */
.gradient-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.gradient-inputs {
  display: flex;
  gap: var(--space-xl);
}

.gradient-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gradient-input-group label {
  font-size: 12px;
  color: var(--gray-dark);
}

/* Preview Row */
.preview-row {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.cover-previews {
  display: flex;
  gap: var(--space-lg);
}

.cover-preview {
  width: 200px;
  height: 260px;
  border-radius: 12px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  color: white;
}

.preview-logo {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: auto;
}

.preview-logo img {
  height: 24px;
  filter: brightness(0) invert(1);
}

.preview-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.preview-subtitle, .preview-date, .preview-meta {
  font-size: 11px;
  opacity: 0.8;
}

/* Toggle Rows */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--gray-light);
}

.toggle-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.toggle-row:first-child {
  padding-top: 0;
}

.toggle-field {
  flex: 1;
}

/* App Preview */
.app-preview-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.preview-tab {
  padding: 8px 16px;
  border: 1px solid var(--gray-light);
  background: white;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.preview-tab.active {
  background: var(--black);
  color: white;
  border-color: var(--black);
}

.app-preview {
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  overflow: hidden;
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--gray-background);
  border-bottom: 1px solid var(--gray-light);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  background: var(--gray-light);
  border-radius: 50%;
}

.browser-url {
  flex: 1;
  padding: 6px 12px;
  background: white;
  border-radius: 6px;
  font-size: 12px;
  color: var(--gray-dark);
}

.preview-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
}

.preview-nav-logo {
  height: 28px;
}

.preview-nav-logo-text {
  font-size: 18px;
  font-weight: 700;
}

.preview-cta {
  padding: 8px 20px;
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 13px;
  font-weight: 500;
}

/* Settings Page */
.settings-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.settings-card {
  padding: var(--space-xl);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  background: white;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--gray-light);
}

.settings-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-row:first-child {
  padding-top: 0;
}

.settings-field {
  flex: 1;
}

.settings-input, .settings-select {
  width: 280px;
  padding: 10px 14px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  font-size: 14px;
}

/* Admin Rows */
.admin-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--gray-light);
}

.admin-row:last-child {
  border-bottom: none;
}

.admin-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.admin-info {
  flex: 1;
}

.admin-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.admin-email {
  font-size: 12px;
  color: var(--gray-dark);
}

.admin-badges {
  display: flex;
  gap: 8px;
}

.admin-badge {
  padding: 4px 10px;
  background: var(--gray-background);
  border-radius: 12px;
  font-size: 12px;
}

.admin-badge.owner {
  background: #FFE4F4;
  color: var(--fuchsia);
}

.add-admin-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: var(--space-lg);
  border: 1px dashed var(--gray-light);
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  color: var(--gray-dark);
  cursor: pointer;
  margin-top: var(--space-lg);
}

.add-admin-btn:hover {
  background: var(--gray-background);
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 1024px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-panels {
    grid-template-columns: 1fr;
  }
  
  .billing-row {
    grid-template-columns: 1fr 2fr 80px 60px 36px;
  }
}

@media (max-width: 768px) {
  .user-admin {
    padding: var(--space-lg);
  }
  
  .stats-row {
    grid-template-columns: 1fr;
  }
  
  .user-admin-tabs {
    overflow-x: auto;
    gap: var(--space-lg);
  }
  
  .team-table-header,
  .team-row {
    grid-template-columns: 2fr 1fr 1fr;
  }
  
  .col-reports, .col-active, .col-actions {
    display: none;
  }
  
  .branding-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .settings-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .settings-input, .settings-select,
  .branding-input, .branding-select {
    width: 100%;
  }
}


/* Programme preview floating cards */
#preview-program-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

#preview-workshop-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.preview-floating-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
  padding: var(--space-5) var(--space-6);
}

.preview-card-label {
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-mid);
  margin-bottom: var(--space-3);
}

.preview-card-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--black);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.preview-card-summary {
  font-size: var(--font-size-sm);
  color: var(--gray-dark);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.preview-overall-progress-track {
  height: 12px;
  background: var(--gray-background);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.preview-overall-progress-fill {
  height: 100%;
  background: var(--gradient-horizontal);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.preview-overall-progress-pct {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--black);
}

.preview-workshop-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--gray-light);
}

.preview-workshop-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.preview-workshop-row-name {
  font-size: var(--font-size-sm);
  color: var(--black);
  flex: 0 0 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-workshop-row-track {
  flex: 1;
  height: 12px;
  background: var(--gray-background);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.preview-workshop-row-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fuchsia) 0%, rgba(255, 126, 126, 0.8) 50%, rgba(255, 200, 114, 0.8) 100%);
  border-radius: var(--radius-full);
  min-height: 8px;
}

.preview-workshop-row-fill.upcoming {
  background: var(--gray-light);
  width: 0% !important;
}

.preview-workshop-row-action {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--fuchsia);
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 24px;
  text-align: right;
}

.preview-workshop-row-action.done {
  color: var(--gray-mid);
}

.preview-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-6);
}

.preview-details-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-details-key {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-mid);
}

.preview-details-val {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--black);
}

.preview-ws-meta {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--gray-light);
  font-size: var(--font-size-xs);
  color: var(--gray-mid);
}

.preview-ws-meta span strong {
  color: var(--black);
  font-weight: var(--font-weight-semibold);
}

.preview-ws-product-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--gray-light);
  font-size: var(--font-size-sm);
}

.preview-ws-product-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.preview-ws-product-name {
  flex: 1;
  color: var(--black);
}

.preview-ws-product-status {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

/* ── Activity Preview: Report Table of Contents (Style A) ── */
.activity-toc { display: flex; flex-direction: column; gap: 0; }
.activity-toc-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--gray-light);
}

.activity-toc-item:last-child {
  border-bottom: none;
}

.activity-toc-num {
  font-size: var(--font-size-sm);
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-bold);
  color: var(--gray-light);
  width: 18px;
  flex-shrink: 0;
}

.activity-toc-item:first-child .activity-toc-num {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--fuchsia);
}

.activity-toc-name {
  font-size: var(--font-size-sm);
  font-family: var(--font-family-base);
  color: var(--gray-dark);
  font-weight: var(--font-weight-medium);
  flex: 1;
}

.activity-toc-item:first-child .activity-toc-name {
  color: var(--black);
  font-weight: var(--font-weight-semibold);
}

.activity-toc-bar {
  height: 12px;
  width: 48px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  background: var(--gradient-horizontal);
}

.activity-toc-name-skeleton {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-sm);
  background: var(--gray-background);
}


