/* Basic modern styling */
:root{
  --bg:#0b0f17;
  --card:#121826;
  --muted:#9aa4b2;
  --text:#e5e7eb;
  --accent:#6ee7b7;
  --danger:#f87171;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji','Segoe UI Emoji';
  background: radial-gradient(1200px 800px at 20% 10%, #1f2937 0%, var(--bg) 40%, #0a0e15 100%);
  color:var(--text);
}

.container{
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:clamp(16px, 2vw, 48px);
}

.card{
  width:min(560px, 92vw);
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  backdrop-filter: blur(8px);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:16px;
  padding:32px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

h1{margin:0 0 8px;font-size: clamp(28px, 4vw, 36px)}
.subtitle{color:var(--muted); margin: 0 0 24px}

label{display:block; font-weight:600; margin:16px 0 8px}
input{
  width:100%;
  padding:14px 16px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:#0f1522;
  color:var(--text);
  outline:none;
}
input:focus{border-color:var(--accent); box-shadow:0 0 0 3px rgba(110,231,183,0.15)}

.btn{
  width:100%;
  margin-top:18px;
  padding:14px 18px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:linear-gradient(180deg, #34d399, #10b981);
  color:#042015;
  font-weight:800;
  letter-spacing:.2px;
  cursor:pointer;
}
.btn:hover{filter:brightness(1.05)}
.btn.ghost{
  width:auto;
  background:transparent;
  color:var(--text);
  border-color:rgba(255,255,255,0.16);
}

.error{color:var(--danger); min-height:1.2em; margin-top:10px}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 24px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
  position:sticky;
  top:0;
  backdrop-filter: blur(8px);
}
.brand{font-weight:900; letter-spacing:.3px}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:16px;
  margin-top:12px;
}
.panel{
  background:#0f1522;
  border:1px solid rgba(255,255,255,0.08);
  padding:16px;
  border-radius:12px;
}
.list{list-style:none; padding-left:0}
.list li{padding:6px 0; border-bottom:1px dashed rgba(255,255,255,0.08)}
.list li:last-child{border-bottom:none}

.footnote{margin-top:18px; text-align:center; color:var(--muted)}

/* --- Escrow styles --- */
.bg{
  position:fixed; inset:0;
  background: #0a0e15;
  z-index:-2;
}
.bg::before{
  content:""; position:absolute; inset:0;
  background-image: url('bg.jpg');
  background-size: cover; background-position:center;
  filter: brightness(.7);
  z-index:-2;
}

.escrow-topbar{
  display:flex; justify-content:space-between; align-items:center;
  padding:16px 24px; color:var(--text);
  text-shadow: 0 2px 6px rgba(0,0,0,.4);
}

.escrow-wrap{
  max-width: 920px; margin: 12px auto; padding: 0 16px 40px;
}

.hello{
  font-size: clamp(18px, 2.6vw, 22px);
  margin: 12px 6px 18px;
  font-weight: 700;
}

.escrow-card{
  display:flex; align-items:stretch; gap:16px;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  border-radius:20px;
  padding: 22px;
  backdrop-filter: blur(8px);
}

.escrow-left{flex:1}
.escrow-right{display:flex; align-items:flex-start; justify-content:flex-end}

.ok-pill{
  width:48px; height:48px; border-radius:12px;
  background:#10b981; color:#032015;
  display:grid; place-items:center;
  font-weight:900; font-size:22px;
  box-shadow: 0 6px 16px rgba(16,185,129,.45);
}

.muted{color:var(--muted); margin: 0 0 8px}
.balance{font-size: clamp(36px, 6vw, 56px); font-weight: 900; letter-spacing:1px}
.acct{margin-top:8px; font-size: clamp(16px, 3vw, 22px); letter-spacing:2px}

.kv{display:grid; grid-template-columns:1fr; gap:8px; margin-top:16px}
.kv .label{color:var(--muted); font-size:12px; letter-spacing:.6px; margin-right:10px}
.kv .dots{opacity:.9}

.txn-block{
  margin-top:16px;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.18);
  border-radius:18px;
  padding:16px 18px;
  backdrop-filter: blur(8px);
}
.txn-head{display:flex; justify-content:space-between; align-items:center; font-weight:700}
.txn-item{display:flex; gap:8px; align-items:center; margin-top:10px; color:#6ee7b7; font-weight:700}
.emoji{filter: drop-shadow(0 2px 4px rgba(0,0,0,.4))}
.amt-pos{color:#22c55e; font-weight:800}
.amt-neg{color:#ef4444; font-weight:800}

.status-grid{
  margin-top:16px;
  display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap:16px;
}
.status-col{
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.18);
  border-radius:18px;
  padding:18px;
  backdrop-filter: blur(8px);
  text-align:center;
}
.status-title{color:var(--text); font-weight:800; margin-bottom:8px}
.status-circle{
  width:64px; height:64px; margin: 8px auto; border-radius:16px;
  display:grid; place-items:center; font-size:28px; font-weight:900;
  background: rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,0.14);
}
.status-circle.ok{background:#10b981; color:#032015; box-shadow:0 8px 18px rgba(16,185,129,.45)}
.status-circle.wait{background: rgba(0,0,0,.35); color:#e5e7eb}
.amt{margin-top:8px}

.history-block{
  margin-top:20px;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.18);
  border-radius:18px;
  padding:18px;
  backdrop-filter: blur(8px);
}
.history-block h2{
  margin-top:0;
  font-size: 20px;
  font-weight:800;
}
.history-list{
  list-style:none;
  padding-left:0;
  margin:0;
}
.history-list li{
  padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,0.1);
}
.history-list li:last-child{border-bottom:none}


/* --- History list --- */
.history{
  margin-top:16px;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.18);
  border-radius:18px;
  padding:18px;
  backdrop-filter: blur(8px);
}
.history h3{margin:0 0 10px; letter-spacing:.2px}
.history-list{list-style:none; padding:0; margin:0; display:grid; gap:10px}
.history-list li{
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 12px; border:1px dashed rgba(255,255,255,0.14); border-radius:12px;
  background: rgba(0,0,0,.25);
}
.history-list li b{font-weight:800}


/* --- Hamburger Menu --- */
.menu-wrap{position:relative}
.hamburger{
  background:transparent; border:none; font-size:24px; color:var(--text);
  cursor:pointer; padding:4px 8px;
}
.dropdown{
  display:none; position:absolute; right:0; top:40px;
  background: rgba(0,0,0,0.85);
  border:1px solid rgba(255,255,255,0.18);
  border-radius:8px;
  min-width:180px; z-index:100;
}
.dropdown a{
  display:block; padding:10px 14px; color:var(--text); text-decoration:none;
}
.dropdown a:hover{background:rgba(255,255,255,0.08)}
.show{display:block}

/* --- Modal --- */
.modal{
  display:none; position:fixed; z-index:200; left:0; top:0; width:100%; height:100%;
  overflow:auto; background-color: rgba(0,0,0,0.6);
}
.modal-content{
  background-color:#121826; margin:10% auto; padding:20px; border:1px solid rgba(255,255,255,0.18);
  width:90%; max-width:500px; border-radius:10px; color:var(--text);
}
.close{
  color:#aaa; float:right; font-size:28px; font-weight:bold; cursor:pointer;
}
.close:hover{color:white}


/* --- Hamburger menu --- */
.hamburger{
  display:inline-grid; gap:4px; background:transparent; border:none; cursor:pointer;
}
.hamburger span{
  width:24px; height:2px; background:var(--text); display:block;
}
.menu{
  position:absolute; right:16px; top:56px; width:220px;
  background: rgba(15,21,34,.95);
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px; padding:8px; box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.menu a{
  display:block; padding:10px 12px; border-radius:10px; text-decoration:none; color:var(--text);
}
.menu a:hover{background: rgba(255,255,255,.08)}
.hidden{display:none}

/* --- Modal --- */
.modal{ position:fixed; inset:0; display:grid; place-items:center; background: rgba(0,0,0,.5); z-index:10 }
.modal.hidden{ display:none }
.modal-card{
  width:min(760px, 92vw); background:#0f1522; color:var(--text);
  border:1px solid rgba(255,255,255,.14); border-radius:16px; overflow:hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
}
.modal-head{ display:flex; justify-content:space-between; align-items:center; padding:14px 16px; border-bottom:1px solid rgba(255,255,255,.08) }
.modal-body{ padding:16px; max-height:60vh; overflow:auto }
.modal-foot{ padding:12px 16px; border-top:1px solid rgba(255,255,255,.08) }
.close{ background:transparent; color:var(--text); border:none; font-size:22px; cursor:pointer }
.policy{ margin:0; padding-left:18px }
.policy li{ margin:8px 0 }


.kv-row{ display:grid; grid-template-columns: auto 1fr auto; align-items:center; gap:10px }
.icon-btn{
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  color: var(--text);
  padding:8px 10px; border-radius:10px; cursor:pointer; font-weight:700;
}
.icon-btn:hover{ background: rgba(255,255,255,.12) }

.infobar{
  position:sticky; top:0; z-index:20;
  margin:0; padding:10px 14px; text-align:center;
  background: #1f2937; color:var(--text);
  border-bottom:1px solid rgba(255,255,255,.14);
}
.infobar.error{ background:#7f1d1d }
.infobar.info{ background:#0f766e }
.hidden{ display:none }

.options{ display:grid; gap:8px; border:none; margin:12px 0; padding:0 }
.amount-label{ display:block; margin:8px 0 }
.amount-label input{ width:100%; margin-top:6px }
.small-note{ color:var(--muted); font-size:12px; margin-top:10px }


/* Sign-in background and title */
.bg-signin{
  position:fixed;
  inset:0;
  background:url('signin_bg.jpg') center/cover no-repeat;
  z-index:-1;
}
.escrow-title{
  text-align:center;
  font-size:clamp(28px, 4vw, 40px);
  font-weight:900;
  color:var(--text);
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  margin-bottom:20px;
}


/* Reduce opacity with overlay for better visibility */
.bg-signin::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.45);
}


/* --- ISEA top-left logo --- */
.site-brand{
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  backdrop-filter: blur(6px);
}
.site-logo{ height: 36px; width: auto; display: block; }
@media (max-width: 480px){
  .site-brand{ top: 10px; left: 10px; padding: 4px 6px; }
  .site-logo{ height: 28px; }
}

