:root {
    --bg-void: #f6f7f9;
    --bg-card: #ffffff;
    --bg-soft: #f1f5f9;
    --text-primary: #172033;
    --text-secondary: #526071;
    --text-muted: #8491a3;
    --border: rgba(15, 23, 42, 0.10);
    --accent-primary: #2563eb;
    --accent-secondary: #14b8a6;
    --accent-warm: #f59e0b;
    --accent-danger: #dc2626;
    --accent-success: #16a34a;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08);
    --shadow-md: 0 10px 28px rgba(15, 23, 42, .10);
    --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg-void);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.hw-body {
    display: flex;
    min-height: calc(100vh - 68px);
}

.hw-main {
    flex: 1;
    min-width: 0;
    padding: 28px;
}

.hw-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.hw-eyebrow {
    margin: 0 0 5px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hw-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 25px;
    line-height: 1.2;
    font-weight: 800;
}

.hw-subtitle {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.hw-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.hw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .15s;
}

.hw-btn:hover {
    background: var(--bg-soft);
}

.hw-btn.primary {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: #fff;
}

.hw-btn.primary:hover {
    background: #1d4ed8;
}

.hw-btn.danger {
    border-color: rgba(220, 38, 38, .25);
    color: var(--accent-danger);
}

.hw-btn.small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.hw-grid {
    display: grid;
    gap: 16px;
}

.hw-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hw-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hw-grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hw-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.hw-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--border);
}

.hw-card-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 800;
}

.hw-card-body {
    padding: 16px;
}

.hw-kpi {
    padding: 16px;
}

.hw-kpi-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.hw-kpi-value {
    margin-top: 8px;
    color: var(--text-primary);
    font-size: 27px;
    line-height: 1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.hw-kpi-note {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 12px;
}

.hw-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hw-field.full {
    grid-column: 1 / -1;
}

.hw-field label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
}

.hw-field input,
.hw-field select,
.hw-field textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-primary);
    font: inherit;
    font-size: 13px;
}

.hw-field textarea {
    min-height: 88px;
    resize: vertical;
}

.hw-field input:focus,
.hw-field select:focus,
.hw-field textarea:focus {
    border-color: var(--accent-primary);
    outline: 3px solid rgba(37, 99, 235, .12);
}

.hw-filterbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px 180px auto;
    gap: 10px;
    margin-bottom: 16px;
}

.hw-filterbar input,
.hw-filterbar select {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    background: #fff;
}

.hw-table-wrap {
    overflow-x: auto;
}

.hw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.hw-table th {
    padding: 10px 12px;
    text-align: left;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.hw-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    color: var(--text-primary);
    vertical-align: top;
}

.hw-table tr:hover td {
    background: rgba(37, 99, 235, .03);
}

.hw-muted {
    color: var(--text-muted);
}

.hw-strong {
    color: var(--text-primary);
    font-weight: 800;
}

.hw-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.hw-badge.neutral {
    background: #f1f5f9;
    color: #475569;
}

.hw-badge.info {
    background: #dbeafe;
    color: #1e40af;
}

.hw-badge.primary {
    background: #e0e7ff;
    color: #3730a3;
}

.hw-badge.accent {
    background: #ccfbf1;
    color: #0f766e;
}

.hw-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.hw-badge.success {
    background: #dcfce7;
    color: #166534;
}

.hw-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.hw-split {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 16px;
}

/* Sidebar Schnellaktionen */
.quick-actions { border-top: 1px solid rgba(0,0,0,0.06); padding-top: 20px; }
.quick-action-btn {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 9px 12px;
    border: none; border-radius: 8px; cursor: pointer;
    font-size: 13px; font-weight: 500; font-family: var(--font-sans, inherit);
    background: rgba(99,102,241,0.08); color: var(--accent-primary);
    margin-bottom: 6px; transition: all 0.2s;
    text-decoration: none; text-align: left;
}
.quick-action-btn:hover { background: rgba(99,102,241,0.15); }
.quick-action-btn svg { width: 15px; height: 15px; }

.hw-stack {
    display: grid;
    gap: 16px;
}

.hw-list {
    display: grid;
    gap: 8px;
}

.hw-list-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
}

.hw-list-row:last-child {
    border-bottom: 0;
}

.hw-empty {
    padding: 24px;
    color: var(--text-muted);
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: var(--bg-card);
}

.hw-alert {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.hw-alert.success {
    background: #dcfce7;
    color: #166534;
}

.hw-alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.hw-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    overflow-x: auto;
}

.hw-tab {
    padding: 10px 12px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.hw-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.hw-tab-panel {
    display: none;
}

.hw-tab-panel.active {
    display: block;
}

@media (max-width: 1100px) {
    .hw-grid.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hw-split {
        grid-template-columns: 1fr;
    }
    .hw-filterbar {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .hw-main {
        padding: 18px 14px;
    }
    .hw-page-head {
        display: block;
    }
    .hw-actions {
        justify-content: flex-start;
        margin-top: 14px;
    }
    .hw-grid.cols-2,
    .hw-grid.cols-3,
    .hw-grid.cols-4,
    .hw-form-grid,
    .hw-filterbar {
        grid-template-columns: 1fr;
    }
}
