:root { font-family: "Segoe UI", system-ui, sans-serif; color: #102534; background: #eef3f6; }
* { box-sizing: border-box; }
body { margin: 0; }
header { background: #0c2939; color: white; }
.bar { max-width: 1120px; margin: auto; padding: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-weight: 750; color: white; font-size: 1.35rem; text-decoration: none; }
.header-menu { position: relative; }
.header-menu .menu-toggle { display: flex; align-items: center; gap: .55rem; padding: .6rem .8rem; border: 1px solid #a8bbc6; border-radius: .4rem; list-style: none; }
.menu-toggle::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 5; width: min(18rem, calc(100vw - 2rem)); max-height: calc(100dvh - 5rem); overflow: auto; padding: .55rem; background: white; color: #102534; border: 1px solid #d0dee5; border-radius: .55rem; box-shadow: 0 10px 30px #0c293926; }
.menu-panel .main-nav { display: grid; gap: .2rem; margin: 0; }
.menu-panel .main-nav a { display: flex; align-items: center; justify-content: space-between; min-height: 42px; background: transparent; }
.menu-panel .main-nav a:hover { background: #eef3f6; }
.menu-panel .main-nav a[aria-current="page"] { background: #096469; color: white; }
.menu-account { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; padding: .6rem .3rem .15rem; border-top: 1px solid #d0dee5; font-size: .85rem; }
main { max-width: 1120px; margin: 1.5rem auto; padding: 0 1rem; }
.login { max-width: 470px; margin-top: 8vh; }
h1 { margin: 0 0 1rem; letter-spacing: -.025em; }
h2 { margin: 0 0 1rem; font-size: 1.25rem; }
h3 { margin: 1.25rem 0 .6rem; font-size: 1rem; }
nav { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
nav a { color: #0a5358; text-decoration: none; background: #dbe9ec; padding: .55rem .85rem; border-radius: .35rem; }
nav a:hover { text-decoration: underline; }
nav a[aria-current="page"] { background: #096469; color: white; }
.section-view { max-width: 760px; }
.stack { display: grid; gap: .85rem; }
section { padding: 1.15rem; background: white; border: 1px solid #d0dee5; border-radius: .6rem; }
label { display: grid; gap: .35rem; font-weight: 600; min-width: 0; }
input, textarea, select, button { font: inherit; }
input, textarea, select { width: 100%; min-width: 0; padding: .55rem; border: 1px solid #a8bbc6; border-radius: .35rem; background: white; color: inherit; }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: .5rem; }
.check input { width: auto; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
button { justify-self: start; padding: .55rem .8rem; border: 1px solid transparent; background: #096469; color: white; border-radius: .35rem; cursor: pointer; font-weight: 600; }
button:hover { filter: brightness(.9); }
.quiet { background: #e6eff2; color: #124451; }
article { margin-top: .8rem; padding: .8rem 0 0; border-top: 1px solid #dce5eb; overflow-wrap: anywhere; }
article p { margin: .25rem 0; color: #395466; }
article small { color: #395466; }
article form { margin-top: .5rem; }
.note { white-space: pre-wrap; }
.photo { display: block; max-width: 100%; max-height: 16rem; margin-top: .65rem; border-radius: .35rem; }
audio { max-width: 100%; margin-top: .35rem; }
summary { cursor: pointer; font-weight: 600; }
.filters { border: 1px solid #d0dee5; border-radius: .45rem; padding: .7rem; }
.filters form { margin-top: .8rem; }
.filter-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .65rem; }
.filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.list-tools { display: grid; gap: .7rem; }
.create-entry summary { display: inline-block; padding: .55rem .8rem; border-radius: .35rem; background: #096469; color: white; }
.create-entry[open] form { margin-top: .8rem; padding: .85rem; background: #f3f7f9; border-radius: .45rem; }
.item-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .65rem; }
.item-heading h2 { margin: 0; font-size: 1.05rem; }
.state-label { display: inline-block; padding: .16rem .45rem; border-radius: .35rem; background: #f0e9db; color: #604918; font-size: .85rem; }
.state-done { background: #dcefe6; color: #15523e; }
.state-new { background: #dfeaf8; color: #214b78; }
.state-danger, .equipment-count, .equipment-alert { background: #fff1ef; color: #852326; }
.equipment-count { border-radius: 1rem; padding: .12rem .4rem; font-weight: 700; }
.equipment-alert { display: inline-block; padding: .45rem .65rem; border-radius: .35rem; font-weight: 600; }
.equipment-row { margin-top: .55rem; }
.equipment-result { position: relative; }
.equipment-result:has(.equipment-report:not([hidden])) > .equipment-row > summary { padding-right: 8.5rem; }
.equipment-report { position: absolute; right: .45rem; top: .27rem; padding: .35rem .55rem; font-size: .85rem; }
.equipment-row > summary > .item-heading { display: inline-flex; }
.equipment-fields { margin: 0; }
.equipment-fields div { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: .6rem; padding: .25rem 0; }
.equipment-fields dt { color: #395466; }
.equipment-fields dd { margin: 0; }
.results-bar, .pagination { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; margin: 1rem 0; }
.results-bar { justify-content: space-between; }
.data-table { overflow-x: auto; }
.data-table table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { padding: .6rem; text-align: left; vertical-align: top; border-bottom: 1px solid #dce5eb; }
.data-table thead, .data-table tbody tr:nth-child(even) { background: #f0f5f7; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .note { min-width: 9rem; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.pagination { justify-content: center; margin-bottom: 0; }
.settlement-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .65rem; margin: 1.2rem 0; }
.settlement-summary div { padding: .75rem; border: 1px solid #d0dee5; border-radius: .45rem; background: #f0f5f7; }
.settlement-summary dt { font-size: .86rem; color: #395466; }
.settlement-summary dd { margin: .2rem 0 0; font-size: 1.12rem; font-weight: 700; overflow-wrap: anywhere; }
.project-progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .7rem; margin: .65rem 0; }
.project-progress { background: #f0f5f7; border-radius: .45rem; padding: .65rem; }
.project-progress-heading { display: flex; justify-content: space-between; gap: .6rem; }
.project-progress progress { display: block; width: 100%; height: .8rem; margin-top: .35rem; accent-color: #096469; }
.project-edit { margin-top: .65rem; }
.project-row { border: 1px solid #d0dee5; border-radius: .45rem; margin-bottom: .45rem; }
.project-row > summary { padding: .65rem .8rem; }
.project-row[open] > summary { background: #f0f5f7; }
.project-body { margin: 0; padding: .65rem .8rem .8rem; }
.financial-line { margin-top: .65rem; padding: .55rem; border-bottom: 1px solid #d0dee5; }
.financial-line summary { font-weight: 500; }
.payroll-table { overflow-x: auto; }
.payroll-table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.payroll-table th, .payroll-table td { padding: .6rem; text-align: right; border-bottom: 1px solid #dce5eb; }
.payroll-table th:first-child { text-align: left; }
.payroll-table td { white-space: nowrap; }
.payroll-table tfoot { font-weight: 700; background: #e6eff2; }
.section-view-wide { max-width: none; }
.approval-date { margin: 1.25rem 0 .45rem; }
.approval-table { overflow: auto; max-height: 64vh; }
.approval-table table { width: 100%; min-width: 62rem; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.approval-table th, .approval-table td { padding: .4rem; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.approval-table thead, .approval-table tbody:nth-of-type(even) { background: #eef3f6; }
.approval-table thead th { position: sticky; top: 0; z-index: 1; background: #e6eff2; box-shadow: 0 1px #d0dee5; }
.approval-table tbody { border-top: 1px solid #d0dee5; }
.approval-table th:nth-child(2) { width: 9rem; }
.approval-table th:nth-child(5), .approval-table th:nth-child(7) { width: 5.5rem; }
.approval-table th:last-child { width: 8rem; }
.approval-table tr.approval-error { background: #fff1ef; }
.recipients { display: grid; gap: .4rem; max-height: 12rem; overflow: auto; }
.status { display: flex; gap: .5rem; }
.status button { flex-shrink: 0; }
.error { color: #852326; background: #fff1ef; border: 1px solid #db9fa2; border-radius: .35rem; padding: .75rem; }
.notice { color: #15523e; background: #dcefe6; border: 1px solid #badbca; border-radius: .35rem; padding: .75rem; }
@media (max-width: 680px) {
    main { margin-top: 1rem; padding-inline: .75rem; }
    section { padding: .85rem; }
    .hour-save { width: 100%; min-height: 48px; }
    .create-entry summary { min-height: 44px; }
    input, select, textarea { font-size: 1rem; }
}
