:root {
    --bg: #f6f9f8;
    --card: #ffffff;
    --ink: #1b2430;
    --muted: #667085;
    --line: #e3e8ef;
    --brand: #00856a;
    --brand-dark: #006b55;
    --accent: #e3f8f1;
    --orange: #e8620f;
    --amber: #f0a30a;
    --ok: #00856a;
    --ok-bg: #e3f8f1;
    --err: #b42318;
    --err-bg: #fdecea;
    --radius: 10px;
}
* { box-sizing: border-box; }
html { font-size: clamp(15px, 0.3vw + 12px, 18px); }
html, body { margin: 0; }
body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    font-size: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--brand); }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
code { background: #eef2f6; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
.tiny { font-size: .8rem; }
.right { text-align: right; }
.center { text-align: center; }
.inline { display: inline; margin: 0; }

/* Top bar */
.topbar {
    background: #fff;
    color: var(--ink);
    border-bottom: 4px solid transparent;
    border-image: linear-gradient(90deg, #00d9a0 0 33%, #fab91b 33% 66%, #e8620f 66% 100%) 1;
    box-shadow: 0 2px 10px rgba(16,24,40,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand-mark {
    display: inline-grid; place-items: center;
    width: 34px; height: 34px; border-radius: 8px;
    background: #fff; color: var(--brand); font-weight: 800; letter-spacing: .5px; font-size: .9rem;
}
.brand-mark.big { width: 56px; height: 56px; font-size: 1.2rem; background: var(--brand); color: #fff; margin: 0 auto 12px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar .btn-ghost { color: var(--brand-dark); border-color: var(--line); }
.topbar .btn-ghost:hover { background: #e3f8f1; }

.usermenu { position: relative; }
.usermenu summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line);
}
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: #e3f8f1; }
.avatar {
    width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: .8rem;
}
.usermenu summary { color: var(--ink); }
.who { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.who small { opacity: .8; font-size: .75rem; }
.menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 270px;
    background: var(--card); color: var(--ink); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: 0 12px 30px rgba(16,24,40,.15); padding: 14px 16px;
}
.menu dl { margin: 0; display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; }
.menu dt { color: var(--muted); font-size: .8rem; }
.menu dd { margin: 0; word-break: break-word; }

/* Buttons */
.btn {
    display: inline-block; font: inherit; cursor: pointer; text-decoration: none;
    padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
    background: #fff; color: var(--ink);
}
.btn:hover { background: #f1f4f8; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; }
.btn-small { padding: 4px 12px; font-size: .85rem; }
.btn.block { width: 100%; margin-top: 14px; padding: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Layout */
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px; flex: 1; }
.page.narrow { max-width: 520px; }
.page.narrow-lg { max-width: 820px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.two-col { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 20px; align-items: start; }
.back { text-decoration: none; font-size: .9rem; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 18px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; }
.stat-n { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.stat-l { color: var(--muted); font-size: .85rem; }
.stat-accent { background: var(--accent); border-color: #bfeadc; }
.stat-accent .stat-n { color: var(--brand); }

/* Table */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search] { flex: 1; min-width: 220px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: #fafbfd; }
.table.compact td, .table.compact th { padding: 8px; }
.table tr.locked td { color: var(--muted); background: #fafafa; }
.empty { text-align: center; color: var(--muted); padding: 28px !important; }
.lock { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .85rem; }
.ico { vertical-align: -2px; }
.lock-big { color: var(--muted); margin-bottom: 8px; }
.lock-big .ico { width: 40px; height: 40px; }

/* Tags and status */
.tag, .status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.tag { background: #eef1f5; color: #475467; }
.tag-hr { background: #efe9fb; color: #5b3fa6; }
.tag-rc { background: #e3f8f1; color: #006b55; }
.tag-charges { background: #fdeede; color: #a1560c; }
.status-open { background: #fff4d6; color: #8a5a00; }
.status-review { background: #e3f8f1; color: #006b55; }
.status-closed { background: var(--ok-bg); color: var(--ok); }

/* Forms */
.form { display: flex; flex-direction: column; }
label { font-weight: 600; font-size: .88rem; margin: 12px 0 4px; }
label.check { font-weight: 400; margin: 14px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=search], select {
    font: inherit; width: 100%; padding: 9px 11px; border: 1px solid #cdd5df; border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid #7fd9bf; border-color: var(--brand); }
.form .btn-primary { margin-top: 18px; padding: 10px; }
.toolbar select { width: auto; }
.alert { padding: 10px 14px; border-radius: 8px; margin: 12px 0; font-size: .9rem; }
.alert-error { background: var(--err-bg); color: var(--err); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }

/* Login */
.login-page { background: linear-gradient(160deg, #e3f8f1, #fff7e3 55%, #fdeee2); }
.login-wrap { flex: 1; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 30px 28px; box-shadow: 0 10px 30px rgba(16,24,40,.08); text-align: left; }
.login-card.wide { max-width: 460px; }
.login-card h1, .login-card > p { text-align: center; }
.login-card .tiny { text-align: center; margin-top: 16px; }
.pw-row { display: flex; gap: 8px; }
.pw-row .btn { padding: 8px 12px; }

/* IR detail */
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.tags-row { margin: 8px 0 4px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 18px 0; }
.grid dt { color: var(--muted); font-size: .8rem; }
.grid dd { margin: 0; word-break: break-word; }
.desc { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 0; }

@media (max-width: 860px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .two-col { grid-template-columns: 1fr; }
    .grid { grid-template-columns: 1fr; }
    .brand-text, .who { display: none; }
    .topbar { padding: 10px 14px; }
}

.alert-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--err-bg); color: var(--err); white-space: nowrap; }
.section { margin-top: 22px; }
.section h2 { margin: 0 0 8px; font-size: 1rem; color: var(--brand); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.empty-note { color: var(--muted); font-style: italic; }

/* One line per row: no wrapping in the IR list (scrolls sideways when wide) */
#irTable th, #irTable td { white-space: nowrap; }
.page.wide, .page.full { max-width: none; padding-left: clamp(12px, 2vw, 40px); padding-right: clamp(12px, 2vw, 40px); }
.page.full .grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.page.full .desc { max-width: none; }
.stats { grid-template-columns: repeat(5, 1fr); }
.stat-due { background: var(--err-bg); border-color: #f4c7c3; }
.stat-due .stat-n { color: var(--err); }

/* Due / overdue rows in red (placed last so it wins over the grey "locked" style) */
.table tr.due td { background: #fdecea; }
.table tr.due:hover td { background: #fbdcd8; }
.table tr.due td:first-child { box-shadow: inset 4px 0 0 var(--err); }
.due-flag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--err); color: #fff; white-space: nowrap; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Top tiles (5) + full-screen dashboard */
.stats { grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.stat { font: inherit; text-align: left; cursor: pointer; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat:hover { border-color: #00b48c; }
.stat.active { outline: 2px solid var(--brand); outline-offset: -1px; }
.stat-n { font-size: 2rem; font-weight: 700; line-height: 1.15; }
.stat-open .stat-n, .stat-await .stat-n { color: #9a5b00; }
.stat-closed .stat-n { color: var(--ok); }
.stat-overdue .stat-n { color: var(--err); }
.page.wide { display: flex; flex-direction: column; }
.page.wide > .card { flex: 1; }
.table thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* IR list: sizes in em so the whole table shrinks together to fit the screen */
#irTable { font-size: 1rem; }
#irTable th, #irTable td { padding: .65em .75em; }
#irTable th { font-size: .75em; }
#irTable .tag, #irTable .status, #irTable .alert-pill, #irTable .due-flag { font-size: .8em; }
#irTable .btn-small, #irTable .lock { font-size: .85em; }

/* IR list: always fits the screen. Columns have fixed shares; long text is cut at the cell edge
   (hover a cell to read it all, or open the IR). Text scales with the screen resolution. */
#irTable { table-layout: fixed; width: 100%; font-size: clamp(11px, 0.55vw + 6px, 16px); }
#irTable th, #irTable td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .65em .6em; }
#irTable td:last-child, #irTable th:last-child { overflow: visible; }
.table-wrap { overflow-x: visible; }
@media (max-width: 900px) {
    /* phones / very small windows: let the table scroll instead of squeezing */
    .table-wrap { overflow-x: auto; }
    #irTable { table-layout: auto; min-width: 900px; }
}

/* Edit page, charging */
.alert-warn { background: #fff4d6; color: #8a5a00; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.charge-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.charge-unpaid { background: #fff4d6; color: #8a5a00; }
.charge-paid { background: var(--ok-bg); color: var(--ok); }
#irTable .charge-pill { font-size: .8em; }
.page.edit { max-width: 1100px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 20px; }
.field.wide { grid-column: 1 / -1; }
.field label { display: block; }
textarea { font: inherit; width: 100%; padding: 9px 11px; border: 1px solid #cdd5df; border-radius: 8px; background: #fff; color: var(--ink); resize: vertical; }
textarea:focus, input[type=date]:focus { outline: 2px solid #7fd9bf; border-color: var(--brand); }
input[type=date] { font: inherit; width: 100%; padding: 9px 11px; border: 1px solid #cdd5df; border-radius: 8px; background: #fff; color: var(--ink); }
.hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.pair { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 8px 10px; align-items: center; }
.pair span { color: var(--muted); font-size: .85rem; }
label.check.big { font-size: 1rem; color: var(--ink); }
.actions { display: flex; gap: 10px; margin-top: 22px; }
.actions .btn-primary { margin-top: 0; }

.receipt-box { margin-top: 10px; padding: 10px 12px; border: 1px dashed #c9d1dc; border-radius: 8px; }
.receipt-box label { display: block; font-weight: 600; margin-bottom: 6px; }

.log-table { table-layout: fixed; }
.log-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(.7rem, .78vw, .85rem); }
.log-table tr.log-bad td { background: #fdecea; }

/* edit pop-up */
body.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 30, 45, .55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 3vh 3vw; }
.modal-backdrop[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 12px; width: min(1180px, 100%); height: min(92vh, 100%); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); overflow: hidden; }
.modal-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.modal-x { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 6px; }
.modal-x:hover { color: var(--ink); }
.modal-box iframe { flex: 1; width: 100%; border: 0; background: #fff; }
body.modal-embed { background: #fff; min-height: 0; }
body.modal-embed .page { padding: 14px 18px; max-width: none; }
body.modal-embed .card { border: 0; padding: 0; box-shadow: none; }
body.modal-embed .footer { display: none; }

/* small centered "Saved" toast */
.toast { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 200; display: flex; align-items: center; gap: 12px; max-width: min(360px, 90vw); padding: 14px 22px 14px 16px; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 12px 40px rgba(20, 40, 70, .28), 0 0 0 1px rgba(30, 130, 80, .18); cursor: pointer; animation: toast-in .35s cubic-bezier(.2, 1.3, .4, 1) both; }
.toast-out { animation: toast-out .3s ease-in both; }
.toast-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #00b48c; color: #fff; box-shadow: 0 4px 12px rgba(0, 180, 140, .45); }
.toast-neutral .toast-icon { background: #5b7da6; box-shadow: 0 4px 12px rgba(91, 125, 166, .4); }
.toast-text { display: flex; flex-direction: column; line-height: 1.25; }
.toast-text strong { font-size: 1.05rem; }
.toast-text small { color: var(--muted); font-size: .78rem; margin-top: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -42%) scale(.85); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, -56%) scale(.95); } }

/* clickable rows */
.table tr.clickable { cursor: pointer; }
.table tr.clickable:focus-visible { outline: 2px solid var(--brand, #00856a); outline-offset: -2px; }
.irlink { color: inherit; text-decoration: none; }
.irlink:hover { text-decoration: underline; }
.table .lock { display: inline-flex; vertical-align: middle; color: var(--muted); }

/* log entry pop-up (small) */
.modal-box.modal-sm { width: min(620px, 100%); height: auto; max-height: 86vh; }
.modal-body { padding: 16px 20px 20px; overflow: auto; }
.log-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 0 0 14px; }
.log-dl dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.log-dl dd { margin: 2px 0 0; font-weight: 600; word-break: break-word; }
.modal-body h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 4px 0 8px; }
.log-detail { white-space: pre-wrap; word-break: break-word; margin: 0; }
.log-changes { margin: 0; padding-left: 18px; }
.log-changes li { margin: 4px 0; word-break: break-word; }

/* public report form */
body.public-form { background: #f6f9f8; }
.file-wrap { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 28px 16px 40px; }
.file-brand { display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 700; font-size: 1.15rem; color: var(--brand); margin-bottom: 18px; }
.file-brand .brand-mark.big { margin: 0; width: 46px; height: 46px; }
.file-card { padding: 28px 30px; box-shadow: 0 10px 30px rgba(16, 24, 40, .08); }
.file-card h1 { margin: 0 0 4px; }
.file-form { margin-top: 16px; }
.file-form .field { margin-bottom: 16px; }
.file-form .field label { display: block; font-weight: 600; margin-bottom: 6px; }
.file-form input[type=text], .file-form input[type=date] { width: 100%; }
.file-form .hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.file-form .actions { margin-top: 8px; }
.file-form .btn-primary { padding: 11px 26px; font-size: 1rem; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.file-card.center { text-align: center; }
.done-check { width: 64px; height: 64px; border-radius: 50%; background: #00b48c; color: #fff; display: grid; place-items: center; margin: 4px auto 14px; box-shadow: 0 6px 18px rgba(31, 157, 99, .4); }
.file-card .ref { font-size: 1.05rem; margin: 18px 0; }
.doc-link { display: inline-block; margin-right: 12px; }
@media (max-width: 600px) { .file-card { padding: 20px 16px; } }
.file-form select { width: 100%; }

/* stages and time limits */
.stage-pill { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 2px 9px; border-radius: 999px; background: #e3f8f1; color: #006b55; font-size: .78em; font-weight: 600; white-space: nowrap; }
.stage-due { font-size: .9em; white-space: nowrap; }
.stage-due.stage-soon { color: #a15c00; font-weight: 700; }
.tl-wrap { overflow-x: auto; }
.tl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line); }
.tl td { padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tl tr.tl-now td { background: #fff8e6; }
.tl tr.tl-todo td { color: var(--muted); }
.tl-ok { color: #00856a; font-weight: 600; }
.tl-bad { color: #b42318; font-weight: 700; }
.tl-soon { color: #a15c00; font-weight: 700; }
.tl-now-text { font-weight: 700; }
.tl-total { margin: 10px 0 0; color: var(--muted); }

.hol-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.hol-form .field { margin: 0; }
.hol-form .field.grow { flex: 1; min-width: 220px; }
.hol-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.hol-form input { width: 100%; }
.hol-past td { color: var(--muted); }

/* partial payments */
.charge-part { background: #fff1d6; color: #8a5300; }
.pay-summary { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 4px 0 10px; color: var(--muted); }
.pay-summary strong { color: var(--ink); }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; }
.pay-grid label { display: block; font-size: .8rem; margin-bottom: 4px; }
@media (max-width: 700px) { .pay-grid { grid-template-columns: 1fr; } }
.pay-table { margin-top: 10px; }

/* People involved */
.people-table td, .people-table th { white-space: normal; word-break: break-word; }

/* Pages opened from an email link */
.pub-wrap { max-width: 880px; }
.pub-card .detail-head { margin-bottom: 8px; }
.alert-ok { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; }
.file-form .check.big { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-weight: 500; }

/* Loading overlay shown while a form is processed */
.busy-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility 0s linear .28s; }
.busy-overlay.show { opacity: 1; visibility: visible; transition: opacity .2s ease, visibility 0s; }
.busy-overlay .busy-box { transform: scale(.92); transition: transform .3s cubic-bezier(.2,.9,.3,1.2); }
.busy-overlay.show .busy-box { transform: scale(1); }
.busy-box { background: #fff; padding: 22px 34px 18px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-weight: 600; color: #1f2937; }
.busy-spin { width: 24px; height: 24px; border: 3px solid #d1d5db; border-top-color: var(--brand); border-radius: 50%; animation: busyspin .8s linear infinite; }
@keyframes busyspin { to { transform: rotate(360deg); } }

/* Logo */
.brand-logo { height: 38px; width: 38px; object-fit: contain; display: block; }
.brand-text { color: var(--ink); font-weight: 700; }
.login-logo { display: block; width: 150px; max-width: 60%; height: auto; margin: 0 auto 14px; }
.file-brand .brand-logo { height: 54px; width: 54px; }
.footer { border-top: 3px solid #fab91b; }
.btn-primary:hover { background: var(--brand-dark); }

/* The logo "writes" itself while loading */
.busy-logo { width: 104px; height: 104px; }
.busy-logo svg { width: 100%; height: 100%; display: block; }
.dk-draw path { stroke-dasharray: 1600; stroke-dashoffset: 1600; fill-opacity: 0; opacity: 1; -webkit-animation: dkwrite 2.6s ease-in-out infinite; animation: dkwrite 2.6s ease-in-out infinite; -webkit-animation-delay: calc(var(--i) * .16s); animation-delay: calc(var(--i) * .16s); }
@-webkit-keyframes dkwrite {
    0%   { stroke-dashoffset: 1600; fill-opacity: 0; opacity: 1; }
    38%  { stroke-dashoffset: 0; fill-opacity: 0; opacity: 1; }
    58%  { stroke-dashoffset: 0; fill-opacity: 1; opacity: 1; }
    88%  { stroke-dashoffset: 0; fill-opacity: 1; opacity: 1; }
    100% { stroke-dashoffset: 0; fill-opacity: 1; opacity: 0; }
}
@keyframes dkwrite {
    0%   { stroke-dashoffset: 1600; fill-opacity: 0; opacity: 1; }
    38%  { stroke-dashoffset: 0; fill-opacity: 0; opacity: 1; }
    58%  { stroke-dashoffset: 0; fill-opacity: 1; opacity: 1; }
    88%  { stroke-dashoffset: 0; fill-opacity: 1; opacity: 1; }
    100% { stroke-dashoffset: 0; fill-opacity: 1; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .dk-draw path { animation: none; stroke-dashoffset: 0; fill-opacity: 1; } }

/* A field the system filled in and the person may not change */
input.is-locked, input[readonly].is-locked { background: #eceff1; color: #667085; cursor: not-allowed; border-color: #d5dbe1; }

/* Dashboard filters */
.toolbar { flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.toolbar .fld { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.toolbar .fld input, .toolbar .fld select { font-weight: 400; font-size: .9rem; padding: 6px 8px; min-width: 150px; }
.toolbar input[type=search] { flex: 1 1 260px; }

.sub-h{margin:22px 0 4px;font-size:1.05rem;color:var(--brand,#1b3a6b)}

/* ---- Charts page ---- */
.charts-page { --c1: #00856a; --c2: #fab91b; --c3: #e8620f; --c4: #5b6b8a; }
.chart-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 1000px) { .chart-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-card h2 { margin: 0 0 14px; font-size: 1rem; }
.wide-card { grid-column: 1 / -1; }
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 34px; gap: 10px; align-items: center; font-size: .9rem; }
.bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-t { background: #eef1f4; border-radius: 6px; height: 16px; display: block; overflow: hidden; }
.bar-f { display: block; height: 100%; border-radius: 6px; }
.bar-n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.donut::after { content: ""; position: absolute; inset: 24px; background: var(--card, #fff); border-radius: 50%; }
.donut span { position: relative; z-index: 1; text-align: center; display: grid; line-height: 1.1; }
.donut strong { font-size: 1.6rem; } .donut small { color: #667085; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; }
.cols { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding-top: 18px; overflow-x: auto; }
.col { flex: 1 0 44px; max-width: 90px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.col-b { display: block; width: 70%; background: var(--c1); border-radius: 6px 6px 0 0; }
.col-n { font-size: .8rem; font-weight: 600; }
.col-l { font-size: .75rem; color: #667085; white-space: nowrap; }

/* ---- Printing / Save as PDF ---- */
@media print {
    .topbar, .no-print, .back, .toolbar, .head-actions .btn, #editBtn, .toast, .busy-overlay, .modal-backdrop { display: none !important; }
    body { background: #fff !important; }
    .card { box-shadow: none !important; break-inside: avoid; }
    .page, .page.full, .page.wide { max-width: none !important; padding: 0 !important; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .chart-grid { grid-template-columns: 1fr 1fr; }
    a { color: inherit; text-decoration: none; }
}

/* people on Reports */
.people-card #pq { width: 100%; margin: 0 0 10px; }
.p-list { display: grid; gap: 6px; }
.p-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; background: #f6f9f8; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font: inherit; color: inherit; }
.p-row:hover { border-color: var(--brand, #00856a); background: #eaf6f2; }
.p-name { display: grid; font-weight: 600; min-width: 0; }
.p-name small { font-weight: 400; color: #667085; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-badges { display: flex; gap: 6px; flex-shrink: 0; font-size: .78rem; }
.p-badges b { background: #fdebd9; color: #b4540a; padding: 2px 8px; border-radius: 999px; }
.p-badges i { font-style: normal; background: #fff; border: 1px solid var(--line); color: #475467; padding: 2px 8px; border-radius: 999px; }
.fig-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.fig-row span { display: block; font-size: .8rem; color: #667085; }
.fig-row strong { font-size: 1.25rem; }
.chip-ir { display: inline-block; margin: 4px 6px 4px 0; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-size: .85rem; }
.chip-ir:hover { border-color: var(--brand, #00856a); }
.chip-ir small { color: #667085; }
.pp-back { position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 60; display: grid; place-items: center; padding: 16px; }
.pp-back[hidden] { display: none; }
.pp-box { position: relative; background: #fff; border-radius: 14px; max-width: 640px; width: 100%; max-height: 85vh; overflow: auto; padding: 24px 26px; box-shadow: 0 20px 50px rgba(16,24,40,.25); }
.pp-box h2 { margin: 0 34px 2px 0; } .pp-box h3 { margin: 18px 0 4px; font-size: .95rem; }
.pp-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: #667085; }
@media print { .pp-back { display: none !important; } .p-row { break-inside: avoid; } }
.chart-grid { align-items: start; }
.charts-page .toolbar { align-items: flex-end; }
.charts-page .bar-row { grid-template-columns: minmax(110px, 46%) 1fr 34px; }
.legend-row { display: flex; gap: 18px; margin: 0 0 6px; font-size: .85rem; }
.col-pair { flex: 1 0 70px; max-width: 120px; }
.col-pair > .pair { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 100%; width: 100%; }
.pb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.pb .col-b { width: 100%; }
.col-b2 { background: var(--c3); } .col-b3 { background: var(--c2); }
.cols-sm { height: 150px; }
.fig-stack { display: grid; gap: 12px; }
.fig-stack span { display: block; font-size: .8rem; color: #667085; } .fig-stack strong { font-size: 1.2rem; }

/* =====================================================================
   UI v2: friendlier controls, phone / tablet layouts
   ===================================================================== */
:root { --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 14px rgba(16,24,40,.05); }
.card, .stat { box-shadow: var(--shadow); }
.btn { transition: background .15s, border-color .15s, box-shadow .15s; min-height: 38px; }
.btn:hover { border-color: #b9c4d0; }
.btn-primary:hover { box-shadow: 0 2px 8px rgba(0,133,106,.35); }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #7fd9bf; outline-offset: 2px; }
.stat { transition: transform .12s, border-color .12s, box-shadow .12s; }
.stat:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16,24,40,.09); }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr[data-href]:hover { background: #f1faf7; }
h1 { letter-spacing: -.01em; }

/* menu button (phones and tablets) */
.nav-toggle { display: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; padding: 0; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.topbar.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.topbar.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.filters-toggle { display: none; }
.filters-box { display: contents; }

@media (max-width: 900px) {
    .nav-toggle { display: flex; margin-left: auto; }
    .topbar { flex-wrap: wrap; }
    .topbar-right { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 0 4px; order: 3; }
    .topbar.nav-open .topbar-right { display: flex; }
    .topbar-right .btn, .topbar-right form .btn { width: 100%; text-align: left; min-height: 44px; }
    .topbar-right .inline { display: block; }
    .usermenu summary { padding: 8px 12px; }
    .who { display: flex; }
    .usermenu .menu { position: static; box-shadow: none; margin-top: 8px; min-width: 0; }
    .brand-text { display: inline; font-size: .95rem; }
}

/* tablets and below: the IR list becomes cards so no column is ever hidden */
@media (max-width: 1100px) {
    #irTable.rtable { table-layout: auto; min-width: 0; width: 100%; display: block; font-size: 1rem; }
    #irTable.rtable colgroup, #irTable.rtable thead { display: none; }
    #irTable.rtable tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
    #irTable.rtable tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); align-content: start; }
    #irTable.rtable tr[hidden] { display: none; }
    #irTable.rtable td { display: block; border: 0; padding: 0; white-space: normal; overflow: visible; text-overflow: clip; min-width: 0; background: none !important; box-shadow: none !important; word-break: break-word; }
    #irTable.rtable td::before { content: attr(data-label); display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 1px; }
    #irTable.rtable td:nth-child(1) { grid-column: 1 / 2; font-size: 1.05rem; font-weight: 700; }
    #irTable.rtable td:nth-child(1)::before { display: none; }
    #irTable.rtable td:nth-child(9) { grid-column: 2 / 3; grid-row: 1; justify-self: end; text-align: right; }
    #irTable.rtable td:nth-child(9)::before { display: none; }
    #irTable.rtable td:nth-child(2) { grid-column: 1 / -1; font-weight: 600; font-size: 1.02rem; }
    #irTable.rtable td:nth-child(2)::before { display: none; }
    #irTable.rtable td:nth-child(5) { grid-column: 1 / -1; }
    #irTable.rtable td:nth-child(10):empty, #irTable.rtable td:nth-child(10):has(.muted) { display: none; }
    #irTable.rtable tr.due { background: #fdecea; border-color: #f0b4ae; }
    #irTable.rtable tr:hover { border-color: var(--brand); }
    #irTable.rtable tr#noMatch { display: block; box-shadow: none; border: 0; background: none; grid-column: 1 / -1; }
    #irTable.rtable tr#noMatch td::before { display: none; }
    .table-wrap { overflow: visible; }
}

@media (max-width: 860px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stats .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
    .page-head .no-print, .page-head > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
    .detail-head { flex-direction: column; }
    .head-actions { justify-content: flex-start; }
}

/* phones */
@media (max-width: 700px) {
    html { font-size: 16px; }
    .page, .page.wide, .page.full, .page.edit { padding: 14px 12px 24px; }
    .card { padding: 16px 14px; }
    .stat { padding: 12px 14px; } .stat-n { font-size: 1.6rem; }
    input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], select, textarea { font-size: 16px; min-height: 44px; }
    .btn { min-height: 44px; padding: 10px 16px; }
    .btn-small { min-height: 40px; }
    .filters-toggle { display: inline-flex; align-items: center; justify-content: center; width: 100%; }
    .filters-box { display: none; width: 100%; grid-template-columns: 1fr 1fr; gap: 10px; }
    .filters-box.open { display: grid; }
    .filters-box .fld { display: flex; flex-direction: column; gap: 3px; margin: 0; }
    .filters-box .fld:nth-child(n+3), .filters-box button { grid-column: 1 / -1; }
    .toolbar { gap: 10px; }
    .toolbar input[type=search] { min-width: 0; width: 100%; }
    .toolbar .fld { flex: 1 1 140px; display: flex; flex-direction: column; gap: 3px; margin: 0; }
    .toolbar select, .toolbar input[type=date] { width: 100%; }
    #irTable.rtable tbody { grid-template-columns: 1fr; }
    .login-card { padding: 24px 18px; }
    .fields { grid-template-columns: 1fr; }
    .pair { grid-template-columns: 1fr; }
    .chart-grid { grid-template-columns: 1fr !important; }
    .cols { gap: 8px; }
    .modal-backdrop { padding: 0; }
    .modal-box, .modal-box.modal-sm { width: 100%; height: 100%; max-height: none; border-radius: 0; }
    .pp-box { padding: 20px 16px; }
    .actions .btn, .file-form .btn-primary, .form .btn-primary { width: 100%; }
    .menu dl { grid-template-columns: 80px 1fr; }
    .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* small tables inside an IR page (people, timeline, payments) become stacked cards on phones */
@media (max-width: 700px) {
    .tl-wrap { overflow: visible; }
    table.rstack, table.rstack tbody { display: block; width: 100%; }
    table.rstack thead { display: none; }
    table.rstack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 12px 14px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
    table.rstack td { display: block; border: 0 !important; padding: 0 !important; white-space: normal !important; min-width: 0; word-break: break-word; background: none !important; }
    table.rstack td::before { content: attr(data-label); display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
    table.rstack td[colspan] { grid-column: 1 / -1; }
    table.rstack tr.tl-now { background: #fff8e6; border-color: #f3d58a; }
    table.rstack tr.tl-todo { opacity: .8; }
}
@media (pointer: coarse) { .stat, .btn, .p-row { -webkit-tap-highlight-color: transparent; } }

@media (max-width: 1100px) {
    #irTable.rtable td.is-empty { display: none; }
    #irTable.rtable tr#noMatch[hidden] { display: none; }
}
@media (max-width: 700px) { table.rstack td.is-empty { display: none; } }

/* =====================================================================
   Smooth motion: page changes, pop-ups, lists, charts
   ===================================================================== */
@view-transition { navigation: auto; }
.topbar { view-transition-name: topbar; }
::view-transition-old(root) { animation: .16s ease-in both vt-out; }
::view-transition-new(root) { animation: .3s ease-out both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pop-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.page, .login-wrap, .file-wrap { animation: page-in .38s cubic-bezier(.2, .8, .2, 1) both; }
.stats .stat { animation: row-in .4s cubic-bezier(.2, .8, .2, 1) both; }
.stats .stat:nth-child(2) { animation-delay: .04s; } .stats .stat:nth-child(3) { animation-delay: .08s; }
.stats .stat:nth-child(4) { animation-delay: .12s; } .stats .stat:nth-child(5) { animation-delay: .16s; }
.chart-grid > .card { animation: row-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.chart-grid > .card:nth-child(2) { animation-delay: .05s; } .chart-grid > .card:nth-child(3) { animation-delay: .1s; }
.chart-grid > .card:nth-child(4) { animation-delay: .15s; } .chart-grid > .card:nth-child(n+5) { animation-delay: .2s; }
#irTable tbody tr[data-search] { animation: row-in .35s ease-out both; }
#irTable tbody tr[data-search]:nth-child(2) { animation-delay: .03s; } #irTable tbody tr[data-search]:nth-child(3) { animation-delay: .06s; }
#irTable tbody tr[data-search]:nth-child(4) { animation-delay: .09s; } #irTable tbody tr[data-search]:nth-child(5) { animation-delay: .12s; }
#irTable tbody tr[data-search]:nth-child(6) { animation-delay: .15s; } #irTable tbody tr[data-search]:nth-child(n+7) { animation-delay: .18s; }
.bar-f { transform-origin: left center; animation: grow-x .7s cubic-bezier(.2, .8, .2, 1) both .15s; }
.col-b { transform-origin: center bottom; animation: grow-y .7s cubic-bezier(.2, .8, .2, 1) both .15s; }
.donut { animation: pop-in .6s cubic-bezier(.2, .8, .2, 1) both .1s; }
.section { animation: fade-in .5s ease-out both; }

/* pop-ups */
.modal-backdrop:not([hidden]), .pp-back:not([hidden]) { animation: fade-in .22s ease-out both; }
.modal-backdrop:not([hidden]) .modal-box, .pp-back:not([hidden]) .pp-box { animation: pop-in .3s cubic-bezier(.2, .9, .3, 1.1) both; }
.modal-backdrop.closing, .pp-back.closing { animation: fade-out .2s ease-in both !important; }
.modal-backdrop.closing .modal-box, .pp-back.closing .pp-box { animation: pop-out .2s ease-in both !important; }
.modal-box iframe { opacity: 0; transition: opacity .35s ease; }
.modal-box iframe.ready { opacity: 1; }

/* menus and filter panels */
.filters-box.open { animation: slide-down .25s ease-out both; }
@media (max-width: 900px) { .topbar.nav-open .topbar-right { animation: slide-down .25s ease-out both; } }
.menu { animation: slide-down .18s ease-out both; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
    @view-transition { navigation: none; }
}

/* urgency colour edge on the IR list */
.table tr.due td, .table tr.due:hover td { background: transparent; box-shadow: none; }
.table tr.u-over td:first-child { box-shadow: inset 5px 0 0 var(--err); }
.table tr.u-soon td:first-child { box-shadow: inset 5px 0 0 #f0a30a; }
.table tr.u-done td:first-child { box-shadow: inset 5px 0 0 #00b48c; }
.table tr.u-over td { background: var(--urg-over-bg, #fff6f5); }
.table tr.u-over:hover td { background: var(--urg-over-bg-h, #fdecea); }
.urg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; font-size: .78rem; color: var(--muted); }
.urg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.u-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.u-dot.u-over { background: var(--err); } .u-dot.u-soon { background: #f0a30a; } .u-dot.u-done { background: #00b48c; }
@media (max-width: 1100px) {
    #irTable.rtable tr.u-over { border-left: 6px solid var(--err); background: var(--urg-over-bg, #fff6f5); }
    #irTable.rtable tr.u-soon { border-left: 6px solid #f0a30a; }
    #irTable.rtable tr.u-done { border-left: 6px solid #00b48c; }
    #irTable.rtable tr.due { background: #fff; border-color: var(--line); }
}

/* =====================================================================
   Dark mode and larger text (chosen from the user menu, remembered per browser)
   ===================================================================== */
html[data-text="large"] { font-size: 19px; }
@media (min-width: 1200px) { html[data-text="large"] { font-size: 21px; } }
@media (min-width: 1101px) { html[data-text="large"] #irTable { font-size: clamp(13px, .6vw + 7px, 18px); } }

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0e151d; --card: #17212c; --ink: #e8eef4; --muted: #9aa9b8; --line: #2a3745;
    --brand: #2fd3a8; --brand-dark: #5fe3c1; --accent: #12332c;
    --ok: #4ade9c; --ok-bg: #123428; --err: #ff8a80; --err-bg: #3d1d1b; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
    --urg-over-bg: #2a1a1a; --urg-over-bg-h: #331f1f;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
html[data-theme="dark"] .topbar, html[data-theme="dark"] .btn, html[data-theme="dark"] .stat, html[data-theme="dark"] .card,
html[data-theme="dark"] .menu, html[data-theme="dark"] .modal-box, html[data-theme="dark"] .pp-box, html[data-theme="dark"] .busy-box,
html[data-theme="dark"] .toast, html[data-theme="dark"] .login-card, html[data-theme="dark"] .nav-toggle, html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .table thead th, html[data-theme="dark"] .chip-ir, html[data-theme="dark"] .p-badges i, html[data-theme="dark"] .modal-box iframe,
html[data-theme="dark"] #irTable.rtable tr, html[data-theme="dark"] table.rstack tr { background: var(--card); color: var(--ink); }
html[data-theme="dark"] body.modal-embed, html[data-theme="dark"] body.public-form { background: var(--bg); }
html[data-theme="dark"] .topbar { border-bottom-color: transparent; }
html[data-theme="dark"] input[type=text], html[data-theme="dark"] input[type=email], html[data-theme="dark"] input[type=password],
html[data-theme="dark"] input[type=search], html[data-theme="dark"] input[type=date], html[data-theme="dark"] select, html[data-theme="dark"] textarea {
    background: #111a23; color: var(--ink); border-color: #3a4a5b; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #75869a; }
html[data-theme="dark"] input:focus, html[data-theme="dark"] select:focus, html[data-theme="dark"] textarea:focus { outline-color: #2fd3a8; }
html[data-theme="dark"] input.is-locked, html[data-theme="dark"] input[readonly].is-locked { background: #1d2833; color: #8393a4; border-color: #2f3d4b; }
html[data-theme="dark"] .btn:hover, html[data-theme="dark"] .topbar .btn-ghost:hover, html[data-theme="dark"] .usermenu summary:hover { background: #20303d; }
html[data-theme="dark"] .btn-primary { background: var(--brand); border-color: var(--brand); color: #04231b; }
html[data-theme="dark"] .btn-primary:hover { background: #5fe3c1; }
html[data-theme="dark"] .topbar .btn-ghost { color: var(--brand); }
html[data-theme="dark"] .table tbody tr:hover, html[data-theme="dark"] .table tbody tr[data-href]:hover { background: #1c2a36; }
html[data-theme="dark"] .table tr.locked td { background: #131c25; }
html[data-theme="dark"] .desc, html[data-theme="dark"] .p-row, html[data-theme="dark"] .people-list td, html[data-theme="dark"] code { background: #121b24; }
html[data-theme="dark"] .p-row:hover { background: #1c2a36; }
html[data-theme="dark"] .bar-t { background: #243241; }
html[data-theme="dark"] .donut::after { background: var(--card); }
html[data-theme="dark"] .tag { background: #26323f; color: #c3cfdb; }
html[data-theme="dark"] .tag-hr { background: #2c2446; color: #c9b8ff; }
html[data-theme="dark"] .tag-rc, html[data-theme="dark"] .status-review, html[data-theme="dark"] .stage-pill { background: #12332c; color: #5fe3c1; }
html[data-theme="dark"] .tag-charges { background: #3a2a17; color: #ffb866; }
html[data-theme="dark"] .status-open, html[data-theme="dark"] .alert-warn, html[data-theme="dark"] .charge-unpaid, html[data-theme="dark"] .charge-part { background: #3a3012; color: #ffd166; }
html[data-theme="dark"] .status-closed, html[data-theme="dark"] .charge-paid { background: var(--ok-bg); color: var(--ok); }
html[data-theme="dark"] .alert-ok { background: #123428; color: #6ee7b0; border-color: #1f5c47; }
html[data-theme="dark"] .alert-error { background: var(--err-bg); color: var(--err); }
html[data-theme="dark"] .p-badges b { background: #3a2a17; color: #ffb866; }
html[data-theme="dark"] .tl tr.tl-now td, html[data-theme="dark"] table.rstack tr.tl-now { background: #332b12; border-color: #5c4b1a; }
html[data-theme="dark"] .log-table tr.log-bad td { background: #2a1a1a; }
html[data-theme="dark"] .stat-open .stat-n, html[data-theme="dark"] .stat-await .stat-n { color: #ffb347; }
html[data-theme="dark"] .stat-closed .stat-n { color: var(--ok); }
html[data-theme="dark"] .stat-overdue .stat-n { color: #ff8a80; }
html[data-theme="dark"] .page-head h1, html[data-theme="dark"] h1, html[data-theme="dark"] h2 { color: var(--ink); }
html[data-theme="dark"] .section h2 { color: var(--brand); }
html[data-theme="dark"] .login-page { background: linear-gradient(160deg, #0e1b1a, #17141a 60%, #1c1612); }
html[data-theme="dark"] .footer { border-top-color: #5c4a10; }
html[data-theme="dark"] .busy-box { color: var(--ink); }
html[data-theme="dark"] a { color: #5fe3c1; }
html[data-theme="dark"] .btn, html[data-theme="dark"] .brand, html[data-theme="dark"] .chip-ir { color: var(--ink); }
html[data-theme="dark"] .btn-primary { color: #04231b; }
html[data-theme="dark"] .modal-x, html[data-theme="dark"] .pp-x { color: var(--muted); }
html[data-theme="dark"] .modal-bar { background: var(--card); color: var(--ink); border-color: var(--line); }

/* appearance controls in the user menu and on public pages */
.appearance { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.appearance strong { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; font: inherit; font-size: .85rem; padding: 7px 10px; background: transparent; color: var(--ink); border: 0; border-right: 1px solid var(--line); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; font-weight: 600; }
html[data-theme="dark"] .seg button[aria-pressed="true"] { color: #04231b; }
.theme-fab { position: fixed; right: 14px; bottom: 14px; z-index: 40; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); display: flex; gap: 8px; align-items: center; }
.theme-fab .seg button { padding: 6px 9px; }
@media print { .theme-fab { display: none !important; } }

/* Name-circle menu: admin links + logout live inside it */
.menu-links { display: grid; gap: 2px; margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid var(--line, #e3e8ee); }
.menu-links a { display: block; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.menu-links a:hover { background: #e3f8f1; }
.menu-logout { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line, #e3e8ee); }
.menu-logout .btn { width: 100%; justify-content: center; }
html[data-theme="dark"] .menu-links a:hover { background: #20303d; }

/* Progress tracker */
.tracker { list-style: none; display: flex; margin: 18px 0 6px; padding: 0; counter-reset: none; }
.tracker li { flex: 1; position: relative; text-align: center; font-size: 12.5px; color: var(--muted, #6b7785); }
.tracker li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: #dfe5ec; z-index: 0; }
.tracker li:first-child::before { display: none; }
.tracker li.done::before, .tracker li.now::before { background: #1fbf94; }
.tracker .dot { position: relative; z-index: 1; display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: #fff; border: 2px solid #dfe5ec; font-weight: 700; font-size: 13px; }
.tracker li.done .dot { background: #1fbf94; border-color: #1fbf94; color: #fff; }
.tracker li.now .dot { border-color: #1fbf94; color: #0e8f6e; box-shadow: 0 0 0 4px rgba(31,191,148,.2); }
.tracker .lbl { display: block; margin-top: 6px; }
.tracker li.now .lbl { color: var(--ink); font-weight: 700; }
html[data-theme="dark"] .tracker .dot { background: #17222c; border-color: #2f3f4d; }
html[data-theme="dark"] .tracker li::before { background: #2f3f4d; }
html[data-theme="dark"] .tracker li.done::before, html[data-theme="dark"] .tracker li.now::before { background: #1fbf94; }
html[data-theme="dark"] .tracker li.done .dot { background: #1fbf94; border-color: #1fbf94; }
@media (max-width: 700px) { .tracker .lbl { font-size: 10.5px; } .tracker .dot { width: 26px; height: 26px; } .tracker li::before { top: 12px; } }

/* Reports: tidy print / PDF */
@page { size: A4; margin: 12mm; }
@media print {
    html, html[data-theme="dark"] { --card:#fff; --ink:#101828; --line:#d0d5dd; }
    html[data-theme="dark"] body, body { background:#fff !important; color:#101828 !important; }
    html[data-theme="dark"] .card, html[data-theme="dark"] .stat, html[data-theme="dark"] .p-row { background:#fff !important; color:#101828 !important; border-color:#d0d5dd !important; }
    html[data-text="large"] { font-size: 100% !important; }
    .charts-page { font-size: 11px; }
    .charts-page h1 { font-size: 1.3rem; margin: 0 0 6px; }
    .charts-page .card { padding: 10px 12px !important; margin: 0 0 8px !important; break-inside: avoid; }
    .charts-page .chart-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
    .charts-page .wide-card { grid-column: 1 / -1; }
    .charts-page .people-card .p-list { max-height: none; }
    .charts-page .stats, .charts-page .stat-row { gap: 6px !important; }
}
.print-only{display:none}
@media print{.print-only{display:block!important;margin:0 0 8px}}
@media print {
    .charts-page .stats { grid-template-columns: repeat(5, 1fr) !important; gap: 6px !important; margin-bottom: 8px !important; }
    .charts-page .stat { padding: 6px 8px !important; box-shadow: none !important; background:#fff !important; border:1px solid #d0d5dd !important; }
    .charts-page .stat-n { font-size: 1.3rem !important; }
    .charts-page .stat-open .stat-n, .charts-page .stat-await .stat-n { color:#b4540a !important; }
    .charts-page .stat-closed .stat-n { color:#067647 !important; }
    .charts-page .stat-overdue .stat-n { color:#b42318 !important; }
    .charts-page .stat-l { color:#475467 !important; }
    .charts-page .bar-t { background:#eaecf0 !important; }
    .charts-page .p-badges b { background:#fdebd9 !important; color:#b4540a !important; }
    .charts-page .p-badges i, .charts-page .p-row { background:#fff !important; color:#475467 !important; }
    .charts-page .p-row { padding: 4px 8px !important; }
    .charts-page .muted, .charts-page .p-name small { color:#475467 !important; }
    .charts-page h2, .charts-page h3 { color:#101828 !important; }
    .charts-page .card { box-shadow:none !important; }
}
@media print { .charts-page .stats { display: flex !important; flex-wrap: nowrap !important; } .charts-page .stats .stat { flex: 1 1 0; min-width: 0; } }
.chg-h{margin:18px 0 8px;font-size:.95rem}.chg-table+.btn{margin-top:12px}.chg-table tr[hidden]{display:none!important}
.chg-table tr[data-href]{cursor:pointer}.chg-table tr[data-href]:hover td{background:#eaf6f2}html[data-theme="dark"] .chg-table tr[data-href]:hover td{background:#20303d}

/* Welcome page: filing a report is the main action, staff log in below */
.login-card.welcome { max-width: 420px; text-align: center; }
.login-card.welcome > p { margin: 4px 0 20px; }
.btn.btn-hero { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 12px; padding: 20px 22px; font-size: 1.1rem; border-radius: 14px; box-shadow: 0 8px 22px rgba(0,133,106,.28); text-decoration: none; text-align: center; }
.btn.btn-hero:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(0,133,106,.34); }
.btn-hero .hero-t { font-weight: 700; font-size: 1.15rem; }
.btn-hero .hero-s { font-weight: 400; font-size: .82rem; opacity: .9; }
.login-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.login-card.welcome #showLogin { margin-top: 0; }
.login-form { text-align: left; margin-top: 0; }
.login-form[hidden], #showLogin[hidden] { display: none; }
.login-form-in { animation: page-in .3s cubic-bezier(.2,.8,.2,1) both; }
.login-card.welcome .login-form .tiny { margin-top: 14px; text-align: center; }

/* Welcome page polish */
.login-page { position: relative; overflow: hidden; }
.login-page::before, .login-page::after { content: ""; position: fixed; z-index: 0; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.login-page::before { width: 420px; height: 420px; left: -120px; top: -100px; background: #5fe3c1; }
.login-page::after { width: 380px; height: 380px; right: -110px; bottom: -90px; background: #ffc27a; }
html[data-theme="dark"] .login-page::before { background: #0f6b57; opacity: .45; }
html[data-theme="dark"] .login-page::after { background: #7a3d10; opacity: .4; }
.login-wrap { position: relative; z-index: 1; }
.login-card.welcome { position: relative; max-width: 440px; padding: 38px 34px 30px; border-radius: 22px; box-shadow: 0 24px 60px rgba(16,24,40,.12); backdrop-filter: blur(6px); }
.login-card.welcome .login-logo { width: 130px; margin-bottom: 18px; }
.login-card.welcome h1 { font-size: 1.6rem; letter-spacing: -.01em; margin: 0 0 6px; }
.login-card.welcome > p { font-size: 1rem; line-height: 1.45; margin: 0 0 24px; }
.blob { display: none; }
.btn.btn-hero { margin-top: 0; font-size: 1.12rem; letter-spacing: .005em; background-image: linear-gradient(135deg, #00a37f, #00856a); transition: transform .18s, box-shadow .18s; }
.btn.btn-hero .hero-t { font-size: 1.12rem; }
.btn.btn-hero:hover { transform: translateY(-2px); }
.btn.btn-hero:active { transform: translateY(0); }
.hero-arrow { transition: transform .2s; flex-shrink: 0; }
.btn.btn-hero:hover .hero-arrow { transform: translateX(4px); }
.how { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 0; padding: 0; text-align: center; }
.how li { display: grid; justify-items: center; gap: 8px; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.how b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; background: #e3f8f1; color: #006b55; }
.how li:nth-child(2) b { background: #fff1d6; color: #9a6200; }
.how li:nth-child(3) b { background: #fde8d9; color: #b4540a; }
html[data-theme="dark"] .how b { background: #123a31; color: #5fe3c1; }
html[data-theme="dark"] .how li:nth-child(2) b { background: #3d3112; color: #f6c453; }
html[data-theme="dark"] .how li:nth-child(3) b { background: #46230d; color: #f59a5b; }
.login-card.welcome #showLogin { background: transparent; border-color: var(--line); color: var(--muted); font-weight: 600; padding: 10px; }
.login-card.welcome #showLogin:hover { color: var(--ink); border-color: var(--brand); }
.login-or { margin: 24px 0 12px; }
@media (max-width: 480px) { .login-card.welcome { padding: 28px 20px 24px; } .how { gap: 6px; } .how li { font-size: .74rem; } }
@media (max-width: 420px) { .btn.btn-hero { padding: 18px 16px; gap: 8px; } .btn.btn-hero .hero-t { font-size: 1rem; } }

/* Welcome <-> login swap */
.login-card.welcome { transition: min-height .3s ease; }
.view[hidden] { display: none !important; }
.view-out { animation: view-out .2s ease both; }
.view-in { animation: view-in .34s cubic-bezier(.2,.8,.2,1) both; }
@keyframes view-out { to { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes view-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.login-form.view { text-align: center; max-width: 320px; margin: 4px auto 0; }
.login-form .lf-title { margin: 6px 0 2px; font-size: 1.25rem; }
.login-form .lf-sub { margin: 0 0 14px; font-size: .9rem; text-align: center; }
.login-form label { display: block; text-align: left; font-weight: 600; margin-bottom: 6px; }
.login-form .pw-row input { font-size: 1.05rem; padding: 12px 14px; }
.login-form .btn-primary.block { padding: 13px; font-size: 1.05rem; }
.back-link { display: inline-block; margin-top: 14px; background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: .88rem; }
.back-link:hover { color: var(--brand); }
@media (prefers-reduced-motion: reduce) { .view-out, .view-in { animation: none; } }
.login-card.welcome > .view-welcome > p.muted { font-size: 1rem; line-height: 1.45; margin: 0 0 24px; text-align: center; }
@media (min-width: 481px) { .login-card.welcome { display: flex; flex-direction: column; justify-content: center; min-height: 640px; } }
.login-card.welcome .login-form .tiny { text-align: center; margin-top: 16px; }

.alert-pill.warn { background: #fff4d6; color: #8a5a00; }
html[data-theme="dark"] .alert-pill.warn { background: #3a3012; color: #ffd166; }

/* Summary cards: colour bar on top, clearer numbers, breathing room */
.stats { margin-top: 16px; gap: 14px; }
.stat { position: relative; overflow: hidden; padding: 18px 20px 16px; border-radius: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.05); transition: transform .15s, box-shadow .15s, border-color .15s; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: #98a2b3; }
.stat-open::before, .stat-await::before { background: #f5a524; }
.stat-closed::before { background: #12b76a; }
.stat-overdue::before { background: #f04438; }
.stat:nth-child(1)::before { background: var(--brand, #00856a); }
.stat-n { font-size: 2.1rem; letter-spacing: -.02em; }
.stat-l { margin-top: 4px; font-weight: 500; }
button.stat:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,24,40,.12); }
html[data-theme="dark"] .stat { box-shadow: 0 1px 2px rgba(0,0,0,.4); }
@media print { .stat::before { display: none; } }

/* RCA / CAR revisions and approval */
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .field.two { grid-template-columns: 1fr; } }
.rca-rev { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; background: var(--card, #fff); overflow: hidden; }
.rca-rev > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 16px; font-size: .92rem; }
.rca-rev > summary::-webkit-details-marker { display: none; }
.rca-rev > summary::before { content: "\25B8"; color: var(--muted); transition: transform .15s; }
.rca-rev[open] > summary::before { transform: rotate(90deg); }
.rca-rev[open] > summary { border-bottom: 1px solid var(--line); }
.rca-rev .grid { padding: 4px 16px 8px; }
.rca-n { font-weight: 700; }
.rca-when { color: var(--muted); font-size: .85rem; flex: 1 1 auto; }
.rca-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.rca-wait { background: #fff4d6; color: #8a5a00; }
.rca-ok { background: #e3f8ee; color: #067647; }
.rca-bad { background: #fde8e6; color: #b42318; }
.rca-decision { margin: 0 16px 14px; padding: 10px 14px; border-radius: 10px; font-size: .9rem; }
.rca-d-ok { background: #e3f8ee; color: #067647; }
.rca-d-bad { background: #fde8e6; color: #b42318; }
.rca-reason { margin-top: 4px; color: inherit; }
.rca-review-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
html[data-theme="dark"] .rca-rev { background: #1a2332; }
html[data-theme="dark"] .rca-wait { background: #3a3012; color: #ffd166; }
html[data-theme="dark"] .rca-ok, html[data-theme="dark"] .rca-d-ok { background: #123428; color: #6ee7b0; }
html[data-theme="dark"] .rca-bad, html[data-theme="dark"] .rca-d-bad { background: #3b1b1b; color: #ff9a92; }
@media print { .rca-rev { break-inside: avoid; } }

/* Date boxes: the whole box opens the calendar (the icon is stretched over the entire input) */
input[type="date"], input[type="month"], input[type="datetime-local"] { position: relative; cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="month"]::-webkit-calendar-picker-indicator, input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; opacity: 0; cursor: pointer; background: none;
}

/* keep a visible calendar icon (the real one is invisible and stretched over the box) */
input[type="date"], input[type="month"], input[type="datetime-local"] {
    background-repeat: no-repeat; background-position: right 12px center; background-size: 18px 18px; padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E");
}
html[data-theme="dark"] input[type="date"], html[data-theme="dark"] input[type="month"], html[data-theme="dark"] input[type="datetime-local"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c2cad6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E");
}

.alert-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

.hint-list { padding-left: 22px; line-height: 1.7; margin: 10px 0; }

/* Phones and tablets: exactly one calendar icon (ours); the device's own icon is hidden, tapping the box opens the device picker */
@media (hover: none) and (pointer: coarse) {
    input[type="date"], input[type="month"], input[type="datetime-local"] {
        display: block; min-height: 44px; line-height: 1.2; text-align: left; cursor: auto;
        background-repeat: no-repeat; background-position: right 12px center; background-size: 18px 18px; padding-right: 40px;
    }
    input[type="date"]::-webkit-calendar-picker-indicator, input[type="month"]::-webkit-calendar-picker-indicator, input[type="datetime-local"]::-webkit-calendar-picker-indicator {
        display: none; -webkit-appearance: none;
    }
    input[type="date"]::-webkit-date-and-time-value, input[type="datetime-local"]::-webkit-date-and-time-value { text-align: left; min-height: 1.2em; }
}

/* Dark mode: its input background shorthand reset the icon's size and repeat (icon tiled across the box), so set them again */
html[data-theme="dark"] input[type="date"], html[data-theme="dark"] input[type="month"], html[data-theme="dark"] input[type="datetime-local"] {
    background-repeat: no-repeat; background-position: right 12px center; background-size: 18px 18px; padding-right: 40px;
}

/* Final word on the device's own calendar icon: never show it (on iPhone it was drawn stretched and tiled across the box).
   Our single icon is the background above; clicking the box opens the picker through the script in the page footer. */
input[type="date"]::-webkit-calendar-picker-indicator, input[type="month"]::-webkit-calendar-picker-indicator, input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-inner-spin-button, input[type="datetime-local"]::-webkit-inner-spin-button {
    display: none !important; -webkit-appearance: none !important; background: none !important; background-image: none !important; width: 0 !important; height: 0 !important; opacity: 0 !important; margin: 0 !important; padding: 0 !important;
}
input[type="date"], input[type="month"], input[type="datetime-local"] {
    background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 18px 18px !important;
}
