/* CECURE Staff Portal — matches the main site's measured palette */
:root {
  --navy: #05377d; --navy-dk: #032a61; --heading: #1e1e1e;
  --ink: #777; --page-bg: #eee; --line: #e2e2e2;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--body); font-size: .9rem; color: var(--ink);
       background: var(--page-bg); min-height: 100vh; }

.brand-mark { font-weight: 800; font-style: italic; font-size: 1.6rem;
              color: #fff; background: var(--navy); padding: .05rem .55rem; }
.brand-mark.sm { font-size: 1.05rem; }
.brand-logo { display: block; max-height: 2.6rem; max-width: 220px; object-fit: contain; }
.brand-logo.sm { max-height: 1.8rem; max-width: 160px; }
.mini-log { max-height: 260px; overflow-y: auto; background: #0f1620; color: #c7d3e0;
            border-radius: 9px; padding: .8rem 1rem; font: .78rem/1.5 ui-monospace, monospace;
            white-space: pre-wrap; word-break: break-word; margin: .8rem 0 0; }

/* login */
.login-card { max-width: 380px; margin: 10vh auto 0; background: #fff;
              border: 1px solid var(--line); border-top: 3px solid var(--navy);
              padding: 2.2rem 2.4rem 2rem; text-align: center; }
.brand { display: flex; flex-direction: column; align-items: center; gap: .45rem;
         margin-bottom: 1.6rem; }
.brand-sub { text-transform: uppercase; letter-spacing: .18em; font-size: .7rem;
             color: var(--heading); font-weight: 700; }
.ms-btn { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer;
          font: inherit; font-weight: 600; color: #fff; background: var(--navy);
          border: none; padding: .75rem 1.4rem; width: 100%; justify-content: center; }
.ms-btn:hover { background: var(--navy-dk); }
.ms-btn svg { background: #fff; padding: 2px; }
.note { font-size: .75rem; margin-top: 1.4rem; }
.msg { border: 1px solid var(--line); background: #fafafa; padding: .6rem .8rem;
       font-size: .8rem; margin-bottom: 1.2rem; }
.msg.err { border-color: #c0392b; color: #c0392b; background: #fdf3f2; }

/* app chrome */
.topbar { display: flex; align-items: center; gap: .8rem; background: #fff;
          border-bottom: 3px solid var(--navy); padding: .7rem 1.2rem; }
.topbar-title { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem;
                font-weight: 700; color: var(--heading); }
.topbar-user { margin-left: auto; font-size: .78rem; }
.topbar-user a { color: var(--navy); }
.wrap { max-width: 1140px; margin: 1.5rem auto; padding: 0 1rem; }
.card { background: #fff; border: 1px solid var(--line); padding: 1.8rem 2.2rem; }
.card h1 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .1em;
           color: var(--heading); margin: 0 0 1rem; }
.muted { color: #999; font-size: .8rem; }

/* menu + users table (v2) */
.menu { display: flex; gap: .25rem; margin-left: 1.2rem; }
.menu a { font-size: .72rem; font-weight: 700; text-transform: uppercase;
          letter-spacing: .1em; color: var(--heading); text-decoration: none;
          padding: .45rem .7rem; }
.menu a:hover { color: var(--navy); }
.menu a.on { background: var(--navy); color: #fff; }

table.users { width: 100%; border-collapse: collapse; font-size: .82rem; }
table.users th, table.users td { border: 1px solid var(--line); padding: .5rem .7rem;
                                 text-align: left; vertical-align: middle; }
table.users thead th { background: var(--navy); color: #fff; font-size: .7rem;
                       text-transform: uppercase; letter-spacing: .08em; }
table.users tr.blocked td { background: #faf3f3; color: #a33; }
.you { color: var(--navy); font-size: .72rem; font-weight: 700; }

form.inline { display: inline; }
form.inline select { font: inherit; font-size: .8rem; padding: .2rem .3rem;
                     border: 1px solid var(--line); }
form.inline button { font: inherit; font-size: .72rem; font-weight: 700;
                     text-transform: uppercase; letter-spacing: .06em; cursor: pointer;
                     border: 1px solid var(--navy); background: #fff; color: var(--navy);
                     padding: .3rem .7rem; }
form.inline button:hover { background: var(--navy); color: #fff; }
form.inline button.danger { border-color: #a33; color: #a33; }
form.inline button.danger:hover { background: #a33; color: #fff; }

.flash { padding: .6rem .9rem; font-size: .8rem; border: 1px solid var(--line); }
.flash.ok  { border-color: #2e7d4f; color: #2e7d4f; background: #f2faf5; }
.flash.bad { border-color: #a33;    color: #a33;    background: #faf3f3; }

/* avatars + icons (v3) */
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
          border: 1px solid var(--line); display: block; background: #fff; }
.avatar.sm { width: 26px; height: 26px; display: inline-block;
             vertical-align: middle; margin-right: .45rem; }
td.avcell { width: 42px; }
.ico { vertical-align: -2px; margin-right: .35rem; }
.menu a, form.inline button, .topbar-user a { display: inline-flex;
          align-items: center; gap: .3rem; }
.menu a .ico, form.inline button .ico, .topbar-user a .ico { margin-right: 0; }

/* forms module (v4) */
.wrap.narrow { max-width: 760px; }
.wrap.formwrap { max-width: 1200px; }
.toolbar { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap;
           margin-bottom: 1.4rem; }
.btn-sm { display: inline-flex; align-items: center; gap: .35rem;
          font-size: .75rem; font-weight: 700; text-transform: uppercase;
          letter-spacing: .06em; color: #fff; background: var(--navy);
          padding: .45rem .9rem; text-decoration: none; }
.btn-sm:hover { background: var(--navy-dk); color: #fff; }
.addcat input[type="text"] { font: inherit; font-size: .8rem; padding: .35rem .5rem;
                             border: 1px solid var(--line); width: 200px; }
.cat-head { display: flex; align-items: center; gap: .45rem; margin-top: 1.8rem;
            border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.form-list { list-style: none; padding: 0; margin: .6rem 0 0; }
.form-list li { padding: .55rem .2rem; border-bottom: 1px solid var(--line-soft, #eee);
                display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.form-list li.inactive .form-title { color: #999; }
.form-title { font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.form-desc { color: #999; font-size: .8rem; }
.form-admin { margin-left: auto; font-size: .76rem; white-space: nowrap; }

.fillin .field { margin-bottom: 1.1rem; }
.fillin label { display: block; font-weight: 700; font-size: .8rem;
                text-transform: uppercase; letter-spacing: .05em;
                color: var(--heading); margin-bottom: .3rem; }
.fillin label.check { text-transform: none; letter-spacing: 0; font-weight: 400;
                      font-size: .875rem; color: var(--ink); }
.fillin input[type="text"], .fillin input[type="email"], .fillin input[type="number"],
.fillin input[type="date"], .fillin select, .fillin textarea {
  width: 100%; padding: .55rem .65rem; font: inherit;
  border: 1px solid var(--line); background: #fff; color: var(--heading); }
.fillin .field.bad input, .fillin .field.bad select, .fillin .field.bad textarea {
  border-color: #a33; }
.fielderr { color: #a33; font-size: .75rem; }
.req { color: #a33; }
.submit { margin-top: .6rem; cursor: pointer; font: inherit; font-weight: 700;
          font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
          color: #fff; background: var(--navy); border: none; padding: .7rem 1.6rem; }
.submit:hover { background: var(--navy-dk); }

.builder label { display: block; font-weight: 700; font-size: .78rem;
                 text-transform: uppercase; letter-spacing: .05em;
                 color: var(--heading); margin: .9rem 0 .25rem; }
.builder input[type="text"], .builder input[type="email"], .builder select,
.builder textarea { width: 100%; padding: .5rem .6rem; font: inherit;
                    border: 1px solid var(--line); }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 1.8rem 0; }
td.order form { margin-right: .2rem; }
.small { font-size: .72rem; display: block; }

dl.answers dt { font-weight: 700; font-size: .78rem; text-transform: uppercase;
                letter-spacing: .05em; color: var(--heading); margin-top: 1rem; }
dl.answers dd { margin: .2rem 0 0; }

/* builder v2 + responsive widths + toggle (v5) */
.build-area { display: grid; grid-template-columns: 200px 1fr; gap: 1.6rem;
              margin-top: 1.4rem; }
.palette h2 { font-size: .8rem; }
.pal-item { display: flex; align-items: center; gap: .45rem; width: 100%;
            font: inherit; font-size: .8rem; text-align: left; cursor: grab;
            background: #fafafa; border: 1px solid var(--line);
            padding: .55rem .7rem; margin-bottom: .45rem; }
.pal-item:hover { border-color: var(--navy); color: var(--navy); }
.pal-item:active { cursor: grabbing; }

.canvas { border: 1px dashed var(--line); padding: 1rem 1.2rem; min-height: 220px; }
.canvas.drop-ready { border-color: var(--navy); background: #f4f7fb; }
.canvas h2 { font-size: .8rem; }
.drop-hint { text-align: center; padding: 2.5rem 0; }

.fcard { border: 1px solid var(--line); background: #fff; margin-bottom: .55rem; }
.fcard.dragging { opacity: .45; }
.fcard summary { display: flex; align-items: center; gap: .6rem; cursor: pointer;
                 padding: .55rem .7rem; list-style: none; }
.fcard summary::-webkit-details-marker { display: none; }
.fcard .handle { cursor: grab; color: #aaa; letter-spacing: -2px; user-select: none; }
.fcard .handle:active { cursor: grabbing; }
.fcard-label { font-weight: 600; color: var(--heading); }
.fcard-meta { margin-left: auto; font-size: .72rem; color: #999; }
.fcard .fedit, .fcard .fdel { padding: 0 .9rem .8rem; }
.fcard.w-half  .fcard-meta::before { content: "▮▮ "; color: var(--navy); }
.fcard.w-third .fcard-meta::before { content: "▮▮▮ "; color: var(--navy); }
.frow { display: flex; align-items: center; gap: 1.2rem; margin-top: .9rem; flex-wrap: wrap; }
.wlabel { display: inline-flex !important; align-items: center; gap: .45rem;
          margin: 0 !important; }
.submit.sm { padding: .45rem 1rem; margin: 0; }
.meta-box { border: 1px solid var(--line); margin-bottom: .4rem; }
.meta-box summary { cursor: pointer; padding: .6rem .9rem; font-weight: 700;
                    font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.meta-box form { padding: 0 .9rem .9rem; }

/* live form: responsive column grid */
.fgrid { display: grid; grid-template-columns: repeat(6, 1fr); column-gap: 1.3rem; }
.fgrid .field.w-full  { grid-column: span 6; }
.fgrid .field.w-half  { grid-column: span 3; }
.fgrid .field.w-third { grid-column: span 2; }
.fgrid .submit { grid-column: span 6; justify-self: start; }
@media (max-width: 640px) {
  .fgrid .field.w-half, .fgrid .field.w-third { grid-column: span 6; }
  .build-area { grid-template-columns: 1fr; }
}
.fhelp { display: block; font-size: .76rem; color: #999; margin: .35rem 0 0; line-height: 1.35; }

/* toggle switch */
label.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
label.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
label.switch .track { width: 40px; height: 22px; border-radius: 11px; flex: none;
                      background: #ccc; position: relative; transition: background .15s; }
label.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px;
                             width: 18px; height: 18px; border-radius: 50%;
                             background: #fff; transition: left .15s; }
label.switch input:checked + .track { background: var(--navy); }
label.switch input:checked + .track::after { left: 20px; }
label.switch input:focus-visible + .track { outline: 2px solid var(--navy); outline-offset: 2px; }

/* builder v3: sections + columns (v6) */
.build-area { display: grid; grid-template-columns: 200px 1fr; gap: 1.6rem; margin-top: 1.4rem; }
.palette h2, .canvas h2 { font-size: .8rem; margin: 0; }
.pal-item { display: flex; align-items: center; gap: .45rem; width: 100%; font: inherit;
            font-size: .8rem; text-align: left; cursor: grab; background: #fafafa;
            border: 1px solid var(--line); padding: .55rem .7rem; margin-bottom: .45rem; }
.pal-item:hover { border-color: var(--navy); color: var(--navy); }
.pal-item:active { cursor: grabbing; }

.canvas { border: 1px dashed var(--line); padding: 1rem 1.2rem; min-height: 220px; }
.canvas-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.drop-hint { text-align: center; padding: 2.5rem 0; }

.secwrap { border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
           margin-bottom: 1rem; }
.sechead { display: flex; align-items: center; gap: .6rem; padding: .55rem .85rem;
           border-bottom: 1px solid rgba(0,0,0,.06); }
.sectitle { font-weight: 700; color: var(--heading); font-size: .85rem; }
.secctl { margin-left: auto; display: inline-flex; gap: .2rem; }
.secctl button { font: inherit; cursor: pointer; border: 1px solid var(--line);
                 background: #fff; padding: .12rem .5rem; }
.secedit { padding: .3rem .85rem .6rem; }
.secedit > summary { cursor: pointer; font-size: .72rem; text-transform: uppercase;
                     letter-spacing: .06em; color: #888; padding: .4rem 0; list-style: none;
                     display: inline-flex; align-items: center; gap: .35rem; }
.secedit > summary::-webkit-details-marker { display: none; }
.secedit > summary::before { content: "\25B8"; transition: transform .12s; display: inline-block; }
.secedit[open] > summary::before { transform: rotate(90deg); }
.secedit[open] { padding-bottom: .85rem; }

.cols { display: grid; gap: .8rem; padding: .85rem; }
.cols-1 { grid-template-columns: 1fr; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.col { min-height: 70px; border: 1px dashed #d5dae2; border-radius: 6px;
       padding: .5rem; background: rgba(255,255,255,.6); }
.col.col-ready { border-color: var(--navy); background: #eef3fb; }

.fcard { border: 1px solid var(--line); border-radius: 5px; background: #fff; margin-bottom: .5rem; }
.fcard:last-child { margin-bottom: 0; }
.fcard.dragging { opacity: .4; }
.fcard summary { display: flex; align-items: center; gap: .45rem; cursor: pointer;
                 padding: .45rem .55rem; list-style: none; }
.fcard summary::-webkit-details-marker { display: none; }
.fcard .handle { cursor: grab; color: #aaa; letter-spacing: -2px; user-select: none; }
.fcard .handle:active { cursor: grabbing; }
.fcard-label { font-weight: 600; color: var(--heading); font-size: .82rem; }
.fcard-meta { margin-left: auto; font-size: .68rem; color: #999; white-space: nowrap; }
.fcard .fedit, .fcard .fdel { padding: 0 .6rem .6rem; }
.frow { display: flex; align-items: center; gap: 1rem; margin-top: .7rem; flex-wrap: wrap; }
.wlabel { display: inline-flex !important; align-items: center; gap: .4rem; margin: 0 !important; }
.submit.sm { padding: .4rem .9rem; margin: 0; }
.meta-box { border: 1px solid var(--line); margin-bottom: .8rem; }
.meta-box > summary { cursor: pointer; padding: .6rem .9rem; font-weight: 700;
                      font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.meta-box > form { padding: 0 .9rem .9rem; }

/* live form: sections + responsive columns */
.fsec { border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.3rem 1.3rem;
        margin-bottom: 1.2rem; }
.fsec > legend { font-weight: 700; color: var(--heading); font-size: .95rem;
                 padding: 0 .5rem; }
.fcols { display: grid; gap: 0 1.4rem; }
.fcols-1 { grid-template-columns: 1fr; }
.fcols-2 { grid-template-columns: repeat(2, 1fr); }
.fcols-3 { grid-template-columns: repeat(3, 1fr); }
.fcols-4 { grid-template-columns: repeat(4, 1fr); }
.fcol .field input[type="text"], .fcol .field input[type="email"],
.fcol .field input[type="number"], .fcol .field input[type="date"],
.fcol .field select, .fcol .field textarea { width: 100%; }
@media (max-width: 680px) {
  .fcols-2, .fcols-3, .fcols-4 { grid-template-columns: 1fr; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .build-area { grid-template-columns: 1fr; }
}

/* forms cards, icon picker, section title fix (v7) */

/* live form: section title as a header (replaces fieldset/legend) */
.fsec { border: 1px solid var(--line); border-radius: 10px; padding: 0 1.3rem 1.3rem;
        margin-bottom: 1.2rem; }
.fsec-title { font-weight: 700; color: var(--heading); font-size: .95rem;
              padding: .9rem 0 .1rem; margin-bottom: .8rem;
              border-bottom: 1px solid rgba(0,0,0,.08); }
.fsec .fcols { padding-top: .3rem; }

/* form cards on the Forms page */
.form-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
              gap: .9rem; margin: .7rem 0 0; }
.fcardtile { border: 1px solid var(--line); border-radius: 10px; background: #fff;
             display: flex; flex-direction: column; overflow: hidden;
             transition: border-color .12s, box-shadow .12s; }
.fcardtile:hover { border-color: var(--navy); box-shadow: 0 2px 10px rgba(5,55,125,.08); }
.fcardtile.inactive { opacity: .6; }
.fcardtile-main { display: block; padding: 1.1rem 1.1rem 1rem; text-decoration: none;
                  color: inherit; flex: 1; }
.fcardtile-icon { display: inline-flex; width: 54px; height: 54px; border-radius: 11px;
                  align-items: center; justify-content: center; color: #fff;
                  background: var(--navy); margin-bottom: .7rem; }
.fcardtile-icon .ico { margin: 0; }
.fcardtile-title { display: block; font-weight: 700; color: var(--heading); font-size: .92rem; }
.fcardtile-desc { display: block; color: #999; font-size: .78rem; margin-top: .25rem; }
.fcardtile-admin { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
                   border-top: 1px solid var(--line); padding: .5rem .8rem;
                   font-size: .74rem; background: #fafbfc; }
.fcardtile-admin a { color: var(--navy); text-decoration: none; }
.fcardtile-admin a:hover { text-decoration: underline; }
.fcardtile-admin form.inline button { font: inherit; font-size: .72rem; cursor: pointer;
                   border: 1px solid var(--line); background: #fff; padding: .2rem .6rem; }
.pill { background: #eee; color: #777; border-radius: 10px; padding: .05rem .55rem;
        font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }

/* category head with icon + edit */
.cat-head { display: flex; align-items: center; gap: .8rem; margin-top: 1.8rem;
            border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.cat-head h2 { display: flex; align-items: center; gap: .45rem; margin: 0; }
.cat-edit { margin-left: auto; }
.cat-edit > summary, .addcat-box > summary { cursor: pointer; list-style: none;
            font-size: .74rem; color: var(--navy); }
.cat-edit > summary::-webkit-details-marker, .addcat-box > summary::-webkit-details-marker { display: none; }
.cat-edit .builder, .addcat-box .builder { border: 1px solid var(--line); border-radius: 8px;
            padding: .9rem 1rem; margin-top: .5rem; background: #fafbfc; max-width: 420px; }
.addcat-box { display: inline-block; }

/* icon picker */
.iconpick { display: grid; grid-template-columns: repeat(auto-fill, 44px); gap: .4rem;
            margin: .3rem 0 .4rem; }
.iconopt { display: block; cursor: pointer; }
.iconopt input { position: absolute; opacity: 0; }
.iconopt span { display: flex; width: 44px; height: 44px; align-items: center;
                justify-content: center; border: 1px solid var(--line); border-radius: 8px;
                color: var(--ink); background: #fff; }
.iconopt:hover span { border-color: var(--navy); color: var(--navy); }
.iconopt input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }

/* category cards + icon buttons (v8) */
.page-head { display: flex; align-items: center; justify-content: space-between;
             gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head h1 { margin: 0; display: flex; align-items: center; gap: .5rem; }

.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
             gap: .9rem; }
.catcard { border: 1px solid var(--line); border-radius: 10px; background: #fff;
           transition: border-color .12s, box-shadow .12s; }
.catcard-main { border-radius: 10px 10px 0 0; }
.catcard:hover { border-color: var(--navy); box-shadow: 0 2px 10px rgba(5,55,125,.08); }
.catcard-main { display: flex; flex-direction: column; align-items: flex-start;
                padding: 1.1rem 1.1rem 1rem; text-decoration: none; color: inherit; cursor: pointer; }
.catcard-icon { display: inline-flex; width: 58px; height: 58px; border-radius: 12px;
                align-items: center; justify-content: center; color: #fff;
                background: var(--navy); margin-bottom: .7rem; }
.catcard-icon .ico { margin: 0; }
.catcard-icon.ghost { background: #eef1f6; color: var(--navy); }
.catcard-name { font-weight: 700; color: var(--heading); font-size: .95rem; }
.catcard-count { display: inline-block; margin-top: .4rem; font-size: .7rem; font-weight: 700;
                 padding: .12rem .55rem; border-radius: 10px; letter-spacing: .02em; }
.catcard-admin { display: flex; gap: .35rem; border-top: 1px solid var(--line);
                 padding: .45rem .6rem; background: #fafbfc; position: relative;
                 border-radius: 0 0 10px 10px; }
.catcard.newcat > summary { list-style: none; }
.catcard.newcat > summary::-webkit-details-marker { display: none; }
.catcard-main.add { border: 2px dashed var(--line); border-radius: 10px; }
.catcard.newcat[open] > summary .catcard-icon.ghost { background: var(--navy); color: #fff; }

/* icon buttons (edit/delete/hide/submissions) */
.iconbtn { display: inline-flex; align-items: center; justify-content: center; gap: .1rem;
           width: 38px; height: 34px; border: 1px solid var(--line); border-radius: 7px;
           background: #fff; color: var(--ink); cursor: pointer; text-decoration: none;
           font: inherit; padding: 0; position: relative; }
.iconbtn .ico { margin: 0; }
.iconbtn:hover { border-color: var(--navy); color: var(--navy); }
.iconbtn.danger:hover { border-color: #a33; color: #a33; }
.iconbtn .badge { position: absolute; top: -6px; right: -6px; background: var(--navy);
                  color: #fff; font-size: .6rem; line-height: 1; padding: .15rem .3rem;
                  border-radius: 8px; }

/* pop-out edit forms inside a card */
.mini { position: relative; }
.mini > summary { list-style: none; }
.mini > summary::-webkit-details-marker { display: none; }
.pop { position: absolute; z-index: 20; top: 34px; left: 0; width: 260px;
       border: 1px solid var(--line); border-radius: 8px; background: #fff;
       box-shadow: 0 6px 24px rgba(0,0,0,.12); padding: .9rem 1rem; }
.newcat .pop { position: static; width: auto; box-shadow: none; border: none;
               border-top: 1px solid var(--line); border-radius: 0; }

/* return / breadcrumb links (v9) */
.crumb { display: flex; align-items: center; gap: .5rem; margin: 0 0 1.1rem; }
.crumb a { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem;
           font-weight: 600; color: var(--navy); text-decoration: none;
           background: #eef1f6; padding: .38rem .85rem .38rem .6rem; border-radius: 20px;
           transition: background .12s, color .12s; }
.crumb a:hover { background: var(--navy); color: #fff; }
.crumb a .ico { margin: 0; }

/* cleaner edit pop-out (v10) */
.mini > summary { cursor: pointer; }
.pop { position: absolute; z-index: 30; top: 40px; left: 0; width: 280px; max-width: 84vw;
       border: 1px solid var(--line); border-radius: 10px; background: #fff;
       box-shadow: 0 8px 28px rgba(0,0,0,.16); padding: 1rem 1.1rem; }

/* colour picker + lockable + locked (v11) */
.colpick { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0 .5rem; }
.colopt { cursor: pointer; }
.colopt input { position: absolute; opacity: 0; }
.colopt span { display: block; width: 30px; height: 30px; border-radius: 7px;
               border: 1px solid rgba(0,0,0,.15); box-shadow: inset 0 0 0 2px #fff; }
.colopt input:checked + span { outline: 2px solid var(--navy); outline-offset: 1px; }
.check.lockable { display: block; margin: .3rem 0 .8rem; font-size: .85rem; }
.pill.locked { background: #fde8e8; color: #a33; display: inline-flex; align-items: center; gap: .25rem; }
.pill.locked .ico { margin: 0; }
.iconbtn.on { border-color: #a33; color: #a33; }
dl.answers + p .iconbtn { gap: .3rem; width: auto; padding: 0 .7rem; }

/* submission edit tools + staff card footer (v12) */
.subtools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 0 0 1rem; }
.iconbtn.wide { width: auto; padding: 0 .75rem; gap: .3rem; }
.fcardtile-admin.staff { justify-content: flex-start; }
.tlink { display: inline-flex; align-items: center; gap: .35rem; color: var(--navy);
         text-decoration: none; font-size: .76rem; font-weight: 600; }
.tlink:hover { text-decoration: underline; }

/* nicely styled submission list (v13) */
.sublist { display: flex; flex-direction: column; gap: .55rem; margin-top: .3rem; }
.subrow { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem;
          border: 1px solid var(--line); border-radius: 10px; background: #fff;
          transition: border-color .12s, box-shadow .12s; }
.subrow:hover { border-color: var(--navy); box-shadow: 0 2px 10px rgba(5,55,125,.07); }
.subrow.locked { background: #fdf6f6; }
.subrow .avatar { width: 40px; height: 40px; flex: none; }
.subrow-who { display: flex; flex-direction: column; min-width: 0; }
.subrow-name { font-weight: 700; color: var(--heading); font-size: .88rem;
               display: inline-flex; align-items: center; gap: .5rem; }
.subrow-meta { color: #999; font-size: .76rem; }
.subrow-actions { margin-left: auto; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
@media (max-width: 560px) {
  .subrow { flex-wrap: wrap; }
  .subrow-actions { margin-left: 0; width: 100%; }
}

/* themed action buttons (inline bg/colour set per card) (v14) */
.iconbtn.themed { border-style: solid; }
.iconbtn.themed:hover { filter: brightness(1.12); }
.iconbtn.themed .badge { color: #fff; }

/* form type picker + type pill (v15) */
.typepick { display: grid; gap: .5rem; margin: .3rem 0 .9rem; }
.typeopt { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem;
           align-items: start; border: 1px solid var(--line); border-radius: 9px;
           padding: .7rem .85rem; cursor: pointer; }
.typeopt input { grid-row: 1 / span 2; align-self: center; }
.typeopt .t-name { font-weight: 700; color: var(--heading); font-size: .85rem;
                   display: inline-flex; align-items: center; gap: .35rem; }
.typeopt .t-desc { color: #999; font-size: .76rem; }
.typeopt:hover { border-color: var(--navy); }
.typeopt input:checked ~ .t-name { color: var(--navy); }
.typepick label.typeopt:has(input:checked) { border-color: var(--navy); background: #f4f7fb; }

.typepill { display: inline-block; margin-top: .3rem; font-size: .64rem; font-weight: 700;
            text-transform: uppercase; letter-spacing: .06em; padding: .12rem .5rem;
            border-radius: 10px; }
.typepill.request    { background: #eef4ff; color: #3f6cb0; }
.typepill.persistent { background: #eafaf1; color: #3f9d6b; }

/* type icon badge on form cards (v16) */
.fcardtile { position: relative; }
.type-badge { position: absolute; top: .6rem; right: .6rem; width: 26px; height: 26px;
              border-radius: 7px; display: inline-flex; align-items: center;
              justify-content: center; z-index: 1; }
.type-badge .ico { margin: 0; }

/* date range, notifications, user detail (v16) */
.daterange { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.daterange input[type="date"] { flex: 1 1 150px; min-width: 130px; }
.dr-sep { color: #999; font-size: .8rem; }

.notif { position: relative; display: inline-flex; align-items: center; color: var(--heading);
         margin-right: .9rem; }
.notif:hover { color: var(--navy); }
.notif-badge { position: absolute; top: -7px; right: -9px; background: #c0392b; color: #fff;
               font-size: .6rem; font-weight: 700; line-height: 1; padding: .16rem .32rem;
               border-radius: 9px; }
.notif-list { display: flex; flex-direction: column; gap: .5rem; }
.notif-item { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem;
              border: 1px solid var(--line); border-radius: 10px; background: #fff;
              text-decoration: none; color: inherit; }
a.notif-item:hover { border-color: var(--navy); }
.notif-item.unread { background: #f4f7fb; border-color: #cfe0f5; }
.notif-ico { display: inline-flex; width: 34px; height: 34px; border-radius: 8px; flex: none;
             align-items: center; justify-content: center; background: var(--navy); color: #fff; }
.notif-ico .ico { margin: 0; }
.notif-body { display: flex; flex-direction: column; }
.notif-msg { font-size: .86rem; color: var(--heading); }
.notif-item.unread .notif-msg { font-weight: 700; }
.notif-time { font-size: .72rem; color: #999; }
.btn-sm.ghost { background: #eef1f6; color: var(--navy); }
.btn-sm.ghost:hover { background: var(--navy); color: #fff; }

.user-head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.2rem; }
.avatar.xl { width: 74px; height: 74px; }
.user-head-info h1 { margin: 0; }
.user-sub { color: #888; margin: .2rem 0 .4rem; }
.user-tags { display: flex; gap: .4rem; margin: 0; }
.pill.ok { background: #e7f6ee; color: #2e7d4f; }
.user-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
              gap: .7rem; margin-bottom: 1.6rem; }
.ustat { border: 1px solid var(--line); border-radius: 10px; padding: .8rem .9rem; background: #fafbfc; }
.ustat-n { display: block; font-weight: 700; color: var(--heading); font-size: .95rem; }
.ustat-l { display: block; font-size: .72rem; color: #999; text-transform: uppercase; letter-spacing: .05em; }
.sec-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--heading);
         border-bottom: 1px solid var(--line); padding-bottom: .35rem; margin: 1.6rem 0 .8rem; }
.subrow-badge { display: inline-flex; width: 40px; height: 40px; border-radius: 9px; flex: none;
                align-items: center; justify-content: center; background: var(--navy); color: #fff; }
.subrow-badge .ico { margin: 0; }
a.subrow { text-decoration: none; color: inherit; }
.logintbl { width: 100%; border-collapse: collapse; font-size: .8rem; }
.logintbl th, .logintbl td { border: 1px solid var(--line); padding: .45rem .7rem; text-align: left; }
.logintbl thead th { background: #f2f5fa; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.logintbl tr.failrow td { background: #fdf6f6; }
.ulink { color: var(--navy); text-decoration: none; font-weight: 600; }
.ulink:hover { text-decoration: underline; }

/* redesigned section-settings panel (v17) */
.secedit { padding: .1rem .85rem; }
.secedit > summary { padding: .55rem 0; }
.secpanel { margin: .2rem 0 .3rem; padding: 1rem 1.1rem 1.1rem; background: #f7f9fc;
            border: 1px solid var(--line); border-radius: 10px; }
.secpanel-form { display: block; }
.secpanel-label { display: block; font-weight: 700; font-size: .7rem; text-transform: uppercase;
                  letter-spacing: .05em; color: #6b7280; margin: 0 0 .3rem; }
.secpanel-form > input[type="text"] { width: 100%; box-sizing: border-box; padding: .5rem .65rem;
                  border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff;
                  margin-bottom: .9rem; }
.secpanel-row { display: flex; gap: 1.6rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1rem; }
.secpanel-cell { display: flex; flex-direction: column; }
.secpanel-cell .colpick { margin: 0; }
.secpanel-cell select { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px;
                        font: inherit; background: #fff; min-width: 72px; }
.secpanel-cell.narrow { flex: none; }
.secpanel-actions { display: flex; align-items: center; gap: .8rem; }
.secpanel .submit.sm { display: inline-flex; align-items: center; gap: .4rem; }
.secpanel .submit.sm .ico { margin: 0; }
.btn-del { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .8rem;
           cursor: pointer; background: #fff; color: #b23b3b; border: 1px solid #e3b9b9;
           border-radius: 8px; padding: .45rem .8rem; margin-top: .8rem; }
.btn-del:hover { background: #b23b3b; color: #fff; border-color: #b23b3b; }
.btn-del .ico { margin: 0; }

/* styled confirmation modal (v18) */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,25,45,.45); z-index: 1000;
                  display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-backdrop[hidden] { display: none; }
.modal { background: #fff; border-radius: 12px; padding: 1.5rem 1.6rem 1.3rem; max-width: 400px;
         width: 100%; box-shadow: 0 16px 48px rgba(0,0,0,.28); text-align: center; }
.modal-ico { width: 46px; height: 46px; border-radius: 50%; background: #fdecea; color: #c0392b;
             display: inline-flex; align-items: center; justify-content: center; margin-bottom: .8rem; }
.modal-ico .ico { margin: 0; }
.modal-msg { margin: 0 0 1.3rem; font-size: .9rem; color: var(--heading); line-height: 1.45; }
.modal-actions { display: flex; justify-content: center; gap: .7rem; }
.btn-sm.danger-solid { background: #c0392b; color: #fff; border: 1px solid #c0392b; }
.btn-sm.danger-solid:hover { background: #a5311f; border-color: #a5311f; }

/* aligned section grid: same-row fields line up across columns (v22) */
.fgrid { display: grid; gap: 0 1.4rem; align-items: start; margin-top: .2rem; }
.fgrid > .field { margin-bottom: 1.1rem; }
@media (max-width: 680px) {
  .fgrid { grid-template-columns: 1fr !important; }
  .fgrid > .field { grid-column: 1 !important; grid-row: auto !important; }
}

/* groups page + group checkboxes (v23) */
.grouplist { display: flex; flex-direction: column; gap: .55rem; margin-top: .6rem; }
.grouprow { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem;
            border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.group-ico { display: inline-flex; width: 38px; height: 38px; border-radius: 9px; flex: none;
             align-items: center; justify-content: center; background: var(--navy); color: #fff; }
.group-ico .ico { margin: 0; }
.group-main { display: flex; flex-direction: column; }
.group-name { font-weight: 700; color: var(--heading); font-size: .9rem;
              display: inline-flex; align-items: center; gap: .5rem; }
.group-meta { color: #999; font-size: .76rem; }
.group-actions { margin-left: auto; display: flex; gap: .4rem; position: relative; }
.checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
             gap: .5rem; margin: .3rem 0 .8rem; }
.checkopt { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line);
            border-radius: 8px; padding: .5rem .7rem; cursor: pointer; font-size: .85rem; }
.checkopt:hover { border-color: var(--navy); }
.checkopt input:checked ~ span { font-weight: 700; color: var(--navy); }
.groupform { max-width: 620px; }

/* consistent rounded corners on all buttons (v25) */
.submit, .btn-sm, .iconbtn, form.inline button, .secctl button,
.fcardtile-admin form.inline button, .btn-del, .modal .btn-sm { border-radius: 8px; }
.submit { border-radius: 9px; }

/* user cards (v26) */
.user-cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.usercard .catcard-main { padding-bottom: .9rem; }
.avatar.lg { width: 76px; height: 76px; border-radius: 14px; margin-bottom: .8rem; object-fit: cover; }
.usercard .catcard-name { font-size: .95rem; }
.user-email { display: block; font-size: .76rem; color: #7a7f88; word-break: break-all; margin-top: .15rem; }
.user-pills { display: flex; gap: .35rem; margin-top: .55rem; flex-wrap: wrap; }
.user-pills .pill { text-transform: capitalize; }
.usercard-admin { gap: .5rem; flex-wrap: wrap; align-items: center; }
.usercard-admin .rolepick select { padding: .35rem .5rem; border: 1px solid var(--line);
                                    border-radius: 8px; font: inherit; background: #fff;
                                    text-transform: capitalize; cursor: pointer; }
.you { font-size: .72rem; color: #999; font-weight: 400; }

/* form visibility panel + group chips (v28) */
.vis-panel { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.3rem;
             margin: 1rem 0 1.4rem; background: #fafbfc; }
.panel-h { display: flex; align-items: center; gap: .45rem; font-size: .95rem; margin: 0 0 .25rem; color: var(--heading); }
.panel-h .ico { margin: 0; }
.vis-panel .checkgrid { margin-top: .6rem; }
.grpopt { gap: .5rem; }
.grpchip { display: inline-flex; width: 26px; height: 26px; border-radius: 7px; flex: none;
           align-items: center; justify-content: center; }
.grpchip .ico { margin: 0; }
.grpname { text-transform: capitalize; }
.checkopt:has(input:checked) { border-color: var(--navy); background: #f4f7fb; }

/* holiday entitlement (v29) */
.holiday-stats .ustat.over { border-color: #e3b9b9; background: #fdf6f6; }
.holiday-stats .ustat.over .ustat-n { color: #b23b3b; }
.entform .ustat-n { display: flex; align-items: center; gap: .45rem; }
.entform input[type="number"] { width: 74px; padding: .3rem .45rem; border: 1px solid var(--line);
                                border-radius: 8px; font: inherit; font-weight: 700; }
.holbal .ico { vertical-align: -2px; margin-right: .3rem; }
.check.holdeduct { display: block; margin: .5rem 0 .9rem; font-size: .85rem; }

/* user detail redesign: hero + section panels (v30) */
.user-hero { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap;
             border: 1px solid var(--line); border-radius: 14px;
             padding: 1.4rem 1.6rem; margin-bottom: 1.3rem; }
.avatar.hero { width: 86px; height: 86px; border-radius: 16px; object-fit: cover; flex: none; }
.user-hero-info { min-width: 0; }
.user-hero-info h1 { margin: 0 0 .15rem; font-size: 1.35rem; }
.user-hero .user-sub { margin: 0 0 .5rem; color: #6b7280; font-size: .84rem; }
.user-hero .user-tags { margin: 0; display: flex; gap: .4rem; }
.user-hero .user-tags .pill { text-transform: capitalize; }
.user-hero-stats { margin-left: auto; display: grid;
                   grid-template-columns: repeat(4, auto); gap: 1.6rem; }
.hstat { text-align: right; }
.hstat-n { display: block; font-weight: 700; color: var(--heading); font-size: .95rem; }
.hstat-l { display: block; font-size: .68rem; color: #7a7f88; text-transform: uppercase; letter-spacing: .05em; }
.hstat.warn .hstat-n { color: #b23b3b; }
@media (max-width: 860px) {
  .user-hero-stats { margin-left: 0; width: 100%; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .hstat { text-align: left; }
}

.dpanel { border: 1px solid var(--line); border-radius: 12px; background: #fff;
          padding: 1.1rem 1.3rem 1.2rem; margin-bottom: 1rem; }
.dpanel .panel-h { margin-bottom: .7rem; }
.dpanel .user-stats { margin-bottom: .6rem; }
.dpanel .sublist { margin-top: .2rem; }
.dpanel .logintbl { margin-top: .2rem; }
.dpanel > .muted.small:last-child { margin-bottom: 0; }

/* settings, tickets, assets (v31) */
.settingsform { max-width: 560px; }
.settings-actions { display: flex; gap: .7rem; align-items: center; margin-top: .4rem; }
.settings-actions.inline-forms { margin-top: .9rem; }
.tabbar { display: flex; gap: .35rem; }
.tab { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
       color: var(--navy); background: #eef1f6; padding: .4rem .9rem; border-radius: 18px;
       text-decoration: none; }
.tab.on, .tab:hover { background: var(--navy); color: #fff; }
.asset-cards .catcard-main { padding-bottom: 1rem; }
.asset-meta { display: block; color: #7a7f88; font-size: .76rem; margin-top: .3rem; line-height: 1.5; }
.asset-cards .user-pills { margin-top: .5rem; }

/* asset telemetry meters (v32) */
.meters { display: flex; flex-direction: column; gap: .3rem; margin-top: .55rem; width: 100%; }
.meter { display: flex; align-items: center; gap: .45rem; font-size: .7rem; color: #7a7f88; }
.meter-l { width: 28px; font-weight: 700; letter-spacing: .04em; }
.meter-track { flex: 1; height: 7px; background: rgba(0,0,0,.08); border-radius: 4px; overflow: hidden; }
.meter-fill { display: block; height: 100%; background: #3f6cb0; border-radius: 4px; }
.meter-fill.hot { background: #c0392b; }
.meter-v { width: 34px; text-align: right; font-weight: 700; color: var(--heading); }

/* asset/ticket search box (v33) */
.page-head .searchbox { position: relative; display: inline-flex; align-items: center; margin-left: auto; }
.page-head .searchbox .ico { position: absolute; left: 10px; color: #8a93a0; pointer-events: none; }
.page-head .searchbox input { font: inherit; font-size: .85rem; padding: .5rem .8rem .5rem 2rem;
                              border: 1px solid var(--line); border-radius: 9px; background: #fff;
                              min-width: 220px; outline: none; }
.page-head .searchbox input:focus { border-color: var(--navy); }
.nomatch { margin-top: .4rem; }

/* network schematic (v34) */
.wrap.wide { max-width: 1400px; }
.net-toolbar { display: flex; gap: .5rem; margin-left: auto; flex-wrap: wrap; }
.btn-sm.on { background: var(--navy); color: #fff; }
.btn-sm.unsaved { box-shadow: 0 0 0 2px rgba(192,57,43,.35); }
.net-hint { margin: .2rem 0 .8rem; }
.net-stage { position: relative; width: 100%; height: 78vh; min-height: 720px; overflow: auto;
             border: 2px solid #cdd6e2; border-radius: 12px; background: #fbfcfe;
             box-shadow: inset 0 1px 4px rgba(20,40,80,.05); }
.net-links { position: absolute; top: 0; left: 0; pointer-events: none; }
.net-stage.deleting .net-links { pointer-events: auto; }
.net-link-line { stroke: #9fb0c8; stroke-width: 2.5; pointer-events: stroke; }
.net-stage.deleting .net-link-line { cursor: pointer; }
.net-stage.deleting .net-link-line:hover { stroke: #c0392b; stroke-width: 3.5; }
.net-nodes { position: absolute; top: 0; left: 0; width: 100%; height: 100%; min-width: 100%; min-height: 100%; }
.net-stage.deleting .net-nodes { pointer-events: none; }
.net-stage.deleting .net-node { pointer-events: auto; }
.net-node { position: absolute; width: 96px; margin-left: -48px; text-align: center;
            cursor: grab; user-select: none; z-index: 2; }
.net-node.dragging { cursor: grabbing; z-index: 5; }
.net-ico { width: 52px; height: 52px; margin: 0 auto; border-radius: 13px;
           display: flex; align-items: center; justify-content: center;
           box-shadow: 0 2px 8px rgba(20,40,80,.18); border: 2px solid #fff; }
.net-ico svg { width: 28px; height: 28px; }
.net-cap { margin-top: 5px; line-height: 1.25; }
.net-name { display: block; font-size: .76rem; font-weight: 700; color: var(--heading);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net-sub { display: block; font-size: .66rem; color: #8a93a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net-stage.linking .net-node, .net-stage.deleting .net-node { cursor: pointer; }
.net-node.sel .net-ico { box-shadow: 0 0 0 3px var(--navy), 0 2px 8px rgba(20,40,80,.18); }
.net-stage.deleting .net-node:not(.managed):hover .net-ico { box-shadow: 0 0 0 3px #c0392b; }
.net-stage.deleting .net-node.managed:hover { cursor: not-allowed; }
.net-modal { text-align: left; max-width: 380px; }
.net-modal .nl { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
                 letter-spacing: .04em; color: #667; margin: .7rem 0 .25rem; }
.net-modal select, .net-modal input { width: 100%; font: inherit; padding: .5rem .6rem;
                 border: 1px solid var(--line); border-radius: 8px; }
.net-modal .modal-actions { margin-top: 1rem; }

/* host/VM grouping ring (v35) */
.net-ring { fill: rgba(63,108,176,.05); stroke: #b9c8dd; stroke-width: 1.5; stroke-dasharray: 5 4; }
.net-spoke { stroke: #c3d0e2; stroke-width: 1.5; }
.net-node.host .net-ico { box-shadow: 0 0 0 3px rgba(63,108,176,.35), 0 2px 8px rgba(20,40,80,.18); }
.net-node.member .net-ico { width: 44px; height: 44px; }
.net-node.member .net-ico svg { width: 23px; height: 23px; }
.net-node.member { width: 84px; margin-left: -42px; }

/* IP node sub-label reads as a chip-ish mono (v36) */
.net-sub { font-variant-numeric: tabular-nums; }

/* network zoom (v37) */
.net-world { position: relative; transform-origin: 0 0; width: 100%; height: 100%; }
.net-zoom { display: inline-flex; align-items: center; border: 1px solid var(--line);
            border-radius: 9px; overflow: hidden; margin-right: .3rem; }
.zbtn { font: inherit; font-weight: 700; border: none; background: #fff; color: var(--navy);
        padding: .4rem .6rem; cursor: pointer; line-height: 1; }
.zbtn:hover { background: var(--navy); color: #fff; }
.zbtn.zlvl { min-width: 52px; font-size: .78rem; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

/* dashed snap grid on the network world (v38) */
.net-world { background-color: #fbfcfe;
             background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%3E%3Cpath%20d%3D%27M24%200H0V24%27%20fill%3D%27none%27%20stroke%3D%27%23d3dae4%27%20stroke-width%3D%271%27%20stroke-dasharray%3D%272%203%27%2F%3E%3C%2Fsvg%3E");
             background-size: 24px 24px; }

/* marquee selection + group move (v39) */
.net-marquee { position: absolute; border: 1.5px dashed var(--navy);
               background: rgba(63,108,176,.08); pointer-events: none; z-index: 4; border-radius: 3px; }
.net-node.marq .net-ico, .net-node.selected .net-ico { box-shadow: 0 0 0 3px var(--navy), 0 2px 8px rgba(20,40,80,.18); }
.net-node.selected .net-name { color: var(--navy); }

/* wider invisible hit target for link deletion (v40) */
.net-link-hit { stroke: transparent; stroke-width: 14; pointer-events: none; }
.net-stage.deleting .net-link-hit { pointer-events: stroke; cursor: pointer; }
.net-stage.deleting .net-link-hit:hover + .net-link-line { stroke: #c0392b; stroke-width: 3.5; }

/* junction taps — connect a line to the middle of another line (v41) */
.net-stage.linking .net-links { pointer-events: auto; }
.net-stage.linking .net-nodes { pointer-events: none; }
.net-stage.linking .net-node { pointer-events: auto; }
.net-stage.linking .net-link-hit { pointer-events: stroke; cursor: crosshair; }
.net-stage.linking .net-link-hit:hover + .net-link-line { stroke: var(--navy); stroke-width: 3.5; }
.net-jct { fill: var(--navy); stroke: #fff; stroke-width: 1.5; }

/* network scan / rogue detection (v42) */
.scan-status { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem;
               font-size: .76rem; font-weight: 700; padding: .35rem .7rem; border-radius: 18px; }
.scan-status.on { background: #e7f6ee; color: #2e7d4f; }
.scan-status.off { background: #fdeef2; color: #b23b3b; }
.scan-status .ico { margin: 0; }
.scan-summary { display: flex; gap: 2rem; margin: .8rem 0 1rem; }
.ssum-n { display: block; font-weight: 700; font-size: 1.1rem; color: var(--heading); }
.ssum-l { display: block; font-size: .72rem; color: #7a7f88; text-transform: uppercase; letter-spacing: .04em; }
.ssum.warn .ssum-n { color: #b23b3b; }
.scan-tabs { margin-bottom: .8rem; }
.scan-list { display: flex; flex-direction: column; gap: .5rem; }
.portchip { display: inline-block; padding: .05rem .4rem; margin: 0 .2rem .2rem 0; border-radius: 5px;
            background: #eef1f6; font-family: ui-monospace, monospace; font-size: .7rem; }
.portchip.risky { background: #f6d9d9; color: #a3312a; font-weight: 700; }
.mono { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* scanner settings panel (v43) */
.check { display: flex; align-items: center; gap: .5rem; margin: .55rem 0; font-size: .85rem; }
.check input[type="checkbox"] { flex: none; }
.panel-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #7a7f88;
             margin: 1.3rem 0 .4rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* asset-match badge on the Network Scan page (v44) */
.pill.match { background: #eef4ff; color: #3f6cb0; text-transform: none; }

/* network scan as cards (v45) */
.scan-cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.scan-card .catcard-main { padding-bottom: .9rem; }
.scan-card .user-pills { margin-top: .5rem; }
.scan-meta { display: block; font-size: .76rem; color: #7a7f88; margin-top: .5rem; line-height: 1.6; }
.scan-meta .mono { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.scan-ports { display: block; margin-top: .4rem; font-size: .72rem; color: #7a7f88; }
.scan-card-admin { gap: .4rem; flex-wrap: wrap; }
.scan-card-admin .iconbtn.wide { flex: 1; min-width: 0; justify-content: center; }

/* inferred switch/router/AP health badge on the network canvas */
.net-lh { position: absolute; top: -3px; right: -3px; width: 12px; height: 12px;
          border-radius: 50%; border: 2px solid #fff; z-index: 3; }
.net-lh-healthy { background: #3f9d6b; }
.net-lh-unknown { background: #c9a227; }
.net-lh-unmonitored { background: #a7b0bd; }
.net-ico { position: relative; }
.pill.lh-healthy { background: #eafaf1; color: #2e7d4f; }
.pill.lh-unknown { background: #fdf6e3; color: #8a6d1a; }
.pill.lh-unmonitored { background: #f0f2f6; color: #667; }

/* UniFi-only device badge (known to the controller, not seen by this ARP sweep) */
.pill.unifi { background: #f3eefe; color: #7d5ec2; text-transform: none; }

/* network scan pie charts (v46) */
.donut-row { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: 1rem 0 1.4rem; }
.donut-card { flex: 1; min-width: 260px; border: 1px solid var(--line); border-radius: 12px;
              padding: 1rem 1.2rem; background: #fff; }
.donut-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
               color: #7a7f88; margin-bottom: .7rem; }
.donut-body { display: flex; align-items: center; gap: 1.1rem; }
.donut-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .45rem; }
.dl-row { display: flex; align-items: center; gap: .5rem; font-size: .78rem; }
.dl-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dl-label { flex: 1; min-width: 0; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-n { color: var(--heading); font-weight: 700; }
.dl-pct { color: #999; width: 34px; text-align: right; }
@media (max-width: 640px) { .donut-body { flex-direction: column; align-items: flex-start; } }

/* richer device identity display (v47) */
.scan-vendor { color: #556; font-weight: 600; }
.scan-identity { display: inline-block; max-width: 100%; overflow: hidden;
                 text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
                 color: #7a7f88; font-style: italic; cursor: help; }

/* UniFi-suggested link overlay (dashed — never persisted, purely computed) */
.net-auto-link { stroke: #7d5ec2; stroke-width: 2; stroke-dasharray: 5 4; opacity: .7; pointer-events: none; }

/* add-to-assets type picker popover */
.add-asset-pop .pop { min-width: 220px; }
.add-asset-pop select { width: 100%; padding: .4rem .5rem; border: 1px solid var(--line);
                        border-radius: 8px; font: inherit; margin-bottom: .5rem; }

/* Standard Switch badge — Managed Switch is the expected default and stays
   unmarked; only the exception (unmanaged/dumb switch) needs flagging */
.net-swkind { position: absolute; bottom: -3px; left: -3px; width: 14px; height: 14px;
              border-radius: 50%; border: 2px solid #fff; background: #8a93a0; color: #fff;
              font-size: 9px; font-weight: 800; line-height: 10px; text-align: center; z-index: 3; }

/* WiFi client -> AP overlay: pale dashed line + small badge on the device */
.net-wifi-link { stroke: #9db8d8; stroke-width: 1.5; stroke-dasharray: 3 4; opacity: .65; pointer-events: none; }
.net-wifi { position: absolute; top: -3px; left: -3px; width: 14px; height: 14px;
            border-radius: 50%; border: 2px solid #fff; background: #5b8fc7; color: #fff;
            display: flex; align-items: center; justify-content: center; z-index: 3; }
.net-wifi svg { width: 9px; height: 9px; }

/* SSIDs broadcasting from an AP, shown under its label on the Network canvas */
.net-ssids { display: block; font-size: .62rem; color: #5b8fc7; max-width: 140px;
             overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* scan card overflow + polish fix — overrides earlier rules of the same
   selector; later in the cascade wins at equal specificity */
.scan-card { overflow: hidden; }
.scan-card .catcard-main { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem .9rem; }
.scan-card .catcard-name { overflow-wrap: anywhere; line-height: 1.3; margin-bottom: .1rem; }
.scan-card .user-pills { margin: 0 0 .2rem; }
.scan-vendor {
  display: block; max-width: 100%; overflow-wrap: anywhere;
  color: #556; font-weight: 600; line-height: 1.35;
}
.scan-identity {
  display: block; max-width: 100%; box-sizing: border-box;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #7a7f88; font-style: italic; cursor: help; line-height: 1.3;
}
.scan-meta { line-height: 1.5; }
.scan-ports { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; margin-top: .3rem; }
.scan-ports .portchip { margin: 0; }
.scan-card-admin { padding: .7rem 1.1rem; gap: .5rem; }

/* scan card redesign — labeled fields + footer pinned to card bottom */
.scan-cards { align-items: stretch; }
.scan-card {
  display: flex; flex-direction: column; height: 100%;
  overflow: hidden; box-sizing: border-box;
}
.scan-card .catcard-main {
  flex: 1 1 auto; display: flex; flex-direction: column; gap: .3rem;
  padding: 1rem 1.1rem .9rem;
}
.scan-card .catcard-admin { flex: 0 0 auto; }
.scan-card .catcard-name { overflow-wrap: anywhere; line-height: 1.3; margin-bottom: .1rem; }
.scan-card .user-pills { margin: 0 0 .3rem; }

.scan-fields { display: flex; flex-direction: column; gap: .22rem; margin: .1rem 0 .2rem; }
.sf-row { display: flex; gap: .5rem; align-items: baseline; font-size: .78rem; }
.sf-label {
  flex: 0 0 62px; text-transform: uppercase; letter-spacing: .03em;
  font-size: .65rem; font-weight: 700; color: #9096a2;
}
.sf-val {
  flex: 1 1 auto; min-width: 0; color: #333;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: default;
}
.sf-val.mono { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; }

.scan-seen { display: block; font-size: .72rem; color: #9096a2; margin: .1rem 0 .3rem; }
.scan-ports { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; margin-top: .1rem; }
.scan-ports .portchip { margin: 0; }
.scan-card-admin { padding: .7rem 1.1rem; gap: .5rem; }

/* SSID badges positioned to the side of an AP node, replacing the old
   single truncated text label stacked underneath it */
.net-node { position: absolute; }
.net-ssid-badges {
  position: absolute; left: 100%; top: 2px; margin-left: 8px;
  display: flex; flex-direction: column; gap: 3px; z-index: 4;
  pointer-events: none;
}
.net-ssid-badge {
  display: inline-block; white-space: nowrap; background: #eef4ff;
  color: #3f6cb0; border: 1px solid #d5e2f7; border-radius: 10px;
  padding: .1rem .5rem; font-size: .62rem; font-weight: 700;
}

/* scan card popover fix — overrides the earlier overflow:hidden backstop,
   which was silently clipping the add-to-assets popover invisible */
.scan-card { overflow: visible; }
.add-asset-pop { position: relative; }
.add-asset-pop .pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15); padding: .9rem 1rem;
}

/* scan card stacking fix — the popover was being painted over by
   neighbouring grid cards because .scan-card never had its own stacking
   context. Promote the whole card when its popover is open. */
.scan-card { position: relative; }
.scan-card:has(details.add-asset-pop[open]) { z-index: 100; }
.add-asset-pop .pop { z-index: 101; }

/* documents + submissions */
.doc-progress-track { height: 6px; background: #eef1f6; border-radius: 4px; overflow: hidden; margin-top: .4rem; }
.doc-progress-fill { height: 100%; background: var(--navy); border-radius: 4px; }
.doc-signed { color: #2e7d4f; }
.doc-unsigned { color: #a3312a; }
.sign-box { border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.4rem; margin-top: 1rem; background: #fafbfd; }
.sign-box input[type=text] { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; margin: .4rem 0 .9rem; }
.pdf-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 10px; margin: 1rem 0; }
.sub-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }

/* scan popover z-index bump — pragmatic attempt at a much higher layer */
.scan-card:has(details.add-asset-pop[open]) { z-index: 9000; }
.add-asset-pop .pop { z-index: 9001; }

/* in-page PDF.js viewer */
.pdf-container { width: 100%; height: 65vh; overflow-y: auto; border: 1px solid var(--line);
                  border-radius: 10px; background: #6b6f76; padding: 1rem; box-sizing: border-box;
                  display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.pdf-page { max-width: 100%; box-shadow: 0 2px 10px rgba(0,0,0,.25); background: #fff; }
#pdfScrollHint.doc-signed { font-weight: 700; }

/* ---- IT dropdown in the top menu (portal-ui-20260729b) -------------------- */
/* <details> so open/close and keyboard activation are native; only dismissal
   needs script. The links inside the panel already pick up the flat .menu a
   rules through the descendant selector, so only the summary is restyled. */

/* .menu is a flex row with default align-items:stretch, so its children are
   full row height. <details> is a block, and without this its <summary> would
   sit at the top of that stretched box instead of filling it like the sibling
   <a> elements do — which is what tilts the whole bar out of line. */
.menu-group { position: relative; display: flex; }

.menu-group > summary {
    list-style: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: var(--heading);
    padding: .45rem .7rem; user-select: none; white-space: nowrap;
}
.menu-group > summary::-webkit-details-marker { display: none; }
.menu-group > summary::marker { content: ''; }
.menu-group > summary:hover { color: var(--navy); }
.menu-group > summary.on { background: var(--navy); color: #fff; }
.menu-group > summary .caret { display: inline-flex; opacity: .7; }
.menu-group > summary .caret .ico { margin-right: 0; }
.menu-group[open] > summary .caret { transform: rotate(180deg); }

.menu-drop {
    position: absolute; top: 100%; left: 0; z-index: 600;
    min-width: 172px; display: flex; flex-direction: column; padding: .25rem;
    background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--navy);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .13);
}
.menu-drop a { padding: .5rem .7rem; white-space: nowrap; }

/* ---- Assets card: head row, source dots, collapsed detail ----------------- */
/* .catcard-main is a column flex box, so the head is its own row: icon and
   name on the left, sighting dots pushed to the right edge by margin-left. */
.asset-head { display: flex; align-items: flex-start; gap: .7rem; width: 100%; }
.asset-headtext { display: flex; flex-direction: column; gap: .15rem;
                  min-width: 0; flex: 1 1 auto; }
.asset-headtext .catcard-name { overflow-wrap: anywhere; line-height: 1.3; }
.asset-type { color: #7a7f88; font-size: .76rem; line-height: 1.45; }
.asset-head .src-dots { margin-left: auto; flex: 0 0 auto; padding-top: .15rem; }

/* One dot per source of truth: RMM agent, on-site scanner, UniFi controller.
   Green = that source has seen the device inside its own staleness window.
   Grey = seen before but not lately. Hollow = never seen by that source at
   all, which for a printer or an AP on another VLAN is normal, not a fault. */
.src-dots { display: inline-flex; gap: .3rem; align-items: center; }
.src-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    border: 1px solid transparent; background: #d7dae0; color: #fff;
    cursor: default;
}
.src-dot .ico { margin-right: 0; }
.src-dot.fresh { background: #3f9d6b; }
.src-dot.never { background: transparent; border-color: var(--line); color: #c6cad2; }

/* OS, domain, addressing, GUID and the meters — useful, but not what you scan
   a wall of cards for. Native <details> again, so no script and no state. */
.asset-more { width: 100%; margin-top: .6rem; }
.asset-more > summary {
    list-style: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--navy); user-select: none;
}
.asset-more > summary::-webkit-details-marker { display: none; }
.asset-more > summary::marker { content: ''; }
.asset-more > summary .ico { margin-right: 0; }
.asset-more > summary .caret { display: inline-flex; opacity: .7; }
.asset-more[open] > summary .caret { transform: rotate(180deg); }
.asset-more .asset-meta { margin-top: .45rem; overflow-wrap: anywhere; }
.asset-more .meters { margin-top: .5rem; }
