:root {
    --nis-primary: #006747;
    --nis-secondary: #00843D;
    --nis-accent: #FFD100;
    --nis-dark: #004225;
    --nis-light: #E8F0E8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: 280px;
    max-width: 280px;
    background: linear-gradient(180deg, var(--nis-primary) 0%, var(--nis-dark) 100%);
    color: #fff;
    transition: all 0.3s;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    min-height: 100vh;
    position: relative;
}

#sidebar.active {
    margin-left: -280px;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 2px solid var(--nis-accent);
}

#sidebar .sidebar-header img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    background: white;
    border-radius: 50%;
    padding: 10px;
}

#sidebar .sidebar-header h3 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--nis-accent);
    font-weight: 600;
}

#sidebar .sidebar-header p {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.9;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

#sidebar ul li a i {
    width: 25px;
    font-size: 1.1rem;
    margin-right: 10px;
}

#sidebar ul li a:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: var(--nis-accent);
}

#sidebar ul li.active a {
    background: rgba(255,255,255,0.2);
    border-left-color: var(--nis-accent);
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background: rgba(0,0,0,0.2);
}

.user-info-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.user-info-mini i {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--nis-accent);
}

.user-info-mini span {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info-mini small {
    font-size: 0.7rem;
    opacity: 0.8;
}

#content {
    width: 100%;
    padding: 20px;
    transition: all 0.3s;
}

.navbar {
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border-radius: 10px;
    padding: 15px;
}

.navbar .user-info {
    display: flex;
    align-items: center;
}

.navbar .user-info i {
    font-size: 2.5rem;
    color: var(--nis-primary);
    margin-right: 10px;
}

.navbar .user-info .user-details {
    line-height: 1.2;
}

.navbar .user-info .user-name {
    font-weight: 600;
    color: var(--nis-dark);
}

.navbar .user-info .user-role {
    font-size: 0.8rem;
    color: #6c757d;
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: transparent;
    border-bottom: 2px solid var(--nis-light);
    padding: 20px;
    font-weight: 600;
    color: var(--nis-dark);
}

.card-header i {
    color: var(--nis-primary);
    margin-right: 10px;
}

.stat-card {
    background: linear-gradient(135deg, var(--nis-primary) 0%, var(--nis-secondary) 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    height: 100%;
}

.stat-card .stat-icon {
    font-size: 3rem;
    opacity: 0.5;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.btn-nis {
    background: var(--nis-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-nis:hover {
    background: var(--nis-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,103,71,0.3);
}

.btn-outline-nis {
    border: 2px solid var(--nis-primary);
    color: var(--nis-primary);
    background: transparent;
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-outline-nis:hover {
    background: var(--nis-primary);
    color: white;
}

.badge {
    padding: 5px 10px;
    border-radius: 50px;
    font-weight: 500;
}

.progress-section {
    height: 5px;
    background: #e9ecef;
    border-radius: 10px;
    margin: 10px 0;
}

.progress-bar {
    background: var(--nis-primary);
    border-radius: 10px;
}

.sidebar-toggle {
    background: var(--nis-primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background: var(--nis-dark);
}

.footer {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    margin-top: 30px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--nis-primary);
    box-shadow: 0 0 0 0.2rem rgba(0,103,71,0.25);
}

.is-invalid {
    border-color: #dc3545 !important;
}

.invalid-feedback {
    display: block;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline .d-flex {
    position: relative;
}

.timeline .d-flex:before {
    content: '';
    position: absolute;
    left: -34px;
    top: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--nis-primary);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--nis-primary);
}

@media (max-width: 768px) {
    #sidebar {
        margin-left: -280px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
}

.table th {
    font-weight: 600;
    color: var(--nis-dark);
    border-top: none;
}

.table td {
    vertical-align: middle;
}

.alert {
    border-radius: 10px;
    border: none;
}

.list-group-item {
    border: none;
    margin-bottom: 5px;
    border-radius: 10px !important;
}

.list-group-item:hover {
    background: var(--nis-light);
}

code {
    background: #f8f9fa;
    padding: 2px 5px;
    border-radius: 5px;
    color: var(--nis-primary);
}

/* Print styles */
@media print {
    #sidebar, .navbar, .footer, .btn {
        display: none !important;
    }
    
    #content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}