body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f8f9fb;
    color: #333;
}

header {
    background: white;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    min-height: 50px;
}

.header-logo {
    flex: 0 0 auto;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.header-logo img {
    height: 55px;
    width: auto;
    transition: opacity 0.2s ease;
}

.header-logo:hover img {
    opacity: 0.8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right nav {
    display: flex;
}

nav a {
    margin: 0 1rem;
    text-decoration: none;
    color: black;
    font-weight: bold;
}

.profile-container {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-picture {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    transition: border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-picture:hover {
    border-color: #3b82f6;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-profile {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 160px;
    overflow: hidden;
}

.profile-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.profile-dropdown .dropdown-item:hover {
    background: #f9fafb;
}

.profile-dropdown .logout-btn {
    color: #dc2626;
    border-top: 1px solid #f3f4f6;
}

.profile-dropdown .logout-btn:hover {
    background: #fef2f2;
}

/* Profile Page Styles */
.profile-header {
    margin-bottom: 2rem;
    text-align: center;
}

.profile-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.profile-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.profile-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 700px;
}

.profile-picture-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f3f4f6;
}

.current-profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e5e7eb;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.current-profile-pic:hover {
    border-color: #3b82f6;
}

.profile-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.1;
    padding: 2px;
}

.current-profile-pic:hover .profile-hover-overlay {
    opacity: 1;
}

.profile-hover-overlay svg {
    width: 16px;
    height: 16px;
    margin-bottom: 2px;
}

.current-profile-pic .profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.current-profile-pic .default-profile-pic {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.profile-form .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.profile-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.profile-form .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}


.form-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .profile-picture-section {
        flex-direction: column;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    main.profile-main {
        padding: 1rem 0.5rem;
    }
    
    .profile-container {
        max-width: 100%;
    }
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}


main.profile-main {
    max-width: 900px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.garage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.garage-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.add-vehicle-top-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-vehicle-top-btn:hover {
    background: #2563eb;
}

.vehicle-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.vehicle-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    position: relative;
}

.vehicle-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Prevent hover transform when dropdown is open */
.vehicle-card.dropdown-open:hover {
    transform: none;
}

.vehicle-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.vehicle-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-content {
    padding: 1.5rem;
}

.vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.vehicle-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.menu-container {
    position: relative;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
}

.menu-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    min-width: 140px;
    margin-top: 4px;
    overflow: hidden;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover {
    background: #f9fafb;
}

.dropdown-item.delete-btn {
    color: #dc2626;
}

.dropdown-item.delete-btn:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.dropdown-icon {
    font-size: 1rem;
}

.vehicle-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.info-item .icon {
    width: 20px;
    text-align: center;
}

.add-new-card {
    border: 2px dashed #d1d5db;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    min-height: 140px;
    transition: all 0.2s ease;
}

.add-new-card:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.add-new-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
}

.add-icon {
    font-size: 2rem;
    font-weight: 300;
}

.add-new-card:hover .add-new-content {
    color: #3b82f6;
}

/* Modal overlay and content styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.3);
    overflow-y: auto;
}

.modal.show {
    display: block;
}

.modal-content {
    background: #fff;
    max-width: 500px;
    min-width: 340px;
    margin: 4% auto;
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
    font-family: inherit;
    animation: modalFadeIn 0.2s;
    border: 1.5px solid #e3e6ea;
}

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

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: #222;
    letter-spacing: -1px;
}

.modal-content label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
    color: #222;
}

.modal-content input[type="text"],
.modal-content input[type="number"],
.modal-content input[type="file"] {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 1rem;
    background: #f8f9fb;
    transition: border 0.2s;
    box-sizing: border-box;
}

.modal-content .form-label {
    margin-bottom: 0.25rem;
    font-size: 1rem;
    display: block;
}

.modal-content input[type="text"]:focus,
.modal-content input[type="number"]:focus,
.modal-content input[type="file"]:focus {
    border: 1.5px solid #2563eb;
    outline: none;
    background: #fff;
}

.modal-content .form-label {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.modal-content .btn {
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
}

.modal-content .btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-content .btn-primary:hover {
    background: #2563eb;
}

.modal-content .btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-content .btn-secondary:hover {
    background: #e5e7eb;
}

.modal-content .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.modal-content .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-content .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

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

.modal-content .form-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.modal-content .btn-outline-primary {
    background: #fff;
    color: #2563eb;
    border: 1.5px solid #2563eb;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.modal-content .btn-outline-primary:disabled {
    color: #aaa;
    border-color: #ccc;
    background: #f8f9fb;
    cursor: not-allowed;
}

.modal-content .btn-outline-primary:hover:enabled {
    background: #2563eb;
    color: #fff;
}

.modal-content .close-modal-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.7rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 2;
}

.modal-content .close-modal-btn:hover {
    color: #2563eb;
}

#vin-lookup-message {
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    min-height: 1.2em;
    font-size: 0.97em;
    text-align: left;
}

@media (max-width: 600px) {
    .modal-content {
        max-width: 98vw;
        padding: 1.2rem 0.5rem 1.5rem 0.5rem;
    }
}

.recent-maintenance {
    margin-top: 2rem;
}

.recent-maintenance h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

.recent-maintenance table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.recent-maintenance th {
    background: #f9fafb;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recent-maintenance th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.recent-maintenance th.sortable:hover {
    background: #f3f4f6;
}

.recent-maintenance th.sorted-asc {
    background: #eff6ff;
    color: #1d4ed8;
}

.recent-maintenance th.sorted-desc {
    background: #eff6ff;
    color: #1d4ed8;
}

.sort-arrow {
    font-weight: normal;
    color: #3b82f6;
}

.recent-maintenance td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.recent-maintenance tr:last-child td {
    border-bottom: none;
}

.status.pending {
    color: #f59e0b;
    font-weight: 600;
    background: #fef3c7;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.status.completed {
    color: #10b981;
    font-weight: 600;
    background: #ecfdf5;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.status.scheduled {
    color: #3b82f6;
    font-weight: 600;
    background: #eff6ff;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.status.in-progress {
    color: #3b82f6;
    font-weight: 600;
    background: #eff6ff;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: #999;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
}

/* Authentication Pages Styles */
.auth-body {
    background: linear-gradient(135deg, #000000 0%, #3b82f6 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: Arial, sans-serif;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.auth-logo {
    margin-bottom: 2rem;
}

.auth-logo img {
    max-width: 200px;
    height: auto;
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.auth-subtitle {
    color: #6b7280;
    margin: 0 0 2rem 0;
    font-size: 1rem;
}

.auth-form {
    text-align: left;
    margin-bottom: 1.5rem;
}

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

.auth-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-form .form-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.auth-form .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.auth-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Password Requirements Styles */
.password-requirements {
    margin-top: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    animation: slideDown 0.2s ease-out;
}

.requirements-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-icon {
    font-size: 0.875rem;
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.requirement-text {
    color: #6b7280;
    transition: color 0.2s ease;
}

/* Animation for showing password requirements */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

/* Modal-specific password requirements */
.modal-content .password-requirements {
    background: #ffffff;
    border: 1px solid #d1d5db;
}

/* Email Validation Styles */
.email-feedback {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    animation: slideDown 0.2s ease-out;
}

.feedback-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.feedback-item.valid {
    color: #10b981;
}

.feedback-item.invalid {
    color: #ef4444;
}

.feedback-item.checking {
    color: #6b7280;
}

.feedback-icon {
    font-size: 0.875rem;
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.feedback-text {
    transition: color 0.2s ease;
}

.email-suggestion {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #92400e;
    animation: slideDown 0.2s ease-out;
}

.suggestion-text {
    font-weight: 500;
}

.suggestion-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.suggestion-link:hover {
    text-decoration: underline;
}

.btn-full {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
}

/* Universal button styling to match Add Vehicle button */
.btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s ease;
    box-sizing: border-box;
}

.btn:hover {
    background: #2563eb;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-outline-secondary {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
}

.btn-outline-secondary:hover {
    background: #f9fafb;
    color: #374151;
}

.btn-icon {
    margin-right: 0.5rem;
}

.auth-divider {
    position: relative;
    margin: 1.5rem 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
    max-width: 100px;
}

.auth-divider span {
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    white-space: nowrap;
}

.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.flash-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-links {
    margin-top: 2rem;
    text-align: center;
}

.auth-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.auth-link-primary {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-link-primary:hover {
    color: #2563eb;
    text-decoration: underline;
}

.auth-register {
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Mobile responsiveness for auth pages */
@media (max-width: 480px) {
    .auth-body {
        padding: 0.5rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-logo img {
        max-width: 150px;
    }
    
    .auth-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 360px) {
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .auth-title {
        font-size: 1.25rem;
    }
    
    .auth-subtitle {
        font-size: 0.875rem;
    }
}

/* Landing Page Styles */
.landing-body {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                url('landinage page.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: Arial, sans-serif;
    margin: 0;
}

.landing-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    justify-content: space-between;
    padding: 2rem 0;
}

.landing-content {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    flex: 1;
    justify-content: center;
}

.landing-logo img {
    max-width: 300px;
    height: auto;
    filter: brightness(1.1);
}

.landing-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.landing-hero p {
    font-size: 1.25rem;
    margin: 0;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    line-height: 1.5;
    max-width: 500px;
}

.landing-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 140px;
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: white;
}

.landing-footer {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    font-size: 0.875rem;
    margin-top: auto;
    padding-top: 2rem;
}

.landing-footer p {
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Mobile responsiveness for landing page */
@media (max-width: 768px) {
    .landing-body {
        background-attachment: scroll;
        padding: 0.5rem;
    }
    
    .landing-container {
        padding: 1rem 0;
    }
    
    .landing-content {
        gap: 2rem;
    }
    
    .landing-logo img {
        max-width: 250px;
    }
    
    .landing-hero h1 {
        font-size: 2.5rem;
    }
    
    .landing-hero p {
        font-size: 1.1rem;
    }
    
    .landing-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .landing-hero h1 {
        font-size: 2rem;
    }
    
    .landing-hero p {
        font-size: 1rem;
    }
    
    .landing-logo img {
        max-width: 200px;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .landing-hero h1 {
        font-size: 1.75rem;
    }
    
    .landing-content {
        gap: 1.5rem;
    }
}

/* Parts Inventory Page Styles */
.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.inventory-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.add-inventory-top-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-inventory-top-btn:hover {
    background: #2563eb;
}

.inventory-table-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.inventory-table-container {
    overflow-x: auto;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
}

.inventory-table th {
    background: #f9fafb;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.inventory-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}

.inventory-table tr:last-child td {
    border-bottom: none;
}

.inventory-table tr:hover {
    background: #f9fafb;
}

.part-name {
    font-weight: 500;
    color: #1a202c;
}

.source-cell {
    max-width: 150px;
}

.source-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.source-link:hover {
    background: #eff6ff;
    text-decoration: underline;
}

.vehicle-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.vehicle-link:hover {
    background: #eff6ff;
    text-decoration: underline;
    color: #2563eb;
}

.condition-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.condition-new {
    color: #10b981;
    background: #ecfdf5;
}

.condition-used {
    color: #f59e0b;
    background: #fef3c7;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}

.inventory-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Empty state styles */
.empty-inventory {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.empty-state {
    text-align: center;
    max-width: 400px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.empty-state p {
    color: #6b7280;
    margin: 0 0 2rem 0;
    font-size: 1rem;
}

/* Mobile responsiveness for inventory */
@media (max-width: 768px) {
    .inventory-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .inventory-header h1 {
        text-align: center;
    }
    
    .add-inventory-top-btn {
        justify-content: center;
    }
    
    .inventory-table-container {
        border-radius: 0;
        margin: 0 -2rem;
    }
    
    .inventory-table th,
    .inventory-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .inventory-table th {
        font-size: 0.75rem;
    }
    
    /* Stack table cells on very small screens */
    @media (max-width: 640px) {
        .inventory-table-container {
            overflow-x: scroll;
        }
        
        .inventory-table {
            min-width: 700px;
        }
    }
}

/* Parts Filter Styles */
.parts-header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.parts-filters-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.filter-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    background: white;
    cursor: pointer;
    margin: 0;
}

.filter-checkbox input[type="checkbox"]:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

.filter-checkbox input[type="checkbox"]:checked::before {
    content: '✓';
    display: block;
    color: white;
    font-size: 0.75rem;
    text-align: center;
    line-height: 1;
}

/* Radio button filter groups */
.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-group-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

.filter-radio {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    position: relative;
}

.filter-radio input[type="radio"] {
    width: 1rem;
    height: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    margin: 0;
    appearance: none;
    position: relative;
}

.filter-radio input[type="radio"]:checked {
    border-color: #3b82f6;
    background: white;
}

.filter-radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #3b82f6;
}

.filter-radio:hover input[type="radio"] {
    border-color: #3b82f6;
}

.radio-checkmark {
    display: none; /* Hide since we're using CSS pseudo-elements */
}

/* Parts header container - stack rows vertically */
.parts-header {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Parts header top row - title left, controls right */
.parts-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Parts header controls - align right like maintenance tab */
.parts-header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Parts filter row (separate row for filter groups) - right aligned like controls above */
.parts-filter-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
    width: 100%;
}

/* Separator between filter groups */
.filter-group-separator {
    width: 1px;
    height: 2rem;
    background-color: #d1d5db;
    margin: 0 0.5rem;
}

/* Parts table sortable headers (consistent with home page) */
.parts-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.parts-table th.sortable:hover {
    background: #f3f4f6;
}

.parts-table th.sorted-asc {
    background: #eff6ff;
    color: #1d4ed8;
}

.parts-table th.sorted-desc {
    background: #eff6ff;
    color: #1d4ed8;
}

.filter-search {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 200px;
    transition: border-color 0.15s ease;
}

.filter-search:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-search::placeholder {
    color: #9ca3af;
}

.parts-filter-results {
    padding: 0.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

/* Mobile responsiveness for parts filters */
@media (max-width: 768px) {
    .parts-header-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .parts-filters-inline {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .filter-search {
        min-width: auto;
        width: 100%;
    }
    
    .filter-checkbox {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .inventory-header h1 {
        font-size: 1.5rem;
    }
    
    .empty-icon {
        font-size: 3rem;
    }
    
    .empty-state h2 {
        font-size: 1.25rem;
    }
    
    main {
        padding: 1rem;
    }
}

/* Sold Vehicles Page Styles */
.sold-vehicle-card {
    opacity: 0.9;
    position: relative;
}

.sold-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc2626;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.sold-date {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.page-description {
    color: #6b7280;
    margin: 0.5rem 0 2rem 0;
    font-size: 1rem;
}

.sold-btn {
    color: #7c3aed !important;
}

.sold-btn:hover {
    background-color: #f3e8ff !important;
}

/* Image Cropping Modal Styles */
.image-crop-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
}

.image-crop-modal {
    max-width: 1000px;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Keep outer modal clean */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}
.crop-container1 {
    
    padding: 1.5rem;
    background: #f3f4f6;
    text-align: center;
    max-height: 500px;
    overflow: hidden;
}

.crop-container {
    flex: 1 1 auto;
    overflow: auto; /* Enables scroll if image is too tall */
    max-height: 60vh; /* Prevent the cropper from taking over the screen */
    text-align: center;
}

.crop-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.crop-controls {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crop-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.crop-actions {
    display: flex;
    gap: 0.75rem;
}

.crop-actions .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* Ensure cropper container fits properly */
.cropper-container {
    max-height: 450px !important;
}

/* Maintenance Form Page Styles */
.maintenance-form-header {
    margin-bottom: 2rem;
}

.maintenance-form-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.maintenance-form-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 1.5rem 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Rich Text Editor */
.description-editor-container {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.toolbar {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.toolbar-btn {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toolbar-btn:hover {
    background: #f3f4f6;
}

.toolbar-separator {
    color: #d1d5db;
    font-weight: 300;
    margin: 0 0.25rem;
    user-select: none;
}

.clear-format-btn {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

.clear-format-btn:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
}

.rich-text-editor {
    min-height: 120px;
    padding: 0.75rem;
    background: white;
    outline: none;
    font-size: 0.875rem;
    line-height: 1.5;
}

.rich-text-editor:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
}

/* Parts Section */
.part-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.2s;
}

.part-item:hover {
    border-color: #d1d5db;
}

.part-header {
    background: #f3f4f6;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.part-title {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.btn-remove-part {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-remove-part:hover {
    background: #fef2f2;
}

.part-form {
    padding: 1rem;
}

.inventory-part-section,
.custom-part-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.no-inventory-notice {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.no-inventory-notice p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-inventory-notice a {
    color: #2563eb;
    text-decoration: none;
}

.no-inventory-notice a:hover {
    text-decoration: underline;
}

.parts-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* New Inline Parts Interface */
.parts-help-text {
    margin-bottom: 1.5rem;
}

.parts-help-text p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.parts-list {
    margin-bottom: 1.5rem;
}

.parts-list-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.parts-list-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.part-display {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.part-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.part-type-tag {
    background: #f3f4f6;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.part-type-tag.custom {
    background: #fef3c7;
    color: #92400e;
}

.part-type-tag.inventory {
    background: #dbeafe;
    color: #1d4ed8;
}

.part-name {
    font-weight: 500;
    color: #1a202c;
    font-size: 0.875rem;
}

.part-number {
    color: #6b7280;
    font-size: 0.875rem;
}

.part-qty {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.part-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit-part,
.btn-remove-part {
    background: none;
    border: none;
    padding: 0.375rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-edit-part {
    color: #6b7280;
}

.btn-edit-part:hover {
    background: #f3f4f6;
    color: #374151;
}

.btn-remove-part {
    color: #dc2626;
}

.btn-remove-part:hover {
    background: #fef2f2;
}

.parts-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.parts-empty-state .empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.parts-empty-state p {
    color: #6b7280;
    margin: 0;
    font-size: 0.875rem;
}

.btn-add-part {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.btn-add-part:hover {
    background: #1d4ed8;
}

.add-part-interface {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.add-part-form {
    padding: 1.5rem;
}

.add-part-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.add-part-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.btn-close-add {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-close-add:hover {
    background: #f3f4f6;
    color: #374151;
}

.part-type-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.type-tab {
    background: white;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.type-tab.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.type-tab:not(.active):hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.no-inventory-hint {
    margin-top: 0.5rem;
}

.no-inventory-hint small {
    color: #6b7280;
    font-size: 0.75rem;
}

.no-inventory-hint a {
    color: #2563eb;
    text-decoration: none;
}

.no-inventory-hint a:hover {
    text-decoration: underline;
}

.part-input-section {
    margin-bottom: 1.5rem;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.qty-btn {
    background: #f9fafb;
    border: none;
    padding: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
    border-right: 1px solid #e5e7eb;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
}

.qty-btn:hover {
    background: #f3f4f6;
}

.qty-btn:last-child {
    border-right: none;
    border-left: 1px solid #e5e7eb;
}

.qty-input {
    border: none;
    padding: 0.75rem;
    text-align: center;
    font-weight: 500;
    flex: 1;
    min-width: 80px;
}

.qty-input:focus {
    outline: none;
}

.add-part-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.text-muted {
    color: #6b7280;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .maintenance-form-container {
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Vehicle Detail Page Styles */
.vehicle-header-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.vehicle-card-image {
    width: 120px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

.image-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.75rem;
    font-weight: 500;
}

.vehicle-card-image:hover .image-hover-overlay {
    opacity: 1;
}

.image-hover-overlay svg {
    margin-bottom: 0.25rem;
}

.vehicle-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-card-placeholder {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #9ca3af;
}

.vehicle-card-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vehicle-card-main {
    flex: 1;
}

.vehicle-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.vehicle-card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.vehicle-card-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.vehicle-detail-item {
    color: #6b7280;
    font-size: 0.95rem;
}

.mileage-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mileage-input {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.95rem;
    color: #6b7280;
    width: 100px;
}

.mileage-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.mileage-edit-btn {
    padding: 0.25rem;
    margin-left: 0.25rem;
}

.vehicle-card-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-active {
    background: #dcfce7;
    color: #16a34a;
}

.status-current {
    background: #dcfce7;
    color: #16a34a;
}

.status-due {
    background: #fef2f2;
    color: #dc2626;
}

.status-grey {
    background: #f3f4f6;
    color: #6b7280;
}

.last-service {
    color: #6b7280;
    font-size: 0.875rem;
}

.vehicle-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon-only {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

.btn-icon-only:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Tab Styles */
.tab-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.tab-nav {
    display: flex;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.tab-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.tab-btn.active {
    color: #2563eb;
    background: none;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.tab-content {
    display: none;
    padding: 2rem;
}

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

/* Vehicle Info Styles */
.info-card {
    width: 100%;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.info-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.info-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#vehicleEditModeControls {
    display: flex;
    align-items: center;
}

/* Display Mode Styles */
.vehicle-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.vehicle-info-item {
    padding: 1.5rem 0;
}

.vehicle-info-label {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.vehicle-info-value {
    font-size: 1.25rem;
    color: #2563eb;
    font-weight: 600;
}

/* Edit Mode Styles */
.vehicle-info-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.vehicle-info-edit-item {
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #ffffff;
}

.vehicle-info-edit-item .form-group {
    margin-bottom: 0;
}

.vehicle-info-edit-item .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.vehicle-info-edit-item .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    background: white;
}

.vehicle-info-edit-item .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.info-card .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.info-card .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.info-card .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    background: white;
}

.info-card .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.info-card .form-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}

/* Gallery Styles */
.gallery-card {
    width: 100%;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.gallery-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.gallery-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-actions {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.empty-gallery {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-gallery .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-gallery h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.empty-gallery p {
    color: #6b7280;
    margin: 0 0 2rem 0;
}

/* Maintenance Styles */
.maintenance-card {
    width: 100%;
}

.maintenance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.maintenance-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.maintenance-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.maintenance-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    background: #f9fafb;
    transition: background-color 0.2s ease;
}

.maintenance-item:hover {
    background: #f3f4f6;
}

.maintenance-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.maintenance-header-row:hover {
    opacity: 0.8;
}

.maintenance-description {
    flex: 1;
    margin-right: 1rem;
}

.maintenance-title-preview {
    line-height: 1.5;
    color: #374151;
    font-weight: 600;
}

.maintenance-title {
    font-weight: 600;
    color: #374151;
}

.description-preview, .description-full {
    line-height: 1.5;
    color: #374151;
}

.description-preview {
    font-weight: 500;
}

.maintenance-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.maintenance-header-row h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
    flex: 1;
}

.maintenance-expanded {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.maintenance-parts-section {
    margin-bottom: 1rem;
}

.parts-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
    color: #374151;
}

.parts-toggle:hover {
    background: #e5e7eb;
}

.parts-toggle-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parts-toggle-icon {
    font-size: 1.25rem;
    font-weight: bold;
    color: #6b7280;
    min-width: 20px;
    text-align: center;
}

.maintenance-parts-list {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.part-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.part-detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.part-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.part-type-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.part-type-badge.custom-badge {
    background: #fef3c7;
    color: #92400e;
}

.part-type-badge.inventory-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.part-name {
    font-weight: 500;
    color: #374151;
}

.part-number {
    color: #6b7280;
    font-size: 0.875rem;
}

.part-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.part-condition {
    color: #9ca3af;
}

.maintenance-parts {
    margin-bottom: 0.75rem;
    color: #6b7280;
}

.maintenance-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

.empty-maintenance {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-maintenance .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-maintenance h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.empty-maintenance p {
    color: #6b7280;
    margin: 0 0 2rem 0;
}

/* Parts Styles */
.parts-card {
    width: 100%;
}

.parts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.parts-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.parts-table-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.parts-table-container {
    overflow-x: auto;
}

.parts-table {
    width: 100%;
    border-collapse: collapse;
}

.parts-table th {
    background: #f9fafb;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.parts-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}

.parts-table tr:last-child td {
    border-bottom: none;
}

.parts-table tr:hover {
    background: #f9fafb;
}

.parts-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.empty-parts {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-parts .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-parts h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.empty-parts p {
    color: #6b7280;
    margin: 0 0 2rem 0;
}

/* Task Styles */
.tasks-card {
    width: 100%;
}

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tasks-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.pending-tasks, .completed-tasks {
    margin-bottom: 2rem;
}

.pending-tasks h3, .completed-tasks h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: white;
}

.task-item.completed {
    background: #f9fafb;
    opacity: 0.8;
}

.task-content {
    flex: 1;
}

.task-content p {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    color: #1a202c;
}

.task-content small {
    color: #6b7280;
}

.completion-notes {
    margin: 0.5rem 0;
    padding: 0.75rem;
    background: #f0f9ff;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.empty-tasks {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-tasks .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-tasks h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.empty-tasks p {
    color: #6b7280;
    margin: 0 0 2rem 0;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    color: #f59e0b;
    background: #fef3c7;
}

.status-scheduled {
    color: #3b82f6;
    background: #dbeafe;
}

.status-in-progress {
    color: #3b82f6;
    background: #dbeafe;
}

.status-completed {
    color: #10b981;
    background: #d1fae5;
}

/* Image Viewer Modal Styles */
#imageViewerModal .modal-content {
    background: black;
    border-radius: 0;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.image-nav-btn {
    background: rgba(255, 255, 255, 0.8) !important;
    border: none !important;
    padding: 10px 15px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 1.5rem !important;
    z-index: 1001 !important;
    transition: background-color 0.2s ease !important;
}

.image-nav-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
}

.image-nav-btn:disabled {
    background: rgba(128, 128, 128, 0.5) !important;
    cursor: not-allowed !important;
}

#imageViewerModal .close-modal-btn {
    color: white !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#imageViewerModal .close-modal-btn:hover {
    background: rgba(0, 0, 0, 0.8) !important;
}

/* Mobile responsiveness for vehicle detail */
@media (max-width: 768px) {
    .vehicle-detail-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .tab-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 50%;
        min-width: 120px;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
    .gallery-header, .maintenance-header, .tasks-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .gallery-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .task-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .task-actions {
        justify-content: flex-start;
    }
    
    .maintenance-header-row {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .vehicle-detail-header h1 {
        font-size: 1.5rem;
    }
    
    .tab-btn {
        flex: 1 1 100%;
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
        gap: 0.375rem;
    }
    
    .image-gallery {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Profile page danger zone styling */
.danger-zone {
    border: 2px solid #dc2626 !important;
    border-radius: 8px;
    background: #fef2f2;
    margin-top: 2rem;
    padding: 1.5rem;
}

.danger-zone h3 {
    color: #dc2626;
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.danger-zone h3::before {
    content: "⚠️";
    font-size: 1.2em;
}

.danger-warning {
    background: white;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 1rem;
}

.danger-warning h4 {
    color: #dc2626;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.danger-warning p {
    color: #991b1b;
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.btn-danger {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
    font-weight: 600;
}

.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

.btn-danger:disabled {
    background-color: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
}

/* Inventory validation modal specific styling */
#inventoryWarningModal .modal-content {
    border: 2px solid #f59e0b;
    max-width: 480px;
}

#inventoryWarningModal h2 {
    color: #d97706;
    border-bottom: 1px solid #fed7aa;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#inventoryErrorModal .modal-content {
    border: 2px solid #dc2626;
    max-width: 480px;
}

#inventoryErrorModal h2 {
    color: #dc2626;
    border-bottom: 1px solid #fca5a5;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#inventoryConfirmModal .modal-content {
    border: 2px solid #10b981;
    max-width: 480px;
}

#inventoryConfirmModal h2 {
    color: #059669;
    border-bottom: 1px solid #a7f3d0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inventory-part-list {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid;
}

.inventory-warning-list {
    border-left-color: #f59e0b;
}

.inventory-error-list {
    border-left-color: #dc2626;
}

.inventory-confirm-list {
    border-left-color: #10b981;
}

.inventory-part-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

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

.inventory-part-name {
    font-weight: 500;
    color: #374151;
}

.inventory-part-details {
    font-size: 0.85rem;
    color: #6b7280;
}

.inventory-error .inventory-part-details {
    color: #dc2626;
    font-weight: 500;
}

.inventory-confirm .inventory-part-details {
    color: #059669;
    font-weight: 500;
}

.inventory-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.inventory-modal-description {
    color: #dc2626;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Delete account modal specific styling */
#deleteAccountModal {
    z-index: 1100; /* Higher than default modal z-index of 1000 */
}

#deleteAccountModal .modal-content {
    border: 2px solid #dc2626;
}

#deleteAccountModal h2 {
    border-bottom: 1px solid #fca5a5;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

#deleteAccountModal .form-label {
    font-weight: 600;
}

#deleteAccountModal input[type="text"] {
    border: 2px solid #fca5a5;
}

#deleteAccountModal input[type="text"]:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Confirmation modal should be on top of everything */
#confirmModal {
    z-index: 1200; /* Highest z-index for final confirmation */
}


/* Rich text editor styles */
.rich-text-toolbar {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px 4px 0 0;
}

.toolbar-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.toolbar-btn:hover {
    background: #e9ecef;
}

.toolbar-btn:active {
    background: #dee2e6;
}

.rich-text-area {
    border-radius: 0 0 4px 4px !important;
    border-top: none !important;
}

/* Maintenance description display with rich text */
.maintenance-description {
    line-height: 1.5;
}

.maintenance-description strong {
    font-weight: 600;
}

.maintenance-description em {
    font-style: italic;
}

.maintenance-description a {
    color: #3b82f6;
    text-decoration: underline;
}

.maintenance-description a:hover {
    color: #1d4ed8;
}

/* Limit description height in maintenance table */
table .maintenance-description {
    max-height: 4rem;
    overflow: hidden;
    position: relative;
}

table .maintenance-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30%;
    height: 1.2rem;
    background: linear-gradient(to right, transparent, white);
}

/* Parts selector styles */
.parts-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    background: #f9fafb;
}

.part-type-selection {
    margin-bottom: 1rem;
}

.part-fields {
    margin-bottom: 1rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.inventory-part-row,
.custom-part-row {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.part-fields .form-group {
    margin-bottom: 0;
}

.part-fields .form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.inventory-part-row .form-row,
.custom-part-row .form-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inventory-part-row select {
    flex: 1;
}

.custom-part-row .form-row input[type="text"]:first-child {
    flex: 2;
}

.custom-part-row .form-row input[type="text"]:nth-child(2) {
    flex: 1;
}

.quantity-input {
    width: 100px !important;
    flex: none !important;
}

.part-button {
    white-space: nowrap;
    min-width: 100px;
}

.parts-input-row,
.custom-parts-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selected-parts {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}

.selected-parts:empty {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.part-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.part-item:last-child {
    margin-bottom: 0;
}

.part-info {
    flex: 1;
}

.part-name {
    font-weight: 500;
    color: #1a202c;
}

.part-details {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.part-quantity {
    font-weight: 600;
    color: #374151;
    margin-right: 1rem;
}

.inventory-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.custom-badge {
    background: #fef3c7;
    color: #d97706;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.btn-remove-part {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.btn-remove-part:hover {
    background: #b91c1c;
}

.inventory-info {
    font-size: 0.75rem;
    color: #059669;
    margin-left: 0.5rem;
}

.inventory-warning {
    font-size: 0.75rem;
    color: #dc2626;
    margin-left: 0.5rem;
}

/* Quick Reference Styles */
.reference-card {
    width: 100%;
}

.reference-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.reference-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#editModeControls {
    display: flex;
    align-items: center;
}

.reference-edit {
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #ffffff;
    margin-bottom: 1.5rem;
}

.reference-fields {
    width: 100%;
}

.reference-fields .form-group {
    margin-bottom: 1rem;
}

.reference-fields .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.reference-fields .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    background: white;
}

.reference-fields .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.reference-delete-control {
    margin-top: 1rem;
    padding: 0;
    border: none;
    text-align: center;
}

.reference-item.marked-for-delete .reference-edit {
    background-color: #fef2f2;
    border-color: #fca5a5;
}

.reference-item.marked-for-delete .reference-fields .form-control {
    background-color: #fff5f5;
    opacity: 0.8;
    pointer-events: none;
}

.reference-item.marked-for-delete .reference-fields .form-label {
    color: #991b1b;
    opacity: 0.8;
}

.reference-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.reference-item {
    padding: 1.5rem 0;
}

.reference-label {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.reference-value {
    font-size: 1.25rem;
    color: #2563eb;
    font-weight: 600;
}

.reference-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

.empty-reference {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-reference .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-reference h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.empty-reference p {
    color: #6b7280;
    margin: 0 0 2rem 0;
}

/* New Reference Placeholder Styles */
.reference-placeholder {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 1.5rem;
    background: #f9fafb;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reference-placeholder:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.reference-placeholder-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.placeholder-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.reference-placeholder:hover .placeholder-icon {
    background: #3b82f6;
    color: white;
}

.placeholder-text {
    transition: color 0.2s ease;
}

.reference-placeholder:hover .placeholder-text {
    color: #3b82f6;
}

/* New Reference Form Styles */
.reference-new {
    border: 2px solid #3b82f6;
    border-radius: 8px;
    background: #eff6ff;
    animation: slideIn 0.3s ease-out;
}

.reference-new .reference-edit {
    background: #eff6ff;
    border: none;
    margin: 0;
    padding: 1.5rem;
}

.reference-new-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.reference-new-controls .btn-icon-only {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.reference-new-controls .btn-success {
    background: #10b981;
    color: white;
}

.reference-new-controls .btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

.reference-new-controls .btn-secondary {
    background: #6b7280;
    color: white;
}

.reference-new-controls .btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

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

/* Expandable part details styles */
.part-summary {
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.part-summary:hover {
    background-color: #f9fafb;
}

.part-summary .part-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.part-summary .part-quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.expand-icon {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    color: #9ca3af;
}

.part-details-expanded {
    margin-left: 1rem;
    margin-top: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Custom part edit form styles */
.part-edit-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.part-edit-form .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.part-edit-form label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.part-edit-input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.part-edit-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.part-edit-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

/* Inventory part view styles */
.part-view-details {
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0.5rem;
    border-radius: 6px;
}

.part-view-details:hover {
    background-color: #eff6ff;
}

.part-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.detail-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.detail-value {
    font-size: 0.875rem;
    color: #374151;
}

.detail-value a {
    color: #3b82f6;
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

.part-action-hint {
    text-align: center;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.hint-text {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
}

/* Error badge for missing parts */
.error-badge {
    background-color: #fca5a5 !important;
    color: #7f1d1d !important;
}

/* Small button styles for part editing */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .part-edit-form .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .part-summary .part-info {
        flex-wrap: wrap;
    }
    
    .part-details-expanded {
        margin-left: 0;
    }
}

/* Circular Crop Box Styles for Profile Images */
.cropper-container.profile-crop .cropper-view-box {
    border-radius: 50% !important;
    overflow: hidden !important;
}

/* Basic crop modal constraints */
.crop-modal .modal-content {
    max-width: 90vw;
    max-height: 85vh;
}

/* Parts filter results styling */
.parts-filter-results {
    margin: 1rem 0;
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.parts-filter-results button {
    margin-left: auto;
}

/* Maintenance filter results styling */
.maintenance-filter-results {
    margin: 1rem 0;
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.maintenance-filter-results button {
    margin-left: auto;
}

.parts-filter-results::after {
    content: "";
    display: table;
    clear: both;
}

/* Quill Editor Customization */

/* Make Quill editor fit with existing design */
.description-editor-container .ql-container {
    border: none !important;
    font-family: inherit !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
}

.description-editor-container .ql-editor {
    min-height: 120px !important;
    padding: 0.75rem !important;
    border: none !important;
}

.description-editor-container .ql-toolbar {
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 0.5rem !important;
}

.description-editor-container {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

/* Quill snow theme adjustments */
.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
    width: 14px !important;
    height: 14px !important;
}

.ql-snow .ql-toolbar button {
    width: auto !important;
    height: auto !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0 0.125rem !important;
}

/* Fix Quill tooltip positioning - prevent clipping while staying near text */
.description-editor-container {
    position: relative !important;
    overflow: visible !important;
}

.ql-snow .ql-tooltip {
    position: absolute !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    background: white !important;
    white-space: nowrap !important;
}

.ql-snow .ql-tooltip.ql-editing {
    position: absolute !important;
    z-index: 1001 !important;
    max-width: none !important;
    width: auto !important;
    min-width: 220px !important;
}

/* Ensure tooltip stays within viewport bounds */
.ql-snow .ql-tooltip.ql-flip {
    transform: translateX(-100%) translateY(-100%) !important;
    margin-left: -10px !important;
    margin-top: -10px !important;
}

.ql-snow .ql-tooltip input[type="text"] {
    width: 180px !important;
    padding: 0.5rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    margin: 0 !important;
}

.ql-snow .ql-tooltip a.ql-action:after {
    border-right: 1px solid #d1d5db !important;
    padding-right: 0.5rem !important;
    margin-right: 0.5rem !important;
}

.ql-snow .ql-tooltip a.ql-remove:before {
    margin-left: 0.5rem !important;
}

/* Mobile responsiveness for Quill */
@media (max-width: 640px) {
    .description-editor-container .ql-toolbar {
        padding: 0.375rem !important;
    }
    
    .description-editor-container .ql-editor {
        padding: 0.5rem !important;
        min-height: 100px !important;
    }
    
    .ql-snow .ql-toolbar button {
        padding: 0.25rem !important;
        margin: 0.125rem !important;
    }
    
    .ql-snow .ql-tooltip {
        max-width: calc(100vw - 40px) !important;
    }
    
    .ql-snow .ql-tooltip input[type="text"] {
        width: 140px !important;
    }
}

/* Enhanced rich text editor for better readability */
.rich-text-editor {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.rich-text-editor h1, .rich-text-editor h2, .rich-text-editor h3,
.rich-text-editor h4, .rich-text-editor h5, .rich-text-editor h6 {
    margin: 0.5rem 0;
    font-weight: 600;
}

.rich-text-editor p {
    margin: 0.5rem 0;
}

.rich-text-editor ul, .rich-text-editor ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.rich-text-editor li {
    margin: 0.25rem 0;
}

.rich-text-editor a {
    color: #3b82f6;
    text-decoration: underline;
}

.rich-text-editor a:hover {
    color: #1d4ed8;
}

