:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #ecf0f1;
    --gradient-start: #005279;
    --gradient-end: #868f94;
    --border-radius: 15px;
    --box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 20px 0;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.company-header {
    color: var(--secondary-color);
    background: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 30px;
    font-size: 1.2em;
    margin-top: 10px;
    font-weight: 300;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 5px;
}

.company-header h1 {
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-card {
    background: white;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px 30px;
}

.form-header h2 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
}

.form-header p {
    margin: 10px 0 0;
    opacity: 0.9;
    font-size: 1.1em;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .logo-box {
    padding: 15px 5px;
}
}

.section-card {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.section-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px 25px;
    border-bottom: 3px solid var(--accent-color);
}

.section-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.4em;
}

.section-header i {
    color: var(--accent-color);
    margin-right: 10px;
    font-size: 1.3em;
}

.section-body {
    padding: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 8px;
    display: block;
    font-size: 0.95em;
}

.form-group label i {
    color: var(--accent-color);
    margin-right: 5px;
    width: 20px;
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 0.95em;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    outline: none;
}

.form-control:hover, .form-select:hover {
    border-color: #bdc3c7;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.badge-required { 
    color:red;
}

.hint-text {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

.inspection-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

.btn-inspection {
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    color: white;
    min-width: 200px;
}

.btn-inspection::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-inspection:hover::before {
    width: 300px;
    height: 300px;
}

.btn-inspection:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.btn-inspection:active {
    transform: translateY(-1px);
}

.btn-inspection i {
    margin-right: 8px;
}

.btn-fitup {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.btn-visual {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.btn-painting {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-submit {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 15px 50px;
    font-size: 1.3em;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.3);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.4);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-submit i {
    margin-right: 10px;
}

.footer {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    margin-top: 30px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.footer p {
    margin: 0;
    font-size: 0.95em;
}

@media (max-width: 768px) {
    .main-container {
    padding: 10px;
}
    
.company-header h1 {
    font-size: 1.8em;
}
    
.company-header .subtitle {
    font-size: 1em;
}
    
.form-header h2 {
    font-size: 1.4em;
}
    
.form-header p {
    font-size: 0.9em;
}
    
.form-grid {
    grid-template-columns: 1fr;
}
    
.btn-inspection {
    width: 100%;
    min-width: unset;
}
    
.step-label {
    font-size: 0.8em;
}
    
.step-number {
    width: 40px;
    height: 40px;
    font-size: 0.9em;
}
    
.section-header h3 {
    font-size: 1.2em;
}
    
.btn-submit {
    width: 90%;
    padding: 12px 20px;
    font-size: 1.1em;
}
}

@media (min-width: 769px) and (max-width: 1024px) {
    .form-grid {
    grid-template-columns: repeat(2, 1fr);
}
    
.btn-inspection {
    min-width: 180px;
    padding: 12px 25px;
}
}

@keyframes fadeIn {
from {
    opacity: 0;
    transform: translateY(20px);
}
to {
    opacity: 1;
    transform: translateY(0);
}
}

.section-card {
    animation: fadeIn 0.5s ease-out;
}

[data-bs-toggle="tooltip"] {
    cursor: help;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

@media print {
body {
    background: white;
    padding: 0;
}
    
.main-container {
    max-width: 100%;
    padding: 0;
}
    
.company-header {
    box-shadow: none;
    border: 1px solid #ddd;
}
    
.form-card {
    box-shadow: none;
    border: 1px solid #ddd;
}
    
.btn-inspection, .btn-submit, .footer {
    display: none;
}
    
.badge-required {
    background: none;
    color: #999;
    border: 1px solid #999;
}
}

.btn-submit.loading {
    position: relative;
    color: transparent;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
to {
    transform: rotate(360deg);
}
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-left-color: var(--success-color);
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-left-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-left-color: var(--warning-color);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-left-color: var(--accent-color);
    color: #0c5460;
}

.grid-col-span-2 {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .grid-col-span-2 {
    grid-column: span 1;
}
}

.form-group-with-icon {
    position: relative;
}

.form-group-with-icon i {
    position: absolute;
    left: 15px;
    top: 38px;
    color: var(--accent-color);
}

.form-group-with-icon .form-control {
    padding-left: 45px;
}

.card-footer {
    background: #f8f9fa;
    padding: 15px 25px;
    border-top: 1px solid #e9ecef;
    font-size: 0.9em;
    color: #6c757d;
}

.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.stats-card .stats-number {
    font-size: 2em;
    font-weight: 700;
}

.stats-card .stats-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.border-left-accent {
    border-left: 4px solid var(--accent-color);
}

.border-left-success {
    border-left: 4px solid var(--success-color);
}

.border-left-danger {
    border-left: 4px solid var(--danger-color);
}

.border-left-warning {
    border-left: 4px solid var(--warning-color);
}

input:invalid, select:invalid, textarea:invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

input:valid, select:valid, textarea:valid {
    border-color: #28a745 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

input:focus:invalid, select:focus:invalid, textarea:focus:invalid {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

input:invalid + .error-message, select:invalid + .error-message, textarea:invalid + .error-message {
    display: block;
}

.validation-hint {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 5px;
}

.error-message {
    display: none;
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #f8d7da;
    border-radius: 0.25rem;
    border-left: 3px solid #dc3545;
    animation: slideDown 0.3s ease-out;
}

.success-message {
    display: none;
    color: #28a745;
    font-size: 0.875em;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #d4edda;
    border-radius: 0.25rem;
    border-left: 3px solid #28a745;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
    opacity: 0;
    transform: translateY(-10px);
}
    to {
    opacity: 1;
    transform: translateY(0);
}
}

.char-counter {
    font-size: 0.8em;
    color: #6c757d;
    text-align: right;
    margin-top: 0.25rem;
}

.char-counter.invalid {
    color: #dc3545;
}