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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #2126c1 0%, #a3a192 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.form-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.form-header p {
    color: #666;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    transform: translateY(-50%);
    z-index: 1;
}

.progress-step {
    background: white;
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #e0e0e0;
    font-weight: 500;
    position: relative;
    z-index: 2;
    background: white;
}

.progress-step.active {
    border-color: #667eea;
    color: #667eea;
    background: #f0f3ff;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error {
    border-color: #dc3545;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.validation-status {
    font-size: 12px;
    margin-top: 5px;
}

.validation-status.checking {
    color: #ffc107;
}

.validation-status.valid {
    color: #28a745;
}

.validation-status.invalid {
    color: #dc3545;
}

/* Upload Tabs */
.upload-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* File Input */
.file-input-container {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-container:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.file-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.file-label input {
    display: none;
}

.upload-icon {
    font-size: 48px;
}

.upload-text {
    color: #667eea;
    font-weight: 500;
}

.file-info {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Camera Styles */
.camera-container {
    text-align: center;
}

.camera-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.camera-select {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.btn-camera, .btn-capture {
    background: #764ba2;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-camera:hover, .btn-capture:hover {
    background: #667eea;
    transform: translateY(-2px);
}

.camera-preview {
    position: relative;
    margin: 20px 0;
}

.camera-preview video {
    width: 100%;
    border-radius: 10px;
    background: #000;
}

.btn-capture {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.camera-captured {
    margin: 20px 0;
}

.camera-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.btn-retake, .btn-use {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-retake {
    background: #6c757d;
    color: white;
}

.btn-use {
    background: #28a745;
    color: white;
}

/* Preview Container */
.preview-container {
    margin-top: 20px;
    text-align: center;
}

.receipt-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    margin: 15px 0;
}

.btn-change {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-change:hover {
    background: #e0a800;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-next, .btn-prev, .btn-submit {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-next, .btn-submit {
    background: #667eea;
    color: white;
}

.btn-prev {
    background: #6c757d;
    color: white;
}

.btn-next:hover, .btn-submit:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-prev:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Confirmation Box */
.confirmation-box {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.data-summary {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.summary-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.summary-item:last-child {
    border-bottom: none;
}

/* Terms */
.terms-container {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .form-card {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .progress-bar {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .progress-bar::before {
        display: none;
    }
    
    .progress-step {
        width: 100%;
        text-align: center;
    }
    
    .upload-tabs {
        flex-direction: column;
    }
    
    .camera-controls {
        flex-direction: column;
    }
    
    .camera-select {
        width: 100%;
    }
    
    .btn-camera, .btn-capture {
        width: 100%;
    }
    
    .camera-actions {
        flex-direction: column;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-next, .btn-prev, .btn-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .form-card {
        padding: 15px;
    }
    
    .form-group input {
        font-size: 16px; /* Prevents zoom on mobile */
    }
}
/* Status Warnings */
.status-warning {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.status-warning.exento {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-warning.active {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.status-warning.inactive {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Validation Status with Age Info */
.validation-status {
    margin-top: 5px;
    font-size: 14px;
}

.validation-status .age-info {
    font-size: 12px;
    margin-top: 5px;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 5px;
    color: #666;
}

.validation-status.exento {
    color: #28a745;
}

.validation-status.active {
    color: #007bff;
}

.validation-status.inactive {
    color: #dc3545;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 70px;
    height: 70px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #2C5F2D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(44, 95, 45, 0.3);
}

.loading-message {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-submessage {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    text-align: center;
    max-width: 400px;
    padding: 0 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Disable form during submission */
.form-submitting {
    opacity: 0.7;
    pointer-events: none;
}

.form-submitting input,
.form-submitting button,
.form-submitting textarea,
.form-submitting select {
    cursor: not-allowed;
}

.btn-submit.loading {
    position: relative;
    color: transparent !important;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Disabled Button */
.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit:disabled:hover {
    transform: none;
    box-shadow: none;
}
/* Date input styling */
.date-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Mobile-friendly date input */
@media (max-width: 768px) {
    .date-input {
        font-size: 16px; /* Prevents zoom on mobile */
        min-height: 48px; /* Better touch target */
    }
}

/* Logo styles */
.logo-container {
    text-align: center;
    margin-bottom: 7px;
}

.site-logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 7px;
}

@media (max-width: 1000px) {
    .site-logo {
        max-width: 300px;
    }
}

/* Improved header for mobile */
header {
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    padding: 0 15px;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
    color: #ffffff;
    word-break: break-word;
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }
}

/* Inactive message with button */
.status-warning.inactive.with-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.inactive-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.inactive-content i {
    font-size: 30px;
    color: #dc3545;
}

.btn-new-form {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-new-form:hover {
    background: #c82333;
    transform: translateY(-2px);
}


/* Mobile adjustments */
@media (max-width: 768px) {
    .status-warning.inactive.with-button {
        flex-direction: column;
        text-align: center;
    }
    
    .inactive-content {
        flex-direction: column;
        text-align: center;
    }
    
    .popup-actions {
        flex-direction: column;
    }
    
    .btn-confirm,
    .btn-cancel-popup {
        width: 100%;
    }
}

/* Inactive Popup */
.inactive-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.inactive-popup .popup-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-icon {
    text-align: center;
    margin-bottom: 20px;
}

.popup-icon i {
    font-size: 60px;
    color: #dc3545;
}

.inactive-popup h3 {
    color: #dc3545;
    text-align: center;
    margin-bottom: 15px;
    font-size: 24px;
}

.inactive-popup p {
    color: #666;
    text-align: center;
    margin-bottom: 20px;
    font-size: 16px;
}

.inactive-instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.inactive-instructions h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.inactive-instructions ol {
    padding-left: 20px;
    color: #666;
}

.inactive-instructions li {
    margin-bottom: 8px;
}

.inactive-popup .popup-actions {
    display: flex;
    gap: 15px;
}

.btn-new-form-popup {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-new-form-popup:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-close-popup {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-close-popup:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .inactive-popup .popup-actions {
        flex-direction: column;
    }
    
    .btn-new-form-popup,
    .btn-close-popup {
        width: 100%;
    }
}