:root{
  --navy:#102f57;
  --navy2:#0b2443;
  --blue:#1f5f9f;
  --gold:#c99a37;
  --gold2:#ead39b;
  --cream:#fbf6ea;
  --bg:#f6f8fb;
  --card:#ffffff;
  --ink:#172033;
  --muted:#667085;
  --line:#e6ebf2;
  --green:#137a4b;
  --red:#b42318;
  --shadow:0 18px 42px rgba(16,47,87,.10);
  --radius:26px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  color:var(--ink);
  background:linear-gradient(180deg,#ffffff 0%,var(--bg) 100%);
}
a{color:inherit;text-decoration:none}
button,input,textarea,select{font:inherit}
.app{display:grid;grid-template-columns:292px 1fr;min-height:100vh}
.sidebar{
  background:var(--navy);
  color:white;
  padding:24px 18px;
  position:sticky;
  top:0;
  height:100vh;
  border-right:5px solid var(--gold);
  overflow:auto;
}
.brand,.luxury-brand{display:flex;gap:12px;align-items:center;margin-bottom:24px}
.brand-mark{width:48px;height:48px}
.logo{
  width:48px;height:48px;border-radius:18px;
  background:var(--cream);
  color:var(--navy);
  display:grid;place-items:center;
  font-weight:950;
}
.brand h1{margin:0;color:#fff;font-size:24px;letter-spacing:-.04em}
.brand p{margin:4px 0 0;color:#dbe7f5;font-size:12px;font-weight:750}
.nav{display:grid;gap:9px}
.nav a{
  padding:13px 14px;
  border-radius:16px;
  color:#eef5ff;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:800;
  font-size:14px;
  border:1px solid rgba(255,255,255,.10);
}
.nav a:hover,.nav a.active{background:#fff;color:var(--navy)}
.sidebar-card{
  margin-top:20px;
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,.09);
  border:1px solid rgba(255,255,255,.16);
}
.sidebar-card strong{display:block;margin-bottom:7px;font-size:13px;color:#fff}
.sidebar-card p{margin:0;color:#dbe7f5;font-size:12px;line-height:1.5}
main{padding:28px}
.page-heading{
  background:#fff;
  border:1px solid var(--line);
  border-bottom:4px solid var(--gold);
  border-radius:28px;
  padding:21px 24px;
  margin-bottom:22px;
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  box-shadow:var(--shadow);
}
.eyebrow{
  display:inline-block;
  color:var(--navy);
  background:var(--cream);
  border:1px solid rgba(201,154,55,.30);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.04em;
  margin-bottom:8px;
}
.page-heading h2{margin:0;color:var(--navy);font-size:30px;letter-spacing:-.05em}
.page-heading p{margin:6px 0 0;color:var(--muted);font-size:14px;line-height:1.45}
.pill,.status-pill{
  display:inline-flex;align-items:center;gap:8px;
  padding:9px 13px;border-radius:999px;
  background:var(--cream);border:1px solid rgba(201,154,55,.28);
  color:var(--navy);font-size:13px;font-weight:900;
}
.grid{display:grid;gap:18px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:23px;
  box-shadow:var(--shadow);
}
.card h3{margin:0 0 8px;color:var(--navy);font-size:19px;letter-spacing:-.03em}
.card p{margin:0;color:var(--muted);font-size:14px;line-height:1.58}
.hero{
  background:var(--navy);
  border-radius:34px;
  padding:38px;
  color:white;
  position:relative;
  overflow:hidden;
  margin-bottom:20px;
  box-shadow:var(--shadow);
  border-bottom:6px solid var(--gold);
}
.hero:after{
  content:"";
  position:absolute;right:-70px;bottom:-80px;
  width:240px;height:240px;border-radius:50%;
  background:rgba(255,255,255,.08);
}
.hero h2{margin:0 0 14px;max-width:900px;font-size:42px;line-height:1.04;letter-spacing:-.06em}
.hero p{margin:0 0 24px;max-width:820px;color:#e5effa;font-size:17px;line-height:1.62}
.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.btn{
  border:0;border-radius:999px;
  padding:11px 16px;
  font-weight:900;
  cursor:pointer;
  background:var(--navy);
  color:#fff;
  display:inline-flex;align-items:center;justify-content:center;
}
.btn:hover{transform:translateY(-1px)}
.btn-light{background:#fff;color:var(--navy)}
.btn-soft{background:#eef4fb;color:var(--navy);border:1px solid #dce6f2}
.btn-gold{background:var(--gold);color:var(--navy);border:1px solid rgba(16,47,87,.18)}
.btn-small{padding:8px 12px;font-size:12px}
input,textarea,select{
  width:100%;
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px 13px;
  background:#fff;
  color:var(--ink);
}
textarea{min-height:92px;resize:vertical}
input:focus,textarea:focus,select:focus{outline:0;border-color:var(--blue);box-shadow:0 0 0 4px rgba(31,95,159,.10)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.form-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.form-full{grid-column:1/-1}
label{display:block;font-size:12px;font-weight:900;color:var(--muted);margin-bottom:6px;text-transform:uppercase;letter-spacing:.05em}
.checkline{display:flex;gap:9px;align-items:center;text-transform:none;letter-spacing:0;color:var(--muted);font-size:14px;font-weight:750}
.checkline input{width:auto}
.section-head,.module-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.badge{font-size:12px;font-weight:900;border-radius:999px;padding:7px 11px;white-space:nowrap}
.included{background:#eaf7f0;color:var(--green)}
.optional{background:#f2f4f7;color:var(--muted)}
table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--line);border-radius:20px;background:#fff;overflow:hidden}
th,td{text-align:left;padding:13px;border-bottom:1px solid var(--line);font-size:14px;vertical-align:top}
tr:last-child td{border-bottom:0}
th{background:#f8fafc;color:var(--navy);font-size:12px;text-transform:uppercase;letter-spacing:.055em}
tfoot th{background:var(--cream);color:var(--navy)}
.notice{
  background:var(--cream);
  border-left:5px solid var(--gold);
  border-radius:18px;
  padding:15px 16px;
  color:#65480d;
  font-size:14px;line-height:1.55;
}
.stat{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.stat .label{color:var(--muted);font-weight:850}
.stat .number{font-size:36px;font-weight:950;color:var(--navy);letter-spacing:-.06em;margin-top:8px}
.icon{width:44px;height:44px;border-radius:16px;display:grid;place-items:center;background:var(--cream);border:1px solid rgba(201,154,55,.24);color:var(--navy);font-weight:950}
.case-type-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px}
.case-type-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:15px;
  text-align:center;
}
.case-type-card span{display:block;color:var(--muted);font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}
.case-type-card strong{display:block;color:var(--navy);font-size:30px;line-height:1;font-weight:950}
.price-card{max-width:620px;margin:0 auto;text-align:center;padding:36px;border-radius:30px}
.price{font-size:62px;line-height:1;font-weight:950;letter-spacing:-.07em;color:var(--navy);margin:18px 0 4px}
.price span{font-size:18px;color:var(--muted);letter-spacing:0}
.feature-list{display:grid;gap:10px;margin:22px 0;text-align:left;color:var(--muted)}
.check{color:var(--green);font-weight:950}
.saved{margin-bottom:18px;padding:13px 15px;background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;border-radius:18px;font-weight:800}
.decrypt{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.doc-link{font-weight:900;color:var(--blue);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.edit-panel{margin-top:14px;padding:13px;border:1px solid var(--line);border-radius:20px;background:#fbfdff}
.edit-panel summary{cursor:pointer;font-weight:900;color:var(--navy)}
.module-card{display:flex;flex-direction:column;gap:9px}
.module-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px;padding:14px;border:1px solid var(--line);border-radius:18px;background:#fbfdff}
.mini-field{border:1px solid var(--line);border-radius:18px;padding:15px;background:#fbfdff}
.mini-field strong{display:block;color:var(--navy);font-size:12px;text-transform:uppercase;letter-spacing:.05em;margin-bottom:7px}
.mini-field span{color:var(--ink);font-weight:800}
.secure-card{border-bottom:5px solid var(--gold)}
.secure-reveal{margin-top:16px;border-radius:22px;padding:18px;border:1px solid var(--line);background:#fbfdff}
.secure-reveal.financial{background:#fffaf0;border-color:var(--gold2)}
.secure-reveal.health{background:#f0f7ff;border-color:#cfe5ff}
.secure-reveal pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;line-height:1.55}
.module-section{border:1px solid var(--line);border-radius:22px;padding:17px;background:#fbfdff}
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:22px;background:var(--navy)}
.login-card{max-width:500px;width:100%;background:#fff;border-bottom:5px solid var(--gold);border-radius:28px;padding:30px;box-shadow:0 25px 60px rgba(0,0,0,.22)}
.login-logo{width:60px;height:60px;margin-bottom:14px}
.login-card h1{color:var(--navy);letter-spacing:-.05em}
.error{background:#fff0ee;border:1px solid #fecaca;color:var(--red);padding:12px;border-radius:16px;margin:14px 0}
.success{background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;padding:12px;border-radius:16px;margin:14px 0}

/* ElderVisitor-style public page */
.landing-body{background:#fff;color:var(--ink)}
.landing-header{
  display:flex;justify-content:space-between;align-items:center;
  padding:18px 7vw;border-bottom:1px solid var(--line);background:#fff;
}
.landing-logo{display:flex;gap:12px;align-items:center;color:var(--navy);font-weight:950;font-size:24px}
.landing-logo img{width:46px;height:46px}
.landing-nav{display:flex;gap:22px;align-items:center;color:var(--navy);font-weight:800;font-size:14px}
.ev-hero{padding:58px 7vw 48px;background:linear-gradient(180deg,#fff,var(--bg));}
.ev-hero-grid{display:grid;grid-template-columns:1.03fr .97fr;gap:36px;align-items:center}
.ev-kicker{color:#7a5510;font-weight:950;margin-bottom:13px}
.ev-hero h1{font-size:46px;line-height:1.04;letter-spacing:-.06em;color:var(--navy);margin:0 0 16px}
.ev-hero p{color:var(--muted);font-size:18px;line-height:1.62;margin:0 0 24px;max-width:650px}
.ev-schedule-card{background:#fff;border:1px solid var(--line);border-radius:30px;padding:24px;box-shadow:var(--shadow);border-bottom:5px solid var(--gold)}
.ev-schedule-card h2{margin:0 0 4px;color:var(--navy)}
.ev-schedule-card p{font-size:14px;margin:0 0 16px;color:var(--muted)}
.ev-person{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:18px;margin:10px 0;background:#fbfdff}
.ev-person strong{display:block;color:var(--navy)}
.ev-person span{display:block;color:var(--muted);font-size:13px}
.ev-status{border-radius:999px;padding:7px 10px;font-weight:900;font-size:12px;background:var(--cream);color:#704f14;white-space:nowrap}
.ev-section{padding:48px 7vw}
.ev-section h2{text-align:center;color:var(--navy);font-size:34px;letter-spacing:-.05em;margin:0 0 12px}
.ev-section .sub{text-align:center;color:var(--muted);max-width:700px;margin:0 auto 28px;line-height:1.6}
.ev-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.ev-step{background:#fff;border:1px solid var(--line);border-radius:24px;padding:24px;box-shadow:var(--shadow)}
.ev-step .num{width:38px;height:38px;border-radius:14px;background:var(--gold);color:#201504;display:grid;place-items:center;font-weight:950;margin-bottom:14px}
.ev-step h3{margin:0 0 9px;color:var(--navy)}
.ev-status-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.ev-footer{background:var(--navy);color:#fff;padding:30px 7vw;text-align:center}
.ev-footer p{margin:0;color:#dbe7f5}

@media(max-width:1100px){
  .app{grid-template-columns:1fr}
  .sidebar{height:auto;position:relative}
  main{padding:18px}
  .grid-2,.grid-3,.form-grid,.form-grid-3{grid-template-columns:1fr}
  .page-heading,.section-head,.module-top{display:block}
  .hero h2,.ev-hero h1{font-size:36px}
  .case-type-grid{grid-template-columns:repeat(2,1fr)}
  .module-check-grid{grid-template-columns:1fr}
  .ev-hero-grid,.ev-steps{grid-template-columns:1fr}
  .ev-status-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:720px){
  .landing-nav{display:none}
  .case-type-grid,.ev-status-grid{grid-template-columns:1fr}
}


.simple-chart{
  height:210px;
  display:flex;
  align-items:flex-end;
  gap:14px;
  padding:22px 10px 8px;
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(180deg,#fff,#fbfdff);
}
.simple-chart div{
  flex:1;
  min-height:28px;
  border-radius:14px 14px 6px 6px;
  background:linear-gradient(180deg,var(--gold),#f0d99d);
  position:relative;
}
.simple-chart span{
  position:absolute;
  bottom:-24px;
  left:50%;
  transform:translateX(-50%);
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}


/* Separate pricing page */
.pricing-page{
  padding-top:54px;
}
.pricing-intro{
  max-width:850px;
  margin:0 auto 34px;
  text-align:center;
}
.pricing-logo{
  width:78px;
  height:78px;
  margin-bottom:14px;
}
.pricing-intro h1{
  margin:0 0 12px;
  color:var(--navy);
  font-family:Georgia, "Times New Roman", serif;
  font-size:46px;
  line-height:1.06;
  letter-spacing:-.035em;
}
.pricing-intro p{
  margin:0 auto;
  max-width:720px;
  color:var(--muted);
  font-size:17px;
  line-height:1.65;
}
.pricing-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:28px;
  max-width:1000px;
  margin:0 auto 28px;
}
.pricing-card{
  background:#fff;
  border:1px solid rgba(201,154,55,.30);
  border-radius:30px;
  padding:34px;
  box-shadow:var(--shadow);
  text-align:center;
}
.pricing-card.featured{
  border-bottom:6px solid var(--gold);
}
.pricing-icon{
  width:74px;
  height:74px;
  border-radius:50%;
  display:grid;
  place-items:center;
  margin:0 auto 18px;
  background:var(--cream);
}
.pricing-icon img{
  width:58px;
  height:58px;
}
.staff-icon{
  color:var(--navy);
  font-size:30px;
  font-weight:950;
  border:1px solid rgba(201,154,55,.30);
}
.pricing-card h2{
  margin:0 0 12px;
  color:var(--navy);
  font-family:Georgia, "Times New Roman", serif;
  font-size:32px;
}
.pricing-price{
  color:var(--navy);
  font-family:Georgia, "Times New Roman", serif;
  font-size:64px;
  line-height:1;
  letter-spacing:-.05em;
}
.pricing-term{
  color:var(--muted);
  margin:8px 0 20px;
  font-weight:800;
}
.pricing-card ul{
  list-style:none;
  padding:0;
  margin:0 0 26px;
  text-align:left;
  display:grid;
  gap:12px;
  color:var(--ink);
}
.pricing-card li{
  position:relative;
  padding-left:28px;
}
.pricing-card li:before{
  content:"✓";
  position:absolute;
  left:0;
  top:0;
  color:var(--navy);
  font-weight:950;
}
.pricing-note{
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:28px;
  padding:26px;
  box-shadow:var(--shadow);
}
.pricing-note h3{
  margin:0 0 8px;
  color:var(--navy);
}
.pricing-note p{
  margin:0;
  color:var(--muted);
  line-height:1.58;
}
@media(max-width:900px){
  .pricing-grid,
  .pricing-note{
    grid-template-columns:1fr;
  }
  .pricing-intro h1{
    font-size:36px;
  }
}


/* Refined blue/gold borders and mobile improvements */
.landing-body{
  border-top:3px solid var(--gold);
}
.landing-header{
  border-bottom:2px solid rgba(201,154,55,.28);
  box-shadow:0 8px 28px rgba(16,47,87,.06);
}
.ev-hero{
  border-bottom:1px solid rgba(201,154,55,.22);
}
.ev-schedule-card,
.ev-step,
.pricing-card,
.pricing-note,
.card{
  border-color:rgba(16,47,87,.13);
}
.ev-schedule-card,
.pricing-card.featured,
.hero{
  border-bottom-color:var(--navy);
}
.ev-step{
  border-top:3px solid rgba(201,154,55,.28);
}
.ev-final-cta .ev-schedule-card{
  border-top:3px solid var(--gold);
}
.app main{
  min-width:0;
}
table{
  display:block;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
table thead,
table tbody,
table tfoot{
  min-width:760px;
}
img,svg{
  max-width:100%;
}
.landing-logo img{
  flex:0 0 auto;
}
.landing-nav{
  flex-wrap:wrap;
  justify-content:flex-end;
}
.ev-hero-grid,
.pricing-grid,
.pricing-note,
.ev-steps,
.ev-status-grid{
  min-width:0;
}

/* Projected vs actual revenue chart */
.revenue-line-card{
  width:100%;
  border:1px solid rgba(16,47,87,.14);
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff,#fbfdff);
  padding:16px 16px 8px;
  overflow:hidden;
}
.revenue-legend{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  align-items:center;
  color:var(--muted);
  font-size:13px;
  font-weight:850;
  margin-bottom:8px;
}
.revenue-legend i{
  width:10px;
  height:10px;
  display:inline-block;
  border-radius:50%;
  margin-right:6px;
  vertical-align:middle;
}
.actual-dot{background:var(--navy)}
.projected-dot{background:var(--gold)}
.revenue-line-chart{
  width:100%;
  height:250px;
  display:block;
}
.chart-axis{
  stroke:#dce5ef;
  stroke-width:2;
}
.actual-line{
  fill:none;
  stroke:var(--navy);
  stroke-width:5;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.projected-line{
  fill:none;
  stroke:var(--gold);
  stroke-width:5;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray:10 8;
}
.actual-point{
  fill:var(--navy);
  stroke:#fff;
  stroke-width:2;
}
.projected-point{
  fill:var(--gold);
  stroke:#fff;
  stroke-width:2;
}
.chart-label{
  fill:var(--muted);
  font-size:13px;
  font-weight:800;
}
.public-chart{
  margin-top:10px;
}

/* Strong small-screen support for different phone browsers */
@media(max-width:760px){
  body{
    overflow-x:hidden;
  }
  .landing-header{
    padding:14px 18px;
    display:block;
  }
  .landing-logo{
    justify-content:center;
    font-size:24px;
    margin-bottom:12px;
  }
  .landing-logo img{
    width:52px;
    height:52px;
  }
  .landing-nav{
    display:flex;
    justify-content:center;
    gap:8px;
  }
  .landing-nav a{
    padding:8px 10px;
    border:1px solid rgba(16,47,87,.12);
    border-radius:999px;
    font-size:13px;
    background:#fff;
  }
  .landing-nav .btn{
    width:100%;
    max-width:260px;
    margin-top:4px;
  }
  .ev-hero,
  .ev-section{
    padding-left:16px;
    padding-right:16px;
  }
  .ev-hero h1{
    font-size:34px;
  }
  .ev-hero p{
    font-size:16px;
  }
  .actions .btn,
  .actions a.btn{
    width:100%;
  }
  .ev-person{
    display:block;
  }
  .ev-status{
    display:inline-flex;
    margin-top:10px;
  }
  .page-heading{
    padding:18px;
    border-radius:22px;
  }
  .page-heading h2{
    font-size:25px;
  }
  main{
    padding:14px;
  }
  .sidebar{
    padding:18px 14px;
  }
  .nav{
    grid-template-columns:1fr 1fr;
  }
  .nav a{
    font-size:13px;
    padding:11px 10px;
  }
  .grid,
  .grid-2,
  .grid-3,
  .form-grid,
  .form-grid-3,
  .pricing-grid,
  .pricing-note,
  .ev-steps,
  .ev-status-grid{
    grid-template-columns:1fr !important;
  }
  .card,
  .hero,
  .ev-schedule-card,
  .ev-step,
  .pricing-card{
    border-radius:22px;
    padding:18px;
  }
  .hero h2{
    font-size:31px;
  }
  .case-type-grid{
    grid-template-columns:1fr 1fr;
  }
  .revenue-line-card{
    padding:12px 8px 4px;
  }
  .revenue-line-chart{
    height:220px;
  }
  .pricing-intro h1{
    font-size:34px;
  }
  .pricing-price{
    font-size:54px;
  }
}
@media(max-width:420px){
  .landing-nav a{
    font-size:12px;
    padding:7px 9px;
  }
  .case-type-grid{
    grid-template-columns:1fr;
  }
  .brand h1{
    font-size:22px;
  }
  .nav{
    grid-template-columns:1fr;
  }
  .revenue-legend{
    font-size:12px;
    gap:10px;
  }
}


/* Calendar, email integrations, and revenue module */
.calendar-embed-wrap{
  border:1px solid rgba(16,47,87,.14);
  border-radius:22px;
  overflow:hidden;
  background:#fff;
  min-height:360px;
}
.calendar-embed-wrap iframe{
  display:block;
  min-height:420px;
}
.muted{
  color:var(--muted);
}
.integration-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
code{
  display:inline-block;
  max-width:100%;
  overflow-wrap:anywhere;
  background:#f7fafc;
  border:1px solid var(--line);
  border-radius:12px;
  padding:8px 10px;
  color:var(--navy);
}
@media(max-width:760px){
  .calendar-embed-wrap iframe{
    height:360px;
  }
  .integration-grid{
    grid-template-columns:1fr;
  }
}


/* Document framed viewer */
.document-frame-card{
  padding:18px;
}
.document-frame-wrap{
  border:1px solid rgba(16,47,87,.18);
  border-radius:22px;
  overflow:hidden;
  background:#f8fafc;
  min-height:70vh;
}
.document-frame-wrap iframe{
  width:100%;
  height:72vh;
  border:0;
  display:block;
  background:#fff;
}

/* Harvest Billing */
.harvest-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
@media(max-width:760px){
  .document-frame-wrap{
    min-height:62vh;
  }
  .document-frame-wrap iframe{
    height:64vh;
  }
  .harvest-summary-grid{
    grid-template-columns:1fr;
  }
}


/* Owner-only module field builder */
.owner-only-editor{
  border-top:4px solid var(--gold);
}
.module-field-builder{
  border:1px solid rgba(16,47,87,.14);
  border-radius:22px;
  padding:18px;
  background:#fbfdff;
}
.field-builder-table{
  display:grid;
  gap:10px;
}
.field-builder-head,
.field-builder-row{
  display:grid;
  grid-template-columns:1.1fr 1fr .7fr 1.2fr auto;
  gap:10px;
  align-items:start;
}
.field-builder-head{
  color:var(--navy);
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding:0 4px;
}
.field-builder-row{
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  background:#fff;
}
.field-builder-row textarea{
  min-height:46px;
}
@media(max-width:900px){
  .field-builder-head{
    display:none;
  }
  .field-builder-row{
    grid-template-columns:1fr;
  }
  .field-builder-row .btn{
    width:100%;
  }
}


/* Public index sample revenue bar chart */
.sample-bar-card{
  border:1px solid rgba(16,47,87,.14);
  border-radius:22px;
  background:#fff;
  padding:16px;
}
.sample-bar-chart{
  height:245px;
  display:flex;
  align-items:flex-end;
  gap:14px;
  padding:20px 8px 34px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fbfdff;
}
.sample-bar{
  flex:1;
  min-height:46px;
  border-radius:16px 16px 7px 7px;
  background:linear-gradient(180deg,var(--gold),#f1dc9f);
  position:relative;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding-top:10px;
  color:#1b1204;
  font-weight:950;
  box-shadow:0 10px 22px rgba(16,47,87,.08);
}
.sample-bar strong{
  font-size:12px;
}
.sample-bar span{
  position:absolute;
  bottom:-26px;
  left:50%;
  transform:translateX(-50%);
  color:var(--muted);
  font-size:12px;
  font-weight:850;
}
@media(max-width:760px){
  .sample-bar-chart{
    gap:8px;
    height:220px;
    padding-left:6px;
    padding-right:6px;
  }
  .sample-bar strong{
    writing-mode:vertical-rl;
    transform:rotate(180deg);
    font-size:11px;
  }
}


/* Owner subscriber/staff management */
.text-only-logo{
  font-family:Georgia,"Times New Roman",serif;
  letter-spacing:-.03em;
}
.text-only-logo span{
  font-size:30px;
  color:var(--navy);
}
.stacked-actions{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:center;
  margin:0 0 8px;
}
@media(max-width:760px){
  .stacked-actions{
    grid-template-columns:1fr;
  }
}


/* Owner private directory and topbar logout */
.page-heading-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.logout-top{
  white-space:nowrap;
}
@media(max-width:760px){
  .page-heading-actions{
    justify-content:flex-start;
    width:100%;
  }
}


/* Billing edit, payments, projections */
.payment-mini-form{
  display:grid;
  grid-template-columns:minmax(120px,1fr) minmax(100px,1fr) minmax(90px,1fr) auto;
  gap:8px;
  min-width:520px;
}
.mini-projection-form{
  display:grid;
  grid-template-columns:80px 110px 110px auto;
  gap:8px;
  min-width:430px;
}
.payment-mini-form input,
.mini-projection-form input{
  padding:9px 10px;
  border-radius:12px;
}
@media(max-width:760px){
  .payment-mini-form,
  .mini-projection-form{
    grid-template-columns:1fr;
    min-width:0;
  }
}


/* Search/sort and request support improvements */
.form-grid-3 .btn,
.payment-mini-form .btn{
  align-self:end;
}
.support-request-card{
  border-top:4px solid var(--gold);
}
.actions form{
  display:inline-block;
}
.case-type-card strong{
  font-variant-numeric:tabular-nums;
}
@media(max-width:760px){
  .actions form{
    display:block;
    margin-top:6px;
  }
}


/* Prominent support request buttons */
.sidebar-support-btn{
  display:block;
  text-align:center;
  margin-top:12px;
  width:100%;
}
.page-heading-support-btn,
.module-support-btn{
  white-space:nowrap;
}
@media(max-width:760px){
  .page-heading-support-btn,
  .module-support-btn,
  .logout-top{
    width:100%;
    text-align:center;
  }
}


/* Owner access module */
.owner-only-editor table .stacked-actions{
  min-width:260px;
}
.owner-only-editor .badge{
  white-space:nowrap;
}


/* Cleaner module areas */
.module-directory-header{
  border-top:4px solid var(--navy);
}
.add-module-panel{
  border-top:4px solid var(--gold);
}
.add-module-panel > summary,
.owner-module-tools > summary,
.module-report-panel > summary{
  cursor:pointer;
  font-weight:950;
  color:var(--navy);
  list-style:none;
}
.add-module-panel > summary::-webkit-details-marker,
.owner-module-tools > summary::-webkit-details-marker,
.module-report-panel > summary::-webkit-details-marker{
  display:none;
}
.add-module-panel > summary::after,
.owner-module-tools > summary::after,
.module-report-panel > summary::after{
  content:" +";
  color:var(--navy);
}
.add-module-panel[open] > summary::after,
.owner-module-tools[open] > summary::after,
.module-report-panel[open] > summary::after{
  content:" –";
}
.module-card{
  display:flex;
  flex-direction:column;
  gap:16px;
  min-height:240px;
  border:1px solid rgba(16,47,87,.16);
  box-shadow:0 12px 28px rgba(16,47,87,.07);
}
.module-card .module-top{
  align-items:flex-start;
  gap:12px;
}
.module-card h3{
  margin-bottom:8px;
}
.module-card p{
  line-height:1.55;
  color:var(--muted);
}
.module-card > .actions{
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.owner-module-tools{
  border-top:1px solid var(--line);
  padding-top:12px;
}
.owner-tools-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  padding-top:12px;
}
.owner-tools-actions form{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:0;
}
.compact-check{
  margin:0;
  min-height:auto;
}
.module-instructions-card{
  border-left:5px solid var(--gold);
}
.module-entry-form-card{
  border-left:5px solid rgba(16,47,87,.30);
}
.module-report-panel{
  border-left:5px solid var(--navy);
}
.module-records-card{
  border-top:4px solid var(--gold);
}
.module-search-toolbar{
  background:#fbfdff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:16px;
}
.module-records-card table{
  font-size:14px;
}
.module-records-card td,
.module-records-card th{
  vertical-align:top;
}
@media(max-width:900px){
  .module-card{
    min-height:auto;
  }
  .owner-tools-actions,
  .owner-tools-actions form{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }
  .owner-tools-actions .btn,
  .module-card .actions .btn{
    width:100%;
    text-align:center;
  }
}


/* Very compact module cards and fixed module reports */
.module-card-compact{
  min-height:0 !important;
  padding:18px !important;
  gap:12px !important;
}
.module-card-compact .module-top{
  min-height:42px;
}
.module-card-compact h3{
  font-size:18px;
  line-height:1.2;
  margin:0;
}
.module-card-compact p,
.module-card-compact .module-mini-desc{
  display:none !important;
}
.module-card-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding-top:10px;
  border-top:1px solid var(--line);
}
.module-report-mini{
  position:relative;
}
.module-report-mini > summary{
  cursor:pointer;
  font-weight:900;
  color:var(--navy);
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  list-style:none;
}
.module-report-mini > summary::-webkit-details-marker{
  display:none;
}
.module-report-mini .report-actions{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.owner-module-tools > summary{
  font-size:13px;
}
.module-directory-header .section-head p{
  max-width:440px;
}
@media(max-width:900px){
  .module-card-actions,
  .module-report-mini .report-actions{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }
  .module-card-actions .btn,
  .module-report-mini summary{
    width:100%;
    text-align:center;
  }
}


/* Regular billing registry */
.billing-registry-header{
  border-top:4px solid var(--gold);
}
.billing-stat-grid .stat{
  min-height:118px;
}
.billing-stat-grid .number{
  font-variant-numeric:tabular-nums;
}


/* Case and fiduciary revenue charts */
.revenue-chart-grid{
  align-items:stretch;
}
.case-revenue-card{
  overflow:hidden;
}
.compact-revenue-chart{
  margin-top:12px;
}
.mini-stat-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:12px 0;
  font-size:13px;
  color:var(--muted);
}
.mini-stat-row strong{
  color:var(--navy);
}
@media(max-width:900px){
  .mini-stat-row{
    display:grid;
    grid-template-columns:1fr;
  }
}


/* Owner branding controls and shield logo */
.brand-mark-inline,
.brand-mark-custom{
  width:52px;
  height:52px;
  flex:0 0 52px;
  object-fit:contain;
  display:block;
}
.brand-preview{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.72);
}
.brand-preview strong{
  display:block;
  color:var(--ink);
  font-size:18px;
}
.brand-preview span{
  display:block;
  color:var(--muted);
  font-size:13px;
}
.owner-only-editor input[type="color"]{
  height:46px;
  padding:4px;
}
.landing-logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  color:var(--navy);
}
.landing-logo-mark{
  width:44px;
  height:44px;
  flex:0 0 44px;
}


/* Shield-only FidMG logo */
.brand-shield-only{
  justify-content:center;
  padding:8px 0 18px;
}
.brand-shield-only .brand-mark,
.brand-shield-only .brand-mark-inline,
.brand-shield-only .brand-mark-custom{
  width:72px;
  height:72px;
  flex:0 0 72px;
}
.login-logo-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:0 auto 14px;
}
.login-logo-wrap .brand-mark,
.login-logo-wrap .brand-mark-inline,
.login-logo-wrap .brand-mark-custom{
  width:88px;
  height:88px;
  display:block;
}
.landing-logo-shield-only{
  width:58px;
  height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.landing-logo-shield-only .brand-mark,
.landing-logo-shield-only .brand-mark-inline{
  width:58px;
  height:58px;
  display:block;
}
.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}


/* Billing rates, hours, and task controls */
.billing-stat-grid{
  align-items:stretch;
}
.billing-form .billing-hours-custom{
  transition:all .15s ease;
}
.owner-rate-note{
  font-size:13px;
  color:var(--muted);
}
td .actions form{
  display:inline-block;
}
.billing-form select,
.billing-form input,
.billing-form textarea{
  min-height:44px;
}


/* Backup module */
.danger-zone{
  border-color:rgba(198, 40, 40, .35);
  box-shadow:0 20px 50px rgba(198,40,40,.08);
}
.checkline{
  display:flex;
  gap:8px;
  align-items:center;
  font-weight:600;
  color:var(--ink);
}
.backup-code{
  overflow:auto;
  max-width:100%;
}


/* Finder-style document folders */
.finder-toolbar{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  padding:12px 14px;
  border:1px solid rgba(16,47,87,.14);
  border-radius:16px;
  background:linear-gradient(180deg, #ffffff, #f7f9fc);
  margin-bottom:18px;
}
.finder-path{
  font-weight:800;
  color:var(--navy);
}
.finder-summary{
  color:var(--muted);
  font-size:.92rem;
}
.finder-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(170px, 1fr));
  gap:18px;
}
.finder-folder{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  min-height:168px;
  padding:18px 14px;
  border:1px solid rgba(16,47,87,.12);
  border-radius:20px;
  background:#fff;
  color:var(--ink);
  text-align:center;
  text-decoration:none;
  box-shadow:0 14px 34px rgba(16,47,87,.08);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.finder-folder:hover,
.finder-folder.open{
  transform:translateY(-2px);
  border-color:var(--navy);
  box-shadow:0 20px 45px rgba(16,47,87,.14);
}
.folder-icon{
  width:86px;
  height:62px;
  position:relative;
  display:block;
  margin-bottom:13px;
  border-radius:8px 12px 12px 12px;
  background:linear-gradient(180deg, #f6c861 0%, #dca83e 100%);
  box-shadow:inset 0 -8px 0 rgba(112,75,10,.12), 0 10px 18px rgba(201,154,55,.22);
}
.folder-icon:before{
  content:"";
  position:absolute;
  left:8px;
  top:-10px;
  width:36px;
  height:18px;
  border-radius:8px 8px 0 0;
  background:linear-gradient(180deg, #ffe199 0%, #e4b24d 100%);
}
.finder-folder.unfiled .folder-icon{
  background:linear-gradient(180deg, #dce4ef 0%, #b8c4d3 100%);
  box-shadow:inset 0 -8px 0 rgba(16,47,87,.10), 0 10px 18px rgba(16,47,87,.12);
}
.finder-folder.unfiled .folder-icon:before{
  background:linear-gradient(180deg, #edf2f7 0%, #cbd5e1 100%);
}
.folder-title{
  font-weight:900;
  color:var(--navy);
  line-height:1.15;
  margin-bottom:5px;
}
.folder-meta{
  color:var(--muted);
  font-size:.82rem;
  line-height:1.25;
}
.folder-count{
  margin-top:9px;
  font-size:.82rem;
  color:var(--navy);
  font-weight:800;
  background:rgba(201,154,55,.16);
  border:1px solid rgba(201,154,55,.22);
  border-radius:999px;
  padding:4px 9px;
}
.finder-file-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.finder-file-row{
  display:grid;
  grid-template-columns:64px minmax(220px, 1fr) minmax(140px, 210px) auto;
  gap:14px;
  align-items:center;
  border:1px solid rgba(16,47,87,.12);
  border-radius:18px;
  padding:13px;
  background:#fff;
  box-shadow:0 10px 24px rgba(16,47,87,.06);
}
.file-icon{
  width:52px;
  height:60px;
  border-radius:10px;
  background:linear-gradient(180deg, #fdfdfd, #e8edf4);
  border:1px solid rgba(16,47,87,.12);
  color:var(--navy);
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.78rem;
  box-shadow:inset 0 -6px 0 rgba(16,47,87,.05);
}
.file-title{
  color:var(--navy);
  font-weight:900;
}
.file-subtitle{
  color:var(--muted);
  font-size:.9rem;
  margin-top:2px;
}
.file-notes{
  color:var(--ink);
  font-size:.88rem;
  margin-top:5px;
}
.file-meta{
  display:flex;
  flex-direction:column;
  gap:5px;
  color:var(--muted);
  font-size:.86rem;
}
.file-actions{
  justify-content:flex-end;
}
@media (max-width: 820px){
  .finder-toolbar{align-items:flex-start; flex-direction:column;}
  .finder-file-row{grid-template-columns:52px 1fr; align-items:start;}
  .file-meta,.file-actions{grid-column:2;}
  .file-actions{justify-content:flex-start;}
}


/* Case-by-case tabbed document folder tree */
.case-folder-toolbar{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  padding:12px 14px;
  border:1px solid rgba(16,47,87,.14);
  border-radius:16px;
  background:#fff;
  margin-bottom:18px;
}
.case-folder-path{
  font-weight:900;
  color:var(--navy);
}
.case-folder-tree{
  display:flex;
  flex-direction:column;
  gap:18px;
}
.case-folder-group{
  border:1px solid rgba(16,47,87,.14);
  border-radius:20px;
  background:#fff;
  box-shadow:0 14px 34px rgba(16,47,87,.07);
  overflow:hidden;
}
.case-folder-heading{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  padding:16px 18px;
  background:linear-gradient(180deg, rgba(16,47,87,.07), rgba(16,47,87,.03));
  border-bottom:1px solid rgba(16,47,87,.10);
}
.case-folder-title{
  color:var(--navy);
  font-weight:900;
  font-size:1.05rem;
}
.case-folder-subtitle{
  color:var(--muted);
  font-size:.9rem;
  margin-top:2px;
}
.case-folder-count{
  white-space:nowrap;
  color:var(--navy);
  font-weight:800;
  background:rgba(201,154,55,.17);
  border:1px solid rgba(201,154,55,.25);
  border-radius:999px;
  padding:6px 10px;
}
.case-folder-rows{
  padding:10px 14px 14px;
}
.case-folder-row{
  display:grid;
  grid-template-columns:30px minmax(220px, 1fr) auto;
  align-items:center;
  gap:10px;
  min-height:52px;
  padding:9px 12px;
  margin-top:7px;
  text-decoration:none;
  color:var(--ink);
  border:1px solid transparent;
  border-radius:14px;
  background:#fff;
  transition:background .14s ease, border-color .14s ease, transform .14s ease;
}
.case-folder-row:hover,
.case-folder-row.open{
  border-color:rgba(201,154,55,.55);
  background:rgba(201,154,55,.08);
  transform:translateX(2px);
}
.case-folder-row.level-1{
  margin-left:34px;
  grid-template-columns:24px 30px minmax(180px, 1fr) auto;
}
.tree-elbow{
  color:var(--navy);
  font-weight:900;
  text-align:center;
}
.mini-folder-icon{
  width:28px;
  height:20px;
  display:block;
  position:relative;
  border-radius:4px 6px 6px 6px;
  background:linear-gradient(180deg, #f6c861, #dca83e);
  box-shadow:inset 0 -4px 0 rgba(112,75,10,.12);
}
.mini-folder-icon:before{
  content:"";
  position:absolute;
  left:3px;
  top:-5px;
  width:13px;
  height:8px;
  border-radius:4px 4px 0 0;
  background:linear-gradient(180deg, #ffe199, #e4b24d);
}
.mini-folder-icon.gray{
  background:linear-gradient(180deg, #dce4ef, #b8c4d3);
}
.mini-folder-icon.gray:before{
  background:linear-gradient(180deg, #edf2f7, #cbd5e1);
}
.folder-row-main{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.folder-row-name{
  color:var(--navy);
  font-weight:900;
}
.folder-row-topic{
  color:var(--muted);
  font-size:.86rem;
  margin-top:2px;
}
.folder-row-count{
  color:var(--muted);
  font-size:.86rem;
  white-space:nowrap;
}
.case-folder-empty{
  margin:10px 0 0;
  padding:12px 14px;
  color:var(--muted);
  border:1px dashed rgba(16,47,87,.18);
  border-radius:14px;
  background:rgba(16,47,87,.025);
}
.unfiled-group .case-folder-heading{
  background:linear-gradient(180deg, rgba(102,112,133,.08), rgba(102,112,133,.03));
}
@media (max-width: 760px){
  .case-folder-toolbar,
  .case-folder-heading{
    align-items:flex-start;
    flex-direction:column;
  }
  .case-folder-row,
  .case-folder-row.level-1{
    grid-template-columns:30px 1fr;
    margin-left:0;
  }
  .case-folder-row.level-1 .tree-elbow{
    display:none;
  }
  .folder-row-count{
    grid-column:2;
  }
}


/* Compact row layout for All Documents / open folder documents */
.document-row-panel .section-head{
  align-items:flex-start;
}
.document-row-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.document-row{
  display:grid;
  grid-template-columns:minmax(230px, 1.2fr) minmax(210px, 1fr) minmax(135px, .6fr) auto;
  gap:14px;
  align-items:center;
  padding:12px 14px;
  border:1px solid rgba(16,47,87,.12);
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 18px rgba(16,47,87,.045);
}
.document-row-header{
  background:rgba(16,47,87,.06);
  color:var(--navy);
  font-weight:900;
  box-shadow:none;
  border-color:rgba(16,47,87,.10);
}
.document-row > div{
  min-width:0;
}
.document-row strong{
  display:block;
  color:var(--navy);
  font-weight:900;
  line-height:1.2;
}
.document-row span,
.document-row small{
  display:block;
  color:var(--muted);
  font-size:.88rem;
  line-height:1.25;
  margin-top:2px;
}
.doc-row-notes{
  color:var(--ink) !important;
  margin-top:5px !important;
}
.document-row-actions{
  justify-content:flex-end;
  flex-wrap:wrap;
}
.document-row-actions form{
  display:inline-flex;
}
@media (max-width: 900px){
  .document-row,
  .document-row-header{
    grid-template-columns:1fr;
    align-items:start;
  }
  .document-row-header{
    display:none;
  }
  .document-row-actions{
    justify-content:flex-start;
  }
}


/* Requested document row order: Date, Case, Document, Folder, View, Download, Edit, Delete */
.document-row-eight{
  grid-template-columns: minmax(125px,.8fr) minmax(170px,1fr) minmax(240px,1.4fr) minmax(150px,.9fr) auto auto auto auto;
}
.document-row-eight > div{
  min-width:0;
}
.document-row-eight form{
  display:inline-flex;
}
@media (max-width: 1050px){
  .document-row-eight,
  .document-row-header.document-row-eight{
    grid-template-columns:1fr;
    align-items:start;
  }
  .document-row-header.document-row-eight{
    display:none;
  }
}


/* Clickable folder/subfolder links feeding the Document Register */
.case-folder-row.open{
  outline:2px solid rgba(201,154,55,.55);
  outline-offset:2px;
}
.folder-link{
  color:var(--navy);
  font-weight:900;
  text-decoration:none;
  border-bottom:1px solid rgba(201,154,55,.55);
}
.folder-link:hover{
  color:#6f4d10;
  border-bottom-color:var(--navy);
}
.muted-link{
  color:var(--muted);
}


/* Grouped sidebar menu */
.nav-grouped{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.nav-section{
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  overflow:hidden;
  background:rgba(255,255,255,.035);
}
.nav-section summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 13px;
  color:var(--navy);
  font-weight:900;
  letter-spacing:.02em;
}
.nav-section summary::-webkit-details-marker{
  display:none;
}
.nav-section-links{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:0 7px 8px;
}
.nav-section-links a{
  margin:0 !important;
}
.nav-section:not([open]) summary span{
  transform:rotate(-90deg);
}
.logout-link{
  margin-top:8px !important;
}


/* Stronger grouped menu colors and indentation */
.nav-section summary{
  color:var(--navy) !important;
  font-weight:900;
  padding:11px 14px;
}
.nav-section-links a{
  color:#ffffff !important;
  padding-left:18px !important;
  border-left:2px solid rgba(217,170,67,.25);
}
.nav-section-links a.nav-subitem{
  padding-left:34px !important;
  font-size:.94rem;
  border-left:2px solid rgba(217,170,67,.65);
  position:relative;
}
.nav-section-links a.nav-subitem:before{
  content:"↳";
  color:var(--navy);
  margin-right:7px;
  font-weight:900;
}
.nav-section-links a.active{
  color:#ffffff !important;
  background:rgba(217,170,67,.20) !important;
  border-color:var(--navy);
}

/* Client subtabs */
.client-tabbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 18px;
  padding:10px;
  border:1px solid rgba(16,47,87,.12);
  border-radius:18px;
  background:#fff;
  box-shadow:0 10px 24px rgba(16,47,87,.05);
}
.client-tabbar a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  text-decoration:none;
  color:var(--navy);
  font-weight:900;
  border:1px solid rgba(16,47,87,.14);
  border-radius:999px;
  padding:9px 14px;
  background:#fff;
}
.client-tabbar a.active{
  color:#fff;
  background:var(--navy);
  border-color:var(--navy);
  box-shadow:0 8px 18px rgba(16,47,87,.12);
}
.client-tabbar a:not(:first-child){
  margin-left:8px;
}
.client-tabbar a:not(:first-child):before{
  content:"↳";
  color:var(--navy);
  font-weight:900;
}


/* Owner Menu Layout module */
.menu-user-picker .notice{
  min-height:42px;
}
.menu-layout-builder{
  overflow:hidden;
}
.menu-layout-actions{
  margin-top:18px;
}
.menu-reset-form{
  margin-top:12px;
}
.menu-nesting-tabs{
  border:1px solid rgba(16,47,87,.12);
  border-radius:18px;
  background:#fff;
  padding:12px;
}
.menu-tab-radio{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.menu-tab-labels{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:14px;
  border-bottom:1px solid rgba(16,47,87,.12);
  padding-bottom:10px;
}
.menu-tab-labels label{
  cursor:pointer;
  border:1px solid rgba(16,47,87,.15);
  border-radius:999px;
  padding:9px 15px;
  font-weight:900;
  color:var(--navy);
  background:#fff;
}
#menu-tab-work:checked ~ .menu-tab-labels label[for="menu-tab-work"],
#menu-tab-money:checked ~ .menu-tab-labels label[for="menu-tab-money"],
#menu-tab-team:checked ~ .menu-tab-labels label[for="menu-tab-team"],
#menu-tab-admin:checked ~ .menu-tab-labels label[for="menu-tab-admin"]{
  background:var(--navy);
  color:#fff;
  border-color:var(--navy);
  box-shadow:0 8px 18px rgba(16,47,87,.12);
}
.menu-tab-panel{
  display:none;
}
#menu-tab-work:checked ~ .menu-tab-panels .menu-panel-work,
#menu-tab-money:checked ~ .menu-tab-panels .menu-panel-money,
#menu-tab-team:checked ~ .menu-tab-panels .menu-panel-team,
#menu-tab-admin:checked ~ .menu-tab-panels .menu-panel-admin{
  display:block;
}
.menu-tab-panel-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  margin-bottom:12px;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(16,47,87,.05);
}
.menu-tab-panel-head strong{
  color:var(--navy);
  font-size:1rem;
}
.menu-tab-panel-head span{
  color:var(--muted);
  font-size:.9rem;
}
.menu-layout-grid{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.menu-layout-row{
  display:grid;
  grid-template-columns:90px minmax(180px,1fr) minmax(140px,.7fr) 110px 120px;
  gap:12px;
  align-items:end;
  padding:12px;
  border:1px solid rgba(16,47,87,.12);
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 18px rgba(16,47,87,.04);
}
.menu-layout-row label{
  font-size:.8rem;
}
.menu-show{
  display:flex !important;
  align-items:center;
  gap:8px;
  color:var(--navy);
  font-weight:900;
  padding-bottom:9px;
}
.menu-key{
  color:var(--muted);
  font-size:.82rem;
  padding-bottom:10px;
  word-break:break-word;
}
@media (max-width: 900px){
  .menu-layout-row{
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .menu-show,.menu-key{
    padding-bottom:0;
  }
  .menu-tab-panel-head{
    flex-direction:column;
    align-items:flex-start;
  }
}


/* Cleaner organized menu + compact billing entry */
.sidebar{
  overflow-y:auto;
}
.nav-grouped{
  gap:10px;
}
.nav-section{
  border:1px solid rgba(217,170,67,.22) !important;
  border-radius:16px !important;
  background:rgba(255,255,255,.04) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.nav-section summary{
  color:var(--navy) !important;
  font-weight:900 !important;
  letter-spacing:.03em;
  text-transform:uppercase;
  font-size:.86rem;
  padding:11px 14px !important;
  background:rgba(0,0,0,.10);
}
.nav-section[open] summary{
  border-bottom:1px solid rgba(217,170,67,.20);
}
.nav-section-links{
  padding:8px 8px 10px 12px !important;
  gap:5px !important;
}
.nav-section-links a{
  color:#ffffff !important;
  font-size:.94rem;
  line-height:1.15;
  padding:9px 10px 9px 18px !important;
  border-radius:12px !important;
  border-left:3px solid rgba(217,170,67,.28) !important;
  background:rgba(255,255,255,.025);
}
.nav-section-links a.nav-subitem{
  margin-left:12px !important;
  padding-left:24px !important;
  border-left-color:rgba(217,170,67,.70) !important;
  background:rgba(255,255,255,.04);
}
.nav-section-links a:hover{
  background:rgba(217,170,67,.14) !important;
}
.nav-section-links a.active{
  background:rgba(217,170,67,.24) !important;
  color:#ffffff !important;
  border-left-color:var(--navy) !important;
  box-shadow:inset 0 0 0 1px rgba(217,170,67,.18);
}
.nav-section:not([open]){
  opacity:.96;
}
.nav-section:not([open]) summary{
  padding-top:10px !important;
  padding-bottom:10px !important;
}
.sidebar-card{
  margin-top:14px;
}

/* Make billing entry less wide and easier to scan */
.billing-page-grid{
  align-items:start;
}
.billing-entry-card{
  width:100%;
}
.billing-entry-card > p{
  max-width:760px;
}
.billing-entry-card .billing-form{
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
}
.billing-entry-card .billing-form .form-full,
.billing-entry-card .billing-form .actions{
  grid-column:1 / -1;
}
.billing-entry-card .billing-form textarea{
  min-height:96px;
}
.billing-entry-card .billing-form input,
.billing-entry-card .billing-form select,
.billing-entry-card .billing-form textarea{
  max-width:100%;
}
@media (max-width: 760px){
  .billing-entry-card{
    max-width:100%;
  }
  .billing-entry-card .billing-form{
    grid-template-columns:1fr !important;
  }
}


/* Match entire Billing page width to the Revenue module feel */
.billing-page-grid{
  max-width:var(--fidmg-billing-page-width, 1180px) !important;
  width:100% !important;
  margin-right:auto !important;
  margin-left:0 !important;
  align-items:start;
}
.billing-page-grid > .card,
.billing-page-grid .billing-registry-header{
  max-width:var(--fidmg-billing-page-width, 1180px) !important;
  width:100% !important;
}
.billing-page-grid .billing-entry-card{
  max-width:var(--fidmg-billing-page-width, 1180px) !important;
}
.billing-page-grid .billing-entry-card .billing-form{
  max-width:100% !important;
}
.billing-page-grid .grid-3{
  max-width:var(--fidmg-billing-page-width, 1180px) !important;
}
.billing-page-grid table{
  width:100%;
}
.billing-page-grid .card:has(table){
  overflow-x:auto;
}
@supports not selector(:has(*)){
  .billing-page-grid .card{
    overflow-x:auto;
  }
}


/* Registry row selection: hide edit/delete until a row is selected */
.registry-selectable-table .registry-select-heading,
.registry-selectable-table .registry-select-cell{
  width:92px;
  white-space:nowrap;
}
.registry-check-label{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin:0;
  padding:6px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--navy);
  font-size:12px;
  font-weight:900;
  text-transform:none;
  letter-spacing:0;
}
.registry-check-label input{
  width:auto;
  margin:0;
}
.registry-selectable-table tr.registry-selectable-row .registry-row-actions > *{
  display:none !important;
}
.registry-selectable-table tr.registry-row-selected{
  background:#fffaf0;
}
.registry-selectable-table tr.registry-row-selected .registry-row-actions > *{
  display:inline-flex !important;
}
.registry-selectable-table tr.registry-row-selected .registry-row-actions{
  gap:7px;
  flex-wrap:wrap;
}
/* Owner controlled page width */
.layout-preview-card{
  overflow:hidden;
}
.layout-width-preview{
  border:2px dashed rgba(217,170,67,.55);
  border-radius:18px;
  background:#fffaf0;
  color:var(--navy);
  font-weight:900;
  padding:18px;
}
.small-help{
  margin-top:7px !important;
  font-size:12px !important;
  color:var(--muted) !important;
}

.registry-selectable-table tr.registry-selectable-row .registry-row-actions{
  min-width:82px;
}


/* Role-based Trial Layouts: Sample 1 for Owner, modified Sample 4 for Fiduciary/Staff */
.layout-owner-sample1 .owner-sidebar-sample1{
  width:auto;
}
.layout-owner-sample1 .nav-section summary{
  text-transform:uppercase;
  letter-spacing:.08em;
}
.owner-sample-dashboard{
  display:grid;
  gap:18px;
}
.owner-command-hero{
  background:linear-gradient(135deg,var(--navy),var(--navy2));
  color:#fff;
  border-radius:34px;
  padding:30px;
  border-bottom:6px solid var(--gold);
  box-shadow:var(--shadow);
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}
.owner-command-hero h2{
  margin:0 0 10px;
  color:#fff;
  font-size:34px;
  letter-spacing:-.055em;
}
.owner-command-hero p{
  margin:0;
  color:#dbe7f5;
  max-width:760px;
  line-height:1.55;
}
.owner-hero-actions,
.owner-dashboard-grid,
.owner-money-stats,
.case-workspace-kpis,
.case-workspace-grid{
  display:grid;
  gap:14px;
}
.owner-hero-actions{
  grid-template-columns:repeat(2,minmax(130px,1fr));
  min-width:310px;
}
.owner-quick-row{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.quick-action-card{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
  box-shadow:var(--shadow);
}
.quick-action-card span{
  color:var(--muted);
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.quick-action-card strong{
  color:var(--navy);
  font-size:34px;
  letter-spacing:-.06em;
}
.owner-dashboard-grid{
  grid-template-columns:1.35fr .9fr;
}
.owner-priority-list,
.case-action-list{
  display:grid;
  gap:10px;
}
.owner-priority-list a,
.case-action-list a{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fbfdff;
}
.owner-priority-list strong,
.case-action-list strong{
  color:var(--navy);
}
.owner-priority-list span,
.case-action-list span{
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
  text-align:right;
  max-width:360px;
}
.owner-money-stats{
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin:16px 0;
}
.owner-money-stats div{
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  background:#fbfdff;
}
.owner-money-stats span{
  display:block;
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  margin-bottom:6px;
}
.owner-money-stats strong{
  color:var(--navy);
  font-size:22px;
}
.owner-settings-drawer summary{
  cursor:pointer;
  color:var(--navy);
  font-size:19px;
  font-weight:950;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.owner-settings-drawer summary span{
  font-size:12px;
  color:var(--navy);
  background:var(--cream);
  border:1px solid rgba(217,170,67,.35);
  border-radius:999px;
  padding:7px 10px;
}

/* Modified Sample 4: case-centric experience for fiduciaries/staff */
.app.layout-case-centric{
  display:grid;
  grid-template-columns:1fr;
}
.layout-case-centric .case-centric-sidebar{
  grid-column:1 / -1;
  position:sticky;
  top:0;
  z-index:30;
  height:auto;
  min-height:0;
  display:flex;
  align-items:center;
  gap:18px;
  padding:12px 18px;
  border-right:0;
  border-bottom:5px solid var(--gold);
}
.layout-case-centric .case-centric-sidebar .brand{
  margin:0;
  flex:0 0 auto;
}
.layout-case-centric .case-centric-sidebar .brand-mark,
.layout-case-centric .case-centric-sidebar .shield-logo,
.layout-case-centric .case-centric-sidebar img{
  max-width:42px;
  max-height:42px;
}
.layout-case-centric .case-centric-sidebar .nav-grouped{
  display:flex;
  flex-direction:row;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  flex:1 1 auto;
}
.layout-case-centric .case-centric-sidebar .nav-section{
  position:relative;
  border-radius:999px !important;
  overflow:visible;
  border-color:rgba(255,255,255,.16) !important;
}
.layout-case-centric .case-centric-sidebar .nav-section summary{
  border-radius:999px;
  padding:9px 13px !important;
  text-transform:none;
  letter-spacing:0;
  font-size:14px;
  background:rgba(255,255,255,.08);
}
.layout-case-centric .case-centric-sidebar .nav-section[open] summary{
  background:#fff;
  color:var(--navy) !important;
}
.layout-case-centric .case-centric-sidebar .nav-section-links{
  position:absolute;
  left:0;
  top:calc(100% + 8px);
  min-width:220px;
  display:none;
  background:var(--navy);
  border:1px solid rgba(217,170,67,.35);
  border-radius:18px;
  padding:10px !important;
  box-shadow:0 18px 42px rgba(0,0,0,.20);
}
.layout-case-centric .case-centric-sidebar .nav-section[open] .nav-section-links,
.layout-case-centric .case-centric-sidebar .nav-section:hover .nav-section-links{
  display:flex;
}
.layout-case-centric .case-centric-sidebar .nav-section-links a{
  margin:0 !important;
  white-space:nowrap;
}
.layout-case-centric .case-centric-sidebar .logout-link{
  margin:0 0 0 auto !important;
  border-radius:999px;
}
.layout-case-centric .case-centric-sidebar .sidebar-card{
  display:none;
}
.layout-case-centric main{
  grid-column:1 / -1;
}
.case-centric-dashboard{
  display:block;
}
.case-workspace-shell{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.case-workspace-list{
  background:#fff;
  border:1px solid var(--line);
  border-radius:28px;
  padding:18px;
  box-shadow:var(--shadow);
  position:sticky;
  top:96px;
}
.case-workspace-head h3{
  margin:0 0 7px;
  color:var(--navy);
}
.case-workspace-head p{
  margin:0 0 14px;
  color:var(--muted);
  font-size:13px;
}
.case-list-scroll{
  display:grid;
  gap:9px;
  max-height:430px;
  overflow:auto;
  margin-bottom:14px;
}
.case-workspace-item{
  display:block;
  padding:13px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}
.case-workspace-item.active{
  background:var(--cream);
  border-color:var(--navy);
}
.case-workspace-item strong{
  display:block;
  color:var(--navy);
  margin-bottom:4px;
}
.case-workspace-item span{
  display:block;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}
.case-workspace-empty{
  color:var(--muted);
  background:#fbfdff;
  border:1px dashed var(--line);
  border-radius:16px;
  padding:14px;
}
.case-workspace-main{
  min-width:0;
}
.case-workspace-hero{
  background:linear-gradient(135deg,var(--navy),var(--navy2));
  color:#fff;
  border-radius:30px;
  padding:26px;
  border-bottom:5px solid var(--gold);
  box-shadow:var(--shadow);
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
  margin-bottom:14px;
}
.case-workspace-hero h2{
  margin:0 0 8px;
  color:#fff;
  font-size:30px;
  letter-spacing:-.05em;
}
.case-workspace-hero p{
  margin:0;
  color:#dbe7f5;
}
.case-status-pill{
  background:var(--cream);
  color:var(--navy);
  border:1px solid rgba(217,170,67,.35);
  border-radius:999px;
  padding:8px 12px;
  font-weight:900;
  white-space:nowrap;
}
.case-workspace-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:16px;
}
.case-workspace-tabs a{
  padding:9px 13px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--navy);
  font-weight:900;
}
.case-workspace-tabs a.active{
  background:var(--navy);
  color:#fff;
  border-color:var(--navy);
}
.case-workspace-kpis{
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-bottom:16px;
}
.case-workspace-grid{
  grid-template-columns:1.35fr .8fr;
}
.mini-case-type-list{
  display:grid;
  gap:8px;
  margin-top:12px;
}
.mini-case-type-list div{
  display:flex;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  background:#fbfdff;
}
.mini-case-type-list span{
  color:var(--muted);
  font-weight:850;
}
.mini-case-type-list strong{
  color:var(--navy);
}
@media(max-width:1100px){
  .owner-command-hero,
  .case-workspace-hero{
    flex-direction:column;
  }
  .owner-hero-actions,
  .owner-quick-row,
  .owner-dashboard-grid,
  .case-workspace-shell,
  .case-workspace-kpis,
  .case-workspace-grid{
    grid-template-columns:1fr;
  }
  .case-workspace-list{
    position:static;
  }
}
@media(max-width:760px){
  .layout-case-centric .case-centric-sidebar{
    align-items:flex-start;
    flex-direction:column;
  }
  .layout-case-centric .case-centric-sidebar .nav-grouped{
    width:100%;
  }
  .layout-case-centric .case-centric-sidebar .nav-section-links{
    position:static;
    margin-top:8px;
  }
  .owner-quick-row{
    grid-template-columns:1fr;
  }
}


/* Apply modified Sample 4 top menu on non-dashboard pages too */
.case-centric-sidebar{
  grid-column:1 / -1;
}
.case-centric-sidebar + main{
  grid-column:1 / -1;
}
.app > .case-centric-sidebar{
  position:sticky;
  top:0;
  z-index:30;
  height:auto;
  min-height:0;
  display:flex;
  align-items:center;
  gap:18px;
  padding:12px 18px;
  border-right:0;
  border-bottom:5px solid var(--gold);
}
.app > .case-centric-sidebar .brand{
  margin:0;
  flex:0 0 auto;
}
.app > .case-centric-sidebar .nav-grouped{
  display:flex;
  flex-direction:row;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  flex:1 1 auto;
}
.app > .case-centric-sidebar .nav-section{
  position:relative;
  border-radius:999px !important;
  overflow:visible;
}
.app > .case-centric-sidebar .nav-section summary{
  border-radius:999px;
  padding:9px 13px !important;
  text-transform:none;
  letter-spacing:0;
  font-size:14px;
  background:rgba(255,255,255,.08);
}
.app > .case-centric-sidebar .nav-section[open] summary{
  background:#fff;
  color:var(--navy) !important;
}
.app > .case-centric-sidebar .nav-section-links{
  position:absolute;
  left:0;
  top:calc(100% + 8px);
  min-width:220px;
  display:none;
  background:var(--navy);
  border:1px solid rgba(217,170,67,.35);
  border-radius:18px;
  padding:10px !important;
  box-shadow:0 18px 42px rgba(0,0,0,.20);
}
.app > .case-centric-sidebar .nav-section[open] .nav-section-links,
.app > .case-centric-sidebar .nav-section:hover .nav-section-links{
  display:flex;
}
.app > .case-centric-sidebar .nav-section-links a{
  margin:0 !important;
  white-space:nowrap;
}
.app > .case-centric-sidebar .logout-link{
  margin:0 0 0 auto !important;
  border-radius:999px;
}
.app > .case-centric-sidebar .sidebar-card{
  display:none;
}
@media(max-width:760px){
  .app > .case-centric-sidebar{
    align-items:flex-start;
    flex-direction:column;
  }
  .app > .case-centric-sidebar .nav-grouped{
    width:100%;
  }
  .app > .case-centric-sidebar .nav-section-links{
    position:static;
    margin-top:8px;
  }
}


/* Billing frame consistency fix: Add Billing + Billing Registry/Register */
.billing-page-grid{
  width:min(100%, var(--fidmg-billing-page-width, 1180px)) !important;
  max-width:var(--fidmg-billing-page-width, 1180px) !important;
  margin-left:0 !important;
  margin-right:auto !important;
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) !important;
  gap:18px !important;
  align-items:start !important;
  justify-items:stretch !important;
}
.billing-page-grid > .card,
.billing-page-grid > .billing-entry-card,
.billing-page-grid > .billing-register-card,
.billing-page-grid > .billing-payment-card,
.billing-page-grid > .billing-registry-header,
.billing-page-grid > .billing-common-tasks-card,
.billing-page-grid > .billing-filters-card,
.billing-page-grid > .billing-totals-person-card{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
}
.billing-page-grid .billing-entry-card,
.billing-page-grid .billing-register-card,
.billing-page-grid .billing-registry-header{
  border-top:4px solid var(--gold);
}
.billing-page-grid .billing-form{
  width:100% !important;
  max-width:100% !important;
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
}
.billing-page-grid .billing-form .form-full,
.billing-page-grid .billing-form .actions{
  grid-column:1 / -1 !important;
}
.billing-page-grid .billing-stat-grid,
.billing-page-grid .grid-3.billing-stat-grid{
  width:100% !important;
  max-width:100% !important;
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
}
.billing-page-grid table{
  width:100% !important;
}
.billing-page-grid .billing-register-card,
.billing-page-grid .billing-payment-card,
.billing-page-grid .billing-totals-person-card{
  overflow-x:auto !important;
}
.billing-page-grid .billing-register-card table,
.billing-page-grid .billing-payment-card table,
.billing-page-grid .billing-totals-person-card table{
  min-width:860px;
}
.layout-case-centric main .billing-page-grid,
.layout-owner-sample1 main .billing-page-grid{
  width:min(100%, var(--fidmg-billing-page-width, 1180px)) !important;
}
@media(max-width:900px){
  .billing-page-grid .billing-form,
  .billing-page-grid .billing-stat-grid,
  .billing-page-grid .grid-3.billing-stat-grid{
    grid-template-columns:1fr !important;
  }
}


/* FidMG Simplified Navigation Buildout */
.simplified-drawer{
  overflow:hidden;
}
.simplified-drawer > summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  color:var(--navy);
  font-weight:950;
}
.simplified-drawer > summary::-webkit-details-marker{
  display:none;
}
.simplified-drawer > summary span{
  display:block;
  font-size:19px;
  letter-spacing:-.03em;
}
.simplified-drawer > summary small{
  color:var(--muted);
  font-size:13px;
  font-weight:800;
  text-align:right;
  line-height:1.35;
}
.simplified-drawer[open]{
  border-top:4px solid var(--gold);
}
.documents-simplified{
  max-width:var(--fidmg-default-content-width, 100%);
}
.document-mode-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding:10px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
}
.document-mode-tabs a{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--navy);
  background:#fff;
  font-weight:900;
}
.document-mode-tabs a.active{
  color:#fff;
  background:var(--navy);
  border-color:var(--navy);
}
.document-mode-tabs a:nth-child(2):before{
  content:"↳";
  color:var(--navy);
  font-weight:950;
}
.document-index-card{
  border-top:4px solid var(--gold);
}
.document-index-card code,
.document-index-register code{
  display:inline-block;
  max-width:360px;
  white-space:normal;
  overflow-wrap:anywhere;
  padding:6px 8px;
  border-radius:10px;
  background:#f8fafc;
  color:#344054;
  border:1px solid var(--line);
}
.document-index-register{
  overflow-x:auto;
}
.document-index-register table{
  min-width:980px;
}
.billing-page-grid .simplified-drawer{
  width:100% !important;
  max-width:100% !important;
}
.billing-page-grid .billing-entry-card > summary,
.billing-page-grid .billing-register-card > summary,
.billing-page-grid .billing-payment-card > summary,
.billing-page-grid .billing-registry-header > summary,
.billing-page-grid .billing-common-tasks-card > summary,
.billing-page-grid .billing-filters-card > summary,
.billing-page-grid .billing-totals-person-card > summary{
  min-height:42px;
}
@media(max-width:760px){
  .simplified-drawer > summary{
    flex-direction:column;
  }
  .simplified-drawer > summary small{
    text-align:left;
  }
  .document-mode-tabs{
    display:grid;
    grid-template-columns:1fr;
  }
}


/* Revised three-box dashboard and owner-controlled workspace menu */
.app.layout-case-centric{
  grid-template-columns:1fr !important;
}
.app.layout-case-centric > .case-centric-sidebar{
  display:none !important;
}
.workspace-top-menu-revised{
  display:grid;
  grid-template-columns:150px repeat(7,minmax(112px,1fr));
  gap:9px;
  align-items:stretch;
  background:var(--navy);
  border-bottom:5px solid var(--gold);
  border-radius:0 0 24px 24px;
  padding:14px;
  margin:-28px -28px 22px;
  position:sticky;
  top:0;
  z-index:20;
  box-shadow:0 16px 36px rgba(16,47,87,.18);
}
.workspace-menu-column{
  display:grid;
  grid-template-rows:1fr 1fr;
  gap:6px;
  min-width:0;
}
.workspace-menu-column a{
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#fff;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.13);
  border-radius:999px;
  padding:8px 10px;
  font-size:13px;
  font-weight:900;
  overflow:hidden;
}
.workspace-menu-column a.active,
.workspace-menu-column a:hover{
  background:#fff;
  color:var(--navy);
}
.three-box-dashboard-revised{
  display:grid;
  gap:18px;
}
.three-box-hero{
  background:linear-gradient(135deg,var(--navy),var(--navy2));
  color:#fff;
  border-radius:34px;
  border-bottom:6px solid var(--gold);
  padding:24px 26px;
  box-shadow:var(--shadow);
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}
.three-box-hero h2{
  margin:0 0 8px;
  color:#fff;
  font-size:32px;
  letter-spacing:-.055em;
}
.three-box-hero p{
  margin:0;
  color:#dbe7f5;
  line-height:1.5;
  max-width:820px;
}
.three-box-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  align-items:stretch;
}
.three-box-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:620px;
}
.three-box-head{
  padding:18px 19px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  min-height:104px;
}
.three-box-head h3{
  margin:0 0 5px;
  color:var(--navy);
  font-size:21px;
  letter-spacing:-.035em;
}
.three-box-head p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}
.three-box-body{
  padding:15px;
  flex:1 1 auto;
  overflow:auto;
}
.three-box-footer{
  padding:0 15px 15px;
  display:grid;
  gap:9px;
}
.three-box-footer .btn{
  width:100%;
  justify-content:center;
}
.three-case-list,
.three-billing-list,
.three-event-list{
  display:grid;
  gap:10px;
}
.three-case-item,
.three-billing-row,
.three-event-row{
  border:1px solid var(--line);
  border-radius:16px;
  padding:13px;
  background:#fff;
}
.three-case-item{
  border-radius:18px;
  padding:14px;
  display:grid;
  gap:7px;
}
.three-case-item.active{
  border-color:var(--navy);
  background:#fffaf0;
}
.three-case-item strong,
.three-billing-row strong,
.three-event-row strong{
  color:var(--navy);
}
.three-case-meta{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.three-case-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:4px;
}
.three-billing-summary{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.three-billing-summary div{
  border:1px solid var(--line);
  border-radius:18px;
  padding:13px;
  background:#fbfdff;
}
.three-billing-summary span{
  display:block;
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  margin-bottom:5px;
}
.three-billing-summary strong{
  color:var(--navy);
  font-size:23px;
  letter-spacing:-.04em;
}
.three-billing-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:5px;
  align-items:start;
}
.three-billing-row span,
.three-event-row span{
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}
.three-amount{
  color:var(--green);
  font-weight:950;
  white-space:nowrap;
}
.three-event-section{
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
  background:#fbfdff;
}
.three-event-section + .three-event-section{
  margin-top:12px;
}
.three-event-section h4{
  margin:0;
  padding:12px 14px;
  color:var(--navy);
  background:#fff;
  border-bottom:1px solid var(--line);
  font-size:15px;
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.three-event-section h4 small{
  color:var(--muted);
  font-size:12px;
}
.three-event-section .three-event-list{
  padding:10px;
}
.three-event-row{
  margin:0;
}
.three-event-check{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin:0;
  text-transform:none;
  letter-spacing:0;
  color:inherit;
}
.three-event-check input{
  width:auto;
  margin:4px 0 0;
}
.three-event-content{
  display:grid;
  gap:5px;
}
.three-event-check input:checked + .three-event-content{
  opacity:.45;
  text-decoration:line-through;
}
.three-event-date{
  display:inline-flex;
  width:max-content;
  border-radius:999px;
  padding:6px 9px;
  background:#f8fafc;
  border:1px solid var(--line);
  color:var(--navy) !important;
  font-weight:900;
}
.three-empty{
  border:1px dashed var(--line);
  border-radius:16px;
  padding:13px;
  color:var(--muted);
  background:#fbfdff;
  font-size:13px;
}
.panel-dashboard-hero{
  background:linear-gradient(135deg,var(--navy),var(--navy2));
  color:#fff;
  border-radius:30px;
  border-bottom:5px solid var(--gold);
  padding:24px;
  box-shadow:var(--shadow);
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}
.panel-dashboard-hero h2{
  margin:0 0 8px;
  color:#fff;
  font-size:30px;
  letter-spacing:-.05em;
}
.panel-dashboard-hero p{
  margin:0;
  color:#dbe7f5;
  max-width:820px;
  line-height:1.5;
}
.panel-dashboard-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.panel-dashboard-card{
  display:block;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:17px;
  box-shadow:var(--shadow);
  min-height:124px;
}
.panel-dashboard-card strong{
  display:block;
  color:var(--navy);
  margin-bottom:7px;
  font-size:16px;
}
.panel-dashboard-card span{
  display:block;
  color:var(--muted);
  font-size:13px;
  line-height:1.42;
}
.layout-editor-table-wrap{
  width:100%;
  overflow-x:auto;
}
.layout-editor-table{
  min-width:900px;
}
.layout-editor-table td:nth-child(3),
.layout-editor-table td:nth-child(4){
  min-width:240px;
}
@media(max-width:1280px){
  .workspace-top-menu-revised{
    grid-template-columns:repeat(4,minmax(112px,1fr));
  }
  .workspace-menu-brand{grid-column:1 / -1;}
}
@media(max-width:1120px){
  .three-box-grid{
    grid-template-columns:1fr;
  }
  .three-box-card{
    min-height:auto;
  }
  .panel-dashboard-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .panel-dashboard-hero,
  .three-box-hero{
    flex-direction:column;
  }
}
@media(max-width:760px){
  .workspace-top-menu-revised{
    grid-template-columns:1fr;
    margin:-28px -28px 18px;
    position:static;
  }
  .workspace-menu-column{
    grid-template-columns:1fr 1fr;
    grid-template-rows:auto;
  }
  .three-billing-summary,
  .panel-dashboard-grid{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   FidMG WHOLE SITE REVAMP - sample HTML look, sitewide
   Source visual language: attached FidMG revised dashboard HTML.
   ========================================================= */
:root{
  --navy:#102f57;
  --navy2:#0b2344;
  --gold:#d9aa43;
  --cream:#fff6df;
  --bg:#f5f8fc;
  --ink:#1d2939;
  --muted:#667085;
  --line:#e4eaf2;
  --green:#137a4b;
  --red:#b42318;
  --shadow:0 18px 42px rgba(16,47,87,.10);
  --radius:26px;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0 !important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif !important;
  color:var(--ink) !important;
  background:linear-gradient(180deg,#fff,var(--bg)) !important;
  min-height:100vh;
}
a{text-decoration:none;}
.app,
.app.layout-owner-sample1,
.app.layout-case-centric,
.app.force-three-box-layout{
  display:block !important;
  grid-template-columns:1fr !important;
  min-height:100vh;
  background:linear-gradient(180deg,#fff,var(--bg)) !important;
}
.app > aside.sidebar,
.sidebar,
.owner-sidebar-sample1,
.case-centric-sidebar{
  display:none !important;
}
.topnav,
.fidmg-site-topnav,
.workspace-top-menu-revised{
  background:var(--navy) !important;
  color:#fff !important;
  border-bottom:5px solid var(--gold) !important;
  border-radius:0 !important;
  padding:14px 24px !important;
  display:grid !important;
  grid-template-columns:auto 1fr !important;
  gap:18px !important;
  align-items:center !important;
  position:sticky !important;
  top:0 !important;
  z-index:50 !important;
  margin:0 !important;
  box-shadow:none !important;
}
.brand,
.workspace-menu-brand{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:190px !important;
  color:#fff !important;
  font-weight:400 !important;
}
.shield,
.brand .shield,
.topnav .shield{
  width:42px !important;
  height:42px !important;
  border-radius:15px !important;
  background:linear-gradient(145deg,#fff,var(--cream)) !important;
  color:var(--navy) !important;
  display:grid !important;
  place-items:center !important;
  font-weight:950 !important;
  box-shadow:0 8px 20px rgba(0,0,0,.18) !important;
  flex:0 0 auto !important;
}
.brand .shield-logo,
.brand .brand-mark,
.brand img,
.workspace-menu-brand .shield-logo,
.workspace-menu-brand .brand-mark,
.workspace-menu-brand img{
  width:42px !important;
  height:42px !important;
  max-width:42px !important;
  max-height:42px !important;
  border-radius:15px !important;
}
.brand strong,
.workspace-menu-brand strong{
  display:block !important;
  font-size:17px !important;
  color:#fff !important;
  line-height:1.1 !important;
}
.brand span,
.workspace-menu-brand span{
  display:block !important;
  color:#dbe7f5 !important;
  font-size:12px !important;
  line-height:1.2 !important;
}
.menu-grid,
.topnav .menu-grid{
  display:grid !important;
  grid-template-columns:repeat(7,minmax(112px,1fr)) !important;
  gap:9px !important;
  align-items:stretch !important;
  width:100% !important;
}
.menu-pair,
.workspace-menu-column,
.single-menu{
  display:grid !important;
  grid-template-rows:1fr 1fr !important;
  gap:6px !important;
  min-width:0 !important;
}
.single-menu{align-items:center !important;}
.menu-pair a,
.single-menu a,
.workspace-menu-column a{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:34px !important;
  color:#fff !important;
  background:rgba(255,255,255,.08) !important;
  border:1px solid rgba(255,255,255,.12) !important;
  border-radius:999px !important;
  padding:8px 10px !important;
  font-size:13px !important;
  font-weight:850 !important;
  text-decoration:none !important;
  text-align:center !important;
  line-height:1.15 !important;
  overflow:hidden !important;
  white-space:normal !important;
}
.menu-pair a:hover,
.single-menu a:hover,
.workspace-menu-column a:hover,
.menu-pair a.active,
.single-menu a.active,
.workspace-menu-column a.active{
  background:#fff !important;
  color:var(--navy) !important;
}
main,
.app main{
  max-width:1320px !important;
  margin:0 auto !important;
  padding:24px !important;
  width:100% !important;
  grid-column:1/-1 !important;
}
.page-heading,
.hero,
.three-box-hero,
.panel-dashboard-hero{
  background:linear-gradient(135deg,var(--navy),var(--navy2)) !important;
  color:#fff !important;
  border-radius:34px !important;
  border-bottom:6px solid var(--gold) !important;
  padding:24px 26px !important;
  box-shadow:var(--shadow) !important;
  display:flex !important;
  justify-content:space-between !important;
  align-items:flex-start !important;
  gap:18px !important;
  margin:0 0 20px !important;
}
.page-heading h2,
.hero h1,
.three-box-hero h2,
.panel-dashboard-hero h2{
  margin:0 0 8px !important;
  color:#fff !important;
  font-size:32px !important;
  line-height:1.1 !important;
  letter-spacing:-.055em !important;
}
.page-heading p,
.hero p,
.three-box-hero p,
.panel-dashboard-hero p{
  margin:0 !important;
  color:#dbe7f5 !important;
  line-height:1.5 !important;
  max-width:820px !important;
}
.eyebrow{
  color:#f4d78a !important;
  font-size:12px !important;
  font-weight:950 !important;
  text-transform:uppercase !important;
  letter-spacing:.08em !important;
  margin-bottom:7px !important;
}
.role-pill,
.pill,
.case-status-pill,
.badge{
  background:var(--cream) !important;
  color:var(--navy) !important;
  border:1px solid rgba(217,170,67,.40) !important;
  border-radius:999px !important;
  padding:7px 10px !important;
  font-weight:900 !important;
  font-size:12px !important;
  white-space:nowrap !important;
}
.dashboard-grid,
.three-box-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:18px !important;
  align-items:stretch !important;
}
.box,
.three-box-card{
  background:#fff !important;
  border:1px solid var(--line) !important;
  border-radius:var(--radius) !important;
  box-shadow:var(--shadow) !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
  min-height:620px !important;
}
.box-head,
.three-box-head{
  padding:18px 19px !important;
  border-bottom:1px solid var(--line) !important;
  display:flex !important;
  justify-content:space-between !important;
  gap:12px !important;
  align-items:flex-start !important;
  min-height:104px !important;
}
.box-head h2,
.box-head h3,
.three-box-head h3{
  margin:0 0 5px !important;
  color:var(--navy) !important;
  font-size:21px !important;
  line-height:1.16 !important;
  letter-spacing:-.035em !important;
}
.box-head p,
.three-box-head p{
  margin:0 !important;
  color:var(--muted) !important;
  font-size:13px !important;
  line-height:1.45 !important;
}
.box-body,
.three-box-body{
  padding:15px !important;
  flex:1 1 auto !important;
  overflow:auto !important;
}
.footer-actions,
.three-box-footer{
  padding:0 15px 15px !important;
  display:grid !important;
  gap:9px !important;
}
.footer-actions .btn,
.three-box-footer .btn{width:100% !important;justify-content:center !important;}
.card,
.panel,
.panel-dashboard-card,
.case-item,
.billing-row,
.event-row,
.three-case-item,
.three-billing-row,
.three-event-row,
.doc-card,
.quick-action-card,
.stat{
  background:#fff !important;
  border:1px solid var(--line) !important;
  border-radius:var(--radius) !important;
  box-shadow:var(--shadow) !important;
}
.card,
.panel{
  padding:22px !important;
}
.card h3,
.panel h2,
.panel h3,
.panel-dashboard-card strong,
.three-case-item strong,
.three-billing-row strong,
.three-event-row strong,
.case-item strong,
.billing-row strong,
.event-row strong{
  color:var(--navy) !important;
}
.card p,
.panel p,
.panel-dashboard-card span,
.case-meta,
.three-case-meta,
.billing-row span,
.three-billing-row span,
.event-row span,
.three-event-row span,
.muted{
  color:var(--muted) !important;
}
.grid,
section.grid{
  display:grid !important;
  gap:18px !important;
}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
.panel-dashboard-grid,
.panel-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:13px !important;
  margin-top:16px !important;
}
.panel-dashboard-card,
.panel-card{
  display:block !important;
  border:1px solid var(--line) !important;
  border-radius:18px !important;
  padding:15px !important;
  background:#fbfdff !important;
  min-height:124px !important;
  box-shadow:0 12px 30px rgba(16,47,87,.06) !important;
}
.case-list,
.billing-list,
.event-list,
.three-case-list,
.three-billing-list,
.three-event-list{display:grid !important;gap:10px !important;}
.case-item,
.three-case-item{
  border-radius:18px !important;
  padding:14px !important;
  display:grid !important;
  gap:7px !important;
  box-shadow:none !important;
}
.case-item.active,
.three-case-item.active{border-color:var(--navy) !important;background:#fffaf0 !important;}
.case-meta,
.three-case-meta{display:flex !important;flex-wrap:wrap !important;gap:7px !important;font-size:12px !important;font-weight:800 !important;}
.case-actions,
.three-case-actions,
.actions{display:flex !important;gap:8px !important;flex-wrap:wrap !important;align-items:center !important;}
.billing-summary,
.three-billing-summary{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px !important;margin-bottom:14px !important;}
.billing-row,
.three-billing-row{display:grid !important;grid-template-columns:1fr auto !important;gap:5px !important;align-items:start !important;box-shadow:none !important;border-radius:16px !important;padding:13px !important;}
.amount,.three-amount{color:var(--green) !important;font-weight:950 !important;white-space:nowrap !important;}
.event-section,.three-event-section{border:1px solid var(--line) !important;border-radius:20px !important;overflow:hidden !important;background:#fbfdff !important;}
.event-section+.event-section,.three-event-section+.three-event-section{margin-top:12px !important;}
.event-section h3,.three-event-section h4{margin:0 !important;padding:12px 14px !important;color:var(--navy) !important;background:#fff !important;border-bottom:1px solid var(--line) !important;font-size:15px !important;display:flex !important;justify-content:space-between !important;gap:10px !important;}
.event-section .event-list,.three-event-section .three-event-list{padding:10px !important;}
.event-date,.three-event-date{display:inline-flex !important;width:max-content !important;border-radius:999px !important;padding:6px 9px !important;background:#f8fafc !important;border:1px solid var(--line) !important;color:var(--navy)!important;font-weight:900 !important;}
.event-row.urgent,.three-event-row.urgent{border-color:#fecaca !important;background:#fff7f6 !important;}
.event-check,.three-event-check{display:flex !important;align-items:flex-start !important;gap:9px !important;margin:0 !important;text-transform:none !important;letter-spacing:0 !important;color:inherit !important;font-size:inherit !important;font-weight:inherit !important;}
.event-check input,.three-event-check input{margin-top:4px !important;width:auto !important;}
.event-content,.three-event-content{display:grid !important;gap:5px !important;}
.btn,button.btn,input[type="submit"].btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:999px !important;
  padding:8px 11px !important;
  background:var(--navy) !important;
  color:#fff !important;
  font-size:12px !important;
  font-weight:900 !important;
  text-decoration:none !important;
  border:0 !important;
  cursor:pointer !important;
}
.btn-soft,.btn.soft{background:#fff !important;color:var(--navy) !important;border:1px solid var(--line) !important;}
.btn-gold,.btn.gold{background:var(--gold) !important;color:var(--navy);}
.btn-danger{background:#b42318 !important;color:#fff !important;}
input,select,textarea{
  width:100% !important;
  border:1px solid var(--line) !important;
  border-radius:14px !important;
  padding:10px 11px !important;
  font:inherit !important;
  background:#fff !important;
  color:var(--ink) !important;
}
label{
  display:block !important;
  color:var(--muted) !important;
  font-size:12px !important;
  font-weight:900 !important;
  text-transform:uppercase !important;
  letter-spacing:.055em !important;
  margin-bottom:6px !important;
}
textarea{min-height:76px !important;}
.form-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:13px !important;}
.form-grid-3{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:13px !important;}
.form-full{grid-column:1/-1 !important;}
table{width:100% !important;border-collapse:separate !important;border-spacing:0 !important;border:1px solid var(--line) !important;border-radius:20px !important;overflow:hidden !important;background:#fff !important;}
th,td{padding:12px !important;border-bottom:1px solid var(--line) !important;text-align:left !important;vertical-align:top !important;font-size:14px !important;}
th{background:#f8fafc !important;color:var(--navy) !important;font-size:12px !important;text-transform:uppercase !important;letter-spacing:.055em !important;}
tr:last-child td{border-bottom:0 !important;}
.saved,.notice,.note{margin:0 0 18px !important;background:#fff !important;border:1px solid var(--line) !important;border-left:5px solid var(--gold) !important;border-radius:20px !important;padding:16px !important;color:var(--muted) !important;line-height:1.5 !important;font-size:14px !important;box-shadow:var(--shadow) !important;}
.note strong{color:var(--navy) !important;}
.layout-editor-table-wrap,.table-wrap,.registry-table-wrap,.calendar-embed-wrap{width:100% !important;overflow-x:auto !important;}
.simplified-drawer > summary{color:var(--navy) !important;}
@media(max-width:1280px){
  .menu-grid,.topnav .menu-grid{grid-template-columns:repeat(4,minmax(112px,1fr)) !important;}
}
@media(max-width:1160px){
  .dashboard-grid,.three-box-grid{grid-template-columns:1fr !important;}
  .box,.three-box-card{min-height:auto !important;}
  .panel-grid,.panel-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  .page-heading,.hero,.three-box-hero,.panel-dashboard-hero{flex-direction:column !important;}
  .grid-2,.grid-3{grid-template-columns:1fr !important;}
}
@media(max-width:700px){
  .topnav,.fidmg-site-topnav{grid-template-columns:1fr !important;position:static !important;}
  main,.app main{padding:18px !important;}
  .menu-grid,.topnav .menu-grid{grid-template-columns:1fr !important;}
  .menu-pair,.workspace-menu-column{grid-template-columns:1fr 1fr !important;grid-template-rows:auto !important;}
  .billing-summary,.three-billing-summary,.form-grid,.form-grid-3,.panel-grid,.panel-dashboard-grid{grid-template-columns:1fr !important;}
}


/* Duplicate top-menu and dashboard-link cleanup */
body .app{
  display:block !important;
  min-height:100vh;
}
body .app > main{
  max-width:1320px;
  margin:0 auto;
  padding:24px;
}
body .fidmg-site-topnav{
  margin:0 0 22px 0 !important;
}
body .page-heading{
  margin-top:0;
}
.panel-dashboard-grid{
  align-items:stretch;
}
.panel-dashboard-card{
  text-decoration:none;
}
.panel-dashboard-card:hover{
  transform:translateY(-1px);
  border-color:rgba(217,170,67,.65);
}


/* Page header de-duplication: one real top menu, smaller page title panels */
body .fidmg-site-topnav,
body .topnav{
  position:sticky !important;
  top:0 !important;
  z-index:80 !important;
  margin:0 0 20px 0 !important;
}
body .page-heading{
  background:#fff !important;
  border:1px solid var(--line) !important;
  border-left:5px solid var(--gold) !important;
  border-bottom:1px solid var(--line) !important;
  border-radius:20px !important;
  padding:15px 18px !important;
  margin:0 0 18px 0 !important;
  display:flex !important;
  justify-content:space-between !important;
  gap:14px !important;
  align-items:center !important;
  box-shadow:0 10px 24px rgba(16,47,87,.07) !important;
}
body .page-heading .eyebrow{
  font-size:11px !important;
  padding:4px 8px !important;
  margin-bottom:5px !important;
}
body .page-heading h2{
  margin:0 !important;
  color:var(--navy) !important;
  font-size:22px !important;
  letter-spacing:-.035em !important;
}
body .page-heading p{
  margin:4px 0 0 !important;
  color:var(--muted) !important;
  font-size:13px !important;
  line-height:1.35 !important;
}
body .page-heading-actions{
  display:flex !important;
  gap:8px !important;
  flex-wrap:wrap !important;
  justify-content:flex-end !important;
}
@media(max-width:760px){
  body .page-heading{
    flex-direction:column !important;
    align-items:flex-start !important;
  }
  body .page-heading-actions{
    justify-content:flex-start !important;
  }
}


/* Color accessibility correction: no yellow text on white or yellow backgrounds */
.eyebrow,
.pill,
.status-pill,
.badge,
.badge.included,
.role-pill,
.case-status-pill,
.stat span{
  color:var(--navy) !important;
}
.btn-gold,
.btn.gold,
button.btn-gold,
a.btn-gold{
  color:var(--navy) !important;
  background:var(--gold) !important;
}
.panel-dashboard-hero .btn-light,
.three-box-hero .btn-light{
  color:var(--navy) !important;
}


/* FINAL spacing and color cleanup - no yellow text on light/yellow, less middle whitespace */
:root{
  --fidmg-tight-gap:14px;
}
body main{
  padding-top:18px !important;
}
body .grid{
  gap:var(--fidmg-tight-gap) !important;
}
body .page-heading{
  padding:12px 18px !important;
  margin:0 0 14px 0 !important;
  border-radius:18px !important;
  min-height:0 !important;
}
body .page-heading h2{
  font-size:21px !important;
}
body .page-heading p{
  font-size:13px !important;
}
body .panel-dashboard-hero{
  padding:18px 22px !important;
  border-radius:24px !important;
  margin:0 !important;
  min-height:0 !important;
}
body .panel-dashboard-hero h2{
  font-size:26px !important;
  margin:0 0 6px !important;
}
body .panel-dashboard-hero p{
  font-size:14px !important;
  line-height:1.4 !important;
}
body .panel-dashboard-grid{
  gap:12px !important;
  margin-top:0 !important;
}
body .panel-dashboard-card{
  min-height:92px !important;
  padding:14px 15px !important;
  border-radius:18px !important;
}
body .panel-dashboard-card strong{
  font-size:15px !important;
  margin-bottom:5px !important;
}
body .panel-dashboard-card span{
  font-size:13px !important;
  line-height:1.34 !important;
}
body .card{
  padding:18px !important;
  border-radius:20px !important;
}
body .section-head{
  margin-bottom:10px !important;
}
body .eyebrow,
body .page-heading .eyebrow,
body .panel-dashboard-hero .eyebrow,
body .three-box-hero .eyebrow,
body .badge,
body .badge.included,
body .pill,
body .status-pill,
body .role-pill,
body .case-status-pill,
body .notice strong,
body .pricing-card li:before,
body tfoot th{
  color:var(--navy) !important;
  text-shadow:none !important;
}
body .eyebrow,
body .page-heading .eyebrow,
body .panel-dashboard-hero .eyebrow,
body .three-box-hero .eyebrow,
body .badge,
body .badge.included,
body .pill,
body .status-pill,
body .role-pill,
body .case-status-pill{
  background:#fff !important;
  border:1px solid rgba(16,47,87,.16) !important;
}
body .page-heading .pill,
body .page-heading .badge,
body .page-heading .eyebrow{
  background:#fffaf0 !important;
}
body .btn-gold,
body .btn.gold,
body button.btn-gold,
body a.btn-gold{
  background:var(--gold) !important;
  color:var(--navy) !important;
  border:1px solid rgba(16,47,87,.20) !important;
  text-shadow:none !important;
}
body .panel-dashboard-hero .btn-gold,
body .three-box-hero .btn-gold{
  color:var(--navy) !important;
}
body label{
  color:var(--navy) !important;
}
@media(max-width:760px){
  body main{
    padding:14px !important;
  }
  body .panel-dashboard-hero{
    padding:16px !important;
  }
}


/* Site Administration placement/spacing fix */
body.view-site_admin .main-view-site_admin{
  padding-top:12px !important;
}
body.view-site_admin .site-admin-page{
  display:grid !important;
  align-content:start !important;
  gap:12px !important;
  margin:0 !important;
  padding:0 !important;
  min-height:0 !important;
}
body.view-site_admin .site-admin-page .panel-dashboard-hero{
  margin:0 !important;
  padding:16px 20px !important;
  min-height:0 !important;
  transform:none !important;
}
body.view-site_admin .site-admin-page .panel-dashboard-grid{
  margin-top:0 !important;
  gap:12px !important;
}
body.view-site_admin .page-heading{
  display:none !important;
}
body.view-site_admin .fidmg-site-topnav{
  margin-bottom:12px !important;
}


/* Top menu logout + dashboard header de-duplication */
body .fidmg-site-topnav{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:16px !important;
}
body .fidmg-site-topnav .menu-grid{
  min-width:0 !important;
}
body .topnav-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:8px !important;
  white-space:nowrap !important;
}
body .topnav-logout{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:38px !important;
  padding:8px 14px !important;
  border-radius:999px !important;
  background:#ffffff !important;
  color:var(--navy) !important;
  border:1px solid rgba(255,255,255,.28) !important;
  font-weight:950 !important;
  text-decoration:none !important;
  box-shadow:0 8px 18px rgba(0,0,0,.10) !important;
}
body .topnav-logout:hover{
  transform:translateY(-1px);
}
body .view-billing_dashboard .page-heading,
body .view-calendar_dashboard .page-heading,
body .view-financials .page-heading,
body .view-reports .page-heading,
body .view-exports_dashboard .page-heading,
body .view-help_dashboard .page-heading,
body .view-compliance .page-heading,
body .view-checklist .page-heading,
body .view-practice_management .page-heading,
body .view-communications .page-heading,
body .view-site_admin .page-heading{
  display:none !important;
}
body .panel-dashboard-hero .eyebrow{
  color:var(--navy) !important;
  background:#fff !important;
}
body .panel-dashboard-hero{
  margin-top:0 !important;
}
body .panel-dashboard-hero .actions .btn{
  min-width:0 !important;
}
body .panel-dashboard-hero .btn-light{
  color:var(--navy) !important;
  background:#fff !important;
}
@media(max-width:1120px){
  body .fidmg-site-topnav{
    grid-template-columns:1fr !important;
  }
  body .topnav-actions{
    justify-content:flex-start !important;
  }
}


/* Billing Registry compact sizing */
body .billing-register-card{
  padding:14px !important;
}
body .billing-register-card .section-head{
  margin-bottom:6px !important;
}
body .billing-register-card h3{
  font-size:18px !important;
}
body .billing-register-card p{
  font-size:12px !important;
  line-height:1.3 !important;
}
body .billing-register-card table{
  font-size:12px !important;
}
body .billing-register-card th,
body .billing-register-card td{
  padding:7px 8px !important;
  font-size:12px !important;
  line-height:1.25 !important;
}
body .billing-register-card .btn-small{
  padding:6px 9px !important;
  font-size:11px !important;
}
body .billing-register-card input,
body .billing-register-card select{
  padding:7px 8px !important;
  font-size:12px !important;
  border-radius:10px !important;
}


/* Site Administration blank-space final fix */
body.view-site_admin .main-view-site_admin{
  display:block !important;
  padding-top:10px !important;
  min-height:0 !important;
}
body.view-site_admin .site-admin-page{
  margin-top:0 !important;
  padding-top:0 !important;
  min-height:0 !important;
  align-content:start !important;
}
body.view-site_admin .site-admin-page .panel-dashboard-hero{
  margin-top:0 !important;
}
body.view-site_admin main > script + .site-admin-page,
body.view-site_admin script + .site-admin-page{
  margin-top:0 !important;
}
.checklist-template-table th,
.checklist-template-table td{
  vertical-align:top;
}
.checklist-template-table td:nth-child(4){
  max-width:420px;
}
.checklist-editor-card textarea{
  min-height:92px;
}


/* Four checklist templates + internal calendar checklist UI */
.checklist-template-tabs{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.checklist-template-tabs a{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--navy);
  font-weight:950;
  text-align:center;
}
.checklist-template-tabs a.active{
  background:var(--navy);
  color:#fff;
  border-color:rgb(217,170,67);
  box-shadow:0 12px 24px rgba(16,47,87,.12);
}
.checklist-case-selector-card{
  padding:16px !important;
}
.checklist-calendar-form{
  margin-top:12px;
}
.checklist-template-table{
  font-size:12px;
}
.checklist-template-table th,
.checklist-template-table td{
  padding:8px 9px !important;
  font-size:12px !important;
  line-height:1.28 !important;
  vertical-align:top;
}
.checklist-template-table td:nth-child(6){
  max-width:380px;
}
.checklist-row-complete{
  background:#f7fbf9 !important;
}
.checklist-row-complete td,
.checklist-row-complete strong{
  color:#315b46 !important;
}
.checklist-done-form{
  margin:0;
}
.checklist-done-line{
  margin:0;
  white-space:nowrap;
  color:var(--navy) !important;
}
.checklist-editor-card textarea{
  min-height:88px;
}
@media(max-width:980px){
  .checklist-template-tabs{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:620px){
  .checklist-template-tabs{
    grid-template-columns:1fr;
  }
}

/* Case detail permission controls */
.permission-grid label{
  min-height:34px;
}
.case-list-table .actions form{
  display:inline-block;
  margin:0;
}
.error-card{
  border-left:5px solid var(--red);
}


/* Billing register all-user edit + always-visible by-person totals */
.always-visible-billing-person-totals{
  display:block !important;
  padding:14px !important;
}
.always-visible-billing-person-totals .section-head{
  margin-bottom:6px !important;
}
.always-visible-billing-person-totals h3{
  font-size:18px !important;
}
.always-visible-billing-person-totals p{
  font-size:12px !important;
}
.always-visible-billing-person-totals table{
  font-size:12px !important;
}
.always-visible-billing-person-totals th,
.always-visible-billing-person-totals td{
  padding:7px 8px !important;
  font-size:12px !important;
}
.billing-register-card .actions{
  white-space:nowrap;
}

/* Case-level payment area */
.case-payment-area-card{
  padding:16px !important;
}
.case-payment-form textarea{
  min-height:72px;
}
.case-payment-due-display .due-box{
  min-height:42px;
  display:flex;
  align-items:center;
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fffaf0;
  color:var(--navy);
  font-weight:950;
}
.case-payment-subgrid{
  align-items:start;
}
.case-balance-table,
.case-payment-register-table{
  font-size:12px;
}
.case-balance-table th,
.case-balance-table td,
.case-payment-register-table th,
.case-payment-register-table td{
  padding:7px 8px !important;
  font-size:12px !important;
  vertical-align:top;
}
.case-payment-register-table form{
  margin:0;
}


/* Billing side-by-side layout + live revenue visibility */
@media (min-width: 1100px){
  body .billing-side-by-side-layout{
    display:grid !important;
    grid-template-columns:minmax(300px, 375px) minmax(0, 1fr) !important;
    align-items:start !important;
    gap:14px !important;
  }
  body .billing-side-by-side-layout > .billing-entry-card{
    grid-column:1 !important;
    grid-row:1 !important;
    position:sticky;
    top:112px;
    align-self:start;
    max-height:calc(100vh - 130px);
    overflow:auto;
  }
  body .billing-side-by-side-layout > .billing-register-card{
    grid-column:2 !important;
    grid-row:1 !important;
    align-self:start;
    max-height:calc(100vh - 130px);
    overflow:auto;
  }
  body .billing-side-by-side-layout > .billing-entry-card .form-grid-3{
    grid-template-columns:1fr !important;
    gap:9px !important;
  }
  body .billing-side-by-side-layout > .billing-entry-card input,
  body .billing-side-by-side-layout > .billing-entry-card select,
  body .billing-side-by-side-layout > .billing-entry-card textarea{
    padding:7px 8px !important;
    font-size:12px !important;
  }
  body .billing-side-by-side-layout > .billing-entry-card textarea{
    min-height:70px !important;
  }
  body .billing-side-by-side-layout > .billing-entry-card .form-full{
    grid-column:1 !important;
  }
  body .billing-side-by-side-layout > .case-payment-area-card,
  body .billing-side-by-side-layout > .billing-payment-card,
  body .billing-side-by-side-layout > .billing-registry-header,
  body .billing-side-by-side-layout > .billing-common-tasks-card,
  body .billing-side-by-side-layout > .billing-filters-card,
  body .billing-side-by-side-layout > .always-visible-billing-person-totals{
    grid-column:1 / -1 !important;
  }
}
.revenue-live-stat-grid .stat .label{
  color:var(--navy) !important;
}
.revenue-live-stat-grid .stat .number{
  color:var(--navy) !important;
}


/* Calendar module layout: upcoming top-left, add event top-right, internal calendar below */
.calendar-module-layout{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(320px,420px) !important;
  gap:14px !important;
  align-items:start !important;
}
.calendar-upcoming-card{
  grid-column:1 !important;
  grid-row:1 !important;
}
.calendar-add-event-card{
  grid-column:2 !important;
  grid-row:1 !important;
}
.portal-calendar-card{
  grid-column:1 / -1 !important;
  grid-row:2 !important;
}
.calendar-add-event-card .form-grid{
  grid-template-columns:1fr !important;
  gap:9px !important;
}
.calendar-add-event-card .form-full{
  grid-column:1 !important;
}
.calendar-add-event-card input,
.calendar-add-event-card select,
.calendar-add-event-card textarea{
  padding:7px 8px !important;
  font-size:12px !important;
}
.calendar-add-event-card textarea{
  min-height:72px !important;
}
.calendar-upcoming-table,
.portal-calendar-table{
  font-size:12px;
}
.calendar-upcoming-table th,
.calendar-upcoming-table td,
.portal-calendar-table th,
.portal-calendar-table td{
  padding:8px 9px !important;
  font-size:12px !important;
  vertical-align:top;
}
.portal-calendar-table .actions form,
.calendar-upcoming-table .actions form{
  display:inline-block;
  margin:0;
}
.site-admin-google-calendar-card{
  align-self:start;
}
@media(max-width:980px){
  .calendar-module-layout{
    grid-template-columns:1fr !important;
  }
  .calendar-upcoming-card,
  .calendar-add-event-card,
  .portal-calendar-card{
    grid-column:1 !important;
    grid-row:auto !important;
  }
}

/* Permanent no-white-page portal warning */
.portal-load-warning{
  border-left:5px solid var(--gold);
  background:#fffaf0;
  color:var(--navy);
  padding:12px 14px;
  border-radius:14px;
  margin:0 0 14px;
  font-weight:700;
}

/* Case Summary one-case dashboard + checklist upload */
.one-case-dashboard .case-summary-stat-grid{
  align-items:stretch;
}
.case-summary-data-card table th{
  width:38%;
}
.case-summary-billing-table th,
.case-summary-billing-table td{
  font-size:12px !important;
  padding:7px 8px !important;
}
.checklist-upload-card{
  border-left:5px solid var(--gold);
}
.checklist-upload-card input[type="file"]{
  background:#fff;
}

/* Billing stacked layout: add billing above billing register for all users */
.billing-stacked-layout{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:14px !important;
}
.billing-stacked-layout > .billing-entry-card,
.billing-stacked-layout > .billing-register-card,
.billing-stacked-layout > .case-payment-area-card,
.billing-stacked-layout > .billing-payment-card,
.billing-stacked-layout > .billing-registry-header,
.billing-stacked-layout > .billing-common-tasks-card,
.billing-stacked-layout > .billing-filters-card,
.billing-stacked-layout > .always-visible-billing-person-totals{
  grid-column:1 / -1 !important;
  grid-row:auto !important;
  position:static !important;
  max-height:none !important;
  overflow:visible !important;
}
.billing-stacked-layout > .billing-entry-card .form-grid-3{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
.checklist-upload-card textarea{
  min-height:96px;
}
.checklist-case-loaded-notice{
  margin:10px 0 0;
  border-left:5px solid var(--gold);
}
@media(max-width:900px){
  .billing-stacked-layout > .billing-entry-card .form-grid-3{
    grid-template-columns:1fr !important;
  }
}


/* Final billing layout: Add Billing Entry on top, compact */
.billing-stacked-layout{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:10px !important;
}
.billing-stacked-layout > .billing-entry-card{
  grid-column:1 / -1 !important;
  grid-row:1 !important;
  padding:10px 12px !important;
  margin:0 !important;
  position:static !important;
  max-height:none !important;
  overflow:visible !important;
}
.billing-stacked-layout > .billing-register-card{
  grid-column:1 / -1 !important;
  grid-row:2 !important;
  margin-top:0 !important;
  position:static !important;
  max-height:none !important;
  overflow:visible !important;
}
.billing-stacked-layout > .billing-entry-card summary{
  min-height:28px !important;
  padding:4px 0 !important;
}
.billing-stacked-layout > .billing-entry-card summary span{
  font-size:15px !important;
  line-height:1.15 !important;
}
.billing-stacked-layout > .billing-entry-card summary small{
  font-size:11px !important;
}
.billing-stacked-layout > .billing-entry-card br{
  display:none !important;
}
.billing-stacked-layout > .billing-entry-card .billing-form{
  margin-top:6px !important;
  gap:7px !important;
}
.billing-stacked-layout > .billing-entry-card .form-grid-3{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}
.billing-stacked-layout > .billing-entry-card label{
  font-size:11px !important;
  margin-bottom:2px !important;
}
.billing-stacked-layout > .billing-entry-card input,
.billing-stacked-layout > .billing-entry-card select,
.billing-stacked-layout > .billing-entry-card textarea{
  padding:6px 8px !important;
  min-height:32px !important;
  font-size:12px !important;
  border-radius:9px !important;
}
.billing-stacked-layout > .billing-entry-card textarea{
  min-height:48px !important;
}
.billing-stacked-layout > .billing-entry-card .actions{
  margin-top:2px !important;
}
.billing-stacked-layout > .billing-entry-card .btn{
  padding:7px 10px !important;
  min-height:32px !important;
  font-size:12px !important;
}
@media(max-width:1100px){
  .billing-stacked-layout > .billing-entry-card .form-grid-3{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:720px){
  .billing-stacked-layout > .billing-entry-card .form-grid-3{
    grid-template-columns:1fr !important;
  }
}

/* Easy Gmail setup screen */
.email-easy-setup-grid .easy-gmail-card{
  border-left:5px solid var(--gold);
}
.gmail-callback-notice,
.callback-copy-box{
  border-left:5px solid var(--gold);
}
.easy-gmail-card textarea{
  min-height:86px;
}
.mini-instructions summary{
  cursor:pointer;
  font-weight:900;
  color:var(--navy);
}
.mini-instructions ol{
  margin:10px 0 0 18px;
  color:var(--muted);
  line-height:1.55;
}

/* Super Fiduciary rights + clickable Excel reports + live financials */
.clickable-report-card{
  text-decoration:none !important;
  color:inherit !important;
  display:block;
  position:relative;
  transition:transform .12s ease, box-shadow .12s ease;
}
.clickable-report-card:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 34px rgba(16,47,87,.14);
}
.clickable-report-card .badge{
  margin-top:10px;
}
.financial-live-snapshot{
  margin:0 0 10px;
}
.financial-live-notice{
  border-left:5px solid var(--gold);
  margin-bottom:12px;
}
.super-fiduciary-rights-hero{
  margin-bottom:0 !important;
}
.super-rights-grid{
  margin-bottom:4px;
}

/* Owner team management password/actions */
.team-owner-password-note{
  font-size:12px;
  color:var(--muted);
}
.super-fiduciary-rights-page .actions form{
  display:inline-block;
  margin:2px 2px 2px 0;
}

/* Reports Center single Excel button cleanup */
.report-single-excel-box{
  border-left:5px solid var(--gold);
}
.report-single-excel-box .btn-gold{
  white-space:nowrap;
}

/* Clean four-type checklist selector */
.checklist-select-card{
  border-left:5px solid var(--gold);
}
.checklist-select-card select{
  min-height:42px;
}
.checklist-template-page .checklist-template-tabs{
  display:none !important;
}

/* Checklist selected-staff rights cleanup */
.checklist-rights-notice{
  border-left:5px solid var(--gold);
}
.case-team-permissions-page .permission-grid label{
  min-height:30px;
}

/* Billing register compact 1280px width and visible row actions */
body.view-billing .main-view,
body.view-billing .force-three-box-layout main{
  max-width:1280px !important;
  width:min(1280px, calc(100vw - 24px)) !important;
}
body.view-billing{
  --fidmg-billing-page-width:1280px;
}
body.view-billing .billing-register-card{
  overflow:visible !important;
}
body.view-billing .billing-register-card .table-scroll,
body.view-billing .billing-register-card .responsive-table,
body.view-billing .billing-register-card > div{
  max-width:100% !important;
}
body.view-billing .billing-register-card table{
  width:100% !important;
  min-width:1120px !important;
  table-layout:auto !important;
  font-size:11px !important;
  line-height:1.22 !important;
}
body.view-billing .billing-register-card th,
body.view-billing .billing-register-card td{
  font-size:11px !important;
  padding:5px 6px !important;
  vertical-align:top !important;
}
body.view-billing .billing-register-card th:last-child,
body.view-billing .billing-register-card td:last-child{
  min-width:118px !important;
  width:118px !important;
  white-space:normal !important;
}
body.view-billing .billing-register-card .actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:3px !important;
  justify-content:flex-start !important;
}
body.view-billing .billing-register-card .btn-small,
body.view-billing .billing-register-card .btn{
  font-size:10.5px !important;
  padding:4px 6px !important;
  min-height:24px !important;
  border-radius:7px !important;
}
body.view-billing .billing-register-card input[type="checkbox"]{
  transform:scale(.85);
}
body.view-billing .billing-register-card td:nth-child(1),
body.view-billing .billing-register-card th:nth-child(1){width:32px!important;max-width:32px!important;}
body.view-billing .billing-register-card td:nth-child(2),
body.view-billing .billing-register-card th:nth-child(2){width:74px!important;}
body.view-billing .billing-register-card td:nth-child(6),
body.view-billing .billing-register-card th:nth-child(6){width:54px!important;}
body.view-billing .billing-register-card td:nth-child(7),
body.view-billing .billing-register-card th:nth-child(7),
body.view-billing .billing-register-card td:nth-child(8),
body.view-billing .billing-register-card th:nth-child(8),
body.view-billing .billing-register-card td:nth-child(9),
body.view-billing .billing-register-card th:nth-child(9){width:72px!important;}

/* Super Fiduciary settings dashboard */
.super-settings-page .settings-toggle-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.super-settings-page .checkline{
  border:1px solid rgba(16,47,87,.12);
  border-radius:12px;
  padding:8px 10px;
  background:#fff;
}
.super-settings-inline{
  align-self:center;
}
@media(max-width:760px){
  .super-settings-page .settings-toggle-grid{grid-template-columns:1fr;}
  body.view-billing .main-view{width:100%!important;}
}

/* Billing register: editable hours, no client column, compact row width */
body.view-billing .billing-register-card table{
  min-width:1040px !important;
  font-size:10.25px !important;
}
body.view-billing .billing-register-card th,
body.view-billing .billing-register-card td{
  font-size:10.25px !important;
  padding:4px 5px !important;
}
body.view-billing .billing-register-card td:nth-child(2),
body.view-billing .billing-register-card th:nth-child(2){
  width:150px!important;
  max-width:170px!important;
}
body.view-billing .billing-register-card td:nth-child(5),
body.view-billing .billing-register-card th:nth-child(5){
  max-width:210px!important;
}
body.view-billing .billing-register-card td:nth-child(6),
body.view-billing .billing-register-card th:nth-child(6){
  width:78px!important;
}
body.view-billing .billing-register-card td:nth-child(7),
body.view-billing .billing-register-card th:nth-child(7),
body.view-billing .billing-register-card td:nth-child(8),
body.view-billing .billing-register-card th:nth-child(8),
body.view-billing .billing-register-card td:nth-child(9),
body.view-billing .billing-register-card th:nth-child(9),
body.view-billing .billing-register-card td:nth-child(10),
body.view-billing .billing-register-card th:nth-child(10){
  width:66px!important;
}
body.view-billing .billing-register-card th:last-child,
body.view-billing .billing-register-card td:last-child{
  min-width:112px !important;
  width:112px !important;
}
.billing-row-hours-form{
  display:flex;
  gap:3px;
  align-items:center;
  min-width:76px;
}
.billing-row-hours-form input{
  width:48px!important;
  min-height:23px!important;
  padding:3px 4px!important;
  font-size:10px!important;
}
.billing-row-hours-form .btn{
  padding:3px 5px!important;
  min-height:23px!important;
  font-size:9.5px!important;
}

/* Owner/Super Settings dedupe + reports output choice */
.super-toggle-card .toggle-list{
  display:grid;
  gap:8px;
}
.toggle-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto 42px;
  gap:10px;
  align-items:center;
  border:1px solid rgba(16,47,87,.12);
  border-radius:12px;
  padding:8px 10px;
  background:#fff;
}
.toggle-row span{font-weight:800;color:var(--navy);}
.toggle-row em{font-style:normal;font-weight:900;color:var(--muted);font-size:12px;text-transform:uppercase;}
.toggle-row input{width:20px;height:20px;}
.report-output-actions{justify-content:flex-start;gap:10px;}
.report-preview-page .report-preview-wrap{max-width:1280px;margin:0 auto;padding:24px;}
.report-preview-page table{width:100%;border-collapse:collapse;font-size:12px;}
.report-preview-page th,.report-preview-page td{border:1px solid #d8e0ea;padding:6px 8px;text-align:left;vertical-align:top;}
.report-preview-page th{background:#102f57;color:#fff;position:sticky;top:0;}
.report-preview-page .preview-table-shell{overflow:auto;border:1px solid #d8e0ea;border-radius:14px;background:#fff;}


/* Billing Register: remove Status column and keep Hours save button from covering the hours value */
body.view-billing .billing-register-card table{
  min-width:1000px !important;
}
body.view-billing .billing-register-card th,
body.view-billing .billing-register-card td{
  font-size:10px !important;
  padding:4px 5px !important;
}
body.view-billing .billing-register-card td:nth-child(6),
body.view-billing .billing-register-card th:nth-child(6){
  width:86px!important;
  min-width:86px!important;
  max-width:92px!important;
}
body.view-billing .billing-register-card td:nth-child(7),
body.view-billing .billing-register-card th:nth-child(7),
body.view-billing .billing-register-card td:nth-child(8),
body.view-billing .billing-register-card th:nth-child(8),
body.view-billing .billing-register-card td:nth-child(9),
body.view-billing .billing-register-card th:nth-child(9),
body.view-billing .billing-register-card td:nth-child(10),
body.view-billing .billing-register-card th:nth-child(10){
  width:64px!important;
  max-width:72px!important;
}
.billing-row-hours-form{
  display:grid!important;
  grid-template-columns:52px 26px!important;
  gap:3px!important;
  align-items:center!important;
  min-width:82px!important;
}
.billing-row-hours-form input{
  width:52px!important;
  max-width:52px!important;
  min-height:22px!important;
  padding:2px 3px!important;
  font-size:10px!important;
  text-align:right!important;
}
.billing-row-hours-form .billing-hours-save{
  width:26px!important;
  min-width:26px!important;
  max-width:26px!important;
  padding:2px 0!important;
  min-height:22px!important;
  font-size:9px!important;
  line-height:1!important;
  text-align:center!important;
}
body.view-billing .billing-register-card th:last-child,
body.view-billing .billing-register-card td:last-child{
  min-width:108px!important;
  width:108px!important;
}

/* Billing Register: payments moved to Line Item Payment History only */
.billing-register-card table th,
.billing-register-card table td{
  white-space:normal;
}
.billing-register-card .actions{
  min-width:110px;
}
.case-summary-billing-table .actions{
  min-width:110px;
}


/* Billing Register: larger Date and Hours columns, no number arrows over hours */
body.view-billing .billing-register-card table{
  min-width:1100px !important;
}
body.view-billing .billing-register-card td:nth-child(1),
body.view-billing .billing-register-card th:nth-child(1){
  width:96px!important;
  min-width:96px!important;
  max-width:110px!important;
  white-space:nowrap!important;
}
body.view-billing .billing-register-card td:nth-child(6),
body.view-billing .billing-register-card th:nth-child(6){
  width:118px!important;
  min-width:118px!important;
  max-width:128px!important;
}
.billing-row-hours-form{
  display:grid!important;
  grid-template-columns:74px 30px!important;
  gap:5px!important;
  align-items:center!important;
  min-width:112px!important;
}
.billing-row-hours-form input[type="number"]{
  width:74px!important;
  max-width:74px!important;
  min-height:24px!important;
  padding:3px 6px!important;
  font-size:10.5px!important;
  text-align:right!important;
  -moz-appearance:textfield!important;
  appearance:textfield!important;
}
.billing-row-hours-form input[type="number"]::-webkit-outer-spin-button,
.billing-row-hours-form input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance:none!important;
  margin:0!important;
}
.billing-row-hours-form .billing-hours-save{
  width:30px!important;
  min-width:30px!important;
  max-width:30px!important;
  padding:2px 0!important;
  min-height:24px!important;
  font-size:9px!important;
  line-height:1!important;
  text-align:center!important;
}


/* Billing Register: wider date column and hours dropdown instead of number arrows */
body.view-billing .billing-register-card td:nth-child(1),
body.view-billing .billing-register-card th:nth-child(1){
  width:120px!important;
  min-width:120px!important;
  max-width:132px!important;
  white-space:nowrap!important;
}
body.view-billing .billing-register-card td:nth-child(6),
body.view-billing .billing-register-card th:nth-child(6){
  width:142px!important;
  min-width:142px!important;
  max-width:150px!important;
}
body.view-billing .billing-register-card .billing-row-hours-form{
  display:grid!important;
  grid-template-columns:96px 30px!important;
  gap:6px!important;
  align-items:center!important;
  min-width:132px!important;
}
body.view-billing .billing-register-card .billing-row-hours-select{
  width:96px!important;
  min-width:96px!important;
  max-width:96px!important;
  min-height:26px!important;
  padding:3px 6px!important;
  font-size:10.5px!important;
  line-height:1.15!important;
}
body.view-billing .billing-register-card .billing-row-hours-form input[type="number"]{
  -moz-appearance:textfield!important;
  appearance:textfield!important;
}
body.view-billing .billing-register-card .billing-row-hours-form input[type="number"]::-webkit-outer-spin-button,
body.view-billing .billing-register-card .billing-row-hours-form input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance:none!important;
  margin:0!important;
}
body.view-billing .billing-register-card .billing-hours-save{
  width:30px!important;
  min-width:30px!important;
  max-width:30px!important;
  min-height:26px!important;
  padding:2px 0!important;
}

/* Reports: billing filter uses case names */
.report-single-excel-box select[name="case_id"]{
  min-width:260px;
}

/* Case-name billing organization */
.billing-filters-card select[name="billing_case_id"],
.report-single-excel-box select[name="case_id"]{
  min-width:260px;
}
.case-balance-table th:first-child,
.case-balance-table td:first-child{
  min-width:220px;
}

/* Billing Register total/balance cleanup */
.billing-register-card table th:nth-child(8),
.billing-register-card table td:nth-child(8){
  min-width:88px;
}
.billing-register-card table th:last-child,
.billing-register-card table td:last-child{
  min-width:118px;
}

/* General and case-specific billing registers */
.case-summary-billing-table.court-billing-register th:first-child,
.case-summary-billing-table.court-billing-register td:first-child{
  min-width:115px;
  white-space:nowrap;
}
.billing-filters-card .actions .btn{
  margin-bottom:4px;
}


/* Master Fiduciary secure data dashboard */
.secure-data-dashboard .secure-data-hero p{max-width:920px;}
.secure-data-summary-grid{align-items:stretch;}
.secure-data-type-card{position:relative;overflow:hidden;}
.secure-data-type-card .pill{margin-top:12px;display:inline-flex;}
.secure-data-case-table th:first-child,
.secure-data-case-table td:first-child{min-width:210px;}
.secure-data-case-table .actions{min-width:250px;}
.secure-data-reveal-card .secure-data-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;}
.secure-data-reveal-card .mini-field{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px;}
.secure-data-reveal-card .mini-field strong{display:block;color:var(--navy);font-size:12px;text-transform:uppercase;letter-spacing:.04em;}
.secure-data-reveal-card .mini-field span{display:block;margin-top:4px;font-weight:800;color:var(--ink);}
.secure-health-table th,.secure-health-table td{vertical-align:top;}
@media(max-width:1180px){.secure-data-reveal-card .secure-data-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.secure-data-case-table .actions{min-width:0;}}
@media(max-width:720px){.secure-data-reveal-card .secure-data-grid{grid-template-columns:1fr;}}

/* Secure Data entry forms */
.secure-data-entry-grid{
  align-items:start;
}
.secure-data-entry-card textarea{
  min-height:74px;
}
.secure-data-entry-card select,
.secure-data-entry-card input,
.secure-data-entry-card textarea{
  width:100%;
}
.secure-data-entry-card .section-head{
  align-items:flex-start;
}
.secure-data-case-table .actions{
  min-width:260px;
}

/* Accounting dashboard */
.accounting-dashboard .accounting-register-table th,
.accounting-dashboard .accounting-register-table td{
  font-size:12px;
  vertical-align:top;
}
.accounting-dashboard .accounting-register-table th:nth-child(1),
.accounting-dashboard .accounting-register-table td:nth-child(1){
  min-width:105px;
  white-space:nowrap;
}
.accounting-dashboard .accounting-register-table th:nth-child(2),
.accounting-dashboard .accounting-register-table td:nth-child(2){
  min-width:190px;
}
.accounting-dashboard .accounting-register-table th:nth-child(13),
.accounting-dashboard .accounting-register-table td:nth-child(13){
  min-width:120px;
}
.accounting-dashboard .actions form{
  display:inline-block;
  margin:2px;
}
.accounting-ready-list{
  display:grid;
  gap:8px;
}
.accounting-doc-table th:first-child,
.accounting-doc-table td:first-child{
  min-width:180px;
}
.accounting-entry-card textarea,
.accounting-docs-grid textarea{
  min-height:78px;
}


/* Accounting dashboard width fix: fit inside the same width as the top menu */
body.view-accounting{
  overflow-x:hidden !important;
}
body.view-accounting main,
body.view-accounting .main-view,
body.view-accounting .force-three-box-layout main{
  max-width:100% !important;
  width:100% !important;
  overflow-x:hidden !important;
}
body.view-accounting .accounting-dashboard{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
  overflow-x:hidden !important;
  align-items:start !important;
}
body.view-accounting .accounting-dashboard > *,
body.view-accounting .accounting-dashboard .card,
body.view-accounting .accounting-dashboard details,
body.view-accounting .accounting-dashboard .panel-dashboard-hero{
  max-width:100% !important;
  min-width:0 !important;
}
body.view-accounting .accounting-entry-grid,
body.view-accounting .accounting-docs-grid,
body.view-accounting .accounting-stat-grid{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
}
body.view-accounting .accounting-entry-grid,
body.view-accounting .accounting-docs-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
}
body.view-accounting .accounting-stat-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}
body.view-accounting .accounting-dashboard .form-grid-3{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  max-width:100% !important;
  min-width:0 !important;
}
body.view-accounting .accounting-dashboard input,
body.view-accounting .accounting-dashboard select,
body.view-accounting .accounting-dashboard textarea{
  max-width:100% !important;
  min-width:0 !important;
}

/* Wide register stays inside the card instead of widening the whole page */
body.view-accounting #accounting-register{
  overflow:hidden !important;
}
body.view-accounting #accounting-register .table-scroll{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow-x:auto !important;
  overflow-y:visible !important;
  -webkit-overflow-scrolling:touch;
  border-radius:16px;
}
body.view-accounting .accounting-register-table{
  width:100% !important;
  min-width:1120px !important;
  max-width:none !important;
  table-layout:fixed !important;
  font-size:10.5px !important;
  line-height:1.18 !important;
}
body.view-accounting .accounting-register-table th,
body.view-accounting .accounting-register-table td{
  font-size:10.5px !important;
  padding:5px 6px !important;
  vertical-align:top !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
}
body.view-accounting .accounting-register-table th:nth-child(1),
body.view-accounting .accounting-register-table td:nth-child(1){
  width:86px !important;
  min-width:86px !important;
  white-space:nowrap !important;
}
body.view-accounting .accounting-register-table th:nth-child(2),
body.view-accounting .accounting-register-table td:nth-child(2){
  width:150px !important;
  min-width:150px !important;
}
body.view-accounting .accounting-register-table th:nth-child(3),
body.view-accounting .accounting-register-table td:nth-child(3){
  width:90px !important;
}
body.view-accounting .accounting-register-table th:nth-child(4),
body.view-accounting .accounting-register-table td:nth-child(4){
  width:82px !important;
}
body.view-accounting .accounting-register-table th:nth-child(5),
body.view-accounting .accounting-register-table td:nth-child(5){
  width:130px !important;
}
body.view-accounting .accounting-register-table th:nth-child(6),
body.view-accounting .accounting-register-table td:nth-child(6){
  width:100px !important;
}
body.view-accounting .accounting-register-table th:nth-child(7),
body.view-accounting .accounting-register-table td:nth-child(7){
  width:105px !important;
}
body.view-accounting .accounting-register-table th:nth-child(8),
body.view-accounting .accounting-register-table td:nth-child(8){
  width:175px !important;
}
body.view-accounting .accounting-register-table th:nth-child(9),
body.view-accounting .accounting-register-table td:nth-child(9),
body.view-accounting .accounting-register-table th:nth-child(10),
body.view-accounting .accounting-register-table td:nth-child(10),
body.view-accounting .accounting-register-table th:nth-child(11),
body.view-accounting .accounting-register-table td:nth-child(11){
  width:78px !important;
  white-space:nowrap !important;
}
body.view-accounting .accounting-register-table th:nth-child(12),
body.view-accounting .accounting-register-table td:nth-child(12){
  width:68px !important;
  white-space:nowrap !important;
}
body.view-accounting .accounting-register-table th:nth-child(13),
body.view-accounting .accounting-register-table td:nth-child(13){
  width:95px !important;
  min-width:95px !important;
}
body.view-accounting .accounting-register-table .actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:3px !important;
}
body.view-accounting .accounting-register-table .actions form{
  display:inline-flex !important;
  margin:0 !important;
}
body.view-accounting .accounting-register-table .btn-small,
body.view-accounting .accounting-register-table .btn{
  font-size:10px !important;
  padding:4px 6px !important;
  min-height:24px !important;
  border-radius:7px !important;
}
body.view-accounting .accounting-doc-table{
  width:100% !important;
  table-layout:auto !important;
}
body.view-accounting .accounting-doc-table th,
body.view-accounting .accounting-doc-table td{
  overflow-wrap:anywhere !important;
}

/* Medium screens: stack dashboard cards before they overflow */
@media(max-width:1180px){
  body.view-accounting .accounting-entry-grid,
  body.view-accounting .accounting-docs-grid{
    grid-template-columns:1fr !important;
  }
  body.view-accounting .accounting-stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  body.view-accounting .accounting-dashboard .form-grid-3{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:760px){
  body.view-accounting .accounting-stat-grid,
  body.view-accounting .accounting-dashboard .form-grid-3{
    grid-template-columns:1fr !important;
  }
}


/* Accounting dashboard 1280 proportional fit */
body.view-accounting{
  overflow-x:hidden !important;
}
body.view-accounting main,
body.view-accounting .main-view,
body.view-accounting .force-three-box-layout main{
  max-width:1280px !important;
  width:min(1280px, calc(100vw - 24px)) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:14px !important;
  padding-right:14px !important;
  overflow-x:hidden !important;
  box-sizing:border-box !important;
}
body.view-accounting .workspace-top-menu-revised{
  max-width:1280px !important;
  width:calc(100% + 28px) !important;
  margin-left:-14px !important;
  margin-right:-14px !important;
  box-sizing:border-box !important;
}
body.view-accounting .page-heading,
body.view-accounting .accounting-dashboard,
body.view-accounting .accounting-dashboard > *,
body.view-accounting .accounting-dashboard .card,
body.view-accounting .accounting-dashboard details,
body.view-accounting .accounting-dashboard .panel-dashboard-hero{
  max-width:100% !important;
  width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
body.view-accounting .accounting-dashboard{
  display:grid !important;
  gap:12px !important;
  overflow-x:hidden !important;
}
body.view-accounting .accounting-dashboard .panel-dashboard-hero{
  padding:16px 18px !important;
  border-radius:22px !important;
}
body.view-accounting .accounting-dashboard .panel-dashboard-hero h2{
  font-size:24px !important;
  line-height:1.12 !important;
}
body.view-accounting .accounting-dashboard .panel-dashboard-hero p{
  font-size:13px !important;
  line-height:1.35 !important;
  max-width:760px !important;
}
body.view-accounting .accounting-dashboard .card{
  padding:14px !important;
  border-radius:18px !important;
}
body.view-accounting .accounting-dashboard .section-head{
  gap:10px !important;
  margin-bottom:10px !important;
}
body.view-accounting .accounting-dashboard h3{
  font-size:17px !important;
  line-height:1.2 !important;
}
body.view-accounting .accounting-dashboard p,
body.view-accounting .accounting-dashboard small{
  font-size:12px !important;
  line-height:1.35 !important;
}

/* Compact all accounting grids inside 1280 */
body.view-accounting .accounting-stat-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
}
body.view-accounting .accounting-entry-grid,
body.view-accounting .accounting-docs-grid{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:12px !important;
  max-width:100% !important;
  min-width:0 !important;
}
body.view-accounting .accounting-dashboard .form-grid-3{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:8px !important;
  max-width:100% !important;
  min-width:0 !important;
}
body.view-accounting .accounting-dashboard label{
  font-size:10px !important;
  margin-bottom:3px !important;
  letter-spacing:.035em !important;
}
body.view-accounting .accounting-dashboard input,
body.view-accounting .accounting-dashboard select,
body.view-accounting .accounting-dashboard textarea{
  max-width:100% !important;
  min-width:0 !important;
  min-height:32px !important;
  padding:7px 8px !important;
  border-radius:10px !important;
  font-size:12px !important;
  line-height:1.2 !important;
}
body.view-accounting .accounting-dashboard textarea{
  min-height:58px !important;
}
body.view-accounting .accounting-dashboard .btn,
body.view-accounting .accounting-dashboard .btn-small{
  font-size:10.5px !important;
  line-height:1.1 !important;
  padding:6px 8px !important;
  min-height:27px !important;
  border-radius:8px !important;
}
body.view-accounting .accounting-dashboard .badge{
  font-size:10px !important;
  padding:4px 7px !important;
}

/* Accounting register must fit the 1280 page without widening the page */
body.view-accounting #accounting-register{
  overflow:hidden !important;
  padding:12px !important;
}
body.view-accounting #accounting-register .table-scroll{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow-x:hidden !important;
  overflow-y:visible !important;
}
body.view-accounting .accounting-register-table{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  table-layout:fixed !important;
  border-collapse:collapse !important;
}
body.view-accounting .accounting-register-table th,
body.view-accounting .accounting-register-table td{
  font-size:9px !important;
  line-height:1.12 !important;
  padding:3px 3px !important;
  vertical-align:top !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
}
body.view-accounting .accounting-register-table th{
  font-size:8.5px !important;
  line-height:1.05 !important;
  text-transform:none !important;
}
body.view-accounting .accounting-register-table th:nth-child(1),
body.view-accounting .accounting-register-table td:nth-child(1){width:7% !important;white-space:nowrap !important;}
body.view-accounting .accounting-register-table th:nth-child(2),
body.view-accounting .accounting-register-table td:nth-child(2){width:13% !important;}
body.view-accounting .accounting-register-table th:nth-child(3),
body.view-accounting .accounting-register-table td:nth-child(3){width:7% !important;}
body.view-accounting .accounting-register-table th:nth-child(4),
body.view-accounting .accounting-register-table td:nth-child(4){width:6% !important;}
body.view-accounting .accounting-register-table th:nth-child(5),
body.view-accounting .accounting-register-table td:nth-child(5){width:11% !important;}
body.view-accounting .accounting-register-table th:nth-child(6),
body.view-accounting .accounting-register-table td:nth-child(6){width:7.5% !important;}
body.view-accounting .accounting-register-table th:nth-child(7),
body.view-accounting .accounting-register-table td:nth-child(7){width:7.5% !important;}
body.view-accounting .accounting-register-table th:nth-child(8),
body.view-accounting .accounting-register-table td:nth-child(8){width:12% !important;}
body.view-accounting .accounting-register-table th:nth-child(9),
body.view-accounting .accounting-register-table td:nth-child(9),
body.view-accounting .accounting-register-table th:nth-child(10),
body.view-accounting .accounting-register-table td:nth-child(10),
body.view-accounting .accounting-register-table th:nth-child(11),
body.view-accounting .accounting-register-table td:nth-child(11){
  width:6% !important;
  white-space:normal !important;
}
body.view-accounting .accounting-register-table th:nth-child(12),
body.view-accounting .accounting-register-table td:nth-child(12){width:5% !important;}
body.view-accounting .accounting-register-table th:nth-child(13),
body.view-accounting .accounting-register-table td:nth-child(13){width:6% !important;}
body.view-accounting .accounting-register-table .actions{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:2px !important;
  min-width:0 !important;
}
body.view-accounting .accounting-register-table .actions form{
  display:block !important;
  width:100% !important;
  margin:0 !important;
}
body.view-accounting .accounting-register-table .btn,
body.view-accounting .accounting-register-table .btn-small{
  width:100% !important;
  min-width:0 !important;
  font-size:8.5px !important;
  padding:3px 2px !important;
  min-height:20px !important;
  border-radius:5px !important;
}
body.view-accounting .accounting-register-table .badge{
  font-size:8px !important;
  padding:2px 4px !important;
}
body.view-accounting .accounting-register-table tfoot th{
  font-size:9px !important;
  padding:4px 3px !important;
}

/* Accounting document table also stays inside 1280 */
body.view-accounting .accounting-doc-table{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
body.view-accounting .accounting-doc-table th,
body.view-accounting .accounting-doc-table td{
  font-size:10px !important;
  padding:4px !important;
  overflow-wrap:anywhere !important;
}
body.view-accounting .accounting-doc-table th:nth-child(1),
body.view-accounting .accounting-doc-table td:nth-child(1){width:32% !important;}
body.view-accounting .accounting-doc-table th:nth-child(2),
body.view-accounting .accounting-doc-table td:nth-child(2){width:38% !important;}
body.view-accounting .accounting-doc-table th:nth-child(3),
body.view-accounting .accounting-doc-table td:nth-child(3){width:12% !important;}
body.view-accounting .accounting-doc-table th:nth-child(4),
body.view-accounting .accounting-doc-table td:nth-child(4){width:18% !important;}

/* Smaller widths still remain usable */
@media(max-width:1180px){
  body.view-accounting main,
  body.view-accounting .main-view,
  body.view-accounting .force-three-box-layout main{
    width:calc(100vw - 16px) !important;
    padding-left:8px !important;
    padding-right:8px !important;
  }
  body.view-accounting .workspace-top-menu-revised{
    width:calc(100% + 16px) !important;
    margin-left:-8px !important;
    margin-right:-8px !important;
  }
  body.view-accounting .accounting-entry-grid,
  body.view-accounting .accounting-docs-grid{
    grid-template-columns:1fr !important;
  }
  body.view-accounting .accounting-stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  body.view-accounting #accounting-register .table-scroll{
    overflow-x:auto !important;
  }
  body.view-accounting .accounting-register-table{
    min-width:980px !important;
  }
}
@media(max-width:760px){
  body.view-accounting .accounting-stat-grid,
  body.view-accounting .accounting-dashboard .form-grid-3{
    grid-template-columns:1fr !important;
  }
  body.view-accounting .accounting-register-table{
    min-width:920px !important;
  }
}


/* Accounting real narrow fit: compact 8-column register */
body.view-accounting .accounting-register-table-compact th:nth-child(1),
body.view-accounting .accounting-register-table-compact td:nth-child(1){width:8%!important;}
body.view-accounting .accounting-register-table-compact th:nth-child(2),
body.view-accounting .accounting-register-table-compact td:nth-child(2){width:16%!important;}
body.view-accounting .accounting-register-table-compact th:nth-child(3),
body.view-accounting .accounting-register-table-compact td:nth-child(3){width:10%!important;}
body.view-accounting .accounting-register-table-compact th:nth-child(4),
body.view-accounting .accounting-register-table-compact td:nth-child(4){width:14%!important;}
body.view-accounting .accounting-register-table-compact th:nth-child(5),
body.view-accounting .accounting-register-table-compact td:nth-child(5){width:13%!important;}
body.view-accounting .accounting-register-table-compact th:nth-child(6),
body.view-accounting .accounting-register-table-compact td:nth-child(6){width:20%!important;}
body.view-accounting .accounting-register-table-compact th:nth-child(7),
body.view-accounting .accounting-register-table-compact td:nth-child(7){width:8%!important;}
body.view-accounting .accounting-register-table-compact th:nth-child(8),
body.view-accounting .accounting-register-table-compact td:nth-child(8){width:11%!important;}


/* Accounting stack-to-menu-width screenshot fix */
body.view-accounting .accounting-menu-width-shell{
  max-width:100%!important;
  width:100%!important;
  min-width:0!important;
  display:grid!important;
  gap:10px!important;
  overflow-x:hidden!important;
}
body.view-accounting .accounting-entry-grid,
body.view-accounting .accounting-docs-grid{
  grid-template-columns:1fr!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
body.view-accounting .accounting-ready-card{
  width:100%!important;
  max-width:100%!important;
}
body.view-accounting .accounting-ready-list{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px 10px!important;
}
body.view-accounting .accounting-stat-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
}
body.view-accounting .accounting-stat-grid .icon{
  display:none!important;
}
body.view-accounting #accounting-register,
body.view-accounting #accounting-register .table-scroll{
  max-width:100%!important;
  width:100%!important;
  overflow-x:hidden!important;
}
@media(max-width:900px){
  body.view-accounting .accounting-stat-grid,
  body.view-accounting .accounting-ready-list{
    grid-template-columns:1fr!important;
  }
  body.view-accounting #accounting-register .table-scroll{
    overflow-x:auto!important;
  }
  body.view-accounting .accounting-register-table-compact{
    min-width:760px!important;
  }
}


/* Case Summary: compact secondary cards below Case Data */
.case-summary-page .case-summary-secondary-below-data{
  display:grid!important;
  gap:8px!important;
  margin-top:0!important;
}
.case-summary-page .case-summary-stat-grid-small{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
.case-summary-page .case-summary-stat-grid-small .card.stat{
  min-height:54px!important;
  padding:8px 10px!important;
  border-radius:14px!important;
}
.case-summary-page .case-summary-stat-grid-small .card.stat .icon{
  display:none!important;
}
.case-summary-page .case-summary-stat-grid-small .label{
  font-size:9.5px!important;
  line-height:1.1!important;
  letter-spacing:.035em!important;
}
.case-summary-page .case-summary-stat-grid-small .number{
  font-size:15px!important;
  line-height:1.1!important;
}
.case-summary-page .case-summary-action-grid-small{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:7px!important;
}
.case-summary-page .case-summary-action-grid-small .panel-dashboard-card{
  min-height:66px!important;
  padding:9px 10px!important;
  border-radius:14px!important;
}
.case-summary-page .case-summary-action-grid-small .panel-dashboard-card strong{
  font-size:12px!important;
  line-height:1.1!important;
  margin-bottom:3px!important;
}
.case-summary-page .case-summary-action-grid-small .panel-dashboard-card span{
  font-size:10px!important;
  line-height:1.2!important;
}
.case-summary-page .case-summary-data-card table th,
.case-summary-page .case-summary-data-card table td{
  font-size:12px!important;
  padding:6px 8px!important;
}
@media(max-width:1000px){
  .case-summary-page .case-summary-action-grid-small{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .case-summary-page .case-summary-stat-grid-small{grid-template-columns:1fr!important;}
}
@media(max-width:640px){
  .case-summary-page .case-summary-action-grid-small{grid-template-columns:1fr!important;}
}


/* Firm Financials + compact financial summary cards */
body.view-financials .panel-dashboard-hero .eyebrow,
body.view-financials .panel-dashboard-hero h2{
  font-size:18px !important;
}
body.view-financials .panel-dashboard-hero h2{
  font-size:24px !important;
  line-height:1.12 !important;
}
body.view-financials .panel-dashboard-hero p{
  font-size:12px !important;
  line-height:1.35 !important;
}
body.view-financials .financial-live-snapshot{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:8px !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 0 8px !important;
}
body.view-financials .financial-live-snapshot .card.stat{
  padding:8px 9px !important;
  min-height:58px !important;
  border-radius:13px !important;
  display:grid !important;
  grid-template-columns:1fr 20px !important;
  align-items:center !important;
  gap:6px !important;
}
body.view-financials .financial-live-snapshot .label{
  font-size:9px !important;
  line-height:1.05 !important;
  letter-spacing:.03em !important;
  text-transform:uppercase !important;
  white-space:normal !important;
}
body.view-financials .financial-live-snapshot .number{
  font-size:15px !important;
  line-height:1.05 !important;
  letter-spacing:-.03em !important;
  margin-top:3px !important;
}
body.view-financials .financial-live-snapshot .icon{
  width:20px !important;
  height:20px !important;
  min-width:20px !important;
  border-radius:7px !important;
  font-size:9px !important;
  line-height:1 !important;
}
@media(max-width:900px){
  body.view-financials .financial-live-snapshot{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:560px){
  body.view-financials .financial-live-snapshot{
    grid-template-columns:1fr !important;
  }
}

/* Revenue module compact six-card summary */
body.view-revenue .revenue-live-stat-grid,
.revenue-live-stat-grid-compact{
  display:grid !important;
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  gap:8px !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 0 8px !important;
}
body.view-revenue .revenue-live-stat-grid .card.stat,
.revenue-live-stat-grid-compact .card.stat{
  padding:8px 8px !important;
  min-height:58px !important;
  border-radius:13px !important;
  display:grid !important;
  grid-template-columns:1fr 18px !important;
  align-items:center !important;
  gap:5px !important;
}
body.view-revenue .revenue-live-stat-grid .label,
.revenue-live-stat-grid-compact .label{
  font-size:8.5px !important;
  line-height:1.05 !important;
  letter-spacing:.025em !important;
  text-transform:uppercase !important;
  white-space:normal !important;
}
body.view-revenue .revenue-live-stat-grid .number,
.revenue-live-stat-grid-compact .number{
  font-size:13.5px !important;
  line-height:1.05 !important;
  letter-spacing:-.035em !important;
  margin-top:3px !important;
}
body.view-revenue .revenue-live-stat-grid .icon,
.revenue-live-stat-grid-compact .icon{
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  border-radius:6px !important;
  font-size:8.5px !important;
  line-height:1 !important;
}
@media(max-width:1180px){
  body.view-revenue .revenue-live-stat-grid,
  .revenue-live-stat-grid-compact{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}
@media(max-width:700px){
  body.view-revenue .revenue-live-stat-grid,
  .revenue-live-stat-grid-compact{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:480px){
  body.view-revenue .revenue-live-stat-grid,
  .revenue-live-stat-grid-compact{
    grid-template-columns:1fr !important;
  }
}


/* Super settings, report width, and inside-site logo fix */
.fidmg-site-topnav .fidmg-topnav-logo{
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  display:grid !important;
  place-items:center !important;
}
.fidmg-site-topnav .fidmg-topnav-logo .brand-mark,
.fidmg-site-topnav .fidmg-topnav-logo svg,
.fidmg-site-topnav .fidmg-topnav-logo img{
  width:42px !important;
  height:42px !important;
  max-width:42px !important;
  max-height:42px !important;
  display:block !important;
}
.report-preview-page{
  margin:0 !important;
  overflow-x:hidden !important;
  background:#f6f8fb !important;
}
.report-preview-wrap{
  max-width:1280px !important;
  width:min(1280px, calc(100vw - 24px)) !important;
  margin:0 auto !important;
  padding:18px 12px !important;
  box-sizing:border-box !important;
  overflow-x:hidden !important;
}
.report-preview-wrap .panel-dashboard-hero,
.report-preview-wrap .card{
  max-width:100% !important;
  box-sizing:border-box !important;
}
.preview-table-shell{
  width:100% !important;
  max-width:100% !important;
  overflow-x:auto !important;
  overflow-y:visible !important;
  -webkit-overflow-scrolling:touch;
  border:1px solid var(--line) !important;
  border-radius:18px !important;
  background:#fff !important;
  box-sizing:border-box !important;
}
.preview-table-shell table{
  display:table !important;
  width:max-content !important;
  min-width:100% !important;
  max-width:none !important;
  table-layout:auto !important;
  border:0 !important;
  border-radius:0 !important;
}
.preview-table-shell thead,
.preview-table-shell tbody,
.preview-table-shell tfoot{
  min-width:0 !important;
}
.preview-table-shell th,
.preview-table-shell td{
  font-size:12px !important;
  padding:8px 10px !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  max-width:260px !important;
}
.report-single-excel-box{
  max-width:100% !important;
  overflow:hidden !important;
}
.report-output-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
}


/* Secure data edit area and encrypted document folders */
.secure-case-edit-box{
  margin-top:14px;
  padding:12px;
  border:1px solid rgba(201,154,55,.28);
  border-left:5px solid var(--gold);
  border-radius:16px;
  background:var(--cream);
}
.secure-case-edit-box h3{
  font-size:15px !important;
  margin:0 0 5px !important;
}
.secure-case-edit-box p{
  font-size:12px !important;
  line-height:1.35 !important;
  margin:0 0 8px !important;
}
.folder-document-row{
  display:grid;
  grid-template-columns:24px 24px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:7px 9px;
  margin:4px 0 4px 22px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
}
.folder-document-row.level-2{margin-left:48px;}
.mini-doc-icon{
  width:18px;
  height:22px;
  border:2px solid var(--navy);
  border-radius:4px;
  background:#fff;
  position:relative;
}
.mini-doc-icon:after{
  content:'';
  position:absolute;
  right:-2px;
  top:-2px;
  width:7px;
  height:7px;
  background:var(--cream);
  border-left:2px solid var(--navy);
  border-bottom:2px solid var(--navy);
}
.folder-doc-actions{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.folder-doc-actions .btn-small{
  padding:5px 8px !important;
  font-size:10px !important;
}
.document-encryption-notice{
  border-left:5px solid var(--gold);
}
@media(max-width:760px){
  .folder-document-row{
    grid-template-columns:20px 20px minmax(0,1fr);
  }
  .folder-doc-actions{
    grid-column:1 / -1;
    justify-content:flex-start;
  }
}


/* Documents centralization + combined reports/exports */
.accounting-docs-centralized{
  border-left:5px solid var(--gold);
}
.accounting-docs-centralized .actions{
  margin-top:10px;
}
.report-output-actions,
.report-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}


/* Secured Items Dashboard */
.secured-items-dashboard-cards{
  margin-bottom:10px;
}
.secured-items-dashboard-card{
  text-decoration:none !important;
  color:inherit !important;
  display:block;
  border-left:5px solid var(--gold);
}
.secured-items-dashboard-card h3{
  margin-bottom:6px;
}
.secured-items-dashboard-card .btn{
  margin-top:12px;
}
.secured-items-owner-notice{
  border-left:5px solid var(--gold);
}
.secured-items-owner-notice a{
  color:var(--navy);
  font-weight:950;
  text-decoration:underline;
}
#financial-secure-items,
#health-secure-items,
#enter-financial-secured-items,
#enter-health-secured-items,
#enter-secured-items,
#see-secured-items{
  scroll-margin-top:110px;
}


/* Sync.com Phase 1 / Phase 2 document vault links */
.sync-documents-grid{
  align-items:start;
}
.sync-settings-card,
.sync-how-card{
  border-left:5px solid var(--gold);
}
.sync-example-box{
  margin-top:14px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f8fafc;
}
.sync-example-box code{
  display:block;
  white-space:pre-wrap;
  margin-top:8px;
  color:var(--navy);
  font-size:12px;
  line-height:1.45;
}
.sync-action-buttons{
  display:inline-flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}
.case-folder-heading-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  align-items:center;
  justify-content:flex-end;
}
.folder-sync-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  padding:6px 8px 6px 44px;
  border-left:3px solid var(--gold);
  background:#fffaf0;
  border-radius:12px;
  margin:4px 0 4px 18px;
}
.folder-sync-row.level-2{
  margin-left:42px;
}
@media(max-width:760px){
  .case-folder-heading-actions{
    justify-content:flex-start;
  }
}


/* Uploaded Documents tab reliability fix */
.document-mode-tabs{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  align-items:center !important;
  margin-bottom:12px !important;
}
.document-mode-tabs a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:40px !important;
  padding:10px 14px !important;
  border-radius:999px !important;
  border:1px solid var(--line) !important;
  background:#fff !important;
  color:var(--navy) !important;
  text-decoration:none !important;
  font-weight:900 !important;
  position:relative !important;
  z-index:3 !important;
  pointer-events:auto !important;
}
.document-mode-tabs a.active{
  background:var(--navy) !important;
  color:#fff !important;
  border-color:var(--navy) !important;
}
.documents-tab-anchor,
#uploaded-documents,
#document-index,
#upload-doc-form,
#case-folder-structure,
#sync-settings{
  scroll-margin-top:115px;
}
.uploaded-documents-open-card{
  border-left:5px solid var(--gold);
}
.uploaded-documents-open-card .actions{
  margin-top:10px;
}


/* Sync secure links dashboard and folder delete controls */
.sync-links-dashboard .panel-dashboard-hero,
.sync-links-moved-card,
.sync-settings-card,
.sync-how-card{
  border-left:5px solid var(--gold);
}
.sync-subhead{
  padding:9px 12px;
  border-radius:12px;
  background:#f8fafc;
  color:var(--navy);
  font-weight:950;
  border:1px solid var(--line);
}
.folder-delete-form{
  display:flex;
  justify-content:flex-end;
  margin:-2px 0 8px;
}
.folder-delete-form .btn{
  font-size:11px;
  padding:6px 9px;
}
.secure-sync-buttons{
  display:inline-flex;
  flex-wrap:wrap;
  gap:6px;
}
#secured-sync-folders,
#sync-case-links,
#sync-settings{
  scroll-margin-top:115px;
}


/* Sync Links moved to Settings + compact document folder tree */
.settings-sync-links-card,
.super-settings-sync-links-card,
.practice-sync-links-card{
  border-left:5px solid var(--gold);
}
.documents-sync-note{
  font-size:12px !important;
  line-height:1.3 !important;
  border-left:5px solid var(--gold);
}
.case-folder-tree,
.case-folder-tree *{
  font-size:11px !important;
}
.case-folder-group{
  padding:9px !important;
  border-radius:14px !important;
  margin-bottom:8px !important;
}
.case-folder-heading{
  padding:6px 8px !important;
  min-height:auto !important;
}
.case-folder-title{
  font-size:12.5px !important;
  line-height:1.15 !important;
}
.case-folder-subtitle{
  font-size:10px !important;
  line-height:1.15 !important;
}
.case-folder-count{
  font-size:10px !important;
  padding:4px 6px !important;
}
.case-folder-rows{
  gap:4px !important;
}
.case-folder-row,
.folder-document-row{
  padding:5px 7px !important;
  min-height:30px !important;
  border-radius:10px !important;
}
.case-folder-row.level-1,
.folder-document-row.level-1{
  margin-left:18px !important;
}
.folder-document-row.level-2,
.case-folder-row.level-2{
  margin-left:32px !important;
}
.folder-row-name{
  font-size:11px !important;
  line-height:1.15 !important;
}
.folder-row-topic{
  font-size:9.5px !important;
  line-height:1.15 !important;
}
.folder-row-count{
  font-size:9.5px !important;
  padding:3px 5px !important;
}
.mini-folder-icon,
.mini-doc-icon{
  width:15px !important;
  height:15px !important;
  min-width:15px !important;
}
.folder-doc-actions .btn,
.folder-sync-row .btn,
.folder-delete-form .btn{
  font-size:9.5px !important;
  padding:4px 6px !important;
  min-height:24px !important;
}
.folder-delete-form{
  margin:-3px 0 4px !important;
}
.folder-sync-row{
  font-size:10px !important;
  padding:4px 6px 4px 30px !important;
  margin:2px 0 3px 18px !important;
}
.folder-sync-row.level-2{
  margin-left:32px !important;
}
.case-folder-toolbar{
  padding:7px 9px !important;
  font-size:10.5px !important;
}


/* Compact document folder controls: small fonts, text links, no icons */
.documents-simplified .compact-document-folder-card{
  padding:10px 12px !important;
  border-radius:14px !important;
  margin-bottom:8px !important;
}
.documents-simplified .compact-folder-section-head{
  display:flex !important;
  align-items:flex-start !important;
  gap:8px !important;
  margin-bottom:4px !important;
}
.documents-simplified .compact-folder-section-head h3,
.documents-simplified .document-folder-create-card h3,
.documents-simplified .document-folder-structure-card h3,
.documents-simplified #case-folder-structure{
  font-size:13px !important;
  line-height:1.15 !important;
  margin:0 0 3px !important;
  letter-spacing:0 !important;
}
.documents-simplified .compact-folder-section-head p,
.documents-simplified .document-folder-create-card p,
.documents-simplified .document-folder-structure-card p,
.documents-simplified .document-case-links-card p{
  font-size:10.5px !important;
  line-height:1.25 !important;
  margin:0 !important;
}
.documents-simplified .document-folder-create-card .badge,
.documents-simplified .document-folder-structure-card .badge,
.documents-simplified .document-case-links-card .badge{
  font-size:9px !important;
  padding:3px 6px !important;
  min-height:auto !important;
  border-radius:999px !important;
}
.documents-simplified .document-case-link-list{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:6px 10px !important;
  margin-top:7px !important;
}
.documents-simplified .document-folder-create-card form{
  gap:6px !important;
  margin-top:4px !important;
}
.documents-simplified .document-folder-create-card label{
  font-size:9px !important;
  line-height:1.05 !important;
  letter-spacing:.025em !important;
  margin-bottom:2px !important;
  color:#3e5069 !important;
}
.documents-simplified .document-folder-create-card select,
.documents-simplified .document-folder-create-card input{
  min-height:30px !important;
  height:30px !important;
  font-size:10.5px !important;
  padding:5px 7px !important;
  border-radius:9px !important;
}
.documents-simplified .compact-link-action,
.documents-simplified .compact-text-link,
.documents-simplified .case-folder-row,
.documents-simplified .case-folder-jump-link{
  appearance:none !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  color:var(--navy) !important;
  text-decoration:underline !important;
  font-size:10.5px !important;
  font-weight:900 !important;
  padding:0 !important;
  min-height:auto !important;
  border-radius:0 !important;
  cursor:pointer !important;
}
.documents-simplified .compact-link-action:hover,
.documents-simplified .compact-text-link:hover,
.documents-simplified .case-folder-row:hover,
.documents-simplified .case-folder-jump-link:hover{
  color:#8a6400 !important;
}
.documents-simplified .case-folder-toolbar{
  padding:5px 7px !important;
  font-size:10px !important;
  line-height:1.2 !important;
  margin-bottom:6px !important;
}
.documents-simplified .case-folder-path,
.documents-simplified .finder-summary{
  font-size:10px !important;
  line-height:1.2 !important;
}
.documents-simplified .case-folder-tree{
  gap:6px !important;
}
.documents-simplified .case-folder-tree,
.documents-simplified .case-folder-tree *{
  font-size:10.5px !important;
}
.documents-simplified .case-folder-group{
  padding:7px 8px !important;
  margin-bottom:6px !important;
  border-radius:12px !important;
  scroll-margin-top:110px !important;
}
.documents-simplified .case-folder-heading{
  padding:5px 6px !important;
  min-height:0 !important;
  gap:6px !important;
}
.documents-simplified .case-folder-title{
  font-size:12px !important;
  line-height:1.1 !important;
  margin:0 !important;
}
.documents-simplified .case-folder-subtitle{
  font-size:9.5px !important;
  line-height:1.1 !important;
  margin-top:2px !important;
}
.documents-simplified .case-folder-count{
  font-size:9px !important;
  padding:2px 5px !important;
}
.documents-simplified .case-folder-rows{
  gap:3px !important;
  margin-top:4px !important;
}
.documents-simplified .case-folder-row,
.documents-simplified .folder-document-row{
  display:flex !important;
  padding:4px 0 !important;
  min-height:20px !important;
  border-radius:0 !important;
  gap:5px !important;
}
.documents-simplified .case-folder-row.level-1,
.documents-simplified .folder-document-row.level-1{
  margin-left:14px !important;
}
.documents-simplified .case-folder-row.level-2,
.documents-simplified .folder-document-row.level-2{
  margin-left:26px !important;
}
.documents-simplified .folder-row-name{
  font-size:10.5px !important;
  line-height:1.1 !important;
  font-weight:850 !important;
}
.documents-simplified .folder-row-topic{
  font-size:9px !important;
  line-height:1.1 !important;
  margin-top:1px !important;
}
.documents-simplified .folder-row-count{
  font-size:9px !important;
  padding:2px 4px !important;
}
.documents-simplified .mini-folder-icon,
.documents-simplified .mini-doc-icon,
.documents-simplified .tree-elbow{
  display:none !important;
}
.documents-simplified .folder-doc-actions .btn,
.documents-simplified .folder-sync-row .btn,
.documents-simplified .folder-delete-form .btn{
  font-size:9px !important;
  padding:3px 5px !important;
  min-height:20px !important;
}
.documents-simplified .folder-delete-form{
  margin:-2px 0 3px !important;
}
.documents-simplified .folder-sync-row{
  font-size:9.5px !important;
  padding:3px 5px !important;
  margin:2px 0 2px 14px !important;
}
.documents-simplified .folder-sync-row.level-2{
  margin-left:26px !important;
}


/* Secured folder labels and file delete controls */
.secured-folder-badge,
.case-secure-sync-status{
  display:inline-flex !important;
  align-items:center !important;
  gap:3px !important;
  margin-left:5px !important;
  padding:2px 5px !important;
  border-radius:999px !important;
  border:1px solid #d7b75f !important;
  background:#fff7da !important;
  color:#5f4500 !important;
  font-size:8.5px !important;
  line-height:1 !important;
  font-weight:950 !important;
  text-decoration:none !important;
  vertical-align:middle !important;
}
.folder-doc-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:4px !important;
  align-items:center !important;
  justify-content:flex-end !important;
}
.inline-delete-file-form{
  display:inline-flex !important;
  margin:0 !important;
}
.inline-delete-file-form .btn,
.folder-delete-form .btn{
  font-size:8.75px !important;
  padding:3px 5px !important;
  min-height:19px !important;
}
.documents-simplified .folder-document-row{
  align-items:center !important;
}
.documents-simplified .folder-document-row .folder-row-main{
  min-width:0 !important;
}
