html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #0d0d0d;
    color: #cfd8dc;
    font-family: 'Segoe UI', sans-serif;
    scroll-behavior: smooth;
}

body {
    opacity: 1;
    transition: opacity 0.5s ease, background-color 0.5s ease, color 0.5s ease;
}

body.fade-out {
    opacity: 0;
    pointer-events: none;
}

body.dark-theme {
    background-color: #0d0d0d;
    color: #ffffff;
}

main {
    padding: 0 1.5rem;
    margin: 0 auto;
    max-width: 1200px;
    transition: padding 0.3s ease;
}

.text-neon {
    color: #82aaff;
    transition: color 0.4s ease;
    filter: drop-shadow(0 0 2px #82aaff);
}

.text-neon:hover {
    color: #a3c0ff;
    filter: drop-shadow(0 0 4px #a3c0ff);
}

.border-neon {
    border: 2px solid #82aaff !important;
    transition: border-color 0.4s ease, background-color 0.4s ease;
    background: linear-gradient(135deg, rgba(130,170,255,0.15), rgba(93,127,202,0.15));
    border-radius: 16px;
}

.border-neon:hover {
    border-color: #a3c0ff !important;
    background: linear-gradient(135deg, rgba(163,192,255,0.25), rgba(120,150,210,0.25));
}

.card {
    background-color: #1e272e;
    border-radius: 16px;
   padding: 1.5rem;
    color: #cfd8dc;
    transition: transform 0.4s ease, background-color 0.4s ease;
    cursor: default;
    will-change: transform;
    background-image: linear-gradient(145deg, #202a35, #1a2128);
}
.card i {
    font-size: 2rem !important;
}
.card h6.card-title {
    font-size: 0.9rem !important;
}

.card h3 {
    font-size: 1.5rem !important;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    background-color: #283746;
    background-image: linear-gradient(145deg, #3a4a7a, #2e3b5f);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    color: #82aaff;
    letter-spacing: 1.6px;
    user-select: none;
    transition: color 0.4s ease;
}

.navbar-brand:hover {
    color: #a3c0ff;
}

@media (max-width: 768px) {
    .card {
        padding: 1.8rem;
        margin: 1rem 0.5rem;
    }
    .navbar-brand {
        font-size: 1.3rem;
    }
    main {
        padding: 0 1rem;
    }
}

#wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    transition: all 0.4s ease;
}

#wrapper, #page-content-wrapper {
    position: relative;
    z-index: 1;
}

#page-content-wrapper {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 70px;
    scroll-behavior: smooth;
}

/* Sidebar styles */
#sidebar-wrapper {
    width: 250px;
    min-height: 100vh;
    background-color: #161d24;
    transition: margin-left 0.4s ease, background-color 0.4s ease;
    background-image: linear-gradient(180deg, #161d24, #222e3a);
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: -250px;
}

/* Sidebar links and dropdown toggle */
.sidebar .dropdown-toggle,
.sidebar a {
    color: #82aaff;
    font-weight: 600;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    display: block;
    margin-bottom: 0.4rem;
    user-select: none;
}

.sidebar a:hover,
.sidebar .dropdown-toggle:hover {
    background-color: #324a66;
    color: #a3c0ff;
    text-decoration: none;
}

/* Dropdown menu */
.dropdown-menu {
    background-color: #1f2a3b;
    border-radius: 12px;
    border: none;
    margin-top: 0.2rem;
    padding: 0.3rem 0;
    font-size: 1rem;
    user-select: none;
}

.dropdown-item {
    color: #a3c0ff;
    padding: 0.45rem 1.5rem;
    transition: background-color 0.25s ease, color 0.25s ease;
    border-radius: 8px;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: #4b67a1;
    color: #f0f6fc;
    text-decoration: none;
}

@media (max-width: 992px) {
    #sidebar-wrapper {
        margin-left: -250px;
    }
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
}

/* Neon button */
.btn-neon {
    background: linear-gradient(135deg, #82aaff, #5d7fca);
    border: none;
    color: #121518 !important;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.85rem 1.8rem;
    font-size: 1.15rem;
    cursor: pointer;
    transition: background-position 0.5s ease, transform 0.3s ease;
    background-size: 200% 200%;
    background-position: left center;
    user-select: none;
    filter: drop-shadow(0 2px 4px rgba(130,170,255,0.4));
}

.btn-neon:hover {
    background-position: right center;
    background-color: #5d7fca;
    color: #f0f6fc;
    transform: scale(1.08);
}

input.form-control {
    background-color: #2a3640;
    border: 1.5px solid transparent;
    color: #cfd8dc;
    border-radius: 10px;
    padding: 0.75rem 1.2rem;
    font-size: 1.05rem;
    transition: border-color 0.4s ease, background-color 0.4s ease;
    user-select: text;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
}

input.form-control::placeholder {
    color: #7a8ca6;
    font-style: italic;
    user-select: none;
}

input.form-control:focus {
    background-color: #394a65;
    border-color: #82aaff;
    outline: none;
    color: #f0f6fc;
}

.text-danger {
    color: #ff6b6b !important;
}

.alert-danger {
    background-color: rgba(255, 107, 107, 0.2);
    border: 1.5px solid #ff6b6b;
    color: #ff6b6b;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

footer {
    flex-shrink: 0;
    height: 60px;
    background: #161d24;
    color: #82aaff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    user-select: none;
}

#menu-toggle {
    transition: transform 0.4s ease, color 0.4s ease;
    cursor: pointer;
    user-select: none;
}

#menu-toggle:hover {
    transform: rotate(90deg) scale(1.1);
    color: #a3c0ff;
}

.logo-rounded {
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    object-fit: cover;
    width: 60px;  /* زودنا الحجم */
    height: 60px;
}




.car-front-card {
    position: relative;
    background-color: #28a745; /* أخضر واضح وثابت */
    border-radius: 50px 50px 35px 35px / 80px 80px 30px 30px;
    padding: 2rem 2.5rem 3rem;
    box-shadow:
        0 12px 25px rgba(0, 204, 0, 0.7),
        inset 0 -5px 15px rgba(0, 255, 0, 0.6);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: visible;
    margin: 0 30px 12px 30px; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-image: none;
}

.car-front-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 25px 40px rgba(25, 135, 48, 0.85),
        inset 0 -6px 20px rgba(25, 135, 48, 0.8);
    background-image: none;
}

/* أضواء أمامية */
.headlight {
    position: absolute;
    top: 35px;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at center, #fefef8 0%, #f5ea92 65%, #bfa936 95%);
    border-radius: 50%;
    box-shadow:
        0 0 18px 6px rgba(255, 255, 130, 0.8),
        inset 0 0 10px rgba(255, 255, 180, 0.8);
    border: 2px solid #fff7b1;
    filter: drop-shadow(0 0 10px rgba(255, 255, 150, 0.9));
    transition: background 0.3s ease;
    z-index: 10;
}

.headlight.left {
    left: 25px;
}

.headlight.right {
    right: 25px;
}

.car-front-card:hover .headlight {
    background: radial-gradient(circle at center, #fffef0 0%, #fff660 85%, #d1bc00 100%);
    box-shadow:
        0 0 30px 12px rgba(255, 255, 220, 1),
        inset 0 0 16px rgba(255, 255, 220, 1);
}

/* مرايا جانبية */
.side-mirror {
    position: absolute;
    top: 65px;
    width: 28px;
    height: 48px;
    background: linear-gradient(135deg, #3a5a3a, #5b7a5b);
    border-radius: 12px 20px 25px 12px / 25px 30px 35px 30px;
    box-shadow:
        inset 0 3px 8px rgba(255, 255, 255, 0.35),
        0 2px 6px rgba(30, 40, 55, 0.5);
    border: 1.3px solid #2a3d2a;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    z-index: 9;
}

.side-mirror.left {
    left: -38px;
    transform: rotate(-12deg);
    background: linear-gradient(135deg, #2e4a2e, #4b664b);
    box-shadow:
        inset 0 3px 9px rgba(255, 255, 255, 0.4),
        0 3px 9px rgba(20, 30, 45, 0.6);
}

.side-mirror.right {
    right: -38px;
    transform: rotate(12deg);
    background: linear-gradient(45deg, #2e4a2e, #4b664b);
    box-shadow:
        inset 0 3px 9px rgba(255, 255, 255, 0.4),
        0 3px 9px rgba(20, 30, 45, 0.6);
}

.car-front-card:hover .side-mirror {
    background: linear-gradient(135deg, #497749, #8ab08a);
    box-shadow:
        inset 0 5px 12px rgba(255, 255, 255, 0.55),
        0 5px 13px rgba(30, 50, 75, 0.75);
}

/* لوحة الأرقام */
.plate {
    position: relative;
    background: linear-gradient(145deg, #e7e7e7, #bdbdbd);
    width: 200px;
    height: 75px;
    border-radius: 22px 22px 14px 14px / 36px 36px 22px 22px;
    box-shadow:
        inset 0 4px 12px rgba(255, 255, 255, 0.8),
        0 6px 15px rgba(0, 0, 0, 0.22);
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    transition: box-shadow 0.3s ease;
    z-index: 12;
}

.car-front-card:hover .plate {
    box-shadow:
        inset 0 6px 18px rgba(255, 255, 255, 0.9),
        0 0 20px rgba(0, 0, 0, 0.28);
}

.brand-name {
    font-weight: 900;
    font-size: 1.8rem;
    color: #222;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 0 2px 5px rgba(255, 255, 255, 0.85);
}

/* الشبك الأمامي */
.grille {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 25px;
    border-radius: 15px 15px 8px 8px / 18px 18px 10px 10px;
    background: repeating-linear-gradient(45deg,
            #274927,
            #274927 4px,
            #1b2f1b 4px,
            #1b2f1b 8px);
    box-shadow:
        inset 0 2px 6px rgba(255, 255, 255, 0.12),
        0 2px 5px rgba(0, 0, 0, 0.45);
    z-index: 8;
}

/* أزرار تعديل وحذف */
.actions .btn {
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

/* زر التعديل - أخضر مشبع وواضح */
.btn-edit {
    background: #198754; /* أخضر أكثر حيوية */
    color: white;
    box-shadow: 0 6px 15px rgba(25, 135, 84, 0.7);
    border: 1.5px solid #145c32;
}

.btn-edit:hover {
    background: #145c32; /* أخضر داكن عند التحويم */
    box-shadow: 0 8px 20px rgba(20, 90, 40, 0.9);
}

/* زر الحذف - أحمر أكثر تشبعًا */
.btn-delete {
    background: #dc3545; /* أحمر أحمر أكثر وضوحًا */
    color: white;
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.7);
    border: 1.5px solid #7b1a21;
}

.btn-delete:hover {
    background: #7b1a21; /* أحمر داكن عند التحويم */
    box-shadow: 0 8px 20px rgba(123, 26, 33, 0.9);
}

.btn i {
    font-size: 1.1rem;
}


/* Responsive */

/* Extra small phones (under 360px) */
@media (max-width: 359px) {
    .car-front-card {
        padding: 1.2rem 1.5rem 2rem;
        min-height: 120px;
        margin: 0 12px 10px 12px;
        transform: scale(0.9);
    }

    .headlight {
        width: 30px;
        height: 30px;
        top: 20px;
    }

    .headlight.left {
        left: 15px;
    }

    .headlight.right {
        right: 15px;
    }

    .side-mirror {
        width: 18px;
        height: 32px;
        top: 40px;
    }

    .side-mirror.left {
        left: -25px;
        transform: rotate(-10deg);
    }

    .side-mirror.right {
        right: -25px;
        transform: rotate(10deg);
    }

    .plate {
        width: 130px;
        height: 50px;
    }

    .brand-name {
        font-size: 1.1rem !important;
        letter-spacing: 1.5px !important;
    }

    .grille {
        width: 100px;
        height: 15px;
        bottom: 12px;
    }

    .actions .btn {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
}

/* Small phones (360px to 480px) */
@media (min-width: 360px) and (max-width: 480px) {
    .car-front-card {
        padding: 1.5rem 2rem 2.5rem;
        min-height: 140px;
        margin: 0 20px 12px 20px;
        transform: scale(0.95);
    }

    .headlight {
        width: 40px;
        height: 40px;
        top: 28px;
    }

    .headlight.left {
        left: 20px;
    }

    .headlight.right {
        right: 20px;
    }

    .side-mirror {
        width: 22px;
        height: 38px;
        top: 50px;
    }

    .side-mirror.left {
        left: -32px;
        transform: rotate(-11deg);
    }

    .side-mirror.right {
        right: -32px;
        transform: rotate(11deg);
    }

    .plate {
        width: 160px;
        height: 60px;
    }

    .brand-name {
        font-size: 1.4rem !important;
        letter-spacing: 2px !important;
    }

    .grille {
        width: 130px;
        height: 18px;
        bottom: 15px;
    }

    .actions .btn {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
}

/* Medium phones (481px to 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .car-front-card {
        padding: 1.8rem 2.5rem 3rem;
        min-height: 150px;
        margin: 0 25px 12px 25px;
        transform: scale(1);
    }

    .headlight {
        width: 45px;
        height: 45px;
        top: 32px;
    }

    .headlight.left {
        left: 23px;
    }

    .headlight.right {
        right: 23px;
    }

    .side-mirror {
        width: 26px;
        height: 44px;
        top: 58px;
    }

    .side-mirror.left {
        left: -36px;
        transform: rotate(-12deg);
    }

    .side-mirror.right {
        right: -36px;
        transform: rotate(12deg);
    }

    .plate {
        width: 180px;
        height: 70px;
    }

    .brand-name {
        font-size: 1.6rem !important;
        letter-spacing: 2.5px !important;
    }

    .grille {
        width: 150px;
        height: 22px;
        bottom: 17px;
    }

    .actions .btn {
        font-size: 0.8rem;
        padding: 5px 14px;
    }



.btn-add-brand {
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-add-brand:hover {
    background-color: #2ecc71; 
    box-shadow: 0 6px 18px rgba(46, 204, 113, 0.75);
}

.custom-pagination .page-item .page-link {
    color: #fff;
    background-color: #343a40; 
    border: 1px solid #555;
    margin: 0 4px;
    border-radius: 8px;
    transition: 0.3s ease;
}

.custom-pagination .page-item.active .page-link {
    background-color: #dc3545; 
    border-color: #dc3545;
}

.custom-pagination .page-item .page-link:hover {
    background-color: #495057;
    color: #fff;
}

}
        .card-filter-btn {
            cursor: pointer;
            border: 2px solid #66ff66;
            padding: 0.5rem 1rem;
            border-radius: 25px;
            margin: 0.3rem;
            color: #66ff66;
            transition: all 0.3s;
            display: inline-block;
        }

        .card-filter-btn:hover,
        .card-filter-btn.active {
            background-color: #66ff66;
            color: #000;
        }

        .filter-form {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .filter-form .submit-btn {
            margin-left: auto;
            margin-top: 0.5rem;
        }

         /* Change dropdown text color */
    .select2-results__option {
        color: #000; /* Black text */
    }

    /* Change selected item text color */
    .select2-selection__rendered {
        color: #000 !important; /* Black text */
    }

    /* Change placeholder color */
    .select2-selection__placeholder {
        color: #777 !important; /* Gray placeholder */
    }

    /* Change background when hovered */
    .select2-results__option--highlighted {
        background-color: #007bff !important; /* Blue hover */
        color: #fff !important; /* White text on hover */
    }

            .chat-page {
            display: flex;
            flex-direction: column;
            height: 100vh;
        }

        .chat-header {
            padding: 15px 20px;
            background-color: #0d6efd;
            color: white;
        }

        .chat-body {
            flex: 1;
            overflow-y: auto;
            background-color: #f0f0f0;
            padding: 20px;
        }

        .chat-footer {
            padding: 15px 20px;
            background-color: #fff;
            border-top: 1px solid #ccc;
        }

        .chat-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .chat-message-wrapper {
            display: flex;
            flex-direction: column;
        }

        .message-bubble {
            max-width: 70%;
            padding: 10px 14px;
            border-radius: 15px;
            word-break: break-word;
            color: #000 !important;
            /* force black text */

            font-size: 14px;
            line-height: 1.4;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .message-out {
            background-color: #d1e7dd;
            align-self: flex-end;
        }

        .message-in {
            background-color: #ffffff;
            align-self: flex-start;
        }

        .message-meta {
            font-size: 11px;
            color: #6c757d;
            margin-top: 4px;
        }

        .message-media img,
        .message-media video {
            max-width: 250px;
            margin-top: 8px;
            border-radius: 8px;
        }

        textarea.form-control {
            resize: none;
        }

        input.form-control-file {
            max-width: 160px;
        }

        @media (max-width: 768px) {
            .message-bubble {
                max-width: 90%;
            }
        }

    

    @media (max-width: 576px) {
#sidebar {
        display: none !important; /* Hide sidebar completely */
    }
        #page-content-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }

    .dashboard-card {
        max-width: 95%; /* Make the card smaller */
        margin-left: auto;
    }
     .filter-form .form-check {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
    }
    .export{
        margin-left: 120px;
    }
     .chart-card {
        max-width: 95%;
        margin-left:  auto;
    }
    .chart-container {
        max-width: 260px;
        height: 180px;
    }

     #sidebar {
        position: absolute;
        width: 220px; /* or your sidebar width */
        left: -220px; /* Hide off-screen */
        transition: left 0.3s ease;
    }

    #sidebar.active {
        left: 0; /* Slide in when toggled */
    }

    #page-content-wrapper {
        margin-left: 0 !important;
    }

    
    

}
