/* Multimaster · Objekt-Maske (shared/objekt.js) – ergänzt mm.css, kontakte.css, akte.css */
.ob{display:flex;flex-direction:column;gap:12px;min-width:0;container-type:inline-size}
.ob-loading{padding:40px;text-align:center}
.ob-top{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.ob-back{all:unset;cursor:pointer;width:36px;height:36px;display:grid;place-items:center;border-radius:6px;border:1px solid var(--stroke-2);background:var(--surface);color:var(--text-2);flex-shrink:0}
.ob-back:hover{color:var(--brand);border-color:var(--brand);background:var(--brand-soft)}
.ob-back svg,.ob-tools .btn svg,.ob-fav svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
.ob-thumb{width:84px;height:60px;border-radius:6px;background:var(--surface-3) center/cover no-repeat;flex-shrink:0;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06)}
.ob-tt{flex:1;min-width:220px}
.ob-crumb{font-size:12px;color:var(--text-3);font-weight:600}
.ob-tt h2{margin:0;font-size:22px;line-height:28px}
.ob-subl{color:var(--text-2);display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ob-tools{display:flex;gap:8px;flex-wrap:wrap}
.ob-tools .btn{height:30px}
.ob-body{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}
.ob-main{background:var(--surface);border:1px solid var(--stroke-3);border-radius:8px;box-shadow:var(--shadow);min-width:0}
.ob-tabs{display:flex;gap:2px;overflow-x:auto;border-bottom:1px solid var(--stroke-3);padding:0 12px;position:sticky;top:0;background:var(--surface);z-index:4;border-radius:8px 8px 0 0;scrollbar-width:thin}
.ob-tabs button{all:unset;cursor:pointer;padding:13px 14px 12px;font-weight:600;color:var(--text-2);white-space:nowrap;position:relative}
.ob-tabs button:hover{color:var(--text)}
.ob-tabs button.active{color:var(--brand)}
.ob-tabs button.active::after{content:'';position:absolute;left:10px;right:10px;bottom:-1px;height:3px;border-radius:2px;background:var(--brand)}
.ob-cnt{display:inline-block;min-width:18px;padding:0 5px;border-radius:9px;background:var(--surface-3);color:var(--text-2);font-size:11px;text-align:center;line-height:18px;margin-left:2px}
.ob-pills{display:flex;gap:6px;flex-wrap:wrap;padding:12px 16px 0}
.ob-pills button{all:unset;cursor:pointer;height:28px;padding:0 14px;border-radius:14px;border:1px solid var(--stroke-2);font-size:13px;font-weight:600;color:var(--text-2);display:inline-flex;align-items:center;background:var(--surface)}
.ob-pills button:hover{background:var(--surface-3);color:var(--text)}
.ob-pills button.active{background:var(--brand);border-color:var(--brand);color:#fff}
.ob-pane{padding:14px 16px 18px;display:flex;flex-direction:column;gap:14px}
.ob-card{border:1px solid var(--stroke-3);border-radius:8px;padding:14px 16px;background:var(--surface)}
.ob-card h3{margin:0 0 12px;font-size:15px}
.ob-card .fgrid3{margin-bottom:6px}
.ob-card textarea{width:100%;font:inherit;line-height:1.5;padding:8px 10px;border:1px solid var(--stroke);border-radius:4px;background:var(--surface);color:var(--text);resize:vertical}
.ob-card > .fl:only-of-type{display:block}
.ob-group h4{margin:2px 0 8px;font-size:13px;color:var(--brand)}
.ob-group + .ob-group{margin-top:8px;padding-top:10px;border-top:1px dashed var(--stroke-3)}
.ob-group .checkgrid{margin-bottom:4px}
.ob-unit{display:flex;align-items:center;position:relative}
.ob-unit input{flex:1;min-width:0;text-align:right;padding-right:34px!important}
.ob-unit i{position:absolute;right:9px;font-style:normal;color:var(--text-3);font-size:12.5px;pointer-events:none}
.ob-akgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px 16px}
/* Wählknopf neben Rufnummern (gleiches Aussehen wie in der Akte) */
.telwrap{display:flex;gap:4px;align-items:center}
.telwrap input{flex:1;min-width:0}
.dialbtn{flex:none;width:32px;height:32px;display:grid;place-items:center;border-radius:4px;color:var(--brand);border:1px solid var(--stroke-2,var(--stroke-3))}
.dialbtn[hidden]{display:none}
.dialbtn:hover{background:var(--brand-soft)}
.dialbtn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
.ob-akrow{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}
.ob-akrow .chkline{height:32px;font-size:12.5px!important;color:var(--text-2)!important}
/* rechte Spalte */
.ob-side{display:flex;flex-direction:column;gap:12px;position:sticky;top:0}
.ob-side .ob-card{box-shadow:var(--shadow);padding:12px 14px}
.ob-side .ob-card h3{font-size:14px;margin-bottom:8px}
.ob-side .fl{margin-bottom:8px}
.ob-saved{display:flex;flex-direction:column;gap:2px;font-size:13px}
.ob-saved b{display:flex;align-items:center;gap:6px;color:var(--ok)}
.ob-saved b::before{content:'';width:8px;height:8px;border-radius:50%;background:var(--ok)}
.ob-saved span{color:var(--text-2)}
/* Objektstatus: Aktiv hellgrün · inaktiv grau · in Abwicklung blau · Rechtsangelegenheiten rot · erledigt dunkelorange
   --stc = Farbe des Status; Fläche und Zeilen-Hintergrund werden daraus gemischt (passt in hell und dunkel). */
:root{--st-aktiv:#1E9E3A;--st-inaktiv:#6B6B6B;--st-abw:#0F6CBD;--st-recht:#D13438;--st-erl:#C96200}
:root[data-theme=dark]{--st-aktiv:#6CCB7E;--st-inaktiv:#B0B0B0;--st-abw:#62ABF5;--st-recht:#F1707B;--st-erl:#FFA94D}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--st-aktiv:#6CCB7E;--st-inaktiv:#B0B0B0;--st-abw:#62ABF5;--st-recht:#F1707B;--st-erl:#FFA94D}}
.st-aktiv{--stc:var(--st-aktiv)}.st-inaktiv{--stc:var(--st-inaktiv)}.st-abw{--stc:var(--st-abw)}.st-recht{--stc:var(--st-recht)}.st-erl{--stc:var(--st-erl)}
.stp{--stc:var(--st-inaktiv);display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border:0;border-radius:12px;font:inherit;font-size:12px;font-weight:600;line-height:1;white-space:nowrap;
  color:var(--stc);background:color-mix(in srgb,var(--stc) 15%,var(--surface))}
.stp::before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor;flex-shrink:0}
.stp.st-aktiv{--stc:var(--st-aktiv)}.stp.st-abw{--stc:var(--st-abw)}.stp.st-recht{--stc:var(--st-recht)}.stp.st-erl{--stc:var(--st-erl)}
.stbtn{cursor:pointer}
.stbtn::after{content:'';width:5px;height:5px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:translateY(-2px) rotate(45deg);margin-left:2px}
.stbtn:hover{background:color-mix(in srgb,var(--stc) 24%,var(--surface))}
.stbtn:focus-visible,.stmenu .stp:focus-visible{outline:2px solid var(--stc);outline-offset:2px}
.stmenu{position:fixed;z-index:1000;display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:190px;padding:10px 12px;
  background:var(--surface);border:1px solid var(--stroke-2);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.stmenu .stp{cursor:pointer}
.stmenu .stp:hover{background:color-mix(in srgb,var(--stc) 26%,var(--surface))}
.stmenu .stp[aria-selected=true]{box-shadow:0 0 0 1.5px var(--stc)}
.stdot{--stc:var(--st-inaktiv);display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--stc);margin-right:2px;vertical-align:0}
.stdot.st-aktiv{--stc:var(--st-aktiv)}.stdot.st-abw{--stc:var(--st-abw)}.stdot.st-recht{--stc:var(--st-recht)}.stdot.st-erl{--stc:var(--st-erl)}
/* Zeilen der Objektliste im Ton des Status, links ein Farbstreifen */
tr.strow > td{background:color-mix(in srgb,var(--stc) 3%,var(--surface))}
tr.strow:hover > td{background:color-mix(in srgb,var(--stc) 7%,var(--surface))}
tr.strow > td:first-child{box-shadow:inset 4px 0 0 var(--stc)}
tr.strow.sel > td{background:color-mix(in srgb,var(--stc) 11%,var(--surface))}
.ob div.fl:has(> .stbtn){display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.ob .fl .stbtn{align-self:flex-start;height:28px;border-radius:14px;font-size:12.5px;padding:0 12px}
.ob-fav svg{color:#E3A400}
.ob-fav input:checked ~ svg{fill:#E3A400}
.ob-kv{display:grid;grid-template-columns:auto 1fr;gap:5px 10px;margin:0;font-size:13px}
.ob-kv dt{color:var(--text-2)}
.ob-kv dd{margin:0;min-width:0;overflow-wrap:anywhere}
.ob-switch{display:flex;align-items:center;gap:10px;padding:5px 0;cursor:pointer;font-size:13.5px}
.ob-switch input{position:absolute;opacity:0;pointer-events:none}
.ob-switch span{width:34px;height:18px;border-radius:9px;background:var(--surface-3);border:1px solid var(--stroke);position:relative;flex-shrink:0;transition:background .15s}
.ob-switch span::after{content:'';position:absolute;left:3px;top:3px;width:12px;height:12px;border-radius:50%;background:var(--text-2);transition:left .15s,background .15s}
.ob-switch input:checked + span{background:var(--brand);border-color:var(--brand)}
.ob-switch input:checked + span::after{left:18px;background:#fff}
.ob-switch input:focus-visible + span{outline:2px solid var(--brand);outline-offset:2px}
.btn.wide{width:100%;justify-content:center}
.ob-tscroll{overflow-x:auto;margin:0 -2px}
.ob-tscroll .ptab{margin-bottom:0}
/* Medien */
.ob-mtools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.ob-mtools .btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6}
.ob-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;border-radius:8px;min-height:120px}
.ob-photos.over{outline:2px dashed var(--brand);background:var(--brand-soft)}
.ob-drop{grid-column:1/-1;border:2px dashed var(--stroke);border-radius:8px;padding:30px;text-align:center;color:var(--text-2)}
.ob-ph{margin:0;position:relative}
.ob-ph img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:6px;cursor:zoom-in;background:var(--surface-3);display:block}
.ob-ph.main img{outline:3px solid var(--brand);outline-offset:-3px}
.ob-ph figcaption{font-size:11.5px;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:2px}
.ob-pb{all:unset;position:absolute;top:5px;width:24px;height:24px;display:grid;place-items:center;border-radius:50%;font-size:12px;font-weight:700;cursor:pointer;background:rgba(0,0,0,.6);color:#fff;opacity:0;transition:opacity .12s}
.ob-ph:hover .ob-pb,.ob-ph:focus-within .ob-pb{opacity:1}
.ob-ph.main .ob-ptit{opacity:1;color:#FFD34D}
.ob-pdel{right:5px}.ob-pdel:hover{background:var(--err)}
.ob-ptit{left:5px}.ob-ptit:hover{color:#FFD34D}
@media (hover:none){.ob-pb{opacity:1}}
.ob-chk{position:absolute;top:6px;left:6px;width:18px;height:18px;accent-color:var(--err);cursor:pointer}
.ob-photos.multi .ob-ph img{opacity:.75;cursor:pointer}
.ob-ph.chosen img{opacity:1!important;outline:3px solid var(--err);outline-offset:-3px}
/* eingebettet in die Akte */
.ob.emb .ob-tools{justify-content:flex-end}
.ob.emb .ob-tabs,.ob.emb .ob-side{position:static}
@container (max-width:1150px){.ob-body{grid-template-columns:minmax(0,1fr) 260px}}
@container (max-width:860px){
  .ob-body{grid-template-columns:1fr}
  .ob-side{position:static;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
}
/* Smartphone */
@container (max-width:560px){
  .ob{gap:10px}
  .ob-top{flex-wrap:nowrap;align-items:flex-start;gap:10px}
  .ob-back{width:34px;height:34px}
  .ob-thumb,.ob-crumb{display:none}
  .ob-tt{min-width:0}
  .ob-tt h2{font-size:18px;line-height:24px;overflow-wrap:anywhere}
  .ob-subl{font-size:12.5px;gap:4px 8px}
  .ob-tools{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -2px;padding:0 2px}
  .ob-tools::-webkit-scrollbar,.ob-tabs::-webkit-scrollbar,.ob-pills::-webkit-scrollbar{display:none}
  .ob-tools .btn{flex-shrink:0;height:30px;padding:0 10px;font-size:13px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .ob-main{border-radius:6px}
  .ob-tabs{padding:0 4px;scrollbar-width:none}
  .ob-tabs button{padding:12px 10px 11px;font-size:13.5px}
  .ob-pills{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:10px 10px 0}
  .ob-pills button{flex-shrink:0;height:30px;padding:0 12px}
  .ob-pane{padding:10px;gap:10px}
  .ob-card{padding:12px}
  .ob-card h3{margin-bottom:10px}
  .ob-card .fgrid3{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 10px}
  .ob-card .checkgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px}
  .ob-card .checkgrid label{align-items:flex-start;line-height:1.3}
  .ob-card .two{grid-template-columns:1fr;gap:4px}
  .ob-card .fl input,.ob-card .fl select{min-width:0;width:100%}
  .ob-akgrid{grid-template-columns:1fr}
  .ob-long{display:none}
  .ob-card .ptab{min-width:560px}
  .ob-photos{grid-template-columns:repeat(2,1fr);gap:8px}
  .ob-mtools .btn{height:34px}
  .ob-side{grid-template-columns:1fr}
}
