:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --ink: #172033;
    --muted: #647087;
    --line: #dce3ef;
    --soft: #f7f9fd;
    --primary: #1457d9;
    --primary-dark: #0e3f9e;
    --success-bg: #e8f8ef;
    --success-ink: #17683a;
    --error-bg: #fff0f0;
    --error-ink: #a22a2a;
    --shadow: 0 14px 34px rgba(23, 32, 51, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

body.modal-open {
    overflow: hidden;
}

.app-header {
    align-items: center;
    background: linear-gradient(135deg, #0f2243, #173b75);
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 32px clamp(18px, 4vw, 56px);
}

.eyebrow {
    color: #b8cdf8;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: #315a9d;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.05;
    margin-bottom: 10px;
}

h2 {
    font-size: 22px;
    margin-bottom: 4px;
}

.lead,
.section-heading p,
.empty-state p,
.record-card p {
    color: var(--muted);
}

.app-header .lead {
    color: #d8e4ff;
    margin-bottom: 0;
}

.header-actions {
    align-items: stretch;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.layout {
    display: grid;
    gap: 22px;
    margin: 0 auto;
    max-width: 1480px;
    padding: 24px clamp(14px, 3vw, 36px) 44px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.section-heading {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-heading p {
    margin-bottom: 0;
}

.search-form,
.login-form {
    align-items: end;
    display: grid;
    gap: 14px;
}

.search-form {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
}

.database-search {
    background:
        linear-gradient(135deg, rgba(20, 87, 217, 0.08), rgba(255, 255, 255, 0) 45%),
        var(--panel);
}

.admin-menu {
    display: grid;
    gap: 18px;
}

.admin-menu h2 {
    font-size: 32px;
    line-height: 1.1;
    margin-bottom: 0;
}

.admin-menu-heading {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.admin-menu-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.admin-dashboard-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-action-card,
.admin-stat-card {
    background: #fbfcff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    font: inherit;
    gap: 8px;
    min-height: 144px;
    padding: 16px;
    text-align: left;
    text-decoration: none;
}

.admin-action-card {
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.admin-action-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20, 87, 217, 0.12);
    transform: translateY(-1px);
}

.admin-action-card.attention {
    background: #fff7e6;
    border-color: #f0bf67;
}

.admin-card-icon {
    align-items: center;
    background: #eaf1ff;
    border: 1px solid #c9dafc;
    border-radius: 8px;
    color: #123e8a;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 42px;
}

.admin-card-icon svg {
    fill: none;
    height: 22px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
    width: 22px;
}

.admin-card-icon.dark {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.admin-action-card strong,
.admin-stat-card strong {
    display: block;
    font-size: 20px;
    line-height: 1.2;
}

.admin-action-card small,
.admin-stat-card span {
    color: var(--muted);
}

.admin-stat-card {
    background: #0f2243;
    color: #fff;
}

.admin-stat-card span {
    color: #d8e4ff;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.card-code-upload {
    align-items: end;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(260px, 1fr) minmax(240px, 360px) auto;
    padding: 18px;
}

.card-code-upload h3 {
    margin-bottom: 6px;
}

.school-account-modal-card,
.school-profile-modal-card {
    max-width: 820px;
    width: min(94vw, 820px);
}

.school-account-form {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    padding: 18px;
}

.school-account-form .button {
    align-self: end;
}

.school-account-list {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
}

.school-account-list h3 {
    margin-bottom: 4px;
}

.school-account-list div {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 12px;
}

.school-account-list span {
    color: var(--muted);
    font-size: 13px;
    text-align: right;
}

.card-code-upload p {
    color: var(--muted);
    margin-bottom: 0;
}

.search-copy {
    margin-bottom: 18px;
    max-width: 820px;
}

.search-copy h2 {
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
    margin-bottom: 8px;
}

.search-copy p:last-child {
    color: var(--muted);
    margin-bottom: 0;
}

.search-form-large {
    align-items: end;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
    grid-template-columns: minmax(280px, 1fr) auto;
    padding: 16px;
}

.person-search input {
    font-size: 18px;
    min-height: 52px;
}

.search-actions {
    display: flex;
    gap: 8px;
}

.login-form {
    align-items: start;
    grid-template-columns: 1fr;
}

label {
    color: var(--ink);
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
}

input,
textarea {
    background: #fff;
    border: 1px solid #c9d3e2;
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    font-weight: 400;
    min-height: 42px;
    padding: 10px 12px;
    width: 100%;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20, 87, 217, 0.14);
    outline: none;
}

.button {
    align-items: center;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    text-decoration: none;
    white-space: nowrap;
}

.button:hover {
    background: var(--primary-dark);
}

.button.ghost {
    background: #fff;
    border-color: #bfcae0;
    color: var(--ink);
}

.button.ghost:hover {
    background: #f3f6fb;
}

.button.danger {
    background: #b42318;
    border-color: #b42318;
    color: #fff;
}

.button.danger:hover {
    background: #8f1d15;
}

.button.compact {
    min-height: 34px;
    padding: 6px 12px;
}

.button.light {
    align-self: center;
    background: #fff;
    border-color: #fff;
    color: #0f2243;
}

.officer-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 18px;
}

.quick-heading {
    align-items: baseline;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 20px;
}

.quick-heading span {
    color: var(--muted);
    font-size: 13px;
}

.officer-list button {
    background: #fbfcff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: 4px;
    padding: 12px;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.officer-list button:hover {
    border-color: var(--primary);
}

.officer-list button.active {
    background: #eaf1ff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20, 87, 217, 0.12);
}

.officer-list span {
    color: var(--muted);
    font-size: 13px;
}

.record-list {
    display: grid;
    gap: 14px;
}

.selected-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    margin-bottom: 16px;
}

.selected-summary div {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.selected-summary span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.selected-summary strong {
    display: block;
    font-size: 24px;
    margin-top: 4px;
}

.record-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.record-card-main {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(200px, 1.1fr) minmax(240px, 1.8fr) auto;
    padding: 16px;
}

.record-card h3,
.record-card p {
    margin-bottom: 4px;
}

.record-label {
    color: #50617c;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.record-metrics {
    align-content: start;
    display: grid;
    gap: 8px;
    justify-items: end;
}

.record-metrics span,
.status-pill {
    background: #eaf1ff;
    border: 1px solid #c9dafc;
    border-radius: 999px;
    color: #123e8a;
    font-size: 13px;
    font-weight: 800;
    padding: 6px 10px;
}

.record-meta {
    background: var(--soft);
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    padding: 12px 16px;
}

.record-meta span {
    color: #4a5870;
    font-size: 13px;
}

.record-actions {
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding: 10px 16px;
}

.delete-record-modal-card {
    max-width: 620px;
    width: min(94vw, 620px);
}

.delete-record-form {
    display: grid;
    gap: 14px;
}

.delete-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.audit-card .record-card-main {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(260px, 1.2fr);
}

.record-details-panel {
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding: 12px 16px 16px;
}

.record-details-panel summary {
    align-items: center;
    background: #fff;
    border: 1px solid #bfd0ef;
    border-radius: 6px;
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    list-style: none;
    margin-bottom: 0;
    min-height: 40px;
    padding: 8px 12px;
}

.record-details-panel summary::-webkit-details-marker {
    display: none;
}

.record-details-panel summary::before {
    content: "+";
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    margin-right: 8px;
}

.record-details-panel[open] summary {
    background: #eaf1ff;
    border-color: #9ebcf5;
    margin-bottom: 14px;
}

.record-details-panel[open] summary::before {
    content: "-";
}

.summary-hide,
.record-details-panel[open] .summary-show {
    display: none;
}

.record-details-panel[open] .summary-hide {
    display: inline;
}

.record-details {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin: 0;
}

.record-details div {
    background: #fbfcff;
    border: 1px solid var(--line);
    border-left: 4px solid #c9dafc;
    border-radius: 6px;
    min-height: 78px;
    padding: 10px 12px;
}

.record-details dt {
    color: #4c5a72;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.record-details dd {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.35;
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

.empty-state {
    border: 1px dashed #b8c5da;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.empty-state h3,
.empty-state p {
    margin-bottom: 0;
}

.notice {
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.notice p {
    margin-bottom: 4px;
}

.notice p:last-child {
    margin-bottom: 0;
}

.success {
    background: var(--success-bg);
    color: var(--success-ink);
}

.error {
    background: var(--error-bg);
    color: var(--error-ink);
}

.warning {
    background: #fff7e6;
    color: #7a4a00;
}

.info {
    background: #eaf1ff;
    color: #123e8a;
}

.autofill-hint {
    color: #315a9d;
    font-size: 12px;
    font-weight: 700;
    min-height: 16px;
}

.login-hint {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 0;
}

.modal-backdrop {
    align-items: center;
    background: rgba(15, 34, 67, 0.66);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 20;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 34, 67, 0.32);
    max-height: calc(100vh - 24px);
    max-width: 420px;
    overflow: auto;
    padding: 24px;
    position: relative;
    width: min(100%, 420px);
}

.item-modal-card {
    max-width: 1280px;
    padding: 16px 18px;
    width: min(100%, 1280px);
}

.item-modal-card .modal-heading {
    padding-right: 44px;
}

.item-modal-card .modal-heading h2 {
    font-size: 22px;
    line-height: 1.15;
}

.item-modal-card .modal-heading p {
    margin-bottom: 10px;
}

.inventory-modal-card {
    max-width: 1240px;
    padding: 0;
    width: min(100%, 1240px);
}

.inventory-records-modal-card {
    max-width: none;
    padding: 28px 30px;
    width: 94vw;
}

.sticker-modal-card {
    max-width: none !important;
    min-height: calc(100vh - 40px);
    width: 96vw !important;
}

.ics-modal-card {
    max-width: none;
    padding: 28px 30px;
    width: 96vw;
}

.itr-modal-card {
    max-width: none;
    padding: 28px 30px;
    width: 96vw;
}

.ris-modal-card {
    max-width: none;
    padding: 28px 30px;
    width: 96vw;
}

.cri-modal-card {
    max-width: none !important;
    min-height: calc(100vh - 40px);
    padding: 28px 30px;
    width: 96vw !important;
}

.card-report-modal-card {
    max-width: none !important;
    min-height: calc(100vh - 40px);
    padding: 28px 30px;
    width: 96vw !important;
}

.icf-modal-card {
    max-width: none;
    padding: 28px 30px;
    width: 96vw;
}

.card-upload-modal-card {
    max-width: 980px;
    width: min(94vw, 980px);
}

.icf-modal-heading {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.ics-modal-heading {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.itr-modal-heading {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.ris-modal-heading {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.cri-modal-heading {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.ics-report-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(280px, 360px) 1fr;
}

.itr-report-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(320px, 430px) 1fr;
}

.ris-report-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(320px, 430px) 1fr;
}

.cri-report-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(320px, 430px) 1fr;
    width: 100%;
}

.ics-report-sidebar {
    display: grid;
    gap: 12px;
    align-content: start;
}

.itr-report-sidebar {
    align-content: start;
    display: grid;
    gap: 12px;
}

.ris-report-sidebar {
    align-content: start;
    display: grid;
    gap: 12px;
}

.cri-report-sidebar {
    align-content: start;
    display: grid;
    gap: 12px;
}

.card-report-sidebar {
    align-content: start;
    display: grid;
    gap: 12px;
}

.itr-form-grid {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.ris-form-grid {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.card-report-type {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    padding: 12px;
}

.card-report-type label {
    align-items: center;
    display: flex;
    gap: 8px;
    font-weight: 800;
}

.stock-movement-form {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.stock-movement-toggle {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
}

.stock-movement-toggle label {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: flex;
    gap: 8px;
    padding: 8px;
}

.compact-notice {
    font-size: 13px;
    margin: 0;
    padding: 10px 12px;
}

.ics-report-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    max-height: calc(100vh - 310px);
    overflow: auto;
}

.itr-report-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    max-height: 250px;
    overflow: auto;
}

.ris-report-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    max-height: 250px;
    overflow: auto;
}

.cri-report-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    max-height: 250px;
    overflow: auto;
}

.card-report-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    max-height: calc(100vh - 360px);
    overflow: auto;
}

.ics-report-row {
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    text-align: left;
}

.card-report-row {
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    text-align: left;
}

.itr-report-row {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    padding: 10px 12px;
}

.ris-report-row {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    padding: 10px 12px;
}

.cri-report-row {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    padding: 10px 12px;
}

.ris-report-row:last-child {
    border-bottom: 0;
}

.ris-report-row:hover,
.cri-report-row:hover {
    background: #eaf1ff;
}

.ris-report-row small,
.ris-report-row strong,
.cri-report-row small,
.cri-report-row strong {
    display: block;
}

.ris-report-row small,
.cri-report-row small {
    color: var(--muted);
}

.itr-report-row:last-child {
    border-bottom: 0;
}

.itr-report-row:hover {
    background: #eaf1ff;
}

.itr-report-row small,
.itr-report-row strong {
    display: block;
}

.itr-report-row small {
    color: var(--muted);
}

.ics-report-row:last-child {
    border-bottom: 0;
}

.ics-report-row:hover,
.ics-report-row.active,
.card-report-row:hover,
.card-report-row.active {
    background: #eaf1ff;
}

.ics-report-row span,
.ics-report-row small,
.card-report-row span,
.card-report-row small {
    color: var(--muted);
}

.card-report-preview {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: calc(100vh - 220px);
    min-width: 0;
    overflow: auto;
    padding: 14px;
}

.ics-report-preview {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: calc(100vh - 220px);
    overflow: auto;
    padding: 14px;
}

.card-report-layout {
    width: 100%;
}

.card-report-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
}

.stock-card-report,
.property-card-report {
    background-color: #fff;
    background-image:
        linear-gradient(#e1e1e1 1px, transparent 1px),
        linear-gradient(90deg, #e1e1e1 1px, transparent 1px);
    background-size: 120px 32px;
    color: #000;
    font-family: "Times New Roman", Times, serif;
    margin: 0 auto;
    min-width: 960px;
    padding: 18px;
}

.stock-card-page,
.property-card-page {
    border: 2px solid #000;
    min-height: 1300px;
    position: relative;
}

.stock-card-appendix,
.property-card-appendix {
    font-size: 22px;
    font-style: italic;
    padding: 8px 14px 30px;
    text-align: right;
}

.stock-card-title,
.property-card-title {
    font-size: 26px;
    font-weight: 700;
    padding-bottom: 42px;
    text-align: center;
}

.stock-card-meta,
.property-card-meta {
    border-collapse: collapse;
    width: 100%;
}

.stock-card-meta td,
.property-card-meta td {
    border: 1px solid #000;
    color: #000;
    font-size: 18px;
    height: 34px;
    padding: 4px;
}

.stock-card-meta .value,
.property-card-meta .value {
    font-weight: 700;
}

.stock-card-table,
.property-card-table {
    border-collapse: collapse;
    width: 100%;
}

.stock-card-table th,
.stock-card-table td,
.property-card-table th,
.property-card-table td {
    border: 1px solid #000;
    color: #000;
    font-size: 16px;
    padding: 4px;
    text-align: center;
    vertical-align: middle;
}

.stock-card-table th,
.property-card-table th {
    font-weight: 700;
}

.stock-card-table td,
.property-card-table td {
    height: 29px;
}

.itr-report-preview {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: calc(100vh - 220px);
    overflow: auto;
    padding: 14px;
}

.ris-report-preview {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: calc(100vh - 220px);
    overflow: auto;
    padding: 14px;
}

.cri-report-preview {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: calc(100vh - 220px);
    min-width: 0;
    overflow: auto;
    padding: 14px;
}

.itr-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.ris-actions,
.cri-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.ics-empty-preview {
    border: 1px dashed #b8c5da;
    border-radius: 8px;
    color: var(--muted);
    padding: 36px;
    text-align: center;
}

.ris-report {
    background: #fff;
    border: 1px solid #000;
    color: #000;
    font-family: "Times New Roman", Times, serif;
    margin: 0 auto;
    max-width: 1040px;
    min-width: 940px;
}

.ris-appendix {
    font-size: 22px;
    font-style: italic;
    padding: 18px 22px 58px;
    text-align: right;
}

.ris-title {
    font-size: 28px;
    font-weight: 700;
    padding-bottom: 92px;
    text-align: center;
}

.ris-meta-top {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    min-height: 140px;
}

.ris-meta-top > div {
    display: grid;
    grid-template-rows: 1fr 1fr;
}

.ris-line {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: max-content 1fr;
    padding: 0 28px;
}

.ris-line strong {
    border-bottom: 1px solid #000;
    min-height: 24px;
}

.ris-info-grid {
    border-top: 2px solid #000;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
}

.ris-info-left,
.ris-info-right {
    display: grid;
    grid-template-rows: 57px 57px;
}

.ris-info-left {
    border-right: 2px solid #000;
}

.ris-info-left div,
.ris-info-right div {
    align-items: center;
    border-bottom: 1px solid #000;
    display: grid;
    gap: 8px;
    grid-template-columns: max-content 1fr;
    padding: 0 2px;
}

.ris-info-right div {
    align-content: center;
    gap: 2px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

.ris-info-right strong {
    border-bottom: 1px solid #000;
    display: block;
    margin: 0 auto;
    min-height: 20px;
    width: min(78%, 260px);
}

.ris-table {
    border-collapse: collapse;
    width: 100%;
}

.ris-table th,
.ris-table td {
    border: 1px solid #000;
    color: #000;
    font-size: 15px;
    padding: 6px;
    vertical-align: top;
    word-break: break-word;
}

.ris-table th {
    background: #d9d9d9;
    font-weight: 700;
    text-align: center;
}

.ris-table .ris-item-row td {
    background: #eef5e4;
    height: 70px;
}

.ris-table .center-cell {
    text-align: center;
}

.ris-purpose {
    border: 1px solid #000;
    border-top: 0;
    display: grid;
    grid-template-columns: 160px 1fr;
    min-height: 96px;
}

.ris-purpose strong,
.ris-purpose div {
    padding: 8px 18px;
}

.ris-history {
    border: 1px solid #000;
    border-top: 0;
    min-height: 58px;
    padding: 8px 94px;
}

.ris-signatures {
    border-collapse: collapse;
    width: 100%;
}

.ris-signatures td {
    border: 1px solid #000;
    color: #000;
    font-size: 15px;
    height: 40px;
    padding: 4px;
}

.ris-signatures th {
    border: 1px solid #000;
    color: #000;
    font-size: 15px;
    height: 54px;
    padding: 4px;
    text-align: left;
}

.ris-signatures .row-label {
    width: 12%;
}

.cri-report {
    background-color: #fff;
    background-image:
        linear-gradient(#dedede 1px, transparent 1px),
        linear-gradient(90deg, #dedede 1px, transparent 1px);
    background-size: 118px 24px;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0 auto;
    max-width: 1040px;
    min-width: 940px;
    padding: 0 30px 30px;
}

.cri-page {
    min-height: 1320px;
}

.cri-header {
    align-items: center;
    display: grid;
    gap: 20px;
    grid-template-columns: 150px 1fr 150px;
    min-height: 170px;
    text-align: center;
}

.cri-logo {
    height: 84px;
    justify-self: center;
    object-fit: contain;
    width: 84px;
}

.cri-header-text div,
.cri-header-text strong {
    display: block;
    font-size: 16px;
    line-height: 1.25;
}

.cri-header-text strong {
    font-weight: 700;
}

.cri-header-text strong:nth-of-type(3) {
    font-size: 18px;
}

.cri-title {
    font-size: 26px;
    margin: 28px 0 42px;
    text-align: center;
}

.cri-certify {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 56px;
    text-align: center;
}

.cri-info-grid {
    display: grid;
    gap: 16px 74px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 64px;
}

.cri-info-grid div {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: 112px 1fr;
}

.cri-info-grid strong {
    border-bottom: 1px solid #000;
    display: block;
    min-height: 27px;
    overflow-wrap: anywhere;
}

.cri-info-grid .cri-ics-cell {
    background: #9fbbe0;
    border: 2px solid #000;
    padding: 3px;
}

.cri-to-wit {
    font-size: 18px;
    margin: 0 0 2px 4px;
}

.cri-table {
    border-collapse: collapse;
    width: 100%;
}

.cri-table th,
.cri-table td {
    border: 1px solid #000;
    color: #000;
    font-size: 16px;
    padding: 7px 6px;
    vertical-align: top;
    word-break: break-word;
}

.cri-table th {
    background: #bfbfbf;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}

.cri-table th small {
    display: block;
    font-size: 13px;
    font-weight: 400;
}

.cri-table .cri-item-row td {
    height: 210px;
}

.cri-serial-row td {
    height: 38px;
}

.cri-nothing-row td {
    color: red;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
}

.cri-signatures {
    display: grid;
    gap: 70px 80px;
    grid-template-columns: 1fr 1fr;
    margin-top: 46px;
    min-height: 330px;
}

.cri-signature-block {
    display: grid;
    gap: 6px;
    min-height: 122px;
}

.cri-signatures span {
    font-size: 18px;
    margin-bottom: 18px;
}

.cri-signatures strong {
    border-bottom: 1px solid #000;
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    min-height: 26px;
    padding: 0 8px 5px;
    text-align: center;
    text-transform: uppercase;
}

.cri-signatures small {
    color: #000;
    display: block;
    font-size: 16px;
    line-height: 1.15;
    min-height: 18px;
    text-align: center;
}

.cri-signatures em {
    font-style: normal;
    justify-self: center;
    margin-top: 8px;
}

.cri-signatures em b {
    font-style: italic;
}

.itr-report {
    background: #c8dda4;
    color: #000;
    font-family: "Times New Roman", Times, serif;
    margin: 0 auto;
    max-width: 1040px;
    min-width: 940px;
    padding: 14px;
}

.itr-page {
    background: #fff;
    border: 2px solid #000;
}

.itr-topline {
    display: flex;
    font-style: italic;
    justify-content: space-between;
    padding: 8px 10px;
}

.itr-header {
    align-items: center;
    display: grid;
    gap: 20px;
    grid-template-columns: 140px 1fr 140px;
    min-height: 210px;
    padding: 20px 40px;
    text-align: center;
}

.itr-logo {
    height: 86px;
    justify-self: center;
    object-fit: contain;
    width: 86px;
}

.itr-header-text div {
    font-size: 17px;
    line-height: 1.25;
}

.itr-header-text strong {
    display: block;
    font-size: 18px;
}

.itr-title {
    font-size: 30px;
    font-weight: 700;
    text-align: center;
}

.itr-fund-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 76px;
}

.itr-fund-row div {
    align-items: end;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 8px 0;
}

.itr-fund-row strong {
    border-bottom: 1px solid #000;
    display: inline-block;
    min-width: 520px;
}

.itr-info {
    border-collapse: collapse;
    width: 100%;
}

.itr-info td {
    border: 1px solid #000;
    color: #000;
    font-size: 16px;
    height: 42px;
    padding: 4px;
}

.itr-info .right-box {
    width: 30%;
}

.transfer-type {
    border: 1px solid #000;
    border-top: 0;
    display: grid;
    align-items: center;
    gap: 8px 34px;
    grid-template-columns: 130px 210px 1fr;
    min-height: 132px;
    padding: 6px 16px;
}

.transfer-type > strong {
    grid-column: 1 / -1;
}

.check-box {
    border: 1px solid #000;
    display: inline-block;
    height: 16px;
    margin-right: 12px;
    width: 16px;
}

.check-box.checked {
    background: red;
}

.transfer-reason {
    align-self: center;
    border-bottom: 1px solid #000;
    color: red;
    font: 700 22px Arial, Helvetica, sans-serif;
    grid-column: 2 / -1;
    text-align: center;
}

.itr-table {
    border-collapse: collapse;
    width: 100%;
}

.itr-table th,
.itr-table td {
    border: 1px solid #000;
    color: #000;
    font-size: 15px;
    padding: 6px;
    vertical-align: top;
    word-break: break-word;
}

.itr-table th {
    background: #c7dba2;
    font-weight: 400;
    text-align: center;
}

.itr-table .itr-item-row td {
    background: #eef5e4;
    height: 78px;
}

.itr-table .serial-row td,
.itr-table .total-row td {
    background: #eef5e4;
    height: 34px;
}

.itr-table .total-label {
    text-align: right;
    vertical-align: middle;
}

.itr-reason-row {
    background: #c7dba2;
    border: 1px solid #000;
    border-top: 0;
    font-size: 16px;
    font-weight: 700;
    padding: 10px 26px;
}

.itr-signatures {
    border-collapse: collapse;
    width: 100%;
}

.itr-signatures td {
    border: 1px solid #000;
    color: #000;
    font-size: 14px;
    height: 28px;
    padding: 4px;
    width: 33.333%;
}

.itr-signatures .signature-heading {
    font-weight: 700;
    height: 48px;
    vertical-align: bottom;
}

.itr-signatures strong {
    display: inline-block;
    font-weight: 700;
    margin-left: 4px;
    max-width: calc(100% - 96px);
    overflow-wrap: anywhere;
    vertical-align: top;
}

.ics-slip {
    background: #fff;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0 auto;
    max-width: 980px;
    min-width: 860px;
}

.ics-appendix {
    border-bottom: 2px solid #000;
    font-family: "Times New Roman", serif;
    font-style: italic;
    padding: 4px 0;
    text-align: right;
}

.ics-slip-header {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: 110px 1fr 110px;
    padding: 34px 0 16px;
    text-align: center;
}

.ics-slip-logo {
    height: 82px;
    object-fit: contain;
    width: 82px;
    justify-self: center;
}

.ics-slip-header .deped-title {
    font-family: "Times New Roman", serif;
    font-size: 17px;
    font-weight: 700;
}

.ics-slip-header h3 {
    font-size: 26px;
    margin: 22px 0 0;
}

.ics-slip-meta {
    border-bottom: 2px solid #000;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.ics-slip-meta div {
    border-top: 1px solid #000;
    display: grid;
    grid-template-columns: max-content 1fr;
    min-height: 38px;
}

.ics-slip-meta div:nth-child(odd) {
    border-right: 1px solid #000;
}

.ics-slip-meta span,
.ics-slip-meta strong {
    align-items: end;
    display: flex;
    padding: 6px 8px;
}

.ics-slip-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.ics-slip-table th,
.ics-slip-table td {
    border: 1px solid #000;
    color: #000;
    font-size: 15px;
    line-height: 1.25;
    padding: 6px;
    vertical-align: top;
    word-break: break-word;
}

.ics-slip-table th {
    background: #c7dba2;
    font-weight: 700;
    text-align: center;
}

.ics-slip-table .ics-body-row td {
    background: #eef5e4;
    height: 270px;
}

.ics-slip-table .ics-serial-row td,
.ics-slip-table .ics-total-row td {
    background: #eef5e4;
    height: 34px;
}

.ics-slip-table .ics-total-label {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}

.ics-slip-note {
    background: #d9e8bd;
    border: 1px solid #000;
    border-top: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    padding: 6px;
}

.ics-slip-info {
    border-collapse: collapse;
    width: 100%;
}

.ics-slip-info td {
    border: 1px solid #000;
    color: #000;
    font-size: 14px;
    height: 28px;
    padding: 3px 6px;
}

.ics-slip-info .label-cell {
    font-weight: 700;
    text-align: right;
    width: 120px;
}

.ics-signatures {
    border-collapse: collapse;
    width: 100%;
}

.ics-signatures td {
    border: 1px solid #000;
    color: #000;
    font-size: 14px;
    height: 42px;
    padding: 4px;
    width: 50%;
}

.ics-signatures .sign-title {
    font-style: italic;
    font-weight: 700;
    vertical-align: top;
}

.ics-signatures .sign-line {
    font-style: italic;
    font-weight: 700;
    height: 48px;
    text-align: center;
    vertical-align: bottom;
}

.icf-report-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: calc(100vh - 220px);
    overflow: auto;
    padding: 14px;
}

.icf-filter-bar {
    align-items: end;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(220px, 1fr)) auto;
    margin-bottom: 14px;
    padding: 12px;
}

.icf-filter-bar label {
    margin: 0;
}

.icf-filter-bar .button {
    min-height: 46px;
    white-space: nowrap;
}

.icf-report {
    background: #fff;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    min-width: 1480px;
}

.icf-annex {
    font-size: 14px;
    text-align: right;
}

.icf-title-block {
    padding: 8px 0 26px;
    text-align: center;
}

.icf-title-block strong,
.icf-title-block h3 {
    display: block;
    font-size: 16px;
    margin: 0;
}

.icf-meta {
    align-items: end;
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 10px;
}

.icf-meta div {
    border-bottom: 1px solid #000;
    min-height: 28px;
}

.icf-meta div:last-child {
    border-bottom: 0;
    text-align: center;
}

.icf-meta span {
    margin-right: 8px;
}

.icf-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.icf-table th,
.icf-table td {
    border: 1px solid #000;
    color: #000;
    font-size: 13px;
    line-height: 1.3;
    padding: 6px 4px;
    vertical-align: middle;
    word-break: break-word;
}

.icf-table th {
    font-size: 14px;
    font-weight: 400;
    text-align: center;
}

.icf-table td {
    min-height: 44px;
}

.icf-table th:nth-child(1) { width: 9%; }
.icf-table th:nth-child(2) { width: 13%; }
.icf-table th:nth-child(3) { width: 6.5%; }
.icf-table th:nth-child(4) { width: 7.5%; }
.icf-table th:nth-child(5) { width: 6.5%; }
.icf-table th:nth-child(6) { width: 6.5%; }
.icf-table th:nth-child(7) { width: 6.5%; }
.icf-table th:nth-child(8) { width: 8.8%; }
.icf-table th:nth-child(9) { width: 9%; }
.icf-table th:nth-child(10) { width: 9%; }
.icf-table th:nth-child(11) { width: 9%; }
.icf-table th:nth-child(12) { width: 9.7%; }

.number-cell {
    text-align: right;
}

.center-cell,
.icf-empty {
    text-align: center;
}

.icf-signatories {
    display: grid;
    gap: 42px;
    grid-template-columns: 1fr 1fr;
    margin-top: 34px;
}

.icf-signatories div {
    display: grid;
    gap: 18px;
}

.icf-signatories span {
    color: #000;
    font-size: 14px;
}

.icf-signatories strong {
    border-bottom: 1px solid #000;
    color: #000;
    display: block;
    font-size: 14px;
    font-weight: 400;
    justify-self: center;
    min-width: 260px;
    text-align: center;
}

.icf-signatories em {
    color: #000;
    font-size: 14px;
    font-style: normal;
    justify-self: center;
}

.records-modal-heading {
    align-items: end;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
}

.records-search {
    display: grid;
    gap: 8px;
}

.records-search span {
    color: var(--ink);
    font-weight: 800;
}

.records-search input {
    margin-bottom: 0;
}

.inventory-records-list {
    max-height: calc(100vh - 260px);
    overflow: auto;
    padding-right: 4px;
}

.records-empty[hidden] {
    display: none;
}

.sticker-tool {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
    margin-bottom: 10px;
}

.sticker-tool label {
    grid-column: 1 / -1;
    width: min(100%, 520px);
}

.sticker-tool .button {
    min-width: 132px;
}

.sticker-select-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 0;
    max-height: 190px;
    overflow: auto;
}

.sticker-select-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    padding: 8px 10px;
}

.sticker-select-row:last-child {
    border-bottom: 0;
}

.sticker-select-row small,
.sticker-select-row strong {
    display: block;
}

.sticker-select-row small {
    color: var(--muted);
    font-size: 12px;
}

.sticker-status {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.sticker-preview-wrap {
    background: #f3f6fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: auto;
    padding: 18px;
}

.sticker-modal-card .sticker-select-list,
.sticker-modal-card .sticker-status,
.sticker-modal-card .sticker-preview-wrap {
    grid-column: 1 / -1;
}

@media (min-width: 1100px) {
    .sticker-modal-card {
        display: grid;
        gap: 12px 18px;
        grid-template-columns: minmax(520px, 0.8fr) minmax(760px, 1.2fr);
    }

    .sticker-modal-card .modal-close {
        grid-column: 2;
        justify-self: end;
    }

    .sticker-modal-card .modal-heading,
    .sticker-modal-card .sticker-tool,
    .sticker-modal-card .sticker-select-list,
    .sticker-modal-card .sticker-status {
        grid-column: 1;
    }

    .sticker-modal-card .sticker-preview-wrap {
        align-self: start;
        grid-column: 2;
        grid-row: 1 / span 5;
        max-height: calc(100vh - 78px);
    }
}

.sticker-sheet {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(248px, 248px));
    justify-content: start;
}

.sticker-print-block {
    background: #fff;
    display: grid;
    width: 248px;
}

.asset-sticker {
    --sticker-bg: #c8dea2;
    --sticker-border: #06933d;
    background: var(--sticker-bg);
    border: 4px solid var(--sticker-border);
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9px;
    padding: 5px;
    width: 100%;
}

.asset-sticker.sticker-green {
    --sticker-bg: #c8dea2;
    --sticker-border: #06a64f;
}

.asset-sticker.sticker-orange {
    --sticker-bg: #f28a21;
    --sticker-border: #d96c00;
}

.asset-sticker.sticker-yellow {
    --sticker-bg: #fff200;
    --sticker-border: #000;
}

.asset-sticker.sticker-peach {
    --sticker-bg: #ffd4b6;
    --sticker-border: #bd6b36;
}

.asset-sticker.sticker-blue {
    --sticker-bg: #bfe8f4;
    --sticker-border: #3d7f92;
}

.sticker-top {
    align-items: center;
    display: grid;
    gap: 5px;
    grid-template-columns: 34px 1fr 34px;
    text-align: center;
}

.sticker-top strong,
.sticker-top span {
    display: block;
}

.sticker-logo {
    background: #fff;
    border: 2px solid #5b6c9f;
    border-radius: 999px;
    height: 32px;
    object-fit: contain;
    padding: 2px;
    width: 32px;
}

.sticker-logo-fallback {
    align-items: center;
    display: flex;
    font-size: 8px;
    font-weight: 800;
    justify-content: center;
}

.sticker-row {
    align-items: center;
    border-bottom: 1px solid #000;
    display: grid;
    gap: 5px;
    grid-template-columns: 82px 1fr;
    min-height: 19px;
}

.sticker-row span {
    font-size: 9px;
}

.sticker-row strong {
    background: rgba(255, 255, 255, 0.65);
    display: block;
    font-size: 9px;
    min-height: 16px;
    padding: 2px 4px;
    text-align: center;
}

.sticker-row-two {
    grid-template-columns: 45px 1fr 24px 1fr;
}

.sticker-row-two strong:first-of-type {
    color: #d60000;
    font-size: 10px;
}

.reinspection-grid {
    border: 1px solid #000;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 6px;
}

.reinspection-grid > * {
    border-bottom: 1px solid #000;
    border-right: 1px solid #000;
    font-size: 8px;
    padding: 1px 3px;
}

.reinspection-grid > *:nth-child(2n) {
    border-right: 0;
}

.sticker-bottom {
    align-items: center;
    border: 1px solid #000;
    border-top: 0;
    display: flex;
    justify-content: center;
    min-height: 18px;
}

.sticker-warning {
    background: #f28a21;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    margin: 8px 0 0;
    padding: 2px 6px;
    text-align: center;
    width: 100%;
}

.inventory-modal-heading {
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 24px 56px 18px 24px;
}

.inventory-modal-heading .eyebrow {
    margin-bottom: 4px;
}

.inventory-modal-card .notice {
    margin: 16px 24px 0;
}

.inventory-modal-card .inventory-form {
    padding: 18px 24px 0;
}

.modal-record-list {
    --modal-list-columns:
        minmax(240px, 1.35fr)
        minmax(98px, 0.45fr)
        minmax(170px, 0.8fr)
        minmax(170px, 0.8fr)
        minmax(140px, 0.65fr)
        minmax(150px, 0.7fr)
        minmax(132px, 0.5fr);
    display: grid;
    gap: 6px;
    padding-bottom: 2px;
}

.modal-record-heading {
    background: #eef3fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #4c5a72;
    display: grid;
    font-size: 11px;
    font-weight: 800;
    gap: 0;
    grid-template-columns: var(--modal-list-columns);
    text-transform: uppercase;
}

.modal-record-heading span {
    border-left: 1px solid var(--line);
    padding: 7px 8px;
}

.modal-record-heading span:first-child {
    border-left: 0;
}

.modal-record {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 0;
    grid-template-columns: var(--modal-list-columns);
    min-height: 54px;
    overflow: hidden;
}

.modal-record-main {
    align-items: center;
    display: contents;
}

.modal-record h3,
.modal-record p {
    margin-bottom: 2px;
}

.modal-record h3 {
    font-size: 15px;
    line-height: 1.2;
}

.modal-record-main > div:first-child {
    align-self: center;
    grid-column: 1;
    padding: 7px 10px;
}

.modal-record .record-metrics {
    align-items: center;
    align-content: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    grid-column: 2;
    justify-content: center;
    justify-self: start;
    padding: 6px 6px;
}

.modal-record .record-metrics span {
    font-size: 12px;
    padding: 3px 8px;
}

.modal-record .record-meta {
    align-items: center;
    background: transparent;
    border-top: 0;
    display: contents;
    padding: 0;
}

.modal-record .record-meta span {
    align-self: stretch;
    align-content: center;
    border-left: 1px solid var(--line);
    display: grid;
    font-size: 12px;
    line-height: 1.2;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 6px 7px;
    white-space: normal;
}

.modal-record .record-meta-spacer {
    display: none;
}

.value-list {
    display: grid;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.value-list li {
    line-height: 1.2;
}

.modal-record .record-details-panel {
    align-self: center;
    border-top: 0;
    grid-column: 7;
    grid-row: 1;
    justify-self: end;
    margin: 0;
    padding: 6px 8px;
}

.modal-record .record-meta + .record-details-panel {
    margin-top: 0;
    padding-left: 0;
}

.modal-record .record-details-panel[open] {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    margin-top: 0;
    padding: 8px 10px 10px;
    width: 100%;
}

.modal-record .record-details-panel summary {
    font-size: 12px;
    min-height: 30px;
    padding: 4px 8px;
    white-space: nowrap;
}

.modal-record .record-details-panel[open] summary {
    margin-left: auto;
    margin-bottom: 8px;
    width: max-content;
}

.modal-record .record-details-panel summary::before {
    font-size: 15px;
    margin-right: 6px;
}

.modal-record .record-details {
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin-top: 8px;
    width: 100%;
}

.detail-record-title {
    color: #123e8a;
    font-size: 13px;
    margin: 10px 0 6px;
}

.modal-record .record-details div {
    min-height: 58px;
    padding: 8px 10px;
}

.modal-record .record-details dt {
    font-size: 10px;
}

.modal-record .record-details dd {
    font-size: 13px;
    line-height: 1.25;
}

.modal-close {
    align-items: center;
    background: #eef3fb;
    border: 1px solid #d4deee;
    border-radius: 999px;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    font-size: 24px;
    height: 34px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
}

.modal-close:hover {
    background: #e2eaf7;
}

.modal-heading {
    padding-right: 42px;
}

.modal-heading h2 {
    font-size: 28px;
    margin-bottom: 4px;
}

.modal-heading p {
    color: var(--muted);
    margin-bottom: 18px;
}

.inventory-form {
    display: grid;
    gap: 16px;
}

fieldset {
    background: #fbfcff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 0;
    padding: 18px;
}

fieldset:hover {
    border-color: #b8c8e3;
}

legend {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #123e8a;
    font-weight: 800;
    padding: 5px 10px;
}

.field-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.field-grid .wide {
    grid-column: span 2;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 4px;
}

.modal-form-actions {
    background: #fff;
    border-top: 1px solid var(--line);
    bottom: 0;
    margin: 0 -24px;
    padding: 14px 24px;
    position: sticky;
}

@media (max-width: 1080px) {
    .field-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .admin-dashboard-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .card-code-upload {
        grid-template-columns: 1fr;
    }

    .modal-upload-form {
        grid-template-columns: 1fr;
    }

    .school-account-form {
        grid-template-columns: 1fr;
    }
}

.modal-upload-form {
    align-items: end;
    grid-template-columns: minmax(320px, 1fr) minmax(190px, auto);
    margin-top: 18px;
}

.modal-upload-form .button {
    width: 100%;
}

@media print {
    @page {
        margin: 8mm;
        size: A4 portrait;
    }

    @page icf-landscape {
        margin: 8mm;
        size: A4 landscape;
    }

    @page ics-portrait {
        margin: 8mm;
        size: A4 portrait;
    }

    html,
    body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.printing-sticker,
    body.printing-icf,
    body.printing-ics,
    body.printing-itr,
    body.printing-ris,
    body.printing-cri,
    body.printing-stock-card,
    body.printing-property-card {
        min-width: 0 !important;
        overflow: visible !important;
    }

    body.printing-icf {
        page: icf-landscape;
    }

    body.printing-sticker #sticker-print-area,
    body.printing-ics #ics-print-area,
    body.printing-itr #itr-print-area,
    body.printing-ris #ris-print-area,
    body.printing-cri #cri-print-area,
    body.printing-stock-card #stock-card-report-print-area,
    body.printing-property-card #property-card-report-print-area {
        box-sizing: border-box;
        width: 194mm !important;
    }

    body.printing-icf #icf-print-area {
        box-sizing: border-box;
        width: 281mm !important;
    }

    body.printing-icf table,
    body.printing-ics table,
    body.printing-itr table,
    body.printing-ris table,
    body.printing-cri table,
    body.printing-stock-card table,
    body.printing-property-card table {
        table-layout: fixed;
    }

    body.printing-icf th,
    body.printing-icf td,
    body.printing-ics th,
    body.printing-ics td,
    body.printing-itr th,
    body.printing-itr td,
    body.printing-ris th,
    body.printing-ris td,
    body.printing-cri th,
    body.printing-cri td,
    body.printing-stock-card th,
    body.printing-stock-card td,
    body.printing-property-card th,
    body.printing-property-card td {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    body.printing-sticker * {
        visibility: hidden;
    }

    body.printing-sticker #sticker-print-area,
    body.printing-sticker #sticker-print-area * {
        visibility: visible;
    }

    body.printing-sticker #sticker-print-area {
        background: #fff;
        border: 0;
        left: 0;
        padding: 0;
        position: absolute;
        top: 0;
        width: 100%;
    }

    body.printing-sticker .sticker-sheet {
        display: grid;
        gap: 4mm;
        grid-template-columns: repeat(3, 62mm);
        justify-content: start;
        width: 194mm;
    }

    body.printing-sticker .sticker-print-block {
        break-inside: avoid;
        page-break-inside: avoid;
        width: 62mm;
    }

    body.printing-sticker .asset-sticker {
        border-width: 1.2mm;
        font-size: 7.2pt;
        padding: 1.2mm;
        width: 62mm;
    }

    body.printing-sticker .sticker-warning {
        font-size: 7.2pt;
        margin-top: 1.2mm;
        padding: 0.8mm 1.2mm;
        width: 62mm;
    }

    body.printing-sticker .sticker-top {
        gap: 1mm;
        grid-template-columns: 8mm 1fr 8mm;
    }

    body.printing-sticker .sticker-logo {
        height: 8mm;
        width: 8mm;
    }

    body.printing-sticker .sticker-row {
        gap: 1mm;
        grid-template-columns: 21mm 1fr;
        min-height: 4.8mm;
    }

    body.printing-sticker .sticker-row span,
    body.printing-sticker .sticker-row strong {
        font-size: 6.6pt;
    }

    body.printing-sticker .sticker-row strong {
        min-height: 4mm;
        padding: 0.4mm 1mm;
    }

    body.printing-sticker .sticker-row-two {
        grid-template-columns: 11mm 1fr 7mm 1fr;
    }

    body.printing-sticker .reinspection-grid > * {
        font-size: 5.8pt;
        padding: 0.3mm 0.8mm;
    }

    body.printing-sticker .sticker-bottom {
        min-height: 4.5mm;
    }

    body.printing-sticker .asset-sticker,
    body.printing-sticker .sticker-warning {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.printing-icf * {
        visibility: hidden;
    }

    body.printing-icf #icf-print-area,
    body.printing-icf #icf-print-area * {
        visibility: visible;
    }

    body.printing-icf #icf-print-area {
        border: 0;
        left: 0;
        max-height: none;
        overflow: visible;
        page: icf-landscape;
        padding: 0;
        position: absolute;
        top: 0;
        width: 281mm !important;
    }

    body.printing-icf .icf-report {
        box-sizing: border-box;
        min-width: 0;
        overflow: hidden;
        padding-top: 0;
        width: 100% !important;
    }

    body.printing-icf .icf-table th,
    body.printing-icf .icf-table td {
        font-size: 7.8pt;
        line-height: 1.12;
        padding: 2px;
    }

    body.printing-icf .icf-table th {
        font-size: 7.6pt;
    }

    body.printing-icf .icf-annex,
    body.printing-icf .icf-title-block {
        margin-bottom: 2mm;
    }

    body.printing-icf .icf-title-block {
        padding: 0 0 3mm;
    }

    body.printing-icf .icf-meta {
        margin-bottom: 2mm;
    }

    body.printing-icf .icf-signatories {
        gap: 24mm;
        margin-top: 10mm;
    }

    body.printing-icf .icf-signatories div {
        gap: 4mm;
    }

    body.printing-icf .icf-signatories span,
    body.printing-icf .icf-signatories strong,
    body.printing-icf .icf-signatories em {
        font-size: 9pt;
    }

    body.printing-icf .icf-signatories strong {
        min-width: 58mm;
    }

    body.printing-ics * {
        visibility: hidden;
    }

    body.printing-ics #ics-print-area,
    body.printing-ics #ics-print-area * {
        visibility: visible;
    }

    body.printing-ics #ics-print-area {
        border: 0;
        left: 0;
        max-height: none;
        overflow: visible;
        page: ics-portrait;
        padding: 0;
        position: absolute;
        top: 0;
        width: 194mm !important;
    }

    body.printing-ics .ics-slip {
        box-sizing: border-box;
        max-width: none;
        min-width: 0;
        overflow: visible;
        width: 194mm !important;
    }

    body.printing-ics .ics-slip-table th,
    body.printing-ics .ics-slip-table td,
    body.printing-ics .ics-slip-info td,
    body.printing-ics .ics-signatures td {
        box-sizing: border-box;
        font-size: 7.2pt;
        line-height: 1.08;
        padding: 1px;
    }

    body.printing-ics .ics-slip-table .ics-body-row td {
        height: 38mm;
    }

    body.printing-ics .ics-slip-note {
        font-size: 7.2pt;
        line-height: 1.12;
        padding: 1.5mm 2mm;
    }

    body.printing-ics .ics-slip-header {
        gap: 3mm;
        grid-template-columns: 22mm 1fr 22mm;
        min-height: 22mm;
        padding: 1mm 4mm 2mm;
    }

    body.printing-ics .ics-slip-logo {
        height: 16mm;
        width: 16mm;
    }

    body.printing-ics .ics-appendix {
        padding: 1mm 0;
    }

    body.printing-ics .ics-slip-header h3 {
        font-size: 13pt;
        margin-top: 3mm;
    }

    body.printing-ics .ics-slip-header .deped-title,
    body.printing-ics .ics-slip-header h4 {
        font-size: 9pt;
        margin: 0;
    }

    body.printing-ics .ics-slip-meta div {
        min-height: 6mm;
    }

    body.printing-ics .ics-slip-meta span,
    body.printing-ics .ics-slip-meta strong {
        font-size: 7.2pt;
        padding: 1mm 1.5mm;
    }

    body.printing-ics .ics-slip-info td {
        height: 5.5mm;
    }

    body.printing-ics .ics-signatures td {
        height: 8mm;
    }

    body.printing-ics .ics-signatures .sign-line {
        height: 9mm;
    }

    body.printing-itr * {
        visibility: hidden;
    }

    body.printing-itr #itr-print-area,
    body.printing-itr #itr-print-area * {
        visibility: visible;
    }

    body.printing-itr #itr-print-area {
        border: 0;
        left: 0;
        max-height: none;
        overflow: visible;
        padding: 0;
        position: absolute;
        top: 0;
        width: 100%;
    }

    body.printing-itr .itr-report {
        max-width: none;
        min-width: 0;
        padding: 2mm;
        width: 100%;
    }

    body.printing-itr .itr-header {
        min-height: 32mm;
        padding: 3mm 8mm;
    }

    body.printing-itr .itr-logo {
        height: 18mm;
        width: 18mm;
    }

    body.printing-itr .itr-title {
        font-size: 16pt;
    }

    body.printing-itr .itr-fund-row {
        min-height: 14mm;
    }

    body.printing-itr .itr-table th,
    body.printing-itr .itr-table td,
    body.printing-itr .itr-info td,
    body.printing-itr .itr-signatures td {
        font-size: 7.4pt;
        line-height: 1.12;
        padding: 2px;
    }

    body.printing-itr .itr-table .itr-item-row td {
        height: 12mm;
    }

    body.printing-itr .transfer-type {
        gap: 1.5mm 8mm;
        grid-template-columns: 32mm 48mm 1fr;
        min-height: 24mm;
        padding: 2mm;
    }

    body.printing-itr .transfer-reason {
        font-size: 12pt;
    }

    body.printing-ris * {
        visibility: hidden;
    }

    body.printing-ris #ris-print-area,
    body.printing-ris #ris-print-area * {
        visibility: visible;
    }

    body.printing-ris #ris-print-area {
        border: 0;
        left: 0;
        max-height: none;
        overflow: visible;
        padding: 0;
        position: absolute;
        top: 0;
        width: 100%;
    }

    body.printing-ris .ris-report {
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    body.printing-ris .ris-appendix {
        padding: 2mm 4mm 8mm;
    }

    body.printing-ris .ris-title {
        font-size: 17pt;
        padding-bottom: 14mm;
    }

    body.printing-ris .ris-meta-top {
        min-height: 28mm;
    }

    body.printing-ris .ris-info-left,
    body.printing-ris .ris-info-right {
        grid-template-rows: 10mm 10mm;
    }

    body.printing-ris .ris-info-right div {
        align-content: center;
        gap: 0.5mm;
        justify-items: center;
    }

    body.printing-ris .ris-info-right strong {
        border-bottom-color: #000;
        min-height: 3.8mm;
        width: 70%;
    }

    body.printing-ris .ris-table th,
    body.printing-ris .ris-table td,
    body.printing-ris .ris-signatures td,
    body.printing-ris .ris-signatures th {
        font-size: 7.6pt;
        line-height: 1.12;
        padding: 2px;
    }

    body.printing-ris .ris-table .ris-item-row td {
        height: 12mm;
    }

    body.printing-ris .ris-purpose {
        min-height: 18mm;
    }

    body.printing-ris .ris-history {
        min-height: 10mm;
    }

    body.printing-cri * {
        visibility: hidden;
    }

    body.printing-cri #cri-print-area,
    body.printing-cri #cri-print-area * {
        visibility: visible;
    }

    body.printing-cri #cri-print-area {
        border: 0;
        left: 0;
        max-height: none;
        overflow: visible;
        padding: 0;
        position: absolute;
        top: 0;
        width: 100%;
    }

    body.printing-cri .cri-report {
        max-width: none;
        min-width: 0;
        padding: 0 3mm 3mm;
        width: 100%;
    }

    body.printing-cri .cri-page {
        min-height: auto;
    }

    body.printing-cri .cri-header {
        grid-template-columns: 28mm 1fr 28mm;
        min-height: 34mm;
    }

    body.printing-cri .cri-logo {
        height: 18mm;
        width: 18mm;
    }

    body.printing-cri .cri-header-text div,
    body.printing-cri .cri-header-text strong {
        font-size: 9.5pt;
        line-height: 1.08;
    }

    body.printing-cri .cri-title {
        font-size: 15pt;
        margin: 7mm 0 10mm;
    }

    body.printing-cri .cri-certify {
        font-size: 11.5pt;
        margin-bottom: 12mm;
    }

    body.printing-cri .cri-info-grid {
        gap: 3mm 12mm;
        margin-bottom: 14mm;
    }

    body.printing-cri .cri-info-grid div {
        grid-template-columns: 24mm 1fr;
    }

    body.printing-cri .cri-info-grid span,
    body.printing-cri .cri-info-grid strong {
        font-size: 8.5pt;
        min-height: 6mm;
    }

    body.printing-cri .cri-table th,
    body.printing-cri .cri-table td {
        font-size: 8pt;
        line-height: 1.12;
        padding: 2px;
    }

    body.printing-cri .cri-table th small {
        font-size: 6.7pt;
    }

    body.printing-cri .cri-table .cri-item-row td {
        height: 38mm;
    }

    body.printing-cri .cri-signatures {
        gap: 16mm 18mm;
        margin-top: 10mm;
        min-height: 58mm;
    }

    body.printing-cri .cri-signatures span,
    body.printing-cri .cri-signatures strong,
    body.printing-cri .cri-signatures small,
    body.printing-cri .cri-signatures em {
        font-size: 8.8pt;
    }

    body.printing-cri .cri-signatures span {
        margin-bottom: 5mm;
    }

    body.printing-cri .cri-signatures strong {
        min-height: 6mm;
        padding-bottom: 1mm;
    }

    body.printing-cri .cri-signatures small {
        min-height: 4mm;
    }

    body.printing-cri .cri-signatures em {
        margin-top: 1mm;
    }

    body.printing-stock-card *,
    body.printing-property-card * {
        visibility: hidden;
    }

    body.printing-stock-card #stock-card-report-print-area,
    body.printing-stock-card #stock-card-report-print-area *,
    body.printing-property-card #property-card-report-print-area,
    body.printing-property-card #property-card-report-print-area * {
        visibility: visible;
    }

    body.printing-stock-card #stock-card-report-print-area,
    body.printing-property-card #property-card-report-print-area {
        background: #fff;
        border: 0;
        left: 0;
        max-height: none;
        overflow: visible;
        padding: 0;
        position: absolute;
        top: 0;
        width: 100%;
    }

    body.printing-stock-card .stock-card-report,
    body.printing-property-card .property-card-report {
        margin: 0;
        min-width: 0;
        padding: 0;
        width: 100%;
    }

    body.printing-stock-card .stock-card-page,
    body.printing-property-card .property-card-page {
        min-height: auto;
    }

    body.printing-stock-card .stock-card-appendix,
    body.printing-property-card .property-card-appendix {
        font-size: 11pt;
        padding: 1.5mm 3mm 5mm;
    }

    body.printing-stock-card .stock-card-title,
    body.printing-property-card .property-card-title {
        font-size: 15pt;
        padding-bottom: 8mm;
    }

    body.printing-stock-card .stock-card-table th,
    body.printing-stock-card .stock-card-table td,
    body.printing-stock-card .stock-card-meta td,
    body.printing-property-card .property-card-table th,
    body.printing-property-card .property-card-table td,
    body.printing-property-card .property-card-meta td {
        font-size: 7.5pt;
        line-height: 1.08;
        padding: 2px;
    }

    body.printing-stock-card .stock-card-table td,
    body.printing-property-card .property-card-table td {
        height: 5.5mm;
    }

    body.printing-stock-card .stock-card-meta td,
    body.printing-property-card .property-card-meta td {
        height: 7mm;
    }
}

@media (max-width: 900px) {
    .app-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-form,
    .login-form,
    .search-form-large,
    .record-card-main,
    .audit-card .record-card-main {
        grid-template-columns: 1fr;
    }

    .record-metrics {
        justify-items: start;
    }

    .record-actions,
    .delete-actions {
        justify-content: flex-start;
    }

    .modal-record .record-metrics {
        grid-column: auto;
        justify-content: flex-start;
    }

    .modal-record .record-meta {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .modal-record .record-meta-spacer {
        display: none;
    }

    .modal-record .record-meta + .record-details-panel {
        grid-column: 1 / -1;
        grid-row: auto;
        justify-self: start;
        margin-top: 0;
        padding: 0 10px 8px;
    }

    .modal-record {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .modal-record-heading {
        display: none;
    }

    .modal-record-main {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: 1fr auto;
    }

    .modal-record-main > div:first-child {
        grid-column: 1;
    }

    .modal-record .record-details-panel {
        grid-column: 1 / -1;
        grid-row: auto;
        justify-self: start;
        padding: 0 10px 8px;
    }

    .inventory-modal-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .records-modal-heading {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .ics-modal-heading,
    .itr-modal-heading,
    .ris-modal-heading,
    .cri-modal-heading,
    .icf-modal-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .itr-report-layout,
    .ris-report-layout,
    .cri-report-layout,
    .ics-report-layout,
    .card-report-layout {
        grid-template-columns: 1fr;
    }

    .itr-report-list,
    .ris-report-list,
    .cri-report-list,
    .ics-report-list,
    .card-report-list {
        max-height: 220px;
    }

    .inventory-records-modal-card {
        width: 96vw;
    }

    .icf-filter-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .layout {
        padding-left: 12px;
        padding-right: 12px;
    }

    .panel,
    fieldset {
        padding: 16px;
    }

    .section-heading,
    .form-actions,
    .header-actions,
    .admin-menu-heading,
    .admin-menu-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .selected-summary {
        grid-template-columns: 1fr;
    }

    .search-actions,
    .quick-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .field-grid .wide {
        grid-column: span 1;
    }

    .sticker-tool {
        grid-template-columns: 1fr;
    }

    .sticker-tool label {
        width: 100%;
    }

    .sticker-sheet {
        grid-template-columns: minmax(0, 1fr);
    }

    .sticker-print-block {
        justify-self: center;
        max-width: 248px;
        width: 100%;
    }

    .asset-sticker,
    .sticker-warning {
        width: 100%;
    }

    .asset-sticker {
        font-size: 12px;
    }

    .item-modal-card {
        padding: 14px;
    }

    .modal-record .record-meta {
        grid-template-columns: 1fr;
    }

    .inventory-modal-heading {
        padding: 20px 50px 16px 16px;
    }

    .inventory-modal-card .notice,
    .inventory-modal-card .inventory-form {
        margin-left: 16px;
        margin-right: 16px;
        padding-left: 0;
        padding-right: 0;
    }

    .modal-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
        margin-left: -16px;
        margin-right: -16px;
    }
}
