.tool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.tool-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.2rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.tool-card h4 { margin: 0 0 .3rem; color: var(--blue-dark); }
.tool-card a.tool-link { font-size: .82rem; }
.tool-card .tool-desc { font-size: .82rem; color: var(--grey); margin: .4rem 0; }
.assign-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.assign-toggle-row:last-child { border-bottom: none; }
.switch { position: relative; display: inline-block; width: 2.4rem; height: 1.35rem; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 999px; transition: .15s; }
.switch-slider::before { content: ""; position: absolute; height: 1.05rem; width: 1.05rem; left: .15rem; bottom: .15rem; background: white; border-radius: 50%; transition: .15s; }
.switch input:checked + .switch-slider { background: var(--blue); }
.switch input:checked + .switch-slider::before { transform: translateX(1.05rem); }
.switch input:disabled + .switch-slider { opacity: .5; cursor: wait; }
.mandant-link { cursor: pointer; }
.lizenz-key-row { display: flex; align-items: center; gap: .4rem; margin-top: .3rem; }
.lizenz-key { background: var(--blue-light); color: var(--blue-dark); padding: .15rem .5rem; border-radius: 5px; font-size: .78rem; letter-spacing: .02em; }
.lizenz-copy-btn { padding: .1rem .4rem; font-size: .78rem; }

.kunden-card { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px; padding: 1.1rem 1.3rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: box-shadow .15s; }
.kunden-card.aktiv { border-left-color: var(--green-text, #2e7d32); }
.kunden-card.inaktiv { opacity: .82; }
.kunden-card h4 { margin: 0 0 .4rem; color: var(--blue-dark); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.kunden-card .tool-desc { font-size: .85rem; color: var(--grey); margin: .3rem 0 .7rem; line-height: 1.4; }
.kunden-card .tool-link { font-weight: 600; font-size: .85rem; }

/* Verträge & Dokumente */
.dokumente-btn { position: relative; }
.dokumente-btn .count-badge { display: inline-block; background: var(--amber, #b26a00); color: #fff; border-radius: 999px; font-size: .72rem; padding: .05rem .45rem; margin-left: .4rem; }
.dokumente-btn .count-badge.zero { background: var(--green-text, #2e7d32); }

.modal-overlay { position: fixed; inset: 0; background: rgba(20,25,35,.45); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; z-index: 100; overflow-y: auto; }
.modal-box { background: #fff; border-radius: 12px; max-width: 640px; width: 100%; padding: 1.5rem 1.7rem; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.modal-box:has(#doku-view-frame) { max-width: 1000px; }
.doku-view-tab[aria-current="true"] { background: var(--blue-light,#eef3fb); font-weight: 600; }
.modal-box h3 { margin-top: 0; }
.modal-close-btn { float: right; }
.doku-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.doku-row:last-child { border-bottom: none; }
.doku-row .doku-typ { font-weight: 600; }
.doku-row .doku-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; }
.doku-row .doku-upload-label { font-size: .78rem; color: var(--grey); cursor: pointer; }
.doku-row .doku-upload-label input { display: none; }
.doku-row a.primary-link { font-weight: 600; }
.modal-box h4 { color: var(--grey); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; margin: 0 0 .4rem; }
