:root {
        --primary: #4a6cf7;
        --primary-dark: #3a5ce5;
        --secondary: #6c757d;
        --success: #28a745;
        --warning: #ffc107;
        --danger: #dc3545;
        --dark: #2c3e50;
        --light: #f8f9fa;
        --white: #ffffff;
        --black: #1e1e1e;
        --gray: #aaa;
        --shadow: 0 4px 12px rgba(0,0,0,0.1);
        --radius: 8px;
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }

    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        background: #eef2f7;
        color: #333;
        line-height: 1.6;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        height: 100vh;
    }

    .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
    .main-content { 
        flex: 1;
        overflow-y: auto;
        padding: 20px 0; 
    }

    /* Header */
    .dev-header {
        background: var(--dark);
        color: var(--white);
        padding: 1rem 0;
        box-shadow: var(--shadow);
        flex-shrink: 0;
    }
    .header-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
    .logo { font-size: 1.5rem; font-weight: 800; color: var(--white); text-decoration: none; }
    .env-badge {
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.8rem;
        font-weight: bold;
        text-transform: uppercase;
    }
    .env-dev { background: var(--success); color: white; }
    .env-tst { background: var(--warning); color: black; }
    .env-pro { background: var(--danger); color: white; }
    .header-nav { display: flex; gap: 10px; flex-wrap: wrap; }
    .h-nav { 
        color: #bdc3c7; text-decoration: none; padding: 8px 15px; border-radius: 4px; 
        transition: 0.2s; font-size: 0.9rem;
    }
    .h-nav:hover, .h-nav.active { color: var(--white); background: rgba(255,255,255,0.1); }
    .nav-separator { width: 1px; height: 20px; background: rgba(255,255,255,0.2); align-self: center; margin: 0 10px; }
    .site-link { background: rgba(255, 255, 255, 0.05); color: #4CAF50 !important; font-weight: bold; }
    .site-link:hover { background: rgba(255, 255, 255, 0.15) !important; color: #fff !important; }

    /* Footer */
    .dev-footer {
        background: var(--dark);
        color: #bdc3c7;
        padding: 1rem 0;
        flex-shrink: 0;
    }
    .footer-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
    .footer-left, .footer-right { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
    .separator { color: rgba(255,255,255,0.3); }
    .timestamp { font-size: 0.9rem; }
    .pill { background: rgba(255,255,255,0.1); padding: 4px 8px; border-radius: 12px; font-size: 0.8rem; }
    .author-tag { font-size: 0.8rem; color: rgba(255,255,255,0.5); }

    /* Cards */
    .card {
        background: var(--white);
        border-radius: var(--radius);
        padding: 25px;
        box-shadow: var(--shadow);
        border: 1px solid rgba(0,0,0,0.05);
    }

    /* Buttons */
    .btn, .button {
        display: inline-flex; align-items: center; justify-content: center;
        padding: 10px 20px; border-radius: 6px; border: none; font-weight: 600;
        cursor: pointer; transition: 0.2s; text-decoration: none; gap: 8px;
    }
    .btn-primary { background: var(--primary); color: white; }
    .btn-primary:hover { background: var(--primary-dark); }
    .btn-back { color: var(--secondary); font-size: 0.9rem; text-decoration: none; }
    .btn-back:hover { color: var(--dark); }

    /* Alerts */
    .alert { padding: 15px; border-radius: 6px; margin-bottom: 20px; border-left: 4px solid; }
    .alert-error { background: #fdf2f2; color: var(--danger); border-color: var(--danger); }
    .alert-success { background: #f3faf7; color: var(--success); border-color: var(--success); }
    .alert-info { background: #e8f4f8; color: #0066cc; border-color: #0066cc; }
    .alert-warning { background: #fff3cd; color: #856404; border-color: #ffc107; }

    /* Tool Header */
    .tool-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
    .title-group { display: flex; align-items: center; gap: 15px; }
    .tool-icon-large { font-size: 2.5rem; }
    .subtext { color: #6c757d; font-size: 0.95rem; }

    /* Dashboard Grid */
    .tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 30px; }
    .tool-card { text-decoration: none; color: inherit; transition: 0.3s; display: flex; gap: 15px; }
    .tool-card:hover:not(.disabled) { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); border-color: var(--primary); }
    .tool-card.disabled { opacity: 0.6; cursor: not-allowed; filter: grayscale(1); }
    .tool-icon { font-size: 2rem; }

    /* Job Room */
    .job-room { margin-top: 20px; }
    .job-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }
    .select-all { display: flex; align-items: center; gap: 8px; cursor: pointer; }
    .job-list { 
        list-style: none; padding: 0; margin: 0 0 20px 0; 
        border: 1px solid #eee; border-radius: 6px; 
        max-height: 400px; overflow-y: auto;
    }
    .job-item { display: flex; align-items: center; padding: 12px 15px; border-bottom: 1px solid #eee; background: #fafafa; transition: 0.2s; }
    .job-item:last-child { border-bottom: none; }
    .job-item.running { background: #fff3cd; }
    .job-item.success { background: #d4edda; }
    .job-item.error { background: #f8d7da; }
    .job-cb { margin-right: 15px; cursor: pointer; }
    .job-label { flex: 1; font-weight: 500; }
    .job-status-mini { font-size: 0.8rem; padding: 2px 8px; border-radius: 12px; }
    .job-status-mini.job-status-running { background: #ffc107; color: #856404; }
    .job-status-mini.job-status-success { background: #28a745; color: white; }
    .job-status-mini.job-status-error { background: #dc3545; color: white; }

    /* Progress Bar */
    .progress-wrapper { margin: 20px 0; }
    .progress-label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.9rem; color: #666; }
    .progress-bg { background: #e9ecef; border-radius: 20px; overflow: hidden; height: 30px; }
    .progress-fill { 
        background: linear-gradient(90deg, var(--primary), #a29bfe); 
        width: 0%; height: 100%; transition: width 0.4s ease; 
        display: flex; align-items: center; justify-content: center; 
        color: white; font-weight: bold; font-size: 0.85rem;
    }

    /* Console Output */
    .job-result-console { margin-top: 20px; }
    .console-output { 
        background: var(--black); color: #00ff00; padding: 15px; 
        border-radius: 6px; font-family: 'Consolas', monospace; 
        font-size: 12px; max-height: 300px; overflow-y: auto; 
        list-style: none; margin: 0;
    }
    .console-output li { padding: 4px 0; border-bottom: 1px solid #333; }
    .console-output li:last-child { border-bottom: none; }
    .log-time { color: #74c0fc; margin-right: 10px; }
    .log-message { color: #d4d4d4; }
    .log-success .log-message { color: #4ec9b0; }
    .log-error .log-message { color: #f44747; }
    .log-warning .log-message { color: #ffc107; }
    .sys-msg { color: #74c0fc; font-style: italic; }

    /* File List für DB Setup */
    .file-list { margin-top: 20px; border: 1px solid #eee; border-radius: 6px; overflow: hidden; }
    .file-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border-bottom: 1px solid #eee; background: #fafafa; }
    .file-item:last-child { border-bottom: none; }
    .file-name { font-family: monospace; color: var(--dark); flex: 1; }
    .file-status { padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
    .file-status.status-waiting { background: #e9ecef; color: #6c757d; }
    .file-status.status-processing { background: #ffc107; color: #856404; }
    .file-status.status-success { background: #28a745; color: white; }
    .file-status.status-error { background: #dc3545; color: white; }

    /* Easy Test Styles */
    .easy-test-content { padding: 10px; }
    .status-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
    .status-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; }
    .status-badge.success { background: #d4edda; color: #155724; }
    .test-results-card { background: rgba(46, 204, 113, 0.1); border: 1px solid #2ecc71; border-radius: 6px; padding: 15px; margin: 20px 0; }
    .test-results-card ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .info-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
    .info-table td { padding: 10px; border-bottom: 1px solid rgba(0,0,0,0.05); }
    .info-table td:first-child { font-weight: bold; width: 200px; color: #555; }
    .extension-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; list-style: none; padding: 0; margin-top: 10px; }
    .extension-list li { background: #f8f9fa; padding: 8px 12px; border-radius: 4px; }
    .status-ok { color: #2ecc71; font-weight: bold; }
    .status-err { color: #e74c3c; font-weight: bold; }
    .info-note { margin-top: 30px; padding: 10px; background: #f8f9fa; border-radius: 4px; text-align: center; font-size: 0.85rem; color: #666; }

    /* Empty State */
    .empty-state {
        text-align: center;
        padding: 60px 20px !important;
        background: #f9f9f9;
    }
    .empty-state-message {
        color: #666;
    }
    .empty-icon {
        font-size: 48px;
        display: block;
        margin-bottom: 20px;
        opacity: 0.5;
    }
    .empty-state h4 {
        margin: 0 0 10px 0;
        color: #333;
    }
    .empty-state p {
        margin: 0;
        color: #888;
    }

    .with-top-gap {
        margin-top: 20px;
    }

    .log-spacer {
        display: inline-block;
        width: 100%;
        height: 1px;
    }

    .is-hidden {
        display: none !important;
    }

    /* Responsive */
    @media (max-width: 768px) {
        .header-container, .footer-container { flex-direction: column; text-align: center; }
        .header-nav { justify-content: center; }
        .tool-header-bar { flex-direction: column; text-align: center; }
        .title-group { flex-direction: column; }
        .job-controls { flex-direction: column; align-items: stretch; }
        .test-results-card ul { grid-template-columns: 1fr; }
        .info-table td:first-child { width: auto; }
    }


    /* Sicherheits-Badge */
    .security-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        margin-top: 8px;
    }
    .security-success {
        background: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }
    .security-warning {
        background: #fff3cd;
        color: #856404;
        border: 1px solid #ffeaa7;
    }
    .security-error {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }
    .security-danger {
        background: #dc3545;
        color: white;
        border: 1px solid #bd2130;
    }
    
    /* Sicherheits-Warning im Tool */
    .alert.security-warning {
        margin-bottom: 20px;
        border-left-width: 4px;
    }
    
    .security-icon {
        font-size: 0.9rem;
    }
    
    .security-level {
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Tool Header mit Badge */
    .title-group .security-badge {
        margin-top: 8px;
        display: inline-flex;
    }



    .export-error-text {
        margin-top: 0.5em;
    }

    .export-job-result {
        margin-top: 1em;
        padding: 1em;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

    .export-job-title {
        margin-top: 0;
    }

    .export-result-content {
        padding: 1em;
        border-radius: 3px;
        border-left: 4px solid;
    }

    .export-result-content.is-success {
        background: #f0f8ff;
        border-left-color: #28a745;
    }

    .export-result-content.is-error {
        background: #fff3cd;
        border-left-color: #dc3545;
    }

    .export-info-table {
        width: 100%;
        margin-top: 0.5em;
        border-collapse: collapse;
    }

    .export-info-header-row {
        background: #f9f9f9;
        border-bottom: 1px solid #ddd;
    }

    .export-info-row {
        border-bottom: 1px solid #ddd;
    }

    .export-cell {
        padding: 0.5em;
    }

    .export-label-cell {
        font-weight: bold;
        width: 30%;
    }

    .export-stats-wrap {
        margin-top: 1em;
    }

    .export-stats-title {
        margin-bottom: 0.5em;
    }

    .export-stats-table {
        width: 100%;
        border-collapse: collapse;
        background: white;
    }

    .export-stats-head {
        background: #f0f0f0;
        border-bottom: 2px solid #999;
    }

    .export-th {
        font-weight: 600;
    }

    .export-th-left {
        text-align: left;
        border-right: 1px solid #ddd;
    }

    .export-th-right {
        text-align: right;
    }

    .export-stats-row {
        border-bottom: 1px solid #ddd;
    }

    .export-cell-with-border {
        border-right: 1px solid #ddd;
    }

    .export-cell-right {
        text-align: right;
    }