:root{font:15px/1.55 system-ui,-apple-system,Segoe UI,sans-serif;color:#1a3542;background:#f1f5f6;--brand:#086960;--line:#dbe5e7;--muted:#607680}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a.button{cursor:pointer;min-height:44px;padding:10px 15px;border:1px solid var(--line);border-radius:9px;background:white;color:#1a3542;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}button:hover,a.button:hover{background:#edf6f3}button.primary,nav button.active{background:var(--brand);color:white;border-color:var(--brand)}button.danger{color:#a33232}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #e0aa35;outline-offset:3px}header{background:#fff;border-bottom:1px solid var(--line);padding:18px 28px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.brand{font-weight:700;letter-spacing:.02em}.brand small{display:block;font-weight:400;color:var(--muted)}.shell{max-width:1300px;margin:auto;display:grid;grid-template-columns:215px 1fr;min-height:calc(100vh - 85px)}nav{padding:24px 14px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:8px}nav button{justify-content:flex-start;background:transparent;border-color:transparent}main{padding:28px;min-width:0}h1{font-size:28px;line-height:1.25;margin:0 0 7px}h2{font-size:18px;margin:0 0 10px}h3{font-size:16px;margin:0 0 5px}p{margin:5px 0}.muted{color:var(--muted)}.eyebrow{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--brand);font-weight:700;margin-bottom:7px}.row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:22px 0}.panel{background:white;border:1px solid var(--line);border-radius:14px;padding:20px;margin:16px 0}.stats .panel{margin:0}.number{font-size:32px;line-height:1.3;font-weight:650;margin:8px 0}.badge{display:inline-block;padding:3px 9px;border-radius:20px;background:#e3f2ed;color:#086960;font-size:12px}.warning{background:#fff2d6;color:#785600}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;margin:14px 0}th,td{padding:12px 10px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}th{color:var(--muted);font-size:12px;font-weight:600}label{display:block;margin:12px 0}label input:not([type=checkbox]),label select,label textarea{display:block;width:100%;padding:11px 12px;border:1px solid #c7d6da;border-radius:8px;background:#fff;color:#1a3542;margin-top:5px;font-size:16px}input[type=checkbox]{width:20px;height:20px;accent-color:var(--brand);vertical-align:middle;margin-right:8px}.login{max-width:420px;margin:9vh auto;padding:28px;background:white;border:1px solid var(--line);border-radius:18px}.full{width:100%}.error{color:#a33232}.empty{padding:28px 0;color:var(--muted)}.field{max-width:680px;margin:auto;padding:22px 18px}.field .panel{margin:14px 0}.check{padding:8px 0}.photo{max-width:100%;max-height:280px;object-fit:contain;border-radius:9px}.hint{font-size:12px;color:var(--muted);margin-top:12px}.sep{border:0;border-top:1px solid var(--line);margin:20px 0}#notice:not(:empty){position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#173e37;color:#fff;padding:13px 20px;border-radius:12px;max-width:92vw;z-index:100;box-shadow:0 4px 24px #0002}.banner{padding:8px 24px;background:#fff3d8;color:#705621;font-size:12px}.subtle{font-size:13px}.item{padding:13px 0;border-bottom:1px solid var(--line)}@media(max-width:800px){.shell{display:block}nav{flex-direction:row;flex-wrap:wrap;padding:12px;border-right:0;border-bottom:1px solid var(--line)}main{padding:20px}.stats{grid-template-columns:1fr 1fr}.grid{grid-template-columns:1fr}}@media(max-width:450px){header{padding:14px 18px}h1{font-size:24px}.stats{grid-template-columns:1fr}.row label{width:100%}.actions button{flex:1}.panel{padding:16px}main{padding:16px}}

#route-days{min-width:0;border:1px solid var(--line);border-radius:9px}
.route-days{display:flex;flex-wrap:wrap;gap:0 12px}
.route-days label{margin:5px 0}

/* IMVP footer V0.2.2 */

    body {display:flex;flex-direction:column;min-height:100vh}
    #app {flex:1}
    .shell {min-height:0}
    .imvp-footer {display:flex;align-items:center;justify-content:center;gap:10px 18px;
        flex-wrap:wrap;padding:15px 20px;border-top:1px solid #dbe5e7;
        background:#fff;color:#36505b;font-size:13px;text-align:center}
    .imvp-footer img {width:108px;height:auto;display:block}
    .imvp-footer .version {font-weight:650;white-space:nowrap}

/* IMVP header V0.2.3 */
header .brand {display:flex;align-items:center;gap:14px}
.imvp-header-logo img,.imvp-login-logo img {display:block;width:108px;height:auto}
.imvp-login-logo {margin:0 0 14px}
@media(max-width:450px){.imvp-header-logo img{width:82px}}

/* IMVP sign-in layout V0.2.4 */
#app:has(.login) {
    position: relative;
    padding: 96px 16px 32px;
}
#app .login {
    margin: 0 auto;
}
.imvp-login-logo {
    position: absolute;
    top: 20px;
    left: 24px;
    margin: 0;
}
.imvp-login-logo img {
    width: 124px;
    height: auto;
}
@media (max-width: 450px) {
    .imvp-login-logo { top: 16px; left: 16px; }
    .imvp-login-logo img { width: 104px; }
}

#table-print {display:none}
@page {size:A4 landscape;margin:10mm}
@media print {
    body:has(#table-print) {display:block;background:white;color:black}
    body:has(#table-print) > :not(#table-print) {display:none!important}
    #table-print {display:block}
    #table-print h1 {font-size:17pt}
    #table-print .table-scroll {overflow:visible}
    #table-print table {width:100%;table-layout:fixed;font-size:9pt}
    #table-print th,#table-print td {padding:4pt;overflow-wrap:anywhere;color:black}
    #table-print thead {display:table-header-group}
    #table-print tr {break-inside:avoid}
}

/* VEL searchable dropdowns */
.search-select {position:relative;display:block;min-width:0}
.search-select-options {position:absolute;z-index:30;width:100%;max-height:16rem;overflow:auto;background:white;color:#1a3542;border:1px solid #c7d6da;border-radius:8px;box-shadow:0 8px 22px #173e3720}
.search-select-option {display:block;padding:8px 12px;overflow-wrap:anywhere;cursor:pointer}
.search-select-option:hover,.search-select-active {background:#e3f2ed}
.search-select-options[hidden],select[hidden] {display:none!important}

.visit-date-warning{color:#a12626;font-weight:650}
.visit-progress{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
.visit-progress strong,.visit-progress span{font-size:1.12em;font-weight:750}
.visit-progress progress{grid-column:1/-1;width:100%;accent-color:#086960}
#activation-field[hidden]{display:none!important}

.visit-card{border-inline-start-width:5px}
.visit-card.visit-complete{background:#edf8f1;border-inline-start-color:#218458}
.visit-card.visit-complete .badge{background:#d2efdf;color:#145638}
.visit-card.visit-pending{background:#fffaf0;border-inline-start-color:#b77711}
.visit-card.visit-pending .badge{background:#ffebc6;color:#754a08}

.agreement-note{white-space:pre-wrap}.agreement-image img{margin-top:10px}

.visit-map{display:block;width:100%;background:#edf3f2;border:1px solid var(--line);border-radius:8px}.panel summary{cursor:pointer;font-weight:700}.panel li:target{background:#e3f2ed}

.module-navigation{margin-bottom:12px}.module-navigation button:disabled{cursor:default}

.report-people{min-width:12rem;border:0;margin:0;padding:0}.report-people legend{padding:0;margin-bottom:6px}
.report-people details{border:1px solid var(--line);background:white;border-radius:8px;padding:10px;max-height:16rem;overflow:auto}
.report-people label{display:flex;align-items:center;gap:8px;margin:6px 0}.report-people input{width:auto;min-height:0}
.report-map-legend{display:flex;flex-wrap:wrap;gap:8px 16px;padding:0;list-style:none}.report-map-legend span{display:inline-block;width:.8em;height:.8em;border-radius:50%;margin-right:.35em}

.agreement-options{max-height:15rem;overflow:auto}.agreement-options label{display:flex;align-items:flex-start;gap:.5rem;margin:.25rem 0}.agreement-options input[type=checkbox]{flex:none;width:auto}

.agreement-tabs{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem}
#agreement-brand-options label[hidden]{display:none}
.agreement-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(16rem,100%),1fr));gap:1rem}
.agreement-gallery img{width:100%;height:12rem;object-fit:contain;background:#f2f5f5}

.agreement-multi{align-self:start;border:1px solid #ccdadd;border-radius:8px;padding:.75rem}.agreement-multi summary{cursor:pointer}.agreement-multi label[hidden]{display:none}.agreement-gallery dd{margin:0 0 .5rem}.agreement-gallery dl{overflow-wrap:anywhere}

#agreement-overview-filters{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:12px}
#agreement-overview-filters .agreement-query,#agreement-overview-filters .agreement-date-range{grid-column:1/-1}
#agreement-overview-filters label{margin:0}
#agreement-overview-filters .agreement-options label{margin:.25rem 0}
#agreement-overview-filters .agreement-multi[open]>label{margin:.75rem 0}
.agreement-date-range,.agreement-export-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.agreement-export-groups{margin:0 0 12px}
.agreement-export-groups .actions{margin-top:.4rem}
@media(max-width:1100px){#agreement-overview-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#agreement-overview-filters,.agreement-date-range,.agreement-export-groups{grid-template-columns:1fr}}

.search-select-options button.search-select-option{display:block;width:100%;min-height:44px;text-align:left;border:0;border-radius:0;background:transparent}.search-select-options button.search-select-option:hover,.search-select-options button.search-select-active{background:#edf6f3}.visit-agreements>summary{cursor:pointer;font-weight:700;padding:.35rem 0}

/* Back Office navigation and form layout */
.backoffice-shell {
    max-width: 1440px;
    grid-template-columns: 240px minmax(0, 1fr);
}
.backoffice-shell nav {gap: 4px}
.backoffice-shell nav > button,
.backoffice-shell nav summary,
.backoffice-shell .nav-children > button {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    text-align: start;
}
.backoffice-shell nav summary {
    cursor: pointer;
    font-weight: 650;
    border-radius: 8px;
}
.backoffice-shell nav summary:hover {background: #e6eeef}
.backoffice-shell .nav-children {
    display: grid;
    gap: 2px;
    margin-inline-start: 12px;
    padding-inline-start: 6px;
    border-inline-start: 1px solid var(--line);
}
.backoffice-shell .nav-children > button {white-space: normal;line-height: 1.3}
.backoffice-shell main > h1 {margin: 0 0 16px}
.backoffice-shell .display-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding-block-end: 12px;
    border-bottom: 1px solid var(--line);
}
.backoffice-shell .display-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-block: 0 14px;
}
.backoffice-shell #task .grid,
.backoffice-shell #second-point-filters .grid {gap: 12px 16px}
.backoffice-shell #task label,
.backoffice-shell #second-point-filters label {margin: 0}
.backoffice-shell #task .assignment-wide {grid-column: 1 / -1}
.backoffice-shell .assignment-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin: 16px 0;
}
.backoffice-shell .assignment-options label {display:flex;align-items:center;gap:7px}
.backoffice-shell #second-point-filters > .actions {margin-bottom: 12px}
@media (max-width:800px){
    .backoffice-shell nav {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
}
@media (max-width:480px){
    .backoffice-shell nav {grid-template-columns:minmax(0,1fr)}
}

header.inbox-header > .row { gap: .55rem; }
header .inbox-button {
    background: #08734e;
    border-color: #08734e;
    color: #fff;
    font-weight: 750;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
header .inbox-button:hover { background: #05593c; }
header .inbox-button:focus-visible, .inbox-tabs button:focus-visible {
    outline: 3px solid #2262a8;
    outline-offset: 3px;
}
.inbox-count { background: #fff; color: #07533b; padding: .02rem .45rem; border-radius: 99px; }
.inbox-wrap { min-width: 0; }
.inbox-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .45rem; margin-bottom: 1rem; }
.inbox-tabs button { min-width: 0; padding-inline: .35rem; font-weight: 650; overflow-wrap: anywhere; }
.inbox-items > .panel { margin-block: .55rem; overflow-wrap: anywhere; }
.inbox-ticket-summary { display: grid; gap: .25rem; }
.inbox-ticket-title { font-weight: 750; }
.inbox-ticket-meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.inbox-items [data-unread="1"] { border-inline-start: 4px solid #08734e; }
.inbox-items figure { margin-inline: 0; }
@media (max-width:600px) {
    header.inbox-header > .row { width: 100%; display: flex; flex-wrap: wrap; }
    header.inbox-header .inbox-button { order: -1; }
}

.operation-title {display:flex;align-items:baseline;gap:.65rem}
.operation-help,.ticket-notifications {position:relative}
.operation-help summary,.ticket-notifications summary {cursor:pointer}
.operation-help p,.ticket-notifications > .panel {
    position:absolute; z-index:5; padding:.75rem; background:#fff; border:1px solid #cbdcd6;
    border-radius:.55rem; box-shadow:0 6px 20px #163a2920;
}
.operation-help p {width:min(18rem,65vw); inset-inline-start:0; margin:0}
.ticket-notifications > .panel {width:min(22rem,75vw); inset-inline-end:0}
.ticket-notifications button {width:100%; text-align:start; margin-bottom:.25rem}
.customer-inbox {margin-block:.5rem 1rem}

.ticket-thread {margin-block:1rem}
.ticket-thread h3 {margin-block:0 .55rem}
.ticket-thread ul {list-style:none;padding:0;margin:0;display:grid;gap:.5rem}
.ticket-thread li {padding:.65rem .8rem;overflow-wrap:anywhere}
.ticket-message {background:#e9f4ee;border-inline-start:4px solid #08734e;border-radius:.5rem}
.ticket-event {color:#435653}
.ticket-message-meta {display:flex;flex-wrap:wrap;gap:.25rem .6rem;align-items:baseline}
.ticket-message-meta span {font-size:.85em;color:#435653}
.ticket-message p,.ticket-event p {white-space:pre-wrap;margin:.35rem 0 0}
.ticket-reply {margin-block:1rem .25rem}
.ticket-nav-count:not([hidden]) {display:inline-block;margin-inline-start:.5rem;background:#a83122;color:#fff;
    border-radius:1rem;padding:.05rem .45rem;font-weight:750;font-size:.85em}
