/* Bank of Mcallister • Modern Admin UI */
:root{
  --bg:#0b1220;
  --panel:#0f1a2d;
  --panel2:#111f36;
  --card:#0f1a2d;
  --border:rgba(255,255,255,.10);
  --border2:rgba(255,255,255,.14);
  --text:#e9eef7;
  --muted:#a6b2c7;

  --accent:#4f8cff;
  --accent2:#6ee7b7;
  --good:#22c55e;
  --warn:#fbbf24;
  --bad:#fb7185;

  --shadow: 0 12px 30px rgba(0,0,0,.35);
  --radius: 16px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1000px 600px at 20% -10%, rgba(79,140,255,.25), transparent 60%),
              radial-gradient(900px 500px at 90% 10%, rgba(110,231,183,.18), transparent 60%),
              var(--bg);
  color:var(--text);
}

.mono{font-family:var(--mono)}
.muted{color:var(--muted)}
.small{font-size:12px}

.app{min-height:100%; display:flex; flex-direction:column}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--border);
  background: rgba(11,18,32,.55);
  backdrop-filter: blur(12px);
  position:sticky; top:0; z-index:10;
}
.mark{display:flex; align-items:center; gap:12px}
.mark__logo{
  width:38px; height:38px; border-radius:12px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(79,140,255,.35), rgba(110,231,183,.25));
  border:1px solid var(--border2);
  box-shadow: var(--shadow);
  font-weight:800;
}
.mark__title{font-weight:700; letter-spacing:.2px}
.mark__sub{font-size:12px; color:var(--muted)}

.topbar__right{display:flex; align-items:center; gap:10px}
.divider{width:1px; height:28px; background:var(--border)}

.pill{
  display:flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
}
.dot{width:9px; height:9px; border-radius:50%}
.dot--idle{background:rgba(255,255,255,.35)}
.dot--ok{background:var(--good)}
.dot--bad{background:var(--bad)}

.btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  font-weight:600;
  cursor:pointer;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
}
.btn:hover{background: rgba(255,255,255,.08); border-color:rgba(255,255,255,.18)}
.btn:active{transform: translateY(1px)}
.btn--primary{
  border-color: rgba(79,140,255,.55);
  background: linear-gradient(135deg, rgba(79,140,255,.35), rgba(79,140,255,.18));
}
.btn--ghost{background: transparent}
.btn--soft{background: rgba(255,255,255,.03)}
.kbd{
  font-size:12px;
  margin-left:8px;
  padding:2px 6px;
  border-radius:8px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
  color:var(--muted);
}

.main{display:grid; grid-template-columns: 260px 1fr; gap:0; flex:1; min-height:0}
.sidebar{
  border-right:1px solid var(--border);
  background: rgba(11,18,32,.35);
  backdrop-filter: blur(10px);
  padding:14px;
  display:flex; flex-direction:column; min-height:0;
}
.nav{display:flex; flex-direction:column; gap:6px}
.nav__label{margin:14px 10px 6px; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.12em}
.nav__item{
  display:flex; align-items:center; gap:10px;
  width:100%;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid transparent;
  background: transparent;
  color:var(--text);
  cursor:pointer;
  text-align:left;
}
.nav__dot{width:8px; height:8px; border-radius:50%; background: rgba(255,255,255,.22)}
.nav__item:hover{background: rgba(255,255,255,.06)}
.nav__item.is-active{
  background: linear-gradient(135deg, rgba(79,140,255,.24), rgba(110,231,183,.10));
  border-color: rgba(255,255,255,.14);
}
.sidebar__footer{margin-top:auto; padding:12px 10px; border-top:1px solid var(--border)}

.content{min-height:0; display:flex; flex-direction:column}
.toolbar{
  display:flex; align-items:flex-end; justify-content:space-between;
  padding:18px 18px 12px;
  border-bottom:1px solid var(--border);
}
.h1{margin:0; font-size:22px}
.toolbar__right{display:flex; align-items:center; gap:10px}

.search{
  display:flex; align-items:center; gap:8px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background: rgba(255,255,255,.04);
  min-width: 360px;
}
.search__icon{color:var(--muted)}
.search__input{
  flex:1;
  background: transparent;
  border:none;
  outline:none;
  color:var(--text);
  font-weight:500;
}
.search__clear{
  border:none; background: transparent; color:var(--muted);
  font-size:18px; cursor:pointer; line-height:1;
  padding:0 4px;
}
.search__clear:hover{color:var(--text)}

#panel{padding:18px; overflow:auto; min-height:0}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:12px;
}
.card{
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card__head{padding:14px 14px 0}
.card__body{padding:14px}
.card__title{font-weight:700}
.card__sub{font-size:12px; color:var(--muted); margin-top:4px}

.metric{
  padding:14px;
  display:flex; flex-direction:column; gap:8px;
}
.metric__value{font-size:24px; font-weight:800; letter-spacing:.2px}
.metric__label{font-size:12px; color:var(--muted)}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.16);
  color:var(--muted);
  font-size:12px;
}
.badge--good{border-color: rgba(34,197,94,.35); color: rgba(34,197,94,.95)}
.badge--warn{border-color: rgba(251,191,36,.35); color: rgba(251,191,36,.95)}
.badge--bad{border-color: rgba(251,113,133,.35); color: rgba(251,113,133,.95)}

.tablewrap{overflow:auto; border-radius: var(--radius)}
table{width:100%; border-collapse:separate; border-spacing:0}
thead th{
  position:sticky; top:0;
  background: rgba(11,18,32,.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
  font-size:12px;
  color:var(--muted);
  text-align:left;
  padding:12px 10px;
  white-space:nowrap;
}
tbody td{
  border-bottom:1px solid rgba(255,255,255,.06);
  padding:10px 10px;
  vertical-align:middle;
  white-space:nowrap;
}
tbody tr:hover td{background: rgba(255,255,255,.03)}
.cell{
  display:inline-flex; align-items:center; gap:8px;
}
.cell input{
  width:100%;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline:none;
}
.cell input:focus{border-color: rgba(79,140,255,.7)}
.readonly{color: rgba(233,238,247,.92)}
.pilltiny{
  display:inline-flex; align-items:center;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  font-size:12px;
  color:var(--muted);
}

.iconbtn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  color:var(--text);
  width:38px; height:38px;
  border-radius:12px;
  cursor:pointer;
}
.iconbtn:hover{background: rgba(255,255,255,.08)}

.modal{position:fixed; inset:0; display:none; z-index:50}
.modal.is-open{display:block}
.modal__backdrop{position:absolute; inset:0; background: rgba(0,0,0,.55)}
.modal__card{
  position:relative;
  width:min(760px, calc(100vw - 24px));
  margin: 8vh auto;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(15,26,45,.92);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.modal__head{display:flex; align-items:flex-start; justify-content:space-between; padding:16px 16px 10px; border-bottom:1px solid var(--border)}
.modal__title{font-size:16px; font-weight:800}
.modal__body{padding:16px; display:flex; flex-direction:column; gap:14px}
.modal__foot{display:flex; justify-content:flex-end; gap:10px; padding:14px 16px; border-top:1px solid var(--border)}

.formrow{display:flex; flex-direction:column; gap:7px}
label{font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.12em}
input, textarea{
  font-family:inherit;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color:var(--text);
  outline:none;
}
textarea{resize:vertical}
.hint{font-size:12px; color:var(--muted)}
.grid2{display:grid; grid-template-columns: 1fr 1fr; gap:12px}

.toasts{
  position:fixed;
  right:16px; bottom:16px;
  display:flex; flex-direction:column; gap:10px;
  z-index:60;
}
.toast{
  width:min(420px, calc(100vw - 32px));
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(15,26,45,.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding:12px 12px;
  display:flex; gap:10px; align-items:flex-start;
}
.toast__icon{margin-top:2px}
.toast__title{font-weight:800}
.toast__msg{color:var(--muted); font-size:13px; margin-top:2px}
.toast__x{
  margin-left:auto;
  border:none; background: transparent; color:var(--muted);
  font-size:18px; cursor:pointer;
}
.toast__x:hover{color:var(--text)}

@media (max-width: 980px){
  .main{grid-template-columns: 1fr}
  .sidebar{display:none}
  .search{min-width: 220px}
}
