:root { --primary: #476DB0; }


/* Welcome Text */
.welcome-text {
    background-color: #476DB0;
    font-size: 20px;
    font-weight: 400;
    height: 4rem;
    color: white;
    padding-left: 21.5rem;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Dashboard Container */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Dashboard Wrapper */
.dashboard-wrapper {
    display: flex;
    gap: 2rem;
}

/* Sidebar Navigation */
.dashboard-container .nav-buttons {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-right: 5rem;
}

.dashboard-container .nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-decoration: none;
    font-size: 16px;
    color: #333;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.dashboard-container .nav-button img {
    width: 24px; /* Set a fixed width for the icons */
    height: 24px; /* Set a fixed height for the icons */
    transition: opacity 0.3s;
}

/* Hover State */
.dashboard-container .nav-button:hover {
    border-color: #476DB0;
    color: #333;
}

/* Active State */
:root { --primary: #476DB0; }

.dashboard-container .nav-button:hover { border-color: var(--primary); }
.dashboard-container .nav-button.active {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.dashboard-container .nav-button.active img { filter: brightness(0) invert(1); }

/* Content Section Wrapper */
.content-section-wrapper {
    flex-grow: 1;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
    overflow: hidden; /* Prevent content overflow */
}

/* Content Section */
.content-section {
    display: none;
}

.content-section:not(.hidden) {
    display: block;
}

.hidden {
    display: none;
}

/* Input Fields */
.content-section form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.content-section form label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.content-section form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    background-color: #f7f7f7;
    transition: background-color 0.3s, border-color 0.3s;
}

.content-section form input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.content-section form input:focus {
    border-color: #4CB047;
    background-color: #ffffff;
    outline: none;
}

/* Full-width Input Fields */
.full-width {
    grid-column: span 2;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 1rem;
    grid-column: span 2;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Header with Edit Button */
.header-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.edit-button {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #476DB0;
    background-color: #476DB0;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* Save and Cancel Buttons */
.save-button,
.cancel-button {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #476DB0;
    background-color: #476DB0;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: hidden;
}

/* Navigation Buttons */
.dashboard-container .nav-buttons a.nav-button {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border: 1px solid #476DB0;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    width: 300px;
    transition: background-color 0.3s, border-color 0.3s;
}

.nav-buttons a.nav-button.active {
    background-color: #476DB0;
    border-color: #476DB0;
    color: white;
}

.nav-buttons a.nav-button img {
    transition: opacity 0.3s;
}

.nav-buttons a.nav-button.active img {
    filter: brightness(0) invert(1);
}

/* Message Styles */
.messages {
    margin-bottom: 1rem;
}

.dashboard-container .alert {
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}


/* Submission History */
.submissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    font-family: 'Roboto', sans-serif;
}

.submissions-table th,
.submissions-table td {
    padding: 12px;
    text-align: left;
    font-size: 16px;
    border-right: 1px solid #ddd;
}

.submissions-table th {
    background-color: #f5f5f5;
    font-size: 20px;
    font-weight: 400;
    border-bottom: 2px solid #ddd;
    border-right: 1px solid #ddd;
}

.submissions-table th:last-child,
.submissions-table td:last-child {
    border-right: none;
}

.submissions-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.submissions-table td {
    border-bottom: 1px solid #ddd;
}

.download-link {
    color: #476DB0;
    text-decoration: none;
    font-weight: 500;
}

.download-link:hover {
    text-decoration: underline;
}


.grey-row {
    background-color: #f9f9f9;
}


/* Change Password Section */
#change-password {
    padding: 2rem;
    background-color: #fff;
}

#change-password h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.input-group-password {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.input-group-password label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.input-group-password input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    background-color: #f7f7f7;
    transition: border-color 0.3s;
}

.input-group-password input:focus {
    border-color: #4CB047;
    background-color: #fff;
    outline: none;
}

.change-password-btn {
    padding: 8px 16px;
    background-color: #476DB0;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.change-password-btn:hover {
    background-color: #365a8c;
}

.two-factor-title{
    margin-bottom: 2rem;
}

/* Media Query */
@media (min-width: 1200px) {
    .content-section form {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .full-width {
        grid-column: span 3;
    }
}

/* Resend Auth Key section */
#resend-auth-key h2 { margin-bottom: 1rem; }

.content-section form.no-grid {      /* only this form opts out of the global grid */
  display: block;
  max-width: 480px;
}

#resend-auth-key .input-group-password { 
  max-width: 480px; 
}

#resend-auth-key, 
#resend-auth-key .messages {
  max-width: 480px;
}
