: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 {
    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 {
    flex: 1;
    width: 90%;
    max-width: var(--content-width);
    padding: 2.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
}

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

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

.center-card { max-width: 450px; width: 100%; }

.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;
    box-sizing: border-box; 
}
input:disabled { background: #f9f9f9; color: #888; cursor: not-allowed; }

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

.form-footer { margin-top: 1rem; display: flex; flex-direction: column; gap: 10px; }

.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;
    text-align: center; text-decoration: none;
}
.btn-submit:hover { background: var(--primary-dark); }

.btn-cancel {
    width: 100%; background: transparent; color: #d9534f; padding: 0.8rem;
    border: 1px solid #d9534f; border-radius: 6px; font-weight: bold; cursor: pointer;
}
.btn-cancel:hover { background: #d9534f; color: white; }

/* --- CHART & INFO --- */
.chart-toggles { display: flex; justify-content: center; gap: 8px; margin-bottom: 15px; flex-wrap: wrap; }
.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; }

.site-footer {
    width: 100%; background-color: var(--primary-dark); color: var(--white); 
    text-align: center; padding: 1.5rem; font-size: 0.85rem; margin-top: auto;
}
.site-footer a { color: #fff; text-decoration: none; margin: 0 5px; }

.text-center { text-align: center; }
.success-icon { font-size: 3rem; margin-bottom: 1rem; }
.success-title { color: var(--primary); margin-bottom: 1rem; }

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