:root {
    --ems-primary: #7a1f1f;
    --ems-primary-dark: #5c1717;
    --ems-bg: #f4f5f7;
}

body {
    background-color: var(--ems-bg);
}

.app-navbar {
    background: linear-gradient(90deg, var(--ems-primary-dark), var(--ems-primary));
    height: 56px;
}

.app-wrapper {
    display: flex;
    min-height: calc(100vh - 56px);
}

.app-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e2e2e2;
    padding: 1rem 0;
}

.app-sidebar .nav-section {
    font-size: .72rem;
    text-transform: uppercase;
    color: #999;
    font-weight: 700;
    padding: .9rem 1.2rem .3rem;
}

.app-sidebar .nav-link {
    color: #333;
    padding: .5rem 1.2rem;
    font-size: .92rem;
    border-left: 3px solid transparent;
}

.app-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 6px;
    color: var(--ems-primary);
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
    background: #f7ecec;
    border-left-color: var(--ems-primary);
    color: var(--ems-primary-dark);
    font-weight: 600;
}

.app-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 100%;
    overflow-x: auto;
}

.card-stat {
    border: none;
    border-radius: .6rem;
    color: #fff;
}

.card-stat.bg-primary-custom { background: linear-gradient(135deg, var(--ems-primary), var(--ems-primary-dark)); }

.btn-primary-custom {
    background-color: var(--ems-primary);
    border-color: var(--ems-primary);
    color: #fff;
}
.btn-primary-custom:hover {
    background-color: var(--ems-primary-dark);
    border-color: var(--ems-primary-dark);
    color: #fff;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ems-primary-dark), var(--ems-primary));
}

.login-card {
    width: 380px;
    border: none;
    border-radius: .8rem;
    box-shadow: 0 15px 40px rgba(0,0,0,.35);
}

.wizard-steps {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
}
.wizard-steps .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
}
.wizard-steps .dot.active {
    background: var(--ems-primary);
}

.table-items input, .table-items select {
    min-width: 90px;
}

@media (max-width: 767px) {
    .app-sidebar {
        position: fixed;
        z-index: 1030;
        left: -240px;
        top: 56px;
        bottom: 0;
        transition: left .2s ease;
    }
    .app-sidebar.show { left: 0; }
}
