:root {
    --primary-color: #387ed1;
    --green-color: #238B45;
    --green-thin-line: 1px solid var(--green-color); 
    --row-color-1: #ffffff;
    --row-color-2: #f2f2f2;
    --header-height: 60px;
    --footer-height: 180px;
}

html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-height);
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.navbar {
    height: var(--header-height);
    background: white;
    box-shadow: 0 1px 8px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar .navbar-brand {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--green-color) !important;
    text-decoration: none;
}

.navbar-nav .nav-item .nav-link {
    color: #444 !important;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-nav .nav-item .nav-link:hover,
.navbar-nav .nav-item .nav-link:focus {
    color: var(--green-color) !important;
}

.navbar-nav .nav-item .nav-link.active {
    color: var(--green-color) !important;
}

.navbar {
    margin-bottom: 0 !important;
}

.navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

main {
    flex: 1 0 auto;
    padding-bottom: var(--footer-height);
}

h2 {
    margin-top: 0;
    padding-top: 10px;
}

.table th {
    background-color: var(--green-color);
    font-weight: 500;
    color: white;
    text-align: center;
    vertical-align: middle;
    padding: 12px 8px;
    line-height: 1.2;
}

.table td {
    font-size: 0.9rem;
    vertical-align: middle;
}

.table td:first-child {
    text-align: left;
    border-right: var(--green-thin-line);
}

.table th:first-child {
    border-right: var(--green-thin-line);
}

.table td:not(:first-child) {
    text-align: right;
}

.table td:nth-child(8) {
    border-left: var(--green-thin-line);
}

.table th:nth-child(8) {
    border-left: var(--green-thin-line);
}

.table tbody tr:nth-child(odd) {
    background-color: var(--row-color-1);
}

.table tbody tr:nth-child(even) {
    background-color: var(--row-color-2);
}

.table tbody tr:hover {
    background-color: #e6e6e6;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 3;
}

.sticky-col {
    position: sticky;
    left: 0;
    z-index: 4;
    background-color: inherit;
}

.table tbody tr:nth-child(odd) .sticky-col {
    background-color: var(--row-color-1);
}

.table tbody tr:nth-child(even) .sticky-col {
    background-color: var(--row-color-2);
}

.table tbody tr:hover .sticky-col {
    background-color: #e6e6e6;
}

.table th.sticky-col {
    background-color: var(--green-color);
    z-index: 5;
}

.footer {
    flex-shrink: 0;
    width: 100%;
    height: var(--footer-height);
    background-color: #f5f5f5;
    z-index: 200;
}

.footer p {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

@media (max-width: 991px) {
    .navbar-collapse {
        position: fixed;
        top: var(--header-height);
        right: 0;
        padding: 1rem;
        background-color: rgba(255, 255, 255, 0.95);
        width: auto;
        height: auto;
        z-index: 1001;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }

    .navbar-nav {
        padding-top: 1rem;
    }
    
    .nav-item {
        text-align: right;
    }

    .navbar-toggler {
        margin-left: auto;
    }

    .navbar-nav .nav-item .nav-link:hover,
    .navbar-nav .nav-item .nav-link:focus {
        color: var(--green-color) !important;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 50px;
        --footer-height: 220px;
    }

    body {
        padding-top: var(--header-height);
    }

    .navbar .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-nav .nav-item .nav-link {
        font-size: 1rem;
        padding: 0.3rem 0.5rem !important;
    }
    
    .table th, 
    .table td {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .navbar .navbar-brand {
        font-size: 1rem;
    }
    h2 {
        padding-top: 5px;
    }
    

    
    .navbar-nav .nav-item .nav-link {
        font-size: 1rem;
        padding: 0.2rem 0.4rem !important;
    }
    
    .table th, 
    .table td {
        padding: 6px 3px;
        font-size: 0.7rem;
    }

    .footer {
        height: var(--footer-height);
        padding: 1rem 0;
    }

    .footer p {
        font-size: 0.7rem;
    }
}
