/**
 * Plantceutics Affiliates Portal Stylesheet
 * Brand colors: #0FAF87 (emerald), #0A261D (dark), #F6FAF7 (bg)
 */

.pc-portal-wrapper {
  max-width: 1140px;
  margin: 30px auto 60px;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0F172A;
  box-sizing: border-box;
}

.pc-portal-wrapper * {
  box-sizing: border-box;
}

/* 1. HERO HEADER */
.pc-portal-hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 36px;
}

.pc-portal-pill {
  display: inline-block;
  background: #E8F7F1;
  color: #0A8B6B;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.pc-portal-hero h1 {
  font-size: 32px;
  font-weight: 800;
  color: #0A261D;
  margin: 0 0 12px;
  line-height: 1.25;
}

.pc-portal-hero p {
  font-size: 15px;
  color: #64748B;
  line-height: 1.6;
  margin: 0;
}

/* 2. AUTH CARD (LOGIN & REGISTER) */
.pc-portal-auth-card {
  max-width: 580px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #DFEDE5;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(10, 38, 29, 0.05);
  overflow: hidden;
}

.pc-portal-tabs {
  display: flex;
  background: #F8FAF9;
  border-bottom: 1px solid #E2EEE7;
}

.pc-portal-tab-btn {
  flex: 1;
  padding: 16px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pc-portal-tab-btn.active {
  background: #ffffff;
  color: #0FAF87;
  border-bottom: 2px solid #0FAF87;
}

.pc-portal-tab-content {
  display: none;
  padding: 30px;
}

.pc-portal-tab-content.active {
  display: block;
}

/* FORMS */
.pc-portal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pc-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.pc-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pc-form-group label {
  font-size: 13px;
  font-weight: 700;
  color: #0A261D;
}

.pc-form-group input,
.pc-form-group select,
.pc-form-group textarea {
  padding: 11px 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: 14px;
  color: #0F172A;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}

.pc-form-group input:focus,
.pc-form-group select:focus,
.pc-form-group textarea:focus {
  border-color: #0FAF87;
  box-shadow: 0 0 0 3px rgba(15, 175, 135, 0.15);
}

.pc-form-group small {
  font-size: 11px;
  color: #64748B;
}

.pc-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.pc-remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748B;
  cursor: pointer;
}

.pc-forgot-link {
  color: #0FAF87;
  text-decoration: none;
  font-weight: 600;
}

.pc-forgot-link:hover {
  text-decoration: underline;
}

.pc-btn-portal-submit {
  background: #0FAF87;
  color: #ffffff;
  border: none;
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
}

.pc-btn-portal-submit:hover {
  background: #0A8B6B;
  transform: translateY(-1px);
}

.pc-btn-secondary {
  background: #E8F7F1;
  color: #0A8B6B;
  border: 1px solid #C1E7D7;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.pc-btn-secondary:hover {
  background: #0FAF87;
  color: #ffffff;
}

.pc-form-feedback {
  font-size: 13px;
  border-radius: 8px;
  padding: 0;
  display: none;
}

.pc-form-feedback.success {
  display: block;
  background: #E6F4EA;
  color: #137333;
  padding: 10px 14px;
  border: 1px solid #CEEAD6;
}

.pc-form-feedback.error {
  display: block;
  background: #FCE8E6;
  color: #C5221F;
  padding: 10px 14px;
  border: 1px solid #FAD2CF;
}

/* 3. DASHBOARD ROOT */
.pc-dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #E2E8F0;
}

.pc-badge-medical {
  display: inline-block;
  background: #E8F7F1;
  color: #0A8B6B;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 6px;
}

.pc-dash-header h1 {
  font-size: 26px;
  font-weight: 800;
  color: #0A261D;
  margin: 0 0 4px;
}

.pc-dash-sub {
  font-size: 14px;
  color: #64748B;
  margin: 0;
}

.pc-btn-logout {
  background: #F1F5F9;
  color: #475569;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

.pc-btn-logout:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* COUPON BANNER */
.pc-coupon-banner {
  background: #F0FAF5;
  border: 1.5px dashed #0FAF87;
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.pc-coupon-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pc-coupon-lbl {
  font-size: 13.5px;
  font-weight: 600;
  color: #0A261D;
}

.pc-coupon-code {
  font-size: 18px;
  font-weight: 900;
  color: #0A8B6B;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #A7F3D0;
  letter-spacing: 1px;
}

.pc-coupon-info {
  font-size: 12.5px;
  color: #475569;
  max-width: 480px;
}

.pc-btn-copy {
  background: #0FAF87;
  color: #ffffff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.pc-btn-copy:hover {
  background: #0A8B6B;
}

/* 4. KPI CARDS */
.pc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 34px;
}

.pc-kpi-card {
  background: #ffffff;
  border: 1px solid #E2EEE7;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(10, 38, 29, 0.03);
}

.pc-kpi-card.highlight {
  border-color: #A7F3D0;
  background: #FAFDFA;
}

.pc-kpi-icon {
  font-size: 28px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0FAF5;
  border-radius: 12px;
  flex-shrink: 0;
}

.pc-kpi-data {
  display: flex;
  flex-direction: column;
}

.pc-kpi-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.pc-kpi-val {
  font-size: 20px;
  font-weight: 800;
  color: #0A261D;
  margin-bottom: 2px;
}

.pc-kpi-hint {
  font-size: 11px;
  color: #94A3B8;
}

/* 5. SECTIONS & LINK GENERATOR */
.pc-dash-section {
  margin-bottom: 36px;
}

.pc-section-header {
  margin-bottom: 16px;
}

.pc-section-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: #0A261D;
  margin: 0 0 4px;
}

.pc-section-header p {
  font-size: 13px;
  color: #64748B;
  margin: 0;
}

.pc-link-generator-card {
  background: #ffffff;
  border: 1px solid #E2EEE7;
  border-radius: 14px;
  padding: 24px;
}

.pc-generator-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.flex-1 {
  flex: 1;
}

.pc-copy-bar {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.pc-copy-bar input {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  background: #F8FAFC;
  color: #0F172A;
  outline: none;
}

/* 6. TABLES */
.pc-table-card {
  background: #ffffff;
  border: 1px solid #E2EEE7;
  border-radius: 14px;
  overflow: hidden;
}

.pc-table-responsive {
  overflow-x: auto;
}

.pc-portal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.pc-portal-table th {
  background: #F8FAF9;
  padding: 13px 18px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #E2E8F0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pc-portal-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #F1F5F9;
  color: #1E293B;
  vertical-align: middle;
}

.pc-portal-table tbody tr:hover {
  background: #FAFDFA;
}

.pc-tag-source {
  display: inline-block;
  background: #F1F5F9;
  color: #475569;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.pc-com-amount {
  font-weight: 800;
  color: #0FAF87;
}

.pc-status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.pc-badge-approved {
  background: #E8F7F1;
  color: #0A8B6B;
}

.pc-badge-paid {
  background: #EFF6FF;
  color: #2563EB;
}

.pc-badge-pending {
  background: #FEF3C7;
  color: #D97706;
}

.pc-badge-refunded {
  background: #FEE2E2;
  color: #DC2626;
}

.pc-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #94A3B8;
  font-size: 14px;
}

/* 7. PAYOUT GRID */
.pc-payout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 800px) {
  .pc-payout-grid {
    grid-template-columns: 1fr;
  }
}

.pc-payout-box {
  background: #ffffff;
  border: 1px solid #E2EEE7;
  border-radius: 14px;
  padding: 24px;
}

.pc-payout-box h3 {
  font-size: 16px;
  font-weight: 800;
  color: #0A261D;
  margin: 0 0 14px;
}

.pc-text-emerald {
  color: #0FAF87;
  font-size: 18px;
}

.pc-alert-warning {
  background: #FEF3C7;
  color: #92400E;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.4;
}

.pc-alert-info {
  background: #F0FAF5;
  color: #065F46;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.4;
}

.pc-payout-history-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.pc-payout-history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 12px;
}

/* STATUS SCREENS (Pending, Suspended) */
.pc-status-card {
  max-width: 520px;
  margin: 40px auto;
  text-align: center;
  background: #ffffff;
  border: 1px solid #E2EEE7;
  border-radius: 16px;
  padding: 40px 30px;
}

.pc-status-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.pc-status-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0A261D;
  margin: 0 0 10px;
}

.pc-status-card p {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 16px;
}

.pc-status-sub {
  font-size: 12px;
  color: #94A3B8;
  margin-bottom: 24px !important;
}
