/* West Estate · Intern styringsside (/intern) — fuldskærm, matcher partnerportalen. */

/* Fuldskærm: fjern tema-margin. */
body.we-fullscreen{ margin:0 !important; padding:0 !important; background:#f6f3ee; }
body.we-fullscreen #wpadminbar{ display:none !important; }
html{ -webkit-text-size-adjust:100%; }

.we-fak *{ box-sizing:border-box; }
.we-fak{
  --creme:#f6f3ee; --paper:#ffffff; --ink:#20242e; --muted:#6f6a79; --soft:#8a8594;
  --blue:#1d4c7e; --blue-d:#16406c; --indigo:#262453; --terra:#b0673a; --terra-d:#95562f;
  --line:#e8e0d2; --line2:#efe9dd; --chip:#f0eadd; --ok:#1f7a4d; --warn:#b0673a; --danger:#b23a3a;
  --shadow:0 1px 2px rgba(31,27,46,.05),0 10px 30px rgba(31,27,46,.05);
  --shadow-sm:0 1px 3px rgba(31,27,46,.08);
  font-family:'Open Sans',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  color:var(--ink); line-height:1.5; -webkit-font-smoothing:antialiased;
}
.we-fak{ background:var(--creme); min-height:100vh; }
.we-fak a{ color:var(--blue); text-decoration:none; }
.we-fak a:hover{ text-decoration:underline; }
.we-fak h1,.we-fak h2,.we-fak h3{ margin:0; font-weight:800; letter-spacing:-.01em; }
.we-fak img{ max-width:100%; }

/* ---------- Login ---------- */
.we-login{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; background:linear-gradient(160deg,#f6f3ee, #efe7da); }
.we-login .card{ background:var(--paper); border:1px solid var(--line); border-radius:22px; box-shadow:var(--shadow); padding:34px 28px; width:100%; max-width:410px; text-align:center; }
.we-login .logo-card{ width:120px; height:120px; margin:0 auto 18px; border:1px solid var(--line); border-radius:20px; display:flex; align-items:center; justify-content:center; padding:16px; box-shadow:var(--shadow-sm); }
.we-login .logo-card img{ max-height:80px; max-width:96px; object-fit:contain; }
.we-login .wordmark{ font-weight:800; font-size:22px; letter-spacing:.14em; color:var(--blue); }
.we-login .tag{ font-size:11px; color:var(--muted); letter-spacing:.18em; text-transform:uppercase; margin-top:16px; }
.we-login h2{ font-size:23px; margin:2px 0 4px; }
.we-login .lead{ color:var(--muted); margin:0 0 20px; }
.we-login form{ text-align:left; }

/* ---------- Inputs ---------- */
.we-field{ margin-bottom:14px; }
.we-field label{ display:block; font-size:13px; font-weight:600; color:var(--muted); margin-bottom:6px; }
.we-input,.we-fak select,.we-fak textarea{
  width:100%; font:inherit; color:var(--ink); background:var(--paper);
  border:1.5px solid var(--line); border-radius:12px; padding:12px 14px; min-height:48px;
  transition:border-color .15s, box-shadow .15s;
}
.we-fak textarea{ min-height:82px; resize:vertical; }
.we-input:focus,.we-fak select:focus,.we-fak textarea:focus{ outline:none; border-color:var(--blue); box-shadow:0 0 0 3px rgba(29,76,126,.12); }

/* ---------- Buttons ---------- */
.we-btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; font:inherit; font-weight:700;
  border:1.5px solid transparent; border-radius:12px; padding:12px 18px; min-height:48px; cursor:pointer; transition:.15s; white-space:nowrap; }
.we-btn:active{ transform:translateY(1px); }
.we-btn svg{ width:1.2em; height:1.2em; flex:none; }
.we-btn-sm{ min-height:38px; padding:7px 12px; border-radius:10px; font-size:13px; }
.we-btn-sm svg{ width:1.05em; height:1.05em; }
.we-btn-primary{ background:var(--blue); color:#fff; }
.we-btn-primary:hover{ background:var(--blue-d); text-decoration:none; }
.we-btn-secondary{ background:var(--paper); color:var(--blue); border-color:var(--line); }
.we-btn-secondary:hover{ border-color:var(--blue); text-decoration:none; }
.we-btn-terra{ background:var(--terra); color:#fff; }
.we-btn-terra:hover{ background:var(--terra-d); text-decoration:none; }
.we-btn-ghost{ background:transparent; color:var(--muted); }
.we-btn-danger{ background:#fff; color:var(--danger); border-color:#e6c3c3; }
.we-btn-block{ width:100%; }
.we-btn[disabled]{ opacity:.55; cursor:default; }

/* ---------- App shell ---------- */
.we-app{ display:flex; min-height:100vh; }
.we-side{ display:none; }
.we-main{ flex:1; min-width:0; padding:0 0 90px; }
.we-mtop{ position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between;
  background:var(--indigo); color:#fff; padding:11px 15px; }
.we-mtop .brand{ display:flex; align-items:center; gap:9px; font-weight:800; letter-spacing:.02em; }
.we-mtop .brand img{ height:26px; background:#fff; border-radius:6px; padding:3px; }
.we-mtop .period{ font-size:12px; opacity:.85; }
.we-wrap{ padding:18px 16px; max-width:1180px; margin:0 auto; }

/* header row */
.we-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.we-head h1{ font-size:22px; }
.we-head .tools{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

/* ---------- Period nav ---------- */
.we-periodbar{ display:inline-flex; align-items:center; gap:6px; background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:5px 6px; box-shadow:var(--shadow-sm); }
.we-periodbar button{ background:var(--chip); border:none; border-radius:9px; width:36px; height:36px; font-size:17px; cursor:pointer; color:var(--blue); }
.we-periodbar button:hover{ background:#e7decd; }
.we-periodbar .lbl{ font-weight:700; font-size:14px; padding:0 6px; min-width:150px; text-align:center; }
.we-periodbar .lbl small{ display:block; font-weight:600; color:var(--muted); font-size:10px; letter-spacing:.04em; text-transform:uppercase; }

/* ---------- KPIs ---------- */
.we-kpis{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:18px; }
.we-kpis3{ display:grid; grid-template-columns:1fr; gap:12px; }
@media(min-width:600px){ .we-kpis3{ grid-template-columns:repeat(3,1fr); } }
.we-kpi{ background:var(--paper); border:1px solid var(--line); border-radius:16px; padding:15px 16px; box-shadow:var(--shadow-sm); }
.we-kpi.soft{ background:var(--creme); border-color:var(--line); }
.we-kpi.soft .val{ color:var(--indigo); }
/* Neutralisér temaets clearfix-pseudoelementer (content:""; display:table),
   der ellers lægger sig som et tomt element i første grid-/flex-celle og
   skubber alle kort én plads til højre. */
.we-kpis::before,.we-kpis::after,
.we-kpis3::before,.we-kpis3::after,
.we-row2::before,.we-row2::after,
.we-row3::before,.we-row3::after,
.we-chips::before,.we-chips::after,
.we-kpi::before,.we-kpi::after{ content:none !important; display:none !important; }
.we-kpi .lbl{ font-size:11px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.we-kpi .val{ font-size:26px; font-weight:800; margin-top:5px; letter-spacing:-.02em; line-height:1.1; }
.we-kpi .sub{ font-size:12px; color:var(--muted); margin-top:3px; }
.we-kpi.indigo{ background:var(--indigo); border-color:var(--indigo); color:#fff; }
.we-kpi.blue{ background:var(--blue); border-color:var(--blue); color:#fff; }
.we-kpi.terra{ background:var(--terra); border-color:var(--terra); color:#fff; }
.we-kpi.indigo .lbl,.we-kpi.blue .lbl,.we-kpi.terra .lbl,
.we-kpi.indigo .sub,.we-kpi.blue .sub,.we-kpi.terra .sub{ color:rgba(255,255,255,.82); }

/* ---------- Panels ---------- */
.we-panel{ background:var(--paper); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-sm); margin-bottom:16px; overflow:hidden; }
.we-panel-h{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 16px; border-bottom:1px solid var(--line2); }
.we-panel-h h2{ font-size:16px; }
.we-panel-b{ padding:16px; }
.we-panel-b.flush{ padding:0; }
.we-sec-title{ font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin:4px 0 10px; }
.we-row2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.we-row3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
@media (max-width:480px){ .we-row3{ grid-template-columns:1fr; } }
.we-count{ background:var(--chip); color:var(--muted); border-radius:999px; font-size:12px; font-weight:700; padding:2px 10px; }

/* ---------- Tables ---------- */
.we-table{ width:100%; border-collapse:collapse; font-size:14px; }
.we-table th{ text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:700; padding:11px 14px; border-bottom:1px solid var(--line); background:var(--line2); }
.we-table td{ padding:12px 14px; border-bottom:1px solid var(--line2); vertical-align:middle; }
.we-table tr:last-child td{ border-bottom:none; }
.we-table tbody tr:hover{ background:#faf7f1; }
.we-table .num{ text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.we-table .rowlink{ cursor:pointer; }
.we-tablewrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }

/* chips */
.we-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.we-chipbtn{ background:var(--chip); border:1.5px solid transparent; color:var(--ink); border-radius:999px; padding:9px 14px; font-weight:600; font-size:14px; cursor:pointer; min-height:40px; }
.we-chipbtn:hover{ background:#e7decd; }
.we-chipbtn.active{ background:var(--blue); color:#fff; }

/* progress (normtid) */
.we-prog{ margin-bottom:14px; }
.we-prog:last-child{ margin-bottom:0; }
.we-prog .top{ display:flex; justify-content:space-between; gap:10px; font-size:14px; margin-bottom:6px; }
.we-prog .top .n{ font-weight:700; }
.we-prog .top .v{ color:var(--muted); font-variant-numeric:tabular-nums; }
.we-bar{ height:12px; background:var(--line2); border-radius:999px; overflow:hidden; }
.we-bar > span{ display:block; height:100%; border-radius:999px; background:var(--blue); transition:width .4s; }
.we-bar > span.full{ background:var(--ok); }
.we-bar > span.over{ background:var(--terra); }
.we-prog .meta{ font-size:12px; color:var(--muted); margin-top:4px; }

/* combo / autocomplete */
.we-combo{ position:relative; }
.we-combo .list{ position:absolute; z-index:40; left:0; right:0; top:calc(100% + 4px); background:var(--paper); border:1px solid var(--line);
  border-radius:12px; box-shadow:var(--shadow); max-height:300px; overflow:auto; }
.we-combo .list button{ display:block; width:100%; text-align:left; background:none; border:none; border-bottom:1px solid var(--line2); padding:11px 14px; cursor:pointer; }
.we-combo .list button:last-child{ border-bottom:none; }
.we-combo .list button.hi,.we-combo .list button:hover{ background:var(--creme); }
.we-combo .list .addr{ font-weight:700; }
.we-combo .list .meta{ display:block; font-size:12px; color:var(--muted); }
.we-combo .list .empty{ padding:12px 14px; color:var(--muted); font-size:14px; }
.we-selected{ display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--creme); border:1.5px solid var(--line); border-radius:12px; padding:12px 14px; margin-bottom:14px; }
.we-selected .t{ font-weight:700; }
.we-selected .c{ font-size:12px; color:var(--muted); }
.we-selected button{ background:var(--paper); border:1px solid var(--line); border-radius:9px; padding:7px 12px; font-weight:600; cursor:pointer; }

/* entries */
.we-day-h{ font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin:14px 2px 8px; }
.we-entry{ background:var(--paper); border:1px solid var(--line); border-radius:14px; padding:13px 14px; margin-bottom:10px; }
.we-entry .top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.we-entry .title{ font-weight:700; }
.we-entry .hrs{ font-weight:800; color:var(--blue); white-space:nowrap; }
.we-entry .who{ font-size:12px; color:var(--muted); margin-top:2px; display:block; }
.we-entry .who a{ color:var(--terra); }
.we-entry .desc{ font-size:14px; color:#453f52; margin-top:6px; }
.we-entry .acts{ display:flex; gap:8px; margin-top:10px; }
.we-entry .lock{ font-size:12px; color:var(--muted); font-style:italic; }

/* badges */
.we-badge{ display:inline-block; font-size:11px; font-weight:700; border-radius:999px; padding:2px 9px; letter-spacing:.02em; }
.we-badge.bill{ background:#e5efe9; color:var(--ok); }
.we-badge.int{ background:var(--chip); color:var(--muted); }
.we-badge.closed{ background:#efe1da; color:var(--terra); }
.we-badge.draft{ background:#eae7f2; color:var(--indigo); }
.we-badge.sent{ background:#dbe9f3; color:var(--blue); }
.we-badge.paid{ background:#e5efe9; color:var(--ok); }
.we-badge.cancelled{ background:#f0e2e2; color:var(--danger); }

/* case cards */
.we-case{ display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:var(--paper); border:1px solid var(--line);
  border-radius:14px; padding:13px 14px; margin-bottom:10px; cursor:pointer; }
.we-case:hover{ border-color:var(--blue); text-decoration:none; }
.we-case .main{ flex:1; min-width:0; }
.we-case .t{ font-weight:700; color:var(--ink); }
.we-case .m{ font-size:12px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.we-case .r{ text-align:right; white-space:nowrap; }
.we-case .r .h{ font-weight:800; color:var(--blue); }
.we-case .r .u{ font-size:12px; color:var(--muted); }

/* billing rows */
.we-billrow{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 0; border-bottom:1px solid var(--line2); }
.we-billrow:last-child{ border-bottom:none; }
.we-billrow .co{ font-weight:700; }
.we-billrow .sub{ font-size:12px; color:var(--muted); }
.we-billrow .amt{ font-weight:800; color:var(--terra); white-space:nowrap; }

/* more links */
.we-links{ display:grid; gap:10px; }
.we-linkrow{ display:flex; align-items:center; gap:12px; background:var(--paper); border:1px solid var(--line); border-radius:14px; padding:14px 16px; font-weight:700; color:var(--ink); cursor:pointer; }
.we-linkrow:hover{ border-color:var(--blue); text-decoration:none; }
.we-linkrow .ic{ width:22px; height:22px; color:var(--blue); flex:none; display:inline-flex; }
.we-linkrow .ic svg{ width:22px; height:22px; }
.we-linkrow .ar{ margin-left:auto; color:var(--muted); }

/* back link */
.we-back{ display:inline-flex; align-items:center; gap:6px; background:none; border:none; color:var(--blue); font-weight:700; cursor:pointer; padding:6px 0; margin-bottom:6px; font-size:14px; }

/* misc */
.we-muted{ color:var(--muted); }
.we-center{ text-align:center; }
.we-mb{ margin-bottom:12px; }
.we-mt{ margin-top:12px; }
.we-maplink{ color:var(--terra); font-weight:600; }
.we-msg{ border-radius:12px; padding:11px 14px; font-size:14px; margin-bottom:12px; }
.we-msg.ok{ background:#e5efe9; color:var(--ok); }
.we-msg.err{ background:#f6e1e1; color:var(--danger); }
.we-msg.info{ background:#eef3f8; color:var(--blue); }

/* spinner + toast */
.we-spinner{ width:18px; height:18px; border:2.5px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; display:inline-block; animation:we-spin .7s linear infinite; }
.we-spinner.dark{ border-color:rgba(29,76,126,.25); border-top-color:var(--blue); }
@keyframes we-spin{ to{ transform:rotate(360deg); } }
.we-toast{ position:fixed; left:50%; bottom:88px; transform:translate(-50%,20px); background:var(--ink); color:#fff; padding:12px 18px; border-radius:12px;
  font-weight:600; z-index:100; opacity:0; transition:.3s; box-shadow:var(--shadow); max-width:90vw; }
.we-toast.show{ opacity:1; transform:translate(-50%,0); }
.we-toast.err{ background:var(--danger); } .we-toast.ok{ background:var(--ok); }

/* ---------- Bottom nav (mobil) ---------- */
.we-bottomnav{ position:fixed; left:0; right:0; bottom:0; z-index:50; display:flex; background:var(--paper); border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom); box-shadow:0 -2px 12px rgba(31,27,46,.06); }
.we-bottomnav a{ flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:8px 2px 6px; color:var(--muted); font-size:10.5px; font-weight:600; cursor:pointer; }
.we-bottomnav a.active{ color:var(--blue); }
.we-bottomnav a:hover{ text-decoration:none; }
.we-bottomnav svg{ width:22px; height:22px; }

/* ---------- Sheet / modal ---------- */
.we-sheet-bg{ position:fixed; inset:0; background:rgba(31,27,46,.5); z-index:80; display:flex; align-items:flex-end; justify-content:center; }
.we-sheet{ background:var(--paper); width:100%; max-width:660px; max-height:92vh; overflow:auto; border-radius:20px 20px 0 0; padding:18px 16px calc(24px + env(safe-area-inset-bottom)); box-shadow:var(--shadow); }
.we-sheet .grab{ width:42px; height:4px; background:var(--line); border-radius:4px; margin:0 auto 14px; }
.we-sheet h2{ font-size:19px; margin-bottom:4px; }

/* ---------- Desktop ---------- */
@media (min-width:920px){
  .we-mtop{ display:none; }
  .we-bottomnav{ display:none; }
  .we-side{ display:flex; flex-direction:column; width:236px; flex:none; background:var(--paper); border-right:1px solid var(--line);
    padding:18px 14px; position:sticky; top:0; height:100vh; overflow:auto; }
  .we-logo-card{ border:1px solid var(--line); border-radius:16px; padding:14px; text-align:center; box-shadow:var(--shadow-sm); }
  .we-logo-card img{ max-height:52px; max-width:150px; object-fit:contain; }
  .we-logo-card .wm{ font-weight:800; font-size:17px; letter-spacing:.12em; color:var(--blue); }
  .we-logo-sub{ text-align:center; font-size:10px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); margin:8px 0 4px; }
  .we-side .menu-label{ font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--soft); margin:14px 6px 6px; }
  .we-nav{ display:flex; flex-direction:column; gap:2px; }
  .we-nav a{ display:flex; align-items:center; gap:11px; color:#41404b; padding:10px 12px; border-radius:11px; font-weight:600; cursor:pointer; font-size:14px; }
  .we-nav a svg{ width:19px; height:19px; flex:none; color:var(--soft); }
  .we-nav a:hover{ background:var(--creme); text-decoration:none; }
  .we-nav a.active{ background:var(--indigo); color:#fff; }
  .we-nav a.active svg{ color:#fff; }
  .we-side .spacer{ flex:1; min-height:14px; }
  .we-contact{ background:var(--creme); border-radius:12px; padding:11px 12px; font-size:12px; color:var(--muted); margin-top:8px; }
  .we-contact .h{ font-weight:700; color:var(--ink); }
  .we-user{ border-top:1px solid var(--line); padding-top:12px; margin-top:12px; }
  .we-user .name{ font-weight:700; }
  .we-user .role{ font-size:12px; color:var(--muted); }
  .we-user a{ font-size:13px; }
  .we-main{ padding-bottom:24px; }
  .we-wrap{ padding:26px 32px; }
  .we-kpis{ grid-template-columns:repeat(4,1fr); }
  .we-sheet-bg{ align-items:center; }
  .we-sheet{ border-radius:20px; }
  .we-row2.wide{ grid-template-columns:1fr 1fr 1fr; }
}
@media (min-width:560px) and (max-width:919px){
  .we-kpis{ grid-template-columns:repeat(4,1fr); }
}

/* ---------- Fakturaredigering (udkast) ---------- */
.we-invtable th.mid,.we-invtable td.mid{ text-align:center; }
.we-invtable td{ vertical-align:middle; }
.we-invtable input.we-input{ margin:0; height:38px; padding:6px 8px; }
.we-invtable .f-desc{ min-width:180px; }
.we-invtable .f-amt{ white-space:nowrap; font-variant-numeric:tabular-nums; }
.we-iconbtn{ background:#fff; border:1px solid var(--line); color:var(--danger); border-radius:8px; width:30px; height:30px; line-height:1; cursor:pointer; font-size:14px; }
.we-iconbtn:hover{ background:#fbeaea; }
.we-invtot{ max-width:340px; margin:14px 0 0 auto; }
.we-invtot .r{ display:flex; justify-content:space-between; padding:6px 2px; font-variant-numeric:tabular-nums; }
.we-invtot .r span:first-child{ color:var(--muted); }
.we-invtot .r.tot{ border-top:2px solid var(--line); margin-top:4px; padding-top:10px; font-weight:800; font-size:17px; }
.we-invtot .r.tot span:first-child{ color:var(--ink); }

/* ---------- PDF-preview i ark ---------- */
.we-sheet.wide{ max-width:900px; }
.we-pdfhead{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.we-pdfwrap{ background:#f0ece4; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.we-pdfframe{ width:100%; height:70vh; border:0; display:block; background:#fff; }

/* ---------- Sag-vælger: grupper + lejemål ---------- */
.we-combo .list .grp{ padding:8px 14px 4px; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--soft); font-weight:800; background:var(--paper); position:sticky; top:0; }
.we-combo .list button.unit{ position:relative; padding-right:104px; }
.we-combo .list .unit .tag{ position:absolute; right:12px; top:50%; transform:translateY(-50%); font-size:11px; font-weight:800; color:var(--terra); background:#f6e9df; border:1px solid #e8cfba; border-radius:999px; padding:3px 9px; white-space:nowrap; }

/* ---------- Arbejdstid: start/slut/pause ---------- */
.we-timerow{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
.we-timerow2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.we-timerow::before,.we-timerow::after,.we-timerow2::before,.we-timerow2::after{ content:none !important; display:none !important; }
.we-timerow2 .tf{ display:flex; flex-direction:column; gap:4px; }
.we-timerow2 .tl{ font-size:12px; color:var(--muted); font-weight:600; }
.we-timerow2 .we-input{ margin:0; }
.we-timerow .tf{ display:flex; flex-direction:column; gap:4px; }
.we-timerow .tl{ font-size:12px; color:var(--muted); font-weight:600; }
.we-timerow .we-input{ margin:0; }
.we-hint{ margin-top:8px; font-size:14px; color:var(--muted); }
.we-hint strong{ color:var(--ink); }
.we-hint.bad{ color:var(--danger); }
.we-hint.warn{ color:var(--terra); background:#f6ede6; border:1px solid #e7d4c6; border-radius:10px; padding:9px 12px; margin-top:0; }
.we-inlinecheck{ display:flex; align-items:center; gap:8px; margin:2px 0 14px; cursor:pointer; font-size:14px; }
.we-inlinecheck input{ width:18px; height:18px; flex:none; }
.we-badge.red{ background:#f0e2e2; color:var(--danger); }
.we-panel-warn{ border:1px solid #e7d4c6; }
.we-panel-warn .we-panel-h h2{ color:var(--terra); }
.we-tmeta{ font-size:12.5px; color:var(--muted); margin:2px 0 0; font-variant-numeric:tabular-nums; }

/* ---------- Vælg sager (opret faktura) ---------- */
.we-checklist{ max-height:46vh; overflow:auto; border:1px solid var(--line); border-radius:12px; }
.we-check{ display:flex; align-items:flex-start; gap:10px; padding:11px 13px; border-bottom:1px solid var(--line2); cursor:pointer; }
.we-check:last-child{ border-bottom:none; }
.we-check:hover{ background:var(--creme); }
.we-check input{ width:20px; height:20px; margin-top:2px; flex:none; }
.we-check .b{ display:flex; flex-direction:column; }
.we-check .t{ font-weight:700; }
.we-check .m{ font-size:12px; color:var(--muted); }

/* ---------- Filupload (bilag) ---------- */
.we-file{ padding:9px 12px; min-height:44px; font-size:13px; }
.we-file::file-selector-button{ font:inherit; font-weight:700; color:var(--blue); background:var(--chip); border:1px solid var(--line); border-radius:8px; padding:6px 10px; margin-right:10px; cursor:pointer; }

/* ---------- Bilag-link i materialeliste ---------- */
.we-bilag-link{ font-size:12px; font-weight:700; color:var(--terra); margin-left:6px; white-space:nowrap; }

/* ---------- Sagsalder ---------- */
.we-age{ display:inline-block; font-size:11px; font-weight:800; border-radius:999px; padding:2px 8px; white-space:nowrap; vertical-align:middle; }
.we-age.ok{ background:#e7f0ea; color:#1f7a4d; }
.we-age.warn{ background:#f6ecd6; color:#8a6a1f; }
.we-age.late{ background:#f6dede; color:#b23a3a; }
.we-case .cage{ margin-top:5px; }

/* ---------- Mobil-finpudsning (telefon) ---------- */
@media (max-width:560px){
  .we-wrap{ padding:16px 13px; }
  .we-head h1{ font-size:20px; }
  /* Stak 2-kolonne-felter på telefon (CVR/e-mail, antal/pris, månedsløn/normtimer, datoer m.m.) */
  .we-row2{ grid-template-columns:1fr; }
  /* Arbejdstid: Start + Slut på række 1, Pause fuld bredde på række 2 */
  .we-timerow{ grid-template-columns:1fr 1fr; }
  .we-timerow .tf:nth-child(3){ grid-column:1 / -1; }
  /* Periodevælger fylder bredden pænt */
  .we-periodbar{ width:100%; justify-content:space-between; }
  .we-periodbar .lbl{ min-width:0; flex:1; }
  /* Handlingsknap-rækker og værktøjer bryder pænt */
  .we-head .tools{ width:100%; }
  /* Fakturaeditorens totaler i fuld bredde */
  .we-invtot{ max-width:none; }
  /* Undgå at brede tabeller sprænger layoutet (scroller i stedet) */
  .we-panel{ overflow:hidden; }
}

/* ===== Syn-modul (overført fra Spring Estate, West Estate-farver) ===== */
/* ---------- Syn (ind-/fraflytningssyn) ---------- */
.we-chipbtn.sm{ min-height:34px; padding:6px 11px; font-size:13px; border-radius:9px; }
.we-inspitem{ border:1px solid var(--line); border-radius:12px; padding:12px 13px; margin-bottom:10px; background:var(--paper); }
.we-inspitem .ii-top{ display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:8px; }
.we-inspitem .we-chips{ flex-wrap:wrap; margin-bottom:8px; }
.we-chipbtn.cond-god.active{ background:#e7eef7; border-color:var(--blue); color:var(--indigo); }
.we-chipbtn.cond-slitage.active{ background:#f6ecd6; border-color:var(--terra); color:var(--terra-d); }
.we-chipbtn.cond-udbedres.active{ background:#f6dede; border-color:var(--danger); color:var(--danger); }
.we-inspitem .ii-note{ min-height:52px; margin-bottom:6px; }
.ii-photos{ display:flex; flex-wrap:wrap; gap:8px; }
.ii-photo{ position:relative; display:inline-block; }
.ii-photo img{ width:76px; height:76px; object-fit:cover; border-radius:10px; border:1px solid var(--line); }
.ii-photo .ph-del{ position:absolute; top:-6px; right:-6px; width:22px; height:22px; border-radius:999px; border:none; background:var(--danger); color:#fff; font-size:12px; cursor:pointer; line-height:1; }
.ii-add-photo{ display:inline-flex; }

/* ---------- Kalender ---------- */
.we-calday{ font-weight:800; font-size:13px; color:var(--indigo); margin:14px 2px 8px; letter-spacing:.01em; }
.we-evrow{ display:flex; align-items:flex-start; gap:12px; padding:12px 14px; border-bottom:1px solid var(--line2); }
.we-evrow:last-child{ border-bottom:none; }
.we-evrow .ev-time{ font-weight:800; font-size:15px; color:var(--ink); min-width:48px; font-variant-numeric:tabular-nums; }
.we-evrow .ev-main{ flex:1; min-width:0; }
.we-evrow .ev-t{ font-size:14px; }
.we-evrow .ev-m{ font-size:12.5px; color:var(--muted); margin-top:3px; }
.we-evrow .ev-acts{ display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
@media(max-width:560px){ .we-evrow{ flex-wrap:wrap; } .we-evrow .ev-acts{ width:100%; justify-content:flex-start; } }

/* ---------- Underskrift ---------- */
.we-sigwrap{ border:1px solid var(--line); border-radius:12px; background:#fbfdfb; padding:6px; }
.we-sigcanvas{ width:100%; height:180px; display:block; touch-action:none; cursor:crosshair; background:repeating-linear-gradient(0deg,transparent,transparent 44px,var(--line2) 44px,var(--line2) 45px); border-radius:8px; }
.we-sig-shown{ margin-bottom:10px; }
.we-sig-shown img{ max-width:220px; max-height:90px; border:1px solid var(--line); border-radius:8px; background:#fff; padding:4px; display:block; margin-bottom:4px; }

/* ---------- Kalender: måned ---------- */
.we-monthnav{ display:flex; align-items:center; justify-content:space-between; margin:10px 2px; }
.we-monthnav .mn-title{ font-weight:800; font-size:16px; color:var(--indigo); text-transform:capitalize; }
.we-monthgrid{ display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.we-monthgrid .mg-head{ text-align:center; font-size:11px; font-weight:800; color:var(--muted); padding:4px 0; text-transform:uppercase; letter-spacing:.03em; }
.mg-cell{ background:#fff; border:1px solid var(--line2); border-radius:8px; min-height:88px; padding:4px; overflow:hidden; }
.mg-cell.empty{ background:transparent; border:none; }
.mg-cell.today{ border-color:var(--blue); box-shadow:0 0 0 1px var(--blue) inset; }
.mg-cell .mg-day{ font-size:12px; font-weight:700; color:var(--ink); margin-bottom:3px; }
.mg-cell.today .mg-day{ color:var(--indigo); }
.mg-evs{ display:flex; flex-direction:column; gap:3px; }
.mg-ev{ display:block; width:100%; text-align:left; border:none; border-radius:5px; padding:2px 5px; font-size:11px; line-height:1.3; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#fff; }
.mg-ev.syn{ background:var(--indigo); }
.mg-ev.frem{ background:var(--blue); }
.mg-ev.andet{ background:var(--muted); }
@media(max-width:560px){ .mg-cell{ min-height:64px; } .mg-ev{ font-size:0; padding:4px; } .mg-ev::before{ content:''; display:block; height:6px; width:100%; border-radius:3px; } }

/* ---------- Syn: forlig / prisberegner ---------- */
.we-switch{ display:flex; align-items:center; gap:10px; cursor:pointer; font-size:14px; }
.we-switch.big{ font-weight:700; font-size:15px; }
.we-switch input[type=checkbox]{ width:20px; height:20px; flex:0 0 auto; accent-color:var(--indigo); }
.we-calc-card{ border:1px solid var(--line); border-left:6px solid #1d4c7e; border-radius:12px; padding:14px 16px; margin-top:12px; background:#eef3f9; }
.we-calc-card.acc-floor{ border-left-color:#1f6f8b; background:#f1f8fb; }
.we-calc-card.acc-clean{ border-left-color:#a5702f; background:#faf6ef; }
.we-calc-card.off{ opacity:.5; border-left-color:#c3ccc6; background:#fafbfa; }
.we-calc-card .cc-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.we-calc-card .cc-top .we-switch{ font-weight:700; font-size:15px; }
.we-calc-card .cc-amt{ font-size:20px; font-weight:800; color:var(--indigo); font-variant-numeric:tabular-nums; white-space:nowrap; }
.we-calc-card .cc-amt.off{ font-size:14px; font-weight:600; color:var(--muted); }
.we-calc-card .cc-rate{ font-size:13px; color:var(--muted); margin:8px 0 6px; }
.we-calc-card .cc-rate .we-rate{ color:var(--ink); font-size:15px; }
.we-calc-card .cc-slide{ display:flex; align-items:center; gap:10px; }
.we-calc-card .cc-lim{ font-size:12px; color:var(--muted); min-width:26px; text-align:center; }
.we-range{ -webkit-appearance:none; appearance:none; flex:1; min-width:120px; height:14px; border-radius:8px; background:#dfe7e1; outline:none; cursor:pointer; }
.we-range::-webkit-slider-thumb{ -webkit-appearance:none; appearance:none; width:30px; height:30px; border-radius:50%; background:#fff; border:5px solid #1d4c7e; box-shadow:0 2px 6px rgba(0,0,0,.3); cursor:pointer; margin-top:0; }
.we-range::-moz-range-thumb{ width:26px; height:26px; border-radius:50%; background:#fff; border:5px solid #1d4c7e; box-shadow:0 2px 6px rgba(0,0,0,.3); cursor:pointer; }
.acc-floor .we-range::-webkit-slider-thumb{ border-color:#1f6f8b; }
.acc-floor .we-range::-moz-range-thumb{ border-color:#1f6f8b; }
.we-range:disabled{ opacity:.55; }
.we-tenant-row{ padding:8px 0; border-top:1px solid var(--line2); }
.we-tenant-row:first-child{ border-top:none; }
.we-tenant-row .tn-del{ margin-top:4px; }
.we-sigslot{ padding:14px 0; border-top:1px solid var(--line2); }
.we-sigslot:first-of-type{ border-top:none; }
.we-sigslot .ss-head{ display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.we-settle-tot{ display:flex; justify-content:space-between; align-items:center; margin-top:14px; padding:12px 14px; background:#eef3ef; border-radius:10px; font-size:15px; }
.we-settle-tot strong{ font-size:18px; color:var(--indigo); font-variant-numeric:tabular-nums; }

/* ============ EKSTRA MODULER: Genudlejning + Istandsættelses-flow ============ */
a.we-adlink{ text-decoration:none; cursor:pointer; }
a.we-adlink:hover{ filter:brightness(.96); text-decoration:underline; }
.we-adnote{ font-size:10.5px; color:var(--muted); margin-top:3px; }
.we-badge.we-kind{ margin-left:6px; text-transform:none; font-weight:600; vertical-align:middle; }

/* ---------- Genudlejning: annonce-status via baggrundsfarve ---------- */
/* Grøn = annonceret (godt). Rød = mangler annoncering (meget rød = mest akut). */
.we-table tr.we-adv-ok{ background:#e4ecf5; }
.we-table tr.we-adv-missing{ background:#f6cccc; }
.we-table tr.we-adv-missing td{ box-shadow:inset 3px 0 0 var(--danger); }
.we-table tr.we-adv-missing td:first-child{ font-weight:700; }
/* Tydelig linje mellem rækker (også på farvede rækker). */
.we-table tr.we-adv-ok td,.we-table tr.we-adv-missing td{ border-bottom:2px solid rgba(30,40,34,.14); }
.we-table tr.we-adv-ok:hover,.we-table tr.we-adv-missing:hover{ filter:brightness(.98); background:inherit; }
/* Ledigt lejemål markeres rødt (tomt = tabt lejeindtægt). */
.we-badge.vacant{ background:var(--danger); color:#fff; text-transform:none; font-weight:800; letter-spacing:.03em; margin-left:6px; }
.we-vactxt{ color:var(--danger); font-weight:700; }
.we-kpi.red{ background:var(--danger); border-color:var(--danger); color:#fff; }
.we-kpi.red .lbl,.we-kpi.red .sub{ color:rgba(255,255,255,.85); }

.we-flowcard{ background:var(--paper); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-sm); padding:16px 18px; margin-bottom:14px; transition:box-shadow .15s; }
.we-flowcard:hover{ box-shadow:var(--shadow); }
.we-flowcard.done{ border-color:var(--blue); background:linear-gradient(0deg,#eef3f9,#fff); }
.fc-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:16px; }
.fc-title .t{ font-weight:800; font-size:16px; color:var(--ink); }
.fc-title .m{ font-size:13px; color:var(--muted); margin-top:2px; }
.fc-dl{ flex:none; text-align:right; display:flex; flex-direction:column; align-items:flex-end; border-radius:12px; padding:7px 12px; min-width:96px; }
.fc-dl .v{ font-weight:800; font-size:14px; line-height:1.1; }
.fc-dl .l{ font-size:10px; text-transform:uppercase; letter-spacing:.04em; opacity:.75; margin-top:2px; }
.fc-dl.ok{ background:#e7eef7; color:var(--indigo); }
.fc-dl.terra{ background:#f6ecd6; color:var(--terra-d); }
.fc-dl.red{ background:#f6dede; color:var(--danger); }
.fc-dl.muted{ background:var(--line2); color:var(--muted); }
/* Trin-stepper: 3 forbundne trin */
.fc-steps{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:0; position:relative; }
.fc-steps::before{ content:""; position:absolute; top:20px; left:16%; right:16%; height:3px; background:var(--line); border-radius:2px; z-index:0; }
.fc-step{ position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; gap:7px; background:none; border:none; font:inherit; cursor:pointer; padding:0 4px; }
.fc-step .dot{ width:40px; height:40px; border-radius:999px; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:15px; background:var(--paper); border:2.5px solid var(--line); color:var(--soft); transition:.18s; }
.fc-step .lbl{ font-size:12px; font-weight:600; color:var(--muted); text-align:center; line-height:1.25; max-width:110px; }
.fc-step:hover .dot{ border-color:var(--blue); color:var(--blue); }
.fc-step.done .dot{ background:var(--blue); border-color:var(--blue); color:#fff; box-shadow:0 2px 6px rgba(29,76,126,.30); }
.fc-step.done .lbl{ color:var(--ink); }
.fc-step:disabled{ opacity:.6; cursor:default; }
.fc-ready{ margin-top:14px; text-align:center; font-weight:800; font-size:14px; color:var(--indigo); background:#e7eef7; border-radius:10px; padding:9px; }
@media(max-width:560px){ .fc-step .lbl{ font-size:11px; } .fc-dl{ min-width:80px; } }

/* ==========================================================================
   Overskrifter i portalen
   Temaet dekorerer overskrifter med en centreret streg (h1::after, 40x3 px i
   sandfarve) og farver dem i temaets blaa. Begge dele hoerer ikke hjemme her.
   Justeringen roeres ikke: .we-head centrerer selv med flex.
   ========================================================================== */
.we-main h1,.we-main h2,.we-main h3,.we-main h4,
.we-side h1,.we-side h2,.we-side h3,
#we-portal-root h1,#we-portal-root h2,#we-portal-root h3,
#we-henv-root h1,#we-henv-root h2,#we-henv-root h3{
  /* Temaets egne regler er mere specifikke, derfor !important. */
  color:#262453 !important;
  font-weight:600 !important;
  letter-spacing:-.02em;
  line-height:1.25;
}
.we-main h1::after,.we-main h2::after,.we-main h3::after,.we-main h4::after,
.we-main h1::before,.we-main h2::before,.we-main h3::before,.we-main h4::before,
.we-side h1::after,.we-side h2::after,.we-side h3::after,
.we-side h1::before,.we-side h2::before,.we-side h3::before,
#we-portal-root h1::after,#we-portal-root h2::after,#we-portal-root h3::after,
#we-portal-root h1::before,#we-portal-root h2::before,#we-portal-root h3::before,
#we-henv-root h1::after,#we-henv-root h2::after,#we-henv-root h3::after,
#we-henv-root h1::before,#we-henv-root h2::before,#we-henv-root h3::before{
  content:none;
  display:none;
  background:none;
  border:none;
}
.we-main .we-head h1{ font-size:21px !important; margin:0 !important; }
@media(max-width:760px){ .we-main .we-head h1{ font-size:19px !important; } }

/* Sagsvaelgerens dropdown svaever over feltet under sig (z-index 40).
   Uden kant og skygge skinner etiketten bagved igennem. */
.we-combo .list{ border:1px solid var(--we-kant,#e6dfd2); border-radius:12px; box-shadow:0 12px 28px -10px rgba(38,36,83,.30), 0 2px 6px rgba(38,36,83,.08); overflow-y:auto; overflow-x:hidden; }
.we-combo .list .grp{ background:#F6F3EE; }

/* Sagsliste: betjening og maerke paa sager uden lejemaal */
.we-sagctrl{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:10px; }
.we-sagctrl select{ width:auto; max-width:none; min-width:160px; }
.we-sagchk{ display:inline-flex; align-items:center; gap:7px; font-size:13.5px; color:var(--text-secondary,#5f5e5a); white-space:nowrap; }
.we-sagchk input{ width:auto; margin:0; }
.we-case.we-sag-uden{ box-shadow:inset 3px 0 0 #B0673A; }
.we-case.we-sag-uden .sub{ color:#B0673A; font-weight:600; }
