:root{
  --sidebar:#2f556a;
  --sidebar-accent:#2aa84a;
  --primary:#0a7bd6;
  --primary-dark:#2f556a;
  --bg:#f3f5f7;
  --card:#ffffff;
  --muted:#6b7280;
  --border:#e5e7eb;
  --shadow: 0 10px 24px rgba(0,0,0,.10);
  --radius:14px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:var(--font);
  background:var(--bg);
  color:#111827;
}
a{ color:inherit; text-decoration:none; }

.app{
  display:grid;
  grid-template-columns: 92px 1fr;
  min-height:100vh;
}
.sidebar {
    background: var(--sidebar);
    color: #fff;
    padding: 16px 10px; /* ✅ FIXED */
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
/*.sidebar{
  background:var(--sidebar);
  color:#fff;
  padding:16px 60px;
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  gap:12px;
}*/
.brand{
  display:flex;
  align-items:center;
  justify-content:center;
  height:56px;
  margin-bottom:6px;
}
.brand .wa{
  width:42px; height:42px;
  border-radius:50%;
  background:#3ddb6e;
  display:grid; place-items:center;
  font-weight:800;
  color:#0b3;
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.25);
}

.nav{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:10px;
  flex:1;
  align-items:center;
}
    .nav a {
        width: 72px; /* slightly increased */
        padding: 10px 6px;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        text-align: center; /* ✅ ensures text centers */
        line-height: 1.2;
        white-space: normal; /* ✅ prevents overlap */
    }
/*.nav a{
  width:64px;
  padding:10px 8px;
  border-radius:12px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  font-size:11px;
  opacity:.92;
  border:1px solid transparent;
  transition:.15s ease;
}*/
.nav a:hover{ background:rgba(255,255,255,.08); }
.nav a.active{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.15);
}
.icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex; /* better than grid here */
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.10);
    font-weight: 700;
    flex-shrink: 0; /* ✅ prevents squeezing */
}
/*.icon{
  width:28px; height:28px;
  border-radius:8px;
  display:grid; place-items:center;
  background:rgba(255,255,255,.10);
  font-weight:700;
}*/
.logout{
  margin-top:auto;
  padding:10px 8px;
  text-align:center;
  font-size:12px;
  opacity:.9;
  border-top:1px solid rgba(255,255,255,.12);
  cursor:pointer;
  user-select:none;
}
.logout:hover{ opacity:1; }

.main{ padding:0; min-width:0; }
.topbar{
  height:86px;
  background:#fff;
  border-bottom:1px solid var(--border);
  box-shadow: var(--shadow);
  display:flex;
  align-items:center;
  padding:0 26px;
  position:sticky;
  top:0;
  z-index:5;
}
.topbar h1{ margin:0; font-size:34px; letter-spacing:.4px; }

.content{ padding:26px; max-width:1100px; }

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}
.stack{ display:flex; flex-direction:column; gap:14px; }
.row{ display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
.row.space{ justify-content:space-between; }

label{
  font-size:12px;
  color:var(--muted);
  display:block;
  margin-bottom:6px;
}
input, select, textarea{
  width:100%;
  padding:12px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  outline:none;
  font:inherit;
  background:#fff;
}
textarea{ min-height:210px; resize:vertical; }
.field{ min-width:280px; flex:1; }
.field.small{ min-width:220px; flex:0 1 280px; }

.btn{
  border:0;
  padding:12px 16px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  letter-spacing:.2px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  transition:.15s ease;
  user-select:none;
}
.btn.primary{ background:var(--primary); color:#fff; }
.btn.dark{ background:var(--primary-dark); color:#fff; }
.btn.ghost{ background:#eef2f7; color:#0f172a; }
.btn.primary:hover{ filter:brightness(.95); }
.btn.dark:hover{ filter:brightness(.95); }
.btn.ghost:hover{ filter:brightness(.98); }
.btn.wide{ padding-left:22px; padding-right:22px; min-width:190px; justify-content:center; }

.pillTabs{ display:flex; gap:8px; margin-top:6px; }
.pill{
  padding:10px 14px;
  border-radius:12px 12px 0 0;
  border:1px solid var(--border);
  background:#0b6fbf;
  color:#fff;
  font-weight:700;
  font-size:13px;
  cursor:pointer;
  opacity:.92;
}
.pill.secondary{ background:#2f556a; }
.pill.active{ opacity:1; }

.tableHead{
  background:#0b6fbf;
  color:#fff;
  border-radius:12px;
  padding:12px 14px;
  font-weight:700;
  overflow:auto;
  white-space:nowrap;
}
.tableHead span{ display:inline-block; min-width:160px; }
.tableBody{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.skeleton{
  height:46px;
  border-radius:12px;
  background:linear-gradient(90deg,#e5e7eb,#f3f4f6,#e5e7eb);
  background-size:200% 100%;
  animation: shimmer 1.2s infinite;
  border:1px solid var(--border);
}
@keyframes shimmer{
  0%{ background-position: 0% 0; }
  100%{ background-position: 200% 0; }
}

.statusBanner{
  background:#11b6d4;
  color:#fff;
  font-weight:900;
  letter-spacing:.8px;
  text-transform:uppercase;
  text-align:center;
  padding:20px 14px;
  border-radius:12px;
  width:min(520px, 100%);
  margin: 100px auto 22px auto;
  box-shadow: var(--shadow);
}

.muted{ color:var(--muted); }

/* Login */
.loginWrap{
  display:grid;
  grid-template-columns: 1fr 1fr;
  min-height:calc(100vh - 86px);
}
.loginLeft{
  padding:34px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:16px;
}
.loginLogo{
  display:flex;
  gap:10px;
  align-items:center;
  font-weight:900;
  font-size:26px;
}
.loginLogo .bubble{
  width:34px; height:34px;
  border-radius:50%;
  background:#3ddb6e;
  display:grid; place-items:center;
  font-weight:900;
  color:#0b3;
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.35);
}
.loginCard{ width:min(520px, 100%); padding:22px; }
.loginRight{
  background:
    radial-gradient(circle at 40% 30%, rgba(61,219,110,.45), transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(61,219,110,.25), transparent 45%),
    linear-gradient(135deg, #1f2937, #0b1220);
  min-height:100%;
}

@media (max-width: 980px){
  .app{ grid-template-columns: 74px 1fr; }
  .topbar h1{ font-size:26px; }
  .loginWrap{ grid-template-columns: 1fr; }
  .loginRight{ min-height:220px; }
  .content{ padding:18px; }
}

.tableHead, .tableRow {
  display: grid;
  grid-template-columns: 80px 1.5fr 1.5fr 120px 90px;
  gap: 10px;
  align-items: center;
}

.tableHead {
  font-weight: 700;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.tableRow {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.tableBody {
  display: block;
}