* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #1e293b;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform 0.3s ease-in-out;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar-header img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

.sidebar-header span {
    font-size: 18px;
    font-weight: 600;
}

.sidebar .nav {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.sidebar .nav-item {
    margin: 4px 10px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar .nav-link.active {
    background: #2563eb;
    color: #fff;
}

.sidebar .nav-link i {
    font-size: 20px;
}

.sidebar .nav-link .badge {
    margin-left: auto;
    font-size: 11px;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.sidebar-footer .user-info i {
    font-size: 20px;
    color: #64748b;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.logout-link:hover {
    color: #dc2626;
}

.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 30px;
    min-height: 100vh;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s;
}

.overlay.active {
    display: block;
    opacity: 1;
}

.mobile-header {
    display: none;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #1e293b;
    color: #fff;
    padding: 0 15px;
    z-index: 1035;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.btn-menu {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    padding: 8px;
    cursor: pointer;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}

.mobile-brand img {
    width: 28px;
    height: 28px;
}

.mobile-brand span {
    font-size: 16px;
    font-weight: 600;
}

.mobile-user {
    margin-left: auto;
    font-size: 22px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    color: #fff;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

.stat-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.stat-success { background: linear-gradient(135deg, #16a34a, #15803d); }
.stat-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-info { background: linear-gradient(135deg, #64748b, #475569); }
.stat-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); }

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background: #fff;
}

.card-body {
    padding: 20px;
}

.asset-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.asset-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.asset-img {
    height: 100px;
    object-fit: cover;
    background: #f8fafc;
}

.asset-img-placeholder {
    height: 100px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 2rem;
}

.login-page {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header img {
    margin-bottom: 15px;
}

.login-header h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        left: 0;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 70px 15px 15px;
    }

    .mobile-header {
        display: flex;
    }

    body.menu-active {
        overflow: hidden;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 70px 10px 10px;
    }

    .card-body {
        padding: 12px;
    }

    .asset-img,
    .asset-img-placeholder {
        height: 70px;
    }
    
    .asset-card .card-body {
        padding: 8px;
    }
    
    .asset-card .card-title {
        font-size: 12px;
    }
    
    .asset-card .card-text {
        font-size: 10px;
    }
}
