*,
*::before,
*::after{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background:radial-gradient(circle at top,#0f172a,#020617 60%);color:#0f172a}
body{display:flex;align-items:stretch;justify-content:center}
.app{width:100%;max-width:1200px;min-height:100vh;padding:20px 16px 32px;display:flex;flex-direction:column;gap:20px;margin:0 auto}
.app-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-radius:18px;background:rgba(15,23,42,.9);color:#e5e7eb;backdrop-filter:blur(18px);border:1px solid rgba(148,163,184,.35);box-shadow:0 18px 45px rgba(15,23,42,.55)}
.logo{display:flex;align-items:center;gap:12px}
.logo-mark{width:38px;height:38px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 30% 0,#38bdf8,#0ea5e9 40%,#1d4ed8 100%);color:#f9fafb;font-size:20px;font-weight:700;box-shadow:0 0 0 1px rgba(15,23,42,.5),0 12px 25px rgba(56,189,248,.35)}
.logo-text{display:flex;flex-direction:column;gap:1px}
.logo-title{font-weight:650;letter-spacing:.03em;font-size:18px}
.logo-subtitle{font-size:12px;color:#9ca3af}
.header-status{display:flex;align-items:center;gap:8px;font-size:13px;color:#9ca3af}
.status-dot{width:8px;height:8px;border-radius:999px;background:#22c55e;box-shadow:0 0 0 6px rgba(34,197,94,.25)}
.app-main{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:20px;align-items:flex-start}
.hero{grid-column:1/-1;background:linear-gradient(135deg,rgba(15,23,42,.98),rgba(15,118,246,.9));border-radius:22px;padding:22px 20px;color:#e5e7eb;position:relative;overflow:hidden}
.hero::before{content:"";position:absolute;right:-80px;top:-80px;width:240px;height:240px;background:radial-gradient(circle,rgba(56,189,248,.65),transparent 65%);opacity:.8}
.hero-text{position:relative;z-index:1;max-width:720px}
.hero h1{margin:0 0 10px;font-size:26px;line-height:1.2}
.hero p{margin:0 0 10px;font-size:15px;color:#d1d5db}
.hero-list{margin:8px 0 0;padding-left:18px;font-size:14px;color:#e5e7eb}
.widget-section{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:20px}
.widget-card{background:#0b1220;border-radius:22px;padding:20px 18px 18px;border:1px solid rgba(148,163,184,.3);box-shadow:0 24px 60px rgba(15,23,42,.9);color:#e5e7eb}
.widget-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.widget-header h2{margin:0;font-size:18px}
.widget-step{font-size:12px;padding:4px 10px;border-radius:999px;background:rgba(148,163,184,.16);color:#e5e7eb}
.field-group{margin-bottom:14px}
.field-label{display:block;font-size:13px;margin-bottom:6px;color:#e5e7eb}
.segmented-control{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:4px;border-radius:999px;background:rgba(15,23,42,.8);border:1px solid rgba(148,163,184,.35)}
.segment{border:none;border-radius:999px;padding:8px 10px;font-size:12px;background:transparent;color:#e5e7eb;cursor:pointer;transition:background .16s ease,color .16s ease,transform .08s ease;white-space:nowrap}
.segment:hover{background:rgba(51,65,85,.8)}
.segment.active{background:linear-gradient(135deg,#38bdf8,#0ea5e9);color:#020617;box-shadow:0 10px 30px rgba(56,189,248,.55);transform:translateY(-1px)}
.field,.field-inline{display:flex;flex-direction:column}
.field-inline-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:10px}
input[type=text],input[type=email],input[type=number],select,textarea{width:100%;padding:8px 10px;border-radius:10px;border:1px solid rgba(148,163,184,.55);background:rgba(15,23,42,.8);color:#f9fafb;font-size:13px;outline:none;transition:border-color .14s ease,box-shadow .14s ease,background .14s ease}
input::placeholder,textarea::placeholder{color:#6b7280}
input:focus,select:focus,textarea:focus{border-color:#38bdf8;box-shadow:0 0 0 1px rgba(56,189,248,.35);background:rgba(15,23,42,.95)}
select{cursor:pointer;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:linear-gradient(45deg,transparent 50%,#9ca3af 50%),linear-gradient(135deg,#9ca3af 50%,transparent 50%);background-position:calc(100% - 14px) 10px,calc(100% - 9px) 10px;background-size:6px 6px,6px 6px;background-repeat:no-repeat}
.required{color:#f97316}
.optional{color:#6b7280;font-size:11px}
.field-hint{margin:4px 0 0;font-size:11px;color:#9ca3af}
.two-cols{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:12px}
.divider{margin:14px 0 12px;border-top:1px dashed rgba(148,163,184,.45)}
.primary-btn,.secondary-btn,.ghost-btn{border-radius:999px;padding:9px 16px;font-size:13px;border:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:transform .08s ease,box-shadow .12s ease,background .12s ease,opacity .12s ease}
.primary-btn{background:linear-gradient(135deg,#38bdf8,#0ea5e9);color:#020617;font-weight:600;min-width:170px;box-shadow:0 18px 40px rgba(56,189,248,.6)}
.primary-btn:hover{transform:translateY(-1px);box-shadow:0 24px 55px rgba(56,189,248,.75)}
.primary-btn:active{transform:translateY(0);box-shadow:0 12px 30px rgba(56,189,248,.55)}
.primary-btn[disabled]{opacity:.6;cursor:default;transform:none;box-shadow:none}
.secondary-btn{background:rgba(15,23,42,.9);color:#e5e7eb;border:1px solid rgba(148,163,184,.6)}
.secondary-btn:hover{background:rgba(31,41,55,.95)}
.ghost-btn{background:transparent;color:#9ca3af;border:1px dashed rgba(148,163,184,.6)}
.ghost-btn:hover{background:rgba(15,23,42,.85)}
.btn-spinner{width:14px;height:14px;border-radius:999px;border:2px solid rgba(15,23,42,.2);border-top-color:#0f172a;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.form-footer{margin-top:4px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.privacy-note{display:flex;align-items:flex-start;gap:8px;font-size:11px;color:#9ca3af;max-width:360px}
.shield-icon{font-size:14px}
.order-status{margin-top:16px;padding:14px 12px 12px;border-radius:18px;background:radial-gradient(circle at 0 0,rgba(56,189,248,.32),rgba(15,23,42,.95));border:1px solid rgba(56,189,248,.7);color:#e5e7eb}
.order-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.order-badge{font-size:11px;padding:3px 9px;border-radius:999px;background:rgba(22,163,74,.18);border:1px solid rgba(22,163,74,.6);color:#bbf7d0}
.order-id-label{font-size:12px;color:#e5e7eb}
.order-message{margin:0 0 10px;font-size:13px;color:#e5e7eb}
.payment-details{margin-top:6px;padding:10px;border-radius:12px;background:rgba(15,23,42,.92);border:1px solid rgba(148,163,184,.6)}
.payment-details h3{margin:0 0 6px;font-size:14px}
.payment-details pre{margin:0 0 8px;white-space:pre-wrap;word-wrap:break-word;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:12px}
.timer-row{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#e5e7eb}
.timer-value{font-variant-numeric:tabular-nums;font-weight:600}
.order-actions{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}
.info-card{background:rgba(15,23,42,.92);border-radius:22px;padding:18px 16px;border:1px solid rgba(148,163,184,.35);color:#e5e7eb;box-shadow:0 20px 50px rgba(15,23,42,.85);font-size:13px}
.info-card h3{margin:0 0 10px;font-size:15px}
.info-card ol{margin:0 0 10px;padding-left:18px}
.info-card li{margin-bottom:4px}
.info-note{margin:0;font-size:12px;color:#9ca3af}
.app-footer{margin-top:auto;display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#9ca3af}
.footer-link{color:#9ca3af;text-decoration:none}
.footer-link:hover{text-decoration:underline}
.dot-separator{margin:0 6px}
@media (max-width:900px){
  .app-main{display:block}
  .widget-section{grid-template-columns:minmax(0,1fr)}
  .info-card{order:-1}
  .two-cols,.field-inline-row{grid-template-columns:minmax(0,1fr)}
  .hero{padding:18px 14px}
}
@media (max-width:600px){
  .app-header{flex-direction:column;align-items:flex-start;gap:6px}
  .primary-btn{width:100%}
  .form-footer{flex-direction:column;align-items:stretch}
}


.header-cta{
  margin-left:auto;
  text-decoration:none;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(15,40,70,0.15);
  background:#5447e4;
  color:inherit;
  font-weight:600;
}
.header-cta:hover{filter:brightness(0.98);}
@media (max-width: 720px){
  .header-cta{margin-left:0;margin-top:10px;display:inline-flex;}
  .app-header{flex-wrap:wrap;gap:10px;}
}

/* Search */
.search-section{max-width:1100px;margin:0 auto 28px;padding:0 16px}
.search-form .field-group{margin-bottom:0}
.search-row{display:flex;gap:12px;align-items:center}
.search-row input{flex:1}
.search-results{margin-top:14px;border:1px solid #e0e7f0;border-radius:14px;background:#f7f9fc;overflow:hidden}
.search-results-title{padding:12px 14px;border-bottom:1px solid #e0e7f0;font-size:13px}
.search-results-list{display:flex;flex-direction:column}
.result-item{appearance:none;border:0;background:transparent;text-align:left;padding:12px 14px;display:flex;gap:12px;align-items:center;justify-content:space-between;cursor:pointer}
.result-item:hover{background:#ffffff}
.result-main{min-width:0}
.result-id{font-weight:700;letter-spacing:.2px}
.result-meta{font-size:12px;color:#55657a;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.result-amount{font-variant-numeric:tabular-nums;font-weight:700}
.search-results-hint{padding:10px 14px;border-top:1px solid #e0e7f0;font-size:12px;color:#55657a}
.search-empty{margin-top:14px;padding:12px 14px;border:1px dashed #c7d2e0;border-radius:14px;background:#fbfdff;font-size:13px;color:#334155}
.search-empty a{font-weight:700;color:inherit}

@media (max-width:600px){
  .search-row{flex-direction:column;align-items:stretch}
  .search-row .secondary-btn{width:100%}
}


/* Client payment actions */
.payment-client-actions{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid rgba(15,40,70,0.10);
}
.receipt-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
  flex-wrap:wrap;
}
.clip-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:10px;
  border:1px dashed rgba(15,40,70,0.25);
  background:rgba(15,40,70,0.03);
  cursor:pointer;
  user-select:none;
  font-weight:600;
}
.clip-btn:hover{ background:rgba(15,40,70,0.05); }
.clip-ico{ font-size:16px; }
.receipt-status{
  font-size:13px;
  opacity:0.85;
}
.pay-buttons{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.danger-btn{
  padding:8px 28px;
  border-radius:16px;
  border:1px solid rgba(200,0,0,0.25);
  background:rgba(273,73,73,73);
  color:#020617;
  font-weight:700;
  cursor:pointer;
}
.danger-btn:hover{ background:rgba(200,0,0,0.10); }
.pay-hint{
  margin:10px 0 0;
  font-size:13px;
  opacity:0.85;
}


/* Auto refresh + payment timer progress */
.progress-wrap{margin-top:8px}
.progress-track{height:6px;border-radius:999px;background:rgba(255,255,255,.12);overflow:hidden}
.progress-bar{height:100%;background:rgba(255,255,255,.55);transition:width .3s ease}
.auto-refresh{margin-top:10px;font-size:12px;color:#cbd5e1;opacity:.9}
