/* Zagroos Vipe — iOS Liquid Glass — matched to admin-ios */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
  --zc-bg: #e8e8ed;
  --zc-elevated: rgba(255, 255, 255, 0.72);
  --zc-text: #1d1d1f;
  --zc-muted: #6e6e73;
  --zc-blue: #007aff;
  --zc-blue-press: #0066d6;
  --zc-green: #30d158;
  --zc-green-dark: #248a3d;
  --zc-red: #ff453a;
  --zc-border: rgba(0, 0, 0, 0.06);
  --zc-border-strong: rgba(0, 0, 0, 0.12);
  --zc-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --zc-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
  --zc-radius: 20px;
  --zc-radius-sm: 14px;
  --zc-blur: saturate(180%) blur(28px);
  --zc-safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

.zc-vipe-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(0, 122, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 100% 60% at 100% 0%, rgba(48, 209, 88, 0.08), transparent 45%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(255, 159, 10, 0.06), transparent 40%),
    var(--zc-bg);
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  color: var(--zc-text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.zc-vipe {
  max-width: 440px;
  margin: 0 auto;
  padding: 12px 14px calc(108px + var(--zc-safe-b));
  position: relative;
  z-index: 1;
}
@media (min-width: 600px) {
  .zc-vipe { max-width: 520px; padding-top: 24px; }
}

.zc-vipe-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding: 4px 2px;
}
.zc-vipe-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--zc-text);
}
.zc-vipe-header .zc-muted {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--zc-muted);
  font-weight: 500;
}
.zc-vipe-header strong { color: var(--zc-blue); font-weight: 700; }

.zc-vipe-link {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.zc-vipe-link code {
  background: var(--zc-elevated);
  backdrop-filter: var(--zc-blur);
  -webkit-backdrop-filter: var(--zc-blur);
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  border: 1px solid var(--zc-border);
  color: var(--zc-muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zc-qr {
  width: 64px; height: 64px;
  border-radius: 12px;
  border: 1px solid var(--zc-border);
  box-shadow: var(--zc-shadow);
  background: #fff;
}
.zc-qr-lg {
  display: block;
  margin: 16px auto;
  width: 160px; height: 160px;
  border-radius: 20px;
  box-shadow: var(--zc-shadow-lg);
  border: 4px solid #fff;
}

.zc-vipe-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.zc-stat-card {
  background: var(--zc-elevated);
  backdrop-filter: var(--zc-blur);
  -webkit-backdrop-filter: var(--zc-blur);
  border-radius: var(--zc-radius);
  padding: 16px 14px;
  border: 1px solid var(--zc-border);
  box-shadow: var(--zc-shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.zc-stat-card:active { transform: scale(0.97); }
.zc-stat-card span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--zc-muted);
}
.zc-stat-card strong {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.zc-stat-money {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(48, 209, 88, 0.12), rgba(0, 122, 255, 0.08));
  border-color: rgba(48, 209, 88, 0.2);
}
.zc-stat-money strong { color: var(--zc-green-dark); font-size: 1.65rem; }
.zc-stat-money small { font-size: 0.75rem; color: var(--zc-muted); font-weight: 600; margin-right: 4px; }

.zc-vipe-card {
  background: var(--zc-elevated);
  backdrop-filter: var(--zc-blur);
  -webkit-backdrop-filter: var(--zc-blur);
  border-radius: var(--zc-radius);
  padding: 18px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--zc-border);
  box-shadow: var(--zc-shadow);
}
.zc-vipe-card h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.zc-vipe-card h2::before {
  content: '';
  width: 4px; height: 16px;
  border-radius: 2px;
  background: var(--zc-blue);
  flex-shrink: 0;
}
.zc-muted { color: var(--zc-muted); font-size: 0.875rem; }

.zc-vipe label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--zc-muted);
}
.zc-vipe input[type="text"],
.zc-vipe input[type="number"],
.zc-vipe input[type="password"],
.zc-vipe input[type="email"],
.zc-vipe textarea,
.zc-vipe select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 13px 14px;
  border-radius: var(--zc-radius-sm);
  border: 1px solid var(--zc-border-strong);
  background: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--zc-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.zc-vipe input:focus,
.zc-vipe textarea:focus,
.zc-vipe select:focus {
  outline: none;
  border-color: var(--zc-blue);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}
.zc-vipe input[type="file"] {
  margin-top: 6px;
  font-size: 0.8125rem;
  padding: 10px;
  border: 1.5px dashed var(--zc-border-strong);
  border-radius: var(--zc-radius-sm);
  background: rgba(0, 0, 0, 0.02);
  width: 100%;
  cursor: pointer;
}

.zc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 20px;
  border-radius: 980px;
  border: none;
  background: rgba(120, 120, 128, 0.16);
  color: var(--zc-text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.15s;
  -webkit-user-select: none;
  user-select: none;
  letter-spacing: -0.01em;
}
.zc-btn:hover { opacity: 0.92; }
.zc-btn:active { transform: scale(0.96); }
.zc-btn-primary {
  background: var(--zc-blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.35);
}
.zc-btn-primary:active { background: var(--zc-blue-press); }
.zc-btn-withdraw {
  background: linear-gradient(180deg, #34d35a 0%, #30d158 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(48, 209, 88, 0.4);
  font-weight: 700;
  padding: 14px 22px;
  min-width: 140px;
}

.zc-outlook-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.zc-outlook-row label { flex: 1; min-width: 110px; margin: 0; }
.zc-outlook-result {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--zc-radius-sm);
  background: rgba(0, 122, 255, 0.08);
  font-weight: 700;
  font-size: 1rem;
  color: var(--zc-blue);
  text-align: center;
}

.zc-contract-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.zc-contract-actions .zc-btn {
  width: 100%;
  padding: 16px 12px;
  border-radius: var(--zc-radius-sm);
}

.zc-msg {
  min-height: 1.2em;
  font-size: 0.875rem;
  margin-top: 10px;
  font-weight: 600;
  text-align: center;
}
.zc-msg.ok { color: var(--zc-green-dark); }
.zc-msg.err { color: var(--zc-red); }

/* FOOTER — Liquid Glass Dock */
.zc-vipe-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  z-index: 100;
  padding: 0 12px calc(10px + var(--zc-safe-b));
  pointer-events: none;
}
.zc-vipe-footer-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(200%) blur(40px);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.12),
    0 0 0 0.5px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: zc-dock-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes zc-dock-in {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.zc-footer-balance {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.zc-footer-balance span {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--zc-muted);
  letter-spacing: 0.02em;
}
.zc-footer-balance-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.zc-footer-balance strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--zc-green-dark);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.zc-footer-balance small {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--zc-muted);
}
.zc-vipe-footer .zc-btn-withdraw {
  flex-shrink: 0;
  border-radius: 16px;
  font-size: 0.9rem;
}

/* Modal sheet */
.zc-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: zc-fade 0.25s ease;
}
.zc-modal[hidden] { display: none !important; }
@keyframes zc-fade { from { opacity: 0; } to { opacity: 1; } }
.zc-modal-box {
  background: #f2f2f7;
  border-radius: 28px 28px 0 0;
  padding: 12px 18px calc(28px + var(--zc-safe-b));
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  animation: zc-sheet 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}
.zc-modal-box::before {
  content: '';
  display: block;
  width: 36px; height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.15);
  margin: 4px auto 16px;
}
@keyframes zc-sheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.zc-modal-close {
  position: absolute;
  top: 16px; left: 16px;
  border: none;
  background: rgba(120, 120, 128, 0.16);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  color: var(--zc-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.zc-modal-box h3 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
}
.zc-ready-grid { display: grid; gap: 12px; }
.zc-ready-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 18px;
  border-radius: 18px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--zc-border);
  box-shadow: var(--zc-shadow);
  transition: transform 0.15s;
}
.zc-ready-card:active { transform: scale(0.98); }
.zc-ready-card strong { font-size: 1.05rem; color: var(--zc-blue); font-weight: 700; }
.zc-ready-card span { font-size: 0.8125rem; color: var(--zc-muted); font-weight: 500; }

.zc-vipe-public {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.zc-vipe-login-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  padding: 28px 22px !important;
}
.zc-vipe-login-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.03em;
}
.zc-vipe-login-card h2 {
  font-size: 1.05rem;
  margin: 20px 0 14px;
  font-weight: 700;
}
.zc-vipe-login-card h2::before { display: none; }
.zc-vipe-login-card label { text-align: right; }
.zc-vipe-login-card .zc-btn {
  width: 100%;
  margin-top: 8px;
  padding: 15px;
  border-radius: 14px;
}
.zc-vipe-login-card hr {
  border: none;
  height: 1px;
  background: var(--zc-border-strong);
  margin: 20px 0;
}

.zc-webmaker {
  padding: 8px 0 40px;
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--zc-text);
}
.zc-wm-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 18px;
  letter-spacing: -0.03em;
}
.zc-wm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.zc-wm-card {
  background: var(--zc-elevated);
  backdrop-filter: var(--zc-blur);
  -webkit-backdrop-filter: var(--zc-blur);
  border-radius: var(--zc-radius);
  overflow: hidden;
  border: 1px solid var(--zc-border);
  box-shadow: var(--zc-shadow);
  display: flex;
  flex-direction: column;
}
.zc-wm-card img,
.zc-wm-placeholder {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background: linear-gradient(145deg, #d4dce8, #e8e8ed 60%);
}
.zc-wm-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.zc-wm-body h3 { margin: 0; font-size: 0.95rem; font-weight: 700; }
.zc-wm-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0, 122, 255, 0.12);
  color: var(--zc-blue);
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
}
.zc-wm-price { font-weight: 800; margin: 0; font-size: 1.05rem; }
.zc-wm-body .zc-btn {
  margin-top: auto;
  text-align: center;
  width: 100%;
  border-radius: 12px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


.zc-link-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.zc-btn-copy {
  padding: 8px 12px !important;
  font-size: 0.75rem !important;
  border-radius: 10px !important;
  background: var(--zc-blue) !important;
  color: #fff !important;
  white-space: nowrap;
}
.zc-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.zc-qr-wrap .zc-btn { font-size: 0.7rem !important; padding: 6px 10px !important; }
