/*
* Sidebar Styles
*/

:root {
    --rp-blue: #0056b3;
    --rp-blue-light: #0d6efd;
    --rp-blue-dark: #003d7f;
    --rp-green: #00a862;
    --rp-green-light: #00c278;
    --rp-green-dark: #00844e;
}

body {
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -15rem;
    transition: margin 0.25s ease-out;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(34, 39, 46, 0.15);
    z-index: 1000;
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.2rem 1.25rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#sidebar-wrapper .list-group {
    width: 15rem;
}

#sidebar-wrapper .list-group-item {
    padding: 0.8rem 1.25rem;
    border: none;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-left-color: white !important;
}

#page-content-wrapper {
    min-width: 100vw;
    background-color: #f5f8fa;
}

body.sb-sidenav-toggled #sidebar-wrapper {
    margin-left: 0;
}

.list-group-item.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: transparent !important;
    color: white !important;
    font-weight: 500;
    border-left-color: white !important;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    body.sb-sidenav-toggled #sidebar-wrapper {
        margin-left: -15rem;
    }
}

/*
* Card styles for app dashboard
*/
.app-icon {
    color: var(--rp-blue);
}

.card {
    transition: transform 0.2s ease;
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(34, 39, 46, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    font-weight: 500;
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    background-color: var(--rp-blue-light) !important;
    color: white !important;
}

.card .table {
    margin-bottom: 0;
}

.card .table th {
    font-weight: 600;
    color: var(--rp-blue-dark) !important;
}

.card .table-responsive {
    overflow-x: auto;
}

/*
* Form styles
*/
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--rp-blue);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.btn-group .btn {
    margin-right: 0.25rem;
}

.btn {
    font-weight: 500;
}

/*
* Table styles
*/
.table-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.table thead {
    background-color: var(--rp-blue-light) !important;
    color: white !important;
}

.table th {
    font-weight: 600;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10rem;
}

.status-new {
    background-color: #cfe2ff;
    color: #084298;
}

.status-inprogress {
    background-color: #fff3cd;
    color: #664d03;
}

.status-completed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #842029;
}

/* Works Order Styles */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

/* General Styles */
.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

.navbar {
    padding: 0.5rem 1rem;
}

.navbar-light {
    background-color: #f5f8fa !important;
}

/* Color Overrides */
.btn-primary, .bg-primary {
    background-color: var(--rp-blue) !important;
    border-color: var(--rp-blue) !important;
}

.btn-primary:hover {
    background-color: var(--rp-blue-dark) !important;
    border-color: var(--rp-blue-dark) !important;
}

.btn-success, .bg-success {
    background-color: var(--rp-green) !important;
    border-color: var(--rp-green) !important;
}

.btn-success:hover {
    background-color: var(--rp-green-dark) !important;
    border-color: var(--rp-green-dark) !important;
}

.text-primary {
    color: var(--rp-blue) !important;
}

.text-success {
    color: var(--rp-green) !important;
}

.btn-outline-primary {
    color: var(--rp-blue);
    border-color: var(--rp-blue);
}

.btn-outline-primary:hover {
    background-color: var(--rp-blue);
    border-color: var(--rp-blue);
}

.btn-outline-success {
    color: var(--rp-green);
    border-color: var(--rp-green);
}

.btn-outline-success:hover {
    background-color: var(--rp-green);
    border-color: var(--rp-green);
}

/* Sidebar overrides for solid blue */
#sidebar-wrapper .list-group-item {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

#sidebar-wrapper .list-group-item:hover {
    color: white !important;
}

#systemMenu .list-group-item {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

#systemMenu .list-group-item:hover {
    background-color: rgba(0, 0, 0, 0.2) !important;
}