/* Reset and general styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* Form Styles */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-header h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.form-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.form-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, 
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.2);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Voucher Styles */
#voucherPreview {
    display: none;
}

.voucher {
    background: white;
    width: 21cm;
    min-height: 29.7cm;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.voucher-inner {
    padding: 2cm;
    position: relative;
    height: 100%;
    border: 2px solid #2c3e50;
}

.voucher-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #2c3e50;
    position: relative;
}

.voucher-logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* font-size: 2.5rem; */
    /* color: #2c3e50; */
    /* border: 2px solid #2c3e50; */
    /* border-radius: 50%; */
}

.voucher-title {
    font-size: 1.7rem;
    color: #2c3e50;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.voucher-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.voucher-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-weight: bold;
    color: #2c3e50;
}

.voucher-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.voucher-section {
    margin-bottom: 1.5rem;
}

.voucher-section h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.voucher-info {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.voucher-label {
    font-weight: bold;
    color: #34495e;
}

.voucher-value {
    color: #2c3e50;
}

.voucher-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-text {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.voucher-qr {
    text-align: center;
    color: #2c3e50;
}

.qr-text {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: #7f8c8d;
}

.decorative-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #2c3e50;
}

.corner-tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.corner-tr { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.corner-bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.corner-br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }

/* Button Styles */
.btn {
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.voucher-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Utility Classes */
.required::after {
    content: '*';
    color: #e74c3c;
    margin-left: 4px;
}

.error input,
.error select {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error .error-message {
    display: block;
}

/* Print Styles */
@media print {
    body {
        margin: 0;
        padding: 0;
        background: white;
    }
    
    .container {
        margin: 0;
        padding: 0;
        max-width: none;
    }
    
    .voucher {
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    
    .voucher-inner {
        padding: 2cm;
    }
    
    .voucher-actions, 
    .form-header, 
    #voucherForm {
        display: none !important;
    }
    
    #voucherPreview {
        display: block !important;
    }
}

/* Date input styling */
input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    padding: 0.75rem;
    background: white;
}