body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #212529;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: rgb(231, 36, 38);
    --primary-dark: rgb(185, 29, 30);
    --primary-light: rgba(231, 36, 38, 0.1);
    --text-dark: #212529;
    --text-light: #6c757d;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius-sm: 6px;
    --radius-md: 12px;
    --transition: all 0.3s ease;
}

header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.logo-container img {
    max-height: 40px;
    transition: var(--transition);
}

nav a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark) !important;
    margin-left: 1.5rem;
    text-decoration: none;
    position: relative;
    transition: var(--transition);
}

nav a:hover {
    color: var(--primary-color) !important;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

main {
    min-height: 80vh;
    padding: 3rem 0;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

form {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    border: none;
    padding: 2rem !important;
    transition: var(--transition);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(231, 36, 38, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.alert {
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1.5rem;
}

footer {
    background-color: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Card styling */
.warranty-card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
}

.warranty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 50rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    form {
        padding: 1.5rem !important;
    }

    nav a {
        margin-left: 1rem;
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    form {
        padding: 1.2rem !important;
    }

    .form-control,
    .form-select,
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    /* Additional mobile optimizations */
    header {
        padding: 0.75rem 0;
    }

    .logo-container img {
        max-height: 32px;
    }

    nav a {
        margin-left: 0.75rem;
        font-size: 14px;
    }

    main {
        padding: 2rem 0;
    }

    .warranty-card {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: var(--radius-sm);
    }

    .warranty-card:hover {
        transform: none;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 0.6rem 1rem;
    }

    /* Form-specific mobile optimizations */
    .form-control,
    .form-select {
        font-size: 16px;
        /* Prevents iOS zoom on focus */
        height: auto;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
    }

    /* Improve spacing between form elements */
    .mb-4 {
        margin-bottom: 1.25rem !important;
    }

    /* Make buttons easier to tap */
    .btn {
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
        min-height: 48px;
        /* Minimum recommended touch target size */
    }

    /* Adjust file input for better mobile experience */
    input[type="file"].form-control {
        padding: 0.5rem;
    }

    /* Enhance form labels visibility */
    .form-label {
        margin-bottom: 0.4rem;
        font-weight: 500;
    }
}

/* Small phone screens */
@media (max-width: 400px) {
    nav a {
        margin-left: 0.5rem;
        font-size: 13px;
    }

    .logo-container img {
        max-height: 28px;
    }

    h1 {
        font-size: 1.3rem;
    }

    .subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }

    form {
        padding: 1rem !important;
    }

    .form-label {
        margin-bottom: 0.3rem;
    }

    .mb-4 {
        margin-bottom: 1rem !important;
    }
}

/* Table-specific responsive styles */
@media (max-width: 480px) {

    /* Table styles for very small screens */
    .warranty-card {
        margin: 0 -15px;
        border-radius: 0;
    }

    .table-responsive {
        padding: 0;
        margin: 0;
        border-radius: 0;
    }

    .table {
        margin-bottom: 0;
    }

    /* Ensure table headers are visible */
    .table thead th {
        position: sticky;
        top: 0;
        z-index: 5;
    }

    /* Improve status badges display */
    .status-active,
    .status-out,
    .status-pending,
    .status-approved,
    .status-rejected,
    .status-cancelled {
        white-space: nowrap;
        display: inline-block;
        width: auto;
        text-align: center;
    }
}

/* File Upload Styling */
.form-control[type="file"] {
    padding: 0.5rem;
}

#carImagesCount,
#carLicencesCount {
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

#carImagesCount.text-success,
#carLicencesCount.text-success {
    color: #28a745 !important;
}

#carImagesCount.text-danger,
#carLicencesCount.text-danger {
    color: #dc3545 !important;
}

/* No Orders Message Styling */
#no-orders-message {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
    padding: 2rem;
}

#no-orders-message i {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Painted Disclaimer Styling */
#paintedDisclaimer {
    border-left: 4px solid #ffc107;
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease-out;
}

#paintedDisclaimer i {
    color: #f39c12;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Warranty Terms Styling */
.alert-info {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: #b6d4fe;
    color: #084298;
}

.alert-info h5 {
    color: #0a58ca;
    margin-bottom: 0.75rem;
}

.alert-info ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.alert-info li {
    margin-bottom: 0.5rem;
}

.alert-info li:last-child {
    margin-bottom: 0;
}

/* Critical Warranty Conditions Card */
.card-header.bg-gradient {
    border-bottom: none;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-body .alert {
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
}

.card-body .alert h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-body .alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: #f5c6cb;
    color: #721c24;
}

.card-body .alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: #ffeaa7;
    color: #856404;
}

.card-body .alert-info {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: #b6d4fe;
    color: #084298;
}

/* Enhanced responsive design for new elements */
@media (max-width: 768px) {
    #no-orders-message {
        margin: 1rem 0;
        padding: 1.5rem;
    }

    #no-orders-message h3 {
        font-size: 1.5rem;
    }

    #no-orders-message p {
        font-size: 0.9rem;
    }

    .card-body .alert {
        padding: 0.75rem;
    }

    .card-body .alert h5 {
        font-size: 1rem;
    }

    .card-header h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    #no-orders-message {
        padding: 1rem;
    }

    #no-orders-message i {
        font-size: 3rem;
    }

    #no-orders-message h3 {
        font-size: 1.25rem;
    }

    #no-orders-message .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-body .alert {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .card-body .alert h5 {
        font-size: 0.95rem;
    }

    .card-header {
        padding: 1rem;
    }

    .card-header h3 {
        font-size: 1rem;
    }
}