  /* =====================================================================
     OBJEKTE-MODUL (Ablageplan 6) — Liste · Detail · Auftrag · Offerte
     Nachbau der bestehenden PowerApp-Objektverwaltung (Mockup, In-Memory)
     ===================================================================== */
  .obj-root { display: flex; flex-direction: column; gap: 0; }

  /* ---- Toolbar oberhalb der Liste ---- */
  .obj-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
  .obj-search {
    flex: 1; display: flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: 8px; padding: 9px 14px; max-width: 520px;
  }
  .obj-search input { flex: 1; border: none; outline: none; background: none; font-size: 14px; color: var(--text); }
  .obj-search .icon { width: 16px; height: 16px; color: var(--text-muted); }
  .obj-sparte-filter { display: flex; gap: 6px; flex-wrap: wrap; }
  .obj-filter-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
  .obj-filter-lbl { flex: 0 0 56px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); }
  .obj-chip {
    border: 1px solid var(--border-strong); background: var(--surface);
    border-radius: 999px; padding: 5px 12px; font-size: 12px; color: var(--text-muted); font-weight: 500;
  }
  .obj-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

  /* ---- Listen-Tabelle ---- */
  .obj-list-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
  .obj-section-head { padding: 10px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); border-bottom: 1px solid var(--border); background: var(--bg); }
  table.obj-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  table.obj-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
  table.obj-table tr:last-child td { border-bottom: none; }
  table.obj-table tr.obj-row { cursor: pointer; }
  table.obj-table tr.obj-row:hover { background: var(--brand-soft); }
  .obj-nr {
    display: inline-block; min-width: 58px; text-align: center;
    font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12px;
    padding: 4px 8px; border-radius: var(--radius-sm);
    background: #eef1f4; color: var(--text-muted);
  }
  .obj-nr.st-submission    { background: #dbe7f5; color: #2a567e; }
  .obj-nr.st-offerte       { background: #fbf0bf; color: #7a6516; }
  .obj-nr.st-auftrag       { background: #cfe9d6; color: #1f6b39; }
  .obj-nr.st-abgeschlossen { background: #fbd5d5; color: #9b2c2c; }
  .obj-nr.st-archiv        { background: #eef1f4; color: var(--text-dim); }
  .obj-ort   { font-weight: 600; white-space: nowrap; }
  .obj-bez   { color: var(--text); }
  .obj-datum { color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .obj-datum.alt { color: var(--text-dim); }
  .obj-verant { color: var(--text-muted); white-space: nowrap; }
  .obj-actions { display: flex; gap: 4px; justify-content: flex-end; }
  .obj-actions .act { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--text-dim); border: none; background: none; }
  .obj-actions .act:hover { background: var(--bg); color: var(--brand-dark); }
  .obj-actions .act.on { color: var(--brand); }
  .obj-actions .act svg { width: 15px; height: 15px; }

  /* Sparte-Badge */
  .sparte {
    display: inline-block; padding: 3px 10px; border-radius: 6px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
  }
  .sparte.injektion       { background: #d6e4f0; color: #2a567e; }
  .sparte.instandsetzung  { background: #a8e6a8; color: #1f5a1f; }
  .sparte.baugrund        { background: #fbf0bf; color: #7a6516; }
  .sparte.bahnbau         { background: #e0d6f0; color: #4a3580; }
  .sparte.tunnelbau       { background: #cfe7ee; color: #2a6577; }
  .sparte.sondierbohrung  { background: #f0ddc9; color: #8a5a2a; }
  .sparte.leer            { background: transparent; color: var(--text-dim); font-weight: 400; }

  /* ---- Footer-Leiste (Statistik / Count) ---- */
  .obj-footer { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 10px 16px; background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--radius); }
  .obj-footer .ver { font-size: 12px; color: var(--text-muted); }
  .obj-footer .count { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand-dark); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 4px 12px; }
  .obj-footer .adminmode { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }

  /* ---- Detail / Formular ---- */
  .obj-detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
  .obj-detail-head .obj-nr { font-size: 16px; min-width: 70px; padding: 7px 12px; }
  .obj-detail-head h1 { font-size: 20px; margin: 0; }
  .obj-back { display: inline-flex; align-items: center; gap: 6px; }

  .obj-banner { display: flex; align-items: center; gap: 16px; background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 18px; }
  .obj-banner .bn-nr { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; color: var(--brand-dark); }
  .obj-banner .bn-title { font-weight: 700; font-size: 18px; }

  .obj-form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; max-width: 1000px; }
  .obj-form .full { grid-column: 1 / -1; }
  .obj-field { display: flex; flex-direction: column; gap: 6px; }
  .obj-field label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
  .obj-field input, .obj-field select, .obj-field textarea {
    padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 8px;
    font-size: 14px; background: var(--surface); color: var(--text); font-family: inherit;
  }
  .obj-field textarea { resize: vertical; min-height: 80px; }
  .obj-field.required input, .obj-field.required select { background: #fde8dd; border-color: #e9b59a; }
  .obj-field .hint { font-size: 11px; color: var(--text-dim); }
  /* Subscroll der Hauptliste — «Zuletzt benutzt» bleibt darunter sichtbar */
  .obj-scroll { max-height: 52vh; overflow-y: auto; }
  /* Read-only-Wertanzeige (Live: Pflege in der PowerApp, Dataverse ist Master) */
  .obj-field .val {
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; background: var(--bg, #fafafa); color: var(--text); min-height: 19px;
  }
  .obj-field .nr-big { font-size: 22px; font-weight: 700; text-align: center; letter-spacing: 0.02em; max-width: 200px; }

  .obj-map { grid-column: 2; grid-row: span 4; min-height: 280px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; position: relative; background: linear-gradient(160deg, #bfe0f2 0%, #a9d4ec 100%); }
  .obj-map .pin { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -100%); color: #e8602c; }
  .obj-map .pin svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3)); }
  .obj-map .attribution { position: absolute; bottom: 4px; right: 6px; font-size: 9px; color: #5a7286; }
  .obj-map .mapzoom { position: absolute; bottom: 10px; right: 8px; display: flex; flex-direction: column; gap: 2px; }
  .obj-map .mapzoom button { width: 26px; height: 26px; background: var(--surface); border: 1px solid var(--border); font-size: 16px; color: var(--text-muted); display: grid; place-items: center; }
  .obj-map .mapzoom button:first-child { border-radius: 6px 6px 0 0; }
  .obj-map .mapzoom button:last-child { border-radius: 0 0 6px 6px; }

  .obj-form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin-top: 4px; }
  .obj-required-note { color: #c0392b; font-size: 13px; font-weight: 500; }

  /* Detail: Unter-Listen Aufträge / Offerten */
  .obj-meta-row { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 18px; font-size: 13px; }
  .obj-meta-row .lbl { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
  .obj-meta-row .val { font-weight: 600; }
  .obj-meta-row a { color: var(--brand-dark); text-decoration: none; }
  .obj-meta-row a:hover { text-decoration: underline; }

  .obj-sub { margin-bottom: 22px; }
  .obj-sub-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .obj-sub-head h3 { font-size: 14px; margin: 0; display: flex; align-items: center; gap: 8px; }
  .obj-sub-head h3 .cnt { font-size: 11px; font-weight: 600; color: var(--text-muted); background: var(--bg); border-radius: 999px; padding: 2px 9px; }
  .obj-sub table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .obj-sub th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-dim); padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--bg); }
  .obj-sub td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
  .obj-sub tr:last-child td { border-bottom: none; }
  .obj-sub tr.clickable { cursor: pointer; }
  .obj-sub tr.clickable:hover { background: var(--brand-soft); }
  .obj-sub .empty { padding: 16px; color: var(--text-dim); text-align: center; font-size: 13px; }
  .num { font-variant-numeric: tabular-nums; text-align: right; }
