/* Reset básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

a {
  color: #e74c3c;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

/* Navbar */
.navbar {
  background: #2c3e50;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.nav-brand {
  font-weight: bold;
  font-size: 1.25rem;
  color: white;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}

.nav-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

.nav-link:hover {
  color: white;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-user {
  opacity: 0.9;
}

/* Botões */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #e74c3c;
  color: white;
}

.btn-primary:hover {
  background: #c0392b;
  text-decoration: none;
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
  text-decoration: none;
}

.btn-danger {
  background: #e74c3c;
  color: white;
}

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

.btn-logout {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-logout:hover {
  background: rgba(255,255,255,0.1);
}

.btn-link {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Auth pages */
.auth-container {
  max-width: 400px;
  margin: 4rem auto;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-container h1 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-group label {
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #e74c3c;
}

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

.auth-form .btn {
  margin-top: 0.5rem;
  padding: 0.75rem;
}

.auth-link {
  margin-top: 1.5rem;
  text-align: center;
  color: #666;
}

.auth-link a {
  color: #e74c3c;
}

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fee;
  color: #c00;
  border: 1px solid #fcc;
}

/* Dashboard */
.dashboard h1 {
  margin-bottom: 0.5rem;
}

.dashboard > p {
  color: #666;
  margin-bottom: 2rem;
}

.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.action-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  text-decoration: none;
}

.action-card h2 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.action-card p {
  color: #666;
  font-size: 0.9rem;
}

/* Error page */
.error-page {
  text-align: center;
  padding: 4rem 2rem;
}

.error-page h1 {
  font-size: 4rem;
  color: #ccc;
}

.error-page p {
  margin: 1rem 0 2rem;
  color: #666;
}

/* ===================== */
/* PARTNERSHIPS          */
/* ===================== */

.partnerships-page {}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0;
}

/* Filters */
.filters-section {
  background: white;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.search-input:focus {
  outline: none;
  border-color: #e74c3c;
}

.btn-search {
  background: #e74c3c;
  color: white;
  padding: 0.75rem 1.25rem;
}

.btn-search:hover {
  background: #c0392b;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-group label {
  font-size: 0.8rem;
  color: #666;
  font-weight: 500;
}

.filter-group select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  min-width: 140px;
}

.filter-group select:focus {
  outline: none;
  border-color: #e74c3c;
}

.filter-checkboxes {
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.active-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.results-count {
  font-size: 0.9rem;
  color: #666;
}

.clear-filters {
  font-size: 0.9rem;
  color: #e74c3c;
}

.clear-filters:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group select {
    width: 100%;
  }

  .filter-checkboxes {
    flex-wrap: wrap;
  }
}

/* Sort Tabs */
.sort-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5rem;
}

.tab {
  padding: 0.5rem 1rem;
  color: #666;
  text-decoration: none;
  border-radius: 4px;
}

.tab:hover {
  background: #eee;
  text-decoration: none;
}

.tab.active {
  background: #e74c3c;
  color: white;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 8px;
  color: #666;
}

/* Partnership Card */
.partnerships-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.partnership-card {
  display: flex;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
}

.vote-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: #f8f9fa;
  min-width: 60px;
}

.vote-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #999;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.vote-btn:hover {
  color: #e74c3c;
}

.vote-btn.active.vote-up {
  color: #27ae60;
}

.vote-btn.active.vote-down {
  color: #e74c3c;
}

.score {
  font-weight: bold;
  font-size: 1.1rem;
  margin: 0.25rem 0;
}

.card-content {
  flex: 1;
  padding: 1rem 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.category {
  background: #fde8e8;
  color: #e74c3c;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 500;
}

.meta {
  color: #999;
  font-size: 0.85rem;
}

.card-content h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.card-content h2 a {
  color: #2c3e50;
}

.card-content h2 a:hover {
  color: #e74c3c;
}

.description {
  color: #666;
  margin-bottom: 0.75rem;
}

.owner-badge {
  background: #27ae60;
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.7rem;
  margin-left: 0.25rem;
  text-transform: uppercase;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tag {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.tag-looking {
  background: #fef3e2;
  color: #e67e22;
}

.tag-offering {
  background: #e8f8f5;
  color: #27ae60;
}

.card-footer {
  font-size: 0.85rem;
}

.comments-count a {
  color: #999;
}

.comments-count a:hover {
  color: #e74c3c;
}

/* Partnership Form */
.form-page {
  max-width: 700px;
  margin: 0 auto;
}

.form-page h1 {
  margin-bottom: 1.5rem;
}

.partnership-form {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.partnership-form .form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

/* Partnership Detail */
.partnership-detail {
  max-width: 800px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: #666;
}

.partnership-full {
  display: flex;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

.vote-section-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: #f8f9fa;
  min-width: 80px;
}

.vote-section-large .vote-btn {
  font-size: 1.5rem;
}

.vote-section-large .score {
  font-size: 1.5rem;
  margin: 0.5rem 0;
}

.partnership-content {
  flex: 1;
  padding: 1.5rem 2rem;
}

.partnership-header {
  margin-bottom: 1.5rem;
}

.partnership-header .category {
  margin-bottom: 0.5rem;
  display: inline-block;
}

.partnership-header h1 {
  font-size: 1.75rem;
  margin: 0.5rem 0;
}

.partnership-header .meta {
  color: #666;
}

.partnership-body .description {
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .details-grid {
    grid-template-columns: 1fr;
  }
}

.detail-box {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
}

.detail-box h3 {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.detail-box p {
  white-space: pre-wrap;
}

.owner-actions {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
  display: flex;
  gap: 1rem;
}

/* Comments Section */
.comments-section {
  margin-top: 2rem;
  background: white;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.comments-section h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.comment-form textarea {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

.comment-form textarea:focus {
  outline: none;
  border-color: #e74c3c;
}

.comment-form .btn {
  align-self: flex-end;
}

.no-comments {
  color: #999;
  font-style: italic;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.comment-header strong {
  color: #2c3e50;
}

.comment-date {
  color: #999;
  font-size: 0.85rem;
}

.comment-content {
  white-space: pre-wrap;
}

.delete-comment {
  margin-top: 0.5rem;
}

/* Home Hero */
.home-hero {
  text-align: center;
  padding: 2rem 1rem;
  margin-bottom: 2rem;
}

.home-hero h1 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.home-hero p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Auth prompt para visitantes */
.auth-prompt {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 1.5rem;
  color: #666;
}

.auth-prompt a {
  font-weight: 500;
}

/* Visibility toggle no formulário */
.visibility-options {
  display: flex;
  gap: 1rem;
}

.radio-label {
  flex: 1;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-card {
  display: block;
  padding: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.radio-card strong {
  display: block;
  margin-bottom: 0.25rem;
}

.radio-card small {
  color: #666;
  font-size: 0.85rem;
}

.radio-label input[type="radio"]:checked + .radio-card {
  border-color: #e74c3c;
  background: #fff0f0;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
}

/* Vote links para visitantes */
a.vote-btn {
  text-decoration: none;
  display: block;
  text-align: center;
}

@media (max-width: 600px) {
  .visibility-options {
    flex-direction: column;
  }

  .home-hero h1 {
    font-size: 1.5rem;
  }

  .navbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* ===================== */
/* PROMOTED (CHAMPAGNE)  */
/* ===================== */

.partnership-card.promoted,
.partnership-full.promoted {
  background: #fdf6e3;
  border: 1px solid #e6d5a8;
}

.partnership-card.promoted .vote-section,
.partnership-full.promoted .vote-section-large {
  background: #f5ecd0;
}

.promoted-badge {
  background: #d4a017;
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.promoted-info {
  font-size: 0.85rem;
  color: #d4a017;
  font-weight: 500;
}

/* ===================== */
/* FAVORITES             */
/* ===================== */

.fav-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #ccc;
  padding: 0;
  transition: color 0.2s, transform 0.2s;
}

.fav-btn:hover {
  color: #f1c40f;
  transform: scale(1.2);
}

.fav-btn.favorited {
  color: #f1c40f;
}

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

/* ===================== */
/* POINTS DISPLAY        */
/* ===================== */

.user-points-display {
  font-size: 0.9rem;
  color: #666;
}

.user-points-display strong {
  color: #d4a017;
}

.page-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ===================== */
/* PROMOTE BUTTON        */
/* ===================== */

.btn-promote {
  background: #d4a017;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

.btn-promote:hover {
  background: #b8860b;
}

/* ===================== */
/* MODAL                 */
/* ===================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal h3 {
  margin-bottom: 1rem;
}

.modal p {
  margin-bottom: 0.5rem;
  color: #555;
}

.promote-form {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.promote-form label {
  font-weight: 500;
  font-size: 0.9rem;
}

.promote-form input[type="number"] {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  width: 80px;
}

.promote-cost {
  font-size: 0.9rem;
  color: #d4a017;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}
