/* MiniRPM — Firebase account / tracking / affiliate styles */

/* configuration banner */
.gt-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
  background: rgba(245, 166, 35, 0.14);
  border: 1px solid rgba(245, 166, 35, 0.5);
  color: #f5a623;
}
.gt-banner.warn { color: #f5a623; }
.gt-banner.ok { color: #34c759; border-color: rgba(52,199,89,0.5); background: rgba(52,199,89,0.12); }

/* iOS-style locked dashboard (logged out) */
#accountDash.locked .acc-row {
  opacity: 0.55;
  cursor: pointer;
}
#accountDash.locked .acc-row .acc-ico::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.acc-ico { position: relative; }

.acc-row.mini {
  padding: 10px 12px;
  font-size: 13px;
}
.acc-row.mini .acc-row-label { font-weight: 600; }
.acc-row.mini .acc-row-value { opacity: 0.7; text-transform: capitalize; }

/* tracking image */
.track-image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
  background: #11141a;
}

.timeline { margin-top: 6px; }
.track-empty { color: rgba(255,255,255,0.7); font-size: 14px; padding: 8px 2px; }
.tl-step {
  position: relative;
  padding: 10px 0 10px 26px;
  border-left: 2px solid rgba(255,255,255,0.18);
  margin-left: 8px;
}
.tl-step::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
}
.tl-step.done::before { background: #34c759; }
.tl-step.current::before { background: #f5a623; box-shadow: 0 0 0 4px rgba(245,166,35,0.25); }
.tl-step strong { display: block; font-size: 14px; }
.tl-step span { font-size: 12.5px; color: rgba(255,255,255,0.65); }

.dash-my-orders { margin-top: 14px; }

/* earnings chart — animated gold donut */
.earn-chart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  height: auto;
  margin: 0;
  padding: 12px 4px 20px;
}
.earn-ring {
  position: relative;
  overflow: visible;
  width: min(225px, 74vw);
  aspect-ratio: 1;
  margin: 0 auto;
}
.earn-ring svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(-90deg);
}
.earn-ring-track {
  fill: none;
  stroke: rgba(17, 20, 23, 0.1);
  stroke-width: 16;
}
.earn-ring-seg {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
  opacity: 0;
  transition: stroke-dasharray 1.1s cubic-bezier(0.2, 0.8, 0.2, 1),
              stroke-dashoffset 1.1s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.4s ease;
}
#earnSegPaid {
  stroke: url(#earnGradPaid);
  filter: drop-shadow(0 4px 12px rgba(176, 142, 72, 0.38));
}
#earnSegPending {
  stroke: url(#earnGradPending);
  filter: drop-shadow(0 4px 10px rgba(201, 142, 44, 0.25));
}
.earn-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.earn-ring-center span {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a6d2f;
}
.earn-ring-center strong {
  font-size: 2rem;
  font-weight: 950;
  letter-spacing: -0.02em;
  color: #111417;
  line-height: 1.15;
  margin: 5px 0 3px;
  font-variant-numeric: tabular-nums;
}
.earn-ring-center em {
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8f98;
}
.earn-legend {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.earn-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 19, 23, 0.07);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fafbfc);
  box-shadow: 0 8px 20px rgba(20, 27, 34, 0.06);
}
.earn-legend-item > span:nth-child(2) {
  flex: 1;
  font-size: 0.8rem;
  color: #64717c;
  font-weight: 600;
}
.earn-legend-item strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: #111417;
  font-variant-numeric: tabular-nums;
}
.earn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.earn-dot-paid {
  background: linear-gradient(135deg, #ddb964, #a8873f);
  box-shadow: 0 0 0 3px rgba(182, 155, 98, 0.15);
}
.earn-dot-pending {
  background: linear-gradient(135deg, #f2cd85, #d9a441);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.15);
}

@media (max-width: 560px) {
  .earn-chart {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .earn-ring {
    width: min(215px, 68vw);
  }
  .earn-ring-center strong {
    font-size: 1.7rem;
  }
}

/* forgot password + ghost button */
.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85);
  margin-top: 10px;
}
.btn.ghost:hover { background: rgba(255,255,255,0.08); }
#authReset { margin-top: 10px; }

/* pulse highlight for sign-in prompt */
@keyframes gtPulse {
  0% { box-shadow: 0 0 0 0 rgba(245,166,35,0.55); }
  70% { box-shadow: 0 0 0 14px rgba(245,166,35,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,166,35,0); }
}
#accountAuth.pulse { animation: gtPulse 1s ease-out 2; border-radius: 18px; }

/* small subhead */
.acc-subhead.small { font-size: 12px; opacity: 0.6; margin: 4px 2px 6px; }

/* admin page */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 18px 80px; color: #e9edf2; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-head h1 { font-size: 22px; margin: 0; }
.admin-auth { max-width: 380px; margin: 60px auto; }
.admin-auth .ios-card { padding: 22px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; margin-bottom: 22px; }
.admin-stat { background: #151a22; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 16px; }
.admin-stat strong { display: block; font-size: 24px; }
.admin-stat span { font-size: 12.5px; opacity: 0.7; }
.admin-section { background: #11151c; border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 16px; margin-bottom: 22px; overflow: auto; }
.admin-section h2 { font-size: 16px; margin: 0 0 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.admin-table th, .admin-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,0.07); vertical-align: top; }
.admin-table th { position: sticky; top: 0; background: #11151c; opacity: 0.8; font-weight: 600; }
.admin-table tr:hover td { background: rgba(255,255,255,0.03); }
.admin-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: 18px; }
.admin-chart-card { background: #11151c; border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 16px; }
.admin-chart-card h3 { margin: 0 0 10px; font-size: 14px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
button.mini-btn { font-size: 12px; padding: 5px 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); color: #e9edf2; cursor: pointer; }
button.mini-btn.pay { border-color: rgba(52,199,89,0.6); color: #34c759; }
button.mini-btn.danger { border-color: rgba(255,69,58,0.6); color: #ff453a; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: rgba(255,255,255,0.1); }
.tag.paid { background: rgba(52,199,89,0.18); color: #34c759; }
.tag.pending { background: rgba(245,166,35,0.18); color: #f5a623; }
.admin-empty { opacity: 0.6; font-size: 13px; padding: 8px 2px; }
.admin-logout { font-size: 13px; padding: 7px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); color: #e9edf2; cursor: pointer; }

/* support messaging (account side) — iMessage-style */
.msg-thread {
  max-height: 440px;
  min-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 8px;
  background: #0c0f14;
  border-radius: 14px;
  scroll-behavior: smooth;
}
.msg-empty { margin: auto; text-align: center; color: rgba(233,237,242,.5); font-size: .9rem; padding: 24px 14px; line-height: 1.5; }
.msg-day { text-align: center; margin: 12px 0 8px; }
.msg-day span {
  font-size: 11px;
  letter-spacing: .02em;
  color: rgba(233,237,242,.6);
  background: rgba(255,255,255,.06);
  padding: 3px 11px;
  border-radius: 999px;
}
.msg-row { display: flex; margin: 2px 0; }
.msg-row.me { justify-content: flex-end; }
.msg-row.them { justify-content: flex-start; }
.msg-row.grouped { margin-top: 0; }
.msg-bubble {
  max-width: 78%;
  padding: 9px 13px;
  border-radius: 20px;
  font-size: .92rem;
  line-height: 1.38;
  position: relative;
  box-shadow: 0 1px 1px rgba(0,0,0,.18);
  animation: msgIn .18s ease-out;
}
.msg-row.me .msg-bubble { background: linear-gradient(180deg, #2a3340, #222b36); color: #e9edf2; border-bottom-right-radius: 6px; }
.msg-row.me.grouped .msg-bubble { border-bottom-right-radius: 20px; border-top-right-radius: 6px; }
.msg-row.them .msg-bubble { background: #161c25; color: #e9edf2; border-bottom-left-radius: 6px; }
.msg-row.them.grouped .msg-bubble { border-bottom-left-radius: 20px; border-top-left-radius: 6px; }
.msg-text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg-meta { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 4px; font-size: .62rem; opacity: .62; }
.msg-row.them .msg-meta { justify-content: flex-start; }
.msg-status { font-style: normal; }
.msg-row.me .msg-status { color: #aeb8c4; opacity: .85; }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.msg-form-msg { min-height: 16px; margin: 6px 2px 0; font-size: .8rem; color: #ff6b5e; }
.msg-form-msg[data-status='ok'] { color: #34c759; }
.msg-compose { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; }
.msg-input {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  resize: none;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  padding: 11px 14px;
  font-size: .92rem;
  font-family: inherit;
  background: #0c0f14;
  color: #e9edf2;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.msg-input:focus { outline: none; border-color: #cfd6df; box-shadow: 0 0 0 3px rgba(207,214,223,.15); }
.acc-ico-msg { background: linear-gradient(135deg, #5e5ce6, #7d4dff); }

/* ================= 20260817 sub-view polish — world-class iOS ================= */

/* --- shared large-title header --- */
.acc-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 11px;
  border: 1px solid rgba(182, 155, 98, 0.35);
  border-radius: 999px;
  background: rgba(182, 155, 98, 0.08);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: #8a6d2f;
  margin: 0 0 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.acc-back:hover { background: rgba(182, 155, 98, 0.16); }
.acc-back:active { transform: scale(0.96); }
.acc-back-chev {
  width: 7px;
  height: 7px;
  border-left: 2px solid #8a6d2f;
  border-bottom: 2px solid #8a6d2f;
}
.acc-subhead {
  font-size: 1.55rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-transform: none;
  color: #111417;
  margin: 0 0 6px;
}
.acc-sub {
  font-size: 0.86rem;
  line-height: 1.5;
  color: #64717c;
  margin: 0 0 20px;
}

/* --- order tracking --- */
.track-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #151a22, #1e242c);
  border: 1px solid rgba(182, 155, 98, 0.25);
}
.track-hero-ico {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #c9a45c, #a8873f);
  box-shadow: 0 8px 18px rgba(176, 142, 72, 0.35);
}
.track-hero-text h3 {
  margin: 0 0 2px;
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.track-hero-text p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.45;
}
.track-image {
  border-radius: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(15, 19, 23, 0.06);
}
#dashTimeline { margin-top: 18px; }
#dashTimeline:empty::after {
  content: "Your build timeline will appear here once you track an order.";
  display: block;
  padding: 24px 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #8a8f98;
  text-align: center;
  border: 1.5px dashed rgba(15, 19, 23, 0.16);
  border-radius: 14px;
}
#dashTimeline:empty { margin-top: 18px; }
.tl-step { border-left: 2px solid rgba(182, 155, 98, 0.35); }
.tl-step::before {
  background: #d8dbe0;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(182, 155, 98, 0.25);
}
.tl-step.done::before { background: #34c759; box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.2); }
.tl-step.current::before {
  background: #c9a45c;
  box-shadow: 0 0 0 4px rgba(201, 164, 92, 0.25);
}
.tl-step strong { color: #111417; }
.tl-step span { color: #64717c; }

/* --- affiliate --- */
.aff-code-row {
  background: linear-gradient(135deg, #151a22, #1e242c);
  border: 1px solid rgba(182, 155, 98, 0.35);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: 0 14px 30px rgba(20, 27, 34, 0.14);
}
.aff-code-row code {
  font-size: 1.3rem;
  letter-spacing: 0.14em;
  color: #e8cd8d;
  font-weight: 800;
}
.aff-code-row .btn {
  border-radius: 999px;
  background: linear-gradient(135deg, #c9a45c, #a8873f) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(176, 142, 72, 0.3) !important;
}
.aff-code-row .btn:hover { transform: translateY(-1px) !important; }
.aff-link {
  font-size: 0.72rem;
  color: #64717c;
  word-break: break-all;
  margin: 0 0 14px;
  padding: 8px 12px;
  background: rgba(17, 20, 23, 0.04);
  border-radius: 10px;
}
.aff-progress { margin: 20px 0 4px; }
.aff-tier-note {
  background: rgba(182, 155, 98, 0.08);
  border: 1px solid rgba(182, 155, 98, 0.2);
  border-radius: 12px;
  padding: 10px 14px;
  color: #6e5522 !important;
  font-weight: 600;
}

/* --- support --- */
#accViewMessages .msg-thread {
  border: 1px solid rgba(15, 19, 23, 0.08);
  box-shadow: inset 0 2px 10px rgba(20, 27, 34, 0.05);
}
#accViewMessages .msg-compose .btn.secondary {
  background: linear-gradient(135deg, #c9a45c, #a8873f) !important;
  border: 0 !important;
  color: #fff !important;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  box-shadow: 0 8px 18px rgba(176, 142, 72, 0.3) !important;
}

/* --- earnings payout: iOS segmented control --- */
.payout-method-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #eef1f4;
  border-radius: 12px;
  padding: 4px;
}
.payout-method-toggle .payout-method-btn {
  border: 0 !important;
  background: transparent !important;
  border-radius: 9px;
  justify-content: center;
  color: #5d6974 !important;
  box-shadow: none !important;
}
.payout-method-toggle .payout-method-btn:hover { background: rgba(255, 255, 255, 0.5) !important; }
.payout-method-toggle .payout-method-btn.active {
  background: #fff !important;
  color: #111417 !important;
  box-shadow: 0 3px 10px rgba(20, 27, 34, 0.12) !important;
}
.earn-note {
  background: rgba(182, 155, 98, 0.08);
  border: 1px solid rgba(182, 155, 98, 0.18);
  border-radius: 12px;
  padding: 10px 14px;
  color: #6e5522;
  font-weight: 600;
}
