:root{
  --brand:#ffa500;
  --brand-dark:#e59400;
  --text:#111827;
  --muted:#6b7280;
  --stroke:rgba(17,24,39,.08);
  --bg1:#fff6e3;
  --bg2:#fffaf1;
  --card:rgba(255,255,255,.92);
  --shadow:0 18px 45px rgba(17,24,39,.12);
}

*{ box-sizing:border-box; }

html, body{
  width:100%;
  min-height:100%;
  margin:0;
  color-scheme:light;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 50% 20%, rgba(255,165,0,.16), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

body{
  padding:14px;
}

.hidden{
  display:none !important;
}

.aoWrap{
  width:100%;
  max-width:680px;
  margin:0 auto;
}

.aoCard{
  width:100%;
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:20px;
}

.aoBrand{
  display:flex;
  justify-content:center;
  margin-bottom:10px;
}

.aoBrand img{
  width:240px;
  max-width:100%;
  height:auto;
  object-fit:contain;
}

.aoPinTitle{
  margin:8px 0 4px;
  text-align:center;
  font-size:26px;
  font-weight:1000;
}

.aoPinSubtitle{
  margin:0;
  text-align:center;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.aoPinDots{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:24px 0 14px;
}

.aoDot{
  width:16px;
  height:16px;
  border-radius:999px;
  background:rgba(17,24,39,.12);
}

.aoDot.on{
  background:var(--brand);
  box-shadow:0 0 0 4px rgba(255,165,0,.18);
}

.aoKeypad{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;
  margin-top:10px;
}

.aoKey{
  padding:14px 0;
  border-radius:14px;
  text-align:center;
  font-size:16px;
  font-weight:800;
  color:#111827;
  background:#f3f4f6;
  border:1px solid rgba(17,24,39,.08);
  cursor:pointer;
  user-select:none;
  transition:transform .08s ease, background .12s ease, border .12s ease;
}

.aoKey:hover{
  background:#fffaee;
  border-color:rgba(255,165,0,.35);
}

.aoKey:active{
  transform:scale(.98);
}

.aoKey.ok{
  background:var(--brand);
  border-color:rgba(255,165,0,.6);
  color:#fff;
  box-shadow:0 10px 22px rgba(255,165,0,.22);
}

.aoFooterNote{
  margin-top:14px;
  padding-top:10px;
  border-top:1px solid rgba(17,24,39,.08);
  text-align:center;
  font-size:11px;
  color:var(--muted);
}

.aoHeader{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.aoTitle{
  margin:0;
  font-size:30px;
  font-weight:1000;
}

.aoSubtitle{
  margin:8px 0 0;
  font-size:13px;
  color:var(--muted);
}

.aoDivider{
  height:2px;
  width:100%;
  margin:16px 0 18px;
  border-radius:999px;
  background:var(--brand);
}

.aoTopInfo{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:12px;
}

.aoInfoCard{
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  background:rgba(255,255,255,.8);
  padding:16px;
}

.aoInfoLabel{
  font-size:12px;
  font-weight:900;
  color:rgba(0,0,0,.5);
  margin-bottom:8px;
}

.aoInfoValue{
  font-size:18px;
  font-weight:1000;
}

.aoInfoSub{
  margin-top:4px;
  font-size:12px;
  font-weight:700;
  color:var(--muted);
}

.aoStatusPill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:90px;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:1000;
  border:1px solid transparent;
}

.aoStatusPill.draft{
  background:#fff7e6;
  color:#a16207;
  border-color:#f6d38a;
}

.aoStatusPill.submitted{
  background:#ecfdf5;
  color:#1a7f37;
  border-color:#bbf7d0;
}

.aoStatusPill.reopened{
  background:#eff6ff;
  color:#1d4ed8;
  border-color:#bfdbfe;
}

.aoActionRow{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-top:16px;
}

.aoSummaryMini{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:12px;
  flex:1;
}

.aoSummaryMiniCard{
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  background:rgba(255,255,255,.8);
  padding:14px 16px;
}

.aoSummaryMiniLabel{
  font-size:12px;
  font-weight:900;
  color:rgba(0,0,0,.5);
}

.aoSummaryMiniValue{
  margin-top:8px;
  font-size:24px;
  font-weight:1000;
}

.aoActionButtons{
  display:flex;
  flex-direction:column;
  gap:12px;
  width:180px;
}

.aoPrimaryBtn,
.aoGhostBtn{
  min-height:48px;
  padding:0 16px;
  border-radius:16px;
  font-size:15px;
  font-weight:1000;
  cursor:pointer;
}

.aoPrimaryBtn{
  border:none;
  background:var(--brand);
  color:#fff;
  box-shadow:0 12px 24px rgba(255,165,0,.22);
}

.aoPrimaryBtn:hover{
  background:var(--brand-dark);
}

.aoGhostBtn{
  border:1px solid rgba(0,0,0,.10);
  background:rgba(255,255,255,.9);
  color:#111;
}

.aoLockedNote{
  margin-top:16px;
  padding:14px 16px;
  border-radius:16px;
  background:#fff7e6;
  border:1px solid #f6d38a;
  color:#a16207;
  font-size:13px;
  font-weight:800;
}

.aoError,
.aoOk{
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  font-size:13px;
  font-weight:800;
}

.aoError{
  color:#b91c1c;
  background:rgba(239,68,68,.10);
  border:1px solid rgba(239,68,68,.20);
}

.aoOk{
  color:#166534;
  background:#dcfce7;
  border:1px solid #bbf7d0;
}

.aoEmptyState{
  margin-top:16px;
  padding:18px;
  border-radius:18px;
  background:rgba(255,255,255,.72);
  border:1px dashed rgba(0,0,0,.12);
  color:rgba(0,0,0,.55);
  font-size:14px;
  font-weight:800;
  text-align:center;
}

.aoSitesWrap{
  display:flex;
  flex-direction:column;
  gap:20px;
  margin-top:18px;
}

.aoSiteCard{
  border:1px solid rgba(255,165,0,.16);
  border-radius:22px;
  background:linear-gradient(180deg, #fffaf1 0%, #fff7ea 100%);
  padding:16px;
  box-shadow:0 10px 24px rgba(255,165,0,.08);
  position:relative;
  overflow:hidden;
}

.aoSiteCard::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:6px;
  background:linear-gradient(180deg, #ffa500 0%, #ffd27a 100%);
  border-radius:22px 0 0 22px;
}

.aoSiteHead{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
  margin-left: 8px;
}

.aoSiteName{
  margin:0;
  font-size:22px;
  font-weight:1000;
}

.aoSiteMeta{
  margin-top:4px;
  font-size:13px;
  font-weight:800;
  color:var(--muted);
}

.aoGuardList{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.aoGuardRow{
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  background:rgba(255,255,255,.92);
  padding:14px;
}

.aoGuardTop{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom:12px;
}

.aoGuardName{
  font-size:18px;
  font-weight:1000;
}

.aoGuardId{
  margin-top:4px;
  font-size:13px;
  font-weight:800;
  color:var(--muted);
}

.aoAmountGrid{
  display:grid;
  grid-template-columns:repeat(5, minmax(0,1fr));
  gap:8px;
}

.aoAmountBtn{
  min-height:46px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  color:#111;
  font-size:14px;
  font-weight:1000;
  cursor:pointer;
  transition:all .12s ease;
}

.aoAmountBtn:hover{
  border-color:rgba(255,165,0,.55);
  background:#fffaf0;
}

.aoAmountBtn.active{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
  box-shadow:0 10px 20px rgba(255,165,0,.18);
}

.aoAmountBtn.zero.active{
  background:#374151;
  border-color:#374151;
}

.aoModalOverlay{
  position:fixed;
  inset:0;
  background:rgba(255,255,255,.10);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:99999;
}

.aoModalCard{
  width:min(440px, 96vw);
  background:rgba(255,255,255,.97);
  border:1px solid rgba(255,255,255,.78);
  border-radius:24px;
  box-shadow:0 24px 70px rgba(0,0,0,.20);
  padding:18px;
}

.aoModalHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}

.aoModalHead h3{
  margin:0;
  font-size:20px;
  font-weight:1000;
}

.aoModalClose{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  cursor:pointer;
  font-size:16px;
  font-weight:1000;
}

.aoModalBody{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.aoModalText{
  margin:0;
  font-size:14px;
  line-height:1.5;
  color:#374151;
  font-weight:700;
}

.aoSubmitPreview{
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  background:rgba(255,255,255,.88);
  padding:12px 14px;
}

.aoSubmitPreviewRow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:8px 0;
  border-bottom:1px dashed rgba(0,0,0,.08);
  font-size:14px;
  font-weight:800;
}

.aoSubmitPreviewRow:last-child{
  border-bottom:none;
}

.aoModalActions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
}

.aoStickyBar{
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin-top: 18px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(17,24,39,.08);
  box-shadow: 0 -8px 24px rgba(17,24,39,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.aoStickySummary{
  min-width: 0;
}

.aoStickyLabel{
  font-size: 12px;
  font-weight: 900;
  color: rgba(0,0,0,.5);
}

.aoStickyValue{
  margin-top: 4px;
  font-size: 22px;
  font-weight: 1000;
  color: #111827;
}

.aoStickyActions{
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.aoStickyActions .aoGhostBtn,
.aoStickyActions .aoPrimaryBtn{
  min-width: 120px;
}

@media (max-width: 760px){
  body{
    padding:10px;
  }

  .aoCard{
    padding:16px;
    border-radius:20px;
  }

  .aoTitle{
    font-size:24px;
  }

  .aoTopInfo{
    grid-template-columns:1fr;
  }

  .aoActionRow{
    flex-direction:column;
  }

  .aoSummaryMini{
    width:100%;
    grid-template-columns:1fr;
  }

  .aoActionButtons{
    width:100%;
    flex-direction:row;
  }

  .aoActionButtons > *{
    flex:1;
  }

  .aoAmountGrid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  .aoGuardTop{
    flex-direction:column;
    align-items:flex-start;
  }

  .aoModalActions{
    flex-direction:column;
  }

  .aoModalActions > *{
    width:100%;
  }

  .aoStickyBar{
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .aoStickyActions{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  .aoStickyActions .aoGhostBtn,
  .aoStickyActions .aoPrimaryBtn{
    width: 100%;
    min-width: 0;
  }

  .aoStickyValue{
    font-size: 20px;
  }
}