/* Extra styles for the app pages. Loaded after styles.css. */

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 14px; font-weight: 600; }
.field small { font-size: 13px; color: var(--muted); }
.input {
  height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 16px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.form-error { display: none; padding: 12px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red-text); font-size: 14px; font-weight: 500; margin-bottom: 18px; }
.form-error.is-on { display: block; }

/* ---------- Sign-up / login ---------- */
.auth { min-height: 100vh; display: flex; }
.auth-side {
  flex: 1 1 46%; background: #0F2A22; color: #EAF3EE; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px;
}
.auth-side .logo, .auth-side .logo:hover { color: #FFFFFF; }
.auth-side .logo-dot { color: #7FD3B0; }
.auth-side h2 { font-size: clamp(32px, 3.4vw, 46px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; max-width: 480px; margin-bottom: 28px; }
.auth-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; color: #CFE3DA; font-size: 16px; }
.auth-side li { display: flex; gap: 10px; align-items: center; }
.auth-side li svg { color: #E9B44C; flex-shrink: 0; }
.auth-side .back { color: #A9C7BA; font-size: 14px; text-decoration: none; }
.auth-main { flex: 1 1 54%; display: flex; flex-direction: column; padding: 24px; }
.auth-top { display: flex; justify-content: flex-end; gap: 8px; }
.auth-card { width: 100%; max-width: 440px; margin: auto; padding: 32px 0; }
.auth-card h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 10px; }
.auth-card .sub { color: var(--muted); margin-bottom: 32px; line-height: 1.55; }
.auth-switch { margin-top: 22px; text-align: center; color: var(--muted); font-size: 15px; }
.auth-switch a { font-weight: 600; }

/* ---------- Dashboard extras ---------- */
.empty { padding: 36px 24px; text-align: center; color: var(--muted); }
.links-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.links-form .field { margin: 0; flex: 2 1 220px; }
.links-form .field.amount { flex: 1 1 140px; }
.links-form .btn { min-height: 50px; }
.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 24px; border-top: 1px solid var(--border); }
.link-row:first-child { border-top: 0; }
.link-info { flex: 1 1 240px; min-width: 0; }
.link-info b { display: block; font-size: 15px; }
.link-info span { display: block; font-size: 13px; color: var(--muted); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-amount { font-family: var(--font-mono); font-weight: 600; }
.link-actions { display: flex; gap: 8px; }
.link-actions .btn { min-height: 40px; padding: 0 14px; font-size: 13px; }
.key-box { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 20px 24px; }
.key-box code { flex: 1 1 280px; min-width: 0; font-family: var(--font-mono); font-size: 13.5px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; overflow-x: auto; white-space: nowrap; }
.key-box .btn { min-height: 44px; padding: 0 16px; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.logout-btn { width: 100%; justify-content: flex-start; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--muted); background: transparent; border: 0; font-size: 14.5px; font-weight: 500; cursor: pointer; display: flex; align-items: center; }
.logout-btn:hover { background: var(--bg-alt); color: var(--text); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; transition: all .2s ease; pointer-events: none; z-index: 100; }
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Customer payment page ---------- */
.pay-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 24px 16px 40px; }
.pay-top { width: 100%; max-width: 460px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.pay-card { width: 100%; max-width: 460px; padding: 32px; box-shadow: var(--shadow-lg); }
.pay-merchant { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.pay-merchant span.avatar { display: flex; width: 44px; height: 44px; border-radius: 12px; font-size: 16px; color: #FFFFFF; }
.pay-merchant b { display: block; font-size: 16px; }
.pay-merchant span { display: block; font-size: 14px; color: var(--muted); }
.pay-amount { font-size: 44px; font-weight: 700; letter-spacing: -0.04em; margin-bottom: 26px; }
.pay-amount small { font-size: 18px; color: var(--muted); font-weight: 600; }
.methods-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.method-opt { position: relative; }
.method-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.method-opt label { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--border-strong); border-radius: 14px; cursor: pointer; font-weight: 600; font-size: 14px; min-height: 92px; }
.method-opt input:checked + label { border: 2px solid var(--primary); padding: 13px; background: var(--primary-soft); }
.method-opt input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }
.pay-status { text-align: center; padding: 12px 0 4px; }
.pay-status .big-icon { width: 72px; height: 72px; border-radius: 999px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.pay-status h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 10px; }
.pay-status p { color: var(--muted); line-height: 1.6; margin-bottom: 22px; }
.icon-ok { background: var(--forest-soft); color: var(--forest-text); }
.icon-fail { background: var(--red-soft); color: var(--red-text); }
.icon-wait { background: var(--gold-soft); color: var(--gold-text); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-foot { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pay-foot span { display: inline-flex; align-items: center; gap: 6px; }
.test-note { margin-top: 18px; font-size: 13px; color: var(--gold-text); background: var(--gold-soft); padding: 10px 14px; border-radius: 12px; text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  .auth { flex-direction: column; }
  .auth-side { padding: 28px 24px; gap: 24px; }
  .auth-side h2 { font-size: 28px; margin-bottom: 18px; }
  .auth-side ul, .auth-side .back { display: none; }
  .auth-card h1 { font-size: 32px; }
}
@media (max-width: 480px) {
  .pay-card { padding: 22px; }
  .pay-amount { font-size: 36px; }
}

/* Send money + webhooks */
.balance-action { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--gold); text-decoration: none; }
.balance-action:hover { color: #F4D58A; }
.po-avail { font-size: 14px; color: var(--muted); }
.po-avail b { color: var(--text); font-size: 18px; margin-left: 6px; }
.po-preview { flex-basis: 100%; margin: 0; font-size: 14px; min-height: 20px; }
select.input { appearance: auto; }
.dev-block { padding: 8px 24px 20px; border-top: 1px solid var(--border); }
.dev-block h3 { font-size: 18px; font-weight: 700; margin: 18px 0 4px; }
.dev-block > p { font-size: 14px; margin-bottom: 8px; }
.dev-block .links-form, .dev-block .key-box { padding-left: 0; padding-right: 0; }
.dev-block .links-form { border-bottom: 0; }
.dev-block .mock-label { margin-top: 4px; }
.event-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.event-row code { font-family: var(--font-mono); font-size: 12.5px; }
.cancel-note { text-align: center; margin-top: 14px; font-size: 14px; } .cancel-note a { color: var(--muted); }
