body {
    font-family: Arial, sans-serif;
    background-color: #1C3D5A;  /* Official Navy Blue (Section 1.2) - updated 2026-06-02 */
    margin: 0;
    padding: 0;
}

/* Official SAAR Form Header */
.saar-header {
    background: #FFFFFF;
    padding: 10px 20px;
    border-bottom: 2px solid #000;
    max-width: 600px;
    margin: 20px auto 0 auto;
    border-radius: 8px 8px 0 0;
}

.saar-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.saar-logos {
    display: flex;
    align-items: center;
    gap: 5px;
}

.saar-logos img {
    height: 50px;
    width: auto;
}

.classification-marking {
    color: #008000;  /* Green for UNCLASSIFIED */
    font-weight: bold;
    font-size: 0.9em;
}

.doc-id {
    color: #000;
    font-size: 0.85em;
}

.saar-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    gap: 10px;
}

.saar-logos {
    flex-shrink: 0;
    width: 50px;
}

.saar-title {
    text-align: center;
    flex-grow: 1;
    flex-basis: 0;
}

.saar-title h1 {
    color: #000;
    font-size: 1.3em;
    margin: 5px 0;
}

.saar-title h2 {
    color: #000;
    font-size: 1.1em;
    margin: 5px 0;
    border: none;
    padding: 0;
    text-align: center;
}

.saar-warning {
    color: #FF0000;  /* Red warning text */
    font-weight: bold;
    text-align: center;
    font-size: 0.9em;
    margin: 8px 0;
}

.saar-instructions {
    text-align: center;
    font-size: 0.85em;
    margin: 8px 0;
}

.saar-instructions a {
    color: #0000EE;
    text-decoration: none;
}

.saar-instructions a:hover {
    text-decoration: underline;
}

.saar-assistance {
    text-align: center;
    font-style: italic;
    font-size: 0.8em;
    margin-top: 5px;
    color: #333;
}

/* Official SAAR Form Footer */
.saar-footer {
    background: #FFFFFF;
    padding: 10px 20px;
    border-top: 2px solid #000;
    max-width: 600px;
    margin: 0 auto 20px auto;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.footer-date {
    color: #000;
    font-weight: bold;
    font-size: 0.85em;
    position: absolute;
    left: 20px;
}

.footer-classification {
    color: #008000;  /* Green for UNCLASSIFIED */
    font-weight: bold;
    font-size: 0.9em;
    text-align: center;
}

.footer-obsolete {
    font-size: 0.7em;
    color: #000;
}

/* Adjust form container to connect with header/footer */
.form-container {
    padding: 20px;
}
form {
    background: #FFFFFF;  /* White */
    padding: 20px;
    border-radius: 0;  /* No rounded corners - connects to header/footer */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}
h1, h4 {
    text-align: center;
    color: #FFFFFF;  /* White text on dark background */
}
h2 {
    color: #164422;  /* Dark green for major section headers */
    text-align: center;
    font-size: 1.8em;
    font-weight: bold;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
h3 {
    color: #0F0C06;  /* Dark black */
    text-align: left;
    font-size: 1.1em;
}
label {
    font-weight: bold;
    display: block;
    margin-top: 10px;
}
input, select, textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 10px;
    text-align: left;
}

.radio-group input[type="radio"] {
    margin-right: 10px;
    width: auto;
}
button {
    background: #007A33;  /* Official CORe Green (Section 1.1) - updated 2026-06-02 */
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    width: 100%;
    margin-top: 20px;
    font-weight: bold;
}
button:hover {
    background: #164422;  /* Official Dark Green (Section 1.1) - updated 2026-06-02 */
}
.error {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
}
/* Mobile Optimization */
@media (max-width: 768px) {
    form {
        padding: 10px;
        width: 100%;
    }
    button {
        width: 100%;
        padding: 15px;
    }
    input, select, textarea {
        padding: 12px;
    }
}
/* Section Dividers */
.section-divider {
    background-color: #e3f0f8;  /* Light blue - from demo */
    padding: 20px;
    margin-top: 20px;
    border-radius: 5px;
}
.section-divider-alt {
    background-color: #f3f9fc;  /* Even lighter blue - from demo */
    padding: 20px;
    margin-top: 20px;
    border-radius: 5px;
}

/* Make H3 inside section dividers styled with horizontal line - smaller than H2 */
.section-divider h3,
.section-divider-alt h3 {
    font-size: 1.3em;  /* Smaller than H2 but still prominent */
    color: #164422;  /* Dark green */
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #164422;  /* Thinner line than H2 */
    text-align: left;
    font-weight: 600;
}
.save-progress-container {
    max-width: 600px; 
    margin: auto; 
    text-align: center; 
}
#saveProgressBtn {
    width: 100%; 
    display: inline-block; 
    margin-bottom: 10px;
}

/* Spinner container - covers the whole page */
#spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6); 
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none; 
  }
  
  /* The blue spinner itself */
  .spinner {
    border: 8px solid #f3f3f3; 
    border-top: 8px solid #3498db; 
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
  }
  
  /* Spin animation */
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  /* Training item boxes */
    .training-item {
        margin-bottom: 20px;
        padding: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        background-color: #f9f9f9;
    }

    .training-item h3 {
        margin-top: 0;
        color: #333;
        text-align: left;
        font-size: 1.1em;
    }

    .date-input {
        margin-top: 10px;
    }

    .training-item input[type="date"] {
        width: auto;
        padding: 5px;
        margin-left: 10px;
        display: inline-block;
    }

    .training-item h3 a {
        color: #007A33;  /* Official CORe Green - updated 2026-06-02 */
        text-decoration: none;
    }

    .training-item h3 a:hover {
        text-decoration: underline;
    }

    /* Attestation item styling */
    .attestation-item {
        margin-bottom: 20px;
        padding: 15px;
        background-color: rgba(0, 122, 51, 0.08);  /* Light transparent green - matches green bar */
        border-left: 4px solid #007A33;  /* Official CORe Green - matches buttons */
        line-height: 1.6;
    }

    .attestation-item input[type="date"] {
        width: auto;
        display: inline;
        margin-left: 10px;
        padding: 5px;
        margin-top: 8px;
    }

    .attestation-item br {
        line-height: 2;
    }
    .training-item ul li {
        margin-bottom: 15px;
        line-height: 1.5;
    }

    .training-item ul li:last-child {
        margin-bottom: 0;
    }

    /* Table styling from demo */
    table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 10px;
    }

    table, th, td {
        border: 1px solid #ccc;
    }

    th {
        background-color: #007A33;  /* Official CORe Green table headers */
        color: white;
        padding: 10px;
        text-align: left;
    }

    td {
        padding: 8px;
    }

    hr {
        border: none;
        border-top: 2px solid #164422;
        margin: 20px 0;
    }

    /* Phone number section styling */
    #phone-number-section {
        display: none;
        margin-left: 20px;
        margin-top: 10px;
        max-width: 400px;
    }

    .phone-row {
        display: flex;
        gap: 10px;
        margin-bottom: 10px;
        align-items: center;
    }

    .phone-row label {
        width: 90px;
        margin: 0;
    }

    .phone-row .ext-label {
        width: 40px;
    }

    .phone-row input {
        flex-grow: 2;
        min-width: 0;
    }

    .phone-row .ext-input {
        flex-grow: 1;
        max-width: 70px;
    }

    .phone-row .mobile-input {
        flex-grow: 3;
    }

    /* Response message styling */
    #response-msg {
        color: green;
        font-weight: bold;
    }

    /* Remove button styling (red X button) */
    .remove-btn {
        background: none;
        border: none;
        color: red;
        font-size: 20px;
        cursor: pointer;
        padding: 0;
    }

    /* Narrow table cell for remove button */
    .remove-cell {
        text-align: center;
        width: 30px;
    }

    /* Table header for remove button column */
    th.remove-header {
        width: 30px;
    }