:root{
  --bg:#f6f7f9;
  --card:#ffffff;
  --muted:#6b7280;
  --text:#0f172a;
  --line:#e5e7eb;
  --blue:#1e73ff;
  --blue2:#0b57d0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing:border-box; }
body{ margin:0; background:var(--bg); color:var(--text); }

.shell{
  min-height:100vh;
  display:grid;
  grid-template-columns: 420px 1fr;
}

/* LEFT PANEL */
.left{
  background:rgba(255,255,255,0.92);
  backdrop-filter: blur(2px);
  padding: 42px 36px;
  display:flex;
  flex-direction:column;
  border-right: 1px solid var(--line);
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom: 36px;
}

.logoMark{
  width:44px; height:44px;
  border-radius:12px;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color:#fff;
  display:grid;
  place-items:center;
  font-weight:800;
  letter-spacing:0.5px;
}

.brandName{ font-size:18px; font-weight:800; line-height:1; }
.brandTag{ font-size:13px; color:var(--muted); margin-top:2px; }

.title{
  margin:0;
  font-size:28px;
  letter-spacing:0.5px;
}

.subtitle{
  margin:8px 0 22px;
  color:var(--muted);
  font-size:14px;
}

.form{ display:flex; flex-direction:column; gap:14px; margin-top: 8px; }
.field{ display:flex; flex-direction:column; gap:7px; }
.label{ font-size:12px; color:var(--muted); }

input{
  width:100%;
  padding: 12px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  outline:none;
  font-size:14px;
}

input:focus{
  border-color: rgba(30,115,255,0.6);
  box-shadow: 0 0 0 4px rgba(30,115,255,0.12);
}

.check{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  color:var(--muted);
  user-select:none;
  margin-top: 2px;
}

.btn{
  margin-top: 6px;
  padding: 12px 14px;
  border:0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color:#fff;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(30,115,255,0.20);
}

.btn:hover{ filter: brightness(1.03); }

.help{
  margin-top: 8px;
  text-align:center;
  color: var(--text);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footerNote{
  margin-top:auto;
  color: var(--muted);
  font-size: 12px;
}

/* RIGHT PANEL */
.right{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 48px;
  /* Background image */
  background-image:
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1600&q=60");
  background-size: cover;
  background-position: center;
}

.overlay{
  position:absolute;
  inset:0;
  background: rgba(30,115,255,0.78);
}

.rightContent{
  position:relative;
  max-width: 640px;
  color:#fff;
}

.rightContent h2{
  margin:0 0 14px;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: 0.5px;
}

.rightContent p{
  margin:0 0 18px;
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.95;
  max-width: 560px;
}

.pillRow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 8px;
}

.pill{
  display:inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  font-size: 13px;
}

/* RESPONSIVE */
@media (max-width: 980px){
  .shell{ grid-template-columns: 1fr; }
  .left{ border-right:0; border-bottom: 1px solid var(--line); }
  .right{ min-height: 46vh; }
  .rightContent h2{ font-size: 34px; }
}

/* ---------- App pages ---------- */
.panel:hover{ border-color:#dbe2ea; }
.kpiCard:hover{ border-color:#dbe2ea; }

.panel{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:18px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  margin-bottom: 14px;
}

.panelHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 12px;
}

.panelTitle{ margin:0; font-size:17px; }

.row{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-bottom: 14px;
}
.row.two{ grid-template-columns: 1fr 1fr; }

.kpiCard{
  border:1px solid #eee;
  background:#fcfcfc;
  border-radius:12px;
  padding:14px;
}

.kpiLabel{ font-size:12px; color: var(--muted); letter-spacing:.2px; }
.kpiValue{ font-size:24px; font-weight:800; margin-top:6px; line-height:1.05; }
.kpiHint{ font-size:12px; color: var(--muted); margin-top:4px; }
.kpiHint.up{ color:#0f766e; font-weight:600; }

.container{ max-width:980px; margin:0 auto; padding:0 24px; }
.appMain{ padding-top: 18px; padding-bottom: 36px; }

.panel{ padding:18px; }
.panelTitle{ font-size:17px; }

.row{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 280px));
  gap:18px;
  margin-bottom: 18px;
  justify-content: center; /* 👈 centers the cards */
}

.kpiCard{ padding:14px; }
.kpiValue{ font-size:24px; }

.appBg { background:#f6f7f9; }

.appTop{
  background:#fff;
  border-bottom:1px solid #e5e7eb;
}
.appTopInner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.appBrand{ display:flex; align-items:center; gap:12px; }
.logoMark.sm{ width:36px; height:36px; border-radius:10px; font-size:13px; }
.appName{ font-weight:800; }
.appSub{ font-size:12px; color:#6b7280; }

.appNav{ display:flex; gap:10px; flex-wrap:wrap; }
.appLink{
  text-decoration:none;
  color:#111;
  padding: 8px 10px;
  border-radius: 10px;
  border:1px solid #e5e7eb;
  background:#fff;
  font-weight:600;
  font-size:13px;
}
.appLink.active{ border-color: rgba(30,115,255,0.6); box-shadow:0 0 0 4px rgba(30,115,255,0.10); }
/* --- Off-canvas left sidebar --- */
.hamburger{
  font-size:22px;
  background:transparent;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding: 8px 12px;
  cursor:pointer;
}

.menuOverlay{
  position:fixed;
  inset:0;
  background: rgba(15,23,42,0.35);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition: opacity .22s ease, visibility 0s linear .22s;
  z-index:150;
}
.menuOverlay.open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition: opacity .22s ease;
}


.sideMenu{
  position:fixed;
  top:0;
  left:0;
  height:100vh;
  width:260px;
  background:#fff;
  border-right:1px solid #e5e7eb;

  /* GUARANTEED hidden */
  transform: translateX(-105%);
  visibility: hidden;
  pointer-events: none;

  transition: transform .22s ease, visibility 0s linear .22s;
  z-index:200;
  box-shadow: 8px 0 24px rgba(0,0,0,0.10);
}

.sideMenu.open{
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform .22s ease;
}


.sideMenuHead{
  padding: 18px 16px;
  font-weight:800;
  border-bottom:1px solid #e5e7eb;
}

.sideNav{
  display:flex;
  flex-direction:column;
  padding: 12px;
  gap:10px;
}

.sideLink{
  text-decoration:none;
  color:#111;
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid #e5e7eb;
  background:#fff;
  font-weight:700;
}
.sideLink.active{
  border-color: rgba(30,115,255,0.6);
  box-shadow:0 0 0 4px rgba(30,115,255,0.10);
}




.chip{
  font-size:11px;
  color:#111;
  background:#f2f2f2;
  border:1px solid #e5e7eb;
  padding: 6px 10px;
  border-radius: 999px;
}
.chip.blue{
  background: rgba(30,115,255,0.10);
  border-color: rgba(30,115,255,0.25);
}

.rightActions{ display:flex; gap:10px; flex-wrap:wrap; }
.btnGhost{
  display:inline-block;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background:#fff;
  text-decoration:none;
  color:#111;
  font-weight:700;
  font-size:13px;
}
.btnGhost:hover{ background:#fafafa; }

/* chart mock */
.chartMock{
  display:flex;
  gap:10px;
  align-items:flex-end;
  height:160px;
  padding: 10px;
  border:1px solid #eee;
  border-radius:12px;
  background:#fcfcfc;
}
.chartMock .bar{
  flex:1;
  background: linear-gradient(135deg, #1e73ff, #0b57d0);
  border-radius: 10px;
}
.chartLabels{ display:flex; justify-content:space-between; color:#6b7280; font-size:12px; margin-top:8px; padding: 0 6px; }

/* insights */
.cards{ display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap:12px; }
.insight{
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  background:#fff;
}
.insight.info{ border-left: 6px solid rgba(30,115,255,0.7); }
.insight.warn{ border-left: 6px solid rgba(245,158,11,0.8); }
.insight.critical{ border-left: 6px solid rgba(239,68,68,0.8); }
.insTitle{ font-weight:800; margin-bottom:6px; }
.insText{ color:#374151; font-size:14px; line-height:1.5; }

/* invoices table */
.filters{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap:10px;
  margin-bottom: 12px;
}
.f .label{ display:block; margin-bottom:6px; font-size:12px; color:#6b7280; }
.tableWrap{ overflow:auto; border:1px solid #eee; border-radius:12px; }
.table{ width:100%; border-collapse: collapse; font-size:14px; }
.table th, .table td{ padding: 12px; border-bottom:1px solid #eee; text-align:left; white-space:nowrap; }
.table th{ background:#fafafa; font-size:13px; color:#374151; }

.badge{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #e5e7eb;
}
.badge.ok{ background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.25); }
.badge.warn{ background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.25); }
.badge.bad{ background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.25); }

/* upload form */
.formGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field{ display:flex; flex-direction:column; gap:7px; }
.field.full{ grid-column: 1 / -1; }
.full{ grid-column: 1 / -1; display:flex; gap:10px; flex-wrap:wrap; }

/* responsive */
@media (max-width: 980px){
  .row{ grid-template-columns: 1fr; }
  .row.two{ grid-template-columns: 1fr; }
  .filters{ grid-template-columns: 1fr 1fr; }
  .formGrid{ grid-template-columns: 1fr; }
}

.detailGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}
.detailCard{
  border:1px solid #eee;
  background:#fcfcfc;
  border-radius:12px;
  padding:12px;
}
@media (max-width: 980px){
  .detailGrid{ grid-template-columns: 1fr; }
}

.detailGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}

@media (max-width: 980px){
  .detailGrid{ grid-template-columns: 1fr; }
}

