body {
    background-color: #f3f5fb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#sidebar-wrapper {
    min-width: 250px;
    max-width: 250px;
    background-color: #ffffff;
    box-shadow: 2px 0 18px rgba(15, 23, 42, 0.06);
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: -230px;
}

#page-content-wrapper {
    flex: 1 1 auto;
    width: 100%;
    min-height: 100vh;
}

.bg-sidebar {
    background-color: #ffffff;
}

.sidebar-heading {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #4b5563;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #22c55e);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    color: #4b5563;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    margin: 0.15rem 0.75rem;
    text-decoration: none;
}

.sidebar-nav .nav-link .icon {
    width: 22px;
    text-align: center;
}

.sidebar-nav .nav-link:hover {
    background-color: #eef2ff;
    color: #4338ca;
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
    transition: all 0.15s ease;
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, #6366f1, #22c55e);
    color: #ffffff;
}

.sidebar-logout-link {
    margin-top: auto;
    color: #b91c1c;
}

.card {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.stat-card {
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.stat-card-assets { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
.stat-card-employees { background: rgba(16, 185, 129, 0.12); color: #059669; }
.stat-card-vendors { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.stat-card-departments { background: rgba(234, 179, 8, 0.12); color: #a16207; }

/* Dashboard hero and charts */
.dashboard-hero {
    background: linear-gradient(135deg, #6366f1, #22c55e);
    color: #ffffff;
    border-radius: 1.25rem;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
    margin-bottom: 1.75rem;
}

.dashboard-hero-title {
    font-size: 1.45rem;
    font-weight: 600;
}

.dashboard-hero-subtitle {
    opacity: 0.9;
    font-size: 0.9rem;
}

.dashboard-hero-meta {
    font-size: 0.8rem;
    opacity: 0.9;
}

.dashboard-hero-pill {
    background-color: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.chart-card {
    min-height: 260px;
}

.asset-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    background-color: #eef2ff;
    color: #4f46e5;
}

body.theme-dark .asset-meta-badge {
    background-color: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
}

.card-header {
    border-bottom: 0;
    background-color: transparent;
}

.table thead th {
    background-color: #f1f3f5;
}

/* Layout refinement */
.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-title h4 {
    margin: 0;
    font-weight: 600;
}

.page-title .breadcrumb {
    margin-bottom: 0;
}

.card-form {
    max-width: 100%;
}

.card-form .card-body {
    padding: 1.75rem;
}

.form-label {
    font-weight: 500;
}

.form-control,
.form-select {
    border-radius: 0.35rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.topbar {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.top-search {
    max-width: 420px;
    border-radius: 999px;
    background-color: #f9fafb;
    border-color: transparent;
    padding-inline: 1.25rem;
}

.top-search:focus {
    background-color: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.main-content {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.badge-status-available {
    background-color: #d1e7dd;
    color: #0f5132;
}

.badge-status-assigned {
    background-color: #cff4fc;
    color: #055160;
}

.badge-status-maintenance {
    background-color: #fff3cd;
    color: #664d03;
}

.badge-status-retired {
    background-color: #f8d7da;
    color: #842029;
}

/* Login page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #e0f2fe 0, transparent 50%),
                radial-gradient(circle at bottom right, #e0e7ff 0, transparent 50%),
                #f3f5fb;
}

.login-card {
    border-radius: 1.5rem;
    padding: 2.25rem 2.5rem;
    background: linear-gradient(145deg, #ffffff, #f9fafb);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.24);
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.login-brand-badge {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #22c55e);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4);
}

.login-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.login-subtitle {
    font-size: 0.9rem;
}

body.theme-dark .login-wrapper {
    background: radial-gradient(circle at top left, #1e293b 0, transparent 55%),
                radial-gradient(circle at bottom right, #0f172a 0, transparent 55%),
                #020617;
}

body.theme-dark .login-card {
    background: radial-gradient(circle at top left, #020617, #0f172a);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 1);
}
/* Dark theme overrides */
body.theme-dark {
    background-color: #020617;
    color: #f9fafb;
}

body.theme-dark #sidebar-wrapper {
    background-color: #020617;
    box-shadow: 2px 0 18px rgba(15, 23, 42, 0.9);
}

body.theme-dark .bg-sidebar {
    background-color: #020617;
}

body.theme-dark .sidebar-heading {
    border-bottom-color: rgba(148, 163, 184, 0.3);
    color: #e5e7eb;
}

body.theme-dark .sidebar-nav .nav-link {
    color: #9ca3af;
}

body.theme-dark .sidebar-nav .nav-link:hover {
    background: linear-gradient(135deg, #4f46e5, #22c55e);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.8);
}

body.theme-dark .sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, #4f46e5, #22c55e);
    color: #ffffff;
}

body.theme-dark .topbar {
    background-color: #020617;
    border-bottom-color: rgba(15, 23, 42, 0.9);
}

body.theme-dark .top-search {
    background-color: #0f172a;
    color: #e5e7eb;
}

body.theme-dark .card {
    background-color: #020617;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

body.theme-dark .card-header {
    color: #f9fafb;
}

body.theme-dark .table {
    color: #e5e7eb;
}

body.theme-dark .table thead th {
    background-color: #020617;
    border-bottom-color: rgba(148, 163, 184, 0.35);
}

body.theme-dark .page-title h4 {
    color: #e5e7eb;
}

body.theme-dark .dashboard-hero {
    box-shadow: 0 24px 50px rgba(15, 23, 42, 1);
    color: #f9fafb;
}

body.theme-dark .stat-card-icon {
    background-color: rgba(15, 23, 42, 0.7);
}

body.theme-dark .text-muted {
    color: #9ca3af !important;
}

body.theme-dark .list-group-item {
    background-color: transparent;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.35);
}

body.theme-dark .stat-card .text-muted,
body.theme-dark .stat-card .text-uppercase {
    color: #e5e7eb !important;
}

body.theme-dark .stat-card h3 {
    color: #f9fafb;
}

