/* ============================================
   GREP Library - Styles v3.2
   Clean version - no duplicates
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #1a1a1a;
  --bg-darker: #141414;
  --bg-panel: #242424;
  --bg-header: #2d2d2d;
  --bg-input: #1f1f1f;
  --bg-row: #222222;
  --bg-row-hover: #2a2a2a;
  --border: #3d3d3d;
  --border-light: #4a4a4a;
  
  --text-primary: #FFFFFF;
  --text-secondary: #F0F0F0;
  --text-muted: #D0D0D0;
  --text-dim: #A0A0A0;
  
  --accent: #7DB8FF;
  --accent-hover: #A8D0FF;
  --success: #4ADE80;
  --warning: #FCD34D;
  --pending: #FBBF24;
  --error: #F87171;
  --community: #FBBF24;
  
  --header-height: 48px;
  --card-radius: 4px;
  --transition-fast: 0.15s ease;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--bg-panel);
  min-height: 100vh;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   Header
   ============================================ */

.header {
  background: var(--bg-header);
  padding: 0 20px;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-home {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}

.header-home:hover {
  text-decoration: underline;
}

.header-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-cta {
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================
   Pending Banner
   ============================================ */

.pending-banner {
  background: linear-gradient(90deg, #7C2D12 0%, #92400E 100%);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.pending-banner-icon {
  font-size: 18px;
}

.pending-banner-text {
  color: #FEF3C7;
  font-size: 14px;
}

.pending-banner-btn {
  background: #FEF3C7;
  color: #78350F;
  padding: 8px 18px;
  border-radius: var(--card-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.pending-banner-btn:hover {
  background: #FDE68A;
}

/* ============================================
   Stats Bar
   ============================================ */

.stats-bar {
  background: var(--bg-darker);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 40px;
  border-bottom: 1px solid var(--border);
}

.stat-item {
  display: flex;
  flex-direction: column;
  min-width: 60px;
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-number.verified-color { color: var(--success); }
.stat-number.community-color { color: var(--community); }
.stat-number.pending-color { color: var(--pending); }

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.stats-legend {
  margin-left: auto;
  display: flex;
  gap: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.verified { background: var(--success); }
.legend-dot.community { background: var(--community); }

/* ============================================
   Pending Hero
   ============================================ */

.pending-hero {
  background: linear-gradient(135deg, #78350F 0%, #92400E 50%, #B45309 100%);
  padding: 50px 20px;
  text-align: center;
}

.pending-hero-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.pending-hero-title {
  font-size: 28px;
  font-weight: 700;
  color: #FEF3C7;
  margin-bottom: 15px;
}

.pending-hero-text {
  color: #FDE68A;
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 30px;
}

.pending-hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 25px;
}

.pending-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pending-hero-stat-number {
  font-size: 48px;
  font-weight: 800;
  color: #FEF3C7;
}

.pending-hero-stat-label {
  font-size: 14px;
  color: #FDE68A;
  margin-top: 8px;
}

.pending-hero-cta {
  color: #FEF3C7;
  font-size: 15px;
}

/* ============================================
   Filters Section
   ============================================ */

.filters-section {
  background: var(--bg-darker);
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}

.filters-label {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 35px 10px 14px;
  border-radius: var(--card-radius);
  font-size: 14px;
  width: 260px;
  min-height: 40px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B8B8B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

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

.filter-buttons {
  display: flex;
  gap: 0;
}

.filter-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 18px;
  font-size: 14px;
  min-height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:first-child {
  border-radius: var(--card-radius) 0 0 var(--card-radius);
}

.filter-btn:last-child {
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
}

.filter-btn:not(:last-child) {
  border-right: none;
}

.filter-btn:hover {
  background: var(--bg-header);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
  font-weight: 600;
}

.filter-btn .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.filter-btn .dot.verified { background: var(--success); }
.filter-btn .dot.community { background: var(--community); }

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: 40px;
  border-radius: var(--card-radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #000000;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--bg-header);
  color: var(--text-primary);
}

/* ============================================
   Results Header
   ============================================ */

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  visibility: hidden;
}

.results-info {
  color: var(--text-secondary);
  font-size: 14px;
}

.search-wrapper {
  position: relative;
  width: 260px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  font-size: 14px;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px 10px 38px;
  border-radius: var(--card-radius);
  font-size: 14px;
  min-height: 40px;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-input::placeholder {
  color: var(--text-dim);
}

/* ============================================
   GREP Table
   ============================================ */

.greps-table-header {
  display: none;
}

.greps-list {
  min-height: 300px;
}

.grep-row {
  border-bottom: 1px solid var(--border);
  background: var(--bg-row);
}

.grep-row:hover {
  background: var(--bg-row-hover);
}

.grep-row.pending-row {
  border-left: 3px solid var(--pending);
}

.grep-row-main {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(200px, 1.5fr) minmax(200px, 1.5fr) 70px;
  gap: 15px;
  padding: 12px 20px;
  min-height: 65px;
  cursor: pointer;
  align-items: center;
}

.col-name {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grep-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grep-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.grep-status.verified { background: var(--success); }
.grep-status.community { background: var(--community); }
.grep-status.pending {
  background: var(--pending);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.grep-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.grep-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--bg-input);
  border-radius: 3px;
  color: var(--text-muted);
}

.votes-needed {
  font-size: 12px;
  color: var(--pending);
  font-style: italic;
}

.col-find, .col-change {
  display: flex;
  align-items: center;
}

/* Code box - FIND/CHANGE fields */
.code-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
}

.code-box:hover {
  border-color: var(--accent);
}

.code-box .code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.code-box .code.empty {
  color: var(--text-dim);
  font-style: italic;
}

.code-box .copy-icon {
  opacity: 0.3;
  font-size: 12px;
  flex-shrink: 0;
}

.code-box:hover .copy-icon {
  opacity: 1;
}

.code-box.copied {
  border-color: var(--success);
  background: rgba(74, 222, 128, 0.1);
}

.code-box.copied .code {
  color: var(--success);
}

.col-source {
  display: none;
}

.col-likes {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vote-btn {
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.6;
  padding: 6px 8px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vote-btn:hover {
  opacity: 1;
  border-color: var(--border);
  transform: scale(1.05);
}

.vote-btn.voted {
  opacity: 1;
  background: rgba(74, 222, 128, 0.15);
  border-color: var(--success);
}

.vote-count {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
}

/* Expanded Row */
.grep-row.expanded {
  background: var(--bg-darker);
}

.grep-expanded {
  padding: 20px 20px 25px 40px;
  border-top: 1px solid var(--border);
}

.example-section {
  background: var(--bg-input);
  padding: 16px;
  border-radius: var(--card-radius);
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.example-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 600;
}

.example-content {
  font-family: 'Consolas', monospace;
  color: var(--text-secondary);
  font-size: 14px;
}

.description-section {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.group-section {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.group-section a {
  color: var(--accent);
  text-decoration: none;
}

.group-section a:hover {
  text-decoration: underline;
}

/* ============================================
   Empty State & Loading
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  min-height: 300px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 56px;
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-state-text {
  font-size: 15px;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px;
  min-height: 300px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.load-more {
  display: block;
  width: 100%;
  padding: 18px;
  text-align: center;
  border: none;
  border-top: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg-row);
}

.load-more:hover {
  background: var(--bg-row-hover);
  color: var(--text-primary);
}

/* ============================================
   Toast
   ============================================ */

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 14px 24px;
  background: var(--bg-header);
  color: var(--text-primary);
  border-radius: var(--card-radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--error);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.footer a {
  color: var(--accent);
  text-decoration: underline;
}

.footer a:hover {
  color: var(--accent-hover);
}

/* ============================================
   Screen Reader Only
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   Responsive - Tablet
   ============================================ */

@media (max-width: 1200px) {
  .grep-row-main {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.5fr) minmax(180px, 1.5fr) 60px;
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .grep-row-main {
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1.5fr) minmax(150px, 1.5fr) 60px;
    gap: 10px;
  }
}

/* ============================================
   Responsive - Mobile
   ============================================ */

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    padding: 15px;
    gap: 12px;
  }
  
  .header-left,
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .header-cta {
    display: none;
  }
  
  .stats-bar {
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px;
  }
  
  .stats-legend {
    width: 100%;
    margin-left: 0;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
  
  .pending-banner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .pending-hero {
    padding: 40px 20px;
  }
  
  .pending-hero-icon {
    font-size: 48px;
  }
  
  .pending-hero-title {
    font-size: 22px;
  }
  
  .pending-hero-stat-number {
    font-size: 40px;
  }
  
  .filters-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .filter-select {
    width: 100%;
  }
  
  .filter-buttons {
    width: 100%;
  }
  
  .filter-btn {
    flex: 1;
    justify-content: center;
  }
  
  .results-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .search-wrapper {
    width: 100%;
  }
  
  /* Mobile GREP row - stack vertically */
  .grep-row {
    position: relative;
  }
  
  .grep-row-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
  }
  
  .col-name {
    width: 100%;
    padding-right: 60px;
  }
  
  /* FIND and CHANGE stacked */
  .col-find,
  .col-change {
    width: 100%;
    display: flex !important;
  }
  
  .code-box {
    width: 100%;
    max-width: 100%;
  }
  
  .col-source {
    width: 100%;
  }
  
  /* Likes in top right */
  .col-likes {
    position: absolute;
    right: 15px;
    top: 15px;
  }
  
  .grep-expanded {
    padding: 20px 15px;
  }
  
  .empty-state,
  .loading {
    min-height: 200px;
    padding: 50px 20px;
  }
}

@media (max-width: 480px) {
  .header-title {
    font-size: 14px;
  }
  
  .stat-number {
    font-size: 20px;
  }
  
  .btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .pending-hero-title {
    font-size: 20px;
  }
  
  .pending-hero-stat-number {
    font-size: 36px;
  }
}

/* ============================================
   Form Styles (for submit/admin pages)
   ============================================ */

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 600;
}

.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: var(--card-radius);
  font-size: 14px;
  min-height: 44px;
}

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

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ============================================
   Modal
   ============================================ */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-panel);
  border-radius: var(--card-radius);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
}

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

.modal-title {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 24px;
  padding: 4px 8px;
  line-height: 1;
}

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

.modal-body {
  padding: 20px;
}

.modal-grep-name {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  padding: 10px;
  background: var(--bg-darker);
  border-radius: var(--card-radius);
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.report-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.report-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.meta-user {
  font-size: 12px;
  color: var(--text-dim);
}

.meta-user a {
  color: var(--accent);
  text-decoration: none;
}

.meta-user a:hover {
  text-decoration: underline;
}

.meta-source {
  font-size: 12px;
  color: var(--text-dim);
}

.meta-source a {
  color: var(--accent);
  text-decoration: none;
}

.meta-source a:hover {
  text-decoration: underline;
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
  min-height: 32px;
}

/* ============================================
   Report Items (Admin)
   ============================================ */

.report-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-row);
}

.report-item.report-new {
  border-left: 3px solid var(--warning);
  background: rgba(251, 191, 36, 0.05);
}

.report-item.report-resolved {
  opacity: 0.7;
}

.report-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.report-type {
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--bg-input);
}

.report-type-suggestion { background: var(--accent); color: #000; }
.report-type-error { background: var(--error); color: #fff; }
.report-type-duplicate { background: var(--warning); color: #000; }
.report-type-spam { background: var(--error); color: #fff; }

.report-date {
  font-size: 12px;
  color: var(--text-dim);
}

.report-status {
  font-size: 12px;
  margin-left: auto;
}

.report-grep {
  margin-bottom: 10px;
  font-size: 14px;
}

.report-message {
  background: var(--bg-input);
  padding: 12px;
  border-radius: var(--card-radius);
  margin-bottom: 10px;
  font-size: 14px;
  white-space: pre-wrap;
}

.report-from {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.report-notes {
  font-size: 13px;
  color: var(--success);
  margin-bottom: 10px;
  padding: 8px;
  background: rgba(74, 222, 128, 0.1);
  border-radius: var(--card-radius);
}

.report-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ============================================
   Admin Styles
   ============================================ */

.login-section {
  max-width: 400px;
  margin: 80px auto;
  padding: 30px;
  background: var(--bg-darker);
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
}

.login-title {
  text-align: center;
  margin-bottom: 24px;
  font-size: 20px;
}

.admin-toolbar {
  padding: 15px 20px;
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-tab {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--card-radius);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}

.admin-tab:hover {
  background: var(--bg-header);
  color: var(--text-primary);
}

.admin-tab.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

.bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-success {
  background: var(--success);
  color: #000;
}

.btn-success:hover {
  background: #6ee7a0;
}

.btn-danger {
  background: var(--error);
  color: #fff;
}

.btn-danger:hover {
  background: #f87171;
}

.checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* Admin item row adjustments - only for admin page with checkbox */
.admin-grep-row .grep-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Admin panel specific - override grid for checkbox rows */
#adminContent .grep-row-main {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
}

#adminContent .grep-row {
  border-bottom: 1px solid var(--border);
}

#adminContent .grep-name {
  flex: 1;
  min-width: 150px;
}

#adminContent code {
  flex-shrink: 0;
}

/* ============================================
   SSR / SEO PAGE STYLES
   ============================================ */

/* Breadcrumbs */
.breadcrumbs {
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs .separator {
  margin: 0 8px;
  color: var(--border);
}

.breadcrumbs .current {
  color: var(--text);
}

/* GREP Detail Page */
.grep-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.grep-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text);
  line-height: 1.3;
}

.grep-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.grep-meta .verified {
  color: var(--success);
}

.danger-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
}

/* Pattern Boxes - SSR pages only */
.grep-patterns .pattern-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.pattern-box label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pattern-box code.pattern {
  display: block;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 15px;
  color: var(--accent);
  background: var(--bg-darker);
  padding: 12px 16px;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 12px;
}

.pattern-box .copy-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.pattern-box .copy-btn:hover {
  background: var(--accent-hover);
}

.pattern-note {
  color: var(--text-muted);
  font-style: italic;
  font-size: 14px;
}

/* Sections */
.grep-description,
.grep-examples,
.grep-use-cases,
.grep-note,
.grep-video,
.grep-related {
  margin-bottom: 32px;
}

.grep-detail h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text);
}

.grep-description p {
  line-height: 1.7;
  color: var(--text-muted);
}

/* Example Box */
.example-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.example-before,
.example-after {
  flex: 1;
}

.example-box label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.example-box code {
  display: block;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 14px;
  background: var(--bg-darker);
  padding: 10px 12px;
  border-radius: 4px;
}

.example-arrow {
  font-size: 24px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Use Cases List */
.grep-use-cases ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.grep-use-cases li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--text-muted);
}

.grep-use-cases li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
}

/* Creator Note */
.grep-note {
  background: rgba(79, 172, 254, 0.1);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 16px;
}

.grep-note h2 {
  color: var(--accent);
}

/* Related GREPs */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.related-name {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 6px;
}

.related-pattern {
  display: block;
  font-size: 12px;
  color: var(--accent);
  background: var(--bg-darker);
  padding: 4px 8px;
  border-radius: 3px;
}

/* Attribution */
.grep-attribution {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.grep-attribution a {
  color: var(--accent);
}

/* Group Page */
.group-page {
  max-width: 1000px;
  margin: 0 auto;
}

.group-header {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 32px;
}

.group-header h1 {
  font-size: 32px;
  margin: 0 0 12px 0;
}

.group-description {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0 0 8px 0;
}

.group-count {
  font-size: 14px;
  color: var(--accent);
  margin: 0;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

/* Responsive */
@media (max-width: 600px) {
  .grep-title {
    font-size: 22px;
  }
  
  .example-box {
    flex-direction: column;
  }
  
  .example-arrow {
    transform: rotate(90deg);
  }
}
