body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
}
header {
    text-align: center;
    background-color: #004085;
    color: white;
    padding: 20px 0;
    border-radius: 5px;
    margin-bottom: 20px;
}
h1 { margin: 0; font-size: 2rem; }
h2 { color: #004085; border-bottom: 2px solid #004085; padding-bottom: 5px; margin-top: 30px; }
p { margin: 10px 0; text-align: justify; }
ul { padding-left: 20px; }
li { margin-bottom: 8px; }
.highlight { font-weight: bold; color: #d32f2f; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
th, td { border: 1px solid #ddd; padding: 12px; text-align: left; }
th { background-color: #004085; color: white; }
tr:nth-child(even) { background-color: #f2f2f2; }

/* Fomu ya Maombi */
.form-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-top: 40px;
    border: 1px solid #eee;
}
.form-container h2 { text-align: center; border-bottom: none; margin-top: 0; color: #222; font-size: 1.8rem; }
.form-instruction { text-align: center; color: #666; margin-bottom: 25px; font-size: 0.95rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; color: #333; }

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: #fff;
}

.hidden-field { display: none; }

.info-box {
    background-color: #fff8f5;
    border: 1px dashed #ffdcd0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}
.info-box p { margin: 0; font-size: 0.95rem; color: #555; }
.info-box strong { color: #222; display: block; margin-bottom: 5px; }

.file-upload {
    display: block;
    border: 2px dashed #0066cc;
    background-color: #f0f7ff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    color: #0066cc;
    font-weight: bold;
    margin-bottom: 20px;
}
.file-upload input[type="file"] { display: none; }

.radio-group-container { display: flex; gap: 15px; margin-bottom: 20px; }
.radio-option {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    background: #fff;
}
.radio-option input { margin-right: 10px; transform: scale(1.2); }
.checkbox-group { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 25px; font-size: 0.95rem; }
.checkbox-group input { margin-top: 4px; transform: scale(1.2); }

/* Kitufe na Spinner */
.btn-submit {
    width: 100%;
    background-color: #e65c00;
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}
.btn-submit:hover { background-color: #cc5200; }
.btn-submit:disabled { background-color: #a0a0a0; cursor: not-allowed; }

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* NOTIFICATION POP-UP (MODAL CSS) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}
.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.modal-icon {
    width: 60px; height: 60px;
    background-color: #e6f4ea;
    color: #137333;
    font-size: 30px; line-height: 60px;
    border-radius: 50%; margin: 0 auto 15px;
    font-weight: bold;
}
.modal-content h3 { margin-top: 0; color: #d32f2f; font-size: 1.4rem; }
.modal-content p { text-align: center; color: #444; font-size: 1.05rem; margin-bottom: 25px; line-height: 1.5; }
.modal-btn {
    background-color: #137333; color: white;
    border: none; padding: 12px 30px;
    font-size: 1rem; font-weight: bold;
    border-radius: 5px; cursor: pointer; width: 100%;
}
.modal-btn:hover { background-color: #002752; }

@media (max-width: 600px) {
    table, thead, tbody, th, td, tr { display: block; }
    thead tr { position: absolute; top: -9999px; left: -9999px; }
    tr { border: 1px solid #ccc; margin-bottom: 10px; }
    td { border: none; border-bottom: 1px solid #eee; position: relative; padding-left: 50%; }
    td:before { position: absolute; top: 12px; left: 6px; width: 45%; padding-right: 10px; white-space: nowrap; font-weight: bold; }
    td:nth-of-type(1):before { content: "Kiasi cha Mkopo"; }
    td:nth-of-type(2):before { content: "Akiba (Riba)"; }
    td:nth-of-type(3):before { content: "Rejesho la Kila Mwezi"; }
    td:nth-of-type(4):before { content: "Muda (Miezi)"; }
    .radio-group-container { flex-direction: column; gap: 10px; }
}