/* assets/style.css - Zentraler Style für die KI-Workstation */

body { 
    font-family: 'Segoe UI', Arial, sans-serif; 
    background: #f4f6f9; 
    color: #333; 
    margin: 0; 
    padding: 30px; 
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
}

.header-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 25px; 
}

h1 { 
    color: #2c3e50; 
    margin: 0; 
}

h2 {
    margin-top: 0; 
    color: #2c3e50; 
    font-size: 18px; 
    margin-bottom: 15px; 
    border-bottom: 2px solid #f4f6f9; 
    padding-bottom: 10px;
}

.logout-link { 
    color: #e74c3c; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 14px; 
}

.logout-link:hover { 
    text-decoration: underline; 
}

.cards { 
    display: flex; 
    gap: 20px; 
    margin-bottom: 30px; 
}

.card { 
    flex: 1; 
    background: #fff; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
    text-align: center; 
}

.card h3 { 
    margin: 0 0 10px 0; 
    color: #7f8c8d; 
    font-size: 14px; 
    text-transform: uppercase; 
}

.card p { 
    margin: 0; 
    font-size: 28px; 
    font-weight: bold; 
    color: #2c3e50; 
}

.section-grid { 
    display: flex; 
    gap: 20px; 
    margin-bottom: 30px; 
}

.panel { 
    flex: 1; 
    background: #fff; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

.form-group { 
    margin-bottom: 15px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: bold; 
    color: #7f8c8d; 
    font-size: 13px; 
}

.form-group input[type="text"], 
.form-group input[type="email"], 
.form-group input[type="password"], 
.form-group select { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    box-sizing: border-box; 
    font-size: 14px; 
    background: #fff; 
}

.btn { 
    background: #3498db; 
    color: #fff; 
    border: none; 
    padding: 12px 25px; 
    font-size: 15px; 
    border-radius: 5px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: background 0.2s; 
    width: 100%; 
    text-align: center; 
    box-sizing: border-box; 
}

.btn:hover { 
    background: #2980b9; 
}

.btn-success { 
    background: #3498db; 
}

.btn-success:hover { 
    background: #2980b9; 
}

/* Upload-Panels: Buttons auf gleicher Höhe */
.section-grid .panel {
    display: flex;
    flex-direction: column;
}

.section-grid .panel form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.section-grid .panel .btn {
    margin-top: auto;
}

table { 
    width: 100%; 
    background: #fff; 
    border-collapse: collapse; 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
    margin-top: 20px; 
}

th, td { 
    padding: 15px; 
    text-align: left; 
    border-bottom: 1px solid #eee; 
}

th { 
    background: #f8f9fa; 
    color: #2c3e50; 
    font-weight: 600; 
}

.status { 
    padding: 5px 10px; 
    border-radius: 12px; 
    font-size: 12px; 
    font-weight: bold; 
    display: inline-block; 
}

.status-0 { background: #ffeaa7; color: #d63031; }
.status-1 { background: #74b9ff; color: #0984e3; }
.status-2 { background: #55efc4; color: #00b894; }
.status-3 { background: #ff7675; color: #d63031; }

#log-output { 
    background: #2d3436; 
    color: #00cec9; 
    padding: 15px; 
    border-radius: 5px; 
    font-family: monospace; 
    margin-top: 20px; 
    display: none; 
    max-height: 150px; 
    overflow-y: auto; 
}

.msg { 
    padding: 12px; 
    border-radius: 5px; 
    margin-bottom: 20px; 
    font-weight: bold; 
}

.msg-success { background: #e8f8f5; color: #27ae60; border: 1px solid #2ecc71; }
.msg-error { background: #fce4e4; color: #c0392b; border: 1px solid #e74c3c; }

/* Login Box spezifisch */
.login-body {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    height: 100vh; 
    margin: 0;
}

.login-box { 
    background: #fff; 
    padding: 40px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    width: 100%; 
    max-width: 400px; 
}

/* Ergänzungen für die neue Anordnung unter Punkt 3 */
.card-ready h3 { color: #f39c12; }
.card-working h3 { color: #3498db; }
.card-finished h3 { color: #2ecc71; }
.card-tokens h3 { color: #1abc9c; }
.card-tokens p { font-size: 22px; margin-top: 5px; }
.card-tokens p span { font-size: 12px; color: #7f8c8d; font-weight: normal; }

.panel-prompt { border-top: 4px solid #2ecc71; }
.panel-customer { border-top: 4px solid #3498db; }

.form-group input[type="file"] {
    width: 100%;
    padding: 10px 0;
    box-sizing: border-box;
}

.automation-section {
    margin-bottom: 30px;
}

.automation-section > h2 {
    margin-bottom: 20px;
}

.automation-form {
    display: block;
}

.automation-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.automation-grid > .automation-card {
    width: auto;
    min-width: 0;
    margin: 0;
}

.automation-card,
.automation-start-card {
    border-top: 4px solid #f39c12;
    box-sizing: border-box;
}

.automation-card {
    min-width: 0;
}

.automation-start-card {
    width: 100%;
}

.automation-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #7f8c8d;
    font-size: 13px;
}

.automation-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
    background: #fff;
}

.btn:disabled,
.automation-field select:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-empty {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

.customer-code {
    background: #dfe6e9;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: bold;
}

.result-file,
.result-download {
    color: #2980b9;
    font-weight: bold;
    text-decoration: none;
}

.result-file:hover,
.result-download:hover {
    text-decoration: underline;
}

.result-preview {
    font-size: 12px;
    color: #555;
    margin-bottom: 6px;
    background: #f9f9f9;
    padding: 5px;
    border-radius: 4px;
    max-width: 460px;
}

.result-error {
    color: #c0392b;
    font-size: 13px;
}

.result-pending {
    color: #b2bec3;
    font-style: italic;
    font-size: 13px;
}

.token-value {
    color: #7f8c8d;
}

@media (max-width: 900px) {
    body {
        padding: 20px;
    }

    .cards {
        flex-wrap: wrap;
    }

    .card {
        flex: 1 1 calc(50% - 10px);
        box-sizing: border-box;
    }

    .section-grid {
        flex-direction: column;
    }

}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    .header-bar {
        align-items: flex-start;
        gap: 15px;
    }

    h1 {
        font-size: 24px;
    }

    .cards {
        flex-direction: column;
        gap: 15px;
    }

    .card {
        flex-basis: auto;
    }

    .automation-grid {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 12px;
        white-space: nowrap;
    }

    .result-preview {
        white-space: normal;
        min-width: 260px;
    }
}