/* ===================================================
   CB-Board – App Stylesheet
   Kein Framework. Kein Build-Tool. Nur CSS.
   =================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --sidebar-w:      240px;
    --sidebar-bg:     #1e2535;
    --sidebar-hover:  #2d3650;
    --sidebar-active: #3b82f6;
    --sidebar-text:   #94a3b8;
    --sidebar-head:   #e2e8f0;

    --bg:             #f1f5f9;
    --surface:        #ffffff;
    --border:         #e2e8f0;
    --text:           #1e293b;
    --text-muted:     #64748b;

    --primary:        #3b82f6;
    --primary-dark:   #2563eb;
    --success:        #16a34a;
    --warning:        #d97706;
    --danger:         #dc2626;
    --info:           #0891b2;

    --radius:         8px;
    --radius-sm:      4px;
    --shadow:         0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:      0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- App Layout --- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: var(--sidebar-head);
}
.logo-icon { font-size: 22px; color: var(--primary); }
.logo-text { font-weight: 700; font-size: 16px; letter-spacing: .5px; }

.nav-section {
    padding: 16px 0 8px;
}

.nav-label {
    display: block;
    padding: 0 20px 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: rgba(148,163,184,.5);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 0;
    transition: background .15s, color .15s;
    font-size: 13.5px;
}
.nav-item:hover { background: var(--sidebar-hover); color: #e2e8f0; text-decoration: none; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav-item.active .nav-icon { color: #fff; }
.nav-icon { width: 16px; text-align: center; font-size: 13px; color: rgba(148,163,184,.7); }
.nav-logout { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); color: rgba(148,163,184,.6); }

/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 28px 32px;
    min-width: 0;
}

/* --- Page Header --- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.page-meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 2px;
    display: block;
}
.breadcrumb {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 4px;
}
.breadcrumb:hover { color: var(--primary); }

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 18px;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow .15s, transform .1s;
    cursor: pointer;
    display: block;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; }
.stat-card--primary { border-left: 3px solid var(--primary); }
.stat-card--warning { border-left: 3px solid var(--warning); }
.stat-card--danger  { border-left: 3px solid var(--danger); }
.stat-value { font-size: 32px; font-weight: 800; line-height: 1; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }
.stat-card--warning .stat-value { color: var(--warning); }
.stat-card--danger  .stat-value { color: var(--danger); }
.stat-card--primary .stat-value { color: var(--primary); }

/* --- Dashboard Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stats-grid--wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 8px 0;
    gap: 24px;
}
.topbar-sync {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.topbar-sync strong {
    color: var(--text);
    font-weight: 700;
}
.topbar-clock {
    text-align: right;
    font-size: 14px;
    color: var(--text);
}
.topbar-date,
.topbar-time {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.topbar-time {
    margin-top: 2px;
}
.dashboard-card--fullwidth {
    grid-column: 1 / -1;
}
.log-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.log-column {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
}
.log-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}
.log-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(148,163,184,.14);
    font-size: 13px;
    color: var(--text-muted);
    word-break: break-word;
}
.log-list li:last-child { border-bottom: none; }

/* --- Cards --- */
.detail-card, .dashboard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
}
.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-reminders-list {
    display: grid;
    gap: 14px;
}
.note-reminder-item {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
}
.note-reminder-title {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}
.note-reminder-title:hover {
    text-decoration: underline;
}
.note-reminder-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.note-reminder-main {
    flex: 1;
    min-width: 0;
}
.note-reminder-meta {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.note-reminder-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    min-width: 160px;
}
.note-reminder-status {
    font-size: 12px;
}
.note-reminder-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.note-reminder-actions--compact .btn {
    padding: 6px 10px;
    font-size: 12px;
}
.note-reminder-item--compact {
    padding: 12px 14px;
}

/* --- Quick Links --- */
.quick-links { display: flex; flex-direction: column; gap: 4px; }
.quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    transition: background .15s;
}
.quick-link:hover { background: var(--bg); text-decoration: none; }
.quick-link--danger:hover { background: #fef2f2; }
.quick-link small { display: block; color: var(--text-muted); font-size: 12px; }
.ql-icon { font-size: 16px; color: var(--primary); width: 20px; text-align: center; flex-shrink: 0; }

/* --- Tables --- */
.table-wrapper { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.data-table thead tr {
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
}
.data-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}
.data-table th a.sortable {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.data-table th a.sortable:hover {
    text-decoration: underline;
}
.sort-indicator {
    font-size: 10px;
    line-height: 1;
}
.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }
.row--overdue { background: #fff7f7 !important; }
.row--overdue:hover { background: #fff0f0 !important; }

.td-title { max-width: 360px; }
.td-step { max-width: 200px; color: var(--text-muted); font-size: 12px; }
.td-message { max-width: 200px; }
.task-link { color: var(--text); font-weight: 500; }
.task-link:hover { color: var(--primary); text-decoration: none; }
.step-text { color: var(--text-muted); }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.badge--primary { background: #dbeafe; color: #1d4ed8; }
.badge--success { background: #dcfce7; color: #15803d; }
.badge--warning { background: #fef9c3; color: #a16207; }
.badge--danger  { background: #fee2e2; color: #dc2626; }
.badge--info    { background: #cffafe; color: #0e7490; }
.badge--neutral { background: #f1f5f9; color: #475569; border: 1px solid var(--border); }
.badge--sm { font-size: 10px; padding: 1px 5px; }

/* Status-Badge (adapts to status value) */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid var(--border);
}

.priority-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* --- Flag Icons --- */
.flag {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 13px;
    cursor: default;
}
.flag--warning { color: var(--warning); }
.flag--danger  { color: var(--danger); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background .15s, border-color .15s, opacity .15s;
    white-space: nowrap;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary  { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover  { background: var(--primary-dark); }
.btn-secondary { background: #f1f5f9; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-outline   { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover   { background: #eff6ff; }
.btn-sm  { padding: 5px 10px; font-size: 12px; }
.btn-lg  { padding: 11px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn--success { background: var(--success) !important; border-color: var(--success) !important; }
.btn-danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

/* --- Forms --- */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.form-group label { font-weight: 600; font-size: 13px; color: var(--text); }
.form-group input,
.form-group textarea,
.form-group select,
.form-select {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color .15s;
    width: 100%;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.form-group textarea { resize: vertical; min-height: 60px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-checkboxes { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.checkbox-label {
    display: flex; align-items: center; gap: 8px;
    font-weight: 500; cursor: pointer; font-size: 13px;
}
.checkbox-label input[type="checkbox"] {
    width: 16px; height: 16px; cursor: pointer;
}
.form-actions {
    display: flex; align-items: center; gap: 12px;
    padding-top: 8px; border-top: 1px solid var(--border);
    margin-top: 4px;
}
.help-text { font-size: 12px; color: var(--text-muted); margin-top: 12px; line-height: 1.6; }

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    background: var(--surface);
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.filter-bar--checkboxes {
    justify-content: space-between;
    width: 100%;
}
.filter-panel {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.filter-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.filter-panel summary::-webkit-details-marker {
    display: none;
}
.filter-panel summary::after {
    content: '▾';
    transition: transform .2s ease;
    color: var(--primary);
}
.filter-panel[open] summary::after {
    transform: rotate(180deg);
}
.filter-panel .filter-checkboxes {
    padding: 12px 14px 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.filter-panel .filter-badge {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}
.filter-summary {
    color: var(--text-muted);
    margin-top: 8px;
    font-size: 13px;
}
.filter-checkboxes {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.filter-checkboxes .filter-label {
    font-weight: 700;
    color: var(--text);
    margin-right: 8px;
}
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
}
.filter-bar--checkboxes button {
    margin-left: auto;
}
.filter-input, .filter-select {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
    background: var(--surface);
    height: 34px;
}
.filter-input { min-width: 180px; }
.filter-input:focus, .filter-select:focus { outline: none; border-color: var(--primary); }

/* --- Detail Grid --- */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.detail-fields { display: flex; flex-direction: column; gap: 0; }
.detail-row {
    display: flex;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { width: 140px; flex-shrink: 0; color: var(--text-muted); font-size: 13px; }
.detail-value { flex: 1; font-size: 13px; }

/* --- Management Form --- */
.management-form { }

/* --- Alerts --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
}
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-danger   { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.alert-warning  { background: #fffbeb; color: #92400e; border: 1px solid #fed7aa; }
.alert-info     { background: #f0f9ff; color: #075985; border: 1px solid #bae6fd; }

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.empty-state p { margin-bottom: 16px; font-size: 15px; }

/* --- Board List (Sync) --- */
.board-list { list-style: none; padding: 0; margin: 10px 0; }
.board-list li {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    margin: 3px 4px 3px 0;
    font-family: monospace;
}
.sync-form { margin: 16px 0; }

/* --- Report --- */
.report-card { }
.report-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.report-text {
    white-space: pre-wrap;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.7;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    color: var(--text);
    overflow-x: auto;
}

/* --- Login --- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
}
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.logo-icon-large { font-size: 48px; color: var(--primary); display: block; margin-bottom: 8px; }
.login-logo h1 { font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.login-logo p { color: var(--text-muted); font-size: 13px; }
.login-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

/* --- Utility --- */
code {
    font-family: 'SF Mono','Consolas',monospace;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    border: 1px solid var(--border);
}

/* ===================================================
   CB-Board v0.2 – CTO-Fokus & Chefbericht Erweiterungen
   =================================================== */

/* --- CTO-Fokus Nav-Item --- */
.nav-item--cto {
    font-weight: 700;
    color: #93c5fd;
}
.nav-item--cto:hover { color: #dbeafe; background: #2d3a5a; }
.nav-item--cto.active { background: var(--primary); color: #fff; }

/* --- Stat-Card CTO-Variante --- */
.stat-card--cto { border-left: 3px solid var(--primary); }
.stat-card--cto .stat-value { color: var(--primary); }

/* --- Personen-Stats: schmalere Kacheln --- */
.stats-grid--persons {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    margin-top: -8px;
    margin-bottom: 28px;
}

/* --- Tabellenzeilen-Varianten --- */
.row--blocker {
    background: #fff0f0 !important;
    border-left: 3px solid var(--danger);
}
.row--blocker:hover { background: #ffe4e4 !important; }

.row--high-risk {
    background: #fff7ed !important;
    border-left: 3px solid var(--warning);
}
.row--high-risk:hover { background: #ffedd5 !important; }

..row--cto-focus { background: #f8fafc !important; }
.row--cto-focus:hover { background: #f1f5f9 !important; }

.row--important { background: #fef2f2 !important; border-left: 3px solid #dc2626; }
.row--important:hover { background: #fee2e2 !important; }

.row--overdue { background: #fff7f7 !important; border-left: 3px solid #fca5a5; }
.row--overdue:hover { background: #fff0f0 !important; }

/* --- Board-Badges --- */
.board-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
    background: #e2e8f0;
    color: #475569;
}
.board-badge--support { background: #dbeafe; color: #1d4ed8; }
.board-badge--pmg     { background: #ede9fe; color: #5b21b6; }
.board-badge--dev     { background: #d1fae5; color: #065f46; }

/* --- Spaltenbreiten Tabelle --- */
.td-board   { width: 52px; text-align: center; }
.td-person  { width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.td-flags   { white-space: nowrap; }
.td-actions { white-space: nowrap; }

/* --- Chefbericht-Button --- */
.btn-report {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
    margin-left: 4px;
}
.btn-report:hover {
    background: #fef9c3;
    color: var(--warning);
    border-color: #fde68a;
    text-decoration: none;
}

/* --- CTO-Fokus Flag --- */
.flag--cto { color: var(--primary); }

/* --- CTO-Fokus Überschrift Icon --- */
.cto-focus-icon { color: var(--primary); margin-right: 6px; }

/* --- My Scope Indikator --- */
.scope-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    padding: 4px 10px;
}

/* --- CTO-Fokus Dashboard --- */
.focus-dashboard {
    display: grid;
    gap: 28px;
}

.focus-section {
    display: grid;
    gap: 18px;
}

.focus-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.focus-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.focus-card--fullwidth {
    grid-column: 1 / -1;
}

.focus-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(148,163,184,.16);
    padding: 14px 0;
}

.focus-item:last-child {
    border-bottom: none;
}

.focus-item-title {
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.focus-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.focus-item-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-shrink: 0;
}

.focus-empty {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    color: var(--text-muted);
}

.attention-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.reason-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

.focus-alert {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: var(--radius);
    padding: 18px;
}

/* --- Workboard / Arbeitsübersicht --- */
.workboard {
    display: grid;
    gap: 28px;
}

.workboard-person {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.workboard-person-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.workboard-person-header h2 {
    margin: 0;
    font-size: 20px;
}

.workboard-person-subtitle {
    color: var(--text-muted);
    font-size: 13px;
}

.workboard-groups {
    display: grid;
    gap: 18px;
}

.workboard-group {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.workboard-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.workboard-group-header h3 {
    margin: 0;
    font-size: 16px;
}

.workboard-group-more {
    color: var(--text-muted);
    font-size: 13px;
}

.workboard-ticket {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid rgba(148,163,184,.16);
}

.workboard-ticket:first-child {
    border-top: none;
}

.workboard-ticket-title {
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.workboard-ticket-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.workboard-ticket-note {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 8px;
}

.workboard-ticket-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.workboard-empty {
    background: #ffffff;
    border: 1px solid rgba(148,163,184,.15);
    border-radius: var(--radius-sm);
    padding: 18px;
    color: var(--text-muted);
}

.reason-badge.badge-overdue { background: #fee2e2; color: #991b1b; }
.reason-badge.badge-today { background: #fef3c7; color: #92400e; }
.reason-badge.badge-reminder { background: #e0f2fe; color: #0c4a6e; }
.reason-badge.badge-report { background: #e9d5ff; color: #6d28d9; }
.reason-badge.badge-risk { background: #fef9c3; color: #92400e; }
.reason-badge.badge-blocker { background: #fee2e2; color: #991b1b; }
.reason-badge.badge-no-date { background: #f8fafc; color: #475569; }
.scope-icon { color: var(--primary); font-size: 11px; }
.scope-hint { color: var(--text-muted); font-size: 11px; }

/* --- Quick Link CTO-Variante --- */
.quick-link--cto {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.quick-link--cto:hover { background: #dbeafe; }
.quick-link--muted .ql-icon { color: var(--text-muted); }

/* --- Responsive (minimale Anpassungen für < 1024px) --- */
@media (max-width: 1023px) {
    .detail-grid,
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 16px; }
}

/* --- Login Log Colors --- */
.log-list .log-line--success {
    color: var(--success);
}
.log-list .log-line--danger {
    color: var(--danger);
}

/* --- Note Reminders (Dashboard) --- */
.note-reminder-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
.note-reminder-column-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.note-reminder-column-title--danger {
    color: var(--danger);
}
.note-reminder-content-snippet {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}
.note-reminder-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

@media (max-width: 1200px) {
    .note-reminder-grid {
        grid-template-columns: 1fr;
    }
}


