/* FleetERP Admin - Custom Styles */

/* === Layout === */
html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.main-layout {
    height: 100vh;
    overflow: hidden;
}

/* === Sidebar === */
.sidebar {
    background: linear-gradient(180deg, #1e3a5f 0%, #152238 100%);
    color: #fff;
}

.sidebar-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* DevExpress Drawer customization */
.dxbl-drawer-panel {
    background: linear-gradient(180deg, #1e3a5f 0%, #152238 100%) !important;
}

/* Nav Menu */
.nav-menu {
    background: transparent !important;
}

.nav-menu .dxbl-menu-item {
    color: rgba(255,255,255,0.8) !important;
    border-radius: 8px;
    margin: 2px 8px;
}

.nav-menu .dxbl-menu-item:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
}

.nav-menu .dxbl-menu-item.dxbl-active {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}

.nav-menu .dxbl-menu-item .dxbl-menu-item-icon {
    color: rgba(255,255,255,0.7) !important;
}

/* === Main Content === */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: #f8f9fa;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    background: #f8f9fa;
}

/* === Cards === */
.dxbl-card {
    border-radius: 12px !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dxbl-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* === Grid === */
.dxbl-grid {
    border-radius: 12px !important;
    overflow: hidden;
}

.dxbl-grid-header-row {
    background: #f8f9fa !important;
}

.dxbl-grid-header-cell {
    font-weight: 600 !important;
    color: #495057 !important;
}

/* === Badges === */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    font-size: 0.8em;
}

.badge.font-monospace {
    letter-spacing: 1px;
}

/* Custom badge colors */
.bg-purple {
    background-color: #6f42c1 !important;
}

.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.1) !important;
}

.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

/* === Buttons === */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
}

/* === Tabs === */
.dxbl-tabs-panel {
    border-bottom: 2px solid #e9ecef;
}

.dxbl-tabs-tab.dxbl-active {
    border-bottom: 2px solid #0d6efd !important;
    margin-bottom: -2px;
}

/* Bootstrap nav-tabs styling for better visibility */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #495057;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item .nav-link.active,
.nav-tabs .nav-item.show .nav-link,
.nav-tabs button.nav-link.active,
.nav-tabs a.nav-link.active,
.nav.nav-tabs .nav-link.active {
    color: #ffffff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd #0d6efd #0d6efd !important;
    border-bottom-color: #0d6efd !important;
    border-radius: 4px 4px 0 0;
    --bs-nav-tabs-link-active-color: #ffffff;
    --bs-nav-tabs-link-active-bg: #0d6efd;
    --bs-nav-tabs-link-active-border-color: #0d6efd;
}

/* === Forms === */
.dxbl-text-edit {
    border-radius: 8px !important;
}

/* === Popup === */
.dxbl-popup {
    border-radius: 16px !important;
}

.dxbl-popup-header {
    background: #f8f9fa !important;
    border-radius: 16px 16px 0 0 !important;
}

.dxbl-popup-footer {
    background: #f8f9fa !important;
    border-radius: 0 0 16px 16px !important;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* === Dropdown === */
.dxbl-dropdown-body {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* === Utilities === */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === Responsive === */
@media (max-width: 768px) {
    .content-area {
        padding: 1rem !important;
    }
    
    h1.h3 {
        font-size: 1.25rem;
    }
}

/* === Loading === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* === Animation === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}
