/* =================
   RESET AND BASE STYLES
   ================= */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background-color: #ffffff;
  font-size: 14px;
}

/* =================
   UTILITY CLASSES
   ================= */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.hidden {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 8px;
}

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

.btn-primary:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-large {
  padding: 12px 24px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

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

.text-gray {
  color: #6b7280;
}

.text-gray-light {
  color: #9ca3af;
}

.text-red {
  color: #dc2626;
}

.text-green {
  color: #16a34a;
}

.text-blue {
  color: #2563eb;
}

.hidden {
  display: none;
}

/* =================
   LAYOUT COMPONENTS
   ================= */

/* Header */
.header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 28px;
  font-weight: 600;
  color: #000;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: #1f2937;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  font-size: 14px;
}

.nav-link:hover {
  color: #6b7280;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s;
}

.icon-btn:hover {
  background-color: #f3f4f6;
}

/* Sidebar */
.sidebar {
  width: 320px;
  flex-shrink: 0;
}

.sidebar-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  color: #1f2937;
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-nav-item:hover {
  background-color: #f3f4f6;
}

.sidebar-nav-item.active {
  background-color: #000;
  color: white;
}

/* Main Layout */
.main-layout {
  display: flex;
  gap: 32px;
  padding: 32px 24px;
  min-height: calc(100vh - 64px);
}

.main-content {
  flex: 1;
}

/* =================
   FORM COMPONENTS
   ================= */

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

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: #374151;
}

.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background-color: white;
  cursor: pointer;
}

.form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox {
  width: 16px;
  height: 16px;
}

.search-input {
  position: relative;
  width: 100%;
  margin-bottom: 32px;
}

.search-input input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  background-color: #f5f5f7;
  border: 2px solid transparent;
  border-radius: 24px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-input input:focus {
  outline: none;
  border-color: #000;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

/* =================
   CARD COMPONENTS
   ================= */

.card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e5e7eb;
}

.profile-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.profile-avatar {
  position: relative;
}

.avatar {
  width: 128px;
  height: 128px;
  background-color: #e5e7eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-edit-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background-color: #000;
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.avatar-edit-btn:hover {
  background-color: #374151;
}

.profile-info {
  text-align: center;
}

.profile-username {
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 16px;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
}

.profile-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 16px;
}

.profile-stat {
  text-align: center;
}

.profile-stat-number {
  font-size: 18px;
  font-weight: 600;
}

.profile-stat-label {
  font-size: 14px;
  color: #6b7280;
}

.profile-bio {
  text-align: left;
}

.profile-bio h3 {
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-bio p {
  color: #374151;
  margin-bottom: 4px;
}

.balance-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.balance-amount {
  font-weight: 600;
}

/* Wallet Card */
.wallet-card {
  background: linear-gradient(135deg, #000 0%, #374151 100%);
  color: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.wallet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.wallet-balance {
  font-size: 28px;
  font-weight: 700;
}

.wallet-label {
  color: #d1d5db;
  font-size: 14px;
  margin-bottom: 8px;
}

.wallet-number {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #d1d5db;
  margin-bottom: 16px;
}

.wallet-actions {
  display: flex;
  gap: 16px;
}

.wallet-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.wallet-btn-primary {
  background: white;
  color: #000;
  border: none;
}

.wallet-btn-primary:hover {
  background-color: #f3f4f6;
}

.wallet-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
}

.wallet-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* =================
   LISTING COMPONENTS
   ================= */

.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.listings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.listing-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.listing-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #10b981;
  transform: translateY(-4px);
}

.listing-card:hover .listing-image img {
  transform: scale(1.05);
}

.listing-card.list-view {
  display: flex;
}

.listing-image {
  position: relative;
  aspect-ratio: 4/3;
  background-color: #f3f4f6;
  overflow: hidden;
}

.listing-card.list-view .listing-image {
  width: 192px;
  height: 128px;
  flex-shrink: 0;
  aspect-ratio: auto;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.listing-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}

.listing-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.favorite-btn {
  background: white;
  color: #9ca3af;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.favorite-btn:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.favorite-btn.active {
  color: #dc2626;
}

.cart-btn {
  background: #10b981;
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cart-btn:hover {
  background: #059669;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.listing-content {
  padding: 16px;
}

.listing-card.list-view .listing-content {
  flex: 1;
}

.listing-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #1f2937;
  transition: color 0.2s;
}

.listing-card:hover .listing-title {
  color: #6b7280;
}

.listing-card.list-view .listing-title {
  font-size: 16px;
  margin-bottom: 4px;
}

.listing-price {
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 12px;
}

.listing-card.list-view .listing-price {
  font-size: 20px;
  margin-bottom: 8px;
}

.listing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: #6b7280;
}

.listing-card.list-view .listing-meta {
  gap: 16px;
  justify-content: flex-start;
}

.listing-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =================
   TRANSACTION COMPONENTS
   ================= */

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.transaction-item:hover {
  background-color: #f9fafb;
}

.transaction-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.transaction-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transaction-icon.income {
  background-color: #dcfce7;
  color: #16a34a;
}

.transaction-icon.expense {
  background-color: #fee2e2;
  color: #dc2626;
}

.transaction-info h4 {
  font-weight: 500;
  margin-bottom: 4px;
}

.transaction-date {
  font-size: 14px;
  color: #6b7280;
}

.transaction-category {
  display: inline-block;
  padding: 2px 8px;
  background-color: #dbeafe;
  color: #1d4ed8;
  border-radius: 12px;
  font-size: 12px;
  margin-right: 8px;
}

.transaction-amount {
  font-weight: 700;
  text-align: right;
}

.transaction-amount.income {
  color: #16a34a;
}

.transaction-amount.expense {
  color: #dc2626;
}

/* =================
   CATEGORY COMPONENTS
   ================= */

.categories {
  background-color: #f5f5f7;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 32px;
}

.categories h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.categories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-btn {
  background: #fff;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 8px 16px;
  margin: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.category-btn:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.category-btn.active {
  background-color: #000;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-count {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
}

.category-btn:not(.active) .category-count {
  background-color: #e5e7eb;
  color: #6b7280;
}

.category-btn.active .category-count {
  background-color: white;
  color: #000;
}

/* =================
   FILTER COMPONENTS
   ================= */

.filters {
  background-color: #f9fafb;
  border-radius: 16px;
  padding: 24px;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.filters h3 {
  font-size: 18px;
  font-weight: 600;
}

.filter-toggle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.filter-toggle:hover {
  background-color: #e5e7eb;
}

.filters-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-input {
  width: 80px;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.price-separator {
  color: #9ca3af;
}

/* =================
   TAB COMPONENTS
   ================= */

.tabs {
  display: flex;
  background-color: #f3f4f6;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
  background-color: #e5e7eb;
}

/* =================
   MESSAGE COMPONENTS
   ================= */

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.message-item:hover {
  background-color: #f9fafb;
}

.message-avatar {
  width: 48px;
  height: 48px;
  background-color: #e5e7eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.message-username {
  font-weight: 600;
}

.message-type-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-type-icon.listing {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.message-type-icon.purchase {
  background-color: #dcfce7;
  color: #16a34a;
}

.message-text {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 4px;
}

.message-item-title {
  font-size: 12px;
  color: #9ca3af;
}

.message-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.message-time {
  font-size: 12px;
  color: #9ca3af;
}

.message-unread {
  width: 8px;
  height: 8px;
  background-color: #3b82f6;
  border-radius: 50%;
}

/* Chat View */
.chat-container {
  background: white;
  border-radius: 16px;
  height: 400px;
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

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

.chat-back-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-right: 8px;
}

.chat-back-btn:hover {
  background-color: #f3f4f6;
}

.chat-user-info h3 {
  font-weight: 600;
}

.chat-user-info p {
  font-size: 14px;
  color: #6b7280;
}

.chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  max-width: 320px;
}

.chat-message.sent {
  align-self: flex-end;
}

.chat-message.received {
  align-self: flex-start;
}

.chat-bubble {
  padding: 12px;
  border-radius: 8px;
}

.chat-message.sent .chat-bubble {
  background-color: #000;
  color: white;
}

.chat-message.received .chat-bubble {
  background-color: #f3f4f6;
  color: #1f2937;
}

.chat-message-text {
  font-size: 14px;
  margin-bottom: 4px;
}

.chat-message-time {
  font-size: 12px;
  opacity: 0.7;
}

.chat-input-area {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
}

.chat-input-group {
  display: flex;
  gap: 12px;
}

.chat-input {
  flex: 1;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

/* =================
   ADDRESS COMPONENTS
   ================= */

.addresses-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.address-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
}

.address-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.address-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.address-name h4 {
  font-weight: 600;
}

.address-default-badge {
  padding: 2px 8px;
  background-color: #dcfce7;
  color: #16a34a;
  border-radius: 12px;
  font-size: 12px;
}

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

.address-action-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.address-action-btn:hover {
  background-color: #f3f4f6;
}

.address-action-btn.delete {
  color: #dc2626;
}

.address-details {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

.address-form {
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
}

.address-form h4 {
  font-weight: 600;
  margin-bottom: 16px;
}

.address-type-toggle {
  display: flex;
  background-color: #f3f4f6;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 24px;
  width: fit-content;
}

.address-type-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.2s;
}

.address-type-btn.active {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.address-type-btn:hover:not(.active) {
  background-color: #e5e7eb;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.form-grid-full {
  grid-column: 1 / -1;
}

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

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

.modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background-color: #f3f4f6;
}

.modal-content {
  padding: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* =================
   PAGINATION COMPONENTS
   ================= */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f3f4f6;
}

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

.pagination-btn.active {
  background-color: #000;
  color: white;
  border-color: #000;
}

.pagination-btn.ellipsis {
  cursor: default;
  border: none;
  background: none;
}

.pagination-btn.ellipsis:hover {
  background: none;
}

/* =================
   RESULTS HEADER
   ================= */

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.results-info h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 4px;
}

.results-meta {
  color: #6b7280;
  font-size: 14px;
}

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

.view-toggle {
  display: flex;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
}

.view-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn:hover {
  background-color: #f9fafb;
}

.view-btn.active {
  background-color: #000;
  color: white;
}

/* =================
   AUTH COMPONENTS
   ================= */

.auth-container {
  min-height: 100vh;
  background-color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-header p {
  color: #6b7280;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
}

.auth-switch {
  color: #6b7280;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.auth-switch:hover {
  color: #000;
}

/* =================
   STATUS BADGES
   ================= */

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.active {
  background-color: #dcfce7;
  color: #16a34a;
}

.status-badge.sold {
  background-color: #f3f4f6;
  color: #6b7280;
}

.status-badge.completed {
  background-color: #dcfce7;
  color: #16a34a;
}

.status-badge.new {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.status-badge.paid {
  background-color: #fef3c7;
  color: #d97706;
}

.status-badge.appeal {
  background-color: #fee2e2;
  color: #dc2626;
}

/* =================
   EMPTY STATES
   ================= */

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  color: #d1d5db;
  margin: 0 auto 16px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 8px;
}

.empty-state p {
  color: #6b7280;
  margin-bottom: 16px;
}

.empty-state button {
  color: #3b82f6;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
}

/* =================
   INSTAGRAM-STYLE POSTS
   ================= */

.posts-grid {
  padding: 24px;
}

.posts-nav {
  border-bottom: 1px solid #e5e7eb;
}

.posts-nav-center {
  display: flex;
  justify-content: center;
}

.posts-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 2px solid #000;
  font-weight: 500;
  font-size: 14px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.instagram-post {
  aspect-ratio: 1;
  background-color: #f3f4f6;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
}

.instagram-post:hover {
  transform: scale(0.98);
}

.instagram-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.instagram-post:hover img {
  transform: scale(1.05);
}

.instagram-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.instagram-post:hover .instagram-overlay {
  background-color: rgba(0, 0, 0, 0.3);
}

.instagram-stats {
  opacity: 0;
  color: white;
  text-align: center;
  transition: opacity 0.2s;
}

.instagram-post:hover .instagram-stats {
  opacity: 1;
}

.instagram-stats p {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.instagram-stats .price {
  font-size: 12px;
}

/* =================
   RESPONSIVE DESIGN
   ================= */

@media (max-width: 1024px) {
  .main-layout {
    flex-direction: column;
    gap: 24px;
  }
  
  .sidebar {
    width: 100%;
  }
  
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  
  .sidebar-nav-item {
    white-space: nowrap;
  }
  
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 12px;
  }
  
  .header-content {
    padding: 0 16px;
  }
  
  .nav {
    display: none;
  }
  
  .header-actions {
    gap: 8px;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-actions {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }
  
  .categories-grid {
    flex-direction: column;
  }
  
  .listings-grid {
    grid-template-columns: 1fr;
  }
  
  .results-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .modal {
    margin: 16px;
    max-width: none;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .wallet-actions {
    flex-direction: column;
  }
  
  .listing-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .transaction-left {
    gap: 12px;
  }
  
  .transaction-icon {
    width: 32px;
    height: 32px;
  }
  
  .instagram-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    margin: 16px;
    padding: 24px;
  }
  
  .wallet-card {
    padding: 16px;
  }
  
  .card {
    padding: 16px;
  }
  
  .profile-card {
    padding: 20px;
  }
  
  .avatar {
    width: 96px;
    height: 96px;
  }
  
  .profile-username {
    font-size: 24px;
  }
  
  .profile-stats {
    gap: 16px;
  }
  
  .listings-grid {
    gap: 12px;
  }
  
  .listing-content {
    padding: 12px;
  }
  
  .chat-container {
    height: 300px;
  }
  
  .instagram-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
  }
}

/* =================
   UTILITY ANIMATIONS
   ================= */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -10px, 0);
  }
  70% {
    transform: translate3d(0, -5px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

.bounce {
  animation: bounce 1s ease;
}

/* =================
   DARK MODE SUPPORT
   ================= */

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #374151;
  }
  
  body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
  }
  
  .card,
  .auth-card,
  .modal,
  .header {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    background-color: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
  }
  
  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
  }
}
