/* Car Rental Management - Custom Styles */

/* RTL Support */
[dir="rtl"] .rtl\:translate {
    transform: scaleX(-1);
}

[dir="rtl"] .rtl\:rotate-180 {
    transform: rotate(180deg);
}

[dir="rtl"] .rtl\:kt-toggle-active\:rotate-0.kt-toggle-active {
    transform: rotate(0deg) !important;
}

/* Sidebar Width */
/* .kt-sidebar {
    width: 280px;
    transition: width 0.3s ease;
}

.kt-sidebar-collapse .kt-sidebar {
    width: 80px;
} */

/* Content Adjustment */
/* .wrapper {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

[dir="rtl"] .wrapper {
    margin-left: 0;
    margin-right: 280px;
    transition: margin-right 0.3s ease;
}

.kt-sidebar-collapse .wrapper {
    margin-left: 80px;
}

[dir="rtl"].kt-sidebar-collapse .wrapper {
    margin-left: 0;
    margin-right: 80px;
} */

/* Menu Dropdown Positioning */
.menu-dropdown {
    position: absolute;
    z-index: 105;
    display: none;
    margin-top: 0.5rem;
}

.menu-dropdown.show {
    display: block;
}

.menu[data-kt-menu-placement="bottom-end"] .menu-dropdown {
    right: 0;
}

[dir="rtl"] .menu[data-kt-menu-placement="bottom-end"] .menu-dropdown {
    right: auto;
    left: 0;
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    min-width: 800px;
}

/* Card Spacing */
.card {
    margin-bottom: 0;
}

.card + .card {
    margin-top: 1.25rem;
}

/* Form Spacing */
.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    margin-bottom: 0;
}

/* Button Groups */
.flex.gap-2 > .kt-btn {
    white-space: nowrap;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 0;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: rgb(22, 163, 74);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: rgb(220, 38, 38);
}

/* Badge Improvements */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
    white-space: nowrap;
}

.badge-primary {
    background-color: rgba(59, 130, 246, 0.1);
    color: rgb(37, 99, 235);
}

.badge-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: rgb(22, 163, 74);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: rgb(220, 38, 38);
}

.badge-warning {
    background-color: rgba(251, 191, 36, 0.1);
    color: rgb(217, 119, 6);
}

.badge-info {
    background-color: rgba(14, 165, 233, 0.1);
    color: rgb(3, 105, 161);
}

.badge-light {
    background-color: rgba(148, 163, 184, 0.1);
    color: rgb(100, 116, 139);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}

/* Mobile Responsiveness */
/* @media (max-width: 1023px) {
    .kt-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    [dir="rtl"] .kt-sidebar {
        transform: translateX(0%);
    }

    .kt-sidebar.show {
        transform: translateX(0);
    }

    .wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
} */

/* Fixed Height for Content */
.content {
    min-height: calc(100vh - 60px - 60px); /* viewport - header - footer */
}

/* Table Cell Alignment */
.table td,
.table th {
    vertical-align: middle;
    padding: 0.75rem 1rem;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

/* Status Colors */
.text-success { color: rgb(22, 163, 74); }
.text-danger { color: rgb(220, 38, 38); }
.text-warning { color: rgb(217, 119, 6); }
.text-info { color: rgb(3, 105, 161); }
.text-primary { color: rgb(37, 99, 235); }

/* Hover States */
.kt-btn:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.kt-btn:active {
    transform: translateY(0);
}

/* Loading States */
.kt-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Focus States */
.form-control:focus,
.form-select:focus,
.form-checkbox:focus,
.form-radio:focus {
    outline: 2px solid rgb(59, 130, 246);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .kt-sidebar,
    header,
    footer,
    .no-print {
        display: none !important;
    }

    .wrapper {
        margin: 0 !important;
    }

    .content {
        padding: 0 !important;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.kt-scrollable::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.kt-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.kt-scrollable::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}

.kt-scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* Grid Improvements */
.grid {
    gap: 1.25rem;
}

/* Card Header */
.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: rgb(148, 163, 184);
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

img.h-15,
.img-fluid.h-15 {
    height: calc(var(--spacing) * 15);
}

/* Text Truncate */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Z-index Management */
.kt-sidebar { z-index: 20; }
header { z-index: 15; }
.menu-dropdown { z-index: 105; }
.modal { z-index: 1000; }

/* Transition Classes */
.transition-all {
    transition: all 0.3s ease;
}

/* ── Sidebar Logo (replaces Tailwind arbitrary classes) ────────────────── */
.sidebar-logo {
    min-height: 22px;
    max-width: 8rem;
    height: auto;
}

/* ── Souqi Brand Colors ────────────────────────────────────────────────── */

/* Primary color: buttons, links, active states, badges */
:root,
.dark {
    --primary: #1fa365;
    --primary-foreground: #ffffff;
}

/* Sidebar specific background — overrides .dark bg-background on .kt-sidebar only */
.kt-sidebar {
    --background: #0e251d;
}

/* Ensure sidebar border blends with the dark green */
.kt-sidebar {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

