:root {
    --color-blue: #0d47a1;
    --color-red: #dc3545;
    --color-green: #28a745;
    --color-light-blue: #e3f2fd;
    --color-light-red: #ffe0e0;
    --color-light-green: #d4edda;
}

* {
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

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

.header-section {
    background-color: var(--color-blue);
    color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-box {
    background-color: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section-box.section-red {
    border-color: var(--color-red);
    background-color: var(--color-light-red);
}

.section-box.section-green {
    border-color: var(--color-green);
    background-color: var(--color-light-green);
}

.section-title {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dee2e6;
}

.form-label-small {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #495057;
}

.form-control {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 0.2rem rgba(13, 71, 161, 0.25);
}

.signature-container {
    position: relative;
}

.signature-pad {
    width: 100%;
    height: 200px;
    border: 2px dashed #6c757d;
    border-radius: 8px;
    background-color: white;
    touch-action: none;
    cursor: crosshair;
}

.btn {
    font-weight: 600;
    border-radius: 6px;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--color-blue);
    border-color: var(--color-blue);
}

.btn-primary:hover {
    background-color: #0a3d8f;
    border-color: #0a3d8f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-lg {
    font-size: 1.1rem;
    padding: 15px 30px;
}

/* Mobile optimizations for iPad */
@media (max-width: 768px) {
    .container-fluid {
        padding: 10px !important;
    }

    .header-section h3 {
        font-size: 1.2rem;
    }

    .section-box {
        padding: 12px;
    }

    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }

    .signature-pad {
        height: 250px;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .container-fluid {
        max-width: 90%;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-box {
    animation: fadeIn 0.3s ease-in-out;
}

/* Alert styles */
.alert {
    border-radius: 6px;
    font-size: 0.95rem;
}

.form-check-input:checked {
    background-color: var(--color-blue);
    border-color: var(--color-blue);
}

/* Print styles */
@media print {
    .btn, .signature-pad {
        display: none;
    }
}

/* Template Header Styling */
.template-header {
    border-bottom: 3px solid #dc3545;
    padding-bottom: 15px;
}

.company-header h4 {
    color: #dc3545;
    font-weight: 600;
}

.custom-header {
    border: 1px solid #dee2e6;
    padding: 10px;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.document-title {
    border-top: 2px solid #dee2e6;
    border-bottom: 2px solid #dee2e6;
    padding: 15px 0;
}

/* License Scanner Styling */
.license-scanner-box {
    border: 2px solid #17a2b8;
    border-radius: 8px;
    padding: 15px;
    background-color: #e7f5f7;
}

.license-scanner-box h6 {
    color: #17a2b8;
    font-weight: 600;
}

/* Camera Preview Styling */
.camera-preview {
    position: relative;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.camera-preview video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: contain;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
}

.camera-controls button {
    flex: 1;
    max-width: 200px;
    font-size: 1rem;
    padding: 10px 20px;
}

/* Responsive camera for mobile/iPad */
@media (max-width: 768px) {
    .camera-preview video {
        max-height: 300px;
    }
    
    .camera-controls button {
        font-size: 0.9rem;
        padding: 8px 15px;
    }
}

