/* SCMS — Swastik Call Management System Theme (ported from client-approved prototype + Bootstrap 5 compatible) */
:root {
    --red: #d3261c;
    --red-d: #b01e16;
    --slate: #1e2630;
    --slate2: #2a3441;
    --grey: #c4c7cc;
    --line: #dde1e7;
    --bg: #eef0f4;
    --txt: #1c2430;
    --mut: #667085;
    --ok: #1f8a4c;
    --warn: #b7791f;
    --blue: #2563eb;
    --bs-primary: #d3261c;
    --bs-body-bg: #eef0f4;
    --bs-body-color: #1c2430;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Segoe UI", Inter, system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 14px;
    color: var(--txt);
    background: var(--bg);
    line-height: 1.45;
}
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--mut); }
.small { font-size: 12px; }
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.hide { display: none !important; }

/* top quick bar */
#protoBar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: #111821;
    color: #e9edf2;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    font-size: 12px;
}
#protoBar b { color: #fff; letter-spacing: .2px; }
#protoBar .pb-links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
#protoBar a.pb-btn, #protoBar button {
    background: #2a3441;
    border: 1px solid #3a4658;
    color: #e9edf2;
    border-radius: 5px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
}
#protoBar a.pb-btn:hover, #protoBar button:hover { background: #3a4658; }
#protoBar a.pb-btn.on, #protoBar button.on { background: var(--red); border-color: var(--red); color: #fff; }

/* logo */
.logo { display: inline-flex; align-items: center; justify-content: center; line-height: 1; text-decoration: none !important; }
.logo-img {
    display: block;
    height: 54px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.hero-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}
.hero-logo-wrap .logo-img {
    height: 68px;
}
.login-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}
.login-logo-wrap .logo-img {
    height: 60px;
}
.side-brand .logo-img {
    height: 44px;
    background: #fff;
    padding: 5px 10px;
    border-radius: 6px;
}
.jc-top .logo-img {
    height: 58px;
}

/* buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--txt);
    border-radius: 7px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13.5px;
    transition: .12s;
    text-decoration: none !important;
}
.btn:hover { background: #f6f7f9; color: var(--txt); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff !important; }
.btn-primary:hover { background: var(--red-d); border-color: var(--red-d); color: #fff !important; }
.btn-dark { background: var(--slate); border-color: var(--slate); color: #fff !important; }
.btn-dark:hover { background: var(--slate2); border-color: var(--slate2); color: #fff !important; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff !important; }
.btn-ok:hover { background: #17703d; border-color: #17703d; color: #fff !important; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red) !important; border-color: #f0b9b5; background: #fff; }
.btn-danger:hover { background: #fff6f5; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* cards / layout */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    min-width: 0;
    max-width: 100%;
}
.card h3 { font-size: 15px; }
.card-h {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.grid { display: grid; gap: 14px; }
.grid > *, .split > * { min-width: 0; max-width: 100%; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.stat {
    cursor: pointer;
    border-left: 4px solid var(--slate);
    transition: .12s;
    text-decoration: none !important;
    color: var(--txt) !important;
    display: block;
}
.stat:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(16, 24, 40, .08); }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--mut); font-size: 12.5px; }
.stat.red { border-left-color: var(--red); }
.stat.amber { border-left-color: #e0a21b; }
.stat.green { border-left-color: var(--ok); }
.stat.blue { border-left-color: var(--blue); }
.stat.grey { border-left-color: #98a2b3; }

/* forms */
label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 4px; }
label .rq { color: var(--red); }
.fi {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #c9ced6;
    border-radius: 7px;
    background: #fff;
}
.fi:focus { outline: 2px solid #f3b6b2; border-color: var(--red); }
.fi.invalid { border-color: var(--red); background: #fff6f5; }
textarea.fi { min-height: 80px; resize: vertical; }
.fg { margin-bottom: 12px; }
.err { color: var(--red); font-size: 12px; margin-top: 3px; min-height: 0; }
.frow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.hint { font-size: 12px; color: var(--mut); margin-top: 3px; }
.chk { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 13px; cursor: pointer; }
.chk input { margin-top: 3px; }

/* tables */
.tw { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0; }
table.t th {
    background: #f6f7f9;
    text-align: left;
    padding: 9px 10px;
    font-size: 12px;
    color: #475467;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    position: sticky;
    top: 0;
}
table.t td { padding: 9px 10px; border-bottom: 1px solid #eef0f3; vertical-align: top; }
table.t tr:last-child td { border-bottom: none; }
table.t tbody tr.clk { cursor: pointer; }
table.t tbody tr.clk:hover { background: #fafbfc; }
td.nw { white-space: nowrap; }

/* badges */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
    line-height: 1.4;
}
.pr-na { background: #eceff3; color: #52606f; border-color: #d5dae1; }
.pr-high { background: #fde8e6; color: #b42318; border-color: #f6c3be; }
.pr-med { background: #fff4d6; color: #92600a; border-color: #f3dc9c; }
.pr-low { background: #e3f6ea; color: #17703d; border-color: #b9e4c8; }
.st-New { background: #e1ecff; color: #1d4ed8; border-color: #bcd0fb; }
.st-Assigned { background: #ece7fb; color: #5b3fc4; border-color: #d3c9f6; }
.st-InProgress { background: #dff4f8; color: #0e6b82; border-color: #b5e1ea; }
.st-Pending { background: #fff1dc; color: #9a5a05; border-color: #f4d6a6; }
.st-WorkCompleted { background: #e3f6ea; color: #17703d; border-color: #b9e4c8; }
.st-VerificationPending { background: #fdf0d5; color: #8a5a00; border-color: #efd79b; }
.st-Closed { background: #e8eaee; color: #344054; border-color: #cdd2da; }
.st-Cancelled { background: #fdecec; color: #912018; border-color: #f3c1bd; }
.badge.over { background: #b42318; color: #fff; }
.chip { display: inline-block; background: #eef1f6; border-radius: 5px; padding: 1px 7px; font-size: 12px; margin: 1px 3px 1px 0; }

/* tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--line);
    margin-bottom: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    padding: 9px 16px;
    cursor: pointer;
    font-weight: 700;
    color: var(--mut);
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
}
.tab.on { color: var(--red); border-bottom-color: var(--red); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; margin-bottom: 12px; }
.filters .fq { grid-column: span 2; }

/* public */
.pub { max-width: 760px; margin: 0 auto; padding: 22px 14px 40px; }
.pub-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.hero { text-align: center; padding: 34px 24px 30px; }
.hero h1 { font-size: 22px; margin-bottom: 8px; }
.hero p { color: var(--mut); max-width: 520px; margin: 6px auto 22px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.qr-trigger-wrap {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eef0f4;
    display: flex;
    justify-content: center;
}
.btn-qr-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    background: #f8f9fb;
    border: 1px solid #d5dae1;
    color: var(--slate);
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
.btn-qr-trigger:hover {
    background: #eef1f6;
    border-color: var(--red);
    color: var(--red);
}
.btn-qr-trigger .qr-icon {
    width: 18px;
    height: 18px;
    color: var(--red);
    flex-shrink: 0;
}
.qr-modal-card {
    max-width: 410px;
}
.qr-modal-logo .logo-img {
    height: 48px;
    margin: 0 auto 6px;
}
.qr-popup-box {
    width: 220px;
    height: 220px;
    margin: 0 auto 12px;
    padding: 10px;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .06);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-popup-box svg {
    width: 100%;
    height: 100%;
    display: block;
}
.qr-url-pill {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #f6f7f9;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 14px;
}
.qr-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.pub-f { text-align: center; color: var(--mut); font-size: 12px; margin-top: 22px; }
.callno { font-size: 30px; font-weight: 800; color: var(--red); letter-spacing: .5px; }
.okmark {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #e3f6ea;
    color: var(--ok);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 10px;
}
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--mut); font-weight: 500; }
.kv dd { margin: 0; font-weight: 600; }
.login { max-width: 420px; margin: 40px auto; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.seg button, .seg a {
    flex: 1;
    padding: 9px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    color: var(--mut);
    text-align: center;
    text-decoration: none;
}
.seg button.on, .seg a.on { background: var(--slate); color: #fff; }

/* staff shell */
.side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 248px;
    background: var(--slate);
    color: #cfd6df;
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width .18s ease, transform .2s ease;
}
.side-brand { padding: 16px 16px 12px; border-bottom: 1px solid #313c4a; }
.side-brand .logo { font-size: 22px; }
.side-brand .logo-sub { font-size: .36em; }
.side-brand small { display: block; margin-top: 8px; font-size: 11px; color: #8d97a5; }
.side nav { padding: 8px; flex: 1; }
.side h6 { margin: 12px 10px 4px; font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; color: #7d8896; white-space: nowrap; }
.mi {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 7px;
    color: #cfd6df !important;
    cursor: pointer;
    font-weight: 600;
    font-size: 13.5px;
    margin: 2px 0;
    text-decoration: none !important;
    white-space: nowrap;
}
.mi-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.mi-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    font-size: 16px;
    flex-shrink: 0;
}
.mi-tx {
    overflow: hidden;
    text-overflow: ellipsis;
}
.mi:hover { background: #2a3441; }
.mi.on { background: #fff; color: var(--slate) !important; }
.mi .ct { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.side-foot { padding: 12px 14px; border-top: 1px solid #313c4a; font-size: 11.5px; color: #8d97a5; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(10, 15, 22, .5); z-index: 45; }
.main { margin-left: 248px; min-height: 100vh; min-width: 0; max-width: 100%; overflow-x: clip; transition: margin-left .18s ease; }
.top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
}
.top h2 { margin: 0; font-size: 18px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hamb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--slate);
    border-radius: 7px;
    font-size: 18px;
    width: 36px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    transition: .12s;
}
.hamb:hover { background: #eef1f6; border-color: #c9ced6; }
.pill { background: #eef1f6; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; }
.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--slate);
}
.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 5px 11px;
}
.logout-btn:hover {
    color: var(--red) !important;
    border-color: #f0b9b5;
    background: #fff6f5;
}
.hdr-ic {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: block;
}
.content { padding: 20px 22px 60px; min-width: 0; max-width: 100%; }
.crumb { font-size: 13px; margin-bottom: 10px; }

/* desktop icon-only collapsed sidebar */
@media (min-width: 861px) {
    body.sb-collapsed .side {
        width: 66px;
    }
    body.sb-collapsed .main {
        margin-left: 66px;
    }
    body.sb-collapsed .side-brand {
        padding: 12px 6px;
        text-align: center;
    }
    body.sb-collapsed .side-brand .logo-img {
        height: 26px;
        padding: 3px 4px;
    }
    body.sb-collapsed .side-brand-sub,
    body.sb-collapsed .side h6,
    body.sb-collapsed .mi-tx {
        display: none;
    }
    body.sb-collapsed .side nav {
        padding: 8px 6px;
    }
    body.sb-collapsed .mi {
        justify-content: center;
        padding: 10px 0;
        margin: 4px 0;
    }
    body.sb-collapsed .mi-item {
        justify-content: center;
        gap: 0;
    }
    body.sb-collapsed .mi-ic {
        font-size: 18px;
        width: auto;
    }
    body.sb-collapsed .mi .ct {
        position: absolute;
        top: 2px;
        right: 4px;
        font-size: 10px;
        padding: 0 5px;
        line-height: 1.35;
    }
}

/* stepper */
.stepper { display: flex; margin: 14px 0 4px; }
.stp { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--mut); }
.stp:before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 3px; background: #d6dae1; }
.stp:first-child:before { display: none; }
.stp i {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #d6dae1;
    color: #fff;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-weight: 700;
    font-size: 13px;
}
.stp.done i, .stp.cur i { background: var(--ok); }
.stp.done:before, .stp.cur:before { background: var(--ok); }
.stp.cur i { background: var(--red); }
.stp.cur { color: var(--txt); font-weight: 700; }
.stp.done { color: var(--txt); }
.stp span { display: block; margin-top: 4px; }
.panel { border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; margin-bottom: 12px; background: #fff; }
.panel.lock { background: #f6f7f9; border-style: dashed; }
.panel h4 { font-size: 13.5px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.num {
    display: inline-flex;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--slate);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.notice { background: #fff7e6; border: 1px solid #f3dc9c; color: #7a4e00; border-radius: 8px; padding: 9px 12px; font-size: 13px; }
.notice.ok { background: #e9f7ef; border-color: #b9e4c8; color: #17703d; }
.notice.info { background: #e8f0fe; border-color: #bcd0fb; color: #1d3f9a; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { padding: 0 0 12px 16px; position: relative; border-left: 2px solid #e2e5ea; margin-left: 5px; font-size: 13px; }
.hist li:before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--slate); }
.bars .br { display: grid; grid-template-columns: 120px 1fr 34px; gap: 8px; align-items: center; margin: 6px 0; font-size: 12.5px; }
.bars .bt { background: #eef0f4; border-radius: 5px; height: 14px; overflow: hidden; }
.bars .bf { height: 100%; border-radius: 5px; }
.donut { width: 130px; height: 130px; border-radius: 50%; position: relative; flex: none; }
.donut:after { content: ""; position: absolute; inset: 26px; background: #fff; border-radius: 50%; }
.legend div { font-size: 12.5px; margin: 3px 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* modal / toast */
.mback {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 22, .55);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}
.modal-scms {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}
.modal-scms.wide { max-width: 820px; }
.mh { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15px; }
.mb2 { padding: 16px 18px; }
.mf { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.x { border: none; background: none; font-size: 22px; cursor: pointer; color: var(--mut); }
#toastRoot {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.toast-scms {
    background: var(--slate);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    font-size: 13px;
}
.qr { width: 170px; height: 170px; border: 1px solid var(--line); padding: 8px; border-radius: 8px; background: #fff; }

/* job card sheet */
.jc-scroll { overflow: auto; }
.jc-sheet {
    background: #fff;
    color: #111;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 12mm 12mm 10mm;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .18);
    font-size: 12.5px;
    font-family: "Segoe UI", Arial, sans-serif;
}
.jc-top { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 3px solid #1e2630; padding-bottom: 8px; }
.jc-top .logo { font-size: 30px; text-align: left; }
.jc-top .logo-sub { font-size: .34em; }
.jc-t { text-align: right; }
.jc-t h1 { margin: 0; font-size: 24px; letter-spacing: 3px; }
.jc-t div { font-size: 13px; font-weight: 600; color: #333; }
.jc-t .no { color: var(--red); font-size: 16px; font-weight: 800; }
.jc-line { font-size: 11px; color: #444; margin: 8px 0; }
table.jc { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
table.jc td, table.jc th { border: 1px solid #333; padding: 6px 8px; vertical-align: top; text-align: left; }
table.jc td.l, table.jc th.l { background: #eef1f6; font-weight: 700; width: 17%; }
table.jc td.v { width: 33%; }
.jc-box { border: 1px solid #333; padding: 7px 9px; margin-bottom: 10px; }
.jc-box b { display: block; margin-bottom: 3px; }
.jc-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.jc-sign .jc-box { min-height: 88px; margin: 0; display: flex; flex-direction: column; justify-content: space-between; }
.jc-sign-blank { min-height: 88px; }
.jc-foot { border-top: 1px solid #aaa; padding-top: 6px; font-size: 10.5px; color: #444; }
.jc-blank { min-height: 46px; }

/* responsive */
@media (min-width: 769px) {
    .top .pwa-install-btn { display: none !important; }
}
@media (max-width: 1100px) {
    .g5 { grid-template-columns: repeat(3, 1fr); }
    .g4 { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
    .side { transform: translateX(-100%); transition: .2s; }
    .side.open { transform: none; }
    .side.open ~ .scrim { display: block; }
    .main { margin-left: 0; }
    .hamb { display: inline-flex; }
    .content { padding: 14px 12px 70px; }
    .top { padding: 10px 12px; gap: 8px; }
}
@media (max-width: 768px) {
    .top h2 { font-size: 16px; }
    .top .pwa-install-btn { white-space: nowrap; padding: 5px 9px; font-size: 12px; flex-shrink: 0; }
    .user-pill { width: 34px; height: 34px; padding: 0; justify-content: center; }
    .user-pill-tx { display: none; }
    .logout-btn { width: 34px; height: 34px; padding: 0; justify-content: center; }
    .logout-tx { display: none; }
}
@media (max-width: 620px) {
    .g2, .g3, .g4, .g5, .frow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .frow { grid-template-columns: minmax(0, 1fr); }
    .filters .fq { grid-column: 1 / -1; }
    .kv { grid-template-columns: 120px 1fr; }
    .bars .br { grid-template-columns: minmax(90px, 112px) minmax(0, 1fr) 28px; gap: 6px; font-size: 12px; }
    .donut { width: 104px; height: 104px; }
    .donut:after { inset: 22px; }
    .hero-logo-wrap .logo-img { height: 54px; }
    .login-logo-wrap .logo-img { height: 50px; }
    .logo-img { height: 44px; }
    .hero { padding: 24px 16px 22px; }
    .hero h1 { font-size: 19px; }
    .hero-btns { flex-direction: column; max-width: 320px; margin: 0 auto; }
    .hero-btns .btn { width: 100%; }
    .qr-popup-box { width: 200px; height: 200px; }
    .qr-modal-actions { flex-direction: column; }
    .qr-modal-actions .btn { width: 100%; }
    .stepper { font-size: 10px; }
    .stp span { font-size: 10px; }
    .callno { font-size: 24px; }
}

/* A5 Printable Premises QR Code Standee */
.qr-a5-wrap {
    display: flex;
    justify-content: center;
    padding: 4px 0 24px;
}
.qr-a5-sheet {
    background: #fff;
    color: #1c2430;
    width: 148mm;
    min-height: 205mm;
    max-width: 100%;
    margin: 0 auto;
    padding: 12mm 12mm 10mm;
    border: 2px solid #1e2630;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(16, 24, 40, .12);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.qr-a5-logo .logo-img {
    height: 64px;
    margin: 0 auto 8px;
}
.qr-a5-title {
    font-size: 19px;
    font-weight: 800;
    color: #1e2630;
    margin: 4px 0 10px;
}
.qr-a5-scan-head {
    background: var(--red);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .6px;
    padding: 7px 16px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.qr-a5-box {
    width: 240px;
    height: 240px;
    max-width: 100%;
    padding: 12px;
    border: 2px solid #1e2630;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.qr-a5-box svg {
    width: 100%;
    height: 100%;
    display: block;
}
.qr-a5-url {
    font-size: 16px;
    font-weight: 800;
    color: var(--red);
    background: #fff6f5;
    border: 1px solid #f6c3be;
    border-radius: 8px;
    padding: 6px 16px;
    margin-bottom: 14px;
    word-break: break-all;
}
.qr-a5-instructions {
    background: #f6f7f9;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #344054;
    max-width: 100%;
    margin-bottom: 10px;
}
.qr-a5-instructions b {
    display: block;
    color: #1e2630;
    margin-bottom: 4px;
}
.qr-a5-instructions p {
    margin: 0;
    line-height: 1.45;
}
.qr-a5-foot {
    border-top: 1px solid var(--line);
    padding-top: 8px;
    width: 100%;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mut);
}

/* Hyperlinked Complaint / Call Number */
a.call-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(29, 78, 216, 0.45);
    padding: 2px 6px;
    margin: -2px -6px;
    border-radius: 5px;
    transition: background-color 0.14s ease, color 0.14s ease, text-decoration-color 0.14s ease;
}
a.call-link:hover,
a.call-link:focus {
    color: var(--red);
    background-color: #fff1f0;
    text-decoration: underline;
    text-decoration-color: var(--red);
}

/* PWA Install Button & Banner */
.pwa-install-btn {
    display: none;
    align-items: center;
    gap: 6px;
    background: #0f172a;
    color: #ffffff !important;
    border: 1px solid #334155;
    border-radius: 7px;
    padding: 5px 11px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.15s ease, transform 0.12s ease;
}
.pwa-install-btn:hover {
    background: var(--red);
    border-color: var(--red);
    color: #ffffff !important;
}
.pwa-install-btn.pwa-ready {
    display: inline-flex;
}

/* print */
@media print {
    @page { margin: 8mm; }
    body { background: #fff; }
    #protoBar, .side, .top, .no-print, #toastRoot, .pwa-install-btn { display: none !important; }
    .main { margin-left: 0 !important; }
    .content { padding: 0 !important; }
    .jc-sheet {
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        padding: 4mm !important;
    }
    .qr-a5-wrap {
        padding: 0 !important;
    }
    .qr-a5-sheet {
        width: 132mm !important;
        min-height: 190mm !important;
        margin: 0 auto !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}
