/* =========================================================
   ASISTO GRÜNDER-COCKPIT – Design System
   Identisch mit asisto.cloud Design-System
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- CSS-Variablen (exakt wie asisto.cloud) --- */
:root {
    --primary: #0f172a;
    --accent: #ff6b36;
    --accent-hover: #e66031;
    --accent-light: rgba(255, 107, 54, 0.08);
    --accent-shadow: #cc562b;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* App-spezifische Ergänzungen */
    --status-success: #16a34a;
    --status-warning: #f59e0b;
    --status-danger:  #dc2626;
    --sidebar-width:  260px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; height: auto; }

/* =========================================================
   LAYOUT – Sidebar + Content
   ========================================================= */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.sidebar-toggle-close {
    display: none;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}
.sidebar-toggle-close:hover { color: var(--white); background: rgba(255,255,255,0.1); }

.sidebar-nav {
    flex: 1;
    padding: 12px 12px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: rgba(255,255,255,0.65);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    line-height: 1.4;
}
.nav-item:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-item.active { color: var(--white); background: var(--accent); }
.nav-item.active:hover { background: var(--accent-hover); }
.nav-item-disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.nav-item-logout:hover { color: #fca5a5; background: rgba(220, 38, 38, 0.15); }

.nav-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.nav-label { flex: 1; }

.nav-badge {
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.5);
    padding: 2px 6px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-footer {
    padding: 0 12px 20px;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 12px 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-top: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    display: none;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.sidebar-toggle-open {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-main);
    padding: 4px;
    line-height: 1;
}

.topbar-title {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.topbar-user {
    font-size: 13px;
    color: var(--text-muted);
}

.page-content {
    padding: 32px 36px;
    max-width: 1400px;
}

/* =========================================================
   KOMPONENTEN
   ========================================================= */

/* --- Seitenheader --- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.page-header-left h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.page-header-left p {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 4px;
}

/* --- Karten (wie .feature-card) --- */
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

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

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 22px;
    border: none;
    transition: var(--transition);
    cursor: pointer;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,107,54,0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 6px 10px;
}
.btn-ghost:hover { color: var(--accent); background: var(--accent-light); }

.btn-danger {
    background: #fee2e2;
    color: var(--status-danger);
    border: 1px solid #fecaca;
}
.btn-danger:hover { background: #fecaca; transform: translateY(-1px); }

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

.btn-full { width: 100%; justify-content: center; }
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 8px; }

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    letter-spacing: 0.2px;
}

.badge-default,
.badge { background: var(--accent-light); color: var(--accent); }
.badge-success { background: #dcfce7; color: var(--status-success); }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger  { background: #fee2e2; color: var(--status-danger); }
.badge-neutral { background: #f1f5f9; color: var(--text-muted); }
.badge-muted   { background: #f1f5f9; color: #94a3b8; }

/* --- Formulare --- */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-main);
    background: var(--white);
    transition: var(--transition);
    outline: none;
    appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,107,54,0.12);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.input-wrapper {
    position: relative;
}

.input-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
}
.input-toggle-pw:hover { opacity: 1; }

/* --- Alerts --- */
.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-error   { background: #fee2e2; color: var(--status-danger); border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: var(--status-success); border: 1px solid #bbf7d0; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: var(--accent-light); color: #92400e; border: 1px solid rgba(255,107,54,0.2); }

/* --- Grid-Layouts --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* --- Tabellen --- */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--white);
}

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

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-light); }

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    font-size: 18px;
    color: var(--text-muted);
    border-radius: 8px;
    transition: var(--transition);
}
.modal-close:hover { background: var(--bg-light); color: var(--primary); }

.modal-body { padding: 24px 28px; }

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 28px 24px;
    border-top: 1px solid var(--border-color);
}

/* --- Kanban --- */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

.kanban-column {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    min-height: 200px;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.kanban-column-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-col-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.col-offen .kanban-col-dot    { background: #94a3b8; }
.col-in_arbeit .kanban-col-dot { background: var(--status-warning); }
.col-erledigt .kanban-col-dot  { background: var(--status-success); }

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 60px;
}

.kanban-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px;
    cursor: grab;
    transition: var(--transition);
    position: relative;
}
.kanban-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}
.kanban-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}
.kanban-card.drag-over { border-color: var(--accent); background: var(--accent-light); }

.kanban-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.kanban-card-due {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}
.kanban-card-due.overdue   { color: var(--status-danger); font-weight: 600; }
.kanban-card-due.due-soon  { color: var(--status-warning); font-weight: 600; }

.kanban-card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
}
.kanban-card:hover .kanban-card-actions { opacity: 1; }

.kanban-drop-zone {
    min-height: 40px;
    border: 2px dashed transparent;
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-muted);
}
.kanban-drop-zone.active {
    border-color: var(--accent);
    background: var(--accent-light);
}

/* --- Timeline (Meilensteine) --- */
.timeline {
    position: relative;
    padding-left: 32px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0; bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
    padding-left: 20px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--white);
    z-index: 1;
}
.timeline-item.status-erreicht::before { background: var(--status-success); border-color: var(--status-success); }
.timeline-item.status-in_arbeit::before { background: var(--status-warning); border-color: var(--status-warning); }
.timeline-item.status-geplant::before { background: var(--white); border-color: var(--border-color); }
.timeline-item.status-verschoben::before { background: #fecaca; border-color: var(--status-danger); }

.timeline-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: var(--transition);
}
.timeline-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.timeline-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.timeline-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}
.timeline-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}

/* --- Notizen-Grid --- */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    align-items: start;
}

.note-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: var(--transition);
    position: relative;
}
.note-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.note-card.pinned { border-color: var(--accent); background: rgba(255,107,54,0.02); }
.note-card.pinned::before {
    content: '📌';
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 14px;
}
.note-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}
.note-card-content {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.note-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
}
.note-card-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
}
.note-card:hover .note-card-actions { opacity: 1; }

/* --- Markt-Feed --- */
.market-feed { display: flex; flex-direction: column; gap: 16px; }

.market-entry {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: var(--transition);
}
.market-entry:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.market-entry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.market-entry-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    flex: 1;
}
.market-entry-content {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}
.market-entry-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
}

/* --- Entscheidungs-Liste --- */
.decision-list { display: flex; flex-direction: column; gap: 12px; }

.decision-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}
.decision-item:hover { border-color: var(--accent); }

.decision-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    cursor: pointer;
    gap: 12px;
}
.decision-item-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    flex: 1;
}
.decision-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.decision-chevron {
    color: var(--text-muted);
    transition: transform var(--transition);
    font-size: 12px;
}
.decision-item.open .decision-chevron { transform: rotate(180deg); }

.decision-item-body {
    display: none;
    padding: 0 22px 20px;
    border-top: 1px solid var(--border-color);
}
.decision-item.open .decision-item-body { display: block; }

.decision-item-body-inner {
    padding-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}
.decision-item-body-inner strong { color: var(--primary); font-weight: 600; }

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

.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.widget { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius-lg); }
.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
}
.widget-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-body { padding: 16px 24px 20px; }

.widget-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    transition: var(--transition);
}
.widget-link:hover { color: var(--accent-hover); text-decoration: underline; }

.widget-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-muted);
    font-size: 14px;
}

/* --- Task-Widget-Liste --- */
.task-list-widget { display: flex; flex-direction: column; gap: 8px; }

.task-item-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    font-size: 14px;
}
.task-item-widget:hover { border-color: var(--accent); background: var(--accent-light); }

.task-item-widget-title {
    flex: 1;
    color: var(--primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-item-widget-due {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}
.task-item-widget-due.overdue { color: var(--status-danger); font-weight: 600; }

/* --- Meilenstein-Widget --- */
.milestone-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 100%);
    border-radius: var(--radius-lg);
    padding: 28px;
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.milestone-hero::after {
    content: '🎯';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    opacity: 0.15;
}
.milestone-hero-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.milestone-hero-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}
.milestone-hero-date {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
}

/* --- Progress Bar --- */
.progress-bar-wrapper {
    margin-top: 16px;
}
.progress-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
}
.progress-bar {
    height: 6px;
    border-radius: 100px;
    background: rgba(255,255,255,0.15);
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: var(--accent);
    transition: width 0.8s ease;
}

/* --- Filter-Leiste --- */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 120px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.filter-group select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-main);
    background: var(--bg-light);
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    padding-right: 28px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 14px;
    appearance: none;
}
.filter-group select:focus { border-color: var(--accent); }

.filter-search {
    flex: 2;
    min-width: 200px;
}
.filter-search input {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
    background: var(--bg-light);
}
.filter-search input:focus { border-color: var(--accent); }

/* --- Ansichts-Toggle --- */
.view-toggle {
    display: flex;
    gap: 4px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
    background: var(--bg-light);
}
.view-toggle-btn {
    background: transparent;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}
.view-toggle-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* --- Schnellnotiz --- */
.quick-note {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quick-note textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    resize: none;
    height: 72px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}
.quick-note textarea:focus { border-color: var(--accent); }

/* --- Stats-Widget --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-card.accent .stat-number { color: var(--accent); }

/* --- Login-Seite --- */
.login-body {
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.login-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.login-logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.login-badge { margin-bottom: 20px; }

.login-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.login-form { margin-top: 8px; }

.login-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 20px;
}

/* --- Einstellungen --- */
.settings-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
}
.settings-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

/* --- Toast-Notifications --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--primary);
    color: white;
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 360px;
}
.toast.success { background: var(--status-success); }
.toast.error   { background: var(--status-danger); }
.toast.warning { background: var(--status-warning); color: var(--primary); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* --- KI-Chat Platzhalter --- */
.ai-placeholder {
    text-align: center;
    padding: 48px 24px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.ai-placeholder-icon { font-size: 48px; margin-bottom: 16px; }
.ai-placeholder-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}
.ai-placeholder-text {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 24px;
    line-height: 1.7;
}

/* --- Sidebar overlay für Mobile --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    z-index: 99;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .kanban-board { grid-template-columns: 1fr 1fr 1fr; }
    .page-content { padding: 24px 20px; }
    .dashboard-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .sidebar-overlay.open { display: block; }
    .sidebar-toggle-close { display: flex; }
    .main-content { margin-left: 0; }
    .topbar { display: flex; }
    .kanban-board { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .page-content { padding: 16px; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .filter-bar { flex-direction: column; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .modal { max-width: 100%; }
}

/* --- Utility --- */
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--status-danger); }
.text-success{ color: var(--status-success); }
.font-bold   { font-weight: 700; }
.font-extra  { font-weight: 800; }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex   { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-none  { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
