*{box-sizing:border-box}
body{
  margin:0;
  font-family:Arial,sans-serif;
  background:#f5f7fb;
  color:#0f172a;
}
.hidden{display:none!important}

.login-screen{
  min-height:100vh;
  background:#f5f7fb;
}
.login-hero{
  background:#0f172a;
  color:white;
  text-align:center;
  padding:70px 20px 60px;
  border-bottom-left-radius:44px;
  border-bottom-right-radius:44px;
}
.logo{
  font-size:42px;
  font-weight:900;
  letter-spacing:1px;
}
.logo span{color:#28a8ff}
.login-hero p{
  font-size:24px;
  margin:16px 0 0;
  color:#e5e7eb;
}
.login-card{
  background:white;
  margin:-28px 24px 0;
  padding:26px;
  border-radius:28px;
  box-shadow:0 18px 40px rgba(15,23,42,.12);
}
.login-card label{
  font-size:20px;
  font-weight:900;
}
input{
  width:100%;
  padding:16px;
  margin:12px 0 20px;
  border:1px solid #dbe3ef;
  border-radius:18px;
  font-size:18px;
}
button{
  border:0;
  background:#0f172a;
  color:#fff;
  padding:14px 18px;
  border-radius:18px;
  font-weight:900;
  font-size:16px;
}
.login-card button{
  width:100%;
  font-size:24px;
  padding:18px;
}
#loginMsg{
  text-align:center;
  color:#dc2626;
  font-weight:bold;
}

.app-screen{padding-bottom:82px}
.topbar{
  background:#fff;
  padding:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-shadow:0 2px 12px rgba(15,23,42,.06);
}
.topbar h2{margin:0;font-size:22px}
.topbar p{margin:4px 0 0;color:#64748b;font-size:13px}
main{
  max-width:920px;
  margin:0 auto;
  padding:16px;
}
.page{display:none}
.page.active{display:block}
.card,.order{
  background:#fff;
  border-radius:18px;
  padding:16px;
  margin:12px 0;
  box-shadow:0 6px 22px rgba(15,23,42,.07);
  border:1px solid #eef2f7;
}
.order h4,.card h4{margin:0 0 10px}
.order p,.card p{margin:6px 0;color:#475569}
.tabs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding-bottom:6px;
}
.tabs button{white-space:nowrap}
.bottom-nav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  height:72px;
  background:#fff;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  padding:10px;
  box-shadow:0 -8px 24px rgba(15,23,42,.09);
}
.bottom-nav button{
  background:#f1f5f9;
  color:#64748b;
}
.bottom-nav button.active{
  background:#0f172a;
  color:#fff;
}
.empty{
  text-align:center;
  color:#64748b;
  padding:20px;
}

.order{
    background:#fff;
    border-radius:24px;
    padding:18px;
    margin-bottom:16px;
    box-shadow:0 10px 25px rgba(15,23,42,.06);
    border:1px solid #eef2f7;
}

.order h4{
    margin:0 0 14px;
    font-size:20px;
    font-weight:800;
    color:#0f172a;
    word-break:break-all;
}

.order p{
    margin:6px 0;
    color:#475569;
    line-height:1.45;
}

.order b{
    color:#0f172a;
}

.order-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:12px;
}

.amount-badge{
    background:#ecfeff;
    color:#0c4a6e;
    padding:8px 14px;
    border-radius:999px;
    font-weight:800;
}

.type-badge{
    background:#f1f5f9;
    color:#334155;
    padding:8px 14px;
    border-radius:999px;
    font-weight:700;
    text-transform:uppercase;
}

.old-card{
  border-radius:26px!important;
  padding:18px!important;
  background:#fff!important;
}

.old-card-top{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}

.old-amount{
  margin-right:auto;
  font-size:28px;
  font-weight:950;
  color:#111827;
}

.old-amount span{
  font-size:14px;
  color:#f59e0b;
  margin-left:4px;
}

.mini-btn{
  padding:9px 14px!important;
  border-radius:16px!important;
  font-size:14px!important;
  background:#fff7ed!important;
  color:#f59e0b!important;
  border:1px solid #fed7aa!important;
}

.copy-btn{
  background:#fff!important;
}

.old-details{
  background:#f8fafc;
  border-radius:18px;
  padding:14px;
}

.old-details div{
  display:grid;
  grid-template-columns:130px 1fr;
  align-items:center;
  gap:8px;
  margin:9px 0;
}

.old-details span{
  color:#8b929d;
  font-size:15px;
}

.old-details b{
  color:#111827;
  font-size:16px;
  text-align:right;
  word-break:break-word;
}

.old-details .highlight b{
  background:#fffaf0;
  border:2px solid #fde68a;
  border-radius:12px;
  padding:9px 12px;
  text-align:left;
}

.old-footer{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:14px;
}

.old-footer div{
  border:2px solid #fde68a;
  border-radius:12px;
  padding:9px 12px;
  color:#8b929d;
  font-weight:800;
  background:#fffdf5;
}

.source-line{
  margin-top:10px;
  color:#64748b;
  font-size:13px;
  font-weight:800;
}

/* FIX broken order card layout */
.old-card-top{
  display:grid!important;
  grid-template-columns:1fr auto auto!important;
  gap:8px!important;
}

.old-details div{
  display:grid!important;
  grid-template-columns:120px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:center!important;
}

.old-details span{
  white-space:nowrap!important;
}

.old-details b{
  display:block!important;
  text-align:right!important;
  overflow-wrap:anywhere!important;
}

.old-details .highlight b{
  text-align:left!important;
  overflow-wrap:anywhere!important;
}

.old-amount{
  font-size:24px!important;
  white-space:nowrap!important;
}

.mini-btn{
  font-size:13px!important;
  padding:8px 11px!important;
  border-radius:13px!important;
}

.old-footer{
  grid-template-columns:1fr!important;
}

@media(max-width:420px){
  .old-details div{
    grid-template-columns:105px minmax(0,1fr)!important;
  }
  .old-details span{
    font-size:14px!important;
  }
  .old-details b{
    font-size:14px!important;
  }
}

/* Modern compact order card */
.modern-card{
  padding:16px!important;
  border-radius:22px!important;
  margin-bottom:14px!important;
  background:#fff!important;
  box-shadow:0 8px 22px rgba(15,23,42,.07)!important;
}

.modern-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.modern-amount{
  font-size:32px;
  font-weight:950;
  color:#0f172a;
  line-height:1;
}

.modern-amount span{
  font-size:13px;
  color:#f59e0b;
  margin-left:6px;
  font-weight:900;
}

.modern-type{
  background:#fff7ed;
  color:#f59e0b;
  border:1px solid #fed7aa;
  border-radius:999px;
  padding:7px 13px;
  font-weight:900;
  text-transform:uppercase;
  font-size:13px;
}

.modern-person{
  font-size:18px;
  font-weight:900;
  color:#0f172a;
  margin-bottom:8px;
  overflow-wrap:anywhere;
}

.modern-account{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:11px 12px;
  font-size:16px;
  font-weight:900;
  color:#111827;
  overflow-wrap:anywhere;
  margin-bottom:8px;
}

.modern-phone{
  color:#334155;
  font-weight:850;
  font-size:16px;
  margin-bottom:12px;
}

.modern-meta{
  display:flex;
  justify-content:space-between;
  gap:8px;
  color:#64748b;
  font-size:13px;
  font-weight:800;
  border-top:1px solid #eef2f7;
  padding-top:10px;
}

.modern-meta span{
  overflow-wrap:anywhere;
}

.modern-bottom{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.modern-bottom span{
  color:#94a3b8;
  font-weight:900;
  font-size:13px;
}

.modern-bottom button{
  padding:9px 16px!important;
  border-radius:14px!important;
  background:#0f172a!important;
  color:#fff!important;
  font-size:14px!important;
}

.field-label{
  font-size:12px;
  font-weight:900;
  color:#94a3b8;
  margin:8px 0 5px;
  text-transform:uppercase;
  letter-spacing:.3px;
}

.modern-phone{
  background:#f8fafc!important;
  border:1px solid #e2e8f0!important;
  border-radius:14px!important;
  padding:11px 12px!important;
  font-size:16px!important;
  font-weight:950!important;
  color:#111827!important;
  overflow-wrap:anywhere!important;
}

.countdown{
  color:#f59e0b!important;
  font-weight:950!important;
}

.order-copy{
  background:transparent!important;
  color:#94a3b8!important;
  padding:0!important;
  border-radius:0!important;
  font-size:14px!important;
  font-weight:950!important;
  text-align:left!important;
}

.submit-btn{
  background:#f59e0b!important;
  color:#fff!important;
  padding:10px 18px!important;
  border-radius:16px!important;
  font-size:15px!important;
  font-weight:950!important;
}
