/* Look taken from the dashboard example Premium Executive Placements supplied. */
:root { --navy: #00152F; --navy2: #04234F; --blue: #1667E0; --blue2: #0B4FC0; --bg: #EDF2FE; --ink: #0F1E36;
  --soft: #5A6B85; --line: #E3EAF5; --tint: #F4F8FE; --ok: #1BA672; --red: #E5484D; --amber: #F59E0B; --card: #fff }
* { box-sizing: border-box }
body { margin: 0; font: 15px/1.45 Inter, 'Segoe UI', Arial, sans-serif; color: var(--ink); background: var(--bg) }
a { color: var(--blue2); text-decoration: none } a:hover { text-decoration: underline }
.wrap { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh }
/* sidebar */
aside { background: linear-gradient(180deg, #01112B, #00152F 60%, #021A3D); color: #fff; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto }
aside .logo { display: block; width: 248px }
aside nav { margin-top: 14px; display: grid; gap: 2px; padding-right: 34px }
aside nav a, aside nav button { display: flex; align-items: center; gap: 14px; padding: 11px 0 11px 24px; color: #E6EEFB; font: 500 15px Inter, sans-serif;
  text-decoration: none; border-radius: 0 12px 12px 0; background: none; border: 0; cursor: pointer; width: 100%; text-align: left }
aside nav a:hover, aside nav button:hover { background: rgba(255,255,255,.07); text-decoration: none }
aside nav a.on { background: linear-gradient(90deg, #1D74F0, #0E57CF); font-weight: 700; box-shadow: 0 6px 18px rgba(22,103,224,.45) }
aside nav svg { width: 21px; height: 21px; flex: none }
aside nav small { margin-left: auto; margin-right: 12px; font-size: 11px; color: #9DB4D8 }
aside .sep { height: 1px; background: rgba(255,255,255,.14); margin: 12px 24px }
aside .tag { margin-top: auto; display: block; width: 220px; padding-top: 12px }
/* top bar */
header.top { height: 74px; background: #fff; display: flex; align-items: center; gap: 18px; padding: 0 22px 0 30px; border-bottom: 1px solid var(--line) }
.av { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #1D74F0, #04234F); color: #fff; display: grid; place-items: center; font: 800 18px Inter, sans-serif; flex: none }
header.top h1 { margin: 0; font: 800 20px Inter, sans-serif } header.top small { color: var(--soft); font-size: 13px }
.vr { width: 1px; height: 40px; background: #C9D3E3 }
.date { display: flex; align-items: center; gap: 10px; font-weight: 500; white-space: nowrap }
.date svg, .bell svg { width: 24px; height: 24px; color: var(--navy2) }
.bell { margin-left: auto; position: relative; color: inherit } .bell b { position: absolute; top: -8px; right: -9px; background: var(--red); color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 6px }
.search { width: 300px; height: 42px; border-radius: 21px; background: #F1F5FB; display: flex; align-items: center; gap: 10px; padding: 0 16px; color: #7A8AA3 }
.search svg { width: 19px; height: 19px; flex: none }
.search input[type=search] { border: 0; background: none; padding: 0; font: 14px Inter, sans-serif; width: 100%; outline: none; color: var(--ink) }
.hero { display: block; width: 100%; height: auto }
main { padding: 16px 18px 28px; display: grid; gap: 16px; align-content: start }
/* page heads */
.ph { display: flex; align-items: center; gap: 12px; flex-wrap: wrap }
.ph h2 { margin: 0; font: 800 24px Inter, sans-serif; letter-spacing: -.01em }
.ph .sub { color: var(--soft); font-size: 14px }
.ph .act { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap }
/* kpis */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px }
.kpi { background: var(--card); border-radius: 14px; box-shadow: 0 2px 10px rgba(10,40,90,.07); position: relative; min-width: 0 }
.kpi:hover { box-shadow: 0 4px 16px rgba(10,40,90,.14) }
.kpi-in { padding: 16px; display: flex; gap: 14px; align-items: center; color: inherit; height: 100% }
.kpi-in:hover { text-decoration: none }
.ic { width: 56px; height: 56px; border-radius: 50%; background: #EAF2FF; display: grid; place-items: center; flex: none; color: var(--blue) }
.ic svg { width: 28px; height: 28px }
.kpi .v { font: 800 28px/1.05 Inter, sans-serif; letter-spacing: -.02em }
.kpi .k { font-size: 14px; margin-top: 2px }
.kpi .s { font-size: 13px; color: var(--ok); font-weight: 600; margin-top: 3px }
.kpi .s.w { color: var(--red) }
/* panels */
.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch }
.row.two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) }
.span2 { grid-column: span 2 }
.pn { position: relative; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(10,40,90,.07); display: flex; flex-direction: column; min-width: 0 }
.pn > h2 { margin: 0; min-height: 46px; padding: 0 18px; display: flex; align-items: center; gap: 12px; background: linear-gradient(90deg, #00152F, #062E68); color: #fff; font: 700 16px Inter, sans-serif }
.pn > h2 svg { width: 21px; height: 21px; flex: none }
.pn > h2 a, .pn > h2 span { margin-left: auto; font: 500 13px Inter, sans-serif; color: #DCE7FA }
.pb { padding: 12px 18px 14px; flex: 1; min-width: 0 }
.scroll { overflow-x: auto }
table { width: 100%; border-collapse: collapse; font-size: 14px }
th { text-align: left; color: var(--soft); font-weight: 600; font-size: 12.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top } tr:last-child td { border-bottom: 0 }
td b, td a { font-weight: 600 }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; background: #EAF2FF; color: var(--blue2); white-space: nowrap }
.pill.g { background: #E4F6EE; color: #0F8A5C } .pill.r { background: #FDECEC; color: #C62F35 } .pill.a { background: #FFF4DE; color: #A86B00 } .pill.n { background: #EEF1F5; color: #4A5A72 }
.li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; min-width: 0 }
.li:last-child { border-bottom: 0 }
.li .r { margin-left: auto; color: var(--soft); font-size: 13px; text-align: right; flex: none }
.li small { color: var(--soft) }
.dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #EAF2FF; color: var(--blue) }
.dot svg { width: 18px; height: 18px }
.dot.ok { background: #E4F6EE; color: var(--ok) } .dot.w { background: #FDECEC; color: var(--red) } .dot.a { background: #FFF4DE; color: var(--amber) }
.empty { color: var(--soft); font-size: 14px; padding: 10px 0 }
/* dashboard layout and edit mode */
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; grid-auto-flow: dense; align-items: stretch }
.dash-head { display: flex; align-items: center; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-bottom: -6px }
.dash-btns { display: flex; gap: 8px; flex-wrap: wrap }
.edit-help { color: var(--blue2); font-size: 13.5px; font-weight: 500; margin-right: auto }
.edit-only, .ebar { display: none } .editing .view-only { display: none }
.editing .edit-only { display: inline-flex } .editing .edit-help { display: block }
.dl.off { display: none }
.editing .dl { outline: 2px dashed #9CC0F5; outline-offset: 2px; cursor: grab }
.editing .dl.off { display: flex; opacity: .42 } .editing .kpi.off { display: block }
.editing .dl.dragging { opacity: .25 }
.editing .ebar { display: flex; position: absolute; top: 7px; right: 8px; z-index: 2; gap: 4px; align-items: center; background: #fff; border-radius: 10px; padding: 3px; box-shadow: 0 2px 10px rgba(10,40,90,.25) }
.ebar .et { font-size: 12px; font-weight: 700; color: var(--navy); padding: 0 6px }
.eb { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #EAF2FF; color: var(--blue2); font: 700 16px Inter, sans-serif; cursor: pointer; display: grid; place-items: center }
.eb:hover { background: #D6E6FF } .eb svg { width: 17px; height: 17px }
.dl.off .eye { background: var(--navy); color: #fff }
.editing .kpi .ebar { top: auto; bottom: 6px; right: 6px }
/* client spotlight */
.sp { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px }
.badge { width: 96px; height: 96px; border-radius: 12px; background: linear-gradient(135deg, #1D74F0, #04234F); color: #fff; display: grid; place-items: center; font: 800 30px Inter, sans-serif }
.sp h3 { margin: 0 0 4px; font: 800 17px Inter, sans-serif }
.m { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: #33445E; margin: 3px 0; overflow-wrap: anywhere }
.m svg { width: 15px; height: 15px; color: var(--blue); flex: none }
.note { margin-top: 10px; background: var(--tint); border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; padding: 8px 10px; font-size: 13.5px; white-space: pre-line }
.note small { display: block; color: var(--soft); font-size: 12px; margin-top: 2px; white-space: normal }
/* quick actions */
.qa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px }
.qa a { border: 1px solid var(--line); border-radius: 12px; padding: 14px 6px 12px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink); box-shadow: 0 2px 6px rgba(10,40,90,.05) }
.qa a:hover { border-color: #A9C3EC; text-decoration: none }
.qa svg { width: 28px; height: 28px; color: var(--blue); display: block; margin: 0 auto 8px }
.soon { background: var(--tint); border-radius: 12px; padding: 12px; display: flex; gap: 12px; align-items: center; margin-bottom: 10px; color: var(--ink) }
.soon:hover { text-decoration: none; background: #EAF2FF }
.soon svg { width: 30px; height: 30px; color: var(--blue); flex: none } .soon b { display: block } .soon small { color: var(--soft) }
/* buttons and forms */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 0; cursor: pointer;
  background: linear-gradient(90deg, #1D74F0, #0E57CF); color: #fff; font: 600 14px Inter, sans-serif; text-decoration: none; white-space: nowrap }
.btn:hover { text-decoration: none; filter: brightness(1.06) }
.btn.alt { background: #fff; color: var(--blue2); border: 1px solid #C5D6F0 }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px }
.btn.danger { background: #fff; color: #C62F35; border: 1px solid #F1C4C6 }
.btn svg { width: 17px; height: 17px }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px }
.form .full { grid-column: 1 / -1 }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: #33445E }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; font: 14px Inter, sans-serif; color: var(--ink); padding: 9px 11px; border: 1px solid #CDD8EA; border-radius: 9px; background: #fff }
input:focus, select:focus, textarea:focus { outline: 2px solid #9CC0F5; border-color: var(--blue) }
input[type=file] { font-size: 13px; max-width: 100% }
.errorlist { color: #C62F35; font-size: 13px; margin: 4px 0 0; padding: 0; list-style: none }
.help { color: var(--soft); font-size: 12.5px }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.inline select, .inline input { width: auto }
.msgs { display: grid; gap: 8px }
.msg { padding: 10px 14px; border-radius: 10px; background: #E4F6EE; color: #0B6A47; font-size: 14px }
.msg.warning { background: #FFF4DE; color: #855400 } .msg.error { background: #FDECEC; color: #A3262B } .msg.info { background: #EAF2FF; color: var(--blue2) }
.tabs { display: flex; gap: 6px; flex-wrap: wrap }
.tabs a { padding: 6px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: #33445E }
.tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy) }
.pager { display: flex; gap: 12px; align-items: center; justify-content: flex-end; font-size: 14px; padding-top: 10px }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 12px; font-size: 14px } .kv dt { color: var(--soft) } .kv dd { margin: 0; overflow-wrap: anywhere }
.foot { font-size: 12px; color: var(--soft); text-align: right }
/* login */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #01112B, #062E68); padding: 16px }
.login .box { width: min(400px, 100%); background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35) }
.login .box img { display: block; width: 100%; background: #00152F }
.login form { padding: 22px 24px 26px; display: grid; gap: 12px }
/* narrow screens */
.menu-btn { display: none }
@media (max-width: 1250px) { .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) } .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) } .row .span2 { grid-column: 1 / -1 } .row.two { grid-template-columns: minmax(0, 1fr) } }
@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr) }
  aside { position: fixed; z-index: 20; left: 0; top: 0; width: 248px; transform: translateX(-100%); transition: transform .2s }
  body.nav-open aside { transform: none }
  .menu-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: #F1F5FB; border-radius: 10px; flex: none }
  .menu-btn svg { width: 22px; height: 22px }
  header.top { padding: 0 16px; gap: 12px } header.top .vr, header.top .date, header.top small { display: none }
  .search { width: auto; flex: 1 }
  .hero { height: 120px; object-fit: cover; object-position: left center }
  main { padding: 14px 16px 24px }
  .row, .row.two, .form, .dash-grid { grid-template-columns: minmax(0, 1fr) } .row .span2, .dash-grid .span2 { grid-column: auto }
}
@media (max-width: 520px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px } .ebar .et { display: none } .kpi-in { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px } .ic { width: 40px; height: 40px } .ic svg { width: 20px; height: 20px } .kpi .v { font-size: 24px } header.top h1 { font-size: 16px } .av { display: none } .qa { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
/* reports */
.rp-range { background: var(--card); border-radius: 12px; padding: 10px 12px; box-shadow: 0 2px 10px rgba(10,40,90,.07) }
.rp-range .btn.on { background: var(--navy); color: #fff; border-color: var(--navy) }
.bar { display: grid; grid-template-columns: minmax(90px, 34%) minmax(0, 1fr) 44px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13.5px }
.bar .bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.bar .bt { height: 14px; background: #EAF2FF; border-radius: 7px; overflow: hidden }
.bar .bt i { display: block; height: 100%; background: linear-gradient(90deg, #1D74F0, #0E57CF); border-radius: 7px; min-width: 2px }
.bar b { text-align: right }
@media (max-width: 900px) { .row[style] { grid-template-columns: minmax(0, 1fr) !important } }
/* tags */
.tg { margin-bottom: 8px } .tg b { display: block; font-size: 12.5px; color: var(--soft); margin-bottom: 4px }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip { margin: 0; cursor: pointer; font-weight: 500 } .chip input { position: absolute; opacity: 0 }
.chip span { display: inline-block; padding: 4px 11px; border-radius: 14px; border: 1px solid #C5D6F0; background: #fff; font-size: 13px; color: #33445E }
.chip input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600 }
.chip input:focus-visible + span { outline: 2px solid #9CC0F5 }
.act .pill { align-self: center }
.tagp { padding: 3px 10px; border-radius: 12px; background: #fff; border: 1px solid #A9C3EC; color: var(--blue2); font-size: 12.5px; font-weight: 600 }
/* tag picker */
.tp-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px } .tp-chosen:empty { display: none }
.tp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 11px; border-radius: 14px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 600 }
.tp-chip button { border: 0; background: rgba(255,255,255,.2); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; font-size: 14px }
.tp-list { max-height: 240px; overflow-y: auto; border: 1px solid #CDD8EA; border-radius: 9px; margin-top: 4px; background: #fff }
.tp-group { padding: 7px 11px 3px; font-size: 12px; font-weight: 700; color: var(--soft) }
.tp-opt { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 11px; font: 14px Inter, sans-serif; color: var(--ink); cursor: pointer }
.tp-opt:hover { background: #EAF2FF } .tp-new { color: var(--blue2); font-weight: 600; border-top: 1px solid var(--line) }
/* column filters */
.flt td { padding: 5px 6px 9px; background: var(--tint); border-bottom: 1px solid var(--line) }
.flt input[type=search], .flt select { width: 100%; min-width: 86px; padding: 5px 8px; font-size: 12.5px; border-radius: 7px }
.tagp.sm { display: inline-block; padding: 1px 7px; font-size: 11.5px; white-space: nowrap }
/* three tag dropdowns */
.tp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; align-items: start }
.tp-grid .tp-chosen { margin: 6px 0 0 } .tp-grid .tp-chosen:empty { display: none }
.tp-grid .tp-chip { max-width: 100% }
@media (max-width: 900px) { .tp-grid { grid-template-columns: minmax(0, 1fr) } }
[hidden] { display: none !important }

/* Amounts line up: same width digits, right aligned */
.num { text-align: right; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; white-space: nowrap }
.ftable td.num b, .ftable td.num strong { font-weight: 700 }
.tabs { display: flex; gap: 8px; margin: 0 0 14px }
.tabs a { text-decoration: none }
/* Row menu and the bar above the list */
.menu { position: relative; display: inline-block }
.menu > summary { list-style: none; cursor: pointer; padding: 2px 10px; border-radius: 8px; font-size: 20px; line-height: 1.2; color: var(--soft); user-select: none }
.menu > summary::-webkit-details-marker { display: none }
.menu[open] > summary, .menu > summary:hover { background: var(--tint) }
.menu .mp { position: fixed; z-index: 60; min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 21, 47, .14); padding: 6px; display: flex; flex-direction: column }
.menu .mp a, .menu .mp button { display: block; text-align: left; width: 100%; background: none; border: 0; padding: 8px 12px; border-radius: 6px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-decoration: none }
.menu .mp a:hover, .menu .mp button:hover { background: var(--tint) }
.menu .mp button.danger { color: var(--red) }
.menu .mp form { margin: 0 }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px }
.bulkbar .cnt { font-weight: 600; color: var(--soft); margin-right: 6px; min-width: 150px }
.bulkbar .off { opacity: .45; pointer-events: none }
.bulkbar button:disabled { opacity: .45; cursor: not-allowed }
.chk { width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer }

/* Searchable drop-down: the box and the list are one control */
.combo-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin: 2px 0 0; padding: 4px; list-style: none; max-height: 280px; overflow-y: auto;
  background: #fff; border: 1px solid #c9d6ea; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,21,47,.16) }
.combo-list li { padding: 9px 12px; border-radius: 7px; cursor: pointer; font-size: 14.5px }
.combo-list li:hover, .combo-list li.on { background: #eaf1fd }
.combo-list li.combo-add { color: #1667E0; font-weight: 600; border-top: 1px solid #e3eaf5; margin-top: 4px }
.combo-list .combo-sub { color: var(--soft, #5A6B85) }
.combo-list li.combo-none { cursor: default; color: var(--soft, #5A6B85) }
.combo-list li.combo-none:hover { background: none }

/* Reports: pick a question first */
.rcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 14px }
.rcard { display: flex; flex-direction: column; gap: 3px; background: #fff; border: 2px solid transparent; border-radius: 12px; padding: 12px 14px; text-decoration: none;
  box-shadow: 0 2px 10px rgba(10,40,90,.07); color: var(--ink, #0F1E36) }
.rcard svg { width: 22px; height: 22px; color: #1667E0 }
.rcard b { font-size: 15px }
.rcard span { font-size: 13px; color: #5A6B85 }
.rcard.on { border-color: #1667E0; background: #F4F8FE }
.rp-head .pb { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; gap: 18px; align-items: start }
.rp-q h3 { margin: 0 0 4px; font-size: 17px }
.rp-q p { margin: 0; color: #33445E; font-size: 14px }
.rp-when .inline { margin: 6px 0 }
.rp-dl { display: flex; flex-direction: column; gap: 8px }
.rp-dl .btn { display: flex; flex-direction: column; align-items: center; gap: 2px }
.rp-dl .btn small { font-weight: 400; font-size: 11.5px; opacity: .85 }
.rp-when .btn.on { background: var(--navy); color: #fff; border-color: var(--navy) }
@media (max-width: 900px) { .rp-head .pb { grid-template-columns: minmax(0, 1fr) } }
.rp-dl .btn svg { display: none }

.feebox { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 0; padding: 10px 12px; background: #F4F8FE; border-left: 4px solid #1667E0; border-radius: 8px }
.feebox span { color: #5A6B85; font-size: 13px } .feebox b { font-size: 20px } .feebox small { color: #5A6B85 }
.sendbox { margin-top: 10px } .sendbox summary { display: inline-flex; cursor: pointer; list-style: none }
.sendbox summary::-webkit-details-marker { display: none }

/* Phones (kit of 2026-11-04): fewer columns in lists, the invoice lines stacked, bigger things to tap */
@media (max-width: 640px) {
  table.keep3 :is(th, td):nth-child(n+4) { display: none }
  table.inv-list :is(th, td):is(:nth-child(4), :nth-child(5), :nth-child(7)) { display: none }
  table.agr :is(th, td):is(:nth-child(2), :nth-child(4)) { display: none }
  table .hs { display: none }
  .ph { align-items: flex-start }
  .ph .sub { flex-basis: 100% }
  /* the lines of a new invoice: one block per line instead of a row, with a label over each box */
  table#lt, table#lt tbody, table#lt tr, table#lt td { display: block; width: 100% !important; box-sizing: border-box }
  table#lt tr:first-child { display: none }
  table#lt tr.ln { border: 1px solid var(--line, #dde5f2); border-radius: 10px; padding: 8px 10px 10px; margin-bottom: 10px; background: #fff }
  table#lt td { padding: 0 }
  table#lt td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--soft, #5A6B85); margin: 8px 0 2px }
  table#lt td:empty::before { display: none }
  table#lt input, table#lt select { width: 100% !important; box-sizing: border-box }
  /* bigger things to tap */
  .btn { min-height: 44px }
  .btn.sm { min-height: 40px }
  .ftable td a, table td a { display: inline-block; padding: 6px 0 }
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px }
  .rcard, .qa a { min-height: 48px }
  /* amounts must never be cut off: tighter cells, and a card that does not waste its edges */
  .pn .pb { padding: 12px }
  .ftable th, .ftable td { padding-left: 6px; padding-right: 6px }
  .ftable td.num, .ftable th.num { white-space: nowrap }
}

/* On shorter screens the whole menu, down to My account and Logout, must fit without scrolling. */
@media (min-width: 901px) and (max-height: 860px) { aside .logo { width: 200px } aside nav { margin-top: 6px; gap: 0 } aside nav a, aside nav button { padding: 7px 0 7px 24px; font-size: 14px } aside .sep { margin: 6px 24px } }

/* menu groups: a parent that opens to show its pages */
aside details.grp > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 11px 0 11px 24px; color: #E6EEFB; font: 500 15px Inter, sans-serif }
aside details.grp > summary::-webkit-details-marker { display: none }
aside details.grp > summary::after { content: "\203A"; margin-left: auto; margin-right: 14px; font-size: 18px; color: #9DB4D8; transition: transform .15s }
aside details.grp[open] > summary::after { transform: rotate(90deg) }
aside details.grp > summary:hover { background: rgba(255,255,255,.07) }
aside details.grp > summary small { margin-left: auto; margin-right: 6px; font-size: 11px; color: #9DB4D8 }
aside details.grp > summary small + :after { display: none }
aside details.grp > a { padding-left: 59px; font-size: 14px }
@media (min-width: 901px) and (max-height: 860px) { aside details.grp > summary { padding: 7px 0 7px 24px; font-size: 14px } aside details.grp > a { padding-top: 6px; padding-bottom: 6px } }
.notice { background: #FFF6E0; border: 1px solid #F3D78A; color: #6B4A00; border-radius: 12px; padding: 12px 16px; margin: 0 0 14px; font-size: 14px }
/* the edit buttons stay hidden until Edit dashboard is pressed (.btn would otherwise win, as it comes later) */
.btn.edit-only { display: none } .editing .btn.edit-only { display: inline-flex } .editing .btn.view-only { display: none }
table.stats { width: 100%; border-collapse: collapse; margin-bottom: 8px } table.stats td { padding: 9px 8px; border-bottom: 1px solid var(--line) }
table.stats td:nth-child(odd) { color: var(--soft) } table.stats td b { font-size: 18px }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px }
.pcard { background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(10,40,90,.07); overflow: hidden; display: flex; flex-direction: column }
.pcard .thumb { background: var(--tint); aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden }
.pcard .thumb img { width: 100%; height: 100%; object-fit: contain }
.pcard .cap { padding: 12px 14px } .pcard .cap b { display: block } .pcard .cap small { color: var(--soft) }
.pview img { max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 2px 14px rgba(10,40,90,.18) }
textarea.copybox { width: 100%; min-height: 230px; font: 14px/1.5 Inter, sans-serif }


/* The sidebar can shrink to its icons on wide screens (burger button, remembered per browser), so wide tables such as the
   clients list with its Fees column get the room. On phones the same button slides the menu in and out as before. */
@media (min-width: 901px) {
  .menu-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: #F1F5FB; border-radius: 10px; flex: none; cursor: pointer; color: var(--navy2) }
  .menu-btn:hover { background: #E3EBF7 }
  .menu-btn svg { width: 22px; height: 22px }
  header.top { padding-left: 18px }
  body.nav-mini .wrap { grid-template-columns: 72px minmax(0, 1fr) }
  body.nav-mini aside { overflow-x: hidden }
  body.nav-mini aside .logo { width: 60px; height: auto; margin: 16px 6px 4px }   /* the whole logo, small */
  body.nav-mini aside .tag { display: none }
  body.nav-mini aside nav { padding-right: 0 }
  body.nav-mini aside nav a, body.nav-mini aside nav button, body.nav-mini aside details.grp > summary {
    font-size: 0; gap: 0; justify-content: center; padding: 11px 0; margin: 0 10px; width: auto; border-radius: 12px }
  body.nav-mini aside details.grp > summary::after, body.nav-mini aside nav small, body.nav-mini aside details.grp > a { display: none }
  body.nav-mini aside .sep { margin: 12px 14px }
}

/* Predis designs */
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px }
.dcard { border: 1px solid #DCE5F2; border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column }
.dmedia { background: #F3F6FB; display: grid; place-items: center; min-height: 200px }
.dmedia.many { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; place-items: initial }
.dmedia.many a { flex: 0 0 100%; scroll-snap-align: start }
.dmedia img, .dmedia video { display: block; width: 100%; height: auto }
.dwait { padding: 30px 18px; color: var(--soft); font-size: 14px; display: flex; align-items: center; gap: 10px; text-align: center }
.dwait.bad { color: #A2361F }
.dwait .spin { width: 18px; height: 18px; border: 2px solid #C5D6F0; border-top-color: var(--blue2); border-radius: 50%; animation: dspin 0.9s linear infinite }
@keyframes dspin { to { transform: rotate(360deg) } }
@media (prefers-reduced-motion: reduce) { .dwait .spin { animation: none } }
.dcap { padding: 14px 16px; display: grid; gap: 8px }
.dcap small { color: var(--soft) }
textarea.copybox.dcopy { min-height: 110px; font-size: 13px }
/* poster: place the picture (zoom, across, up and down) with a live preview of the frame */
.picfit { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 4px; margin: 0; background: var(--tint) }
.picfit legend { font-weight: 700; padding: 0 6px }
.picfit[hidden] { display: none }
.picframe { width: 100%; max-width: 640px; aspect-ratio: 3.4; overflow: hidden; border-radius: 10px; background: #dfe7f3; margin-bottom: 10px }
.picframe img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .12s ease-out }
.picfit input[type=range] { width: 100%; accent-color: var(--blue) }
@media (prefers-reduced-motion: reduce) { .picframe img { transition: none } }
/* poster: share */
.share { display: flex; flex-wrap: wrap; gap: 8px }
.share .btn { flex: 1 1 auto }
