/* ===================================
   PATAFURNITURE - Partner Portal CSS
   =================================== */

.partner-portal-body {
  background: var(--color-dark);
  color: var(--color-light);
  min-height: 100vh;
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  display: flex;
  flex-direction: column;
}

.partner-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-4xl);
  flex-grow: 1;
}

/* ====== AUTHENTICATION STYLES ====== */
.auth-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: var(--space-xl) 0;
}

.auth-card {
  background: var(--color-dark-card);
  border: 1px solid rgba(201, 169, 110, 0.15);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  width: 100%;
  max-width: 550px;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(10px);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.auth-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.auth-header p {
  font-size: var(--text-xs);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(201, 169, 110, 0.12);
  margin-bottom: var(--space-2xl);
}

.auth-tab {
  flex: 1;
  background: transparent;
  color: var(--color-light);
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-md);
  opacity: 0.6;
  transition: all var(--transition-base);
  border-bottom: 2px solid transparent;
}

.auth-tab:hover {
  opacity: 0.9;
}

.auth-tab.active {
  color: var(--color-accent);
  opacity: 1;
  border-bottom-color: var(--color-accent);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ====== DASHBOARD STYLES ====== */
.dashboard-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3xl);
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.dashboard-welcome {
  font-size: var(--text-sm);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.dashboard-business-name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-white);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-4xl);
}

.stat-card {
  background: var(--color-dark-card);
  border: 1px solid rgba(201, 169, 110, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 169, 110, 0.2);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: rgba(201, 169, 110, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

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

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-light);
  opacity: 0.65;
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-white);
  font-weight: 700;
}

/* Catalog Table styles */
.catalog-card {
  background: var(--color-dark-card);
  border: 1px solid rgba(201, 169, 110, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  box-shadow: var(--shadow-lg);
}

.catalog-header {
  margin-bottom: var(--space-2xl);
}

.catalog-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.catalog-header p {
  font-size: var(--text-sm);
  color: var(--color-light);
  opacity: 0.7;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.catalog-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.catalog-table th,
.catalog-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid rgba(201, 169, 110, 0.08);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.catalog-table th {
  font-family: var(--font-accent);
  font-weight: 600;
  color: var(--color-white);
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  padding-bottom: var(--space-lg);
}

.catalog-table tbody tr {
  transition: background var(--transition-fast);
}

.catalog-table tbody tr:hover {
  background: rgba(201, 169, 110, 0.02);
}

.product-cell {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.product-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--color-dark);
}

.product-name {
  font-weight: 600;
  color: var(--color-white);
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.status-pill.active {
  background: rgba(107, 155, 107, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(107, 155, 107, 0.25);
}

.status-pill.pending {
  background: rgba(201, 169, 110, 0.12);
  color: var(--color-accent);
  border: 1px solid rgba(201, 169, 110, 0.25);
}

.status-pill.sold {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-light);
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0.7;
}

.delete-btn {
  background: transparent;
  color: var(--color-error);
  font-size: 1.15rem;
  border: 1px solid rgba(196, 93, 93, 0.2);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.delete-btn:hover {
  background: var(--color-error);
  color: var(--color-white);
  border-color: transparent;
}

/* ====== POST MODAL STYLES ====== */
.post-modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 20, 16, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.post-modal.open {
  opacity: 1;
  visibility: visible;
}

.post-modal-content {
  background: var(--color-dark-card);
  border: 1px solid rgba(201, 169, 110, 0.15);
  border-radius: var(--radius-xl);
  max-width: 750px;
  width: 100%;
  padding: var(--space-3xl);
  position: relative;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: transform var(--transition-spring);
}

.post-modal.open .post-modal-content {
  transform: scale(1);
}

.post-modal-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-size: 2rem;
  color: var(--color-light);
  background: transparent;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.post-modal-close:hover {
  background: rgba(201, 169, 110, 0.1);
  color: var(--color-accent);
}

.post-modal-header {
  margin-bottom: var(--space-2xl);
}

.post-modal-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.post-modal-header p {
  font-size: var(--text-sm);
  color: var(--color-light);
  opacity: 0.7;
}

/* File Input Hack */
.file-input-hidden {
  display: none !important;
}

.photo-select-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-dark-surface);
  border: 1px solid rgba(201, 169, 110, 0.12);
  border-radius: var(--radius-md);
  color: var(--color-light);
  font-size: var(--text-sm);
  cursor: pointer;
  height: 46px;
}

.photo-select-wrapper span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.post-submit-bar {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
  border-top: 1px solid rgba(201, 169, 110, 0.1);
  padding-top: var(--space-xl);
}

.btn-sm {
  padding: 6px var(--space-md);
}

@media (max-width: 768px) {
  .post-modal {
    padding: var(--space-sm);
  }
  
  .post-modal-content {
    padding: var(--space-xl);
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Subscription Banner */
.subscription-banner {
  background: rgba(201, 169, 110, 0.05);
  border: 1px dashed rgba(201, 169, 110, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.subscription-banner .sub-price {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
  line-height: 1;
}

.subscription-banner .sub-price span {
  font-size: var(--text-xs);
  font-family: var(--font-accent);
  color: var(--color-light);
  opacity: 0.6;
}

.subscription-banner p {
  font-size: var(--text-xs);
  color: var(--color-light);
  opacity: 0.8;
  line-height: 1.4;
}
