:root{
  --c-primary: #7bb6ff;
  --c-secondary:#a7f3d0;
  --c-accent:#fbcfe8;
  --c-bg:#f7f8fc;
  --c-card:#ffffff;
  --c-text:#17202a;
  --c-muted:#5d6d7e;
  --radius: 18px;
  --shadow: 0 10px 28px rgba(17,32,42,0.08);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: "Quicksand", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
}
a{ color: inherit; text-decoration:none; }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; }

.container{
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 14px 18px;
}
.topbar{
  position: sticky;
  top:0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(247,248,252,0.8);
  border-bottom: 1px solid rgba(17,32,42,0.06);
}
.topbar-inner{
  max-width:720px;
  margin:0 auto;
  padding: 10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.brand img{
  height:34px;
  width:auto;
  border-radius: 12px;
  background:#fff;
  padding:6px;
}
.brand .org{
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.card{
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin: 12px 0;
}
.h1{ font-size: 20px; margin: 0 0 8px; }
.h2{ font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.muted{ color: var(--c-muted); }
.small{ font-size: 12px; }
.row{ display:flex; align-items:center; gap:12px; }
.right{ display:flex; justify-content:flex-end; }
.space-between{ justify-content:space-between; }
.badge{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(123,182,255,0.25);
  font-size: 12px;
  margin-top: 8px;
}
.form{ display:flex; flex-direction:column; gap:10px; }
.label{ font-size: 13px; color: var(--c-muted); }
.input, .select{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(17,32,42,0.10);
  outline:none;
  background: #fff;
}
.input:focus, .select:focus{ border-color: rgba(123,182,255,0.7); box-shadow: 0 0 0 4px rgba(123,182,255,0.18); }
.btn{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(17,32,42,0.12);
  background: #fff;
  cursor:pointer;
  font-weight: 700;
}
.btn:disabled{ opacity:0.5; cursor:not-allowed; }
.btn-primary{
  border-color: rgba(123,182,255,0.45);
  background: rgba(123,182,255,0.22);
}
.btn-danger{
  border-color: rgba(239,68,68,0.45);
  background: rgba(239,68,68,0.12);
}
.alert{
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(251,207,232,0.35);
  border: 1px solid rgba(251,207,232,0.7);
}
.flash{
  padding: 10px 12px;
  border-radius: 14px;
  margin: 10px 0;
  border: 1px solid rgba(17,32,42,0.10);
}
.flash.success{ background: rgba(167,243,208,0.35); }
.flash.error{ background: rgba(251,207,232,0.35); }

.navbar{
  position: fixed;
  left:0; right:0; bottom:0;
  background: rgba(255,255,255,0.92);
  border-top: 1px solid rgba(17,32,42,0.08);
  backdrop-filter: blur(10px);
  z-index: 30;
}
.navbar-inner{
  max-width:720px;
  margin: 0 auto;
  display:flex;
  justify-content:space-around;
  padding: 8px 10px;
}
.navitem{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  font-size: 11px;
  color: var(--c-muted);
  padding: 6px 10px;
  border-radius: 14px;
}
.navitem.active{
  color: var(--c-text);
  background: rgba(123,182,255,0.16);
}
.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.table{
  width:100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .table td{
  text-align:left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(17,32,42,0.08);
}
.table th{ color: var(--c-muted); font-weight: 700; }

@media (max-width: 420px){
  .grid-2{ grid-template-columns: 1fr; }
}


/* Side panel (hamburger menu) */
.iconbtn{
  border: 1px solid rgba(17,32,42,0.10);
  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  height: 38px;
  width: 44px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 0;
}
.iconbtn:active{ transform: translateY(1px); }
.burger{
  width: 18px;
  height: 12px;
  position: relative;
  display:block;
}
.burger:before, .burger:after{
  content:'';
  position:absolute;
  left:0; right:0;
  height:2px;
  background: rgba(17,32,42,0.75);
  border-radius: 2px;
}
.burger:before{ top:0; }
.burger:after{ bottom:0; }
/* use ::before and ::after plus a pseudo middle line via box-shadow */
.burger:before{
  box-shadow: 0 5px 0 rgba(17,32,42,0.75);
}

.xicon{
  width: 16px;
  height: 16px;
  position: relative;
  display:block;
}
.xicon:before, .xicon:after{
  content:'';
  position:absolute;
  left:50%;
  top:50%;
  width: 18px;
  height: 2px;
  background: rgba(17,32,42,0.75);
  border-radius: 2px;
  transform-origin:center;
}
.xicon:before{ transform: translate(-50%,-50%) rotate(45deg); }
.xicon:after{ transform: translate(-50%,-50%) rotate(-45deg); }

.side-overlay{
  position: fixed;
  inset: 0;
  background: rgba(17,32,42,0.35);
  z-index: 40;
}

.sidepanel{
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(340px, 92vw);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-left: 1px solid rgba(17,32,42,0.10);
  z-index: 50;
  transform: translateX(102%);
  transition: transform 200ms ease;
  display:flex;
  flex-direction: column;
}
.sidepanel.open{ transform: translateX(0); }

.sidepanel-header{
  padding: 14px 14px 10px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(17,32,42,0.08);
}
.sidepanel-title{
  font-weight: 800;
  letter-spacing: -0.2px;
}
.sidepanel-body{
  padding: 12px 10px;
  display:flex;
  flex-direction: column;
  gap: 8px;
  overflow:auto;
  flex:1;
}
.sidelink{
  display:block;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(17,32,42,0.08);
  background: rgba(247,248,252,0.8);
  color: inherit;
  text-decoration:none;
  font-weight: 700;
}
.sidelink.active{
  border-color: rgba(17,32,42,0.20);
  background: rgba(255,255,255,0.95);
}
.sidepanel-footer{
  padding: 12px 10px 16px;
  border-top: 1px solid rgba(17,32,42,0.08);
}
.sidelink.danger{
  border-color: rgba(220, 38, 38, 0.25);
}
.no-scroll{
  overflow: hidden;
}
