/*
 * Guest Post Buddy – dashboard.css
 * Styles specific to the Publisher Dashboard
 */

.gpb-dashboard {
  position: fixed;
  top: var(--header-height, 72px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  overflow: hidden;
  padding: 0;
  background: #F5F5F9;
}
.gpb-dashboard > .container {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  height: 100%;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  align-items: stretch;
  height: 100%;
  overflow: hidden;
}

/* Sidebar */
.dash-sidebar {
  background: #FFFFFF;
  border-radius: 0;
  border: none;
  border-right: 1px solid rgba(0,0,0,0.06);
  box-shadow: 1px 0 0 rgba(0,0,0,0.04);
  height: 100%;
  overflow: hidden;
  position: relative;
  top: auto;
  display: flex;
  flex-direction: column;
}

.dash-profile {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;            /* pinned to top */
}

.dash-avatar {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.dash-profile-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dash-profile-info strong {
  font-size: 1.05rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.dash-profile-info span {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.dash-nav {
  padding: var(--space-sm) 0;
  flex: 1;                   /* fills space between profile and stats */
  overflow-y: auto;
  min-height: 0;             /* required for flex overflow to work */
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--space-lg);
  color: var(--clr-text);
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.dash-nav-link svg {
  color: var(--clr-text-light);
  transition: color 0.2s;
}

.dash-nav-link:hover {
  background: var(--clr-bg);
  color: var(--clr-primary);
}

.dash-nav-link:hover svg {
  color: var(--clr-primary);
}

.dash-nav-link.active {
  background: var(--clr-primary-light);
  color: var(--clr-primary-dark);
  border-left-color: var(--clr-primary);
  font-weight: 600;
}

.dash-nav-link.active svg {
  color: var(--clr-primary);
}

.nav-badge {
  background: var(--clr-warning);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

.dash-sidebar-stats {
  padding: var(--space-lg);
  border-top: 1px solid var(--clr-border);
  background: var(--clr-bg);
  border-radius: 0;
  display: flex;
  justify-content: space-between;
  text-align: center;
  flex-shrink: 0;            /* pinned to bottom */
  margin-top: auto;
}

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

.ds-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--clr-dark);
  line-height: 1.2;
}

.ds-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* Main Area */
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: 1rem;
}

.dash-section-header h1,
.dash-section-header h2 {
  margin: 0;
  font-size: 1.75rem;
}

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

/* Dashboard Cards */
.dash-card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.dash-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--clr-bg);
}

.dash-card-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.dash-card-body {
  padding: 20px;
}

/* Table */
.dash-table-wrap {
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.dash-table th,
.dash-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--clr-border);
}

.dash-table th {
  background: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clr-text-muted);
}

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

/* Websites List */
.dash-websites-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.dash-website-row {
  padding: 20px;
}

.dwr-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.dwr-name {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.dwr-url {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  display: block;
  margin-bottom: 12px;
}

.dwr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--clr-text-light);
  background: var(--clr-bg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--clr-border);
}

.dwr-meta strong {
  color: var(--clr-dark);
}

.dwr-status {
  flex-shrink: 0;
}

.dwr-reject-reason {
  margin-bottom: 16px;
  padding: 12px;
  background: #FEF2F2;
  border-left: 3px solid var(--clr-danger);
  color: #991B1B;
  font-size: 0.9rem;
  border-radius: 4px;
}

.dwr-live-link {
  margin-bottom: 16px;
}

.dwr-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--clr-bg);
  padding-top: 16px;
}

/* Empty State */
.dash-empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--clr-surface);
  border: 1px dashed var(--clr-border);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.dash-empty-state h3 {
  margin-bottom: 8px;
}

.dash-empty-state p {
  margin-bottom: 24px;
  color: var(--clr-text-muted);
}

/* Lock page scroll when dashboard is mounted — hides the default browser scrollbar */
html:has(.gpb-dashboard),
body:has(.gpb-dashboard) { overflow: hidden; }

/* ── Custom scrollbar – #6159fd ── */
.dash-main::-webkit-scrollbar,
.dash-nav::-webkit-scrollbar    { width: 4px; }
.dash-main::-webkit-scrollbar-track,
.dash-nav::-webkit-scrollbar-track  { background: transparent; }
.dash-main::-webkit-scrollbar-thumb,
.dash-nav::-webkit-scrollbar-thumb  { background: #6159fd; border-radius: 4px; }
.dash-main { scrollbar-width: thin; scrollbar-color: #6159fd transparent; }
.dash-nav  { scrollbar-width: thin; scrollbar-color: #6159fd transparent; }

/* Mobile sidebar overlay */
.dash-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 199;
}
.dash-sidebar-overlay.active { display: block; }

/* Main content area – scrolls independently */
.dash-main {
  height: 100%;
  overflow-y: auto;
  padding: var(--space-xl);
  background: var(--clr-bg);
}

/* Mobile */
.dash-mobile-toggle {
  display: none;
  background: var(--clr-primary);
  color: #fff;
  border: none;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  margin-bottom: var(--space-md);
  cursor: pointer;
  width: 100%;
  text-align: center;
  font-size: 1rem;
  min-height: 52px;
}

.dash-mobile-toggle:active {
  background: var(--clr-primary-dark);
  transform: scale(0.98);
}

@media (max-width: 900px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 56px 1fr;
    gap: 0;
  }

  .dash-sidebar {
    display: none;
    position: fixed;
    top: var(--header-height, 72px);
    left: 0;
    bottom: 0;
    width: 260px;
    height: auto;
    z-index: 200;
    border-radius: 0;
    border-right: 1px solid var(--clr-border);
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    animation: none;
  }

  .dash-sidebar.mobile-open {
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
  }

  .dash-main {
    padding: var(--space-md);
  }

  .dwr-main {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  .dash-website-row {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--clr-border);
  }

  .dwr-actions {
    flex-direction: column;
    gap: 10px;
  }

  .dwr-actions .btn {
    width: 100%;
    margin: 4px 0;
  }

  .dash-table-wrap {
    margin: 0 -16px;
    padding: 0 16px;
  }

  .dash-table {
    min-width: 800px;
  }

  .dash-card {
    margin-bottom: 20px;
  }

  .dash-card-header {
    padding: 16px;
  }

  .dash-card-body {
    padding: 16px;
  }

  .dash-stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dash-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .dash-section-header h1,
  .dash-section-header h2 {
    font-size: 1.5rem;
  }

  .dash-profile {
    padding: 16px;
  }

  .dash-nav-link {
    padding: 16px 20px;
    font-size: 1rem;
  }

  .dash-sidebar-stats {
    padding: 16px;
    flex-wrap: wrap;
    gap: 20px;
  }

  .ds-stat {
    flex: 1;
    min-width: 45%;
  }
}

/* Tablets / medium phones: 2-col stats instead of 1-col */
@media (min-width: 481px) and (max-width: 899px) {
  .dash-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Prevent dash-table overflow from breaking page layout */
.dash-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
  .dash-table {
    min-width: 600px;
  }

  .dash-website-row {
    padding: 14px;
  }

  .dwr-meta {
    flex-direction: column;
    gap: 8px;
  }

  .dwr-status {
    align-self: flex-start;
  }

  .dash-empty-state {
    padding: 30px 16px;
  }

  .empty-icon {
    font-size: 2.5rem;
  }

  .dash-nav-link {
    padding: 18px 20px;
  }

  .nav-badge {
    margin-left: 8px;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dashboard accessibility improvements */
.dash-nav-link:focus {
  outline: 3px solid var(--clr-primary);
  outline-offset: 2px;
}

.dash-mobile-toggle:focus {
  outline: 3px solid var(--clr-primary);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .dash-sidebar.mobile-open {
    animation: none;
  }

  .dash-mobile-toggle:active {
    transform: none;
  }
}

/* Password input with toggle button */
.input-password-wrap {
  position: relative;
}
.input-password-wrap .form-control {
  padding-right: 44px;
}
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  color: var(--clr-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  line-height: 1;
}
.toggle-password:hover { color: var(--clr-primary); }

/* (Dark mode removed) */

/* ══════════════════════════════════════════
   NEW FEATURES v2
   ══════════════════════════════════════════ */

/* Avatar with uploaded image */
.dash-avatar--img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

/* Favourite button on directory cards */
.card-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.card-strip-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.gpb-fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-light);
  border-radius: 50%;
  transition: color 0.2s, transform 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.gpb-fav-btn:hover { color: #FBBF24; transform: scale(1.2); }
.gpb-fav-btn.active { color: #FBBF24; }
.gpb-fav-btn.active svg { fill: #FBBF24; }

/* Dashboard website cards grid */
.dash-websites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.dash-section-sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--space-xl) 0 var(--space-md);
}
.dash-section-sub-header h3 { margin: 0; font-size: 1.1rem; }

/* Individual dashboard website card */
.dash-wcard {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.dash-wcard:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.dwc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.dwc-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.dwc-favicon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--clr-bg);
}
.dwc-name {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.dwc-url {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.dwc-url:hover { color: var(--clr-primary); }

.dwc-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--clr-bg);
  border-radius: var(--radius-md);
  padding: 10px 8px;
}
.dwc-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.dwc-mv {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--clr-dark);
  line-height: 1.1;
}
.dwc-mk {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clr-text-muted);
  font-weight: 600;
}

.dwc-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dwc-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--clr-bg);
  padding-top: 14px;
  margin-top: auto;
}
.dwc-actions .btn { flex: 1; justify-content: center; }

/* Search + action row in My Websites header */
.dash-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dash-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--clr-text-muted);
  min-width: 220px;
}
.dash-search-input {
  border: none;
  background: none;
  outline: none;
  font-size: 0.875rem;
  color: var(--clr-text);
  width: 100%;
}
.dash-search-input::placeholder { color: var(--clr-text-muted); }

/* My Websites pagination */
.dash-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-xl);
}
.dash-pagination .dp-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clr-text);
  cursor: pointer;
  transition: all 0.2s;
}
.dash-pagination .dp-btn:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.dash-pagination .dp-btn.active { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }

/* Avatar upload block */
.dash-avatar-upload {
  display: flex;
  align-items: center;
  gap: 20px;
}
.dau-preview-wrap {
  position: relative;
  flex-shrink: 0;
}
.dau-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--clr-border);
}
.dau-preview--initials {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
}
.dau-edit-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  background: var(--clr-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.dau-edit-btn:hover { background: var(--clr-primary-dark); }
.dau-info { display: flex; flex-direction: column; gap: 6px; }
.dau-hint { font-size: 0.8rem; color: var(--clr-text-muted); margin: 0; }

/* Edit website modal – wider box */
.modal-box--wide {
  max-width: 780px;
  width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #1E40AF;
  margin-bottom: 18px;
  line-height: 1.5;
}
.modal-info-banner svg { flex-shrink: 0; margin-top: 1px; }
.edit-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.edit-modal-grid--full { grid-column: 1 / -1; }
.modal-actions {
  display: flex;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--clr-border);
  margin-top: 4px;
}
.req { color: var(--clr-danger); }

@media (max-width: 600px) {
  .edit-modal-grid { grid-template-columns: 1fr; }
  .dash-websites-grid { grid-template-columns: 1fr; }
  .dash-header-actions { flex-direction: column; align-items: stretch; }
  .dash-search-wrap { min-width: 0; }
  .dwc-metrics { grid-template-columns: repeat(2, 1fr); }
  .dash-avatar-upload { flex-direction: column; align-items: flex-start; }
  .modal-actions { flex-direction: column; }
}

/* ═════════════════════════════════════════
   PREMIUM PUBLISHER DASHBOARD OVERRIDES
   ═════════════════════════════════════════ */

/* Sidebar profile section */
.dash-profile {
  border-bottom-color: rgba(0,0,0,0.06);
  padding: 20px;
}
.dash-avatar {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.dash-profile-info strong { letter-spacing: -0.01em; font-size: 1rem; }

/* Sidebar nav links */
.dash-nav-link {
  border-radius: 10px;
  margin: 1px 8px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.12s cubic-bezier(0.4,0,0.2,1);
}
.dash-nav-link:hover {
  background: rgba(99,102,241,0.06);
  color: var(--clr-primary);
  padding-left: 18px;
}
.dash-nav-link.active {
  background: rgba(99,102,241,0.09);
  color: var(--clr-primary);
  font-weight: 600;
  box-shadow: none;
}
.dash-nav-label { font-size: 0.67rem; letter-spacing: 0.07em; color: #A1A1AA; padding: 0 16px 6px; margin-top: 8px; }

/* Main content area */
.dash-main { background: #F5F5F9; }
.dash-section-header { border-bottom-color: rgba(0,0,0,0.06); }
.dash-section-title { letter-spacing: -0.02em; font-size: 1.2rem; }

/* Stats cards */
.dash-stat-card {
  border-radius: 16px !important;
  border-color: rgba(0,0,0,0.055) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1) !important;
}
.dash-stat-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 32px rgba(99,102,241,0.12) !important;
  border-color: rgba(99,102,241,0.12) !important;
}
.dash-stat-value { letter-spacing: -0.03em; }

/* Website cards in dashboard */
.dash-website-card {
  border-radius: 16px !important;
  border-color: rgba(0,0,0,0.055) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1) !important;
  background: #FFFFFF !important;
}
.dash-website-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 16px 40px rgba(99,102,241,0.12), 0 4px 12px rgba(0,0,0,0.06) !important;
  border-color: rgba(99,102,241,0.14) !important;
}

/* DWC metrics grid */
.dwc-metrics {
  background: rgba(245,245,249,0.7);
  border-top: 1px solid rgba(0,0,0,0.055);
  border-bottom: 1px solid rgba(0,0,0,0.055);
}
.dwc-metric-val { letter-spacing: -0.02em; }

/* Status badges */
.dwc-status-badge { border-radius: 8px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em; }

/* Modal refinement */
.modal-box { border-radius: 24px !important; border: 1px solid rgba(0,0,0,0.07) !important; }
.modal-actions { border-top-color: rgba(0,0,0,0.06); }
.modal-info-banner { border-radius: 12px; }

/* Search and filter bar */
.dash-search-wrap input { border-radius: 10px; border-color: rgba(0,0,0,0.09); }
.dash-search-wrap input:focus { border-color: var(--clr-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }

/* Section headings */
.dash-header-title { letter-spacing: -0.025em; }

/* Edit form */
.edit-modal-grid .form-control { border-radius: 10px; }
.gpb-ad-edit-input { border-radius: 10px; font-size: 0.875rem; }
.gpb-ad-edit-input:focus { border-color: var(--clr-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }

/* Additional premium dashboard modules */
.dash-intelligence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
.dash-intelligence-card .dash-card-header h3 {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.dash-mini-chart {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 0.4rem;
  height: 90px;
  margin-bottom: 0.8rem;
}
.dash-mini-chart span {
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #8B5CF6 0%, #6366F1 100%);
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.18);
}
.dash-insight-copy {
  margin: 0;
  font-size: 0.83rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
}
.dash-activity-list {
  display: grid;
  gap: 0.75rem;
}
.dash-activity-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 0.38rem;
  background: #22C55E;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}
.dash-activity-list strong {
  display: block;
  font-size: 0.84rem;
}
.dash-activity-list small {
  font-size: 0.74rem;
  color: var(--clr-text-light);
}
.dash-noti-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--clr-border);
  padding: 0.46rem 0;
  font-size: 0.84rem;
}
.dash-noti-row strong {
  color: var(--clr-text);
  font-size: 0.81rem;
}

@media (max-width: 1024px) {
  .dash-intelligence-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .dash-intelligence-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════
   PERFORMANCE INSIGHTS — stat grid
   ══════════════════════════════════════ */
.dpi-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.dpi-stat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--clr-bg);
  border-radius: 12px;
  padding: 11px 13px;
  border: 1px solid var(--clr-border);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dpi-stat:hover {
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.07);
}
.dpi-stat--month {
  grid-column: 1 / -1;
  background: rgba(99, 102, 241, 0.04);
  border-color: rgba(99, 102, 241, 0.18);
}
.dpi-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dpi-icon-month    { background: rgba(99,  102, 241, 0.12); color: var(--clr-primary); }
.dpi-icon-approved { background: rgba(16,  185, 129, 0.12); color: var(--clr-success); }
.dpi-icon-pending  { background: rgba(245, 158,  11, 0.12); color: var(--clr-warning); }
.dpi-icon-rejected { background: rgba(239,  68,  68, 0.12); color: var(--clr-danger);  }
.dpi-stat-info { min-width: 0; }
.dpi-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 3px;
  color: var(--clr-dark);
}
.dpi-stat--month .dpi-stat-value {
  font-size: 1.55rem;
  color: var(--clr-primary);
}
.dpi-stat-label { font-size: 0.76rem; color: var(--clr-text-muted); font-weight: 500; }
.dpi-stat-sub   { font-size: 0.68rem; color: var(--clr-text-light);  margin-top: 2px;  }
.dpi-approved-val { color: var(--clr-success); }
.dpi-pending-val  { color: var(--clr-warning); }
.dpi-rejected-val { color: var(--clr-danger);  }

/* Approval Rate bar */
.dpi-approval-rate { margin-top: 0; }
.dpi-ar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.78rem;
  color: var(--clr-text-muted);
}
.dpi-ar-header strong { color: var(--clr-dark); font-weight: 700; font-size: 0.85rem; }
.dpi-ar-bar {
  height: 6px;
  background: var(--clr-border);
  border-radius: 999px;
  overflow: hidden;
}
.dpi-ar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6C63FF, #818CF8);
  border-radius: 999px;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.dpi-ar-sub { font-size: 0.71rem; color: var(--clr-text-light); margin-top: 5px; }

@media (max-width: 480px) {
  .dpi-stats-grid { grid-template-columns: 1fr; }
  .dpi-stat--month { grid-column: auto; }
}

/* ══════════════════════════════════════
   MOBILE TOP BAR  (dashboard, ≤900px only)
   ══════════════════════════════════════ */
.dash-mobile-bar { display: none; }

@media (max-width: 900px) {
  .dash-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 56px;
    min-height: 56px;
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
  }

  /* Left: user avatar button */
  .dmb-user { position: relative; }
  .dmb-user-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .dmb-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.88rem;
  }
  .dmb-avatar--img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
  }

  /* Right-side dropdowns: both open downward, right-aligned */
  .dmb-dropdown,
  .dmb-nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: auto;
    min-width: 180px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 1010;
  }
  .dmb-dropdown.open,
  .dmb-nav-dropdown.open {
    display: flex;
  }
  .dmb-dropdown a,
  .dmb-nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--clr-text);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.12s;
  }
  .dmb-dropdown a:hover,
  .dmb-nav-dropdown a:hover {
    background: var(--clr-bg);
  }
  .dmb-dropdown a.dropdown-logout,
  .dmb-nav-dropdown a.dropdown-logout { color: var(--clr-danger); }
  .dmb-dropdown .dropdown-divider,
  .dmb-nav-dropdown .dropdown-divider {
    height: 1px;
    background: var(--clr-border);
    margin: 4px 0;
  }

  /* Center: page label */
  .dmb-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--clr-dark);
    letter-spacing: -0.01em;
    pointer-events: none;
  }

  /* Right group: globe nav + avatar */
  .dmb-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .dmb-nav { position: relative; }

  /* Globe nav button — same visual weight as sidebar toggle */
  .dmb-nav-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--clr-bg);
    border: 1.5px solid var(--clr-border);
    border-radius: 10px;
    cursor: pointer;
    color: var(--clr-dark);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
  }
  .dmb-nav-btn:hover {
    background: rgba(99, 102, 241, 0.07);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--clr-primary);
  }
  .dmb-nav-btn.is-open {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #fff;
  }

  /* Left: sidebar toggle */
  .dmb-toggle {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--clr-bg);
    border: 1.5px solid var(--clr-border);
    border-radius: 10px;
    cursor: pointer;
    color: var(--clr-dark);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
  }
  .dmb-toggle:hover {
    background: rgba(99, 102, 241, 0.07);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--clr-primary);
  }
  .dmb-toggle.is-open {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #fff;
  }
}