:root{--primary: #071b40;--ink:#071b40;--muted:#526780;--line:#e7edf5}*{box-sizing:border-box}body{margin:0;background:#f4f7fb;color:var(--ink);font:14px "Segoe UI", Calibri, sans-serif}aside{width:240px;background:#fff;position:fixed;inset:0 auto 0 0;padding:36px 24px;border-right:1px solid var(--line)}.logo{display:flex;align-items:center;gap:12px;font:bold 38px "Segoe UI", Calibri, sans-serif;color:var(--primary)}.logo span{font-size:18px;letter-spacing:2px}.logo small{display:block;font:8px sans-serif;letter-spacing:1.4px;margin-top:6px}.side-label{font-size:10px;letter-spacing:1.8px;color:var(--muted);margin:65px 0 18px}nav button{display:block;width:100%;text-align:left;background:none;border:0;padding:14px 12px;margin:5px 0;color:#526780}nav button.active{background:#e7edf5;color:var(--primary);font-weight:700}.side-bottom{position:absolute;bottom:32px;line-height:1.8}.side-bottom small{color:var(--muted)}.pill{display:inline-block;background:#e7edf5;color:var(--primary);border-radius:20px;font-size:11px;padding:3px 10px;margin-top:12px}main{margin-left:240px;padding:42px 44px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--primary);font-weight:bold}h1{font:700 32px "Segoe UI", Calibri, sans-serif;margin:10px 0}p{color:var(--muted);line-height:1.6}.actions{display:flex;gap:10px;align-items:center}button,select,input{font:inherit;border:1px solid #e7edf5;border-radius:7px;padding:11px 14px;background:white;color:var(--ink)}button{cursor:pointer}#pdf,#confirm,.primary{background:var(--primary);color:white;border:0}button:hover{filter:brightness(.96)}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin:22px 0}.card,.panel{background:white;border:1px solid var(--line);border-radius:12px;padding:24px}.card small{color:var(--muted);font-size:12px}.card strong{display:block;font:700 27px "Segoe UI", Calibri, sans-serif;margin:16px 0 10px}.card:first-child{background:var(--primary);color:white}.card:first-child small{color:#c7d3e2}.note{padding:14px 18px;background:#e7edf5;border-radius:8px;color:#526780;line-height:1.6;font-size:12px;margin:16px 0}.panel{margin-bottom:20px;overflow:auto}h2{font:700 18px "Segoe UI", Calibri, sans-serif;margin:0 0 8px}h3{font:700 14px "Segoe UI", Calibri, sans-serif}.split{display:grid;grid-template-columns:1.6fr 1fr;gap:20px}.chart{height:220px;display:flex;gap:12px;align-items:end;padding:20px 0}.bar-group{flex:1;text-align:center;color:#526780;font-size:10px}.bars{height:165px;display:flex;align-items:end;justify-content:center;gap:4px}.bar{background:#17385f;width:18px;border-radius:4px 4px 0 0;min-height:2px}.bar.prior{background:#c7d3e2}.legend{font-size:11px;color:var(--muted)}table{border-collapse:collapse;width:100%;font-size:12px;margin-top:18px}td,th{padding:13px 10px;border-bottom:1px solid #e7edf5;text-align:right;white-space:nowrap}th{color:var(--muted);font-weight:500;font-size:11px}td:first-child,th:first-child{text-align:left}tr.total{font-weight:bold;background:#f4f7fb}.negative{color:#a34a3b}.positive{color:#17385f}.monthgrid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin:20px 0}.month{border:1px solid var(--line);border-radius:8px;padding:12px;color:var(--muted)}.month.ok{background:#f4f7fb;color:var(--primary)}.month small{display:block;margin-top:5px}footer{font-size:10px;color:#526780;margin:28px 0}dialog{border:0;border-radius:14px;max-width:800px;width:90%;padding:30px}dialog::backdrop{background:#071b4077}label{display:block;margin:18px 0}input[type=file]{display:block;width:100%;margin:10px 0}.stage{display:flex;gap:10px;align-items:center;padding:10px;border-bottom:1px solid var(--line)}.stage span{flex:1}.error{color:#a34a3b}.compact{padding:6px 10px;font-size:11px}.account-list input{padding:6px;width:150px}.big{font:700 30px "Segoe UI", Calibri, sans-serif;margin:20px 0}.empty{color:#9a885b}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}@media(max-width:1000px){aside{width:185px;padding:24px 14px}main{margin-left:185px;padding:26px}.cards{grid-template-columns:repeat(2,1fr)}.split{grid-template-columns:1fr}header{align-items:start;gap:20px}.actions{flex-wrap:wrap}}@media(max-width:650px){aside{position:static;width:100%;padding:18px}.logo{font-size:25px}.side-label,.side-bottom{display:none}nav{display:flex;overflow:auto;margin-top:15px}nav button{white-space:nowrap;width:auto;font-size:12px}main{margin:0;padding:20px}header{display:block}.cards{gap:10px}.card{padding:16px}.card strong{font-size:23px}.monthgrid{grid-template-columns:repeat(3,1fr)}}
.annual-heading{display:flex;justify-content:space-between;align-items:start;gap:20px}.annual-heading label{margin:0;white-space:nowrap}.annual-scroll{overflow:auto;max-height:72vh;border:1px solid var(--line);border-radius:8px}.annual-table{min-width:1550px;margin:0;font-variant-numeric:tabular-nums}.annual-table th,.annual-table td{padding:12px 10px}.annual-table thead th{position:sticky;top:0;background:#f4f7fb;z-index:3}.annual-table th:first-child{position:sticky;left:0;background:white;z-index:2;min-width:310px;max-width:380px;white-space:normal;box-shadow:2px 0 3px #071b400a}.annual-table thead th:first-child{background:#f4f7fb;z-index:4}.annual-table tr.total th{background:#f4f7fb}.annual-table td{min-width:90px}.annual-table .annual-total{font-weight:bold;background:#f4f7fb}.drill{border:0;background:none;font-weight:600;padding:0;text-align:left;border-radius:2px;font-size:12px}.drill:focus-visible{outline:2px solid var(--primary)}.account-detail{color:#526780;background:#f4f7fb}.annual-table .account-detail th{padding-left:25px;background:#f4f7fb;font-weight:400;font-size:11px}.account-code{display:block;color:var(--primary);font-weight:bold;margin-bottom:3px}.detail-empty{font-size:11px;color:var(--muted)}
.modebar{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:10px 15px;margin-bottom:20px;background:#e7edf5;border-radius:8px;font-size:12px}.modebar label{margin:0;display:flex;align-items:center;gap:8px}.modebar span{font-size:11px;color:#526780}.subscription-fields{display:grid;grid-template-columns:repeat(3,1fr);gap:0 20px}.subscription-fields label{font-size:12px;color:#526780}.subscription-fields input{display:block;width:100%;margin-top:8px}.subscription-item{border:1px solid var(--line);padding:18px;border-radius:8px;margin-top:14px}.subscription-item summary{cursor:pointer;line-height:1.9}.subscription-item summary span{display:block;color:#526780;font-size:12px}.subscription-item table{min-width:650px}.subscription-item{overflow:auto}@media(max-width:750px){.subscription-fields{grid-template-columns:1fr}.modebar{align-items:start;flex-direction:column}}

.dep-warning{border-left:4px solid #b87d28;background:#fff8e9} #dep-baseline input{max-width:100%}

.account-sub-scroll{overflow:auto}.account-sub-table{min-width:1000px}.account-sub-table small{display:block;max-width:235px;white-space:normal;color:#526780;margin-top:5px}.account-sub-table input{width:135px}.account-sub-table select{min-width:100px}.account-sub-table td{vertical-align:top}.account-sub-table td:first-child{min-width:200px}.account-sub-table th{white-space:normal}nav button{white-space:normal}
/* Keep navigation and company details in separate, non-overlapping regions. */
@media(min-width:651px){
 aside{display:flex;flex-direction:column;height:100vh;height:100dvh;overflow:hidden;padding-top:28px;padding-bottom:20px}
 aside .logo{flex-shrink:0}
 aside .side-label{flex-shrink:0;margin:28px 0 12px}
 aside nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c7d3e2 transparent;padding-right:4px}
 aside nav button{padding:11px 10px;margin:3px 0;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
 aside .side-bottom{position:static;flex-shrink:0;margin-top:16px;padding-top:12px;border-top:1px solid var(--line);line-height:1.5}
 aside .side-bottom .pill{margin-top:8px}
}
@media(max-width:650px){aside nav{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}aside nav button{flex:0 0 auto;white-space:nowrap;width:auto}}

/* Leave room for the full localized month, four-digit year and calendar icon. */
.account-sub-table input[type="month"]{width:215px;min-width:215px;max-width:none;padding-left:10px;padding-right:10px;font-variant-numeric:tabular-nums}
.account-sub-table td:has(input[type="month"]){min-width:235px}

#local-lock[hidden], #workspace[hidden] { display: none; }
#local-lock { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.lock-card { width: min(100%, 420px); padding: 32px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.lock-card h1 { margin: 28px 0 8px; }
.lock-card label { display: block; margin: 16px 0 6px; }
.lock-card input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
#lock-error { color: #a52424; }
#lock-submit { width: 100%; }

.cash-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 14px 0; }
.cash-form label { display: grid; gap: 5px; margin: 0; }
.cash-form input, .cash-form select { min-width: 0; max-width: 100%; }
.cash-chart { display: block; width: min(100%, 720px); margin: 8px 0 16px; }
.cash-chart line { stroke: #a52424; stroke-dasharray: 4 4; }
.cash-chart polyline { fill: none; stroke: var(--primary); stroke-width: 2; }
.cash-table { overflow-x: auto; margin-bottom: 16px; }
.cash-table table { min-width: 580px; }
.cash-alert { color: #a52424; font-weight: bold; }
.cash-table summary, .cash-table + details summary { cursor: pointer; }
.cash-list { list-style: none; padding: 0; }
.cash-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cash-list li span { flex: 1 1 200px; }

#workspace-home[hidden], #accounting-workspace[hidden], #rental-workspace[hidden] { display: none; }
#workspace-home {
  min-height: 100vh;
  padding: clamp(20px, 4.2vw, 54px) clamp(16px, 5vw, 64px) 24px;
  background: #f7f9fc;
  font-family: "Segoe UI", Calibri, sans-serif;
}
.workspace-shell { max-width: 1120px; margin-inline: auto; }
.workspace-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: clamp(18px, 3.3vw, 34px);
}
.workspace-brand { display: flex; align-items: center; gap: 12px; color: #071b40; }
.workspace-monogram {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 11px;
  background: #071b40;
  color: #eacb88;
  font: 29px "Segoe UI", Calibri, sans-serif;
}
.workspace-brand strong, .workspace-brand small { display: block; letter-spacing: .12em; }
.workspace-brand strong { font-size: 15px; }
.workspace-brand small { margin-top: 3px; color: #17385f; font-size: 9px; }
.workspace-lock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-color: #c7d3e2;
  background: transparent;
  padding: 9px 13px;
}
.workspace-lock svg, .workspace-card svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.workspace-lock svg { width: 16px; height: 16px; }
.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 4px;
  overflow: hidden;
  border-radius: 23px;
  background: radial-gradient(ellipse at 78% 20%, #17385f, transparent 65%), #071b40;
  color: #ffffff;
}
.workspace-intro { padding: clamp(30px, 5.1vw, 70px) 0 clamp(30px, 5.1vw, 70px) clamp(24px, 5.1vw, 70px); }
.workspace-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #eacb88;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}
.workspace-kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }
#workspace-title {
  margin: 15px 0 13px;
  font: 300 clamp(36px, 5.35vw, 72px)/1.02 "Segoe UI", Calibri, sans-serif;
  letter-spacing: -.04em;
}
#workspace-title:focus { outline: none; }
.workspace-intro p { max-width: 285px; margin: 0; color: #e7edf5; font-size: 15px; line-height: 1.55; }
.workspace-architecture { display: block; align-self: end; width: 100%; max-height: 365px; }
.workspace-choice { margin-top: clamp(24px, 4vw, 36px); }
.workspace-choice h2 { margin: 0 0 13px; font: 300 clamp(23px, 3vw, 29px) "Segoe UI", Calibri, sans-serif; }
.workspace-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.workspace-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  min-height: 104px;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid #e7edf5;
  border-radius: 14px;
  background: #ffffff;
  text-align: left;
}
.workspace-card:hover { border-color: #526780; background: #f4f7fb; filter: none; }
.workspace-card:focus-visible, .workspace-lock:focus-visible { outline: 2px solid #17385f; outline-offset: 3px; }
.workspace-card-icon {
  display: grid;
  place-items: center;
  width: clamp(37px, 5vw, 49px);
  aspect-ratio: 1;
  border-radius: 11px;
  background: #e7edf5;
  color: #17385f;
}
.workspace-card[data-workspace="rental"] .workspace-card-icon { background: #f8efd9; color: #6b522b; }
.workspace-card-copy { display: grid; gap: 4px; }
.workspace-card-copy strong { font-size: clamp(16px, 2vw, 20px); line-height: 1.2; }
.workspace-card-copy span { color: #17385f; font-size: 13px; line-height: 1.4; }
.workspace-card-arrow { color: #17385f; }
.workspace-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #e7edf5;
  color: #17385f;
  font-size: 12px;
}
.workspace-footer span { width: 6px; height: 6px; border-radius: 50%; background: #17385f; }
@media (max-width: 680px) {
  .workspace-hero { grid-template-columns: minmax(0, 1fr); }
  .workspace-intro { padding: 26px 24px 0; }
  #workspace-title br { display: none; }
  .workspace-architecture { justify-self: end; height: clamp(120px, 36vw, 200px); width: min(100%, 420px); }
  .workspace-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .workspace-card { min-height: 77px; }
}
.rental-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 16px 0; }
.rental-form label { display: grid; gap: 6px; margin: 0; min-width: min(100%, 170px); }
.rental-form input, .rental-form select { max-width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.rental-form fieldset { border: 1px solid var(--line); border-radius: 6px; max-height: 150px; overflow: auto; }
.rental-form .rental-check { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.rental-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 12px; margin: 16px 0; }
.rental-metrics div { background: #f4f7fb; padding: 12px; border-radius: 8px; }
.rental-metrics strong { display: block; margin-top: 6px; font-size: 18px; }
#rental-review-result { margin: 12px 0; }
.rental-form .rental-field-group { flex: 1 0 100%; min-width: 0; max-height: none; overflow: visible; margin: 0; padding: 8px 14px; }
.rental-field-group .rental-form { margin: 5px 0 8px; }
.rental-field-group p { margin: 4px 0 12px; }
.rental-form .rental-address-fields { min-width: 0; max-height: none; margin: 0; padding: 0; border: 0; }
.rental-meter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  margin: 8px 0;
}
.rental-meter-grid label + label { margin-top: 8px; }
.rental-table { overflow-x: auto; }
.rental-table table { min-width: 740px; }
.rental-table td, .rental-table th { vertical-align: top; }
.rental-table th small { display: block; margin-top: 4px; font-weight: normal; }
.rental-table .actions { flex-wrap: wrap; }
.rental-status { display: inline-block; white-space: nowrap; border-radius: 20px; padding: 3px 8px; background: #e7edf5; }
.rental-status-late { background: #fbe9e7; color: #942a23; }
.rental-status-paid { background: #e7edf5; color: var(--primary); }
.rental-status-partial, .rental-status-due { background: #fbefdb; color: #714500; }
.rental-pay-inline { margin: 8px 0 0; }
.rental-pay-inline[hidden] { display: none; }
.rental-pay-inline input { max-width: 165px; }
.rental-payment-edit { flex: 0 0 100%; }
.rental-building { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.rental-building h3, .rental-building p { margin: 0 0 8px; }
.rental-building .actions { flex-wrap: wrap; }
.rental-contract-group { margin: 10px 0; border: 1px solid #e7edf5; border-radius: 9px; }
.rental-contract-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 8px;
  background: #f4f7fb;
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.rental-contract-group > summary::-webkit-details-marker { display: none; }
.rental-contract-group > summary::after {
  content: "";
  flex: 0 0 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.rental-contract-group > summary:hover { background: #e7edf5; }
.rental-contract-group > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.rental-contract-group[open] > summary { border-bottom: 1px solid #e7edf5; border-radius: 8px 8px 0 0; }
.rental-contract-group[open] > summary::after { transform: rotate(225deg); }
.rental-contract-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  max-width: 1050px;
  padding: 16px;
}
.rental-contract-fields label { min-width: 0; font-weight: 600; }
.rental-contract-fields label :is(input, select, textarea) { width: 100%; min-width: 0; font-weight: 400; }
.rental-contract-fields small { display: block; margin-top: 5px; color: #17385f; line-height: 1.4; }
#rental-historical-review { margin: 0; }
#rental-historical-review p { grid-column: 1 / -1; margin: 0; }
#rental-historical-review button { align-self: end; justify-self: start; }
@media (max-width: 840px) {
  .rental-contract-fields { grid-template-columns: minmax(0, 1fr); }
}
.rental-contract-text { flex: 1 1 275px; }
.rental-contract-text textarea { width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 6px; font: inherit; resize: vertical; }
.rental-contract-preview { margin: 8px 0; padding: 10px 14px; border-radius: 6px; background: #f4f7fb; }
.rental-contract-preview div { display: grid; grid-template-columns: minmax(100px, 155px) 1fr; gap: 8px; padding: 4px 0; }
.rental-contract-preview dt { font-weight: bold; }
.rental-contract-preview dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.rental-form .rental-choices { max-height: none; align-self: stretch; margin: 0; }
.rental-signature-preview { display: block; width: 96px; height: 70px; margin: 4px 0 8px; }
.rental-invoice-preview:not(:empty) { flex-basis: 100%; padding: 10px 14px; border-radius: 6px; background: #f4f7fb; }
.rental-invoice-parts { list-style: none; padding: 0; margin: 6px 0; }
.rental-invoice-parts li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 18px; padding: 4px 0; }
.rental-invoice-parts strong { white-space: nowrap; }

/* Thème de l’espace locatif */
#rental-workspace {
  --primary: #071b40;
  --ink: #071b40;
  --muted: #17385f;
  --line: #e7edf5;
  min-height: 100vh;
  background: #f7f9fc;
  color: var(--ink);
  font-family: "Segoe UI", Calibri, sans-serif;
}
#rental-workspace aside { background: #071b40; border-color: #071b40; padding-inline: 18px; }
#rental-workspace .workspace-brand { flex-shrink: 0; gap: 9px; color: #ffffff; }
#rental-workspace .workspace-monogram { width: 38px; height: 38px; flex-shrink: 0; background: #17385f; }
#rental-workspace .workspace-brand small { color: #c7d3e2; font-size: 8px; letter-spacing: .07em; }
#rental-workspace .side-label { color: #c7d3e2; }
#rental-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: #e7edf5;
}
#rental-nav button:hover { background: #071b40; filter: none; }
#rental-nav button.active { background: #e7edf5; color: #071b40; }
.rental-icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
#rental-workspace main { padding: clamp(20px, 3vw, 44px); }
#rental-workspace .rental-header { gap: 14px; margin-bottom: 24px; }
.rental-header .eyebrow { color: #17385f; }
#rental-view-title { margin: 5px 0 0; font: 300 clamp(29px, 3.3vw, 44px)/1.15 "Segoe UI", Calibri, sans-serif; letter-spacing: -.025em; }
#rental-workspace .actions { flex-wrap: wrap; gap: 8px; }
#rental-workspace .rental-labeled-action { display: inline-flex; align-items: center; gap: 7px; }
#rental-workspace .rental-icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 8px;
  color: #17385f;
}
#rental-workspace .rental-icon-button:is(:hover, [aria-expanded="true"]) { background: #e7edf5; border-color: #8fa0b7; filter: none; }
#rental-workspace .rental-icon-danger { color: #85473b; }
#rental-workspace .rental-icon-danger:hover { background: #faeeea; border-color: #dcb9af; }
#rental-workspace :is(button, input, select, textarea, summary, a, .rental-table):focus-visible { outline: 2px solid #17385f; outline-offset: 2px; }
#rental-nav button:focus-visible { outline-color: #d9a441; }
#rental-workspace :is(button, input, select, textarea):disabled { cursor: default; opacity: .62; }
#rental-workspace .panel { padding: clamp(14px, 2vw, 25px); border-radius: 14px; background: #ffffff; }
#rental-workspace :is(.panel, dialog) h2 { margin: 0 0 10px; font: 300 clamp(21px, 2.15vw, 27px)/1.22 "Segoe UI", Calibri, sans-serif; }
#rental-workspace .panel h3 { font: 600 16px "Segoe UI", Calibri, sans-serif; }
.rental-panel-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 9px 15px; }
#rental-workspace .rental-panel-heading h2 { margin: 0; }
#rental-workspace .rental-panel-heading + p { margin-top: 8px; }
#rental-workspace .rental-building { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f4f7fb; }
#rental-workspace .rental-property-heading { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 7px; max-width: 100%; overflow-wrap: anywhere; }
#rental-workspace .rental-property-heading > span { flex: 0 1 auto; }
#rental-workspace .rental-property-heading .rental-icon { color: var(--primary); }
#rental-workspace .cash-list { margin: 12px 0 4px; }
#rental-workspace .cash-list > li { align-items: center; padding: 9px 0; border-bottom: 1px solid #e7edf5; }
#rental-workspace .cash-list > li:last-child { border-bottom: 0; }
#rental-workspace .cash-list > li > span { min-width: 0; overflow-wrap: anywhere; }
.rental-dpe-badge { display: inline-grid; place-items: center; min-width: 29px; padding: 2px 8px 2px 5px; clip-path: polygon(0 0, 76% 0, 100% 50%, 76% 100%, 0 100%); font-size: 12px; font-weight: 700; line-height: 1.4; }
.rental-dpe-badge[data-grade="A"] { background: #158349; color: #fff; }
.rental-dpe-badge[data-grade="B"] { background: #4c9e49; color: #071b40; }
.rental-dpe-badge[data-grade="C"] { background: #a0be47; color: #071b40; }
.rental-dpe-badge[data-grade="D"] { background: #efd259; color: #071b40; }
.rental-dpe-badge[data-grade="E"] { background: #efae4f; color: #071b40; }
.rental-dpe-badge[data-grade="F"] { background: #ed884b; color: #071b40; }
.rental-dpe-badge[data-grade="G"] { background: #c93638; color: #fff; }
.rental-property-type { padding: 3px 8px; border-radius: 12px; background: #e7edf5; color: #17385f; font-size: 12px; font-weight: 400; }
.rental-property-meta { display: block; margin-top: 4px; color: #17385f; }
#rental-workspace .rental-row-actions { flex-wrap: nowrap; gap: 5px; }
.rental-dashboard-summary {
  margin-bottom: 20px;
  padding: clamp(18px, 3vw, 34px);
  border-radius: 16px;
  background: radial-gradient(ellipse at 92% 5%, #17385f, transparent 65%), #071b40;
  color: #ffffff;
}
.rental-dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.rental-dashboard-heading .eyebrow { color: #d9a441; }
.rental-dashboard-heading h2 { margin: 6px 0 0; font: 300 clamp(25px, 3.4vw, 39px)/1.15 "Segoe UI", Calibri, sans-serif; }
.rental-dashboard-heading > .rental-icon { width: 49px; height: 49px; color: #d9a441; stroke-width: .9; }
#rental-workspace .rental-review-alert {
  border-color: #d9a441;
  border-inline-start: 5px solid #ac7418;
  background: #fff3d8;
  color: #523708;
}
#rental-workspace .rental-review-alert .cash-list > li { border-color: #ecd6a1; }
.rental-review-alert small { display: block; margin-top: 3px; font-size: 13px; }
.rental-review-alert .rental-icon { margin-inline-end: 4px; }
#rental-workspace .rental-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#rental-workspace .rental-metrics > div { min-width: 0; padding: 13px; border: 1px solid #e7edf5; border-radius: 10px; background: #f4f7fb; }
#rental-workspace .rental-metrics strong { font-size: clamp(16px, 2vw, 23px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#rental-workspace .rental-dashboard-summary .rental-metrics > div { border-color: #526780; background: #071b40; }
.rental-dashboard-summary .rental-metrics span { display: flex; align-items: center; gap: 6px; color: #e7edf5; }
.rental-dashboard-summary .rental-metrics .rental-icon { width: 15px; height: 15px; color: #d9a441; }
#rental-workspace .rental-dashboard-summary button { border-color: #8fa0b7; background: #071b40; color: #ffffff; }
#rental-workspace .rental-dashboard-summary button.primary { background: #d9a441; color: #071b40; }
#rental-workspace .rental-dashboard-summary button:focus-visible { outline-color: #d9a441; }
#rental-workspace .rental-form { gap: 14px; }
#rental-workspace .rental-form label { color: #17385f; font-weight: 600; }
#rental-workspace .rental-form :is(input, select, textarea) { min-width: 0; color: var(--ink); font-weight: 400; }
#rental-workspace .rental-form [aria-invalid="true"] { border-color: #b44d36; background: #fff6f2; }
#rental-workspace .rental-field-error { color: #973d29; white-space: pre-line; }
.rental-field-error:empty { display: none; }
#rental-workspace input[type=checkbox] { width: auto; accent-color: var(--primary); }
#rental-workspace .rental-editor-form,
#rental-workspace .rental-editor-form .rental-field-group .rental-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
#rental-workspace .rental-editor-form label { min-width: 0; overflow-wrap: anywhere; }
#rental-workspace .rental-editor-form :is(input:not([type=checkbox]), select, textarea) { width: 100%; }
#rental-workspace .rental-editor-form :is(.rental-field-group, .rental-tenant-picker, .rental-invoice-preview, .actions) { grid-column: 1 / -1; }
#rental-workspace .rental-editor-form > p { grid-column: 1 / -1; margin: 0; }
#rental-workspace .rental-editor-form > button { justify-self: start; }
#rental-workspace .rental-field-group {
  min-width: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f4f7fb;
}
#rental-workspace .rental-field-group legend { padding-inline: 6px; color: #17385f; font-weight: 700; }
#rental-workspace .rental-tenant-select { min-width: 0; }
#rental-workspace .rental-tenant-select > label { display:block; margin-bottom:7px; }
#rental-workspace .rental-tenant-select > small { display:block; margin-top:6px; color:var(--muted); }
#rental-workspace .rental-tenant-picker { position:relative; min-width:0; margin:0; padding:0; border:1px solid #d5dce7; border-radius:8px; background:#fff; }
#rental-workspace .rental-tenant-picker > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 14px; cursor:pointer; list-style:none; }
#rental-workspace .rental-tenant-picker > summary::-webkit-details-marker { display:none; }
#rental-workspace .rental-tenant-picker > summary::after { content:''; width:7px; height:7px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg); flex-shrink:0; margin:0 2px 4px; }
#rental-workspace .rental-tenant-picker[open] > summary::after { transform:rotate(225deg); margin-top:5px; }
#rental-workspace .rental-tenant-picker > summary:focus-visible { outline:2px solid var(--primary); outline-offset:2px; border-radius:7px; }
#rental-workspace .rental-tenant-options { position:absolute; top:calc(100% + 5px); left:0; right:0; z-index:10; max-height:260px; overflow:auto; padding:7px; background:#fff; border:1px solid #d5dce7; border-radius:8px; box-shadow:0 8px 24px #071b4020; }
#rental-workspace .rental-tenant-options .rental-check { padding:9px 7px; margin:0; border-radius:5px; }
#rental-workspace .rental-tenant-options .rental-check:hover { background:#f4f7fb; }
#rental-workspace .rental-foldable-editor > summary { cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:16px; list-style:none; }
#rental-workspace .rental-foldable-editor > summary::-webkit-details-marker { display:none; }
#rental-workspace .rental-foldable-editor > summary h2 { margin:0; }
#rental-workspace .rental-foldable-editor > summary::after { content:'+'; font-size:25px; color:var(--primary); }
#rental-workspace .rental-foldable-editor[open] > summary::after { content:'−'; }
#rental-workspace .rental-foldable-editor[open] > summary { margin-bottom:18px; }
#rental-workspace .rental-foldable-editor > summary:focus-visible { outline:2px solid var(--primary); outline-offset:6px; border-radius:3px; }
#rental-workspace .rental-meter-grid > fieldset { min-width: 0; padding: 8px 10px 11px; border-radius: 8px; background: #ffffff; }
#rental-workspace .rental-invoice-preview:empty { display: none; }
#rental-workspace .rental-invoice-custom { grid-column: 1 / -1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
#rental-workspace .rental-table { border: 1px solid var(--line); border-radius: 9px; }
#rental-workspace .rental-table table { margin: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
#rental-workspace .rental-table thead th { background: #e7edf5; color: #17385f; font-weight: 700; }
#rental-workspace .rental-table :is(td, th) { vertical-align: middle; }
#rental-workspace .rental-table :is(th:first-child, td:first-child) { white-space: normal; }
#rental-workspace .rental-table tbody tr:nth-child(even) { background: #f4f7fb; }
#rental-workspace .rental-table td .actions { justify-content: flex-end; }
#rental-workspace a { color: var(--primary); text-underline-offset: 2px; }
#rental-workspace footer { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 11px; }
#rental-contract-export { color: var(--ink); background: #ffffff; }
#rental-contract-export form > label { font-weight: 600; }
#rental-contract-export input[type=file] { font-weight: 400; }
#rental-contract-checklist:not(:empty) { padding: 11px 13px; border-radius: 8px; background: #e7edf5; }
#rental-contract-checklist.rental-contract-warning:not(:empty) { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #e7a353; border-left: 4px solid #be580c; background: #fff1df; color: #783500; }
.rental-contract-warning > .rental-icon { width: 22px; height: 22px; flex: none; color: #a64408; }
.rental-contract-warning ul { margin: 4px 0 0; padding-left: 18px; }
.rental-contract-warning button { padding: 3px 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.rental-contract-warning button:hover { color: #492000; }
.rental-field-with-help { display: grid; grid-template-columns: minmax(0, max-content) minmax(24px, 1fr); align-items: center; gap: 6px 7px; min-width: 0; }
.rental-field-with-help > label { display: contents; }
.rental-field-with-help > label > :is(input, select, textarea) { grid-area: 2 / 1 / 3 / -1; width: 100%; min-width: 0; }
.rental-field-help { grid-area: 1 / 2; justify-self: start; }
.rental-field-help > summary { display: grid; place-items: center; box-sizing: border-box; width: 24px; height: 24px; padding: 0; border: 1px solid #a8bad0; border-radius: 50%; background: #f0f5fb; color: #214873; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; list-style: none; }
.rental-field-help > summary::-webkit-details-marker { display: none; }
.rental-field-with-help > .rental-field-hint { display: none; grid-column: 1 / -1; margin: 0; padding: 8px 10px; background: #edf4fc; color: #17385f; border-radius: 6px; font-size: .875rem; overflow-wrap: anywhere; }
.rental-field-with-help > .rental-field-help:is([open], :hover, :focus-within) + .rental-field-hint { display: block; }
@media (max-width: 1120px) {
  #rental-workspace .rental-editor-form,
  #rental-workspace .rental-editor-form .rental-field-group .rental-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 870px) {
  #rental-workspace .rental-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  #rental-workspace aside { padding: 14px 14px 10px; }
  #rental-nav { gap: 5px; margin-top: 12px; }
  #rental-nav button { min-height: 38px; padding: 7px 9px; }
  #rental-workspace main { padding: 15px; }
  #rental-workspace .rental-header .actions { margin-top: 10px; }
  #rental-workspace .rental-editor-form,
  #rental-workspace .rental-editor-form .rental-field-group .rental-form { grid-template-columns: minmax(0, 1fr); }
}

#rental-gmail-dialog { max-height: 90vh; overflow-y: auto; color: var(--ink); }
#rental-workspace #rental-gmail-dialog .rental-gmail-form { display: block; }
#rental-gmail-dialog input, #rental-gmail-dialog textarea { width: 100%; }
#rental-gmail-dialog textarea { resize: vertical; font: inherit; line-height: 1.6; padding: 11px 14px; border: 1px solid #e7edf5; border-radius: 7px; color: var(--ink); }
#rental-gmail-dialog .rental-field-group { padding: 16px; }
#rental-gmail-dialog summary { cursor: pointer; font-weight: 600; }
#rental-gmail-dialog ol { padding-left: 22px; line-height: 1.65; }
#rental-gmail-dialog li + li { margin-top: 9px; }
#rental-gmail-dialog code { overflow-wrap: anywhere; }
#rental-gmail-dialog [data-status] { padding: 12px; border-radius: 8px; background: #f4f7fb; overflow-wrap: anywhere; }

.prontera-brand { width: 192px; max-width: 100%; padding: 9px 8px; border-radius: 7px; background: #ffffff; }
.prontera-brand img { display: block; width: 100%; height: 30px; object-fit: contain; }
#local-lock .prontera-brand, #workspace-home .prontera-brand { width: 240px; }
#local-lock .prontera-brand img, #workspace-home .prontera-brand img { height: 38px; }

/* Identité LOCIVO — bleu nuit, or et Calibri, sans ressource distante. */



:root { --primary: #071b40; --gold: #d9a441; --ink: #162841; --muted: #526780; --line: #dce4ef; }
body { font-family: "Segoe UI", Calibri, sans-serif; font-size: 15px; background: #f7f9fc; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, .big, .card strong { font-family: "Segoe UI", Calibri, sans-serif; }
h1, h2 { font-weight: 300; }
.card strong, table, .rental-metrics strong { font-variant-numeric: tabular-nums; }
.prontera-brand { padding: 3px 0; background: transparent; border-radius: 0; }
.prontera-brand img { height: 40px; }
#local-lock .prontera-brand img, #workspace-home .prontera-brand img { height: 49px; }
#rental-workspace aside .prontera-brand, #accounting-workspace aside .prontera-brand { background: #071b40; }
#accounting-workspace aside { background: #071b40; border-color: #19365d; }
#accounting-workspace aside .side-label, #accounting-workspace aside .side-bottom small { color: #b9c8dd; }
#accounting-workspace aside .side-bottom { color: #ffffff; }
#accounting-workspace nav button { color: #dce5f3; border-inline-start: 3px solid transparent; }
#accounting-workspace nav button:hover { background: #17385f; }
#accounting-workspace nav button.active { background: #17385f; color: #ffffff; border-inline-start-color: var(--gold); }
#rental-nav button { border-inline-start: 3px solid transparent; }
#rental-nav button.active { border-inline-start-color: var(--gold); background: #17385f; color: #ffffff; }
.workspace-hero, .rental-dashboard-summary { background: linear-gradient(120deg, #071b40, #17385f); }
.workspace-kicker, .rental-dashboard-heading .eyebrow { color: #eacb88; }
.workspace-hero #workspace-title { font-weight: 300; line-height: 1.1; letter-spacing: -.025em; }
.workspace-card[data-workspace="rental"] .workspace-card-icon { background: #f9efd9; color: #8a6117; }
button.primary, #pdf, #confirm { background: var(--primary); color: #ffffff; }
button.primary:hover, #pdf:hover, #confirm:hover { background: #17385f; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #b88120; outline-offset: 2px; }
th { color: #526780; }
tr.total { background: #edf2f9; }
#rental-view-title:focus { outline: none; }
#title:focus { outline: none; }
.prontera-brand { width: 144px; padding: 8px; background: #ffffff; border-radius: 7px; }
.prontera-brand img { height: auto; aspect-ratio: 4800 / 3220; object-fit: contain; }
#local-lock .prontera-brand { width: 180px; }
#workspace-home .prontera-brand { width: 144px; }
#local-lock .prontera-brand img, #workspace-home .prontera-brand img { height: auto; }
#rental-workspace aside .prontera-brand, #accounting-workspace aside .prontera-brand { background: #ffffff; margin-inline: auto; }
#rental-workspace aside .side-label, #accounting-workspace aside .side-label { margin-top: 24px; }
#accounting-workspace aside { display: flex; flex-direction: column; overflow-y: auto; }
#accounting-workspace aside .side-bottom { position: static; margin-top: 24px; }
.rental-inspection-editor > .panel { overflow: visible; }
.rental-inspection-editor label { display: grid; gap: 6px; }
.rental-inspection-editor textarea { width: 100%; resize: vertical; font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; padding: 9px; }
.rental-inspection-room { margin-block: 18px; padding: 14px; }
.rental-inspection-room > summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.rental-inspection-table { max-width: 100%; overflow-x: auto; }
.rental-inspection-table table { min-width: 690px; table-layout: fixed; }
.rental-inspection-table th, .rental-inspection-table td { text-align: left; white-space: normal; padding: 9px 6px; }
.rental-inspection-table th:nth-child(1) { width: 23%; }
.rental-inspection-table th:nth-child(2) { width: 46%; }
.rental-inspection-table th:nth-child(3) { width: 23%; }
.rental-inspection-table th:nth-child(4) { width: 8%; }
.rental-inspection-table :is(input, select, textarea) { width: 100%; min-width: 0; font: inherit; }
.rental-inspection-table input { padding: 8px; }
@media (max-width: 650px) {
  #rental-workspace aside .prontera-brand, #accounting-workspace aside .prontera-brand { width: 112px; margin-inline: 0; }
}
/* Connexion et suivi des sauvegardes locales vers Google Drive. */
.drive-open { display:inline-flex; align-items:center; gap:.5rem; white-space:nowrap; }
.rental-archive-filter { display:flex; align-items:center; gap:10px; margin:16px 0; }
.rental-archive-badge { display:inline-block; padding:3px 9px; margin-left:10px; border-radius:20px; background:#edf2f9; color:#526780; font-size:12px; }
.drive-open svg { width:21px; height:21px; }
.drive-open.drive-warning { border-color:#d9a441; background:#fff7e8; }
#accounting-workspace header .actions { flex-wrap:wrap; justify-content:flex-end; }
#drive-backup-dialog { width:min(790px, calc(100vw - 32px)); max-height:88vh; padding:28px; color:#071b40; border:1px solid #d5dce7; border-radius:16px; }
#drive-backup-dialog::backdrop { background:rgba(7,27,64,.45); }
#drive-backup-dialog p, #drive-backup-dialog li { line-height:1.5; }
.drive-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.drive-heading h2 { margin:8px 0; }
.drive-summary { padding:18px; border-left:3px solid #d9a441; background:#f4f6fa; border-radius:5px; line-height:1.7; }
.drive-summary strong { display:block; }
.drive-error { color:#9c2424; }
.drive-controls { flex-wrap:wrap; gap:8px; margin:16px 0; }
.drive-setup, .drive-policy { margin:20px 0; padding:16px; border:1px solid #d5dce7; border-radius:9px; }
#drive-backup-dialog summary { cursor:pointer; font-weight:600; }
#drive-backup-dialog h3 { font-size:1.05rem; }
.drive-history { padding-left:20px; }
.drive-history li { margin:8px 0; }
@media(max-width:600px) { #drive-backup-dialog {padding:18px;} .drive-open span {font-size:.85rem;} }
.workspace-card[data-workspace="patrimoine"] .workspace-card-icon { background:#e7edf5; color:#071b40; }
#patrimoine-workspace[hidden] { display:none; }
#patrimoine-workspace { --line:#dbe3ee; }
#patrimoine-workspace main { padding:clamp(20px,3vw,44px); }
#patrimoine-workspace header { gap:16px; flex-wrap:wrap; }
#pat-title { font:300 clamp(28px,3vw,42px) "Segoe UI",Calibri,sans-serif; }
#patrimoine-workspace .actions { flex-wrap:wrap; }
#patrimoine-workspace nav button { display:flex; align-items:center; gap:10px; }
#patrimoine-workspace .rental-icon { width:21px; height:21px; flex-shrink:0; }
#patrimoine-workspace .rental-icon-button { padding:9px; display:inline-flex; }
#patrimoine-workspace .panel { margin-bottom:20px; }
.pat-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin:22px 0; }
.pat-metrics > div { padding:24px; background:#fff; border:1px solid #dbe3ee; border-radius:12px; }
.pat-metrics > div:last-child { background:#071b40; color:#fff; border-bottom:3px solid #d9a441; }
.pat-metrics strong { display:block; font-size:clamp(21px,1.85vw,28px); font-weight:400; margin-top:12px; overflow-wrap:anywhere; }
.pat-metrics > div > span { display:block; min-height:36px; line-height:1.4; }
.pat-metrics small { display:block; margin-top:9px; color:#526780; line-height:1.5; }
.pat-repaid-note { font-size:12px; margin:-8px 0 20px; }
.pat-history-mode .pat-check { display:flex; align-items:center; gap:10px; font-weight:600; }
.pat-history-mode p { margin-bottom:0; font-size:13px; }
.pat-analysis-choice { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:14px; }
.pat-analysis-choice select { max-width:100%; }
.pat-evolution-summary { padding:18px; margin:22px 0; background:#f8fafd; border:1px solid #dbe3ee; border-radius:9px; }
.pat-evolution-values { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:18px 0; }
.pat-evolution-values strong { display:block; margin-top:8px; font-size:22px; font-weight:400; }
@media(max-width:800px) { .pat-evolution-values {grid-template-columns:1fr;} }
@media(min-width:801px) and (max-width:1200px) { .pat-metrics {grid-template-columns:repeat(2,minmax(0,1fr));} }
.pat-heading,.pat-record { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
.pat-record { padding:18px 0; border-bottom:1px solid #e7edf5; }
.pat-record > div:first-child { flex:1; min-width:160px; }
.pat-record p { margin:7px 0; }
.pat-ownership-history { list-style:none; padding:0; margin:12px 0 0; }
.pat-ownership-history li { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:8px 0; border-bottom:1px solid #e7edf5; }
.pat-ownership-history li > span { flex:1; min-width:170px; }
.pat-ownership-history button:disabled { opacity:.4; cursor:not-allowed; }
#pat-history-dialog { width:min(740px,calc(100vw - 32px)); max-height:85vh; padding:26px; border:1px solid #dbe3ee; border-radius:12px; color:#071b40; }
#pat-history-dialog::backdrop { background:#071b4070; }
#pat-history-form > .actions { grid-column:1/-1; }
#pat-history-form .pat-owner-row { margin-top:0; }
.pat-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start; }
.pat-form label { display:block; min-width:0; }
.pat-form label > :is(input,select,textarea) { display:block; width:100%; margin-top:7px; }
.pat-form > :is(fieldset,p), .pat-form .pat-wide { grid-column:1/-1; }
.pat-form fieldset { min-width:0; margin:0; border:1px solid #dbe3ee; padding:18px; border-radius:9px; background:#f8fafd; }
.pat-form legend { padding:0 7px; font-weight:600; }
.pat-form textarea { font:14px/1.6 "Segoe UI",Calibri,sans-serif; resize:vertical; }
.pat-form input[type=file] { max-width:100%; }
.pat-form .pat-check { display:flex; align-items:flex-start; gap:10px; }
.pat-form .pat-check input { width:auto; margin:3px 0; }
.pat-owner-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:12px; align-items:end; margin:12px 0; }
.pat-editor > summary { cursor:pointer; display:flex; align-items:center; justify-content:space-between; list-style:none; }
.pat-editor > summary::-webkit-details-marker { display:none; }
.pat-editor > summary h2 { margin:0; }
.pat-editor > summary::after { content:'+'; font-size:25px; }
.pat-editor[open] > summary { margin-bottom:22px; }
.pat-editor[open] > summary::after { content:'−'; }
.pat-table { overflow:auto; max-height:65vh; }
.pat-table table { min-width:650px; font-size:13px; }
.pat-table :is(td,th) { padding:12px 10px; vertical-align:top; }
.pat-table th { background:#edf2f9; white-space:normal; }
.pat-table td small { display:block; margin-top:5px; }
.pat-warning { color:#8c4b13; }
.pat-chart-wrap { position:relative; margin:22px 0 8px; }
.pat-chart-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
.pat-chart { display:block; width:100%; min-width:640px; height:auto; touch-action:pan-y; }
.pat-chart text { font:12px "Segoe UI",Calibri,sans-serif; fill:#526780; }
.pat-chart-point { cursor:crosshair; outline:none; }
.pat-chart-hit { pointer-events:all; }
.pat-chart-point.is-active .pat-chart-dot { stroke:#d9a441; stroke-width:4; }
.pat-chart-point:focus-visible .pat-chart-hit { stroke:#071b40; stroke-width:1; stroke-dasharray:3 3; }
.pat-chart-tooltip { position:absolute; z-index:5; width:290px; max-width:calc(100% - 16px); padding:15px 17px; border:1px solid #dbe3ee; border-top:3px solid #d9a441; border-radius:9px; box-shadow:0 8px 24px #071b4020; background:#fff; color:#071b40; pointer-events:none; font-size:13px; }
.pat-chart-tooltip[hidden] { display:none; }
.pat-chart-tooltip > strong { display:block; font-size:16px; margin-bottom:12px; }
.pat-chart-tooltip dl { margin:0; }
.pat-chart-tooltip dl > div { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-top:9px; }
.pat-chart-tooltip dt { color:#526780; }
.pat-chart-tooltip dd { margin:0; white-space:nowrap; font-weight:600; }
.pat-chart-tooltip .pat-tooltip-net { border-top:1px solid #e7edf5; padding-top:10px; }
.pat-chart-tooltip .pat-tooltip-net dd { color:#071b40; font-size:16px; }
.pat-chart-help { font-size:12px; margin-top:8px; }
@media(max-width:600px) { .pat-chart-tooltip {position:static; width:100%; max-width:none; margin-top:10px;} }
@media(max-width:1050px) and (min-width:651px) { .workspace-cards {grid-template-columns:repeat(2,minmax(0,1fr));} }

.workspace-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
.workspace-card[data-workspace="simulation"] .workspace-card-icon {background:#f9efd9;color:#8a6117;}
#simulation-workspace[hidden]{display:none}
#simulation-workspace{background:#f5f7fa;min-height:100vh}
#simulation-workspace .simulation-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 28px;background:#fff;border-bottom:1px solid #dbe3ee;margin:0}
#simulation-workspace h1{font:300 clamp(28px,3vw,42px)/1.15 "Segoe UI",Calibri,sans-serif;margin:3px 0 0}
#simulation-workspace .actions{display:flex;flex-wrap:wrap;gap:8px}
#simulation-status:empty{display:none}
#simulation-status{padding:12px 28px;color:#a03020}
#simulation-frame{display:block;width:100%;height:calc(100vh - 98px);min-height:600px;border:0;background:#f5f7fa}
.pat-analytic-intro .actions,.pat-analytic-intro .pat-heading{flex-wrap:wrap}
#patrimoine-workspace header label[hidden]{display:none}
.pat-analytic-intro label,#patrimoine-workspace .pat-heading>label{margin:0;min-width:160px}
.pat-analytic-intro select,#patrimoine-workspace .pat-heading>label select{display:block;margin-top:7px;max-width:100%}
.pat-analytic-scroll{overflow-x:auto}
.pat-analytic-scroll table{font-size:13px;min-width:650px}
.pat-analytic-scroll th{white-space:normal}
.pat-analytic-scroll th small,.pat-analytic-accounts th small{display:block;font-weight:400;color:#526780;line-height:1.5;margin-top:5px}
.pat-analytic-accounts{min-width:850px}
.pat-analytic-accounts td:nth-child(3){white-space:normal;min-width:240px;line-height:1.6}
.pat-analytic-accounts th:first-child{min-width:250px;max-width:360px}
.pat-analytic-metrics>div{margin:0}
.pat-analytic-metrics{margin-bottom:20px}
#pat-allocation-dialog{width:min(790px,calc(100vw - 32px));max-height:90vh;overflow-y:auto;color:#071b40;border:1px solid #dbe3ee}
#pat-allocation-dialog h2{font:300 27px "Segoe UI",Calibri,sans-serif}
#pat-allocation-dialog select{display:block;max-width:100%;margin-top:7px}
.pat-investment-option[hidden]{display:none}
.pat-investment-option input{display:block;width:100%;margin:7px 0}
.pat-investment-option small{display:block;font-size:12px;line-height:1.6;color:#526780}
.stage{flex-wrap:wrap}.stage-first-exercise{flex-basis:100%;display:flex;align-items:center;gap:8px;margin:6px 0 0;font-size:12px;line-height:1.5}.stage-first-exercise input{width:auto;margin:0}
.pat-roi-selectors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:18px 0}
.pat-roi-selectors label{margin:0;min-width:0}
.pat-roi-selectors select{display:block;width:100%;margin-top:7px}
.pat-roi-metrics{margin-bottom:20px}
.pat-roi-metrics>div{margin-bottom:0}
.pat-roi-metrics small{min-height:40px}
.pat-roi-metrics>div:last-child small{color:#d4deed}
.rental-payment-gap-preview{grid-column:1/-1;white-space:normal;font-size:13px;color:#805c17;line-height:1.6}
.rental-payment-gap-preview:empty{display:none}
.rental-status-settled{background:#edf2f9;color:#17385f}
.rental-table td>small{display:block;margin-top:4px;color:#526780;line-height:1.4}
#rental-waiver-form{margin-top:15px}
.pat-roi-calculation th{max-width:580px;white-space:normal}
.pat-roi-calculation td{font-variant-numeric:tabular-nums}
@media(max-width:850px){.pat-roi-selectors{grid-template-columns:1fr}.pat-roi-metrics small{min-height:0}}
.pat-allocation-row{display:grid;grid-template-columns:minmax(0,1fr) 170px auto;gap:14px;align-items:end;margin:14px 0}
.pat-allocation-row label{margin:0;min-width:0}
.pat-allocation-row input,.pat-allocation-row select{width:100%;margin-top:7px}
#pat-allocation-dialog .actions{justify-content:flex-end;flex-wrap:wrap}
#pat-allocation-preview{padding:12px 16px;background:#f2f5fa;border-radius:8px}
@media(max-width:650px){.pat-allocation-row{grid-template-columns:minmax(0,1fr) 110px auto;gap:8px}#pat-allocation-dialog{padding:20px}.pat-allocation-row input,.pat-allocation-row select{padding:10px 8px}.pat-analytic-metrics{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.workspace-cards{grid-template-columns:1fr}#simulation-workspace .simulation-header{padding:14px;flex-wrap:wrap}#simulation-frame{height:calc(100vh - 140px)}}
@media(max-width:800px) { .pat-metrics {grid-template-columns:1fr;} .pat-form {grid-template-columns:1fr;} .pat-owner-row {grid-template-columns:minmax(0,1fr) auto;} .pat-owner-row label:first-child {grid-column:1/-1;} }

/* Resale assumptions: the same navy / gold identity as the other property views. */
.pat-sale-intro{border-top:3px solid #d9a441}
.pat-sale-kicker{color:#795918;font-size:.8rem;letter-spacing:.14em;text-transform:uppercase}
.pat-sale-step{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.pat-sale-step>span{display:grid;place-items:center;background:#071b40;color:white;border-radius:50%;width:30px;height:30px;flex-shrink:0}
.pat-sale-step h2{margin:0}
.pat-sale-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:start;margin:16px 0}
#pat-sale-form{display:block}#pat-sale-form>.panel{margin-bottom:20px}
.pat-sale-check{display:flex!important;align-items:center;gap:10px;line-height:1.5;margin:14px 0}
.pat-sale-check input[type=checkbox],.pat-sale-accounts input[type=checkbox]{width:16px;height:16px;flex-shrink:0;margin:0}
.pat-sale-badge{border:1px solid #dce3ed;border-radius:14px;font-size:.85rem;padding:2px 10px;color:#526780}
.pat-sale-property{padding:18px 20px;margin:18px 0;border:1px solid #dce3ed;border-radius:12px;background:#fcfdff}
.pat-sale-property>label{font-size:1.1rem}.pat-sale-property details>summary{padding:10px 0;cursor:pointer;color:#071b40}
.pat-sale-accounts{width:100%}.pat-sale-accounts th{font-weight:400;text-align:left}.pat-sale-accounts td{vertical-align:middle}.pat-sale-accounts input[type=number]{width:125px;min-width:95px}.pat-sale-accounts td:nth-child(2){white-space:nowrap}
.pat-sale-breakdown{width:100%;max-width:950px}.pat-sale-breakdown th{font-weight:400;text-align:left}.pat-sale-breakdown td{text-align:right;white-space:nowrap}.pat-sale-breakdown .total{background:#f3f5f9}.pat-sale-breakdown .total th,.pat-sale-breakdown .total td{font-weight:700}
.pat-sale-metrics small{display:block;line-height:1.5}.pat-sale-sources p{max-width:100ch;line-height:1.65}
@media(max-width:1000px){.pat-sale-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.pat-sale-grid{grid-template-columns:1fr}.pat-sale-property{padding:12px}.pat-sale-check{flex-wrap:wrap}}

.pat-sale-accounts th,.pat-sale-accounts td,.pat-sale-breakdown th,.pat-sale-breakdown td{font-size:14px;line-height:1.55}
.pat-sale-property-body[hidden]{display:none}

/* Rental listing drafts, kept locally before opening the external publication flow. */
#rental-listing-dialog{width:min(950px,calc(100vw - 32px));max-width:950px;max-height:90vh;overflow-y:auto;color:#071b40;padding:28px}
#rental-listing-dialog .rental-panel-heading{display:flex;align-items:start;justify-content:space-between;gap:16px}
#rental-listing-dialog [data-listing-close] svg{transform:rotate(45deg)}
#rental-listing-dialog h2{font:300 27px/1.25 "Segoe UI",Calibri,sans-serif;margin:8px 0}
#rental-listing-dialog summary{font-size:17px;font-weight:600;cursor:pointer;padding:16px 0}
#rental-listing-dialog .listing-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
#rental-listing-dialog label{margin:10px 0;line-height:1.5}
#rental-listing-dialog input,#rental-listing-dialog select,#rental-listing-dialog textarea{display:block;width:100%;margin-top:6px}
#rental-listing-dialog textarea{font:inherit;line-height:1.6;border:1px solid #dce3ed;border-radius:7px;padding:12px;color:#071b40;resize:vertical}
#rental-listing-dialog .listing-preview{border-top:1px solid #e7edf5;margin-top:24px;padding-top:20px}
#rental-listing-dialog .listing-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:18px}
#rental-listing-dialog .listing-open{display:inline-flex;align-items:center;gap:8px;padding:12px 15px;border-radius:7px;background:#071b40;color:white;text-decoration:none}
#rental-listing-dialog [data-listing-status]{min-height:1.5em;color:#17385f;overflow-wrap:anywhere}
@media(max-width:760px){#rental-listing-dialog .listing-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:500px){#rental-listing-dialog{padding:18px}#rental-listing-dialog .listing-grid{grid-template-columns:1fr}}

/* Three locally saved photos for each rental property. */
.rental-photo-editor{grid-column:1/-1}
.rental-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:16px 0}
.rental-photo-card,.rental-photo-empty{min-width:0;border:1px solid #dce3ed;border-radius:10px;overflow:hidden;background:white}
.rental-photo-card img{display:block;width:100%;height:170px;object-fit:contain;background:#f3f5f9}
.rental-photo-caption{display:flex;flex-direction:column;gap:5px;padding:12px}
.rental-photo-caption small{color:#526780}.rental-photo-caption a{color:#17385f}
.rental-photo-card>.actions{padding:0 12px 12px;gap:8px;flex-wrap:wrap}
.rental-photo-empty{min-height:230px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border-style:dashed;background:#fafbfd;color:#526780;text-align:center;padding:16px}
.rental-photo-empty svg{width:28px!important;height:28px!important}
.rental-photo-editor [data-photo-status]{grid-column:1/-1;min-height:1.4em;overflow-wrap:anywhere}
#rental-listing-dialog .rental-listing-photos{margin:24px 0}
@media(max-width:600px){.rental-photo-grid{grid-template-columns:1fr}.rental-photo-empty{min-height:120px}.rental-photo-card img{height:200px}}

.rental-photo-editor [data-photo-replace][hidden]{display:none!important}
