/* AkteX Connect – Frontend Styles v1.3.0 */

:root {
    --aktex-primary: #1a365d;
    --aktex-primary-light: #2a4a7f;
    --aktex-primary-dark: #0f2440;
    --aktex-accent: #c9a84c;
    --aktex-accent-light: #e8d595;
    --aktex-bg: #f7f8fa;
    --aktex-white: #ffffff;
    --aktex-border: #dde1e7;
    --aktex-text: #2d3748;
    --aktex-text-light: #718096;
    --aktex-success: #276749;
    --aktex-success-bg: #f0fff4;
    --aktex-error: #9b2c2c;
    --aktex-error-bg: #fff5f5;
    --aktex-info-bg: #ebf8ff;
    --aktex-radius: 6px;
    --aktex-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --aktex-shadow-hover: 0 4px 12px rgba(0,0,0,.1);
    --aktex-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ─── Grundlayout ──────────────────────────────────────── */

.aktex-box,
.aktex-dashboard,
.aktex-project,
.aktex-document {
    font-family: var(--aktex-font);
    color: var(--aktex-text);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.6;
}

.aktex-box {
    background: var(--aktex-white);
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    padding: 32px;
    margin: 20px auto;
    max-width: 480px;
    box-shadow: var(--aktex-shadow);
}

.aktex-box h2 {
    margin: 0 0 12px 0;
    font-size: 22px;
    color: var(--aktex-primary);
}

.aktex-box--success {
    border-left: 4px solid var(--aktex-success);
    background: var(--aktex-success-bg);
}

.aktex-box--error {
    border-left: 4px solid var(--aktex-error);
    background: var(--aktex-error-bg);
}

.aktex-box--info {
    border-left: 4px solid var(--aktex-primary);
    background: var(--aktex-info-bg);
}

/* ─── Alerts ───────────────────────────────────────────── */

.aktex-alert {
    padding: 12px 16px;
    border-radius: var(--aktex-radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.aktex-alert--success {
    background: var(--aktex-success-bg);
    color: var(--aktex-success);
    border: 1px solid #c6f6d5;
}

.aktex-alert--error {
    background: var(--aktex-error-bg);
    color: var(--aktex-error);
    border: 1px solid #fed7d7;
}

/* v1.4.0 */
.aktex-alert--warning {
    background: #fffbe6;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ─── Formulare ────────────────────────────────────────── */

.aktex-form {
    margin-top: 16px;
}

.aktex-field {
    margin-bottom: 16px;
}

.aktex-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--aktex-text);
    margin-bottom: 6px;
}

.aktex-field input[type="text"],
.aktex-field input[type="email"],
.aktex-field input[type="password"],
.aktex-field select,
.aktex-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    font-size: 15px;
    font-family: var(--aktex-font);
    color: var(--aktex-text);
    background: var(--aktex-white);
    transition: border-color .2s;
    box-sizing: border-box;
}

.aktex-field input:focus,
.aktex-field select:focus,
.aktex-field textarea:focus {
    outline: none;
    border-color: var(--aktex-primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, .1);
}

.aktex-field input[type="file"] {
    font-size: 14px;
    padding: 8px 0;
}

/* ─── Buttons ──────────────────────────────────────────── */

.aktex-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--aktex-primary);
    color: var(--aktex-white);
    border: none;
    border-radius: var(--aktex-radius);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--aktex-font);
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, box-shadow .2s;
    text-align: center;
}

.aktex-btn:hover {
    background: var(--aktex-primary-light);
    box-shadow: var(--aktex-shadow-hover);
    color: var(--aktex-white);
    text-decoration: none;
}

.aktex-btn--secondary {
    background: var(--aktex-accent);
    color: var(--aktex-primary-dark);
}

.aktex-btn--secondary:hover {
    background: var(--aktex-accent-light);
    color: var(--aktex-primary-dark);
}

.aktex-btn--small {
    padding: 6px 14px;
    font-size: 13px;
}

/* ─── Hinweisboxen ─────────────────────────────────────── */

.aktex-hint {
    font-size: 13px;
    color: var(--aktex-text-light);
    margin-top: 4px;
}

.aktex-hint-box {
    background: var(--aktex-info-bg);
    border: 1px solid #bee3f8;
    border-radius: var(--aktex-radius);
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 14px;
    color: var(--aktex-primary);
    line-height: 1.5;
}

/* ─── Header ───────────────────────────────────────────── */

.aktex-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.aktex-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--aktex-primary);
}

.aktex-header-meta {
    font-size: 13px;
    color: var(--aktex-text-light);
}

.aktex-header-meta a {
    color: var(--aktex-primary);
}

.aktex-back {
    display: inline-block;
    font-size: 13px;
    color: var(--aktex-text-light);
    text-decoration: none;
    margin-bottom: 8px;
}

.aktex-back:hover {
    color: var(--aktex-primary);
}

/* ─── Projekt-Grid (Dashboard) ─────────────────────────── */

.aktex-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.aktex-project-card {
    display: block;
    background: var(--aktex-white);
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    padding: 20px;
    text-decoration: none;
    color: var(--aktex-text);
    box-shadow: var(--aktex-shadow);
    transition: box-shadow .2s, border-color .2s;
}

.aktex-project-card:hover {
    box-shadow: var(--aktex-shadow-hover);
    border-color: var(--aktex-primary);
    text-decoration: none;
    color: var(--aktex-text);
}

.aktex-project-card h3 {
    margin: 0 0 6px 0;
    font-size: 17px;
    color: var(--aktex-primary);
}

.aktex-project-desc {
    font-size: 14px;
    color: var(--aktex-text-light);
    margin: 0 0 10px 0;
}

.aktex-project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--aktex-text-light);
}

.aktex-project-activity {
    font-size: 12px;
    color: var(--aktex-text-light);
    margin: 8px 0 0 0;
}

/* ─── Badges ───────────────────────────────────────────── */

.aktex-badge {
    display: inline-block;
    background: var(--aktex-accent);
    color: var(--aktex-primary-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.aktex-badge--green {
    background: #c6f6d5;
    color: var(--aktex-success);
}

.aktex-badge--orange {
    background: #feebc8;
    color: #c05621;
}

.aktex-badge--blue {
    background: #bee3f8;
    color: #2b6cb0;
}

.aktex-badge--new {
    background: #c6f6d5;
    color: #276749;
    font-size: 11px;
    padding: 1px 7px;
    margin-left: 6px;
    vertical-align: middle;
    animation: aktex-badge-pulse 2s ease-in-out 3;
}

@keyframes aktex-badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.aktex-type-badge {
    display: inline-block;
    background: var(--aktex-bg);
    color: var(--aktex-text-light);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.05em;
    vertical-align: middle;
    margin-left: 8px;
}

/* ─── Dokument-Grid (Projektansicht) ───────────────────── */

.aktex-doc-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 32px;
}

.aktex-doc-card-wrap {
    position: relative;
}

.aktex-doc-card-wrap .aktex-bulk-check {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.aktex-doc-card-wrap .aktex-bulk-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--aktex-primary);
}

.aktex-doc-card-wrap .aktex-card-preview-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: var(--aktex-white);
    border: 1px solid var(--aktex-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s, background .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    padding: 0;
}

.aktex-doc-card-wrap:hover .aktex-card-preview-btn {
    opacity: 1;
}

.aktex-doc-card-wrap .aktex-card-preview-btn:hover {
    background: var(--aktex-primary);
    color: #fff;
    border-color: var(--aktex-primary);
}

.aktex-doc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--aktex-white);
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    padding: 14px 18px;
    text-decoration: none;
    color: var(--aktex-text);
    transition: box-shadow .2s, border-color .2s;
}

.aktex-doc-card:hover {
    box-shadow: var(--aktex-shadow-hover);
    border-color: var(--aktex-primary);
    text-decoration: none;
    color: var(--aktex-text);
}

.aktex-doc-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.aktex-doc-info h4 {
    margin: 0;
    font-size: 15px;
    color: var(--aktex-primary);
}

.aktex-doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--aktex-text-light);
    margin-top: 4px;
}

/* ─── Upload-Box ───────────────────────────────────────── */

.aktex-upload-box {
    background: var(--aktex-bg);
    border: 1px dashed var(--aktex-border);
    border-radius: var(--aktex-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.aktex-upload-box h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: var(--aktex-primary);
}

.aktex-upload-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.aktex-upload-fields .aktex-field:first-child {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .aktex-upload-fields {
        grid-template-columns: 1fr;
    }
}

/* ─── Versionsliste ────────────────────────────────────── */

.aktex-version-list {
    display: grid;
    gap: 12px;
    margin-bottom: 32px;
}

.aktex-version-item {
    background: var(--aktex-white);
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    padding: 16px;
}

.aktex-version-item--latest {
    border-color: var(--aktex-primary);
    border-width: 2px;
}

.aktex-version-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.aktex-version-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--aktex-text-light);
    margin-bottom: 8px;
}

.aktex-version-note {
    font-size: 13px;
    color: var(--aktex-text);
    background: var(--aktex-bg);
    padding: 6px 10px;
    border-radius: 4px;
    margin: 0 0 10px 0;
    font-style: italic;
}

/* ─── Aktivitätsprotokoll ─────────────────────────────── */

.aktex-activity-log {
    background: var(--aktex-white);
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    overflow: hidden;
}

.aktex-activity-entry {
    padding: 10px 16px;
    border-bottom: 1px solid var(--aktex-border);
    font-size: 14px;
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.aktex-activity-entry:last-child {
    border-bottom: none;
}

.aktex-activity-time {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--aktex-text-light);
    min-width: 150px;
}

.aktex-activity-msg {
    color: var(--aktex-text);
}

/* ─── Leer-Zustand ─────────────────────────────────────── */

.aktex-empty {
    text-align: center;
    color: var(--aktex-text-light);
    padding: 32px;
    font-size: 14px;
}

/* ─── Filter-Leiste (v1.3.0) ──────────────────────────── */

.aktex-filter-bar {
    background: var(--aktex-white);
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    padding: 14px 16px;
    margin-bottom: 20px;
}

.aktex-filter-form {
    margin: 0;
}

.aktex-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.aktex-filter-field {
    flex: 0 1 auto;
}

.aktex-filter-field--search {
    flex: 1 1 200px;
    min-width: 150px;
}

.aktex-filter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    font-size: 14px;
    font-family: var(--aktex-font);
    color: var(--aktex-text);
    background: var(--aktex-white);
    box-sizing: border-box;
}

.aktex-filter-input:focus {
    outline: none;
    border-color: var(--aktex-primary);
    box-shadow: 0 0 0 2px rgba(26, 54, 93, .1);
}

.aktex-filter-select {
    padding: 8px 12px;
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    font-size: 13px;
    font-family: var(--aktex-font);
    color: var(--aktex-text);
    background: var(--aktex-white);
    cursor: pointer;
    min-width: 130px;
}

.aktex-filter-select:focus {
    outline: none;
    border-color: var(--aktex-primary);
}

/* ─── Notification-Toggle (v1.3.0) ────────────────────── */

.aktex-notif-toggle {
    text-decoration: none;
    color: var(--aktex-text-light);
    font-size: 13px;
    transition: color 0.15s;
}

.aktex-notif-toggle:hover {
    color: var(--aktex-primary);
}

/* ─── Responsive ───────────────────────────────────────── */

/* ─── Q&A-Kacheln (Dokumentansicht) ──────────────────── */

.aktex-qa-section {
    margin-bottom: 32px;
}

.aktex-qa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.aktex-qa-header h3 {
    margin: 0;
}

.aktex-qa-counts {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.aktex-qa-filter-link {
    display: inline-block;
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--aktex-text-light);
    background: var(--aktex-bg);
    transition: all 0.15s;
}

.aktex-qa-filter-link:hover {
    background: var(--aktex-border);
    color: var(--aktex-text);
}

.aktex-qa-filter-link--active {
    background: var(--aktex-primary);
    color: #fff;
}

.aktex-qa-filter-link--active:hover {
    background: var(--aktex-primary-dark);
    color: #fff;
}

/* Neue Frage stellen */
.aktex-qa-new {
    background: var(--aktex-bg);
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    padding: 16px;
    margin-bottom: 20px;
}

.aktex-qa-new textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--aktex-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.aktex-qa-new textarea:focus {
    outline: none;
    border-color: var(--aktex-primary);
    box-shadow: 0 0 0 2px rgba(26, 60, 110, 0.12);
}

.aktex-qa-new .aktex-btn {
    margin-top: 8px;
}

/* Frage-Kacheln */
.aktex-qa-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aktex-qa-card {
    background: #fff;
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    padding: 16px;
    border-left: 4px solid var(--aktex-border);
}

.aktex-qa-card--open {
    border-left-color: #ed8936;
}

.aktex-qa-card--answered {
    border-left-color: #4299e1;
}

.aktex-qa-card--resolved {
    border-left-color: var(--aktex-success);
    opacity: 0.85;
}

.aktex-qa-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.aktex-qa-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.aktex-qa-date {
    color: var(--aktex-text-light);
    font-size: 12px;
}

.aktex-qa-text {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    color: var(--aktex-text);
}

/* Antworten innerhalb einer Kachel */
.aktex-qa-answers {
    border-top: 1px solid var(--aktex-border);
    padding-top: 12px;
    margin-bottom: 12px;
}

.aktex-qa-answer {
    background: var(--aktex-bg);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.aktex-qa-answer:last-child {
    margin-bottom: 0;
}

.aktex-qa-answer-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 4px;
}

.aktex-qa-answer-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--aktex-text);
}

/* Aktionsleiste */
.aktex-qa-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.aktex-qa-status-form {
    display: inline;
}

/* Antwort-Aufklapper */
.aktex-qa-reply {
    display: inline;
}

.aktex-qa-reply > summary {
    cursor: pointer;
    list-style: none;
}

.aktex-qa-reply > summary::-webkit-details-marker {
    display: none;
}

.aktex-qa-reply-form {
    margin-top: 10px;
    padding: 12px;
    background: var(--aktex-bg);
    border-radius: 6px;
    border: 1px solid var(--aktex-border);
}

.aktex-qa-reply-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--aktex-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 50px;
}

.aktex-qa-reply-form textarea:focus {
    outline: none;
    border-color: var(--aktex-primary);
}

.aktex-qa-reply-form .aktex-btn {
    margin-top: 6px;
}

/* Button-Varianten für Q&A */
.aktex-btn--outline {
    background: transparent;
    border: 1px solid var(--aktex-border);
    color: var(--aktex-text);
}

.aktex-btn--outline:hover {
    background: var(--aktex-bg);
    border-color: var(--aktex-text-light);
}

.aktex-btn--success {
    background: var(--aktex-success);
    color: #fff;
}

.aktex-btn--success:hover {
    background: #276749;
}

@media (max-width: 480px) {
    .aktex-box {
        padding: 20px;
        margin: 12px;
    }

    .aktex-header {
        flex-direction: column;
    }

    .aktex-project-grid {
        grid-template-columns: 1fr;
    }

    .aktex-activity-entry {
        flex-direction: column;
        gap: 4px;
    }

    .aktex-version-meta {
        flex-direction: column;
        gap: 4px;
    }

    .aktex-qa-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .aktex-qa-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .aktex-qa-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .aktex-filter-row {
        flex-direction: column;
    }

    .aktex-filter-field,
    .aktex-filter-field--search {
        width: 100%;
        flex: 1 1 100%;
    }

    .aktex-filter-select {
        width: 100%;
    }
}

/* ── Dokumentenvorschau Frontend (v1.7.9) ── */
.aktex-preview-section {
    margin: 24px 0;
}

.aktex-preview-frame {
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
    overflow: hidden;
    background: var(--aktex-bg);
}

.aktex-preview-iframe {
    display: block;
    width: 100%;
    height: 600px;
    border: none;
}

.aktex-preview-image {
    text-align: center;
    padding: 20px;
    background: var(--aktex-bg);
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
}

.aktex-preview-image img {
    max-width: 100%;
    max-height: 600px;
    border-radius: var(--aktex-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    .aktex-preview-iframe {
        height: 400px;
    }
}

/* ── Fragen-Übersichtstabelle (v1.8.0) ── */
.aktex-qa-table-wrap {
    overflow-x: auto;
    margin: 16px 0;
}

.aktex-qa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.aktex-qa-table th {
    background: var(--aktex-bg);
    border-bottom: 2px solid var(--aktex-border);
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.aktex-qa-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--aktex-border);
    vertical-align: middle;
}

.aktex-qa-table tbody tr:hover {
    background: var(--aktex-bg);
}

.aktex-qa-col-prio {
    width: 40px;
    text-align: center !important;
}

.aktex-prio-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
}

.aktex-qa-link {
    color: var(--aktex-primary);
    text-decoration: none;
}

.aktex-qa-link:hover {
    text-decoration: underline;
}

.aktex-center {
    text-align: center;
}

.aktex-status-badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.aktex-status--open .aktex-status-badge,
.aktex-status-badge.aktex-status--open {
    background: #fff3cd;
    color: #856404;
}

.aktex-status--answered .aktex-status-badge,
.aktex-status-badge.aktex-status--answered {
    background: #d1ecf1;
    color: #0c5460;
}

.aktex-status--resolved .aktex-status-badge,
.aktex-status-badge.aktex-status--resolved {
    background: #d4edda;
    color: #155724;
}

/* Rückfrage-Status (v2.25.2) */
.aktex-status-badge.aktex-status--followup {
    background: #fef3cd;
    color: #92610e;
    border: 1px solid #f0d06e;
}

.aktex-prio-badge {
    font-size: 12px;
    font-weight: 500;
}

.aktex-assigned-badge {
    font-size: 12px;
    color: #666;
}

.aktex-empty-state {
    padding: 20px;
    text-align: center;
    color: #888;
    background: var(--aktex-bg);
    border-radius: var(--aktex-radius);
    border: 1px dashed var(--aktex-border);
}

.aktex-meta-inline {
    color: #888;
    font-size: 14px;
    margin-left: 8px;
}

/* ── Feld-Layout Zweispaltig (v1.8.0) ── */
.aktex-field-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.aktex-field--half {
    flex: 1;
    min-width: 0;
}

.aktex-field--half select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
}

/* ── Aktivitaetsprotokoll (v1.8.0) ── */
.aktex-activity-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--aktex-border);
}

.aktex-activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.aktex-activity-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.aktex-activity-time {
    color: #888;
    white-space: nowrap;
    min-width: 140px;
}

.aktex-activity-msg {
    color: #333;
}

@media (max-width: 768px) {
    .aktex-field-row {
        flex-direction: column;
        gap: 8px;
    }

    .aktex-qa-table {
        font-size: 13px;
    }

    .aktex-activity-item {
        flex-direction: column;
        gap: 2px;
    }

    .aktex-activity-time {
        min-width: auto;
    }
}

/* ── Mandanten-Gruppierung im Dashboard (v1.8.1) ── */
.aktex-tenant-group {
    margin-bottom: 32px;
}

.aktex-tenant-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--aktex-border);
}

.aktex-tenant-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--aktex-radius);
    background: #fff;
    border: 1px solid var(--aktex-border);
    padding: 4px;
}

.aktex-tenant-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* ── Mandanten-Bar in Projektansicht + Dokumentansicht (v1.8.1) ── */
.aktex-tenant-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    background: var(--aktex-bg);
    border: 1px solid var(--aktex-border);
    border-radius: var(--aktex-radius);
}

.aktex-tenant-logo--small {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.aktex-tenant-bar-name {
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

/* ── v1.9.0: Projektansicht Redesign ── */

.aktex-section {
    margin-bottom: 32px;
}
.aktex-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.aktex-section-header h3 {
    margin: 0;
}

/* Toggle-Button (Upload ein-/ausklappen) */
.aktex-toggle-icon {
    display: inline-block;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.2s ease;
}
.aktex-rotate {
    transform: rotate(45deg);
}
.aktex-hidden {
    display: none !important;
}

/* Upload-Panel Animation */
.aktex-upload-box {
    animation: aktex-slide-down 0.2s ease-out;
}
@keyframes aktex-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Tabs */
.aktex-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #ddd;
    margin-bottom: 16px;
}
.aktex-tab {
    padding: 8px 16px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.aktex-tab:hover {
    color: #2271b1;
}
.aktex-tab--active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    font-weight: 600;
}

/* Fragen-Tabelle: Faelligkeit */
.aktex-overdue {
    color: #d63638 !important;
    font-weight: 600;
}
.aktex-due-today {
    color: #dba617 !important;
    font-weight: 600;
}
.aktex-td-secondary {
    color: #666;
    font-size: 13px;
}
.aktex-qa-link {
    color: #2271b1;
    text-decoration: none;
}
.aktex-qa-link:hover {
    text-decoration: underline;
}
.aktex-badge--warning {
    background: #fcf0e3;
    color: #bd5b00;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* Drei-Spalten Formularfelder */
.aktex-field--third {
    flex: 1 1 30%;
    min-width: 140px;
}

/* Details/Summary (Aktivitaetsprotokoll) */
.aktex-details {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
}
.aktex-details-summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
}
.aktex-details-summary::-webkit-details-marker {
    display: none;
}
.aktex-details-summary::before {
    content: "▸ ";
    font-size: 14px;
    color: #888;
}
.aktex-details[open] .aktex-details-summary::before {
    content: "▾ ";
}

/* Responsive: Fragen-Tabelle */
@media (max-width: 768px) {
    .aktex-qa-table th:nth-child(3),
    .aktex-qa-table td:nth-child(3),
    .aktex-qa-table th:nth-child(4),
    .aktex-qa-table td:nth-child(4) {
        display: none;
    }
    .aktex-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .aktex-tabs {
        overflow-x: auto;
    }
    .aktex-field--third {
        flex: 1 1 100%;
    }
}

/* ── v1.9.1: Aufklappbare QA-Karten + Diskussionsbaum ── */

/* Alte Karten-Styles entfernt – jetzt Inline-Expand in Tabelle */

.aktex-qa-detail-row td {
    padding: 0 !important;
    border-top: none !important;
}
.aktex-qa-inline-detail {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: left;
}
.aktex-qa-fulltext {
    margin-bottom: 12px;
}

/* Expand-Button in Tabellenzeile */
.aktex-expand-btn {
    background: #2271b1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    width: 36px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    font-weight: bold;
}
.aktex-expand-btn:hover {
    background: #135e96;
}

/* Drag & Drop für QA-Tabelle */
.aktex-drag-handle:hover {
    color: #2271b1 !important;
}

.aktex-qa-row[draggable="true"] {
    transition: opacity 0.2s;
}

.aktex-drag-placeholder td {
    background: #2271b1 !important;
}

/* Klickbare Tabellenzeile */
.aktex-qa-row {
    cursor: default;
}
.aktex-qa-row:hover {
    background: #f8f9fa;
}

/* Badge klein (Faelligkeit in Tabellenzeile) */
.aktex-badge--small {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 6px;
    background: #f0f0f0;
    color: #555;
    white-space: nowrap;
    display: inline-block;
}
.aktex-badge--small.aktex-overdue {
    background: #fce4e4;
    color: #d63638;
    font-weight: 600;
}
.aktex-badge--small.aktex-due-today {
    background: #fcf0e3;
    color: #bd5b00;
    font-weight: 600;
}
.aktex-badge--small.aktex-due-done {
    background: #e6ffed;
    color: #00a32a;
    font-weight: 600;
    text-decoration: line-through;
}
.aktex-badge--completed {
    display: inline-block;
    background: #00a32a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}
.aktex-project-card--completed {
    border-left: 4px solid #00a32a;
    opacity: 0.85;
}
.aktex-project-card--completed:hover {
    opacity: 1;
}

/* Antwort-Einrueckung (Baum) */
.aktex-answer {
    border-left: 2px solid #e0e0e0;
    padding-left: 12px;
    margin-top: 8px;
}

/* Reply-Button inline */
.aktex-reply-toggle {
    margin-top: 4px;
}
.aktex-reply-btn {
    cursor: pointer;
    color: #2271b1;
    font-size: 12px;
    border: none;
    background: none;
    padding: 2px 0;
}
.aktex-reply-btn:hover {
    text-decoration: underline;
}

/* ── v1.9.4: Dokument-Metadaten-Karte ── */

.aktex-doc-meta-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    background: #fff;
}
.aktex-doc-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px 24px;
    margin-bottom: 16px;
}
.aktex-doc-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.aktex-doc-meta-item--wide {
    grid-column: 1 / -1;
}
.aktex-doc-meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
}
.aktex-doc-meta-item > span:last-child {
    font-size: 14px;
    color: #333;
}
.aktex-doc-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

/* Vorschau lazy-load */
.aktex-preview-section {
    margin-bottom: 24px;
    animation: aktex-slide-down 0.2s ease-out;
}

/* ── v1.9.5: Logo gross + rechtsbuendig, Scope-Badges ── */

.aktex-header--with-logo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}
.aktex-header-logo {
    flex-shrink: 0;
}
.aktex-tenant-logo--large {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
    border-radius: 4px;
}
.aktex-tenant-name-inline {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/* Scope-Badge (Projekt vs Dokument) */
.aktex-scope-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.aktex-scope-badge--project {
    background: #e8f0fe;
    color: #1a56db;
    font-weight: 600;
}
.aktex-scope-badge--document {
    background: #f0f0f0;
    color: #555;
}

@media (max-width: 600px) {
    .aktex-header--with-logo {
        flex-direction: column-reverse;
        align-items: center;
    }
    .aktex-tenant-logo--large {
        max-height: 60px;
        margin-bottom: 8px;
    }
}

/* ── v1.9.6: Dashboard ueberarbeitet ── */

.aktex-tenant-header--large {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
}
/* Erledigt-Badge auf Projektkachel */
.aktex-project-card {
    position: relative;
}
.aktex-card-badge-done {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #00a32a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 163, 42, 0.3);
    z-index: 2;
}
.aktex-tenant-divider {
    border: none;
    border-top: 2px solid #ddd;
    margin: 32px 0;
}

/* Projektkarten-Erweiterungen */
.aktex-project-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}
.aktex-project-card-top h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.aktex-project-card--overdue {
    border-left: 3px solid #d63638 !important;
}
.aktex-project-card--open {
    border-left: 3px solid #dba617 !important;
}
.aktex-project-card--done {
    border-left: 3px solid #2e7d32 !important;
}
.aktex-badge--success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* ── v1.9.7: Frontend-Navigation ── */

.aktex-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 20px;
    background: #1d2327;
    border-radius: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.aktex-nav-brand {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    letter-spacing: 0.5px;
    text-decoration: none;
    flex-shrink: 0;
}
.aktex-nav-brand:hover {
    color: #e0e0e0;
}

/* Breadcrumbs */
.aktex-nav-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.aktex-nav-crumb {
    color: #ccc;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    transition: background 0.15s, color 0.15s;
}
a.aktex-nav-crumb:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.aktex-nav-crumb--active {
    color: #fff;
    font-weight: 600;
}
.aktex-nav-sep {
    color: #666;
    font-size: 12px;
    margin: 0 2px;
}

/* Rechte Seite */
.aktex-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.aktex-nav-link {
    color: #ccc;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
}
.aktex-nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.aktex-nav-link--active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-weight: 600;
}
.aktex-nav-divider {
    color: #555;
    font-size: 12px;
}
.aktex-nav-user-name {
    color: #aaa;
    font-size: 13px;
}
.aktex-nav-logout {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
}
.aktex-nav-logout:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ── User-Dropdown ── */
.aktex-user-dropdown {
    position: relative;
}
.aktex-user-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 4px 10px 4px 4px;
    cursor: pointer;
    color: #ddd;
    font-size: 13px;
    transition: background 0.15s;
}
.aktex-user-trigger:hover {
    background: rgba(255,255,255,0.15);
}
.aktex-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}
.aktex-user-avatar svg {
    display: block;
}
.aktex-user-trigger-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aktex-user-chevron {
    font-size: 10px;
    color: #999;
    transition: transform 0.15s;
}
.aktex-user-dropdown--open .aktex-user-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu */
/* ── User Dropdown Menu (v2.19.2) ── */
.aktex-user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    min-width: 280px;
    z-index: 200;
    overflow: hidden;
}
.aktex-user-dropdown--open .aktex-user-menu {
    display: block;
    animation: aktex-slide-down 0.15s ease-out;
}

/* Header */
.aktex-um-header {
    padding: 16px 18px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.aktex-um-name {
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
    line-height: 1.3;
}
.aktex-um-email {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    word-break: break-all;
}
.aktex-um-role {
    display: inline-block;
    font-size: 11px;
    color: #2271b1;
    background: #e8f0fe;
    padding: 2px 10px;
    border-radius: 10px;
    margin-top: 8px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.aktex-um-stats {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

/* Groups */
.aktex-um-group {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
.aktex-um-group--last {
    border-bottom: none;
}
.aktex-um-group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    padding: 6px 18px 4px;
}

/* Menu Items (no underlines!) */
.aktex-um-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 9px 18px;
    font-size: 13px;
    color: #333;
    text-decoration: none !important;
    transition: background 0.12s;
    cursor: pointer;
    line-height: 1.4;
}
.aktex-um-item:hover {
    background: #f7f7f7;
    text-decoration: none !important;
    color: #333;
}
.aktex-um-item:visited {
    color: #333;
    text-decoration: none !important;
}
.aktex-um-item--danger {
    color: #d63638;
}
.aktex-um-item--danger:hover {
    background: #fef1f1;
    color: #d63638;
}
.aktex-um-item--danger:visited {
    color: #d63638;
}

/* Icons in menu items */
.aktex-um-icon {
    display: inline-flex;
    width: 22px;
    flex-shrink: 0;
    font-size: 14px;
    text-align: center;
}

/* Badge (for emergency codes count) */
.aktex-um-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    padding: 1px 7px;
    border-radius: 8px;
    margin-left: 6px;
    line-height: 1.5;
}
.aktex-um-badge--outline {
    background: transparent;
    color: #2271b1;
    border: 1px solid #2271b1;
    font-weight: 600;
    font-size: 10px;
    padding: 0 6px;
}

/* Settings row (toggle items) */
.aktex-um-setting {
    padding: 4px 18px;
}
.aktex-um-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
}
.aktex-um-setting-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #333;
}

/* Toggle Switch */
.aktex-um-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 11px;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    text-decoration: none !important;
    outline: none;
}
.aktex-um-toggle:hover {
    background: #bbb;
}
.aktex-um-toggle--on {
    background: #2271b1;
}
.aktex-um-toggle--on:hover {
    background: #1a5e9a;
}
.aktex-um-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.aktex-um-toggle--on .aktex-um-toggle-knob {
    transform: translateX(18px);
}

/* Segmented Control */
.aktex-um-segmented {
    display: flex;
    background: #f0f0f0;
    border-radius: 6px;
    padding: 2px;
    margin-top: 8px;
    gap: 2px;
}
.aktex-um-seg {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 8px;
    font-size: 12px;
    color: #666;
    text-decoration: none !important;
    border-radius: 5px;
    transition: all 0.15s;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.3;
}
.aktex-um-seg:hover {
    color: #333;
    background: rgba(255,255,255,0.5);
    text-decoration: none !important;
}
.aktex-um-seg:visited {
    color: #666;
    text-decoration: none !important;
}
.aktex-um-seg--active {
    background: #fff;
    color: #2271b1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-weight: 600;
}
.aktex-um-seg--active:hover {
    background: #fff;
    color: #2271b1;
}
.aktex-um-seg--active:visited {
    color: #2271b1;
}
.aktex-um-seg-icon {
    font-size: 12px;
}

/* ── Tooltips ── */

.aktex-tooltip-wrap {
    position: relative;
    display: inline-block;
    cursor: help;
}
.aktex-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #555;
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    vertical-align: middle;
}
.aktex-tooltip-text {
    display: none;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    width: max-content;
    max-width: 280px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    white-space: normal;
}
.aktex-tooltip-wrap:hover .aktex-tooltip-text {
    display: block;
}

/* ── Hilfe-Seite ── */

.aktex-help {
    max-width: 900px;
}
.aktex-help h2 {
    margin-bottom: 8px;
}
.aktex-help-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.aktex-help-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.aktex-help-card > summary {
    cursor: pointer;
    padding: 14px 20px;
    list-style: none;
    background: #f8f9fa;
    transition: background 0.15s;
}
.aktex-help-card > summary:hover {
    background: #eef1f4;
}
.aktex-help-card > summary::-webkit-details-marker {
    display: none;
}
.aktex-help-card > summary h3 {
    margin: 0;
    font-size: 15px;
    display: inline;
}
.aktex-help-card > summary::before {
    content: "▸ ";
    font-size: 12px;
    color: #888;
}
.aktex-help-card[open] > summary::before {
    content: "▾ ";
}
.aktex-help-content {
    padding: 12px 20px 20px;
}
.aktex-help-content p {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.6;
}
.aktex-help-content ul {
    margin: 0 0 8px;
    padding-left: 20px;
}
.aktex-help-content li {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 4px;
}
.aktex-help-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
}
.aktex-help-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

@media (max-width: 600px) {
    .aktex-nav {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    .aktex-nav-breadcrumbs {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .aktex-nav-crumb {
        max-width: 140px;
    }
    .aktex-nav-right {
        width: 100%;
        justify-content: center;
    }
}

/* ── v2.1.0: User-Menü Stats ── */
/* (user-menu-stats removed – now in .aktex-um-stats) */

/* ── v2.1.0: Profil-Card ── */
.aktex-profile-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px 32px;
    max-width: 500px;
}
.aktex-profile-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
}
.aktex-form-group {
    margin-bottom: 16px;
}
.aktex-form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    color: #333;
}
.aktex-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
.aktex-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}
.aktex-input:disabled {
    background: #f5f5f5;
    color: #888;
}
.aktex-form-hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}
.aktex-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

/* ── v2.1.0: Dark Mode ── */
@keyframes aktex-slide-down {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

body.aktex-dark .aktex-dashboard,
body.aktex-dark .aktex-project,
body.aktex-dark .aktex-document,
body.aktex-dark .aktex-help {
    background: #1a1a2e;
    color: #e0e0e0;
}
body.aktex-dark .aktex-project-card,
body.aktex-dark .aktex-profile-card,
body.aktex-dark .aktex-doc-card,
body.aktex-dark .aktex-qa-table,
body.aktex-dark .aktex-help-card,
body.aktex-dark .aktex-hint-box,
body.aktex-dark .aktex-meta-card,
body.aktex-dark .aktex-activity-feed {
    background: #16213e;
    border-color: #2a2a4a;
    color: #d0d0d0;
}
body.aktex-dark .aktex-help-card > summary {
    background: #1a1a3a;
    color: #d0d0d0;
}
body.aktex-dark .aktex-help-card > summary:hover {
    background: #222250;
}
body.aktex-dark h2, body.aktex-dark h3 {
    color: #e8e8e8;
}
body.aktex-dark a {
    color: #64b5f6;
}
body.aktex-dark .aktex-btn {
    background: #2271b1;
    color: #fff;
}
body.aktex-dark .aktex-btn--outline {
    background: transparent;
    border-color: #64b5f6;
    color: #64b5f6;
}
body.aktex-dark .aktex-filter-input,
body.aktex-dark .aktex-filter-select,
body.aktex-dark .aktex-input {
    background: #0f3460;
    border-color: #2a2a4a;
    color: #e0e0e0;
}
body.aktex-dark .aktex-tenant-divider {
    border-color: #2a2a4a;
}
body.aktex-dark .aktex-type-badge,
body.aktex-dark .aktex-status-badge {
    background: #2a2a4a;
    color: #aaa;
}
body.aktex-dark .aktex-qa-table th {
    background: #1a1a3a;
    color: #ccc;
}
body.aktex-dark .aktex-qa-table td {
    border-color: #2a2a4a;
}
body.aktex-dark .aktex-back {
    color: #64b5f6;
}
body.aktex-dark .aktex-tenant-name-inline {
    color: #aaa;
}
body.aktex-dark .aktex-preview-section {
    background: #16213e;
    border-color: #2a2a4a;
}
body.aktex-dark .aktex-user-menu {
    background: #16213e;
    border-color: #2a2a4a;
}
body.aktex-dark .aktex-um-header {
    background: #1a1a3a;
    border-color: #2a2a4a;
}
body.aktex-dark .aktex-um-name {
    color: #e8e8e8;
}
body.aktex-dark .aktex-um-email {
    color: #888;
}
body.aktex-dark .aktex-um-role {
    background: #1e3a5f;
    color: #6bb5ff;
}
body.aktex-dark .aktex-um-stats {
    color: #888;
}
body.aktex-dark .aktex-um-group {
    border-color: #2a2a4a;
}
body.aktex-dark .aktex-um-group-label {
    color: #666;
}
body.aktex-dark .aktex-um-item {
    color: #ccc;
}
body.aktex-dark .aktex-um-item:hover {
    background: #1a1a3a;
    color: #e8e8e8;
}
body.aktex-dark .aktex-um-item:visited {
    color: #ccc;
}
body.aktex-dark .aktex-um-item--danger {
    color: #f87171;
}
body.aktex-dark .aktex-um-item--danger:hover {
    background: #2a1a1a;
    color: #f87171;
}
body.aktex-dark .aktex-um-setting-label {
    color: #ccc;
}
body.aktex-dark .aktex-um-toggle {
    background: #444;
}
body.aktex-dark .aktex-um-toggle--on {
    background: #2271b1;
}
body.aktex-dark .aktex-um-segmented {
    background: #1a1a3a;
}
body.aktex-dark .aktex-um-seg {
    color: #888;
}
body.aktex-dark .aktex-um-seg:visited {
    color: #888;
}
body.aktex-dark .aktex-um-seg--active {
    background: #2a2a4a;
    color: #6bb5ff;
}
body.aktex-dark .aktex-um-seg--active:visited {
    color: #6bb5ff;
}
body.aktex-dark .aktex-um-badge--outline {
    color: #6bb5ff;
    border-color: #6bb5ff;
}
body.aktex-dark .aktex-version-row {
    border-color: #2a2a4a;
}
body.aktex-dark .aktex-activity-item {
    border-color: #2a2a4a;
    color: #bbb;
}

/* ═══════════════════════════════════════════════════
 * v2.2.0: Vorschau-Modal
 * ═══════════════════════════════════════════════════ */

.aktex-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aktex-modal.aktex-hidden { display: none; }

.aktex-modal-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}
.aktex-modal-container {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 90vw;
    max-width: 960px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: aktex-modal-in 0.2s ease-out;
}
@keyframes aktex-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.aktex-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}
.aktex-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aktex-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
    border-radius: 4px;
}
.aktex-modal-close:hover { color: #c00; background: #f5f5f5; }

.aktex-modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
    position: relative;
}

/* Loading-Spinner */
.aktex-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
}
.aktex-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: aktex-spin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes aktex-spin { to { transform: rotate(360deg); } }

/* Fehler */
.aktex-preview-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #c00;
    padding: 24px;
    text-align: center;
}

/* PDF im Modal */
.aktex-modal-body .aktex-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Bild im Modal */
.aktex-preview-img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 16px auto;
    object-fit: contain;
}

/* ── DOCX-Vorschau ── */
.aktex-preview-docx {
    padding: 16px;
    overflow: auto;
    height: 100%;
}
.aktex-preview-docx .aktex-docx-wrapper {
    background: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,0.08);
    margin: 0 auto;
}
/* Page-Breaks sichtbar machen */
.aktex-preview-docx .aktex-docx-wrapper section {
    padding: 40px 50px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    background: #fff;
}
/* Kommentare in DOCX-Vorschau */
.aktex-preview-docx .aktex-docx-wrapper .comment-range-start {
    background: #fff9c4;
    border-bottom: 2px solid #f9a825;
}
.aktex-preview-docx .aktex-docx-wrapper .comment-reference {
    display: inline-block;
    background: #f9a825;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    vertical-align: super;
    margin-left: 2px;
    cursor: help;
}
.aktex-preview-docx .comment-list {
    margin-top: 24px;
    padding: 16px;
    background: #fffde7;
    border: 1px solid #ffe082;
    border-radius: 6px;
}
.aktex-preview-docx .comment-list .comment-item {
    padding: 8px 0;
    border-bottom: 1px solid #ffe082;
    font-size: 13px;
}
.aktex-preview-docx .comment-list .comment-item:last-child {
    border-bottom: none;
}
.aktex-preview-docx .comment-list .comment-author {
    font-weight: 600;
    color: #e65100;
}
.aktex-preview-docx .comment-list .comment-date {
    font-size: 11px;
    color: #888;
    margin-left: 8px;
}

/* ── XLSX-Vorschau ── */
.aktex-xlsx-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    padding: 0 12px;
    background: #f8f9fa;
    flex-shrink: 0;
    overflow-x: auto;
}
.aktex-xlsx-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}
.aktex-xlsx-tab:hover { color: #333; background: #eee; }
.aktex-xlsx-tab--active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    font-weight: 600;
}
.aktex-xlsx-content {
    overflow: auto;
    flex: 1;
    padding: 0;
}
.aktex-xlsx-sheet table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
    font-size: 12px;
}
.aktex-xlsx-sheet table td,
.aktex-xlsx-sheet table th {
    border: 1px solid #ddd;
    padding: 4px 8px;
    text-align: left;
    white-space: nowrap;
}
.aktex-xlsx-sheet table tr:first-child td,
.aktex-xlsx-sheet table tr:first-child th {
    background: #f0f4f8;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}
.aktex-xlsx-sheet table tr:nth-child(even) td {
    background: #fafafa;
}

/* ── Dark Mode: Modal ── */
body.aktex-dark .aktex-modal-container {
    background: #16213e;
}
body.aktex-dark .aktex-modal-header {
    border-color: #2a2a4a;
}
body.aktex-dark .aktex-modal-header h3 { color: #e0e0e0; }
body.aktex-dark .aktex-modal-close { color: #aaa; }
body.aktex-dark .aktex-modal-close:hover { color: #f66; background: #1a1a3a; }
body.aktex-dark .aktex-preview-docx { background: #1a1a2e; }
body.aktex-dark .aktex-preview-docx .aktex-docx-wrapper section { background: #fff; }
body.aktex-dark .aktex-xlsx-tabs { background: #1a1a3a; border-color: #2a2a4a; }
body.aktex-dark .aktex-xlsx-tab { color: #aaa; }
body.aktex-dark .aktex-xlsx-tab--active { color: #64b5f6; border-color: #64b5f6; }
body.aktex-dark .aktex-xlsx-sheet table td { border-color: #2a2a4a; color: #ccc; }
body.aktex-dark .aktex-xlsx-sheet table tr:first-child td,
body.aktex-dark .aktex-xlsx-sheet table tr:first-child th { background: #1a1a3a; color: #ddd; }
body.aktex-dark .aktex-xlsx-sheet table tr:nth-child(even) td { background: #0f1a30; }

/* ── Responsive Modal ── */
@media (max-width: 600px) {
    .aktex-modal-container {
        width: 98vw;
        height: 92vh;
        border-radius: 6px;
    }
    .aktex-preview-docx .aktex-docx-wrapper section {
        padding: 16px;
    }
}

/* ── v2.3.0: Aufgaben-Checkbox ── */
.aktex-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}
.aktex-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ── v2.3.1: Mandanten-Karten auf dem Dashboard ── */
.aktex-tenant-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 12px;
}
.aktex-tenant-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.aktex-tenant-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.aktex-tenant-card-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}
.aktex-tenant-card-body {
    font-size: 13px;
    color: #555;
}
.aktex-tenant-card-body p {
    margin: 2px 0;
}
.aktex-tenant-card-footer {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

/* Dark Mode */
body.aktex-dark .aktex-tenant-card {
    background: #16213e;
    border-color: #2a2a4a;
}
body.aktex-dark .aktex-tenant-card-body { color: #bbb; }
body.aktex-dark .aktex-tenant-card-footer { border-color: #2a2a4a; }

/* ── Zusammenfassung / Überblick ── */
.aktex-summary-content p {
    margin: 0 0 8px;
}
.aktex-summary-content p:last-child {
    margin-bottom: 0;
}
.aktex-summary-content ul,
.aktex-summary-content ol {
    margin: 6px 0 10px 20px;
    padding: 0;
}
.aktex-summary-content li {
    margin-bottom: 3px;
}
.aktex-summary-content strong { font-weight: 700; }
.aktex-summary-content em { font-style: italic; }
.aktex-summary-content u { text-decoration: underline; }
.aktex-summary-content a {
    color: #2271b1;
    text-decoration: underline;
}

/* ── Collapsible Sections (details/summary) ── */
.aktex-collapsible-section summary::-webkit-details-marker { display: none; }
.aktex-collapsible-section summary::marker { content: ''; }
.aktex-collapsible-section .aktex-toggle-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}
.aktex-collapsible-section[open] .aktex-toggle-arrow {
    transform: rotate(90deg);
}
.aktex-collapsible-section summary:hover {
    background: #f0f0f0 !important;
}
.aktex-collapsible-section[open] > summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

/* ── Topic Badge ── */
.aktex-topic-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e8f0fe;
    color: #1a56db;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

/* Dark Mode: Erledigt-Badge */
body.aktex-dark .aktex-badge--completed {
    background: #00802b;
    color: #fff;
}
body.aktex-dark .aktex-project-card--completed {
    border-left-color: #00802b;
}
body.aktex-dark .aktex-card-badge-done {
    background: #00802b;
    box-shadow: 0 2px 6px rgba(0, 128, 43, 0.4);
}

/* ── Fristen-Banner (v2.22.0) ── */
.aktex-deadline-banner {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid;
}
.aktex-deadline-banner--overdue {
    background: #fce4e4;
    border-left-color: #d63638;
    color: #8b1a1a;
}
.aktex-deadline-banner--soon {
    background: #fff8e5;
    border-left-color: #dba617;
    color: #6b4e00;
}
.aktex-deadline-banner--done {
    background: #e6ffed;
    border-left-color: #00a32a;
    color: #005c13;
}
.aktex-deadline-banner-header {
    margin-bottom: 6px;
    font-size: 14px;
}
.aktex-deadline-banner-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.aktex-deadline-banner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 2px 0;
}

/* ── KPI-Leiste (v2.22.0) ── */
.aktex-kpi-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 0;
}
.aktex-kpi-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid #e0e0e0;
}
.aktex-kpi-chip--amber {
    background: #fff8e5;
    color: #9a6700;
    border-color: #e8c850;
}
.aktex-kpi-chip--red {
    background: #fce4e4;
    color: #d63638;
    border-color: #f0a0a1;
    font-weight: 600;
}
.aktex-kpi-chip--blue {
    background: #f0f7ff;
    color: #2271b1;
    border-color: #b0d4f1;
}

/* ── Fristen-Sektion (v2.22.0) ── */
.aktex-deadline-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.aktex-deadline-item {
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #2271b1;
    border-radius: 6px;
    transition: box-shadow 0.15s;
}
.aktex-deadline-item:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.aktex-deadline-item--completed {
    opacity: 0.7;
}
.aktex-deadline-item-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.aktex-deadline-item-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}
.aktex-deadline-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    flex-shrink: 0;
}
.aktex-deadline-item-ref {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}
.aktex-deadline-item-ref a {
    color: #2271b1;
    text-decoration: none;
}
.aktex-deadline-item-ref a:hover {
    text-decoration: underline;
}

/* ── Danger Badge (v2.22.0) ── */
.aktex-badge--danger {
    background: #d63638;
    color: #fff;
}

/* ── Dark Mode: Fristen (v2.22.0) ── */
body.aktex-dark .aktex-deadline-banner--overdue {
    background: #3d1010;
    color: #ff9a9c;
}
body.aktex-dark .aktex-deadline-banner--soon {
    background: #3d3000;
    color: #ffd966;
}
body.aktex-dark .aktex-deadline-banner--done {
    background: #0a2e14;
    color: #6bdc8a;
}
body.aktex-dark .aktex-kpi-chip {
    background: #2c2c2c;
    color: #ccc;
    border-color: #444;
}
body.aktex-dark .aktex-kpi-chip--amber {
    background: #3a3000;
    color: #ffd966;
    border-color: #665500;
}
body.aktex-dark .aktex-kpi-chip--red {
    background: #3d1010;
    color: #ff9a9c;
    border-color: #662020;
}
body.aktex-dark .aktex-kpi-chip--blue {
    background: #0e2740;
    color: #7fb8e8;
    border-color: #1e4670;
}
body.aktex-dark .aktex-deadline-item {
    background: #1e1e1e;
    border-color: #444;
}

/* ── Responsive: Fristen (v2.22.0) ── */
@media (max-width: 600px) {
    .aktex-deadline-item-main {
        flex-direction: column;
        gap: 6px;
    }
    .aktex-deadline-item-meta {
        flex-wrap: wrap;
    }
    .aktex-kpi-bar {
        gap: 6px;
    }
    .aktex-kpi-chip {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* ════════════════════════════════════════════════════════
 * Projekt-Übersichts-Grid (v2.23.2)
 * ════════════════════════════════════════════════════════ */
.aktex-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.aktex-overview-card {
    background: var(--aktex-card-bg, #fff);
    border: 1px solid var(--aktex-border, #e0e0e0);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.aktex-overview-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.aktex-overview-card--danger {
    border-color: #f0a0a1;
}
.aktex-overview-card--warning {
    border-color: #e8c850;
}
.aktex-overview-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--aktex-border, #f0f0f1);
}
.aktex-overview-card-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--aktex-heading, #1d2327);
    flex: 1;
}
.aktex-overview-card-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.aktex-overview-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    padding: 0 6px;
}
.aktex-overview-count--amber {
    background: #dba617;
}
.aktex-overview-count--red {
    background: #d63638;
}
.aktex-overview-card-body {
    flex: 1;
    padding: 8px 16px 12px;
}
.aktex-overview-card-footer {
    display: flex;
    gap: 12px;
    padding: 8px 16px;
    background: var(--aktex-hover-bg, #f8f9fa);
    border-top: 1px solid var(--aktex-border, #f0f0f1);
    font-size: 11px;
}
.aktex-overview-stat {
    color: var(--aktex-muted, #888);
}
.aktex-overview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--aktex-border, #f5f5f5);
    font-size: 13px;
    color: var(--aktex-text, #333);
}
.aktex-overview-row:last-child {
    border-bottom: none;
}
.aktex-overview-row--danger {
    color: #d63638;
}
.aktex-overview-row--link a {
    color: var(--aktex-primary, #2271b1);
    text-decoration: none;
    font-weight: 500;
}
.aktex-overview-row--link a:hover {
    text-decoration: underline;
}
.aktex-overview-date {
    font-size: 11px;
    color: var(--aktex-muted, #999);
    white-space: nowrap;
    flex-shrink: 0;
}
.aktex-overview-meta {
    padding: 6px 0 2px;
    font-size: 12px;
    color: var(--aktex-muted, #999);
    text-align: right;
    font-style: italic;
}
.aktex-overview-empty {
    padding: 12px 0;
    font-size: 13px;
    color: var(--aktex-muted, #999);
    font-style: italic;
    text-align: center;
}
.aktex-overview-alert {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
.aktex-overview-alert--danger {
    background: #fce4e4;
    color: #d63638;
}
.aktex-overview-alert--success {
    background: #e6ffed;
    color: #00802b;
}

/* Aktivitäten in Karte */
.aktex-overview-activity-row {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid var(--aktex-border, #f5f5f5);
    align-items: flex-start;
}
.aktex-overview-activity-row:last-child {
    border-bottom: none;
}
.aktex-overview-activity-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}
.aktex-overview-activity-content {
    flex: 1;
    font-size: 12px;
    color: var(--aktex-text, #444);
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Mitglieder in Karte */
.aktex-overview-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.aktex-overview-member {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 4px 4px;
    background: var(--aktex-hover-bg, #f6f7f7);
    border-radius: 20px;
    font-size: 12px;
    color: var(--aktex-text, #333);
}
.aktex-overview-member-avatar {
    display: inline-flex;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.aktex-overview-member-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Mitglieder-Info mit Org (v2.23.3) */
.aktex-overview-member-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}
.aktex-overview-member-org {
    font-size: 10px;
    color: var(--aktex-muted, #888);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}
/* Aktivitäten-Scrollbar (v2.23.3) */
.aktex-activity-scroll {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}
.aktex-activity-scroll::-webkit-scrollbar {
    width: 5px;
}
.aktex-activity-scroll::-webkit-scrollbar-track {
    background: var(--aktex-hover-bg, #f0f0f1);
    border-radius: 3px;
}
.aktex-activity-scroll::-webkit-scrollbar-thumb {
    background: var(--aktex-border, #c3c4c7);
    border-radius: 3px;
}
.aktex-activity-scroll::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive: Overview-Grid */
@media (max-width: 768px) {
    .aktex-overview-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Dark Mode: Übersichts-Karten */
body.aktex-dark .aktex-overview-card {
    background: var(--aktex-card-bg, #23262a);
    border-color: var(--aktex-border, #3a3d42);
}
body.aktex-dark .aktex-overview-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
body.aktex-dark .aktex-overview-card-header {
    border-color: var(--aktex-border, #3a3d42);
}
body.aktex-dark .aktex-overview-card-footer {
    background: var(--aktex-hover-bg, #2a2d31);
    border-color: var(--aktex-border, #3a3d42);
}
body.aktex-dark .aktex-overview-card--danger {
    border-color: #a82428;
}
body.aktex-dark .aktex-overview-card--warning {
    border-color: #8c6900;
}
body.aktex-dark .aktex-overview-alert--danger {
    background: rgba(214,54,56,0.15);
}
body.aktex-dark .aktex-overview-alert--success {
    background: rgba(0,163,42,0.12);
}
body.aktex-dark .aktex-overview-member {
    background: var(--aktex-hover-bg, #2a2d31);
}
body.aktex-dark .aktex-overview-member-org {
    color: var(--aktex-muted, #888);
}
body.aktex-dark .aktex-activity-scroll::-webkit-scrollbar-track {
    background: var(--aktex-hover-bg, #2a2d31);
}
body.aktex-dark .aktex-activity-scroll::-webkit-scrollbar-thumb {
    background: var(--aktex-border, #555);
}
