/* ===== SAKURA PARTNER SYSTEM — SHARED CSS ===== */
/* partner.html · login.html · my.html */

/* ===== PARTNER HERO ===== */
.partner-hero {
  padding: 140px 0 80px;
  background: var(--gradient-2);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.partner-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(155,35,53,.35) 0%, transparent 70%);
}
.partner-hero-tag {
  display: inline-block;
  background: rgba(155,35,53,.25);
  border: 1px solid rgba(155,35,53,.4);
  color: var(--rose);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 6px 20px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.partner-hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
  position: relative;
}
.partner-hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  max-width: 560px;
  margin: 0 auto 40px;
  position: relative;
}
.partner-hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  position: relative;
}
.ph-stat {
  text-align: center;
}
.ph-stat-num {
  font-family: 'Noto Serif SC', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  display: block;
}
.ph-stat-label {
  font-size: .85rem;
  color: rgba(255,255,255,.55);
}
.ph-stat-divider {
  width: 1px;
  height: 50px;
  background: rgba(255,255,255,.15);
  align-self: center;
}
.partner-hero-btn {
  display: inline-block;
  background: var(--gradient);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 16px 48px;
  border-radius: 100px;
  position: relative;
  transition: opacity .3s, transform .3s;
  box-shadow: 0 8px 32px rgba(155,35,53,.4);
}
.partner-hero-btn:hover { opacity: .9; transform: translateY(-2px); }

/* ===== STEPS ===== */
.partner-steps { padding: 100px 0; background: var(--white); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 64px;
}
.step-card {
  text-align: center;
  padding: 40px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--sakura-2);
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}
.step-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.step-num {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: var(--gradient);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
}
.step-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}
.step-card h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 12px;
}
.step-card p { font-size: .95rem; color: var(--muted); line-height: 1.7; }

/* ===== EARNINGS CASES ===== */
.partner-earnings {
  padding: 100px 0;
  background: var(--light);
}
.earnings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 64px;
}
.earnings-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--sakura-2);
}
.earnings-card h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.2rem;
  color: var(--dark);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--sakura-2);
}
.earnings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--sakura-1);
  font-size: .95rem;
}
.earnings-item:last-child { border-bottom: none; }
.earnings-item-label { color: var(--muted); }
.earnings-item-value { color: var(--primary); font-weight: 600; }
.earnings-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--sakura-1);
  border-radius: var(--radius-sm);
}
.earnings-total-label { font-weight: 600; color: var(--dark); }
.earnings-total-value {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* ===== RULES STRIP ===== */
.partner-rules {
  padding: 80px 0;
  background: var(--gradient-2);
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.rule-item {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.rule-icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.rule-value {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  display: block;
  margin-bottom: 4px;
}
.rule-label { font-size: .85rem; color: rgba(255,255,255,.55); }

/* ===== FAQ ===== */
.partner-faq { padding: 100px 0; }
.partner-faq .faq-list { max-width: 720px; margin: 64px auto 0; }
.partner-faq .faq-item {
  border: 1px solid var(--sakura-2);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.partner-faq .faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 500;
  color: var(--dark);
  transition: background var(--transition);
  user-select: none;
}
.partner-faq .faq-q:hover { background: var(--sakura-1); }
.partner-faq .faq-q.open { background: var(--sakura-1); color: var(--primary); }
.partner-faq .faq-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sakura-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 16px;
  font-size: 1rem;
  transition: transform .3s;
}
.partner-faq .faq-q.open .faq-icon { transform: rotate(45deg); background: var(--primary); color: var(--white); }
.partner-faq .faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s;
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.75;
}
.partner-faq .faq-a.open {
  max-height: 200px;
  padding: 0 24px 20px;
}

/* ===== JOIN CTA ===== */
.partner-join-cta {
  padding: 100px 0;
  background: var(--light);
  text-align: center;
}
.partner-join-cta .section-title { margin-bottom: 12px; }
.partner-join-cta .section-sub { margin-bottom: 40px; }
.join-btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-partner-primary {
  display: inline-block;
  background: var(--gradient);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 16px 48px;
  border-radius: 100px;
  transition: opacity .3s, transform .3s;
  box-shadow: var(--shadow-md);
}
.btn-partner-primary:hover { opacity: .9; transform: translateY(-2px); }
.btn-partner-outline {
  display: inline-block;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 14px 40px;
  border-radius: 100px;
  transition: background var(--transition), color var(--transition);
}
.btn-partner-outline:hover { background: var(--primary); color: var(--white); }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-2);
  padding: 40px 20px;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .logo-icon { font-size: 2.2rem; }
.login-logo-name {
  display: block;
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 8px;
}
.login-logo-sub {
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .05em;
}
.auth-tabs {
  display: flex;
  gap: 0;
  background: var(--sakura-1);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 32px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: .95rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.auth-tab.active {
  background: var(--white);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-field {
  margin-bottom: 20px;
}
.auth-field label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 8px;
}
.auth-field input, .auth-field select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--sakura-2);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  transition: border-color .25s, box-shadow .25s;
  outline: none;
}
.auth-field input:focus, .auth-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(155,35,53,.12);
}
.auth-notice {
  background: var(--sakura-1);
  border: 1px solid var(--sakura-2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .875rem;
  color: var(--primary);
  margin-bottom: 20px;
  display: none;
}
.auth-notice.show { display: block; }
.auth-submit {
  width: 100%;
  padding: 14px;
  background: var(--gradient);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity .3s, transform .3s;
  box-shadow: var(--shadow-sm);
}
.auth-submit:hover { opacity: .9; transform: translateY(-1px); }
.auth-error {
  color: #c0392b;
  font-size: .85rem;
  margin-top: 12px;
  text-align: center;
  display: none;
}
.auth-error.show { display: block; }
.auth-back {
  text-align: center;
  margin-top: 20px;
}
.auth-back a { color: var(--primary); font-size: .9rem; text-decoration: underline; }

/* ===== DASHBOARD (MY.HTML) ===== */
.my-layout {
  min-height: 100vh;
  background: var(--light);
}
.my-topbar {
  background: var(--dark);
  color: var(--white);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.my-topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.my-topbar-logo .logo-icon { font-size: 1.4rem; }
.my-topbar-logo-text {
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  font-weight: 600;
}
.my-topbar-logo-text em {
  display: block;
  font-style: normal;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: .7rem;
  color: rgba(255,255,255,.5);
  font-weight: 300;
  letter-spacing: .05em;
}
.my-topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
}
.my-topbar-avatar {
  width: 36px;
  height: 36px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.my-topbar-links {
  display: flex;
  gap: 16px;
  align-items: center;
}
.my-topbar-links a {
  color: rgba(255,255,255,.65);
  font-size: .875rem;
  transition: color .25s;
}
.my-topbar-links a:hover { color: var(--white); }
.my-topbar-logout {
  background: none;
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.7);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: .85rem;
  font-family: inherit;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.my-topbar-logout:hover { background: rgba(255,255,255,.1); color: var(--white); }

.my-content { padding: 40px 0; }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--sakura-2);
}
.stat-card-label {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.stat-card-value {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}
.stat-card-value.accent { color: var(--primary); }
.stat-card-sub {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 6px;
}

/* Referral code highlight */
.referral-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sakura-1);
  border: 1.5px dashed var(--rose);
  border-radius: var(--radius-sm);
  padding: 6px 16px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: .08em;
}

/* Dashboard tabs */
.my-tabs {
  display: flex;
  gap: 4px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--sakura-2);
  margin-bottom: 24px;
  overflow-x: auto;
}
.my-tab {
  flex: 1;
  min-width: 100px;
  padding: 10px 20px;
  border-radius: calc(var(--radius) - 4px);
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  text-align: center;
  border: none;
  background: none;
  font-family: inherit;
}
.my-tab.active {
  background: var(--gradient);
  color: var(--white);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.my-tab-panel { display: none; }
.my-tab-panel.active { display: block; }

/* Cards inside dashboard */
.my-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--sakura-2);
  margin-bottom: 24px;
}
.my-card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sakura-2);
}

/* Share center */
.share-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--sakura-1);
  border: 1.5px solid var(--sakura-2);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-bottom: 16px;
}
.share-link-row span {
  flex: 1;
  font-size: .9rem;
  color: var(--dark);
  word-break: break-all;
}
.btn-copy {
  flex-shrink: 0;
  padding: 8px 20px;
  background: var(--gradient);
  color: var(--white);
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: opacity .25s;
}
.btn-copy:hover { opacity: .85; }
.btn-copy.copied { background: #27ae60; }

.share-channels {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: .9rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: opacity .25s;
}
.share-btn:hover { opacity: .85; }
.share-btn-wa { background: #25D366; color: white; }
.share-btn-wx { background: #07C160; color: white; }
.share-btn-link { background: var(--sakura-1); color: var(--primary); border: 1.5px solid var(--sakura-2); }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: .875rem;
  border-bottom: 1px solid var(--sakura-1);
}
.data-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--sakura-1);
}
.data-table td { color: var(--dark); }
.data-table tr:last-child td { border-bottom: none; }
.data-table .amount { font-weight: 600; color: var(--primary); }
.data-table .status { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: .78rem; font-weight: 500; }
.status-settled { background: #e8f5e9; color: #2e7d32; }
.status-pending { background: #fff8e1; color: #f57f17; }
.status-cancelled { background: #fce4ec; color: #c62828; }
.status-processing { background: #e3f2fd; color: #1565c0; }

/* Withdraw form */
.withdraw-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.withdraw-field { display: flex; flex-direction: column; gap: 8px; }
.withdraw-field label { font-size: .875rem; font-weight: 500; color: var(--dark); }
.withdraw-field input, .withdraw-field select {
  padding: 12px 16px;
  border: 1.5px solid var(--sakura-2);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  color: var(--dark);
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.withdraw-field input:focus, .withdraw-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(155,35,53,.12);
}
.withdraw-min-hint {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 4px;
}
.withdraw-submit {
  margin-top: 24px;
  padding: 14px 48px;
  background: var(--gradient);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: opacity .3s, transform .3s;
  box-shadow: var(--shadow-sm);
}
.withdraw-submit:hover { opacity: .9; transform: translateY(-1px); }
.withdraw-balance-info {
  background: var(--sakura-1);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.wbi-item { text-align: center; }
.wbi-value {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}
.wbi-label { font-size: .8rem; color: var(--muted); }
.wbi-divider { width: 1px; height: 40px; background: var(--sakura-2); }

/* Toast */
.partner-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 100px;
  font-size: .9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 9999;
  white-space: nowrap;
}
.partner-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.partner-toast.success { background: #27ae60; }
.partner-toast.error { background: #c0392b; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: .95rem; }

/* ===== ADMIN PARTNER STYLES ===== */
/* (Injected into admin pages) */
.partner-rule-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
}
.partner-rule-tag.active { background: #e8f5e9; color: #2e7d32; }
.partner-rule-tag.inactive { background: #fce4ec; color: #c62828; }

/* Responsive */
@media (max-width: 900px) {
  .steps-grid { grid-template-columns: 1fr; }
  .earnings-grid { grid-template-columns: 1fr; }
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .withdraw-form-row { grid-template-columns: 1fr; }
  .partner-hero-stats { gap: 24px; }
  .ph-stat-divider { display: none; }
}
@media (max-width: 600px) {
  .login-card { padding: 36px 24px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .rules-grid { grid-template-columns: 1fr; }
  .my-topbar { padding: 0 16px; }
  .my-tabs { gap: 2px; }
  .my-tab { padding: 9px 14px; font-size: .82rem; min-width: 80px; }
  .my-card { padding: 20px; }
  .data-table th, .data-table td { padding: 10px 10px; font-size: .8rem; }
}
