/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.4;
    font-size: 13px;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #84cc16 0%, #eab308 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    min-width: 350px;
    border: 3px solid #84cc16;
}

.login-container h2 {
    color: #65a30d;
    margin-bottom: 20px;
    font-size: 24px;
}

.login-container p {
    margin-bottom: 20px;
    color: #666;
}

.login-container input {
    width: 100%;
    padding: 12px;
    border: 2px solid #84cc16;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.login-container input:focus {
    outline: none;
    border-color: #eab308;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background-color: #eab308;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-container button:hover {
    background-color: #ca8a04;
}

.error-message {
    color: #e74c3c;
    margin-top: 10px;
    font-weight: bold;
}

/* Main Application */
.main-app {
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #84cc16 0%, #eab308 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 20px;
}

.logout-btn {
    background-color: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #b91c1c;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Form Section */
.form-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
}

.form-section h2 {
    color: #65a30d;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 2px solid #eab308;
    padding-bottom: 8px;
}

.form-section h3 {
    color: #65a30d;
    margin: 20px 0 15px 0;
    font-size: 16px;
    border-bottom: 1px solid #eab308;
    padding-bottom: 5px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    color: #65a30d;
    font-size: 12px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #eab308;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.basic-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.general-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.form-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 20px;
}

.form-buttons button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.form-buttons button:nth-child(1) {
    background-color: #84cc16;
    color: white;
}

.form-buttons button:nth-child(1):hover {
    background-color: #65a30d;
}

.form-buttons button:nth-child(2) {
    background-color: #eab308;
    color: white;
}

.form-buttons button:nth-child(2):hover {
    background-color: #ca8a04;
}

.form-buttons button:nth-child(3) {
    background-color: #f39c12;
    color: white;
}

.form-buttons button:nth-child(3):hover {
    background-color: #e67e22;
}

.form-buttons button:nth-child(4) {
    background-color: #e74c3c;
    color: white;
}

.form-buttons button:nth-child(4):hover {
    background-color: #c0392b;
}

/* Preview Section */
.preview-section {
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 90vh;
}

/* Magazijnbon Preview Styles - Optimized for A4 */
.magazijnbon-preview {
    background: white;
    padding: 40px;
    margin: 0;
    font-family: 'Arial', sans-serif;
    color: #222;
    width: 210mm;
    min-height: 297mm;
    border: 1px solid #ddd;
    overflow: hidden;
    transform-origin: top left;
    transform: scale(0.6);
}

.title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 3px solid #000;
    padding-bottom: 10px;
}

.subtitle {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 500;
    margin-top: 5px;
    margin-bottom: 30px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-box {
    border: 3px solid #000;
    padding: 18px 25px;
    width: 100%;
    margin: 30px 0;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    background: white;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: none;
}

.field-label {
    font-weight: bold;
    display: inline-block;
    width: 160px;
    margin-right: 15px;
    color: #000;
    font-size: 1rem;
}

.fields {
    margin-bottom: 25px;
    background: white;
    padding: 25px;
    border: 2px solid #333;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
}

.data-row {
    margin-bottom: 10px;
    padding: 6px 0;
    border-bottom: none;
    font-size: 1rem;
    line-height: 1.4;
    min-height: 24px;
    display: block;
}

.data-row .field-label {
    display: inline-block;
    width: 160px;
}

.data-row:last-child {
    border-bottom: none;
}

.lab-datetime {
    margin-bottom: 20px;
    margin-left: 2px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #000;
    background: white;
    padding: 12px 18px;
    border: 2px solid #333;
    box-shadow: none;
}

.lab-table-wrapper {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    background: white;
    padding: 25px;
    border: 2px solid #333;
    box-shadow: none;
}

table.lab-table {
    border-collapse: collapse;
    width: 48%;
    margin-bottom: 0;
    font-size: 0.95rem;
    background: white;
    border: 2px solid #000;
    box-shadow: none;
}

table.lab-table th {
    background: transparent;
    color: #000;
    font-weight: 700;
    padding: 12px 10px;
    text-align: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    border: 1px solid #333;
    letter-spacing: 0.5px;
}

table.lab-table td {
    border: 1px solid #333;
    padding: 10px;
    text-align: left;
}

table.lab-table td:first-child {
    font-weight: 600;
    color: #000;
    background: #f8f8f8;
}

table.lab-table td:nth-child(2) {
    text-align: center;
    font-weight: 600;
    color: #000;
}

table.lab-table td:last-child {
    text-align: center;
    font-style: italic;
    color: #555;
    font-weight: 500;
}

/* Print Styles */
@media print {
    body {
        background: white;
        margin: 0;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .form-section,
    .header,
    .container {
        display: none !important;
    }
    
    .preview-section {
        padding: 0;
        box-shadow: none;
        background: white;
        margin: 0;
    }
    
    .magazijnbon-preview {
        padding: 40px;
        border: none;
        box-shadow: none;
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        page-break-after: always;
        transform: none;
    }
    
    .section-box {
        background: white !important;
        border: 3px solid #000 !important;
        box-shadow: none !important;
    }
    
    .fields {
        background: white !important;
        border: 2px solid #333 !important;
        box-shadow: none !important;
    }
    
    .lab-datetime {
        background: white !important;
        border: 2px solid #333 !important;
        box-shadow: none !important;
    }
    
    .lab-table-wrapper {
        display: flex;
        gap: 20px;
        justify-content: space-between;
        background: white !important;
        padding: 25px !important;
        border: 2px solid #333 !important;
        box-shadow: none !important;
    }
    
    table.lab-table {
        border: 2px solid #000 !important;
        box-shadow: none !important;
    }
    
    table.lab-table th {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #333 !important;
    }
    
    table.lab-table td:first-child {
        background: #f8f8f8 !important;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-buttons {
        grid-template-columns: 1fr;
    }
    
    .lab-table-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    table.lab-table {
        width: 100%;
    }
    
    .fields {
        padding: 15px;
    }
    
    .field-label {
        width: 150px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
} 