/* pantackom cloud - Modern Theme with Dark Mode Support */

/* ===== Theme Colors ===== */
:root {
    --accent-blue: #3b82f6;
    --accent-cyan: #06B6D4;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --color-hot: #ff6b35;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme (Default) */
:root, [data-theme="light"] {
    --bg-primary: #FAFBFC;
    --bg-secondary: #F5F7FA;
    --bg-tertiary: #EDF1F5;
    --bg-hover: #E3E8EF;
    --bg-card: #FAFBFC;
    
    --text-primary: #2D3748;
    --text-secondary: #526371;
    --text-muted: #94A3B8;
    
    --score-warm-text: #1a1a1a;
    
    --border-color: #E2E8F0;
    --border-light: #CBD5E1;
    
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --bg-hover: #475569;
    --bg-card: #1E293B;
    
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    
    --score-warm-text: #1a1a1a;
    
    --border-color: #334155;
    --border-light: #475569;
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
}

/* Auto Dark Mode based on system preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #0F172A;
        --bg-secondary: #1E293B;
        --bg-tertiary: #334155;
        --bg-hover: #475569;
        --bg-card: #1E293B;
        --text-primary: #F8FAFC;
        --text-secondary: #CBD5E1;
        --text-muted: #94A3B8;
        --score-warm-text: #1a1a1a;
        --border-color: #334155;
        --border-light: #475569;
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
    }
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.theme-toggle:hover {
    background: linear-gradient(135deg, #06B6D4 0%, #3b82f6 100%);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.theme-toggle svg {
    transition: opacity 0.2s ease;
}

.sun-icon,
.moon-icon {
    width: 20px;
    height: 20px;
}

/* ===== Cards ===== */
.card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-xl);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.9375rem;
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-primary:hover:not(:disabled) {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--accent-cyan);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover:not(:disabled) {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-warning {
    background: #f59e0b;
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover:not(:disabled) {
    background: #d97706;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-error {
    background: #ef4444;
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-error:hover:not(:disabled) {
    background: #dc2626;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: auto;
}

/* ===== Back Button (Zurück-Button) ===== */
/* Konsistenter Style für alle Zurück-Buttons - gehört immer in page-actions */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: auto;
}

.btn-back:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-cyan);
    transform: translateX(-2px);
}

.btn-back svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.btn-back:hover svg {
    transform: translateX(-2px);
}

/* Link als Button gestylt */
a.btn,
a.btn-sm,
a.btn-primary,
a.btn-secondary,
a.btn-success,
a.btn-error,
a.btn-filter,
a.btn-filter-reset {
    text-decoration: none !important;
}

/* ===== Card Helpers ===== */
.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.card-flat {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.monospace-cell {
    font-family: monospace;
    font-size: 0.75rem;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compact table columns for sensitive data */
.table td:has(.masked-text) {
    max-width: 200px;
    padding: 0.75rem 0.5rem;
}

.table th:has(+ th:has(+ th:has(+ th))) {
    white-space: nowrap;
}

.highlight-cell {
    color: var(--accent-cyan);
    font-weight: 600;
}

.result-count {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

.status-cell {
    font-weight: 600;
}

.status-active {
    color: #10b981;
}

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

.field-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.field-error {
    color: #ef4444;
}

.field-success {
    color: #10b981;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-header .card-title {
    margin-bottom: 0;
    flex: 1;
}

.text-right {
    text-align: right;
}

.bold-cell {
    font-weight: 700;
}

.amount-cell {
    color: #10b981;
    white-space: nowrap;
}

.amount-col {
    color: #10b981;
    white-space: nowrap;
}

.total-row {
    background-color: var(--bg-tertiary);
    font-weight: 600;
    font-size: 1rem;
}

/* Kompakte Accounting-Tabelle mit vielen Spalten */
.accounting-table {
    font-size: 0.8rem;
}

.accounting-table th {
    white-space: nowrap;
    padding: 0.75rem 0.5rem;
    font-size: 0.7rem;
}

.accounting-table td {
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
}

.accounting-table th:first-child,
.accounting-table td:first-child {
    padding-left: 1rem;
}

.accounting-table th:last-child,
.accounting-table td:last-child {
    padding-right: 1rem;
}

/* Zahlen rechtsbündig */
.accounting-table .text-right {
    text-align: right;
}

/* Betrags-Spalten hervorheben */
.accounting-table .amount-col {
    background: rgba(16, 185, 129, 0.05);
}

.accounting-table tbody td.amount-cell {
    font-weight: 600;
    color: #10b981;
}

/* ===== Global Link Styles ===== */
a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    color: var(--accent-blue);
    text-decoration: none;
}

/* Links in Cards/Detail sections */
.card a:not(.btn),
.detail-section a:not(.btn),
.detail-row a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 500;
    padding: 0.125rem 0.25rem;
    margin: -0.125rem -0.25rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.card a:not(.btn):hover,
.detail-section a:not(.btn):hover,
.detail-row a:hover {
    color: var(--accent-blue);
    background: rgba(6, 182, 212, 0.1);
}

/* Tel/Email Links with icon effect */
a[href^="tel:"]:not(.btn),
a[href^="mailto:"]:not(.btn) {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--accent-cyan);
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    margin: -0.25rem -0.5rem;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

a[href^="tel:"]:not(.btn):hover,
a[href^="mailto:"]:not(.btn):hover {
    color: white;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

a[href^="tel:"]:not(.btn)::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
}

a[href^="mailto:"]::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
}

/* External links */
a[target="_blank"]:not(.btn)::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 0.25rem;
    background: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    opacity: 0.6;
}

.link-primary {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.link-primary:hover {
    color: var(--accent-blue);
}

.file-list {
    max-height: 400px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

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

.file-link {
    color: var(--accent-cyan);
    text-decoration: none;
    flex-grow: 1;
}

.file-link:hover {
    text-decoration: underline;
}

.property-key {
    color: var(--accent-cyan);
    font-family: monospace;
    font-size: 0.875rem;
}

.property-value {
    color: #10b981;
    font-family: monospace;
    font-size: 0.875rem;
}

.days-valid {
    font-weight: 600;
}

.text-error {
    color: #ef4444;
}

.text-warning {
    color: #f59e0b;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
}

.stat {
    text-align: center;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
    line-height: 1;
    white-space: nowrap;
}

/* Content Card */
.content-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

/* Flex utilities */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-card {
    background: rgba(6, 182, 212, 0.05);
    border-left: 3px solid var(--accent-cyan);
}

.info-text {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.info-text:last-child {
    margin-bottom: 0;
}

.code-inline {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    color: #10b981;
    font-size: 0.875rem;
}

.warning-card {
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid #f59e0b;
}

.warning-list {
    list-style: disc;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.warning-list li {
    margin-bottom: 0.5rem;
}

.warning-list strong {
    color: var(--text-primary);
}

.log-viewer {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    overflow-x: auto;
    max-height: 70vh;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-viewer pre {
    margin: 0;
    color: var(--text-primary);
}

.hidden {
    display: none;
}

.info-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.info-list {
    list-style: disc;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.info-list li {
    margin-bottom: 0.25rem;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-input:hover:not(:focus):not(:disabled),
.form-select:hover:not(:focus):not(:disabled),
.form-textarea:hover:not(:focus):not(:disabled) {
    border-color: var(--border-light);
    background-color: var(--bg-tertiary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2), 0 4px 12px rgba(6, 182, 212, 0.15);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--bg-primary);
}

.form-input::placeholder {
    color: var(--text-muted);
    transition: opacity 0.2s ease;
}

.form-input:focus::placeholder {
    opacity: 0.5;
}

/* Form Row - multiple fields in one line */
.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Form Check Group - for checkboxes and radios */
.form-check-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    margin: 0;
}

.form-check span {
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* ===== Custom Checkboxes ===== */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    vertical-align: middle;
}

input[type="checkbox"]:hover {
    border-color: var(--accent-cyan);
    background-color: var(--bg-tertiary);
}

input[type="checkbox"]:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
    border-color: transparent;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input[type="checkbox"]:disabled:hover {
    border-color: var(--border-color);
    background-color: var(--bg-secondary);
}

/* ===== Custom Radio Buttons ===== */
input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    vertical-align: middle;
}

input[type="radio"]:hover {
    border-color: var(--accent-cyan);
    background-color: var(--bg-tertiary);
}

input[type="radio"]:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

input[type="radio"]:checked {
    border-color: var(--accent-cyan);
    background-color: var(--bg-secondary);
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
}

input[type="radio"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Toggle Switch (optional class) ===== */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input[type="checkbox"] {
    width: 44px;
    height: 24px;
    border-radius: 12px;
}

.toggle-switch input[type="checkbox"]::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-muted);
    border: none;
    transition: all 0.2s ease;
}

.toggle-switch input[type="checkbox"]:checked::after {
    left: calc(100% - 18px);
    background: white;
    border: none;
    transform: translateY(-50%) rotate(0deg);
    width: 16px;
    height: 16px;
}

/* Number Input Spinner */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Custom Number Input with Styled Buttons */
.number-input-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.number-input-wrapper input[type="number"] {
    padding-right: 2.5rem;
    width: 100%;
}

.number-input-wrapper .number-controls {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    display: flex;
    flex-direction: column;
    width: 1.75rem;
    border-left: 1px solid var(--border-color);
    border-radius: 0 calc(var(--border-radius) - 1px) calc(var(--border-radius) - 1px) 0;
    overflow: hidden;
    background: var(--bg-secondary);
}

.number-input-wrapper .number-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.number-input-wrapper .number-btn svg {
    width: 10px;
    height: 10px;
}

.number-input-wrapper .number-btn:hover {
    background: var(--accent-cyan);
    color: white;
}

.number-input-wrapper .number-btn:active {
    background: var(--accent-blue);
    transform: scale(0.95);
}

.number-input-wrapper .number-btn-up {
    border-bottom: 1px solid var(--border-color);
}

/* Focus state for number wrapper */
.number-input-wrapper:focus-within .number-controls {
    border-left-color: var(--accent-cyan);
}

.number-input-wrapper:focus-within .number-btn {
    color: var(--accent-cyan);
}

/* Hover state for entire wrapper */
.number-input-wrapper:hover:not(:focus-within) .number-controls {
    background: var(--bg-tertiary);
}

.number-input-wrapper:hover:not(:focus-within) .number-btn {
    color: var(--text-secondary);
}

/* ===== Form Tooltips ===== */
.label-with-tooltip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    user-select: none;
}

.tooltip-trigger:hover,
.tooltip-trigger.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: white;
    transform: scale(1.1);
}

/* Tooltip Container */
.form-tooltip {
    position: relative;
    display: inline-flex;
}

.form-tooltip .tooltip-content {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    min-width: 250px;
    max-width: 350px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.form-tooltip .tooltip-content::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--border-color);
}

.form-tooltip .tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--bg-primary);
}

.form-tooltip:hover .tooltip-content,
.form-tooltip:focus-within .tooltip-content,
.form-tooltip.active .tooltip-content {
    opacity: 1;
    visibility: visible;
}

.tooltip-content strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.tooltip-content em {
    display: block;
    color: var(--accent-cyan);
    font-style: normal;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Tooltips on colored/gradient cards (light trigger) */
.tooltip-card .tooltip-trigger {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
    color: white;
}
.tooltip-card .tooltip-trigger:hover,
.tooltip-card .tooltip-trigger.active {
    background: rgba(255,255,255,0.95);
    border-color: white;
    color: var(--accent-cyan);
}
.tooltip-card .tooltip-content {
    color: var(--text-secondary);
    text-align: left;
}

/* Tooltip alignment variants */
.form-tooltip.tooltip-left .tooltip-content {
    left: 0;
    transform: translateX(0);
}

.form-tooltip.tooltip-left .tooltip-content::before,
.form-tooltip.tooltip-left .tooltip-content::after {
    left: 12px;
    transform: translateX(0);
}

.form-tooltip.tooltip-right .tooltip-content {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.form-tooltip.tooltip-right .tooltip-content::before,
.form-tooltip.tooltip-right .tooltip-content::after {
    left: auto;
    right: 12px;
    transform: translateX(0);
}

/* ===== Cell Stack (vertical layout in table cells) ===== */
.cell-stack {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

/* ===== Tables ===== */
.table-container,
.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    width: 100%;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-container.no-scroll {
    overflow-x: visible;
    overflow-y: visible;
}

.table-responsive > .table {
    margin-bottom: 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.table thead {
    background-color: var(--bg-tertiary);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.table th:last-child {
    text-align: right;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.table td:last-child {
    text-align: right;
}

.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Action Buttons in Tabellen - rechtsbündig mit fester Breite */
.table td .flex.gap-2 {
    justify-content: flex-end;
}

.table .btn-sm {
    min-width: 120px;
    justify-content: center;
}

/* Icon-Buttons in Tabellen - gleiche Größe */
.table .btn-icon {
    min-width: 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== RESPONSIVE TABLE TO CARD LAYOUT ===== */
/* Wandelt Tabellen auf mobilen Geräten in Card-Layout um */
@media (max-width: 1200px) {
    /* Verstecke normale Tabelle auf kleineren Bildschirmen */
    .table-responsive .table:not(.no-responsive),
    .table-container .table:not(.no-responsive) {
        display: block;
        border: 0;
        width: 100%;
    }
    
    .table:not(.no-responsive) thead {
        display: none;
    }
    
    .table:not(.no-responsive) tbody,
    .table:not(.no-responsive) tfoot {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .table:not(.no-responsive) tbody tr {
        display: block;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: 1rem;
        margin-bottom: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Spezielle Styles für tfoot (Summenzeile) */
    .table:not(.no-responsive) tfoot tr {
        display: block;
        background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
        border: 2px solid var(--accent-cyan);
        border-radius: var(--border-radius-lg);
        padding: 1.25rem;
        margin-bottom: 0;
        margin-top: 1rem;
        width: 100%;
        box-sizing: border-box;
        box-shadow: var(--shadow-lg);
    }
    
    .table:not(.no-responsive) tfoot td {
        color: white !important;
    }
    
    .table:not(.no-responsive) tfoot td::before {
        color: rgba(255, 255, 255, 0.8) !important;
    }
    
    /* Leere Zellen in tfoot verstecken */
    .table:not(.no-responsive) tfoot td:empty {
        display: none;
    }
    
    .table:not(.no-responsive) tr:hover {
        background: var(--bg-hover);
        box-shadow: var(--shadow-md);
    }
    
    .table:not(.no-responsive) td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
        text-align: right;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .table:not(.no-responsive) td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .table:not(.no-responsive) td:first-child {
        padding-top: 0;
    }
    
    /* Data-Label für mobile Ansicht */
    .table:not(.no-responsive) td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-weight: 600;
        text-align: left;
        flex-shrink: 0;
        margin-right: 1rem;
        min-width: 100px;
    }
    
    .table:not(.no-responsive) td > * {
        min-width: 0;
        text-align: right;
    }
    
    /* Actions-Spalte volle Breite */
    .table:not(.no-responsive) td[data-label="Aktionen"],
    .table:not(.no-responsive) td[data-label="Actions"] {
        justify-content: flex-end;
        padding-top: 0.75rem;
        margin-top: 0.75rem;
        border-top: 1px solid var(--border-color);
        border-bottom: none;
    }
    
    .table:not(.no-responsive) td[data-label="Aktionen"]::before,
    .table:not(.no-responsive) td[data-label="Actions"]::before {
        display: none;
    }
    
    .table:not(.no-responsive) td[data-label="Aktionen"] .flex,
    .table:not(.no-responsive) td[data-label="Actions"] .flex {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Reduce padding */
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* ===== Alerts ===== */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-left: 3px solid;
    font-size: 0.9375rem;
}

.alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: white;
    min-width: 125px;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* Badge Varianten */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: white;
}

.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Badge mit Dot-Indikator */
.badge-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.badge-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.badge-dot.active::before {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.badge-dot.inactive::before {
    background: #6b7280;
}

.badge-dot.warning::before {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.badge-dot.danger::before {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* ===== Soft Badges (transparente Hintergrundfarbe) ===== */
/* Einheitliches Design für alle Badges mit leicht transparentem Hintergrund */
.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-soft-primary {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

.badge-soft-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-soft-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-soft-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-soft-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.badge-soft-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.badge-soft-orange {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.badge-soft-hot {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(247, 147, 30, 0.15));
    color: var(--color-hot);
}

.badge-soft-neutral {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* Badge mit Icon */
.badge-soft svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Badge Größenvarianten */
.badge-soft-sm {
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
}

.badge-soft-lg {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

/* ===== Lead Score Badge ===== */
/* Spezielles Badge für Lead-Scoring mit Wert und Label */
.lead-score-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius);
    min-width: 50px;
}

.lead-score-badge.score-hot {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
}

.lead-score-badge.score-warm {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: var(--score-warm-text, #1a1a1a);
}

.lead-score-badge.score-cold {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.lead-score-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.lead-score-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: inherit;
}

/* ===== Lead Score Circle (Modern Design) ===== */
.lead-score-circle {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.lead-score-circle .score-ring {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.lead-score-circle .score-ring-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 3;
    opacity: 0.4;
}

.lead-score-circle .score-ring-progress {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.lead-score-circle .score-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lead-score-circle .lead-score-value {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
}

/* Score Circle Colors */
.lead-score-circle.score-hot .score-ring-progress {
    stroke: #ff6b35;
    filter: drop-shadow(0 0 4px rgba(255, 107, 53, 0.5));
}

.lead-score-circle.score-hot .lead-score-value {
    color: #ff6b35;
}

.lead-score-circle.score-warm .score-ring-progress {
    stroke: #f7931e;
    filter: drop-shadow(0 0 4px rgba(247, 147, 30, 0.5));
}

.lead-score-circle.score-warm .lead-score-value {
    color: #f7931e;
}

.lead-score-circle.score-cold .score-ring-progress {
    stroke: var(--text-muted);
}

.lead-score-circle.score-cold .lead-score-value {
    color: var(--text-muted);
}

/* ===== Quick Actions ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    border-radius: var(--border-radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    gap: 0.5rem;
    position: relative;
}

.quick-action-btn:hover {
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.05);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

/* Custom Tooltip for Quick Actions */
.quick-action-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.75rem;
    border-radius: var(--border-radius);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    pointer-events: none;
}

.quick-action-btn[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

.quick-action-btn.primary {
    background: var(--bg-tertiary);
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    position: relative;
    overflow: hidden;
}

.quick-action-btn.primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.1));
    opacity: 1;
}

.quick-action-btn.primary:hover {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
}

.quick-action-btn.primary:hover .quick-action-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    background: var(--bg-tertiary);
    color: var(--accent-cyan);
    transition: all 0.2s ease;
}

.quick-action-btn.primary .quick-action-icon {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

.quick-action-btn span {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    z-index: 1;
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Page Layout ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient accent line */
.page-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-cyan) 0%, var(--accent-blue) 50%, var(--accent-purple) 100%);
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
}

/* Optional: subtle background glow */
.page-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.25rem;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 50%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
    margin: 0;
}

/* Page header with icon */
.page-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    margin-right: 1rem;
    flex-shrink: 0;
}

.page-header-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-cyan);
}

.page-header-with-icon {
    display: flex;
    align-items: center;
}

.page-header-with-icon .page-header-text {
    flex: 1;
}

@media (max-width: 1024px) {
    /* Platz für Hamburger-Button oben links lassen */
    .page-header {
        margin-top: 0;
        padding: 1.25rem 1.5rem 1.25rem 4.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.25rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header-icon {
        width: 40px;
        height: 40px;
        margin-right: 0.75rem;
    }
    
    .page-header-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .page-subtitle {
        font-size: 0.85rem;
    }
    
    .page-actions {
        width: 100%;
    }
    
    .page-actions .btn {
        flex: 1;
    }
}

/* Main Container */
.container, .main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
    min-height: calc(100vh - 200px);
}

.container-fluid {
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container, .main-content, .container-fluid {
        padding: 1rem;
    }
}

/* ===== Utility Classes ===== */
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.text-center { text-align: center; }
.text-left { text-align: left; }

.grid {
    display: grid;
    gap: 1rem;
}

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

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

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

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

/* Hero Metrics - Dashboard KPI Cards */
.hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Früher umbrechen bei großen Werten */
@media (max-width: 1600px) {
    .hero-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-metrics {
        grid-template-columns: 1fr;
    }
}

.hero-metric-card {
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius-lg);
    color: white;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    color: white !important;
}

a.hero-metric-card,
a.hero-metric-card:visited,
a.hero-metric-card:hover,
a.hero-metric-card:active,
a.hero-metric-card:focus {
    color: white !important;
    text-decoration: none !important;
}

.hero-metric-card:hover::before {
    opacity: 1;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 0.75rem;
}

.metric-value {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

.metric-subtext {
    font-size: 0.875rem;
    opacity: 0.85;
    font-weight: 500;
}

/* Gradient Color Schemes */
.gradient-blue-cyan {
    background: linear-gradient(135deg, #3b82f6 0%, #06B6D4 100%);
}

.gradient-red-orange {
    background: linear-gradient(135deg, #EF4444 0%, #f97316 100%);
}

.gradient-orange-yellow {
    background: linear-gradient(135deg, #f97316 0%, #FBBF24 100%);
}

.gradient-cyan-green {
    background: linear-gradient(135deg, #06B6D4 0%, #10b981 100%);
}

.gradient-purple-orange {
    background: linear-gradient(135deg, #a855f7 0%, #f97316 100%);
}

.gradient-cyan-blue {
    background: linear-gradient(135deg, #06B6D4 0%, #3b82f6 100%);
}

.gradient-green-cyan {
    background: linear-gradient(135deg, #10b981 0%, #06B6D4 100%);
}

.gradient-purple-pink {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
}

@media (min-width: 768px) {
    .md-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md-grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .md-grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .md-grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .main-content {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.875rem;
    }
    
    .card {
        padding: 1rem;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

.animate-fade-in {
    animation: fadeIn var(--transition-base) ease-out;
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

/* ===== Spinner ===== */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-lg {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

/* ===== Sidebar Navigation ===== */
/* Standardmäßig collapsed, wird dann aufgeklappt wenn nicht collapsed */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 72px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    overflow-y: auto;
}

/* Sidebar aufgeklappt (wenn nicht collapsed) */
.sidebar:not(.collapsed) {
    width: 280px;
}

/* Transition während Initialisierung deaktivieren */
html.sidebar-collapsed-init .sidebar {
    transition: none !important;
}

/* Collapsed Sidebar (nur Icons) – einheitliche Breite für Layout */
.sidebar.collapsed {
    width: 72px;
}

.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .sidebar-footer-actions form {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Span aus dem Layout nehmen, damit nur das Icon zentriert wird (kein Verrutschen) */
.sidebar.collapsed .sidebar-link span {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    clip: rect(0,0,0,0);
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 90px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 1;
    padding: 0.75rem 1rem;
    margin-right: 0.5rem;
    border-radius: var(--border-radius);
    transition: background var(--transition-fast), border-color var(--transition-fast);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .sidebar-brand {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

.sidebar-brand:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .sidebar-brand:hover {
    background: var(--bg-secondary);
}

.sidebar-brand-logo {
    width: 120px;
    height: 60px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-brand-logo {
    display: none;
}

/* Toggle Button (Desktop) */
.sidebar-toggle-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
}

.sidebar-toggle-btn:hover {
    background: var(--bg-hover);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    transform: scale(1.05);
}

.sidebar-toggle-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

/* Pfeil zeigt nach links wenn expanded */
.sidebar:not(.collapsed) .sidebar-toggle-btn svg {
    transform: rotate(0deg);
}

/* Pfeil zeigt nach rechts wenn collapsed */
.sidebar.collapsed .sidebar-toggle-btn svg {
    transform: rotate(180deg);
}

/* Im collapsed State: Button besser sichtbar positionieren */
.sidebar.collapsed .sidebar-toggle-btn {
    position: static;
    margin: 0 auto;
    background: linear-gradient(135deg, #06B6D4 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
    z-index: 101;
    border-color: transparent;
}

.sidebar.collapsed .sidebar-toggle-btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #667eea 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.sidebar.collapsed .sidebar-header {
    position: relative;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    min-height: auto;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-brand {
    display: none;
}

.sidebar-nav {
    flex: 1;
    min-height: 0; /* Flex: erlaubt Scroll im eingeklappten Zustand */
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed .sidebar-nav {
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

/* Section Divider im collapsed state */
.sidebar.collapsed .sidebar-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.sidebar.collapsed .sidebar-nav .sidebar-section:first-child {
    padding-top: 0.25rem;
}

.sidebar.collapsed .sidebar-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-section-title {
    height: 0;
    padding: 0;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar.collapsed .sidebar-menu {
    padding: 0;
}

.sidebar.collapsed .sidebar-menu li {
    margin-bottom: 0.5rem;
    list-style: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-link span {
    margin-left: 0.75rem;
    transition: opacity 0.2s ease;
}

.sidebar-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: white;
    box-shadow: var(--shadow-md);
}

.sidebar-link.active svg {
    color: white;
}

/* Active state im collapsed mode – Kreis mittig hinter dem Icon */
.sidebar.collapsed .sidebar-link.active {
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Aktiver Link im eingeklappten Zustand: dezente linke Kante */
.sidebar.collapsed .sidebar-link.active::before {
    content: none;
}

.sidebar.collapsed .sidebar-link.active {
    box-shadow: inset 3px 0 0 rgba(255,255,255,0.5);
}

/* Icon im aktiven State perfekt zentrieren */
.sidebar.collapsed .sidebar-link.active svg {
    display: block;
    margin: 0;
}

/* Collapsed State: Icons mittig, einheitliche Kreisfläche */
.sidebar.collapsed .sidebar-link {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0 auto;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-link svg {
    display: block;
    margin: 0;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-link:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    pointer-events: none;
    animation: slideInFromLeft 0.2s ease-out;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.sidebar-footer-actions {
    display: flex;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-footer-actions {
    flex-direction: column;
    align-items: center;
}

.sidebar.collapsed .sidebar-footer-actions .theme-toggle {
    margin: 0;
}

.sidebar.collapsed .sidebar-footer-actions form {
    width: 100%;
}

.sidebar.collapsed .sidebar-footer-actions .btn {
    width: 40px;
    height: 40px;
    padding: 0.5rem;
    min-width: auto;
}

.sidebar.collapsed .sidebar-footer-actions .btn span {
    display: none;
}

/* Main Content mit Sidebar */
body:has(.sidebar) {
    padding-left: 280px;
    transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body:has(.sidebar.collapsed) {
    padding-left: 72px;
}

body:has(.sidebar) main {
    min-height: 100vh;
}

/* Initial collapsed state (verhindert Flash beim Seitenladen) */
html.sidebar-collapsed-init body {
    padding-left: 72px;
}

html.sidebar-collapsed-init .sidebar {
    width: 72px;
    transition: none !important;
}

/* Initial expanded state (verhindert Flash beim Seitenladen) */
html.sidebar-expanded-init body {
    padding-left: 280px;
}

html.sidebar-expanded-init .sidebar {
    width: 280px;
    transition: none !important;
}

/* Fallback für Browser ohne :has() Support */
@supports not (selector(:has(*))) {
    body {
        padding-left: 280px;
    }
}

/* Mobile Sidebar Toggle (Hamburger Menu) */
.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1002;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, #06B6D4 0%, #3b82f6 100%);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
}

.sidebar-toggle:hover span {
    background: white;
}

/* Hamburger Button auf Mobile/Tablet anzeigen */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: rgba(30, 41, 59, 0.8);
        backdrop-filter: blur(10px);
    }
    
    .sidebar-toggle:hover {
        background: linear-gradient(135deg, #06B6D4 0%, #3b82f6 100%);
        box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
    }
}

.sidebar-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.sidebar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Overlay nur auf Mobile */
@media (max-width: 1024px) {
    .sidebar-overlay {
        display: block;
    }
}

@media (min-width: 1025px) {
    .sidebar-overlay {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    /* Kein Padding auf Mobile - Vollbreite */
    body {
        padding-left: 0 !important;
    }
    
    body:has(.sidebar) {
        padding-left: 0 !important;
    }
    
    body:has(.sidebar.collapsed) {
        padding-left: 0 !important;
    }
    
    /* Sidebar versteckt per default auf Mobile */
    .sidebar {
        transform: translateX(-100%);
        width: 280px !important;
        box-shadow: var(--shadow-xl);
        z-index: 1000;
    }
    
    /* Sidebar aktiv (geöffnet) */
    .sidebar.active {
        transform: translateX(0);
        z-index: 1000;
    }
    
    /* Collapsed State ignorieren auf Mobile - immer expanded wenn offen */
    .sidebar.collapsed {
        width: 280px !important;
    }
    
    .sidebar.collapsed .sidebar-section-title,
    .sidebar.collapsed .sidebar-link span,
    .sidebar.collapsed .sidebar-footer-actions form {
        opacity: 1;
        width: auto;
        overflow: visible;
        position: static;
        height: auto;
        clip: auto;
    }
    
    .sidebar.collapsed .sidebar-link {
        justify-content: flex-start;
        padding: 0.75rem;
        width: auto;
        height: auto;
        margin: 0;
    }
    
    .sidebar.collapsed .sidebar-link.active {
        margin: 0;
        width: auto;
        height: auto;
    }
    
    .sidebar.collapsed .sidebar-link.active::before {
        display: none;
    }
    
    .sidebar.collapsed .sidebar-footer-actions {
        flex-direction: row;
    }
    
    .sidebar.collapsed .sidebar-footer-actions .btn {
        width: auto;
        height: auto;
        padding: 0.5rem 1rem;
    }
    
    .sidebar.collapsed .sidebar-footer-actions .btn span {
        display: inline;
    }
    
    /* Sidebar Links auf Mobile - normale Darstellung */
    .sidebar-link {
        justify-content: flex-start !important;
        padding: 0.75rem !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
    }
    
    .sidebar-link svg {
        margin: 0 !important;
    }
    
    /* Verstecke Desktop-Toggle-Button in Sidebar auf Mobile */
    .sidebar-toggle-btn {
        display: none !important;
    }
    
    /* Main Content Padding reduzieren auf Mobile */
    .main-content {
        padding: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
}

/* Backwards compatibility - verstecke alte Navbar wenn Sidebar aktiv */
body:has(.sidebar) .navbar {
    display: none;
}

body:has(.sidebar) .mobile-menu-overlay {
    display: none;
}

/* ===== Custom Modal System ===== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    backdrop-filter: blur(4px);
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-color);
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple));
}

/* Light mode specific modal styling */
[data-theme="light"] .modal-content {
    background: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Dark mode specific modal styling */
[data-theme="dark"] .modal-content {
    background: var(--bg-tertiary);
}

.modal-backdrop.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition-fast);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-body label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.modal-body .form-input,
.modal-body .form-select,
.modal-body .form-textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

[data-theme="light"] .modal-body .form-input,
[data-theme="light"] .modal-body .form-select,
[data-theme="light"] .modal-body .form-textarea {
    background: var(--bg-secondary);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-actions .btn {
    min-width: 120px;
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.modal-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.modal-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.modal-icon.info {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    width: calc(100% - 2rem);
}

.toast {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-left: 4px solid var(--accent-cyan);
    animation: slideInFromLeft 0.3s ease-out;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.toast.toast-success {
    border-left-color: #10b981;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.toast-warning {
    border-left-color: #f59e0b;
}

.toast.toast-info {
    border-left-color: var(--accent-cyan);
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.toast-icon.success {
    color: #10b981;
}

.toast-icon.error {
    color: #ef4444;
}

.toast-icon.warning {
    color: #f59e0b;
}

.toast-icon.info {
    color: var(--accent-cyan);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.toast-message {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast.removing {
    opacity: 0;
    transform: translateX(100%);
}

/* ===== Copy Button ===== */
.copy-button {
    background: none;
    border: none;
    padding: 0.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.copy-button:hover {
    color: var(--accent-cyan);
}

.copy-button.copied {
    color: #10b981;
}

.copy-button svg {
    width: 14px;
    height: 14px;
}

/* ===== Masked Text with Reveal ===== */
.masked-text {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: monospace;
    font-size: 0.75rem;
    background: var(--bg-secondary);
    padding: 0.375rem 0.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    max-width: 100%;
}

.masked-value {
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 1;
}

.reveal-button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.reveal-button:hover {
    color: var(--accent-cyan);
}

.reveal-button svg {
    width: 14px;
    height: 14px;
}

/* ===== Loading States ===== */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-secondary.loading::after {
    border-color: var(--border-color);
    border-top-color: var(--text-primary);
}

/* ===== Filter Controls ===== */

/* Filter Toolbar - einheitliche Filterleiste */
.filter-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.filter-toolbar .form-select,
.filter-toolbar .form-input {
    min-width: 120px;
    height: 40px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.filter-toolbar .form-select {
    flex: 0 0 auto;
    padding-right: 2rem;
}

/* Suchfeld im Filter */
.filter-search {
    position: relative;
    flex: 1 1 200px;
    min-width: 150px;
    max-width: 300px;
}

.filter-search svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.filter-search .form-input {
    padding-left: 2.25rem;
    width: 100%;
}

/* Filter-Gruppen (Label + Input) */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Checkbox im Filter */
.filter-checkbox {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-checkbox:hover {
    border-color: var(--accent-cyan);
    background: var(--bg-secondary);
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-cyan);
}

.filter-checkbox span {
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Quick-Select Buttons (Zeitraum etc.) */
.filter-quick-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-quick-select .label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Filter-Aktionen (Submit, Reset) */
.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* Filter-Buttons - Gemeinsame Basis */
.btn-filter,
a.btn-filter-reset,
button.btn-filter-reset {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    min-height: 38px !important;
    height: auto !important;
    line-height: normal !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    overflow: visible !important;
}

.btn-filter svg,
.btn-filter-reset svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

/* Filter-Button (primäre Aktion) */
.btn-filter {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)) !important;
    color: white !important;
    border: none !important;
}

.btn-filter:hover {
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
    transform: translateY(-1px);
    color: white !important;
    text-decoration: none !important;
}

/* Reset-Button (sekundäre Aktion) */
a.btn-filter-reset,
button.btn-filter-reset {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

a.btn-filter-reset:hover,
button.btn-filter-reset:hover {
    border-color: var(--accent-cyan) !important;
    color: var(--accent-cyan) !important;
    text-decoration: none !important;
}

/* Spacer für Flexbox */
.filter-spacer {
    flex: 1;
}

/* Filter-Header mit Toggle */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--accent-cyan);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive Filter */
@media (max-width: 768px) {
    .filter-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-toolbar .form-select,
    .filter-toolbar .form-input {
        width: 100%;
    }
    
    .filter-search {
        max-width: none;
    }
    
    .filter-actions {
        margin-left: 0;
        justify-content: stretch;
    }
    
    .filter-actions .btn-filter {
        flex: 1;
        justify-content: center;
    }
    
    .filter-quick-select {
        flex-wrap: wrap;
    }
}

.collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapse.show {
    max-height: 2000px;
}

/* ===== Empty State ===== */
.empty-state-container {
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: var(--text-muted);
    opacity: 0.3;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-message {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ===== Button Icon Only ===== */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: var(--bg-secondary);
}

.btn-icon.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Icon buttons with colored backgrounds */
.btn-icon.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: white;
}

.btn-icon.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #059669;
    color: white;
}

.btn-icon.btn-warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.btn-icon.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    color: white;
}

.btn-icon.btn-error {
    background: transparent;
    border-color: var(--border-color);
    color: #ef4444;
}

.btn-icon.btn-error:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.btn-icon.btn-icon-success:hover,
.btn-icon.success:hover {
    border-color: #10b981;
    color: #10b981;
}

.btn-icon.btn-icon-danger:hover,
.btn-icon.danger:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

/* ===== Custom Tooltips for Icon Buttons ===== */
.btn-icon[title] {
    position: relative;
}

.btn-icon[title]::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.4rem 0.65rem;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-icon[title]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===== Key Cell (Compact API Key Display) ===== */
.key-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.key-preview {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.key-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.key-actions .btn-icon {
    padding: 0.25rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.key-actions .btn-icon:hover {
    color: var(--accent-cyan);
}

.key-actions .btn-icon.copied {
    color: #10b981;
}

.key-actions .btn-icon svg {
    width: 14px;
    height: 14px;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-separator {
    margin: 0 0.75rem;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ===== Sales Analytics ===== */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    /* Override alte Zentrierung */
    align-items: stretch;
    text-align: left;
}

.stat-card h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
}

.stat-card-full {
    grid-column: 1 / -1;
}

/* Conversion Funnel (Analytics Page) - Clean Funnel Design */
.funnel-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.funnel-container .funnel-stage {
    display: flex;
    align-items: center;
}

.funnel-container .funnel-bar-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.funnel-container .funnel-bar {
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    color: white;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.funnel-container .funnel-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.funnel-container .funnel-bar-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.funnel-container .funnel-bar-value {
    width: 70px;
    height: 40px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: right;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Trichter-Breiten: jede Stufe wird schmaler */
.funnel-container .funnel-stage:nth-child(1) .funnel-bar { width: 280px; }
.funnel-container .funnel-stage:nth-child(2) .funnel-bar { width: 245px; }
.funnel-container .funnel-stage:nth-child(3) .funnel-bar { width: 210px; }
.funnel-container .funnel-stage:nth-child(4) .funnel-bar { width: 175px; }
.funnel-container .funnel-stage:nth-child(5) .funnel-bar { width: 145px; }
.funnel-container .funnel-stage:nth-child(6) .funnel-bar { width: 115px; }

/* Funnel Farbstufen - Grün nach Orange */
.funnel-container .funnel-stage-1 { background: linear-gradient(90deg, #10b981, #34d399); }
.funnel-container .funnel-stage-2 { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }
.funnel-container .funnel-stage-3 { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.funnel-container .funnel-stage-4 { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.funnel-container .funnel-stage-5 { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.funnel-container .funnel-stage-6 { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* Responsive */
@media (max-width: 640px) {
    .funnel-container .funnel-stage:nth-child(1) .funnel-bar { width: 200px; }
    .funnel-container .funnel-stage:nth-child(2) .funnel-bar { width: 175px; }
    .funnel-container .funnel-stage:nth-child(3) .funnel-bar { width: 150px; }
    .funnel-container .funnel-stage:nth-child(4) .funnel-bar { width: 125px; }
    .funnel-container .funnel-stage:nth-child(5) .funnel-bar { width: 105px; }
    .funnel-container .funnel-stage:nth-child(6) .funnel-bar { width: 85px; }
    
    .funnel-container .funnel-bar-label { font-size: 0.75rem; }
    .funnel-container .funnel-bar-value { width: 55px; font-size: 0.8125rem; }
}

/* Verlustgründe - Premium Design */
.loss-reason-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.03));
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.loss-reason-item:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
    border-color: rgba(239, 68, 68, 0.25);
    transform: translateX(4px);
}

.loss-reason-item:last-child {
    margin-bottom: 0;
}

.loss-reason-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.loss-reason-icon svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.loss-reason-content {
    flex: 1;
    min-width: 0;
}

.loss-reason-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.loss-reason-bar {
    width: 100%;
    height: 8px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.loss-reason-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f87171);
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.loss-reason-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Lead Source Table */
.lead-source-table {
    width: 100%;
    font-size: 0.875rem;
}

.lead-source-table th,
.lead-source-table td {
    padding: 0.5rem;
    text-align: left;
}

.lead-source-table th {
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
}

.lead-source-table td {
    border-bottom: 1px solid var(--border-color);
}

/* Analytics Helper Classes */
.tooltip-inline {
    margin-left: 0.25rem;
}

.analytics-empty-state {
    text-align: center;
    padding: 2rem;
}

.analytics-empty-state svg {
    opacity: 0.3;
    margin-bottom: 1rem;
}

.analytics-empty-state p {
    color: var(--text-muted);
    margin: 0;
}

.table-empty-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

@media (max-width: 768px) {
    .analytics-grid { grid-template-columns: 1fr; }
}

/* ===== Sales Dashboard ===== */
/* Hot Leads Widget */
.hot-leads-card {
    margin-bottom: 1.5rem;
    border: 2px solid var(--color-hot);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(255, 193, 7, 0.05));
}

.hot-leads-title {
    color: var(--color-hot);
}

.hot-leads-title svg {
    vertical-align: -4px;
    margin-right: 0.375rem;
}

.hot-leads-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hot-lead-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.hot-lead-name {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.hot-lead-name:hover {
    color: var(--accent-cyan);
}

.hot-lead-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.hot-lead-value {
    color: var(--accent-green);
    font-weight: 600;
}

.hot-lead-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.hot-lead-actions .btn {
    white-space: nowrap;
}

.hot-lead-owner {
    font-weight: 500;
    color: var(--accent-cyan);
}

.hot-lead-owner.unassigned {
    color: var(--accent-red);
}

/* Pipeline Funnel (Dashboard) */
.pipeline-funnel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pipeline-funnel .funnel-stage {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pipeline-funnel .funnel-bar-container {
    flex: 1;
    height: 24px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.pipeline-funnel .funnel-bar {
    height: 100%;
    border-radius: 4px;
    min-width: 4px;
}

.funnel-label {
    width: 180px;
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

/* Alert List */
.alert-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-item {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.alert-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Pipeline + Schnellzugriff Row */
.pipeline-quickaccess-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.pipeline-quickaccess-row .pipeline-card,
.pipeline-quickaccess-row .quickaccess-card {
    display: flex;
    flex-direction: column;
}

.pipeline-quickaccess-row .quickaccess-card .quick-actions {
    flex: 1;
    align-content: start;
}

@media (max-width: 992px) {
    .pipeline-quickaccess-row {
        grid-template-columns: 1fr;
    }
}

/* Tips Section */
.tips-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.tip-of-day {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.05), rgba(76, 175, 80, 0.05));
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
}

.tip-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
}

.tip-content {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tip-content strong {
    color: var(--accent-cyan);
}

/* Keyboard Hints */
.keyboard-hints {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hint-label {
    width: 100%;
    margin-bottom: 0.25rem;
}

.hint-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyboard-hints kbd {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    font-size: 0.6875rem;
    font-family: inherit;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
    margin-right: 0.25rem;
}

/* Month Stats */
.month-card {
    margin-bottom: 1.5rem;
}

.month-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.month-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.month-stat-value {
    font-size: 1.75rem;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
}

.month-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.month-stat-sub {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .month-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .month-stats {
        grid-template-columns: 1fr;
    }
}

/* Alert Cards */
.alert-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-card {
    height: fit-content;
}

.alert-card-icon {
    vertical-align: -3px;
    margin-right: 0.375rem;
}

.alert-card-danger {
    border-left: 4px solid var(--accent-red);
}

.alert-card-danger .card-title {
    color: var(--accent-red);
}

.alert-card-danger .alert-card-icon {
    color: var(--accent-red);
}

.alert-card-info {
    border-left: 4px solid var(--accent-cyan);
}

.alert-card-info .alert-card-icon {
    color: var(--accent-cyan);
}

.alert-card-warning {
    border-left: 4px solid #ffc107;
}

.alert-card-warning .alert-card-icon {
    color: #ffc107;
}

.alert-card-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: -0.5rem 0 0.75rem 0;
}

.alert-card-detail {
    display: block;
    color: var(--text-muted);
}

/* Empty Focus */
.empty-focus {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
}

.empty-focus svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.empty-focus-title {
    margin: 0.5rem 0 0 0;
    font-weight: 500;
}

.empty-focus-desc {
    margin: 0.25rem 0 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.empty-focus-btn {
    margin-top: 0.75rem;
}

.empty-focus .btn {
    color: white !important;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
}

.empty-focus .btn:hover {
    color: white !important;
    background: linear-gradient(135deg, #0056b3, #004094);
}

/* Daily Focus Widget */
.daily-focus {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-left: 4px solid #17a2b8;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.daily-focus-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.daily-focus-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #17a2b8, #138496);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.daily-focus-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.daily-focus-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

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

.focus-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
}

.focus-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.focus-item-icon.priority-high { background: #dc3545; }
.focus-item-icon.priority-medium { background: #ffc107; color: #212529; }
.focus-item-icon.priority-low { background: #17a2b8; }

.focus-item-content { flex: 1; }

.focus-item-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0 0 0.25rem 0;
}

.focus-item-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.focus-item-action {
    margin-top: 0.5rem;
}

.focus-item-action a {
    font-size: 0.75rem;
    color: #17a2b8;
    text-decoration: none;
}

.focus-item-action a:hover {
    text-decoration: underline;
}

/* Onboarding Tip */
.onboarding-tip {
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid rgba(23, 162, 184, 0.3);
    border-radius: 6px;
    padding: 0.875rem;
    margin-top: 1rem;
    font-size: 0.8125rem;
}

.onboarding-tip strong {
    color: #17a2b8;
}

[data-theme="dark"] .onboarding-tip {
    background: rgba(23, 162, 184, 0.15);
}

/* ===== Pipeline Page ===== */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.summary-value {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
}

.summary-label {
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.text-primary { color: #007bff; }
.text-success { color: #28a745; }
.text-info { color: #17a2b8; }
.text-danger { color: #dc3545; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.row { display: flex; flex-wrap: wrap; margin: 0 -0.75rem; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; padding: 0 0.75rem; }

@media (max-width: 768px) {
    .col-md-6 { flex: 0 0 100%; max-width: 100%; }
}

/* ===== Team Performance ===== */
.date-inputs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.date-inputs label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.date-inputs .form-input {
    width: 140px;
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
    .charts-row { grid-template-columns: 1fr; }
}

/* Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-chart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-chart-label {
    width: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-chart-bar-container {
    flex: 1;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.bar-chart-bar {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
    min-width: 40px;
    transition: width 0.5s ease;
}

.bar-chart-bar.won { background: linear-gradient(90deg, #10b981, #34d399); }
.bar-chart-bar.pipeline { background: linear-gradient(90deg, #3b82f6, #06B6D4); }
.bar-chart-bar.activities { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

.bar-chart-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

/* Leaderboard */
.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    transition: transform 0.15s ease;
}

.leaderboard-item:hover {
    transform: translateX(4px);
}

.leaderboard-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.leaderboard-rank.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; }
.leaderboard-rank.silver { background: linear-gradient(135deg, #9ca3af, #6b7280); color: white; }
.leaderboard-rank.bronze { background: linear-gradient(135deg, #d97706, #b45309); color: white; }
.leaderboard-rank.default { background: var(--border-color); color: var(--text-muted); }

.leaderboard-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-name {
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.leaderboard-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.leaderboard-value {
    text-align: right;
}

.leaderboard-value-main {
    font-size: 1.25rem;
    font-weight: 700;
    color: #10b981;
}

.leaderboard-value-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Team Cards */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.team-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.team-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.1);
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.team-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.team-card-name {
    font-weight: 600;
    font-size: 1.125rem;
}

.team-card-role {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.team-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.team-stat {
    text-align: center;
}

.team-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.team-stat-value.won { color: #10b981; }
.team-stat-value.lost { color: #ef4444; }
.team-stat-value.active { color: #3b82f6; }

.team-stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.team-card-progress {
    margin-top: 1rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.375rem;
}

.progress-label-text { color: var(--text-muted); }
.progress-label-value { font-weight: 600; }

.progress-bar-bg {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-bar-fill.green { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-bar-fill.blue { background: linear-gradient(90deg, #3b82f6, #06B6D4); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== Prospect List ===== */
.hot-indicator {
    display: inline-flex;
    align-items: center;
    margin-left: 0.375rem;
    vertical-align: middle;
    color: var(--color-hot);
}

.hot-indicator svg {
    width: 14px;
    height: 14px;
}

/* ===== Prospect Detail ===== */
.prospect-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.detail-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-muted); }

.detail-value {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: right;
}

/* Timeline */
.timeline { margin-top: 1rem; }

.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 1.5rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Modal */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-backdrop.active { display: flex; align-items: center; justify-content: center; }

.modal-content {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
}

.action-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* Sales Coach Widget */
.sales-coach {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-left: 4px solid #17a2b8;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.sales-coach-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sales-coach-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #17a2b8, #138496);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.sales-coach-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.sales-coach-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.sales-coach-toggle {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
}

.sales-coach-toggle:hover {
    background: var(--bg-tertiary);
}

.sales-coach-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .sales-coach-content { grid-template-columns: 1fr; }
}

.coach-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
}

.coach-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coach-section-title svg {
    color: #17a2b8;
}

.next-action {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 1px solid #28a745;
    color: #155724;
}

.next-action .coach-section-title svg { color: #28a745; }

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.375rem 0;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--border-color);
}

.checklist li:last-child { border-bottom: none; }

.checklist-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

.checklist-icon.done { color: #28a745; }
.checklist-icon.pending { color: #ffc107; }
.checklist-icon.missing { color: #dc3545; }

.tip-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 0.625rem;
    font-size: 0.8125rem;
    color: #856404;
    margin-top: 0.5rem;
}

[data-theme="dark"] .tip-box {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

[data-theme="dark"] .next-action {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.coach-accordion {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 1rem;
}

.coach-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.coach-accordion-header:hover {
    background: var(--border-color);
}

.coach-accordion-header svg {
    transition: transform 0.2s;
}

.coach-accordion.open .coach-accordion-header svg {
    transform: rotate(180deg);
}

.coach-accordion-body {
    display: none;
    padding: 1rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    background: var(--card-bg);
}

.coach-accordion.open .coach-accordion-body {
    display: block;
}

.script-highlight {
    background: rgba(23, 162, 184, 0.1);
    border-left: 3px solid #17a2b8;
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
    border-radius: 0 4px 4px 0;
}

.script-label {
    font-weight: 600;
    color: #17a2b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.warning-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.warning-banner svg { color: #856404; flex-shrink: 0; }

[data-theme="dark"] .warning-banner {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
}

[data-theme="dark"] .warning-banner svg { color: #ffc107; }

/* ===== Prospect Form ===== */
.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.span-2 {
    grid-column: span 2;
}

.span-full {
    grid-column: 1 / -1;
}

.duplicate-warning {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: var(--border-radius);
    font-size: 0.8125rem;
    color: #856404;
}

.duplicate-warning svg {
    vertical-align: -3px;
    margin-right: 0.25rem;
    color: #ffc107;
}

.duplicate-warning ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.duplicate-warning li {
    margin-bottom: 0.25rem;
}

.duplicate-warning a {
    color: #856404;
    text-decoration: underline;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
}

.percentage-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.percentage-group input {
    width: 80px;
}

.percentage-group span {
    color: var(--text-muted);
}

/* Deutsches Adressformat */
.address-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.address-row {
    display: grid;
    gap: 1rem;
}

.address-row-plz-city {
    grid-template-columns: 120px 1fr;
}

.address-row-state-country {
    grid-template-columns: 1fr 100px;
}

@media (max-width: 768px) {
    .form-grid-3, .form-grid-4 {
        grid-template-columns: 1fr;
    }
    .span-2 {
        grid-column: span 1;
    }
    .address-row-plz-city,
    .address-row-state-country {
        grid-template-columns: 1fr;
    }
}

/* ===== Tenant Detail ===== */
.tenant-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .tenant-detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.detail-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-section h3 svg {
    width: 20px;
    height: 20px;
    color: var(--accent-cyan);
}

.key-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.key-display code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-actions-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.action-card {
    flex: 1;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.action-card-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-cyan);
}

.action-card-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9375rem;
}

.action-card-content p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.map-container {
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.map-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* ===== Tenant Billing Rates ===== */
.rate-card {
    margin-bottom: 1.5rem;
}

.rate-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
}

.rate-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.rate-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.rate-table tr:last-child td {
    border-bottom: none;
}

.rate-table .amount {
    font-weight: 600;
    font-size: 1.125rem;
}

.rate-table .date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.rate-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.quick-edit {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quick-edit input {
    height: 36px;
}

.quick-edit input[type="date"] {
    width: 140px;
}

.quick-edit input.currency-input,
.quick-edit input[name="amount"] {
    width: 90px;
    text-align: right;
}

/* Ensure all buttons in quick-edit have consistent size */
.quick-edit .btn-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
}

.rate-actions .btn-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
}

/* Delete form in rate-actions should be inline-flex for alignment */
.rate-actions .delete-rate-form {
    display: flex;
    align-items: center;
    margin: 0;
}

.add-rate-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
}

.add-rate-form .form-group {
    margin-bottom: 0;
}

.add-form-actions {
    margin-left: auto;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.billing-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
    .billing-summary-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .billing-summary-cards { grid-template-columns: 1fr; }
}

.billing-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
}

.billing-summary-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.billing-summary-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
}

.billing-summary-card-value.self-pay { color: var(--accent-cyan); }
.billing-summary-card-value.gkv { color: #10b981; }
.billing-summary-card-value.bg { color: #f97316; }
.billing-summary-card-value.other { color: #8b5cf6; }

/* ===== Page Actions Inline ===== */
.page-actions-inline {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ===== Sales Map ===== */
#map {
    height: calc(100vh - 320px);
    min-height: 500px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.geocode-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.geocode-alert-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--text-color);
}

.geocode-alert-content svg {
    color: #ffc107;
    flex-shrink: 0;
}

.btn-geocode {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-color);
    border: 1px solid var(--accent-cyan);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-geocode:hover {
    background: var(--accent-cyan);
    color: white;
}

@media (max-width: 640px) {
    .geocode-alert {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-geocode {
        justify-content: center;
    }
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.legend-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.public-link {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.public-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), #3b82f6);
}

.public-link-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.public-link-header svg {
    color: var(--accent-cyan);
}

.public-link-header strong {
    font-size: 1rem;
}

.public-link-desc {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.public-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-cyan), #3b82f6);
    color: white !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
}

.public-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 188, 212, 0.4);
    color: white !important;
}

.public-link-btn svg {
    flex-shrink: 0;
}

.public-link-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0 0 0;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.public-link-tip svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--accent-cyan);
}

/* ===== Logs ===== */
.btn-demo-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid;
}

.btn-demo-action.generate {
    background: var(--bg-tertiary);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.btn-demo-action.generate:hover {
    background: var(--accent-cyan);
    color: white;
}

.btn-demo-action.cleanup {
    background: var(--bg-tertiary);
    color: #dc3545;
    border-color: #dc3545;
}

.btn-demo-action.cleanup:hover {
    background: #dc3545;
    color: white;
}

.btn-demo-action:disabled {
    opacity: 0.6;
    cursor: wait;
}

.log-viewer {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    overflow-x: auto;
    max-height: 70vh;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.log-info {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.log-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.log-info-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.log-info-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Fullscreen Log Viewer */
.log-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.2s ease-out;
}

.log-fullscreen-overlay.active {
    display: flex;
}

.log-fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.log-fullscreen-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.log-fullscreen-actions {
    display: flex;
    gap: 0.75rem;
}

.log-fullscreen-content {
    flex: 1;
    overflow: auto;
    padding: 2rem;
}

.log-fullscreen-viewer {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    height: 100%;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow: auto;
}

/* ===== Calendar / Appointments ===== */
.appointment-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.appointment-card.overdue {
    border-left-color: #dc3545;
}

.appointment-card.today {
    border-left-color: #ffc107;
}

.appointment-time {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.appointment-title {
    font-weight: 600;
    margin: 0.25rem 0;
}

.section-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

/* ===== Upload Dropzone (Downloads) ===== */
.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
}

.upload-dropzone.has-file {
    border-color: var(--accent-green);
    border-style: solid;
}

.upload-icon {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.upload-input {
    display: none;
}

.selected-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.selected-file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.selected-file .file-name {
    font-weight: 500;
}

.selected-file .file-size {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.upload-progress {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.progress-bar {
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-cyan) 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 12px;
    position: relative;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.progress-text-secondary {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* File Table Icons */
.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-secondary);
}

.file-icon-archive { color: #ffc107; background: rgba(255, 193, 7, 0.1); }
.file-icon-pdf { color: #dc3545; background: rgba(220, 53, 69, 0.1); }
.file-icon-image { color: #28a745; background: rgba(40, 167, 69, 0.1); }
.file-icon-installer { color: #007bff; background: rgba(0, 123, 255, 0.1); }

.url-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.url-link {
    font-family: monospace;
    font-size: 0.8125rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-icon {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Custom Select (Logs) */
.custom-select-wrapper {
    position: relative;
    display: inline-block;
    min-width: 180px;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}

.custom-select:hover {
    border-color: var(--accent-cyan);
    background: var(--bg-tertiary);
}

.custom-select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.select-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
}

.custom-select:hover + .select-arrow {
    color: var(--accent-cyan);
}

/* ===== Utility Classes ===== */
.page-header-flex {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title-inline {
    margin: 0;
}

.quick-actions-2col {
    grid-template-columns: repeat(2, 1fr);
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.font-sm { font-size: 0.8125rem; }
.font-xs { font-size: 0.75rem; }
.font-lg { font-size: 1.5rem; }
.font-xl { font-size: 1.75rem; }
.font-bold { font-weight: 700; }

.color-muted { color: var(--text-muted); }
.color-success { color: #10b981; }

.tooltip-wide { width: 300px; }
.tooltip-medium { width: 280px; }

.pipeline-description {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.team-card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.team-card-revenue-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.team-card-revenue-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOUCH-OPTIMIERUNG FÜR TABLET (iPad) UND SMARTPHONE
   
   Prinzipien:
   - Apple HIG: Min. Touch-Target 44x44px
   - Größere Schriften für Außendienst (Sonnenlicht)
   - Prominente Quick-Actions für häufige Aufgaben
   - Progressive Enhancement: Desktop unverändert
   ═══════════════════════════════════════════════════════════════════════════ */

/* ===== Touch Detection (CSS-only, für hover-Unterscheidung) ===== */
@media (hover: none) and (pointer: coarse) {
    /* Touch-Geräte: Hover-Effekte entfernen die verwirren */
    .btn:hover:not(:active),
    .sidebar-link:hover:not(:active) {
        transform: none;
    }
    
    /* Active-States stärker für Touch-Feedback */
    .btn:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLET-OPTIMIERUNG (iPad: 768px - 1024px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1024px) {
    
    /* ----- Touch-Targets: Min 44x44px ----- */
    .btn-sm,
    .btn-icon,
    .btn-sm.btn-icon {
        min-height: 44px;
        min-width: 44px;
        padding: 0.625rem 1rem;
    }
    
    .btn-filter,
    .btn-filter-reset {
        min-height: 44px;
        padding: 0.625rem 1.25rem;
    }
    
    /* Icon-only Buttons größer */
    .btn-sm.btn-icon,
    td .btn-icon {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }
    
    /* ----- Formulare Touch-optimiert ----- */
    .form-input,
    .form-select,
    .form-textarea {
        min-height: 44px;
        font-size: 1rem; /* Verhindert iOS-Zoom */
        padding: 0.75rem 1rem;
    }
    
    select.form-select {
        padding-right: 2.5rem; /* Platz für Dropdown-Pfeil */
    }
    
    /* ----- Filter-Toolbar Touch-optimiert ----- */
    .filter-toolbar {
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .filter-toolbar .form-select,
    .filter-toolbar .form-input {
        min-width: 140px;
        flex: 1 1 140px;
    }
    
    .filter-search {
        flex: 2 1 200px;
    }
    
    .filter-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
        gap: 0.75rem;
        margin-top: 0.5rem;
    }
    
    /* ----- Tabellen-Aktionen Touch-freundlich ----- */
    .table td .flex {
        gap: 0.5rem;
    }
    
    .table td[data-label="Aktionen"] .flex,
    .table td[data-label="Actions"] .flex {
        gap: 0.75rem;
    }
    
    /* ----- Page Header Touch-optimiert ----- */
    .page-header {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .page-actions {
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .page-actions .btn-sm {
        flex: 1 1 auto;
        justify-content: center;
    }
    
    /* ----- Action Buttons (Prospect Detail) prominenter ----- */
    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem;
        background: var(--bg-secondary);
        border-radius: var(--border-radius-lg);
        margin-bottom: 1.5rem;
    }
    
    .action-buttons .btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-height: 48px;
        justify-content: center;
    }
    
    .action-buttons .btn-success,
    .action-buttons .btn-primary {
        flex: 1 1 100%;
        order: -1; /* Wichtigste Aktion zuerst */
    }
    
    /* ----- Sales Coach besser lesbar ----- */
    .sales-coach {
        font-size: 1rem;
    }
    
    .sales-coach-content {
        font-size: 0.9375rem;
    }
    
    .coach-section-title {
        font-size: 1rem;
    }
    
    .tip-box {
        font-size: 0.9375rem;
        padding: 1rem;
    }
    
    .checklist li {
        padding: 0.75rem 0;
        font-size: 0.9375rem;
    }
    
    /* ----- Cards Touch-optimiert ----- */
    .card {
        padding: 1.25rem;
    }
    
    .detail-row {
        padding: 0.875rem 0;
    }
    
    /* ----- Modals Touch-optimiert ----- */
    .modal-content {
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-content .btn {
        min-height: 48px;
    }
    
    .modal-content .form-group {
        margin-bottom: 1.25rem;
    }
    
    /* ----- Timeline Touch-optimiert ----- */
    .timeline-item {
        padding: 1rem 0 1rem 1.5rem;
    }
    
    /* ----- Status-Badge Touch-Target ----- */
    .status-badge {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }
    
    /* ----- Lead Score Circle größer ----- */
    .lead-score-circle {
        width: 56px;
        height: 56px;
    }
    
    /* ----- Quick-Links in Tabelle ----- */
    .table a[href^="tel:"],
    .table a[href^="mailto:"] {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
        background: var(--bg-tertiary);
        border-radius: var(--border-radius);
        margin: -0.25rem;
    }
    
    .table a[href^="tel:"]:hover,
    .table a[href^="mailto:"]:hover {
        background: var(--accent-cyan);
        color: white;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SMARTPHONE-OPTIMIERUNG (< 768px)
   Erweitert die Tablet-Regeln für noch kompaktere Displays
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    
    /* ----- Touch-Targets: Noch größer auf kleinem Screen ----- */
    .btn-sm,
    .btn-icon {
        min-height: 48px;
        min-width: 48px;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        min-height: 48px;
        font-size: 16px; /* Verhindert iOS-Zoom definitiv */
    }
    
    /* ----- Filter-Toolbar vertikal ----- */
    .filter-toolbar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-toolbar > * {
        width: 100%;
        flex: none;
    }
    
    .filter-toolbar .btn,
    .filter-toolbar .form-select,
    .filter-toolbar .form-input {
        width: 100%;
    }
    
    .filter-search {
        order: -1; /* Suche nach oben */
    }
    
    .filter-actions {
        flex-direction: column;
        margin-top: 0;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
    
    /* ----- Action Buttons Vollbreite ----- */
    .action-buttons {
        padding: 0.75rem;
    }
    
    .action-buttons .btn {
        flex: 1 1 100%;
        min-height: 52px;
    }
    
    /* ----- Page Header kompakt ----- */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .page-header-with-icon {
        justify-content: center;
        text-align: center;
    }
    
    .page-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .page-actions .btn-back {
        grid-column: 1 / -1;
        order: 10;
    }
    
    .page-actions .status-badge {
        grid-column: 1 / -1;
        text-align: center;
        justify-content: center;
    }
    
    /* ----- Detail Grid einspaltiger ----- */
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* ----- Cards kompakter Padding ----- */
    .card {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    /* ----- Detail Rows Touch-optimiert ----- */
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
        padding: 0.75rem 0;
    }
    
    .detail-label {
        font-size: 0.75rem;
        min-width: auto;
    }
    
    /* ----- Ansprechpartner-Links als große Buttons ----- */
    .detail-section a[href^="tel:"],
    .detail-section a[href^="mailto:"] {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        min-height: 44px;
        padding: 0.5rem 1rem;
        background: var(--bg-tertiary);
        border-radius: var(--border-radius);
        font-size: 0.9375rem;
    }
    
    .detail-section a[href^="tel:"]::before {
        content: "📞";
    }
    
    .detail-section a[href^="mailto:"]::before {
        content: "✉️";
    }
    
    /* ----- Sales Coach kompakter ----- */
    .sales-coach {
        margin-bottom: 1rem;
    }
    
    .sales-coach-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .sales-coach-toggle {
        flex: 1 1 100%;
    }
    
    .coach-section {
        padding: 1rem;
    }
    
    /* ----- Modals Fullscreen auf Smartphone ----- */
    .modal-backdrop {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        max-width: 100%;
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
        max-height: 85vh;
        padding: 1.25rem;
    }
    
    /* ----- Quick Note Modal ----- */
    #quickNoteModal .modal-content,
    #noteModal .modal-content {
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
    }
    
    /* ----- Tabellen: Card-Layout besser ----- */
    .table:not(.no-responsive) tbody tr {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .table:not(.no-responsive) td {
        padding: 0.625rem 0;
    }
    
    /* ----- Status Badge in Tabelle größer ----- */
    .table:not(.no-responsive) td[data-label="Status"] .status-badge {
        display: inline-flex;
        padding: 0.625rem 1rem;
    }
    
    /* ----- Aktions-Buttons in Tabelle ----- */
    .table:not(.no-responsive) td[data-label="Aktionen"] .flex,
    .table:not(.no-responsive) td[data-label="Actions"] .flex {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
        gap: 0.5rem;
        width: 100%;
    }
    
    .table:not(.no-responsive) td[data-label="Aktionen"] .btn,
    .table:not(.no-responsive) td[data-label="Actions"] .btn {
        min-height: 48px;
    }
    
    /* ----- Timeline kompakter ----- */
    .timeline-item {
        padding: 0.75rem 0 0.75rem 1rem;
    }
    
    .timeline-date {
        font-size: 0.75rem;
    }
    
    /* ----- Accordion Touch-optimiert ----- */
    .coach-accordion-header {
        min-height: 48px;
        padding: 0.875rem 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   KLEINE SMARTPHONES (< 400px) - Extra kompakt
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 400px) {
    .main-content {
        padding: 0.75rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .card {
        padding: 0.875rem;
    }
    
    .action-buttons .btn {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
    
    .action-buttons .btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* Page Actions: 1 Spalte */
    .page-actions {
        grid-template-columns: 1fr;
    }
    
    .lead-score-circle {
        width: 48px;
        height: 48px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANDSCAPE-MODUS TABLET (iPad quer)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    /* Action Buttons 4-spaltig bei Landscape */
    .action-buttons .btn {
        flex: 1 1 calc(25% - 0.75rem);
    }
    
    .action-buttons .btn-success,
    .action-buttons .btn-primary {
        flex: 1 1 calc(50% - 0.5rem);
    }
    
    /* Filter-Toolbar einzeilig */
    .filter-toolbar {
        flex-wrap: nowrap;
    }
    
    .filter-actions {
        flex: 0 0 auto;
        margin-top: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FLOATING ACTION BUTTON (FAB) - Schnellzugriff für Touch
   Nur auf Touch-Geräten sichtbar
   ═══════════════════════════════════════════════════════════════════════════ */
.fab-container {
    display: none;
}

@media (max-width: 1024px) {
    .fab-container {
        display: block;
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        z-index: 900;
    }
    
    .fab {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
        color: white;
        border: none;
        box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .fab:hover,
    .fab:active {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
    }
    
    .fab svg {
        width: 24px;
        height: 24px;
    }
    
    /* FAB Menu (expandable) */
    .fab-menu {
        position: absolute;
        bottom: 70px;
        right: 0;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
    }
    
    .fab-container.open .fab-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .fab-menu-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        background: var(--bg-card);
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-color);
        white-space: nowrap;
        text-decoration: none;
        color: var(--text-primary);
        font-weight: 500;
        min-height: 48px;
        transition: all 0.2s ease;
    }
    
    .fab-menu-item:hover,
    .fab-menu-item:active {
        background: var(--bg-hover);
        border-color: var(--accent-cyan);
    }
    
    .fab-menu-item svg {
        width: 20px;
        height: 20px;
        color: var(--accent-cyan);
    }
    
    .fab-menu-item.fab-call {
        background: linear-gradient(135deg, #10b981, #059669);
        color: white;
        border-color: transparent;
    }
    
    .fab-menu-item.fab-call svg {
        color: white;
    }
    
    /* FAB Rotation beim Öffnen */
    .fab-container.open .fab {
        transform: rotate(45deg);
    }
    
    /* Safe Area für iPhone Notch */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .fab-container {
            bottom: calc(1.5rem + env(safe-area-inset-bottom));
        }
    }
}

/* Smartphone: FAB etwas kleiner */
@media (max-width: 767px) {
    .fab-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    .fab {
        width: 52px;
        height: 52px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SWIPE-HINT für Touch-Listen
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .swipe-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem;
        background: var(--bg-tertiary);
        border-radius: var(--border-radius);
        font-size: 0.8125rem;
        color: var(--text-muted);
        margin-bottom: 1rem;
    }
    
    .swipe-hint svg {
        animation: swipeHint 2s ease-in-out infinite;
    }
    
    @keyframes swipeHint {
        0%, 100% { transform: translateX(0); opacity: 0.5; }
        50% { transform: translateX(10px); opacity: 1; }
    }
    
    /* Swipe-Hint nur einmal zeigen */
    .swipe-hint.dismissed {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PULL-TO-REFRESH Indikator (für JS-Integration)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .pull-indicator {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%) translateY(-100%);
        padding: 0.75rem 1.5rem;
        background: var(--bg-card);
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        box-shadow: var(--shadow-md);
        font-size: 0.875rem;
        color: var(--text-secondary);
        z-index: 800;
        transition: transform 0.3s ease;
    }
    
    .pull-indicator.visible {
        transform: translateX(-50%) translateY(0);
    }
    
    .pull-indicator.loading {
        background: var(--accent-cyan);
        color: white;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOUCH-OPTIMIERTE QUICK-ACTIONS LEISTE
   Sticky am unteren Bildschirmrand auf Touch-Geräten
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .touch-quick-actions {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border-color);
        padding: 0.75rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
        gap: 0.5rem;
        z-index: 850;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    }
    
    .touch-quick-actions .btn {
        flex: 1;
        min-height: 48px;
        justify-content: center;
    }
    
    /* Body padding anpassen wenn Quick-Actions sichtbar */
    body:has(.touch-quick-actions) {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0));
    }
    
    body:has(.touch-quick-actions) .fab-container {
        bottom: calc(80px + env(safe-area-inset-bottom, 0));
    }
}

/* Desktop: Touch-Quick-Actions verstecken */
@media (min-width: 1025px) {
    .touch-quick-actions {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER COLLAPSE FÜR TOUCH-GERÄTE
   Klappbare Filter für bessere Übersicht auf kleinen Screens
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .filter-collapse-wrapper {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .filter-collapse-toggle {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        min-height: 48px;
        font-weight: 600;
    }
    
    .filter-collapse-toggle.active {
        background: var(--accent-cyan);
        color: white;
        border-color: var(--accent-cyan);
    }
    
    .filter-count {
        background: var(--accent-cyan);
        color: white;
        padding: 0.125rem 0.5rem;
        border-radius: 1rem;
        font-size: 0.75rem;
        font-weight: 700;
    }
    
    .filter-collapse-toggle.active .filter-count {
        background: white;
        color: var(--accent-cyan);
    }
    
    .filter-collapse-content {
        flex: 1 1 100%;
        display: none;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
        background: var(--bg-secondary);
        border-radius: var(--border-radius);
        border: 1px solid var(--border-color);
        animation: filterSlideDown 0.2s ease;
    }
    
    .filter-collapse-content.show {
        display: flex;
    }
    
    @keyframes filterSlideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .filter-collapse-content .form-select,
    .filter-collapse-content .form-input {
        width: 100%;
    }
    
    .filter-collapse-content .filter-search {
        width: 100%;
    }
    
    .filter-collapse-content .filter-actions {
        flex-direction: row;
        margin-top: 0.5rem;
    }
    
    .filter-collapse-content .filter-actions .btn {
        flex: 1;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOUCH FEEDBACK STYLES
   Visuelles Feedback für Touch-Interaktionen
   ═══════════════════════════════════════════════════════════════════════════ */
.touch-device .btn.touch-active,
.touch-device .sidebar-link.touch-active,
.touch-device .fab.touch-active,
.touch-device .fab-menu-item.touch-active {
    transform: scale(0.97);
    opacity: 0.9;
}

/* Touch-Geräte Klasse für Body */
.touch-device {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Verhindere Text-Selektion bei Touch auf interaktiven Elementen */
.touch-device .btn,
.touch-device .sidebar-link,
.touch-device .fab,
.touch-device .fab-menu-item {
    -webkit-user-select: none;
    user-select: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANDSCAPE OPTIMIERUNG FÜR SMARTPHONES
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) and (orientation: landscape) {
    /* Sidebar schmaler im Landscape */
    .sidebar.active {
        width: 240px !important;
    }
    
    /* Modals nicht fullscreen im Landscape */
    .modal-backdrop {
        align-items: center;
        padding: 1rem;
    }
    
    .modal-content {
        max-width: 500px;
        max-height: 80vh;
        border-radius: var(--border-radius-lg);
    }
    
    /* Action Buttons 2-spaltig */
    .action-buttons .btn {
        flex: 1 1 calc(50% - 0.5rem);
    }
    
    /* Page Actions horizontal */
    .page-actions {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .page-actions .btn-back {
        grid-column: auto;
        order: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY: Fokus-Styles für Touch-Geräte
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    /* Größere Fokus-Ringe für Touch */
    .btn:focus-visible,
    .form-input:focus-visible,
    .form-select:focus-visible,
    .sidebar-link:focus-visible {
        outline: 3px solid var(--accent-cyan);
        outline-offset: 2px;
    }
    
    /* Skip-to-Content Link für Accessibility */
    .skip-link {
        position: absolute;
        top: -100px;
        left: 50%;
        transform: translateX(-50%);
        padding: 1rem 2rem;
        background: var(--accent-cyan);
        color: white;
        border-radius: var(--border-radius);
        z-index: 9999;
        transition: top 0.3s ease;
    }
    
    .skip-link:focus {
        top: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE ANPASSUNGEN FÜR TOUCH
   Bessere Kontraste bei Außenlicht
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    [data-theme="light"] .fab {
        box-shadow: 0 4px 20px rgba(6, 182, 212, 0.5);
    }
    
    [data-theme="light"] .fab-menu-item {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    [data-theme="light"] .filter-collapse-content {
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    [data-theme="light"] .pull-indicator {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   USER MANAGEMENT MODALS
   Styles für Rollen- und Passwort-Modals
   ═══════════════════════════════════════════════════════════════════════════ */

/* Role Selector */
.role-selector {
    margin-top: 1rem;
}

.role-selector-info {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.role-selector-info strong {
    color: var(--text-primary);
}

.role-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.role-option {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
}

.role-option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.role-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.role-option input[type="radio"] {
    display: none;
}

.role-option-icon {
    margin-right: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.role-option.selected .role-option-icon {
    color: var(--primary);
}

.role-option-info {
    flex: 1;
    min-width: 0;
}

.role-option-label {
    font-weight: 600;
    display: block;
    color: var(--text-primary);
}

.role-option-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
}

.role-current-badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Password Reset Modal */
.password-reset-form {
    margin-top: 1rem;
}

.password-reset-form .form-label {
    margin-bottom: 0.5rem;
    display: block;
}

.password-input-group {
    display: flex;
    gap: 0.5rem;
}

.password-input-group .form-input {
    flex: 1;
    min-width: 0;
}

.password-input-group .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.password-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive adjustments for modals */
@media (max-width: 480px) {
    .role-option {
        padding: 0.625rem 0.75rem;
    }
    
    .role-option-icon {
        margin-right: 0.5rem;
    }
    
    .role-option-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .role-option-description {
        font-size: 0.8rem;
    }
    
    .role-current-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .password-input-group {
        flex-direction: column;
    }
    
    .password-input-group .btn {
        width: 100%;
    }
}

