/* Careiwo Login System - Frontend Styles */

/* Dashboard Styles */
.cls-user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cls-dashboard-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e1e5e9;
}

.cls-dashboard-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Dashboard Layout */
.cls-user-dashboard {
    display: flex;
    min-height: 600px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Dashboard Menu Styles - Left Sidebar */
.cls-dashboard-menu {
    width: 220px;
    background: #fff;
    border-right: 1px solid #e1e5e9;
    flex-shrink: 0;
}

.cls-menu-list {
    display: block;
    list-style: none;
    margin: 0;
    padding: 1rem 0;
    list-style-type: none;
}

.cls-menu-list li {
    list-style: none;
}

.cls-menu-list li::before {
    content: none;
}

.cls-menu-item {
    position: relative;
    margin-bottom: 0.25rem;
}

.cls-menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    border-left: 3px solid transparent;
    box-sizing: border-box;
}

.cls-menu-link:hover {
    background: #f8f9fa;
    color: #007cba;
    text-decoration: none;
    border-left-color: #007cba;
}

.cls-menu-item.active .cls-menu-link {
    background: #e3f2fd;
    color: #007cba;
    border-left-color: #007cba;
    font-weight: 600;
}

.cls-menu-icon {
    font-size: 1rem;
    margin-right: 0.5rem;
    width: 18px;
    text-align: center;
}

.cls-menu-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.cls-menu-logout {
    margin-top: 1rem;
    border-top: 1px solid #e1e5e9;
    padding-top: 1rem;
}

.cls-menu-logout .cls-menu-link {
    color: #dc3545;
}

.cls-menu-logout .cls-menu-link:hover {
    background: #f8d7da;
    border-left-color: #dc3545;
}

/* Dashboard Content */
.cls-dashboard-content {
    flex: 1;
    background: #fff;
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cls-dashboard-header {
    background: #fff;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e1e5e9;
    margin: 0;
    flex-shrink: 0;
}

.cls-dashboard-tab-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: block !important;
    visibility: visible !important;
}

.cls-dashboard-tab-content > * {
    display: block !important;
    visibility: visible !important;
}

.cls-dashboard-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.cls-dashboard-section {
    margin-bottom: 2rem;
}

.cls-dashboard-section:last-child {
    margin-bottom: 0;
}

.cls-dashboard-section h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

/* User Table */
.cls-user-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.cls-user-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #ecf0f1;
}

.cls-user-table td:first-child {
    width: 200px;
    font-weight: 600;
    color: #34495e;
}

/* Quick Actions */
.cls-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.cls-quick-action {
    display: block;
    padding: 1.5rem;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.cls-quick-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #fff;
    text-decoration: none;
}

.cls-action-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cls-action-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cls-action-desc {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Settings Styles */
.cls-settings-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.cls-settings-group h5 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.cls-setting-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

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

/* Modern Checkbox Styles */
.cls-setting-item input[type="checkbox"],
.cls-vehicle-form input[type="checkbox"],
.cls-field input[type="checkbox"] {
    /* Hide default checkbox */
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #ddd !important;
    border-radius: 4px !important;
    background: #fff !important;
    margin-right: 0.75rem !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
}

.cls-setting-item input[type="checkbox"]:hover,
.cls-vehicle-form input[type="checkbox"]:hover,
.cls-field input[type="checkbox"]:hover {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.cls-setting-item input[type="checkbox"]:checked,
.cls-vehicle-form input[type="checkbox"]:checked,
.cls-field input[type="checkbox"]:checked {
    background: #007cba !important;
    border-color: #007cba !important;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2) !important;
}

.cls-setting-item input[type="checkbox"]:checked::after,
.cls-vehicle-form input[type="checkbox"]:checked::after,
.cls-field input[type="checkbox"]:checked::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

.cls-setting-item input[type="checkbox"]:focus,
.cls-vehicle-form input[type="checkbox"]:focus,
.cls-field input[type="checkbox"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.3);
}

/* Checkbox Label Styling */
.cls-setting-item label,
.cls-vehicle-form label:has(input[type="checkbox"]),
.cls-field label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    font-weight: 500;
}

.cls-setting-item label:hover,
.cls-vehicle-form label:has(input[type="checkbox"]):hover,
.cls-field label:has(input[type="checkbox"]):hover {
    background-color: rgba(0, 124, 186, 0.05);
}

/* Alternative modern toggle switch style */
.cls-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 0.75rem;
}

.cls-toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.cls-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.cls-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cls-toggle-switch input:checked + .cls-toggle-slider {
    background-color: #007cba;
}

.cls-toggle-switch input:checked + .cls-toggle-slider:before {
    transform: translateX(26px);
}

.cls-toggle-switch input:focus + .cls-toggle-slider {
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.3);
}

.cls-setting-item span {
    color: #34495e;
    font-weight: 500;
}

.cls-danger-zone {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #c53030;
}

/* Form Styles */
.cls-form {
    max-width: 600px;
}

.cls-field {
    margin-bottom: 1.5rem;
}

.cls-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.cls-field input,
.cls-field textarea,
.cls-field select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
}

.cls-field input:focus,
.cls-field textarea:focus,
.cls-field select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cls-field small {
    display: block;
    margin-top: 0.25rem;
    color: #7f8c8d;
    font-size: 0.875rem;
}

/* Button Styles */
.cls-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.cls-button:hover {
    background: #2980b9;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.cls-button-primary {
    background: #3498db;
}

.cls-button-primary:hover {
    background: #2980b9;
}

.cls-button-secondary {
    background: #95a5a6;
}

.cls-button-secondary:hover {
    background: #7f8c8d;
}

.cls-button-danger {
    background: #e74c3c;
}

.cls-button-danger:hover {
    background: #c0392b;
}

/* Message Styles */
.cls-message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.cls-message.cls-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cls-message.cls-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cls-message.cls-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Vehicle Forms */
.cls-vehicle-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.cls-vehicle-form {
    padding: 30px;
}

.cls-vehicle-form .cls-form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #007cba;
    overflow: hidden;
}

.cls-vehicle-form .cls-form-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.cls-field-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.cls-field-group .cls-field {
    margin-bottom: 0;
    min-width: 0;
    overflow: hidden;
}

/* Subcategory Field Styles */
.cls-subcategory-field {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.cls-subcategory-field label {
    color: #007cba;
    font-weight: 600;
}

.cls-subcategory-field select {
    border-color: #007cba;
    background-color: #f8f9fa;
}

.cls-subcategory-field select:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 123, 186, 0.1);
}

/* Category-specific styling */
.cls-form-section[data-category="Reisemobil"] {
    border-left-color: #28a745;
}

.cls-form-section[data-category="Wohnwagen"] {
    border-left-color: #007cba;
}

/* Vehicle List */
.cls-vehicle-list-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cls-vehicle-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cls-vehicle-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.cls-vehicle-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e5e9;
    width: 100%;
    margin-bottom: 25px;
}

.cls-vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cls-vehicle-header {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 20px;
    position: relative;
}

.cls-vehicle-header h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.cls-vehicle-category {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cls-vehicle-details {
    padding: 20px;
}

.cls-vehicle-details p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.5;
}

.cls-vehicle-details strong {
    color: #333;
    font-weight: 600;
}

.cls-vehicle-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 10px;
}

.cls-vehicle-meta {
    padding: 10px 20px;
    background: #f1f3f4;
    border-top: 1px solid #e1e5e9;
    text-align: center;
}

.cls-vehicle-meta small {
    color: #666;
    font-size: 12px;
}

/* Vehicle Equipment Tags */
.cls-vehicle-equipment {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
}

.cls-vehicle-equipment h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.cls-equipment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cls-equipment-tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 500;
    border: 1px solid #dee2e6;
}

.cls-equipment-tag.cls-equipment-more {
    background-color: #6c757d;
    color: #fff;
    font-weight: 600;
    cursor: help;
    border-color: #6c757d;
}

/* Vehicle Images */
.cls-vehicle-images {
    margin-bottom: 15px;
}

.cls-main-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
}

.cls-vehicle-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.cls-vehicle-main-img:hover {
    transform: scale(1.05);
}

.cls-image-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 0;
}

.cls-vehicle-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    border: 2px solid #e1e5e9;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.cls-vehicle-thumb:hover {
    border-color: #007cba;
    transform: scale(1.1);
}

/* Lightbox Modal */
.cls-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.cls-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cls-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

.cls-lightbox-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.cls-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.cls-lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.cls-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.cls-lightbox-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.cls-lightbox-prev {
    left: -60px;
}

.cls-lightbox-next {
    right: -60px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .cls-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
    }
    
    .cls-lightbox-nav {
        font-size: 20px;
        padding: 8px 12px;
    }
    
    .cls-lightbox-prev {
        left: 10px;
    }
    
    .cls-lightbox-next {
        right: 10px;
    }
}

.cls-no-vehicles {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.cls-no-vehicles p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 16px;
}

/* Button Variations */
.cls-button-small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}

.cls-button-danger {
    background: #dc3545;
    border-color: #dc3545;
}

.cls-button-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

.cls-add-vehicle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cls-add-vehicle-btn:before {
    content: "+";
    font-size: 18px;
    font-weight: bold;
}

/* Form Enhancements for Vehicle Forms */
.cls-vehicle-form select,
.cls-vehicle-form input[type="number"],
.cls-vehicle-form input[type="text"],
.cls-vehicle-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    box-sizing: border-box;
    max-width: 100%;
}

.cls-vehicle-form select:focus,
.cls-vehicle-form input[type="number"]:focus,
.cls-vehicle-form input[type="text"]:focus,
.cls-vehicle-form textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.cls-vehicle-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.cls-vehicle-form .cls-field {
    margin-bottom: 20px;
}

.cls-vehicle-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Vehicle Dashboard Tabs */
.cls-vehicle-tabs {
    margin-top: 1rem;
}

.cls-tab-buttons {
    display: flex;
    border-bottom: 2px solid #e1e5e9;
    margin-bottom: 1.5rem;
}

.cls-tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.cls-tab-button:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.cls-tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.cls-tab-content {
    position: relative;
}

.cls-tab-pane {
    display: none;
}

.cls-tab-pane.active {
    display: block;
}

.cls-dashboard-vehicles .cls-vehicle-form-container,
.cls-dashboard-vehicles .cls-vehicle-list-container {
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cls-menu-horizontal .cls-menu-list {
        flex-direction: column;
    }
    
    .cls-menu-horizontal .cls-menu-link {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
    
    .cls-menu-horizontal .cls-menu-icon {
        margin-right: 0.75rem;
        margin-bottom: 0;
    }
    
    .cls-quick-actions {
        grid-template-columns: 1fr;
    }
    
    .cls-dashboard-content {
        padding: 1rem;
    }
    
    .cls-user-table td:first-child {
        width: auto;
    }
    
    /* Vehicle Form Mobile */
    .cls-vehicle-form {
        padding: 20px;
    }
    
    .cls-field-group {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cls-vehicle-grid {
        gap: 20px;
    }
    
    .cls-vehicle-card {
        margin: 0 10px;
    }
    
    .cls-vehicle-actions {
        flex-direction: column;
    }
    
    .cls-vehicle-actions .cls-button {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .cls-vehicle-list-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cls-dashboard-header h3 {
        font-size: 1.5rem;
    }
    
    .cls-menu-text {
        font-size: 0.8rem;
    }
    
    .cls-dashboard-section h4 {
        font-size: 1.1rem;
    }
}