/* General reset */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    color: #333;
}

/* Header */
header {
    background: #C63E1B; /* MCZ corporate color */
    color: white;
    padding: 15px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 22px;
}

header .role-badge {
    margin-top: 5px;
    font-size: 14px;
    background: rgba(255,255,255,0.2);
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Sidebar */
aside {
    width: 200px;
    height: 100vh;
    position: fixed;
    top: 60px; /* below header */
    left: 0;
    background: #f4f4f4;
    border-right: 1px solid #ddd;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

aside h3 {
    margin-top: 0;
    color: #333;
}

aside ul {
    list-style: none;
    padding: 0;
}

aside ul li {
    margin: 10px 0;
}

aside ul li a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

aside ul li a:hover {
    background: #C63E1B;
    color: white;
}

/* Content area */
.content {
    margin-left: 220px; /* space for sidebar */
    padding: 80px 20px 60px; /* top padding accounts for fixed header */
}

/* Quick link buttons */
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.quick-links .btn {
    background: #C63E1B;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
}

.quick-links .btn:hover {
    background: #a52a15;
    transform: translateY(-2px);
}

/* Dashboard cards */
.cards {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    min-width: 200px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card h3 {
    margin: 0 0 10px;
    color: #C63E1B;
}

.card p {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

/* Tables (Recent Activity) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th {
    background: #C63E1B;
    color: white;
    padding: 8px;
    text-align: left;
}

table td {
    padding: 8px;
    border: 1px solid #ddd;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 10px;
    position: fixed;
    bottom: 0;
    left: 220px; /* align with content */
    width: calc(100% - 220px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    aside {
        width: 160px;
    }
    .content {
        margin-left: 170px;
        padding: 80px 15px 60px;
    }
    footer {
        left: 160px;
        width: calc(100% - 160px);
    }
}

@media (max-width: 480px) {
    aside {
        display: none;
    }
    .content {
        margin-left: 0;
        padding: 80px 15px 60px;
    }
    footer {
        left: 0;
        width: 100%;
    }
    .cards {
        flex-direction: column;
    }
}

/* ===== Auth Pages (Login/Register) ===== */
.auth-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #C63E1B;
}

.auth-container input[type="text"],
.auth-container input[type="password"],
.auth-container input[type="email"] {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.auth-container button {
    width: 100%;
    padding: 10px;
    background: #C63E1B;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-container button:hover {
    background: #a52a15;
}

/* ===== Forms (Contributions, Expenditures, Requests) ===== */
.form-container {
    max-width: 600px;
    margin: 20px auto;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.form-container h2 {
    margin-bottom: 15px;
    color: #C63E1B;
}

.form-container label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.form-container input,
.form-container select,
.form-container textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.form-container button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #C63E1B;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.form-container button:hover {
    background: #a52a15;
}


.login-links {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
}
.login-links a {
    color: #C63E1B;
    font-weight: bold;
    text-decoration: none;
}
.login-links a:hover {
    text-decoration: underline;
}



/* ===== Reports & Audit Logs ===== */
.report-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.report-container h2 {
    color: #C63E1B;
    margin-bottom: 15px;
}

.report-container table {
    width: 100%;
    border-collapse: collapse;
}

.report-container th,
.report-container td {
    padding: 10px;
    border: 1px solid #ddd;
}

.report-container th {
    background: #C63E1B;
    color: white;
}

.report-container tr:nth-child(even) {
    background: #f9f9f9;
}

/* ===== Alerts & Messages ===== */
.alert {
    padding: 10px 15px;
    border-radius: 5px;
    margin: 10px 0;
    font-weight: bold;
}

.alert-success {
    background: #4CAF50;
    color: white;
}

.alert-error {
    background: #f44336;
    color: white;
}

.alert-warning {
    background: #FFC107;
    color: #333;
}


/* ===== General Page Layout ===== */
.page-container {
    max-width: 1000px;
    margin: 80px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ===== Headings ===== */
.page-container h2 {
    color: #C63E1B;
    margin-bottom: 20px;
}

/* ===== Forms (Contributions, Expenditures, Requests) ===== */
.form-container {
    max-width: 600px;
    margin: 20px auto;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.form-container h2 {
    margin-bottom: 15px;
    color: #C63E1B;
}

.form-container label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.form-container input,
.form-container select,
.form-container textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.form-container button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #C63E1B;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.form-container button:hover {
    background: #a52a15;
}

/* ===== Tables (Reports, Audit Logs, Listings) ===== */
.table-container {
    margin-top: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.table-container th,
.table-container td {
    padding: 10px;
    border: 1px solid #ddd;
}

.table-container th {
    background: #C63E1B;
    color: white;
    text-align: left;
}

.table-container tr:nth-child(even) {
    background: #f9f9f9;
}

/* ===== Alerts & Messages ===== */
.alert {
    padding: 10px 15px;
    border-radius: 5px;
    margin: 10px 0;
    font-weight: bold;
}

.alert-success {
    background: #4CAF50;
    color: white;
}

.alert-error {
    background: #f44336;
    color: white;
}

.alert-warning {
    background: #FFC107;
    color: #333;
}

/* ===== Buttons (Global) ===== */
.btn {
    background: #C63E1B;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
}

.btn:hover {
    background: #a52a15;
    transform: translateY(-2px);
}

/* ===== Navigation Menu ===== */
header {
    background: #C63E1B;
    color: white;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;          /* allow wrapping if too long */
    justify-content: space-between;
    align-items:flex-start;
}

header h1 {
    margin: 0;
    font-size: 20px;
    flex: 1;                  /* keep title on left */
}

header nav {
    flex: 2;                  /* give nav space */
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;          /* wrap items to next line if needed */
    gap: 15px;
    justify-content: flex-end; /* align to right side */
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.3s;
    white-space: nowrap;      /* keep each link intact */
}

header nav ul li a:hover {
    background: #a52a15;
}



/* Buttons */
.btn {
    background: #C63E1B;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover {
    background: #a52a15;
}

/* Alerts */
.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
}