:root{
  /* QBO-inspired light palette */
  --bg:#f5f7fb;
  --card:#ffffff;
  --muted:#6b7280;
  --text:#111827;
  --line:#e5e7eb;

  /* Accent */
  --accent:#2ca01c;
  --accentSoft: rgba(44,160,28,.12);

  /* Shadows */
  --shadow: 0 10px 25px rgba(17,24,39,.08);
  --shadow2: 0 18px 45px rgba(17,24,39,.14);

  /* Radius */
  --r12: 12px;
  --r14: 14px;
  --r16: 16px;
  --r18: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color:var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap{
  width:min(980px, 92vw);
  margin:0 auto;
}

.header{
  position:sticky; top:0;
  background: rgba(245,247,251,.88);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
  z-index:10;
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  padding:14px 0;
}

.logo{
  width:40px; height:40px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background: var(--accentSoft);
  border:1px solid rgba(44,160,28,.25);
  color: var(--accent);
  font-weight:900;
  letter-spacing:.02em;
}

.title{
  font-size:16px;
  font-weight:900;
  line-height:1.15;
}
.subtitle{
  font-size:12px;
  color:var(--muted);
  margin-top:3px;
  line-height:1.25;
}

.controls{
  margin:16px 0 14px;
  display:grid;
  gap:10px;
}

.input, .select{
  width:100%;
  padding:12px 12px;
  border-radius: var(--r14);
  border:1px solid var(--line);
  background:#ffffff;
  color:var(--text);
  outline:none;
  box-shadow: 0 1px 0 rgba(17,24,39,.03);
}

.input::placeholder{color:#9aa3b2}

.input:focus, .select:focus{
  border-color: rgba(44,160,28,.45);
  box-shadow: 0 0 0 4px rgba(44,160,28,.12);
}

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
@media (max-width:520px){
  .row{grid-template-columns:1fr;}
}

.toggle{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding-top:2px;
}

.pill{
  border:1px solid var(--line);
  background:#ffffff;
  color:var(--text);
  padding:10px 14px;
  border-radius:999px;
  cursor:pointer;
  font-weight:800;
  font-size:13px;
  box-shadow: 0 1px 0 rgba(17,24,39,.03);
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
}
.pill:active{transform: translateY(1px)}
.pill:hover{border-color:#d7dde6; box-shadow: 0 3px 10px rgba(17,24,39,.06);}

.pill.active{
  background: var(--accentSoft);
  border-color: rgba(44,160,28,.35);
  color:#166534;
}

.meta{
  color:var(--muted);
  font-size:12px;
  padding-top:2px;
}

/* Card/table container */
.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--r16);
  box-shadow: var(--shadow);
  overflow:hidden;
}

/* Make table comfortable on mobile */
.tableWrap{
  overflow:auto;
  -webkit-overflow-scrolling: touch;
}

.table{
  width:100%;
  border-collapse:collapse;
  min-width: 0;
}

.table th, .table td{
  padding:12px 12px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
}

.table th{
  text-align:left;
  font-size:12px;
  color:var(--muted);
  letter-spacing:.02em;
  background:#fbfcff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.right{text-align:right}

tr.dataRow{
  cursor:pointer;
  transition: background .12s ease;
}
tr.dataRow:hover{
  background: rgba(17,24,39,.02);
}

.small{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}

.hint{
  padding:10px 12px;
  font-size:12px;
  color:var(--muted);
  background: linear-gradient(180deg, rgba(255,255,255,.0), rgba(245,247,251,.55));
}

/* Footer */
.footer{
  margin:22px 0 28px;
  color:var(--muted);
  font-size:12px;
}

/* Disclosure banner */
.alert{
  margin: 14px 0 10px;
  padding: 12px 12px;
  border-radius: var(--r16);
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 10px 25px rgba(220,38,38,.08);
}

.blink{
  animation: blinkFade 1.2s infinite;
}

@keyframes blinkFade{
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

/* ==========================
   Premium modal / drawer
   Popup stays BRIGHT
   Background dims
   ========================== */

.drawer.hidden{display:none}

/* Container */
.drawer{
  position:fixed;
  inset:0;
  z-index:9999;
  pointer-events:none;
}

/* Dim page behind */
.backdrop{
  position:fixed;
  inset:0;
  background: rgba(17,24,39,.45);
  z-index: 1;
  pointer-events:auto;
}

/* Popup above backdrop */
.drawerInner{
  position:fixed;
  left:50%;
  bottom:0;
  transform: translateX(-50%);
  width:min(980px, 100vw);
  background:#ffffff;
  border:1px solid var(--line);
  border-bottom:none;
  border-radius:18px 18px 0 0;
  box-shadow: var(--shadow2);
  padding:14px;
  max-height: 78vh;
  overflow:auto;
  z-index: 2;
  pointer-events:auto;
  -webkit-overflow-scrolling: touch;

  animation: slideUp .16s ease-out;
}

@keyframes slideUp{
  from{ transform: translateX(-50%) translateY(14px); opacity:.8; }
  to{ transform: translateX(-50%) translateY(0); opacity:1; }
}

.drawerHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid var(--line);
  padding-bottom:10px;
}

.close{
  border:1px solid var(--line);
  background:#ffffff;
  color:var(--text);
  border-radius:12px;
  padding:8px 11px;
  cursor:pointer;
  box-shadow: 0 1px 0 rgba(17,24,39,.03);
  transition: border-color .12s ease, box-shadow .12s ease, transform .08s ease;
}
.close:hover{
  border-color: rgba(44,160,28,.35);
  box-shadow: 0 3px 10px rgba(17,24,39,.06);
}
.close:active{transform: translateY(1px)}

.dSection{font-weight:950; letter-spacing:.01em}
.dTitle{
  color:var(--muted);
  font-size:13px;
  margin-top:4px;
  line-height:1.3;
}

.drawerBody{
  padding-top:10px;
  display:grid;
  gap:12px;
}

.block .label{
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}

.value{
  font-size:14px;
  line-height:1.35;
}

.muted{color:var(--muted)}
.list{
  margin:0;
  padding-left:18px;
  color:var(--text);
}
.list li{margin:6px 0}

/* Mobile polish */
@media (max-width:420px){
  .title{font-size:15px}
  .pill{padding:10px 12px}
  .table th, .table td{padding:12px 10px}
  .drawerInner{padding:12px}
}
