/* ═══════════════════════════════════════════════════════
   LAFORGE & PARTNER · Kanzlei-System CSS v3
   Update: Sidebar 260px · Font 16px · LED · Logo · Mandant-Sig
═══════════════════════════════════════════════════════ */
:root {
  --bg:#EEDEC5;--bg-l:#F7F0E4;--bg-d:#DFC9A0;
  --white:#FFFDF8;--brown:#3D1F00;--brown-m:#6B3A0E;--brown-l:#A0693A;
  --gold:#8B6914;--gold-l:#C9A84C;
  --green:#2D7D2D;--red:#c0392b;--orange:#e67e22;--blue:#2980b9;
  --shadow:rgba(61,31,0,.13);--shadow-lg:rgba(61,31,0,.22);
  --sidebar:#3D1F00;--sb-text:rgba(238,222,197,.65);--sb-active:#C9A84C;
  --card-bg:#FFFDF8;--input-bg:#F7F0E4;--input-bd:#DFC9A0;
  --border:#DFC9A0;--text:#3D1F00;--text-m:#6B3A0E;--text-l:#A0693A;
  --table-alt:rgba(238,222,197,.4);
  --sidebar-w:340px;   /* ← GEÄNDERT: 210 → 260px (kein Textumbruch) */
  --base-fs:18px;      /* ← GEÄNDERT: 14 → 16px (größere Schrift) */
}
[data-theme="dark"]{
  --bg:#160800;--bg-l:#1E0D00;--bg-d:#2C1400;--white:#1E0D00;
  --brown:#EEDEC5;--brown-m:#DFC9A0;--brown-l:#C8A882;
  --shadow:rgba(0,0,0,.35);--shadow-lg:rgba(0,0,0,.55);
  --sidebar:#0D0400;--card-bg:#1E0D00;--input-bg:#2C1400;
  --input-bd:#3D1F00;--border:#3D1F00;--text:#EEDEC5;
  --text-m:#DFC9A0;--text-l:#C8A882;--table-alt:rgba(61,31,0,.3);
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:var(--base-fs);scroll-behavior:smooth}
body{font-family:'Cormorant Garamond',Georgia,serif;background:var(--bg);color:var(--text);line-height:1.65;transition:background .25s,color .25s}

/* ── LOGIN ─────────────────────────────────────────────── */
.login-body{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--bg)}
.login-wrap{width:100%;max-width:440px}
.login-logo{text-align:center;padding:28px 20px 20px;background:var(--sidebar);border-radius:12px 12px 0 0}
.login-logo h1{font-family:'Playfair Display',Georgia,serif;color:#FFFDF8;font-size:1.6rem;margin-top:10px;letter-spacing:.03em}
.login-logo p{color:#C9A84C;font-size:.85rem;letter-spacing:.1em}
.login-logo-img{max-width:90px;max-height:90px;object-fit:contain;margin-bottom:8px;filter:drop-shadow(0 2px 8px rgba(0,0,0,.4))}
.login-card{background:var(--card-bg);padding:32px;border-radius:0 0 12px 12px;box-shadow:0 8px 32px var(--shadow-lg)}
.login-card h2{font-family:'Playfair Display',serif;color:var(--brown);margin-bottom:20px}
.login-footer{text-align:center;margin-top:16px;font-size:.75rem;color:var(--text-l);line-height:1.6}
.theme-toggle-float{position:fixed;top:16px;right:16px;background:var(--card-bg);border:1px solid var(--border);border-radius:50%;width:40px;height:40px;font-size:18px;cursor:pointer;z-index:100;box-shadow:0 2px 8px var(--shadow)}

/* ── LAYOUT ────────────────────────────────────────────── */
.layout{display:flex;min-height:100vh}

/* ── SIDEBAR ───────────────────────────────────────────── */
.sidebar{width:var(--sidebar-w);background:var(--sidebar);display:flex;flex-direction:column;position:fixed;height:100vh;overflow-y:auto;z-index:200;transition:transform .25s}
.sb-top{padding:18px 14px;border-bottom:1px solid rgba(255,255,255,.06)}
.sb-logo{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.sb-logo-img{width:42px;height:42px;object-fit:contain;filter:drop-shadow(0 1px 3px rgba(0,0,0,.4))}
.sb-logo-svg{width:42px;height:42px;flex-shrink:0}
.sb-kname{font-family:'Playfair Display',serif;color:#FFFDF8;font-size:.78rem;font-weight:700;letter-spacing:.01em;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(340px - 70px)}
.sb-sub{color:var(--gold-l);font-size:.65rem;letter-spacing:.1em;text-transform:uppercase;margin-top:1px}
.sb-user{display:flex;align-items:center;gap:10px}
.sb-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;border:2px solid var(--gold-l)}
.sb-avatar-init{width:36px;height:36px;border-radius:50%;background:var(--gold-l);display:flex;align-items:center;justify-content:center;font-family:'Playfair Display',serif;color:var(--sidebar);font-size:1rem;font-weight:700}
.sb-uname{color:#FFFDF8;font-size:.83rem;font-weight:600}
.sb-urole{color:var(--sb-text);font-size:.72rem}
.sb-nav{flex:1;padding:10px 0}
.sb-item{display:flex;align-items:center;gap:10px;padding:11px 18px;color:var(--sb-text);text-decoration:none;font-size:.85rem;border-left:3px solid transparent;transition:all .15s;cursor:pointer;background:transparent;border-top:none;border-right:none;border-bottom:none;width:100%;text-align:left;font-family:'Cormorant Garamond',Georgia,serif;white-space:nowrap}
.sb-item:hover{color:rgba(238,222,197,.9);background:rgba(238,222,197,.08)}
.sb-item.active{color:var(--sb-active);background:rgba(238,222,197,.08);border-left-color:var(--sb-active)}
.sb-icon{font-size:1.1rem;width:22px;text-align:center;flex-shrink:0}
.sb-badge{margin-left:auto;background:var(--gold-l);color:#1A0800;border-radius:10px;font-size:.7rem;padding:1px 6px;font-weight:700;flex-shrink:0}
.sb-bottom{padding:8px 0;border-top:1px solid rgba(255,255,255,.06)}
.sb-version{text-align:center;font-size:.65rem;color:rgba(238,222,197,.2);padding:6px}
.sb-logout:hover{color:#ff6b6b!important}
.sb-theme-btn{font-family:'Cormorant Garamond',serif}
.sb-access{flex-wrap:wrap;gap:4px}
.access-btns{margin-left:auto;display:flex;gap:3px}
.access-btns button{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.15);color:rgba(238,222,197,.8);border-radius:3px;padding:2px 7px;font-size:.72rem;cursor:pointer;font-family:serif}
.access-btns button:hover{background:rgba(255,255,255,.2)}

/* ── MAIN ──────────────────────────────────────────────── */
.main-content{margin-left:var(--sidebar-w);flex:1;padding:24px 28px;max-width:1600px}
.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;padding-bottom:14px;border-bottom:1px solid var(--border)}
.page-title{font-family:'Playfair Display',serif;font-size:1.5rem;color:var(--brown);font-weight:700}
.topbar-date{font-size:.8rem;color:var(--text-m)}
.topbar-right{display:flex;align-items:center;gap:14px}
.topbar-link{font-size:.8rem;color:var(--brown-m);text-decoration:none;border-bottom:1px solid var(--border);padding-bottom:1px;transition:color .15s}
.topbar-link:hover{color:var(--brown)}
.hamburger{display:none;position:fixed;top:12px;left:12px;z-index:300;background:var(--sidebar);color:#FFFDF8;border:none;border-radius:6px;padding:8px 12px;font-size:18px;cursor:pointer}

/* ── CARDS ─────────────────────────────────────────────── */
.card{background:var(--card-bg);border-radius:10px;padding:22px;box-shadow:0 2px 10px var(--shadow);margin-bottom:18px}
.card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;padding-bottom:10px;border-bottom:1px solid var(--border)}
.card-header h3{font-family:'Playfair Display',serif;font-size:1.05rem;color:var(--brown)}

/* ── FORMS ─────────────────────────────────────────────── */
.form-group{margin-bottom:14px}
.form-group label{display:block;font-size:.72rem;color:var(--text-m);text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}
.form-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:0 16px}
input,select,textarea{width:100%;padding:8px 12px;border:1px solid var(--input-bd);border-radius:6px;font-family:'Cormorant Garamond',serif;font-size:.92rem;background:var(--input-bg);color:var(--text);outline:none;transition:border-color .15s}
input:focus,select:focus,textarea:focus{border-color:var(--gold-l)}
textarea{resize:vertical;min-height:80px}
.pw-wrap{position:relative}
.pw-wrap input{padding-right:40px}
.pw-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:transparent;border:none;cursor:pointer;font-size:16px;color:var(--text-m)}
.pw-strength{margin-top:5px;display:flex;align-items:center;gap:8px;font-size:.75rem}
.pw-bar{height:5px;border-radius:3px;transition:all .3s}
.pw-bar.weak{width:60px;background:#e74c3c}
.pw-bar.medium{width:100px;background:#e67e22}
.pw-bar.strong{width:140px;background:#27ae60}
.pw-bar.very-strong{width:180px;background:#1a7a40}

/* ── BUTTONS ───────────────────────────────────────────── */
.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:6px;cursor:pointer;font-family:'Cormorant Garamond',serif;font-size:.88rem;text-decoration:none;transition:all .15s;white-space:nowrap}
.btn:hover{opacity:.84}
.btn-primary{background:var(--brown);color:#FFFDF8}
.btn-secondary{background:transparent;color:var(--brown-m);border:1px solid var(--border)}
.btn-success{background:var(--green);color:#FFFDF8}
.btn-danger{background:var(--red);color:#FFFDF8}
.btn-warning{background:var(--orange);color:#FFFDF8}
.btn-ghost{background:transparent;color:var(--text-m)}
.btn-full{width:100%;justify-content:center}
.btn-sm{padding:4px 10px;font-size:.78rem}
.mt-8{margin-top:8px}
.mb-16{margin-bottom:16px}
.inline-form{display:inline}

/* ── ALERTS ────────────────────────────────────────────── */
.alert{padding:12px 16px;border-radius:7px;margin-bottom:16px;font-size:.88rem}
.alert-ok{background:#d4edda;color:#155724}
.alert-err{background:#f8d7da;color:#721c24}
.alert-warn{background:#fff3cd;color:#856404}
[data-theme="dark"] .alert-ok{background:#1a3d22;color:#72c990}
[data-theme="dark"] .alert-err{background:#3d1a1a;color:#e88}
[data-theme="dark"] .alert-warn{background:#3d3310;color:#ddb}

/* ── DUNKELMODUS: BUTTONS — Kontrast-Fix ──────────────────
   In Dark Mode wird --brown zu #EEDEC5 (Hellcreme).
   Alle Buttons mit hellem Hintergrund brauchen dunkle Schrift.
   Lösung: Feste Farben statt CSS-Variablen für Buttons.
────────────────────────────────────────────────────────── */

/* Primär-Buttons: Gold-Hintergrund mit sehr dunklem Text */
[data-theme="dark"] .btn-primary{
  background:#C9A84C;
  color:#1A0800;
  border-color:#C9A84C;
}
[data-theme="dark"] .btn-primary:hover{
  background:#B8963E;
  opacity:1;
}

/* Sekundär-Buttons: dünner Rand, heller Text */
[data-theme="dark"] .btn-secondary{
  background:transparent;
  color:#DFC9A0;
  border-color:#3D1F00;
}
[data-theme="dark"] .btn-secondary:hover{
  background:rgba(201,168,76,.12);
}

/* Kleine Ghost-Buttons */
[data-theme="dark"] .btn-ghost{
  color:#C8A882;
}

/* Filter-Buttons im Terminkalender */
[data-theme="dark"] .kal-filter-btn{
  background:#1E0D00;
  color:#DFC9A0;
  border-color:#3D1F00;
}
[data-theme="dark"] .kal-filter-btn:hover{
  background:#2C1400;
  color:#EEDEC5;
}
[data-theme="dark"] .kal-filter-btn.active{
  background:#C9A84C;  /* Gold */
  color:#1A0800;        /* Fast-Schwarz → bestmöglicher Kontrast */
  border-color:#C9A84C;
  font-weight:600;
}

/* Zugriffs-Buttons in der Sidebar */
[data-theme="dark"] .access-btns button{
  background:rgba(201,168,76,.15);
  color:#DFC9A0;
  border-color:rgba(201,168,76,.3);
}
[data-theme="dark"] .access-btns button:hover{
  background:rgba(201,168,76,.3);
  color:#EEDEC5;
}

/* Tab-Buttons (Admin) */
[data-theme="dark"] .tab-btn{
  color:#C8A882;
}
[data-theme="dark"] .tab-btn.active{
  color:#C9A84C;
  border-bottom-color:#C9A84C;
}

/* Login-Button */
[data-theme="dark"] .btn-full.btn-primary{
  background:#C9A84C;
  color:#1A0800;
}

/* Success/Danger/Warning unverändert — haben eigene feste Farben */

/* ── BADGES ────────────────────────────────────────────── */
.badge{display:inline-block;padding:2px 8px;border-radius:10px;font-size:.72rem;font-weight:600}
.badge-green{background:rgba(45,125,45,.18);color:var(--green);border:1px solid rgba(45,125,45,.3)}
.badge-gold{background:rgba(139,105,20,.18);color:var(--gold);border:1px solid rgba(139,105,20,.3)}
.badge-brown{background:rgba(107,58,14,.18);color:var(--brown-m);border:1px solid rgba(107,58,14,.3)}
.badge-gray{background:rgba(128,128,128,.18);color:#888;border:1px solid rgba(128,128,128,.3)}
.badge-red{background:rgba(192,57,43,.18);color:var(--red);border:1px solid rgba(192,57,43,.3)}
.badge-orange{background:rgba(230,126,34,.18);color:var(--orange);border:1px solid rgba(230,126,34,.3)}
.badge-blue{background:rgba(41,128,185,.18);color:var(--blue);border:1px solid rgba(41,128,185,.3)}

/* ── TABLES ────────────────────────────────────────────── */
.data-table{width:100%;border-collapse:collapse;font-size:.88rem}
.data-table th{text-align:left;padding:10px 12px;font-size:.72rem;color:var(--text-m);text-transform:uppercase;letter-spacing:.07em;border-bottom:2px solid var(--border);background:var(--bg-l);font-weight:600}
.data-table td{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:middle}
.data-table tr:nth-child(even) td{background:var(--table-alt)}
.data-table tr:hover td{background:rgba(200,168,76,.1)}
.data-table tr.row-archived td{opacity:.6;font-style:italic}
code{font-family:'Courier New',monospace;background:var(--bg-d);padding:1px 5px;border-radius:3px;font-size:.82rem}

/* ── DASHBOARD STATS ───────────────────────────────────── */
.stats-row{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-bottom:18px}
.stat-card{background:var(--card-bg);border-radius:10px;padding:16px;text-align:center;box-shadow:0 2px 8px var(--shadow)}
.stat-icon{font-size:1.4rem;margin-bottom:4px}
.stat-val{font-family:'Playfair Display',serif;font-size:2rem;color:var(--brown);font-weight:700;line-height:1}
.stat-lbl{font-size:.72rem;color:var(--text-m);margin-top:3px}
.stat-urgent .stat-val{color:var(--red)}

/* ── LAWYER CARDS + LED ONLINE STATUS ─────────────────── */
.lawyer-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.lawyer-card{border:1px solid var(--border);border-radius:10px;padding:16px;text-align:center;background:var(--bg-l);transition:box-shadow .2s}
.lawyer-card:hover{box-shadow:0 4px 18px var(--shadow)}

/* Foto-Container mit LED */
.lawyer-photo-wrap{position:relative;display:inline-block;margin-bottom:10px}
.lawyer-photo{width:80px;height:80px;border-radius:50%;object-fit:cover;border:3px solid var(--gold-l)}
.lawyer-photo-init{width:80px;height:80px;border-radius:50%;background:var(--sidebar);display:flex;align-items:center;justify-content:center;font-family:'Playfair Display',serif;color:#FFFDF8;font-size:2rem;font-weight:700;border:3px solid var(--gold-l);margin:0 auto}

/* LED Online-Indikator (rechts unten am Foto) */
.led-online{
  position:absolute;
  bottom:4px;right:4px;
  width:16px;height:16px;
  border-radius:50%;
  border:2.5px solid var(--card-bg);
  background:#888;  /* default: offline/grau */
  box-shadow:0 0 0 0 rgba(128,128,128,0);
  transition:all .3s;
}
.led-online.online{
  background:#27ae60;
  box-shadow:0 0 0 3px rgba(39,174,96,.25);
  animation:ledPulse 2s infinite;
}
.led-online.away{
  background:#e67e22;
  box-shadow:0 0 0 2px rgba(230,126,34,.2);
}
@keyframes ledPulse{
  0%{box-shadow:0 0 0 0 rgba(39,174,96,.4)}
  70%{box-shadow:0 0 0 8px rgba(39,174,96,0)}
  100%{box-shadow:0 0 0 0 rgba(39,174,96,0)}
}
.led-tooltip{font-size:.7rem;color:var(--text-l);margin-top:2px}

.lawyer-name{font-family:'Playfair Display',serif;font-size:.95rem;font-weight:700;color:var(--brown)}
.lawyer-spec{font-size:.78rem;color:var(--text-m);font-style:italic;margin:2px 0 4px}
.lawyer-phone{font-size:.75rem;color:var(--text-l)}
.lawyer-stats{display:flex;justify-content:center;gap:14px;margin:10px 0 12px;padding-top:10px;border-top:1px solid var(--border)}
.lstat{display:flex;flex-direction:column;align-items:center}
.lstat-val{font-family:'Playfair Display',serif;font-size:1.2rem;font-weight:700;color:var(--brown)}
.lstat-lbl{font-size:.65rem;color:var(--text-m);text-transform:uppercase}
.text-red{color:var(--red)!important}

/* ── TRANSFER ──────────────────────────────────────────── */
.transfer-alert{border-left:4px solid var(--gold-l)}
.transfer-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid var(--border)}
.transfer-row:last-child{border-bottom:none}
.transfer-info{flex:1;font-size:.85rem}
.transfer-msg{margin-top:4px;padding:4px 8px;background:var(--bg-l);border-radius:4px;font-size:.8rem;color:var(--text-m)}
.transfer-actions{display:flex;gap:6px;flex-shrink:0}

/* ── CASES ─────────────────────────────────────────────── */
.cases-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.search-form{display:flex;gap:6px;flex:1;min-width:200px}
.search-form input{max-width:300px}
.filter-tabs{display:flex;gap:0}
.filter-tab{padding:7px 14px;border:1px solid var(--border);font-size:.8rem;text-decoration:none;color:var(--text-m);background:var(--card-bg);transition:all .15s}
.filter-tab:first-child{border-radius:6px 0 0 6px}
.filter-tab:last-child{border-radius:0 6px 6px 0}
.filter-tab.active{background:var(--brown);color:#FFFDF8;border-color:var(--brown)}
.case-detail-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}
.case-detail-header h2{font-family:'Playfair Display',serif;font-size:1.4rem;color:var(--brown)}
.case-meta{display:flex;align-items:center;gap:8px;margin-top:6px;flex-wrap:wrap}
.case-detail-actions{display:flex;gap:8px}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px}

/* ── INFO LIST ─────────────────────────────────────────── */
.info-list{display:flex;flex-direction:column}
.info-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid var(--border);font-size:.88rem}
.info-row span:first-child{color:var(--text-m);font-size:.75rem;text-transform:uppercase;letter-spacing:.07em}

/* ── NOTIFICATIONS ─────────────────────────────────────── */
.notif-list{display:flex;flex-direction:column}
.notif-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);font-size:.88rem}
.notif-item:last-child{border-bottom:none}
.notif-item.unread{background:rgba(201,168,76,.06);border-radius:6px;padding:10px 8px;margin:-2px -8px}
.notif-icon{font-size:1.2rem;flex-shrink:0}
.notif-time{font-size:.72rem;color:var(--text-l);margin-top:3px}

/* ── PROFILE ───────────────────────────────────────────── */
.photo-upload-area{text-align:center;padding:16px 0 20px;border-bottom:1px solid var(--border);margin-bottom:16px}
.profile-photo-lg{width:96px;height:96px;border-radius:50%;object-fit:cover;border:3px solid var(--gold-l);display:block;margin:0 auto 10px}
.profile-photo-init-lg{width:96px;height:96px;border-radius:50%;background:var(--sidebar);display:flex;align-items:center;justify-content:center;font-family:'Playfair Display',serif;color:#FFFDF8;font-size:2.4rem;font-weight:700;border:3px solid var(--gold-l);margin:0 auto 10px}

/* ── SIGNATURE PAD ─────────────────────────────────────── */
.signature-section{display:flex;flex-direction:column;gap:16px}
.sig-current{display:flex;align-items:flex-start;gap:14px;padding:12px;background:var(--bg-l);border-radius:8px}
.sig-label{font-size:.75rem;color:var(--text-m);text-transform:uppercase;letter-spacing:.07em;margin-bottom:6px}
.sig-preview-img{max-width:300px;max-height:100px;border-radius:4px;background:#fff;padding:4px;border:1px solid var(--border)}
.sig-pad-wrap{display:flex;flex-direction:column;gap:10px}
.sig-pad-label{font-size:.75rem;color:var(--text-m);text-transform:uppercase;letter-spacing:.07em}
.sig-canvas{width:100%;max-width:600px;height:160px;border:2px dashed var(--border);border-radius:8px;background:#FFFDF8;cursor:crosshair;touch-action:none}
.sig-controls{display:flex;gap:8px;flex-wrap:wrap}

/* Mandant-Unterschrifts-Bereich (Dokumente) */
.mandant-sig-section{margin-top:24px;padding:16px;border:1px dashed var(--border);border-radius:8px;background:var(--bg-l)}
.mandant-sig-section h4{font-family:'Playfair Display',serif;font-size:.95rem;color:var(--brown);margin-bottom:10px}
.mandant-sig-canvas{width:100%;height:130px;border:2px dashed var(--input-bd);border-radius:6px;background:#FFFDF8;cursor:crosshair;touch-action:none}
.mandant-sig-controls{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}

/* ── LOGO UPLOAD (Admin) ───────────────────────────────── */
.logo-upload-area{border:2px dashed var(--border);border-radius:10px;padding:24px;text-align:center;background:var(--bg-l);transition:border-color .15s}
.logo-upload-area:hover{border-color:var(--gold-l)}
.logo-current{max-width:200px;max-height:120px;object-fit:contain;display:block;margin:0 auto 12px;background:#fff;padding:8px;border-radius:6px;border:1px solid var(--border)}
.logo-placeholder{width:200px;height:100px;background:var(--bg-d);border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:.8rem;color:var(--text-m);margin:0 auto 12px}

/* ── LETTERHEAD LOGO (Print-Bereich) ───────────────────── */
.letterhead-logo{max-width:80px;max-height:60px;object-fit:contain}

/* ── ADMIN ─────────────────────────────────────────────── */
.admin-tabs{display:flex;gap:0;margin-bottom:18px;border-bottom:1px solid var(--border)}
.tab-btn{padding:10px 22px;background:transparent;border:none;cursor:pointer;font-family:'Cormorant Garamond',serif;font-size:.9rem;color:var(--text-m);border-bottom:2px solid transparent;margin-bottom:-1px;transition:all .15s}
.tab-btn.active{color:var(--brown);border-bottom-color:var(--brown)}
.admin-lawyer-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--border);flex-wrap:wrap}
.admin-lawyer-row.inactive{opacity:.55}
.alr-info{flex:1;display:flex;flex-direction:column;gap:1px;font-size:.85rem}
.alr-stats{display:flex;gap:6px;flex-wrap:wrap}
.alr-actions{display:flex;gap:6px;flex-wrap:wrap}
.avatar-sm{width:38px;height:38px;border-radius:50%;object-fit:cover}
.avatar-init-sm{width:38px;height:38px;border-radius:50%;background:var(--sidebar);display:flex;align-items:center;justify-content:center;color:#FFFDF8;font-family:'Playfair Display',serif;font-size:1rem;font-weight:700}
.pw-display{font-size:1.3rem;letter-spacing:.15em;background:var(--bg-d);padding:4px 10px;border-radius:4px;display:inline-block;margin:6px 0}

/* ── DOKUMENT-LAYOUT ───────────────────────────────────── */
.dok-layout{display:grid;grid-template-columns:250px 1fr;gap:20px;align-items:start}
.dok-sidebar{background:var(--card-bg);border-radius:10px;overflow:hidden;box-shadow:0 2px 10px var(--shadow);position:sticky;top:20px}
.dok-sb-header{background:var(--brown);color:var(--bg);padding:10px 14px;font-family:'Playfair Display',serif;font-size:.85rem;font-weight:600}
.dok-sb-user{padding:10px 14px;font-size:.83rem;color:var(--text-m);border-bottom:1px solid var(--border)}
.dok-sb-case{padding:8px 14px;font-size:.8rem;color:var(--text-m);background:var(--bg-l);border-bottom:1px solid var(--border)}
.dok-gruppe{padding:6px 14px;font-size:.68rem;color:var(--text-m);text-transform:uppercase;letter-spacing:.08em;background:var(--bg-l)}
.dok-item{display:block;padding:9px 14px;font-size:.83rem;color:var(--text-m);text-decoration:none;border-left:3px solid transparent;transition:all .15s}
.dok-item:hover{color:var(--brown);background:var(--bg-l)}
.dok-item.active{color:var(--brown);background:var(--bg);border-left-color:var(--gold);font-weight:600}
.dok-main{min-width:0}

/* ── MISC ──────────────────────────────────────────────── */
.empty-state{text-align:center;padding:36px;color:var(--text-m);font-size:.9rem;line-height:2}
.text-muted{color:var(--text-m);font-size:.85rem}

/* ── INTEGRITY OVERLAY ─────────────────────────────────── */
#integrity-overlay{position:fixed;inset:0;background:var(--bg);display:flex;align-items:center;justify-content:center;z-index:9999;transition:opacity .4s}
.integrity-box{text-align:center;max-width:360px;padding:32px;width:100%}
.integrity-box h3{font-family:'Playfair Display',serif;color:var(--brown);font-size:1.3rem;margin:12px 0 6px}
.integrity-box p{color:var(--text-m);font-size:.85rem;margin-bottom:16px}
.integrity-bar-wrap{height:8px;background:var(--bg-d);border-radius:4px;overflow:hidden;margin-bottom:10px}
.integrity-bar{height:100%;background:var(--gold-l);border-radius:4px;width:0;transition:width .2s ease}
#integrity-overlay small{color:var(--text-l);font-size:.72rem;display:block;margin-top:6px;font-family:monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;margin:6px auto 0}

/* ── TERMINKALENDER ────────────────────────────────────── */
.kalender-wrap{font-family:'Cormorant Garamond',serif}
.kal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}
.kal-nav-btn{background:var(--brown);color:#FFFDF8;border:none;border-radius:6px;padding:8px 16px;cursor:pointer;font-family:'Cormorant Garamond',serif;font-size:.88rem}
.kal-day-grid{display:grid;gap:8px}
.kal-slot{padding:12px;border-radius:8px;border:1px solid var(--border);background:var(--bg-l)}
.kal-slot-time{font-size:.8rem;color:var(--text-m);margin-bottom:4px}
.kal-slot-name{font-weight:600;color:var(--brown)}
.kal-status-aktiv{border-left:4px solid var(--green)}
.kal-status-pending{border-left:4px solid var(--orange)}
.kal-status-done{border-left:4px solid #888;opacity:.7}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media(max-width:920px){
  .sidebar{transform:translateX(-100%)}
  .sidebar.open{transform:translateX(0)}
  .main-content{margin-left:0;padding:16px}
  .hamburger{display:block}
  .stats-row{grid-template-columns:repeat(3,1fr)}
  .two-col{grid-template-columns:1fr}
  .lawyer-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
  .cases-toolbar{flex-direction:column;align-items:stretch}
  .dok-layout{grid-template-columns:1fr}
  .dok-sidebar{position:static}
  .admin-lawyer-row{flex-direction:column;align-items:flex-start}
}
@media(max-width:600px){
  .stats-row{grid-template-columns:repeat(2,1fr)}
  .form-row{grid-template-columns:1fr}
  .lawyer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:400px){
  .lawyer-grid{grid-template-columns:1fr}
}

/* ── PRINT ─────────────────────────────────────────────── */
@media print{
  .sidebar,.topbar,.hamburger,#integrity-overlay,.btn,.cases-toolbar,.admin-tabs,
  .mandant-sig-section .mandant-sig-controls,.sig-controls{display:none!important}
  .main-content{margin-left:0!important;padding:0!important}
  .card{box-shadow:none!important;border:1px solid #ccc}
  body{background:white;color:black;font-size:11pt}
}
