/* Fleet ERM — Custom Styles */

/* Sidebar */
#sidebar-wrapper {
    min-height: 100vh;
    width: 240px;
    min-width: 240px;
    transition: width 0.2s ease, min-width 0.2s ease;
}

#wrapper.sidebar-hidden #sidebar-wrapper {
    width: 0;
    min-width: 0;
    overflow: hidden;
}

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

#sidebar-wrapper .list-group-item {
    border: none;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    transition: background-color 0.15s ease;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

#sidebar-wrapper .list-group-item.active {
    background-color: rgba(13, 110, 253, 0.25) !important;
    border-left: 3px solid #0d6efd;
    font-weight: 600;
}

/* Page content wrapper */
#page-content-wrapper {
    min-width: 0;
    overflow-x: auto;
}

/* Cards */
.card {
    border-radius: 0.5rem;
}

/* Tables */
.table th {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
}

/* Badge enhancements */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
}

/* Form check cards (service form) */
.form-check.card,
.card.p-3.border {
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card.p-3.border:hover {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.1rem rgba(13, 110, 253, 0.2);
}

/* Pagination */
.pagination .page-link {
    font-size: 0.85rem;
}

/* Responsive adjustments — mobile sidebar */
@media (max-width: 768px) {
    /* Sidebar overlays content, hidden off-screen by default */
    #sidebar-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 1050;
        width: 240px;
        min-width: 240px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    /* Visible when wrapper has sidebar-open class */
    #wrapper.sidebar-open #sidebar-wrapper {
        transform: translateX(0);
    }

    /* Page content always full width on mobile */
    #page-content-wrapper {
        width: 100%;
        min-width: 0;
    }
}

/* Sidebar overlay backdrop (mobile only) */
#sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

#wrapper.sidebar-open #sidebar-backdrop {
    display: block;
}

/* Alert enhancements */
.alert ul {
    padding-left: 1.2rem;
}

/* Summary card icon circles */
.rounded-circle {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Login page */
.card-body.p-5 .bi-truck {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Font monospace plates */
.font-monospace {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    letter-spacing: 0.05em;
}

/* Hover row highlight */
.table-hover tbody tr:hover td {
    background-color: rgba(13, 110, 253, 0.04);
}
