/* port_planner/static/style.css */
:root {
    --bg-primary: #fcfcfc;
    --brand-dark: #1e293b;
    --brand-accent: #475569;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    
    --color-ok: #475569;
    --color-warning: #b45309;
    --color-critical: #b91c1c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

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

/* Sidebar Styling (Clean, Neutral) */
.sidebar {
    width: 360px;
    background-color: #f8fafc;
    color: #1e293b;
    padding: 30px 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid var(--border-color);
}

.brand h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
}

.brand p {
    margin: 2px 0 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-top: 10px;
    margin-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
}

.form-group select,
.form-group input[type="date"] {
    background-color: #ffffff;
    color: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
}

.form-group select:focus,
.form-group input[type="date"]:focus {
    outline: none;
    border-color: var(--brand-accent);
}

.submit-btn {
    background-color: var(--brand-dark);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #0f172a;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    max-height: 100vh;
    background-color: #ffffff;
}

.main-header {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.main-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--brand-dark);
    font-weight: 700;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.port-badge {
    background-color: #f1f5f9;
    color: #334155;
}

.mode-badge {
    background-color: #f1f5f9;
    color: #334155;
}

/* Status Banner Cards (Simplified, less color) */
.status-card {
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: #f8fafc;
}

.status-card.ok {
    border-left: 5px solid var(--color-ok);
}

.status-card.warning {
    border-left: 5px solid var(--color-warning);
    background-color: #fffbeb;
}

.status-card.critical {
    border-left: 5px solid var(--color-critical);
    background-color: #fef2f2;
}

.status-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.status-header p {
    margin: 6px 0 0 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-main);
}

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

.dash-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.card-info h3 {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 8px 0;
}

.card-subtext {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.alert-card {
    border-color: #fca5a5;
    background-color: #fffafb;
}

.alert-card .card-value {
    color: var(--color-critical);
}

.ideal-card {
    border-color: var(--border-color);
    background-color: #f8fafc;
}

.ideal-card .card-value {
    color: #0f172a;
}

/* Visuelle Timeline */
.timeline-section {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.timeline-section h2 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--brand-dark);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.timeline {
    position: relative;
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-step {
    position: relative;
}

.step-marker {
    position: absolute;
    left: -30px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    border: 2px solid white;
    z-index: 2;
}

.timeline-step.passed .step-marker {
    background-color: #475569;
    color: white;
}

.timeline-step.warning-step .step-marker {
    background-color: var(--color-warning);
    color: white;
}

.timeline-step.failed .step-marker {
    background-color: var(--color-critical);
    color: white;
}

.timeline-step.deadline .step-marker {
    background-color: #0f172a;
    color: white;
}

.timeline-step.final .step-marker {
    background-color: #334155;
    color: white;
}

.step-content {
    background-color: #f8fafc;
    padding: 12px 16px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.step-content h3 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--brand-dark);
    font-weight: 600;
}

.step-content .date {
    margin: 4px 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

.step-content .desc {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.timeline-step.deadline .step-content {
    border-left: 4px solid #0f172a;
}

.timeline-step.final .step-content {
    border-left: 4px solid #475569;
    background-color: #f8fafc;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .main-content {
        max-height: none;
        overflow-y: visible;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
