/* App pages: browse, profile, admin — GigNexus */

.app-main { min-height: calc(100vh - 60px); padding: 40px 24px; }
.app-container { max-width: var(--max-width); margin: 0 auto; }

.app-header { margin-bottom: 36px; }
.app-header h1 { font-size: 2rem; margin-bottom: 8px; }
.app-subtitle { color: var(--fg-secondary); font-size: 1rem; }

/* Search / Filter Bar */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-select, .filter-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 10px 14px;
  outline: none;
}

.filter-select { min-width: 180px; cursor: pointer; }
.filter-input { min-width: 200px; flex: 1; }

.btn-search {
  background: var(--accent);
  color: #0a0f1a;
  border: none;
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-search:hover { background: var(--accent-dim); }

.btn-clear {
  color: var(--fg-secondary);
  font-size: 0.88rem;
  text-decoration: none;
}
.btn-clear:hover { color: var(--fg-primary); }

.results-meta {
  color: var(--fg-muted);
  font-size: 0.88rem;
  margin-bottom: 24px;
}
.results-meta a { color: var(--accent); }

/* Provider Grid */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, transform 0.2s;
}
.provider-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }

.provider-card-top { display: flex; justify-content: space-between; align-items: center; }

.provider-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.provider-rate {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--fg-primary);
}

.provider-name { font-size: 1.1rem; font-weight: 700; margin-top: 4px; }

.provider-location {
  font-size: 0.85rem;
  color: var(--fg-secondary);
}

.provider-desc {
  font-size: 0.88rem;
  color: var(--fg-secondary);
  line-height: 1.5;
  flex: 1;
}

.btn-view {
  display: inline-block;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s;
  margin-top: 8px;
}
.btn-view:hover { background: var(--accent); color: #0a0f1a; }

/* Profile Page */
.back-link { color: var(--fg-secondary); text-decoration: none; font-size: 0.9rem; display: inline-block; margin-bottom: 24px; }
.back-link:hover { color: var(--accent); }

.profile-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 24px;
}

.profile-category { font-size: 0.8rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.profile-name { font-size: 2rem; margin-bottom: 8px; }
.profile-location { color: var(--fg-secondary); font-size: 0.95rem; margin-bottom: 6px; }
.profile-rate { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--accent); }

.profile-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }
.profile-section h2 { font-size: 1.1rem; margin-bottom: 14px; }
.profile-description { color: var(--fg-secondary); line-height: 1.7; }

/* Contact Form */
.contact-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.88rem; font-weight: 600; color: var(--fg-secondary); }
.form-group input, .form-group textarea, .form-group select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 10px 14px;
  outline: none;
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-dim); }

.btn-primary {
  background: var(--accent);
  color: #0a0f1a;
  border: none;
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--accent-dim); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.contact-msg { padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; }
.contact-msg.success { background: var(--bg-card-accent); border: 1px solid var(--accent-dim); color: var(--accent); }
.contact-msg.error { background: rgba(248, 113, 113, 0.1); border: 1px solid var(--red-muted); color: var(--red-muted); }

/* Admin Page */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.admin-form-section h2, .admin-list-section h2 { font-size: 1.1rem; margin-bottom: 20px; }

.provider-form { display: flex; flex-direction: column; gap: 14px; }

.form-actions { display: flex; gap: 12px; margin-top: 4px; }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-secondary);
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--fg-muted); color: var(--fg-primary); }

.form-msg { padding: 10px 14px; border-radius: 8px; font-size: 0.88rem; margin-top: 4px; }
.form-msg.success { background: var(--bg-card-accent); border: 1px solid var(--accent-dim); color: var(--accent); }
.form-msg.error { background: rgba(248, 113, 113, 0.1); border: 1px solid var(--red-muted); color: var(--red-muted); }

/* Admin List */
.admin-list { display: flex; flex-direction: column; gap: 8px; max-height: 600px; overflow-y: auto; }

.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  gap: 12px;
}

.admin-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-item-info strong { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-item-meta { font-size: 0.78rem; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.admin-item-actions { display: flex; gap: 6px; flex-shrink: 0; }

.btn-edit, .btn-delete {
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-edit { background: var(--accent-glow); color: var(--accent); }
.btn-delete { background: rgba(248, 113, 113, 0.1); color: var(--red-muted); }
.btn-edit:hover, .btn-delete:hover { opacity: 0.8; }

.empty-state { color: var(--fg-muted); font-size: 0.9rem; padding: 20px 0; }

/* Browse page additions */

/* Search input wrapper for icon/pre-icon support */
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.filter-search { width: 100%; }

/* Category quick-filter pills */
.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.category-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.category-pill:hover { border-color: var(--accent-dim); color: var(--accent); }
.category-pill.active { background: var(--accent-glow); border-color: var(--accent-dim); color: var(--accent); }

/* Active filter tags shown next to result count */
.filter-tags { display: inline-flex; gap: 6px; margin-left: 8px; align-items: center; }
.filter-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--accent);
}

/* Pagination */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 40px; }
.page-btn {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--fg-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.page-btn:hover { border-color: var(--accent-dim); color: var(--accent); }
.page-btn.active { background: var(--accent-glow); border-color: var(--accent-dim); color: var(--accent); }
.page-prev, .page-next { color: var(--fg-primary); }

/* Responsive */
@media (max-width: 768px) {
  .admin-grid { grid-template-columns: 1fr; }
  .search-bar { flex-direction: column; }
  .filter-select, .filter-input { min-width: 100%; }
  .provider-grid { grid-template-columns: 1fr; }
}