/* =====================================================================
   LEGALLYNC DESIGN SYSTEM
   Shared tokens, base styles, components, and motion primitives used
   across every marketing, auth, and app page.
   ===================================================================== */

:root{
  --bg-1:#eceeef;
  --bg-2:#dcdedf;
  --ink-900:#1c1d1f;
  --ink-700:#4a4c4f;
  --ink-400:#9a9c9f;
  --ink-200:#c9cbcc;
  --orange:#f2662b;
  --orange-dark:#d9531c;
  --orange-light:#fff1e8;
  --card-bg:#ffffff;
  --line:#e4e5e6;
  --success-bg:#e5f5ea; --success-ink:#1e9847;
  --pending-bg:#fef1e2; --pending-ink:#c9762b;
  --danger-bg:#fdecea; --danger-ink:#d93025;
  --closed-bg:#eceeef; --closed-ink:#9a9c9f;
  --radius-lg:22px;
  --radius-md:14px;
  --radius-sm:10px;
  --ease:cubic-bezier(.2,.8,.2,1);
  --shadow-sm:0 10px 24px -14px rgba(20,20,20,0.16);
  --shadow-md:0 20px 45px -28px rgba(20,20,20,0.18);
  --shadow-lg:0 30px 60px -20px rgba(20,20,20,0.22);
  --sidebar-w:248px;
  --topbar-h:72px;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;overflow-x:hidden;}
body{
  font-family:'Inter',sans-serif;
  color:var(--ink-900);
  min-height:100vh;
}
body.marketing{
  background:radial-gradient(ellipse 900px 700px at 78% 30%, #f4f4f4 0%, #e6e7e8 45%, #d9dbdc 100%);
}
body.app-shell-body{
  background:#f4f5f6;
}
a{ color:inherit; }
img{ max-width:100%; display:block; }
button{ font-family:inherit; border:none; background:none; cursor:pointer; }
input, select, textarea{ font-family:inherit; }

h1,h2,h3,h4,h5{ font-family:'Archivo',sans-serif; margin:0; }

/* ---------------------------------------------------------------
   LAYOUT WRAP (marketing pages)
   --------------------------------------------------------------- */
.wrap{
  max-width:1320px;
  margin:0 auto;
  padding:32px 40px 60px;
  position:relative;
}
.page-sections{
  max-width:1320px;
  margin:0 auto;
  padding:0 40px;
  position:relative;
}
.section{ position:relative; z-index:1; }
.section + .section{ margin-top:150px; }

/* ---------------------------------------------------------------
   MARKETING HEADER
   --------------------------------------------------------------- */
header.site-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:6px 4px 0;
  position:relative;
  z-index:20;
  animation:fadeDown .7s var(--ease) both;
}
.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-family:'Archivo',sans-serif;
  font-weight:700;
  font-size:19px;
  letter-spacing:-0.2px;
  color:var(--ink-900);
  white-space:nowrap;
  text-decoration:none;
}
.logo-mark{ width:26px;height:26px;flex:0 0 auto; display:grid;place-items:center; }
.logo-mark svg{ width:100%;height:100%; }

nav.primary-nav{
  display:flex;
  align-items:center;
  gap:4px;
  background:rgba(255,255,255,0.55);
  border:1px solid rgba(255,255,255,0.7);
  padding:6px;
  border-radius:100px;
  backdrop-filter:blur(6px);
  animation:fadeDown .7s var(--ease) both .08s;
}
nav.primary-nav a{
  font-size:14.5px;
  font-weight:500;
  color:var(--ink-700);
  text-decoration:none;
  padding:9px 18px;
  border-radius:100px;
  display:flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  transition:background .2s ease, color .2s ease;
  white-space:nowrap;
}
nav.primary-nav a.active{
  background:#ffffff;
  color:var(--ink-900);
  box-shadow:0 1px 3px rgba(0,0,0,0.08);
}
nav.primary-nav a:not(.active):hover{ background:rgba(255,255,255,0.6); }

.header-actions{ display:flex; align-items:center; gap:12px; animation:fadeDown .7s var(--ease) both .14s; }

/* ---------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------- */
.btn-primary{
  background:var(--orange);
  color:#fff;
  font-weight:600;
  font-size:14.5px;
  padding:16px 26px;
  border-radius:100px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  cursor:pointer;
  transition:background .2s ease, transform .15s ease, box-shadow .2s ease;
  box-shadow:0 10px 24px -8px rgba(242,102,43,0.45);
  text-decoration:none;
  white-space:nowrap;
}
.btn-primary:hover{ background:var(--orange-dark); transform:translateY(-1px); }
.btn-primary:active{ transform:translateY(0); }
.btn-primary.sm{ padding:11px 18px; font-size:13px; }
.btn-primary .arrow-badge{
  width:22px;height:22px;border-radius:50%;
  background:rgba(255,255,255,0.25);
  display:grid;place-items:center;
}
.btn-primary .arrow-badge svg{ width:11px;height:11px; }

.btn-secondary{
  background:rgba(255,255,255,0.7);
  border:1px solid rgba(255,255,255,0.9);
  color:var(--ink-900);
  font-weight:600;
  font-size:14.5px;
  padding:16px 26px;
  border-radius:100px;
  cursor:pointer;
  transition:background .2s ease, transform .15s ease;
  text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center;
  white-space:nowrap;
}
.btn-secondary:hover{ background:#fff; transform:translateY(-1px); }
.btn-secondary.sm{ padding:11px 18px; font-size:13px; }

.btn-dark{
  background:#181818; color:#fff; font-weight:600; font-size:14.5px;
  padding:14px 26px; border-radius:100px; cursor:pointer;
  transition:background .2s ease, transform .15s ease;
  text-decoration:none; display:inline-flex; align-items:center; justify-content:center;
  white-space:nowrap;
}
.btn-dark:hover{ background:#000; transform:translateY(-1px); }

.btn-outline-light{
  background:transparent; border:1px solid rgba(255,255,255,0.3);
  color:#fff; font-weight:600; font-size:14.5px;
  padding:16px 26px; border-radius:100px; cursor:pointer;
  transition:background .2s ease, transform .15s ease;
  text-decoration:none; display:inline-flex; align-items:center; justify-content:center;
}
.btn-outline-light:hover{ background:rgba(255,255,255,0.12); transform:translateY(-1px); }

.btn-ghost{
  background:transparent; color:var(--ink-700); font-weight:600; font-size:14px;
  padding:10px 16px; border-radius:100px; cursor:pointer;
  transition:background .2s ease, color .2s ease;
}
.btn-ghost:hover{ background:#f2f3f4; color:var(--ink-900); }

/* ---------------------------------------------------------------
   KICKER / SECTION HEAD
   --------------------------------------------------------------- */
.kicker{
  display:inline-flex; align-items:center; gap:9px;
  font-size:12.5px; font-weight:700; letter-spacing:1.6px;
  text-transform:uppercase; color:var(--orange-dark);
  margin-bottom:18px;
}
.kicker::before{ content:''; width:16px;height:2px; background:var(--orange); border-radius:2px; flex:0 0 auto; }
.section-head{ max-width:640px; }
.section-head.center{ margin:0 auto; text-align:center; }
.section-head h1, .section-head h2{
  font-weight:800; font-size:44px; line-height:1.1; letter-spacing:-1.3px;
  color:var(--ink-900); margin:0 0 18px;
}
.section-head p{ font-size:16px; line-height:1.65; color:var(--ink-700); margin:0; }

/* ---------------------------------------------------------------
   CARDS
   --------------------------------------------------------------- */
.card{
  background:#fff;
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-md);
  transition:transform .35s var(--ease), box-shadow .35s ease;
}
.card:hover{ transform:translateY(-6px); box-shadow:var(--shadow-lg); }

.badge{
  font-size:11px; font-weight:700; padding:5px 11px; border-radius:100px;
  display:inline-flex; align-items:center; gap:5px; white-space:nowrap;
}
.badge.success{ background:var(--success-bg); color:var(--success-ink); }
.badge.pending{ background:var(--pending-bg); color:var(--pending-ink); }
.badge.danger{ background:var(--danger-bg); color:var(--danger-ink); }
.badge.closed{ background:var(--closed-bg); color:var(--closed-ink); }

/* ---------------------------------------------------------------
   FORMS
   --------------------------------------------------------------- */
.field{ margin-bottom:20px; }
.field label{
  display:block; font-size:13px; font-weight:600; color:var(--ink-900);
  margin-bottom:8px;
}
.field .hint{ font-size:12px; color:var(--ink-400); margin-top:6px; }
.field-error{ font-size:12px; color:#d93025; margin-top:6px; font-weight:600; }
.field .input.has-error, .field select.has-error, .field textarea.has-error{ border-color:#d93025; }
.flash-stack{ display:flex; flex-direction:column; gap:10px; margin-bottom:20px; }
.alert{ display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:12px; font-size:13.5px; font-weight:600; border:1.5px solid transparent; }
.alert-icon{ display:flex; flex:0 0 auto; }
.alert-icon svg{ width:18px; height:18px; }
.alert span:not(.alert-icon){ flex:1; }
.alert-success{ background:#eaf7ed; color:#1e9847; border-color:#c9ecd2; }
.alert-error{ background:#fceceb; color:#d93025; border-color:#f6cfcb; }
.alert-info{ background:#eef2fb; color:#3457d5; border-color:#d3ddf6; }
.alert-close{ background:none; border:0; color:inherit; opacity:.6; cursor:pointer; padding:2px; display:flex; }
.alert-close:hover{ opacity:1; }
.input, select.input, textarea.input{
  width:100%;
  padding:13px 16px;
  border-radius:12px;
  border:1.5px solid var(--line);
  background:#fafafb;
  font-size:14.5px;
  color:var(--ink-900);
  transition:border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.input::placeholder{ color:var(--ink-400); }
.input:focus, select.input:focus, textarea.input:focus{
  outline:none;
  border-color:var(--orange);
  background:#fff;
  box-shadow:0 0 0 4px rgba(242,102,43,0.12);
}
.input-icon-wrap{ position:relative; }
.input-icon-wrap .input{ padding-left:44px; }
.input-icon-wrap svg{
  position:absolute; left:15px; top:50%; transform:translateY(-50%);
  width:17px; height:17px; color:var(--ink-400); pointer-events:none;
}
.input-icon-wrap .toggle-visibility{
  position:absolute; right:14px; top:50%; transform:translateY(-50%);
  cursor:pointer; color:var(--ink-400); background:none; border:none; padding:4px;
  display:flex; pointer-events:auto;
}
.checkbox-row{ display:flex; align-items:center; gap:9px; font-size:13.5px; color:var(--ink-700); }
.checkbox-row input[type="checkbox"]{
  width:17px;height:17px; accent-color:var(--orange); cursor:pointer;
}

/* ---------------------------------------------------------------
   ALERTS / FLASH MESSAGES
   --------------------------------------------------------------- */
.flash-stack{ display:flex; flex-direction:column; gap:10px; margin-bottom:20px; }
.alert{
  display:flex; align-items:center; gap:10px;
  padding:13px 16px; border-radius:12px;
  font-size:13.5px; font-weight:500; line-height:1.4;
}
.alert-icon{ flex:0 0 auto; width:18px;height:18px; display:grid; place-items:center; }
.alert-icon svg{ width:18px;height:18px; }
.alert-close{ margin-left:auto; flex:0 0 auto; color:inherit; opacity:.55; padding:4px; border-radius:6px; }
.alert-close:hover{ opacity:1; background:rgba(0,0,0,0.06); }
.alert-success{ background:var(--success-bg); color:var(--success-ink); }
.alert-error{ background:var(--danger-bg); color:var(--danger-ink); }
.alert-info{ background:var(--pending-bg); color:var(--pending-ink); }

/* ---------------------------------------------------------------
   MOTION PRIMITIVES
   --------------------------------------------------------------- */
@keyframes fadeDown{ from{opacity:0; transform:translateY(-14px);} to{opacity:1; transform:translateY(0);} }
@keyframes fadeUp{ from{opacity:0; transform:translateY(26px);} to{opacity:1; transform:translateY(0);} }
@keyframes popIn{ from{opacity:0; transform:scale(.9);} to{opacity:1; transform:scale(1);} }
@keyframes floatY{ 0%,100%{transform:translateY(0);} 50%{transform:translateY(-12px);} }
@keyframes spin{ to{ transform:rotate(360deg); } }
@keyframes livePulse{ 0%,100%{ opacity:1; transform:scale(1); } 50%{ opacity:.4; transform:scale(.7); } }
@keyframes shimmer{ 0%{background-position:-200% 0;} 100%{background-position:200% 0;} }

.js-ready .reveal{
  opacity:0; transform:translateY(28px);
  transition:opacity .8s var(--ease), transform .8s var(--ease);
}
.js-ready .reveal.is-visible{ opacity:1; transform:translateY(0); }
.js-ready .reveal-left{ opacity:0; transform:translateX(-36px); transition:opacity .8s var(--ease), transform .8s var(--ease); }
.js-ready .reveal-left.is-visible{ opacity:1; transform:translateX(0); }
.js-ready .reveal-right{ opacity:0; transform:translateX(36px); transition:opacity .8s var(--ease), transform .8s var(--ease); }
.js-ready .reveal-right.is-visible{ opacity:1; transform:translateX(0); }
.js-ready .reveal-scale{ opacity:0; transform:scale(.9); transition:opacity .7s var(--ease), transform .7s var(--ease); }
.js-ready .reveal-scale.is-visible{ opacity:1; transform:scale(1); }

.tilt-card{ transform-style:preserve-3d; will-change:transform; }

/* ambient blobs */
.blob{
  position:absolute; border-radius:50%; filter:blur(60px);
  pointer-events:none; z-index:0; will-change:transform;
  translate:0 var(--py, 0px);
}
.blob-orange{ background:radial-gradient(circle, rgba(242,102,43,0.24), transparent 70%); }
.blob-grey{ background:radial-gradient(circle, rgba(120,124,128,0.16), transparent 70%); }
@keyframes blobFloat{ 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(30px,-24px) scale(1.06);} }
.blob-anim{ animation:blobFloat 14s ease-in-out infinite; }

/* ---------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------- */
.site-footer{ margin-top:150px; padding:0 0 50px; position:relative; z-index:1; }
.footer-top{
  display:grid; grid-template-columns:1.5fr repeat(3,1fr);
  gap:40px; padding-bottom:56px; border-bottom:1px solid var(--line);
}
.footer-brand p{ font-size:14px; color:var(--ink-700); max-width:270px; line-height:1.6; margin:16px 0 0; }
.footer-col h5{
  font-family:'Archivo',sans-serif; font-size:12.5px; text-transform:uppercase;
  letter-spacing:1px; color:var(--ink-400); margin:0 0 18px; font-weight:700;
}
.footer-col ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.footer-col a{ font-size:14px; color:var(--ink-700); text-decoration:none; transition:color .2s ease; }
.footer-col a:hover{ color:var(--orange); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; padding-top:30px; flex-wrap:wrap; gap:16px; }
.footer-bottom p{ font-size:13px; color:var(--ink-400); margin:0; }
.footer-social{ display:flex; gap:10px; }
.footer-social a{
  width:36px;height:36px;border-radius:50%; background:#f2f3f4;
  display:grid;place-items:center; transition:background .25s ease, transform .25s ease;
}
.footer-social a:hover{ background:var(--orange); transform:translateY(-2px); }
.footer-social a svg{ width:14px;height:14px; }

/* =====================================================================
   APP SHELL (Dashboard + all internal product screens)
   ===================================================================== */
.app-shell{ display:flex; min-height:100vh; }

.app-sidebar{
  width:var(--sidebar-w);
  flex:0 0 auto;
  background:#181818;
  color:#fff;
  padding:24px 16px;
  display:flex;
  flex-direction:column;
  /* `position:sticky` here was the pinning bug: `html,body{overflow-x:hidden}`
     computes overflow-y to `auto` on that ancestor too (the CSS overflow
     spec couples the two axes), which quietly becomes the sidebar's nearest
     scrolling container. Sticky then anchors to that ancestor instead of
     the viewport, so the sidebar scrolls up with the rest of the page and
     only its own internal nav-scroll position is left showing — exactly
     what the screenshot captured. `position:fixed` anchors to the viewport
     unconditionally, so it can no longer be hijacked by an ancestor's
     overflow. */
  position:fixed;
  top:0;
  left:0;
  height:100vh;
  overflow:hidden;
  z-index:30;
}
.app-sidebar .logo{ color:#fff; padding:0 10px; margin-bottom:32px; flex:0 0 auto; }
/* min-height:0 lets this flex child shrink below its content height, so the
   footer stays pinned instead of being pushed past the fold. */
.app-nav{
  display:flex; flex-direction:column; gap:3px;
  flex:1 1 auto; min-height:0;
  overflow-y:auto; overscroll-behavior:contain;
  scrollbar-width:thin; scrollbar-color:rgba(255,255,255,0.18) transparent;
}
.app-nav::-webkit-scrollbar{ width:6px; }
.app-nav::-webkit-scrollbar-track{ background:transparent; }
.app-nav::-webkit-scrollbar-thumb{ background:rgba(255,255,255,0.18); border-radius:100px; }
.app-nav::-webkit-scrollbar-thumb:hover{ background:rgba(255,255,255,0.3); }
.app-nav-label{
  font-size:10.5px; font-weight:700; letter-spacing:1px; text-transform:uppercase;
  color:#6b6c6f; padding:18px 12px 8px;
}
.app-nav a{
  display:flex; align-items:center; gap:12px;
  padding:11px 12px; border-radius:12px;
  color:#c3c4c6; text-decoration:none; font-size:14px; font-weight:500;
  transition:background .2s ease, color .2s ease, transform .15s ease;
  position:relative;
}
.app-nav a svg{ width:18px; height:18px; flex:0 0 auto; }
.app-nav a:hover{ background:rgba(255,255,255,0.06); color:#fff; }
.app-nav a.active{ background:var(--orange); color:#fff; }
.app-nav a .nav-badge{
  margin-left:auto; background:rgba(255,255,255,0.15); color:#fff;
  font-size:10.5px; font-weight:700; padding:2px 7px; border-radius:100px;
}
.app-nav a.active .nav-badge{ background:rgba(255,255,255,0.28); }

.app-sidebar-footer{
  border-top:1px solid rgba(255,255,255,0.08);
  padding-top:16px; margin-top:16px;
  flex:0 0 auto;
  display:flex; align-items:center; gap:10px;
}
.app-sidebar-footer img{ width:36px;height:36px;border-radius:50%; object-fit:cover; }
.app-sidebar-footer .who strong{ display:block; font-size:13px; color:#fff; }
.app-sidebar-footer .who span{ font-size:11.5px; color:#8a8c8f; }
.app-sidebar-footer button{ margin-left:auto; color:#8a8c8f; padding:6px; border-radius:8px; transition:background .2s ease, color .2s ease; }
.app-sidebar-footer button:hover{ background:rgba(255,255,255,0.08); color:#fff; }
.app-sidebar-footer button svg{ width:16px;height:16px; }

.app-main{ flex:1; min-width:0; display:flex; flex-direction:column; margin-left:var(--sidebar-w); }

.app-topbar{
  height:var(--topbar-h);
  flex:0 0 auto;
  display:flex; align-items:center; gap:18px;
  padding:0 32px;
  background:#fff;
  border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:20;
}
.app-search{
  flex:1; max-width:420px;
  position:relative;
}
.app-search input{
  width:100%; padding:10px 14px 10px 40px;
  border-radius:100px; border:1.5px solid var(--line); background:#f7f8f8;
  font-size:13.5px; transition:border-color .2s ease, background .2s ease;
}
.app-search input:focus{ outline:none; border-color:var(--orange); background:#fff; }
.app-search svg{ position:absolute; left:14px; top:50%; transform:translateY(-50%); width:16px;height:16px; color:var(--ink-400); }
.app-topbar-actions{ display:flex; align-items:center; gap:10px; margin-left:auto; }
.icon-btn{
  width:38px;height:38px;border-radius:50%; display:grid;place-items:center;
  color:var(--ink-700); transition:background .2s ease, color .2s ease; position:relative;
}
.icon-btn:hover{ background:#f2f3f4; color:var(--ink-900); }
.icon-btn svg{ width:18px;height:18px; }
.icon-btn .dot{
  position:absolute; top:8px; right:8px; width:7px;height:7px;border-radius:50%;
  background:var(--orange); border:2px solid #fff;
}
.topbar-avatar{ width:38px;height:38px;border-radius:50%; object-fit:cover; cursor:pointer; }
.mobile-menu-btn{ display:none; }

.app-content{ padding:32px; flex:1; }
.app-content-header{
  display:flex; align-items:flex-start; justify-content:space-between;
  margin-bottom:28px; flex-wrap:wrap; gap:16px;
}
.app-content-header h1{ font-size:26px; font-weight:800; letter-spacing:-0.6px; margin:0 0 6px; }
.app-content-header p{ font-size:14px; color:var(--ink-700); margin:0; }
.breadcrumb{ font-size:12.5px; color:var(--ink-400); margin-bottom:8px; display:flex; align-items:center; gap:6px; }
.breadcrumb a{ color:var(--ink-400); text-decoration:none; transition:color .2s ease; }
.breadcrumb a:hover{ color:var(--orange); }

/* ---- KPI cards ---- */
.kpi-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-bottom:28px; }
.kpi-card{
  background:#fff; border-radius:var(--radius-md); padding:22px;
  box-shadow:var(--shadow-sm); transition:transform .3s var(--ease), box-shadow .3s ease;
}
.kpi-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); }
.kpi-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.kpi-icon{
  width:38px;height:38px;border-radius:11px; display:grid;place-items:center;
  background:var(--orange-light); color:var(--orange);
}
.kpi-icon svg{ width:18px;height:18px; }
.kpi-trend{ font-size:11.5px; font-weight:700; display:flex; align-items:center; gap:3px; }
.kpi-trend.up{ color:var(--success-ink); }
.kpi-trend.down{ color:var(--danger-ink); }
.kpi-value{ font-family:'Archivo',sans-serif; font-weight:800; font-size:26px; letter-spacing:-0.5px; }
.kpi-label{ font-size:12.5px; color:var(--ink-700); margin-top:4px; }

/* ---- generic panel ---- */
.panel{
  background:#fff; border-radius:var(--radius-md);
  box-shadow:var(--shadow-sm); padding:24px;
}
.panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.panel-head h3{ font-size:15.5px; font-weight:700; }
.panel-head a, .panel-link{ font-size:12.5px; font-weight:600; color:var(--orange-dark); text-decoration:none; }

/* ---- tables ---- */
.data-table{ width:100%; border-collapse:collapse; }
.data-table th{
  text-align:left; font-size:11.5px; font-weight:700; text-transform:uppercase;
  letter-spacing:.5px; color:var(--ink-400); padding:0 14px 12px; border-bottom:1px solid var(--line);
}
.data-table td{
  padding:14px; font-size:13.5px; color:var(--ink-900); border-bottom:1px solid #f1f2f2;
  vertical-align:middle;
}
.data-table tr{ transition:background .2s ease; }
.data-table tbody tr:hover{ background:#fafafb; }
.data-table tbody tr:last-child td{ border-bottom:none; }
.row-name{ font-weight:600; }
.row-sub{ font-size:11.5px; color:var(--ink-400); margin-top:2px; }
.avatar-sm{ width:32px;height:32px;border-radius:50%; object-fit:cover; }
.table-checkbox{ width:16px;height:16px; accent-color:var(--orange); }

/* ---- pagination ---- */
.pagination{ display:flex; align-items:center; justify-content:space-between; margin-top:18px; font-size:12.5px; color:var(--ink-700); }
.pagination .pages{ display:flex; gap:6px; }
.pagination button{
  width:32px;height:32px;border-radius:8px; display:grid;place-items:center;
  color:var(--ink-700); font-weight:600; font-size:13px;
  transition:background .2s ease, color .2s ease;
}
.pagination button.active{ background:var(--orange); color:#fff; }
.pagination button:not(.active):hover{ background:#f2f3f4; }

/* ---- tabs (segmented) ---- */
.seg-tabs{ display:inline-flex; background:#f2f3f4; padding:4px; border-radius:100px; gap:2px; }
.seg-tabs button{
  padding:9px 18px; border-radius:100px; font-size:13px; font-weight:600;
  color:var(--ink-700); transition:background .2s ease, color .2s ease;
}
.seg-tabs button.active{ background:#fff; color:var(--ink-900); box-shadow:0 1px 4px rgba(0,0,0,0.08); }

/* ---- modal ---- */
.modal-overlay{
  position:fixed; inset:0; background:rgba(20,20,20,0.45);
  display:flex; align-items:center; justify-content:center; z-index:100;
  opacity:0; pointer-events:none; transition:opacity .25s ease;
}
.modal-overlay.open{ opacity:1; pointer-events:auto; }
.modal-box{
  background:#fff; border-radius:20px; padding:32px; width:100%; max-width:480px;
  box-shadow:0 40px 90px -20px rgba(0,0,0,0.35);
  transform:scale(.94) translateY(10px); transition:transform .3s var(--ease);
  max-height:86vh; overflow-y:auto;
}
.modal-overlay.open .modal-box{ transform:scale(1) translateY(0); }
.modal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.modal-head h3{ font-size:18px; font-weight:700; }
.modal-close{ width:32px;height:32px;border-radius:50%; display:grid;place-items:center; color:var(--ink-400); transition:background .2s ease; }
.modal-close:hover{ background:#f2f3f4; }

/* ---- toast ---- */
.toast{
  position:fixed; bottom:24px; right:24px; z-index:200;
  background:#181818; color:#fff; padding:14px 20px; border-radius:14px;
  font-size:13.5px; font-weight:500; display:flex; align-items:center; gap:10px;
  box-shadow:0 20px 50px -10px rgba(0,0,0,0.4);
  transform:translateY(20px); opacity:0; transition:transform .35s var(--ease), opacity .35s ease;
}
.toast.show{ transform:translateY(0); opacity:1; }
.toast .tick{ width:20px;height:20px;border-radius:50%; background:#1e9847; display:grid;place-items:center; flex:0 0 auto; }
.toast .tick svg{ width:11px;height:11px; }

/* ---- empty state ---- */
.empty-state{ text-align:center; padding:60px 20px; }
.empty-state .icon{
  width:64px;height:64px;border-radius:18px; background:var(--orange-light); color:var(--orange);
  display:grid;place-items:center; margin:0 auto 20px;
}
.empty-state .icon svg{ width:28px;height:28px; }
.empty-state h4{ font-size:16px; font-weight:700; margin-bottom:8px; }
.empty-state p{ font-size:13.5px; color:var(--ink-700); max-width:320px; margin:0 auto 20px; }

@media (max-width: 1180px){
  .kpi-row{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 900px){
  .app-sidebar{ left:-260px; transition:left .3s var(--ease); box-shadow:0 0 0 100vmax rgba(0,0,0,0); }
  .app-sidebar.open{ left:0; box-shadow:0 0 60px 100vmax rgba(0,0,0,0.35); }
  .app-main{ margin-left:0; }
  .mobile-menu-btn{ display:grid; }
  .app-search{ display:none; }
}
@media (max-width: 720px){
  .kpi-row{ grid-template-columns:1fr; }
  .app-content{ padding:20px; }
  .footer-top{ grid-template-columns:1fr; }
  .section + .section{ margin-top:100px; }
}

/* =====================================================================
   PRODUCT MOCKUP COMPONENTS (reused across landing/features/pricing)
   ===================================================================== */
.dash-card{
  background:#fff; border-radius:24px; box-shadow:0 45px 90px -32px rgba(20,20,20,0.28);
  overflow:hidden; border:1px solid #eceeef; transition:transform .4s var(--ease);
}
.dash-card:hover{ transform:translateY(-6px); }
.dash-topbar{ display:flex; align-items:center; padding:16px 20px; border-bottom:1px solid var(--line); gap:8px; }
.dash-dot{ width:9px;height:9px;border-radius:50%; }
.dash-tabs{ display:flex; gap:6px; margin-left:18px; position:relative; }
.dash-tab{ font-size:12px; font-weight:600; padding:7px 14px; border-radius:100px; color:var(--ink-700); transition:background .2s ease, color .2s ease; }
.dash-tab.active{ background:#181818; color:#fff; }
.dash-body{ display:grid; grid-template-columns:58px 1fr 210px; }
.dash-nav{ border-right:1px solid var(--line); display:flex; flex-direction:column; align-items:center; gap:16px; padding:22px 0; }
.dash-nav .navicon{ width:34px;height:34px;border-radius:10px; display:grid;place-items:center; color:var(--ink-400); transition:background .2s ease, color .2s ease; }
.dash-nav .navicon.active{ background:var(--orange-light); color:var(--orange); }
.dash-nav .navicon svg{ width:16px;height:16px; }
.dash-main{ padding:22px 24px; }
.dash-main h4{ font-family:'Archivo',sans-serif; font-size:13.5px; margin:0 0 14px; color:var(--ink-900); font-weight:700; }
.case-row{ display:grid; grid-template-columns:1fr 92px 78px; align-items:center; padding:13px 0; border-bottom:1px solid #f1f2f2; font-size:13px; }
.case-row:last-child{ border-bottom:none; }
.case-row .name{ font-weight:600; color:var(--ink-900); display:block; }
.case-row .type{ color:var(--ink-400); font-size:11.5px; display:block; margin-top:2px; }
.status-pill{ font-size:10.5px; font-weight:700; padding:5px 10px; border-radius:100px; text-align:center; white-space:nowrap; }
.status-pill.active{ background:var(--success-bg); color:var(--success-ink); }
.status-pill.pending{ background:var(--pending-bg); color:var(--pending-ink); }
.status-pill.closed{ background:var(--closed-bg); color:var(--closed-ink); }
.case-row .date{ font-size:12px; color:var(--ink-700); text-align:right; }
.dash-side{ border-left:1px solid var(--line); padding:22px 18px; }
.dash-side h4{ font-family:'Archivo',sans-serif; font-size:12.5px; margin:0 0 14px; color:var(--ink-900); font-weight:700; }
.mini-chart{ display:flex; align-items:flex-end; gap:5px; height:64px; margin-bottom:22px; }
.mini-chart .mbar{ flex:1; border-radius:4px 4px 2px 2px; background:linear-gradient(180deg,#8a8c8f,#d3d4d5); transform-origin:bottom; }
.mini-chart .mbar.hi{ background:linear-gradient(180deg,var(--orange),#ffb98c); }
.upcoming-item{ display:flex; gap:10px; align-items:center; margin-bottom:13px; }
.upcoming-item:last-child{ margin-bottom:0; }
.date-chip{ width:36px;height:36px;border-radius:10px; background:#f2f3f4; display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:9px; font-weight:700; color:var(--ink-700); line-height:1.15; flex:0 0 auto; }
.date-chip strong{ font-size:13px; color:var(--ink-900); }
.upcoming-item span{ font-size:12px; color:var(--ink-700); font-weight:500; line-height:1.3; }
.live-badge{ display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:700; color:#e0512a; background:#fdece4; padding:5px 10px 5px 8px; border-radius:100px; margin-left:auto; }
.live-badge .dot{ width:6px;height:6px;border-radius:50%; background:#e0512a; animation:livePulse 1.4s ease-in-out infinite; }

@media (max-width: 720px){
  .dash-body{ grid-template-columns:48px 1fr; }
  .dash-side{ display:none; }
}
