/* GymOS Member Portal — Public CSS v1.0.0 */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --gp-bg:      #0d0d0d;
  --gp-surface: #141414;
  --gp-card:    #1c1c1c;
  --gp-card2:   #232323;
  --gp-border:  rgba(255,255,255,.08);
  --gp-border2: rgba(255,255,255,.13);
  --gp-lime:    #c8f230;
  --gp-lime2:   #a8d010;
  --gp-orange:  #ff5c00;
  --gp-red:     #ef4444;
  --gp-blue:    #38bdf8;
  --gp-white:   #f2efe9;
  --gp-muted:   #888;
  --gp-r:       12px;
  --gp-r2:      18px;
  --gp-font-h:  'Syne', sans-serif;
  --gp-font-b:  'DM Sans', sans-serif;
}

/* ── Base ── */
.gp-login-wrap,
.gp-portal,
.gp-member-card {
  font-family: var(--gp-font-b);
  color: var(--gp-white);
  -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════
   LOGIN FORM
════════════════════════════════════ */
.gp-login-wrap {
  max-width: 420px;
  margin: 40px auto;
  background: var(--gp-surface);
  border: 1px solid var(--gp-border2);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

.gp-login-step { padding: 36px 32px; }

.gp-login-logo {
  font-family: var(--gp-font-h);
  font-size: 26px; font-weight: 800;
  letter-spacing: -.5px; margin-bottom: 20px;
  color: var(--gp-white);
}
.gp-login-logo span { color: var(--gp-lime); }

.gp-login-title {
  font-family: var(--gp-font-h);
  font-size: 20px; font-weight: 800;
  letter-spacing: -.5px; margin-bottom: 8px;
}
.gp-login-sub {
  font-size: 14px; color: var(--gp-muted);
  line-height: 1.55; margin-bottom: 24px;
}

.gp-prefix {
  background: var(--gp-card2);
  border: 1px solid var(--gp-border2);
  border-radius: var(--gp-r);
  padding: 12px 14px;
  font-size: 14px; font-weight: 500;
  white-space: nowrap;
  display: flex; align-items: center;
}

/* OTP boxes */
.gp-otp-boxes {
  display: flex; gap: 10px;
  margin: 20px 0;
  justify-content: center;
}
.gp-otp-box {
  width: 48px; height: 56px;
  background: var(--gp-card2);
  border: 1.5px solid var(--gp-border2);
  border-radius: var(--gp-r);
  text-align: center;
  font-family: var(--gp-font-h);
  font-size: 22px; font-weight: 800;
  color: var(--gp-white);
  caret-color: var(--gp-lime);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.gp-otp-box:focus {
  border-color: var(--gp-lime);
  box-shadow: 0 0 0 3px rgba(200,242,48,.12);
}

.gp-resend-wrap {
  text-align: center;
  font-size: 13px; color: var(--gp-muted);
  margin-top: 16px;
}
.gp-resend-btn {
  background: none; border: none;
  color: var(--gp-lime); font-size: 13px;
  font-family: var(--gp-font-b);
  cursor: pointer; font-weight: 600;
  margin-left: 4px;
}
.gp-resend-btn:disabled { color: var(--gp-muted); cursor: not-allowed; }

.gp-login-note {
  text-align: center;
  font-size: 12px; color: var(--gp-muted);
  margin-top: 14px; line-height: 1.5;
}

/* ════════════════════════════════════
   PORTAL
════════════════════════════════════ */
.gp-portal {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
}

/* Header */
.gp-header {
  display: flex; justify-content: space-between;
  align-items: flex-start;
  padding: 0 4px 20px;
  border-bottom: 1px solid var(--gp-border);
  margin-bottom: 16px;
}
.gp-gym-name {
  font-family: var(--gp-font-h);
  font-size: 18px; font-weight: 800;
  letter-spacing: -.3px;
}
.gp-gym-name span { color: var(--gp-lime); }
.gp-gym-sep { color: var(--gp-muted); font-weight: 400; }
.gp-welcome { font-size: 13px; color: var(--gp-muted); margin-top: 3px; }

/* Membership Status Card */
.gp-ms-card {
  background: rgba(200,242,48,.07);
  border: 1px solid rgba(200,242,48,.2);
  border-radius: var(--gp-r2);
  padding: 20px 22px;
  display: flex; justify-content: space-between;
  align-items: center; gap: 16px;
  margin-bottom: 16px;
}
.gp-ms-card.urgent {
  background: rgba(255,92,0,.07);
  border-color: rgba(255,92,0,.25);
}
.gp-ms-card.expired {
  background: rgba(239,68,68,.05);
  border-color: rgba(239,68,68,.2);
}
.gp-ms-badge {
  font-size: 11px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--gp-lime); margin-bottom: 6px;
}
.gp-ms-card.urgent .gp-ms-badge  { color: var(--gp-orange); }
.gp-ms-card.expired .gp-ms-badge { color: var(--gp-red); }
.gp-ms-paket {
  font-family: var(--gp-font-h);
  font-size: 18px; font-weight: 800; letter-spacing: -.3px;
}
.gp-ms-expire { font-size: 13px; color: var(--gp-muted); margin-top: 3px; }
.gp-ms-warning {
  font-size: 12px; color: var(--gp-orange);
  margin-top: 8px; line-height: 1.5;
}
.gp-ms-right { text-align: center; flex-shrink: 0; }
.gp-ms-days {
  font-family: var(--gp-font-h);
  font-size: 42px; font-weight: 800;
  color: var(--gp-lime); line-height: 1;
}
.gp-ms-card.urgent .gp-ms-days { color: var(--gp-orange); }
.gp-ms-days-label { font-size: 11px; color: var(--gp-muted); margin-top: 3px; }

/* Tabs */
.gp-tabs {
  display: flex; gap: 4px;
  background: var(--gp-surface);
  border: 1px solid var(--gp-border);
  border-radius: var(--gp-r2);
  padding: 5px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.gp-tabs::-webkit-scrollbar { display: none; }
.gp-tab {
  flex: 1; min-width: max-content;
  padding: 9px 14px;
  border-radius: var(--gp-r);
  font-family: var(--gp-font-b);
  font-size: 12.5px; font-weight: 600;
  color: var(--gp-muted);
  transition: all .2s;
  white-space: nowrap;
}
.gp-tab:hover { color: var(--gp-white); background: rgba(255,255,255,.05); }
.gp-tab.active {
  background: var(--gp-card2);
  color: var(--gp-white);
  border: 1px solid var(--gp-border2);
}

/* Panels */
.gp-panel { display: none; }
.gp-panel.active { display: block; }

/* Stats grid */
.gp-stats-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 10px; margin-bottom: 14px;
}
.gp-stat {
  background: var(--gp-card);
  border: 1px solid var(--gp-border);
  border-radius: var(--gp-r2);
  padding: 18px 14px; text-align: center;
}
.gp-stat-loader {
  height: 40px;
  background: linear-gradient(90deg, var(--gp-card) 25%, var(--gp-card2) 50%, var(--gp-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.gp-stat-icon { font-size: 22px; margin-bottom: 8px; display: block; }
.gp-stat-num {
  font-family: var(--gp-font-h);
  font-size: 30px; font-weight: 800;
  color: var(--gp-lime); line-height: 1;
  margin-bottom: 4px;
}
.gp-stat-label { font-size: 11px; color: var(--gp-muted); }

/* Card */
.gp-card {
  background: var(--gp-card);
  border: 1px solid var(--gp-border);
  border-radius: var(--gp-r2);
  padding: 18px 20px;
  margin-bottom: 12px;
}
.gp-card-title {
  font-family: var(--gp-font-h);
  font-size: 15px; font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gp-border);
}

/* QR Section */
.gp-qr-section { text-align: center; padding: 8px 0; }
.gp-qr-title {
  font-family: var(--gp-font-h);
  font-size: 18px; font-weight: 800;
  margin-bottom: 6px;
}
.gp-qr-sub { font-size: 13px; color: var(--gp-muted); margin-bottom: 24px; }
.gp-qr-wrap { display: flex; justify-content: center; margin-bottom: 14px; }
.gp-qr-bg {
  background: #fff;
  padding: 14px; border-radius: 16px;
  display: inline-block;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.gp-qr-bg canvas,
.gp-qr-bg img { display: block; }
.gp-qr-code-text {
  font-size: 10px; color: var(--gp-muted);
  letter-spacing: .5px; word-break: break-all;
  margin-bottom: 16px; padding: 0 16px;
}
.gp-qr-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; }
.gp-qr-note {
  background: rgba(200,242,48,.07);
  border: 1px solid rgba(200,242,48,.15);
  border-radius: var(--gp-r);
  padding: 12px 16px;
  font-size: 12.5px; color: var(--gp-muted);
  line-height: 1.5;
}

/* History */
.gp-history-row {
  display: flex; align-items: flex-start;
  gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--gp-border);
}
.gp-history-row:last-child { border: none; }
.gp-history-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gp-lime); flex-shrink: 0;
  margin-top: 5px;
}
.gp-history-date { font-size: 13.5px; font-weight: 500; }
.gp-history-meta { font-size: 11.5px; color: var(--gp-muted); margin-top: 2px; }
.gp-last-visit { font-size: 13.5px; color: var(--gp-muted); padding: 8px 0; }

/* Invoices */
.gp-invoice-row {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gp-border);
}
.gp-invoice-row:last-child { border: none; }
.gp-invoice-no { font-size: 12px; color: var(--gp-muted); font-family: monospace; }
.gp-invoice-meta { font-size: 12px; color: var(--gp-muted); margin-top: 3px; }
.gp-invoice-amount {
  font-family: var(--gp-font-h);
  font-size: 15px; font-weight: 800; color: var(--gp-lime);
}

/* Profile */
.gp-profile-avatar {
  display: flex; justify-content: center;
  margin-bottom: 20px;
}
.gp-avatar-placeholder {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(200,242,48,.12);
  border: 2px solid rgba(200,242,48,.3);
  color: var(--gp-lime);
  font-family: var(--gp-font-h);
  font-size: 28px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* Membership history */
.gp-ms-history-row {
  display: flex; gap: 10px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--gp-border);
  font-size: 13px; flex-wrap: wrap;
}
.gp-ms-history-row:last-child { border: none; }
.gp-ms-history-paket { font-weight: 600; min-width: 80px; }
.gp-ms-history-dates { color: var(--gp-muted); flex: 1; font-size: 12px; }
.gp-ms-history-price { color: var(--gp-lime); font-weight: 600; }
.gp-ms-history-status { font-size: 11px; font-weight: 700; text-transform: uppercase; }

/* ════════════════════════════════════
   MEMBER CARD (printable)
════════════════════════════════════ */
.gp-member-card {
  max-width: 320px;
  background: var(--gp-surface);
  border: 1px solid var(--gp-border2);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
  margin: 0 auto;
}
.gp-mc-header {
  background: #0d0d0d;
  padding: 16px 20px;
  display: flex; justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gp-border);
}
.gp-mc-gym { font-size: 12px; color: var(--gp-muted); font-weight: 500; }
.gp-mc-logo {
  font-family: var(--gp-font-h);
  font-size: 16px; font-weight: 800;
}
.gp-mc-logo span { color: var(--gp-lime); }
.gp-mc-body {
  padding: 20px;
  display: flex; gap: 14px; align-items: center;
  border-bottom: 1px solid var(--gp-border);
}
.gp-mc-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(200,242,48,.12);
  border: 2px solid rgba(200,242,48,.3);
  color: var(--gp-lime);
  font-family: var(--gp-font-h); font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.gp-mc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gp-mc-name {
  font-family: var(--gp-font-h);
  font-size: 16px; font-weight: 800;
  letter-spacing: -.3px; margin-bottom: 3px;
}
.gp-mc-id { font-size: 11px; color: var(--gp-muted); }
.gp-mc-badge {
  display: inline-block; margin-top: 5px;
  background: rgba(200,242,48,.12);
  color: var(--gp-lime);
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: .5px;
}
.gp-mc-qr {
  padding: 20px;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  border-bottom: 1px solid var(--gp-border);
}
.gp-mc-qr-img {
  background: #fff; padding: 10px; border-radius: 10px;
}
.gp-mc-qr-img img { display: block; width: 160px; height: 160px; }
.gp-mc-qr-text { font-size: 9px; color: var(--gp-muted); word-break: break-all; text-align: center; }
.gp-mc-footer {
  padding: 14px 20px;
  display: flex; justify-content: space-between;
  font-size: 12px;
}
.gp-mc-urgent { color: var(--gp-orange) !important; font-weight: 700; }

/* ════════════════════════════════════
   SHARED COMPONENTS
════════════════════════════════════ */
.gp-form-row { margin-bottom: 16px; }
.gp-form-row label {
  display: block;
  font-size: 11px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--gp-muted); margin-bottom: 6px;
}
.gp-input {
  width: 100%; padding: 12px 14px;
  background: var(--gp-card2);
  border: 1.5px solid var(--gp-border2);
  border-radius: var(--gp-r);
  color: var(--gp-white);
  font-family: var(--gp-font-b); font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.gp-input:focus {
  border-color: var(--gp-lime);
  box-shadow: 0 0 0 3px rgba(200,242,48,.1);
}

.gp-btn {
  display: inline-flex; align-items: center;
  justify-content: center; gap: 6px;
  padding: 12px 20px; border-radius: 100px;
  font-family: var(--gp-font-b);
  font-size: 14px; font-weight: 700;
  transition: all .2s; cursor: pointer;
  width: 100%; margin-bottom: 8px;
}
.gp-btn:last-child { margin-bottom: 0; }
.gp-btn-sm { padding: 8px 16px; font-size: 12.5px; width: auto; margin: 0; }
.gp-btn-primary {
  background: var(--gp-lime); color: #000; border: none;
}
.gp-btn-primary:hover { background: var(--gp-lime2); transform: translateY(-1px); }
.gp-btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.gp-btn-ghost {
  background: transparent;
  border: 1px solid var(--gp-border2); color: var(--gp-white);
}
.gp-btn-ghost:hover { border-color: rgba(255,255,255,.3); }

.gp-alert {
  padding: 11px 14px; border-radius: var(--gp-r);
  font-size: 13px; margin-bottom: 14px; font-weight: 500;
}
.gp-alert-success { background: rgba(200,242,48,.1); border: 1px solid rgba(200,242,48,.25); color: var(--gp-lime); }
.gp-alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.25);  color: #f87171; }
.gp-alert-info    { background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.25); color: var(--gp-blue); }

.gp-loading { text-align: center; padding: 24px; color: var(--gp-muted); font-size: 13px; }
.gp-empty   { text-align: center; padding: 32px 16px; color: var(--gp-muted); font-size: 14px; }

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 480px) {
  .gp-login-step { padding: 28px 20px; }
  .gp-otp-box { width: 42px; height: 50px; font-size: 20px; }
  .gp-otp-boxes { gap: 7px; }
  .gp-stats-grid { grid-template-columns: repeat(3,1fr); gap: 8px; }
  .gp-stat-num { font-size: 24px; }
  .gp-ms-days { font-size: 34px; }
  .gp-tab { padding: 8px 10px; font-size: 11.5px; }
  .gp-portal { padding: 12px; }
}
