:root {
    --primary-dark-blue: #0d2639; 
    --secondary-light-blue: #b3cadc; 
    --accent-green: #b1c741; 

    
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-light: #f4f7f6; 

    --success-bg: #d4edda;
    --success-color: #155724;
    --error-bg: #f8d7da;
    --error-color: #721c24;

    --primary_dark_blue: #3a0d0d

}

body {
    background-image: url('img/bg.jpg'); 
    background-size: cover; 
    
            background-attachment: fixed;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--primary-dark-blue); 
    color: var(--text-dark);
    line-height: 1.6;
}

header {
    background-color: white;
    color: var(--text-dark);
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header-content .logo {
    height: 50px; 
    margin-right: 15px; 
}

header h1 {
    margin: 0;
    font-size: 1.8em;
    color: var(--primary-dark-blue); 
    display: flex;
    align-items: center;
    gap: 10px; 
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: var(--primary-dark-blue);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: var(--accent-green);
}

.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 150px);
    max-width: 1200px;
    margin: 20px auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.button a {
    text-decoration: none; 
    color: white
    
}

a img {
    text-decoration: none; 
}

.site-icon {
    font-size: 1.2em; 
    vertical-align: middle;
    margin-right: 5px; 
}

.sidebar {
    width: 280px;
    background-color: rgba(60, 140, 200, 0.3);
    padding: 20px;
    border-right: 1px solid rgba(0,0,0,0.1); 
    flex-shrink: 0;
}

.sidebar .welcome-message {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.sidebar h2, .sidebar h3 {
    color: var(--primary-dark-blue);
    font-size: 1.5em;
    margin-top: 0;
}

.contract-list-sidebar {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.contract-list-sidebar li {
    margin-bottom: 8px;
}

.contract-list-sidebar li a {
    display: block;
    padding: 8px 10px;
    background-color: var(--primary-dark-blue); 
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.contract-list-sidebar li a:hover {
    background-color: var(--accent-green);
    color: var(--primary-dark-blue); 
}

.sidebar-actions button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar-actions .primary {
    background-color: var(--accent-green); 
    color: var(--text-light);
}

.sidebar-actions .primary:hover {
    background-color: #5d6b18;
    color: var(--text-light);
}

.sidebar-actions .secondary {
    background-color: var(--secondary-light-blue); 
    color: var(--primary-dark-blue);
}

.sidebar-actions .secondary:hover {
    background-color: var(--primary-dark-blue);
    color: var(--text-light);
}

.sidebar-actions button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    color: #666666;
}

.main-content {
    flex-grow: 1;
    padding: 20px;
    background-color: var(--background-light);
}

.contract-selection {
    margin-bottom: 30px;
    padding: 20px;
    background-color: white; 
    border-radius: 8px;
    border: 1px solid #eee;
}

.contract-selection label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.contract-selection select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    background-color: white;
}

.contract-details-display {
    padding: 20px;
    background-color: white; 
    border: 1px solid #eee;
    border-radius: 8px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #666;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    animation-name: animatetop;
    animation-duration: 0.4s;
}

@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-dark-blue);
    text-decoration: none;
}

.modal-content h3 {
    margin-top: 0;
    color: var(--primary-dark-blue);
}

.modal-content .form-group {
    margin-bottom: 15px;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal-content .form-group input[type="text"],
.modal-content .form-group input[type="number"],
.modal-content .form-group select {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.modal-content button.button {
    width: auto;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    color: white;
    background-color: var(--accent-green); 
    transition: background-color 0.3s ease;
}

.modal-content button.button:hover {
    background-color: var(--primary-dark-blue);
}

.modal-content button.danger {
    background-color: #f44336; 
}

.modal-content button.danger:hover {
    background-color: #da190b;
}

.message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
}

.message.success {
    color: white;
    border: 1px solid white;
}

.message.error {
    background-color: var(--error-bg);
    color: var(--error-color);
    border: 1px solid #f5c6cb;
}

.message ul {
    margin: 0;
    padding-left: 20px;
}

footer {
    text-align: center;
    padding: 15px;
    background-color: var(--primary-dark-blue); 
    color: var(--text-light);
    font-size: 0.9em;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 20px;
    background-color: white; 
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.welcome-section {
    text-align: center;
        

    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--background-light); 
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-sections {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.login-section,
.register-section {
    flex: 1;
    min-width: 300px;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

button.button, .button-secondary, .button { 
    width: 100%;
    margin-top: 10px;
    background-color: var(--accent-green);
    color: var(--text-light);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
}

button.button:hover, .button:hover {
    background-color: var(--primary-dark-blue);
    color: var(--text-light);
}

.forgot-password {
    margin-top: 15px;
    font-size: 0.9em;
}

.forgot-password a {
    color: var(--primary-dark-blue); 
    text-decoration: none;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.tabContainer {
    background: var(--primary-dark-blue); 
    border: .45px solid var(--secondary-light-blue);
    margin: 0 auto;
}
.tabContent {
    padding: 10px;
    text-align: left;
    min-height:200px;
    color:var(--text-light); 
}
.tabContent > div:not(:first-child) {
    display: none;
}

.tabContainer > .tabs {
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}
.tabs li {
    float: left;
    display: flex;
    flex: 1;
}
.tabs a {
    position: relative;
    background: var(--primary-dark-blue); 
    border-top: 3px solid rgba(0,0,0,0);
    padding: 1em .5em;
    float: left;
    text-decoration: none;
    color: var(--secondary-light-blue); 
    margin: 0 .1em 0 0;
    font-size: 1em;
    flex: 1;
    transition: all .35s ease;
}
.tabs a.active {
    border-top: 3px solid var(--accent-green); 
    color: var(--text-light);
    background: var(--primary-dark-blue); 
}
.tabs a:hover {
    background: var(--primary-dark-blue); 
    color: var(--text-light); 
}



@media (max-width: 992px) {
    .dashboard-layout {
        flex-direction: column;
        margin: 10px;
    }

    .sidebar {
        width: auto;
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        padding-bottom: 10px;
    }

    .main-content {
        padding: 15px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-content .logo {
        margin-right: 0;
        margin-bottom: 10px;
    }

    header nav ul {
        margin-top: 10px;
        flex-direction: column;
        align-items: center;
    }

    header nav ul li {
        margin: 5px 0;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .sidebar, .main-content {
        padding: 10px;
    }

    .sidebar h2, .sidebar h3 {
        font-size: 1.3em;
    }

    .auth-sections {
        flex-direction: column;
        align-items: center;
    }
    .login-section,
    .register-section {
        width: 90%;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    .sidebar-actions button {
        font-size: 0.9em;
        padding: 8px;
    }

    .contract-selection, .contract-details-display {
        padding: 15px;
    }
}