body {
    font-family: Arial, sans-serif;
    background: #f7f5f1;
    margin: 0;
    padding: 0;
    color: #222;
}

.container {
    max-width: 700px;
    margin: 60px auto;
    background: #fff;
    padding: 28px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

h1 {
    margin-top: 0;
    font-size: 28px;
    color: #1f355e;
}

.subtitle {
    color: #666;
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}


.wide-container {
    max-width: 1050px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin: 0 0 18px;
}

select,
input[type="text"],
input[type="date"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
}

.button-row {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

button {
    border: none;
    border-radius: 4px;
    padding: 12px 18px;
    font-size: 15px;
    cursor: pointer;
}

.search-btn {
    background: #1f355e;
    color: white;
}

.download-btn {
    background: #6c7a89;
    color: white;
}

.download-btn:disabled {
    background: #b0b7bf;
    cursor: not-allowed;
}

.message {
    margin-top: 20px;
    padding: 14px;
    border-radius: 4px;
    background: #f2f4f7;
    border: 1px solid #ddd;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.back-link {
    margin-top: 20px;
}

.back-link a {
    color: #1f355e;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar-fill {
    height: 100%;
    background: #1f355e;
    width: 0%;
    transition: width 0.3s ease;
}

.link-button {
    display: inline-block;
    border-radius: 4px;
    padding: 12px 18px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
}

.selection-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.selection-actions .checkbox-label {
    margin: 0;
}

.attachment-list {
    max-height: 580px;
    overflow-y: auto;
    margin-top: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.attachment-row {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin: 0;
    border-bottom: 1px solid #e5e5e5;
    font-weight: normal;
    cursor: pointer;
}

.attachment-row:last-child {
    border-bottom: none;
}

.attachment-row:hover {
    background: #f7f9fc;
}

.attachment-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.attachment-details span {
    color: #666;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.initiative-list {
    margin-top: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 650px;
    overflow-y: auto;
}

.initiative-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 14px;
    margin: 0;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    font-weight: normal;
}

.initiative-row:last-child {
    border-bottom: none;
}

.initiative-details {
    min-width: 0;
    text-align: left;
}

.initiative-details > span {
    display: block;
    color: #666;
    font-size: 14px;
    margin-top: 4px;
}

.initiative-row input[type="checkbox"] {
    margin-top: 4px;
}
/* ---------- Sidebar ---------- */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    width: 250px;

    background: #1f355e;
    color: white;

    display: flex;
    flex-direction: column;

    transition: width 0.25s ease;

    z-index: 1000;
}

.sidebar.collapsed {
    width: 68px;
}

.sidebar-header {
    min-height: 68px;

    display: flex;
    align-items: center;

    padding: 0 14px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-toggle {
    background: transparent;
    color: white;

    padding: 10px;

    font-size: 21px;
}

.sidebar-title {
    margin-left: 10px;
    font-weight: bold;
    white-space: nowrap;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;

    padding: 12px 8px;

    flex: 1;

    overflow-y: auto;
}

.sidebar-nav a {
    min-height: 44px;

    display: flex;
    align-items: center;

    color: white;
    text-decoration: none;

    border-radius: 4px;

    padding: 0 12px;

    margin-bottom: 3px;
}

.sidebar-nav a:hover {
    background:
        rgba(255, 255, 255, 0.12);
}

.nav-icon {
    min-width: 28px;

    font-weight: bold;
    text-align: center;
}

.nav-label {
    margin-left: 10px;
    white-space: nowrap;
}

.sidebar-divider {
    height: 1px;

    background:
        rgba(255, 255, 255, 0.15);

    margin: 10px 8px;
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .logout-btn {
    display: none;
}

.sidebar-user {
    padding: 16px;

    border-top:
        1px solid rgba(255, 255, 255, 0.15);
}

.logout-btn {
    width: 100%;

    margin-top: 10px;

    background:
        rgba(255, 255, 255, 0.12);

    color: white;
}

.main-with-sidebar {
    margin-left: 250px;

    transition:
        margin-left 0.25s ease;
}

.sidebar-collapsed .main-with-sidebar {
    margin-left: 68px;
}


/* ---------- Authentication ---------- */

.auth-container {
    max-width: 440px;
}

input[type="password"],
input[type="email"] {
    width: 100%;

    padding: 12px;

    margin-bottom: 18px;

    border: 1px solid #ccc;
    border-radius: 4px;

    font-size: 15px;

    box-sizing: border-box;
}

.auth-links {
    margin-top: 20px;
}

.auth-links a {
    color: #1f355e;
}

.error-message {
    border-color: #d7aaaa;
    background: #fff4f4;
}

.success-message {
    border-color: #a9c9ad;
    background: #f3faf4;
}


/* ---------- Users ---------- */

.user-list,
.search-history {
    margin-top: 22px;

    border: 1px solid #ddd;
    border-radius: 4px;
}

.user-row,
.history-row {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 16px;

    border-bottom: 1px solid #ddd;
}

.user-row:last-child,
.history-row:last-child {
    border-bottom: none;
}

.user-detail,
.history-detail {
    margin-top: 5px;

    color: #666;

    font-size: 14px;

    overflow-wrap: anywhere;
}

.role-badge {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 12px;

    background: #1f355e;
    color: white;

    font-size: 12px;
}

.role-badge.regular {
    background: #6c7a89;
}


/* ---------- Mobile ---------- */

@media (max-width: 800px) {

    .sidebar {
        width: 68px;
    }

    .sidebar-title,
    .sidebar .nav-label,
    .sidebar .logout-btn {
        display: none;
    }

    .main-with-sidebar {
        margin-left: 68px;
    }

    .container {
        margin: 20px;
    }
}

.user-management-row {
    padding: 18px;
    border-bottom: 1px solid #ddd;
}

.user-management-row:last-child {
    border-bottom: none;
}

.user-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}

.admin-user-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.admin-user-actions form {
    padding: 16px;
    background: #f7f9fc;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.admin-user-actions select,
.admin-user-actions input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

@media (max-width: 800px) {
    .admin-user-actions {
        grid-template-columns: 1fr;
    }
}