:root {
    --primary: #993333;
    --primary-dark: #7a2929;
    --text: #333;
    --bg: #f4f4f4;
    --white: #ffffff;
    --header-width: 1200px;
    --content-width: 1000px;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background-image: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('bilder/background.png');
    background-attachment: fixed;
    background-size: 600px; 
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center; 
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

.site-header {
    display: block;
    width: 90%;
    max-width: var(--header-width);
    margin: 2rem 0 0 0; 
    background-color: var(--white);
    padding: 1.5rem 2rem;
    text-align: center;
    border: 3px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.site-header h1 { 
    color: var(--primary-dark); 
    font-size: 2.5rem; 
    margin-bottom: 5px; 
}

.back-link { 
    color: var(--primary); 
    text-decoration: none; 
    font-weight: bold; 
}

.checkout-content {
    display: block;
    flex: 1;
    width: 90%;
    max-width: var(--content-width);
    margin: 0; 
    padding: 2.5rem 0;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; 
    gap: 30px;
    align-items: stretch;
}

.status-sidebar, .form-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.form-card form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; 
}

.form-card h2, .status-sidebar h3 { 
    margin-bottom: 1.2rem; 
    color: #444; 
    font-size: 1.5rem;
    text-align: center;
}

.input-group { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 0.5rem; 
}

input, select {
    width: 100%; 
    padding: 12px; 
    margin-bottom: 1rem;
    border: 1px solid #ddd; 
    border-radius: 6px; 
    outline: none;
    font-family: inherit;
    font-size: 1rem;
}

input:focus, select:focus { border-color: var(--primary); }

.select-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

.form-footer {
    margin-top: 1rem; 
}

.btn-submit {
    width: 100%; 
    background: var(--primary); 
    color: white; 
    padding: 1rem;
    border: none; 
    border-radius: 6px; 
    font-weight: bold; 
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.btn-submit:hover { background: var(--primary-dark); }

.form-hint { 
    text-align: center; 
    font-size: 0.8rem; 
    color: #888; 
    margin-top: 10px; 
}

.chart-toggles { 
    display: flex; 
    justify-content: center; 
    gap: 8px; 
    margin-bottom: 15px; 
}

.toggle-btn {
    background: #eee; 
    border: none; 
    padding: 6px 12px;
    border-radius: 20px; 
    cursor: pointer; 
    font-weight: bold; 
    color: #555;
    font-size: 0.85rem;
}

.toggle-btn.active { background: var(--primary); color: white; }

.chart-container {
    position: relative;
    height: 220px;
    width: 100%;
    margin: 10px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.status-info {
    margin-top: 15px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.info-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 6px 0; 
    border-bottom: 1px solid #eee; 
    font-size: 0.9rem;
}

.info-row:last-child { border: none; }
.info-row.highlight { color: var(--primary); font-weight: bold; font-size: 1rem; }

footer {
    width: 100%;
    background-color: var(--primary-dark); 
    color: var(--white); 
    text-align: center; 
    padding: 1.5rem; 
    font-size: 0.85rem;
    margin-top: auto;
}

footer a { color: #fff; text-decoration: none; margin: 0 5px; }

@media (max-width: 850px) {
    .site-header {
        width: 85vw;
        margin: 1rem 0;
        padding: 1.2rem 1rem;
    }
    
    .checkout-content { 
        width: 85vw; 
        padding: 1.5rem 0;
    }
    
    .site-header h1 { font-size: 1.8rem; }
    
    .layout-grid { 
        grid-template-columns: 1fr; 
        gap: 20px;
        width: 100%;
    }
    
    .status-sidebar, .form-card {
        padding: 1.5rem;
        width: 100%;
    }
    
    .status-sidebar { order: -1; }
    .input-group { flex-direction: column; gap: 0; }
}