/* ============ Partner application page — extends waitlist.css's card/form ============ */
.partner-card { max-width: 520px; }

.field select,
.field textarea {
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--blue); }
.field select.field-invalid,
.field textarea.field-invalid { border-color: #dc2626; }

.field input[type="file"] { padding: 10px 12px; font-size: 14px; }

.optional { font-weight: 500; color: var(--text-muted); }
.field-hint { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

.field[hidden] { display: none; }

.link-box {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: var(--blue);
  word-break: break-all;
}
.link-code { text-align: center; font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.share-secondary {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.share-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; }
.share-links a { font-size: 14px; font-weight: 700; color: var(--blue); text-decoration: none; }
.share-links a:hover { text-decoration: underline; }
.waitlist-form[hidden] { display: none; }

/* ============ Partner dashboard ============ */
.dash-section { padding: 40px 24px 72px; background: var(--surface); min-height: calc(100vh - 72px); }
.dash { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.dash-loading { text-align: center; color: var(--text-muted); padding: 64px 0; font-weight: 600; }
.dash-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.dash-sub { margin-top: 4px; color: var(--text-secondary); font-size: 15px; }
.dash-signout { width: auto; padding: 8px 16px; font-size: 14px; }
.dash-h2 { font-size: 18px; font-weight: 800; margin-top: 8px; }

.dash-link-card, .dash-stat, .dash-table-wrap {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md, 14px);
}
.dash-link-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dash-link-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.dash-link-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-link-actions .btn { flex: 1 1 140px; text-align: center; justify-content: center; }

.dash-panel { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-md, 14px); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dash-panel-title { font-size: 18px; font-weight: 800; }
.dash-panel-sub { margin-top: -8px; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.reward-rows, .tier-list { display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; margin: 0; }
.reward-row, .tier-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); }
.reward-name, .tier-name { font-size: 15px; font-weight: 700; }
.tier-name small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.reward-pct, .tier-pct { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.tier-row.is-current { border-color: var(--green); background: color-mix(in srgb, var(--green) 9%, var(--bg)); }
.tier-here { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--green); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em; vertical-align: middle; white-space: nowrap; }
.field input.is-locked { background: var(--surface, #f1f5f9); color: var(--text-secondary); cursor: not-allowed; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.dash-stat { padding: 18px; }
.dash-stat-num { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dash-stat-label { margin-top: 2px; font-size: 14px; font-weight: 700; color: var(--text-secondary); }
.dash-stat-note { margin-top: 6px; font-size: 12.5px; color: var(--text-muted); }
.dash-stat.is-good .dash-stat-num { color: var(--green); }
.dash-fineprint { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); }

.dash-table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash-table th { text-align: left; padding: 12px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); border-bottom: 1.5px solid var(--border); white-space: nowrap; }
.dash-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-table tr:last-child td { border-bottom: none; }
.dash-strong { font-weight: 800; }
.dash-status { font-weight: 700; }
.dash-status.is-pending { color: #b45309; }
.dash-status.is-paid { color: var(--green); }
.dash-status.is-void { color: var(--text-muted); text-decoration: line-through; }
.dash-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 14px; }
.dash-section .partner-card { margin: 24px auto 0; }
.dash[hidden], .dash-empty[hidden], .partner-card[hidden], .dash-loading[hidden], .dash-table[hidden] { display: none; }

.share-links[hidden] { display: none; }

.field-check { margin-top: 2px; }
.check-label { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; font-weight: 500; line-height: 1.55; color: var(--text-secondary); cursor: pointer; }
.check-label input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.check-label a { color: var(--blue); font-weight: 700; text-decoration: none; }
.check-label a:hover { text-decoration: underline; }
.field-check input.field-invalid { outline: 2px solid #dc2626; outline-offset: 2px; }

/* ============ Document popup ============ */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.modal-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 760px;
  height: min(86vh, 820px);
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1.5px solid var(--border); }
.modal-head h2 { font-size: 17px; font-weight: 800; }
.modal-close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--surface); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.modal-close:hover { background: var(--border); }
.modal-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }
.modal-foot { display: flex; justify-content: flex-end; padding: 12px 18px; border-top: 1.5px solid var(--border); }
@media (max-width: 480px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal-dialog { height: 92vh; max-width: none; border-radius: 18px 18px 0 0; }
}

/* ============ Language switch + Burmese text ============ */
html[lang="my"] {
  --font: "Noto Sans Myanmar", "Myanmar Text", "Padauk", "Pyidaungsu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html[lang="my"] body { line-height: 1.85; }
html[lang="my"] .waitlist-hero h1 { line-height: 1.55; }
html[lang="my"] .field label, html[lang="my"] .field-hint, html[lang="my"] .check-label { line-height: 1.75; }

.lang-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 auto 20px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}
.lang-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  padding: 5px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-btn[lang="my"] { font-family: "Noto Sans Myanmar", "Myanmar Text", "Padauk", "Pyidaungsu", sans-serif; }
.lang-btn.is-active { background: #fff; color: var(--text); }
.lang-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
