body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f8fb;
    color: #222;
}

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 20px;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 32px;
    box-sizing: border-box;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    max-width: 180px;
    height: auto;
}

.login-card h1 {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 8px;
    color: #244b68;
    margin-bottom: 28px;
    padding-bottom: 15px;
    border-bottom: 3px solid #444;
}

.login-card label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 20px;
    border: 1px solid #9bb8cb;
    border-radius: 5px;
    background: #edf4fb;
    box-sizing: border-box;
    font-size: 16px;
}

.remember {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.login-card button {
    background: #cbeaff;
    border: 1px solid #4e768f;
    padding: 11px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
}

.login-card button:hover {
    background: #addfff;
}

.login-card a {
    color: #004cff;
}

.login-error {
    background: #ffe6e6;
    border: 1px solid #cc7777;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
}

/* ========================================
   Dashboard
======================================== */

.dashboard-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 500;
    color: #244b68;
}

.dashboard-header p {
    margin: 0;
    color: #666;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.dashboard-card {
    display: block;
    background: #ffffff;
    border: 1px solid #c5ddea;
    border-radius: 10px;
    padding: 24px;
    text-decoration: none;
    color: #222;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0,0,0,0.10);
}

.dashboard-card h2 {
    margin: 0 0 10px;
    color: #244b68;
    font-size: 20px;
}

.dashboard-card p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

.site-header {
    background: #d8edf8;
    border-bottom: 1px solid #c3dbe8;
}

.site-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-brand img {
    height: 55px;
    width: auto;
    display: block;
}

.site-nav {
    display: flex;
    gap: 18px;
}

.site-nav a {
    color: #244b68;
    text-decoration: none;
}

.site-nav a:hover {
    text-decoration: underline;
}

/* ========================================
   Public links
======================================== */

.public-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #c5ddea;
}

.public-links h2 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 500;
    color: #244b68;
}

.public-links a {
    display: block;
    padding: 9px 12px;
    margin-bottom: 8px;
    background: #edf4fb;
    border-radius: 5px;
    color: #244b68;
    text-decoration: none;
}

.public-links a:hover {
    background: #d8edf8;
}

/* ========================================
   Shared Form / Report Layout
======================================== */

.form-container {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #c5ddea;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.page-logo {
    text-align: center;
    margin-bottom: 25px;
}

.page-logo img {
    max-width: 150px;
    height: auto;
}

.form-container h1 {
    margin: 0 0 30px;
    color: #244b68;
    font-size: 26px;
    font-weight: 500;
    border-bottom: 3px solid #d8edf8;
    padding-bottom: 12px;
}

.form-container h2 {
    margin-top: 30px;
    color: #244b68;
    font-size: 20px;
}


/* ========================================
   Form Fields
======================================== */

.form-group {
    margin-bottom: 20px;
}

.form-group > label {
    display: block;
    margin-bottom: 7px;
    font-weight: 500;
    color: #244b68;
}

.form-container input[type="text"],
.form-container input[type="date"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container select,
.form-container textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #9bb8cb;
    border-radius: 5px;
    background: #edf4fb;
    box-sizing: border-box;
    font-size: 16px;
}

.form-container textarea {
    resize: vertical;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.answer-option-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    background: #edf4fb;
    border: 1px solid #c5ddea;
    border-radius: 5px;
    cursor: pointer;
}

.answer-option-label input {
    margin: 0;
}


/* ========================================
   Buttons
======================================== */

.btn-submit,
.btn-add,
.btn-email {
    border: 1px solid #4e768f;
    background: #cbeaff;
    color: #244b68;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
}

.report-actions {
    margin-bottom: 0;
    padding-top: 18px;
}

.btn-submit:hover,
.btn-add:hover,
.btn-email:hover {
    background: #addfff;
}

.btn-submit {
    margin-top: 10px;
}


/* ========================================
   Reports
======================================== */

.report-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
    margin-bottom: 20px;
}

.report-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-filter {
    margin: 0;
}

.form-container table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.form-container th,
.form-container td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.form-container th {
    background: #edf4fb;
    color: #244b68;
}

.success-message {
    max-width: 900px;
    margin: 20px auto;
    padding: 12px 16px;
    background: #e8f6ea;
    border: 1px solid #8fc89a;
    border-radius: 5px;
    color: #276b35;
}


/* ========================================
   Validation
======================================== */

.required-star {
    color: #b00020;
    margin-left: 3px;
}

.error-field,
.error-group {
    border-color: #b00020 !important;
}

.error-message {
    margin-top: 5px;
    color: #b00020;
    font-size: 14px;
}

/* Training report session heading */

.session-heading {
    margin-top: 30px;
    margin-bottom: 8px;
}

.session-select {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.session-select .session-checkbox {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

.session-details {
    margin: 0 0 15px 28px;
    font-size: 14px;
    color: #555;
}

/* ========================================
   Mobile
======================================== */

@media (max-width: 700px) {
    .form-container {
        margin: 20px 10px;
        padding: 20px;
        width: auto;
    }

    .report-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .radio-group {
        flex-direction: column;
    }

    .answer-option-label {
        width: 100%;
        box-sizing: border-box;
    }

    .form-container table {
        font-size: 14px;
    }

    .dashboard-page {
        padding: 20px 12px;
    }

    .site-header-inner {
        padding: 12px;
    }
}

.dashboard-section {
    margin-top: 35px;
}

.dashboard-section > h2 {
    margin: 0 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d8edf8;
    color: #244b68;
    font-size: 22px;
    font-weight: 500;
}

.dashboard-card h3 {
    margin: 0 0 10px;
    color: #244b68;
    font-size: 19px;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.dashboard-menu {
    background: #ffffff;
    border: 1px solid #c5ddea;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.dashboard-menu h2 {
    margin: 0;
    padding: 14px 18px;
    background: #d8edf8;
    color: #244b68;
    font-size: 18px;
    font-weight: 500;
}

.dashboard-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px 18px;

    border-bottom: 1px solid #e5edf2;

    color: #244b68;
    text-decoration: none;
}

.dashboard-links a:last-child {
    border-bottom: none;
}

.dashboard-links a:hover {
    background: #edf4fb;
}

.menu-arrow {
    font-size: 22px;
    color: #7094aa;
}

@media (max-width: 700px) {
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Information pages
======================================== */

.content-page {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 35px 25px;
    box-sizing: border-box;
}

.content-page > h1 {
    margin: 0 0 30px;
    padding-bottom: 12px;
    border-bottom: 3px solid #d8edf8;
    color: #244b68;
    font-size: 28px;
    font-weight: 500;
}

.info-section {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    align-items: start;

    margin-bottom: 35px;
    padding: 25px;

    background: #fff;
    border: 1px solid #c5ddea;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.info-section img {
    max-width: 250px;
    max-height: 250px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

.info-section h2 {
    margin: 0 0 12px;
    color: #244b68;
    font-size: 21px;
}

.info-section ul {
    margin: 0;
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 6px;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .content-page {
        padding: 20px 12px;
    }

    .info-section {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }

    .info-section img {
        max-width: 100%;
    }
}

/* ========================================
   Asset Lookup
======================================== */

.asset-lookup {
    max-width: 600px;
    padding: 30px;

    background: #ffffff;
    border: 1px solid #c5ddea;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.asset-intro {
    margin: 0 0 15px;
    color: #244b68;
    font-size: 18px;
}

.asset-lookup-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.asset-id-input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;

    border: 1px solid #9bb8cb;
    border-radius: 5px;

    background: #edf4fb;

    font-family: inherit;
    font-size: 16px;
    box-sizing: border-box;
}

.asset-id-input:focus {
    outline: none;
    border-color: #4e768f;
    box-shadow: 0 0 0 3px rgba(78, 118, 143, 0.12);
}

.asset-lookup-form .btn-submit {
    margin: 0;
}

.asset-help {
    margin: 20px 0 0;
    color: #666;
    font-size: 14px;
}

@media (max-width: 500px) {

    .asset-lookup-form {
        flex-direction: column;
    }

    .asset-lookup-form .btn-submit {
        width: 100%;
    }
}

/* ========================================
   Random Scenario
======================================== */

.scenario-card {
    max-width: 700px;
    padding: 30px;

    background: #ffffff;
    border: 1px solid #c5ddea;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.scenario-text {
    margin: 0 0 25px;

    font-size: 26px;
    font-style: italic;
    font-weight: 500;

    color: #b00020;
    line-height: 1.4;
}

.scenario-button {
    display: inline-block;

    padding: 10px 18px;

    border: 1px solid #4e768f;
    border-radius: 6px;

    background: #cbeaff;
    color: #244b68;

    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.scenario-button:hover {
    background: #addfff;
}

.scenario-help {
    margin: 25px 0 0;
    color: #666;
    line-height: 1.5;
}

/* ========================================
   CPAD Administration
======================================== */

.cpad-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 35px 25px;
    box-sizing: border-box;
}

.cpad-page h1 {
    margin: 0 0 12px;
    padding-bottom: 12px;

    border-bottom: 3px solid #d8edf8;

    color: #244b68;
    font-size: 28px;
    font-weight: 500;
}

.cpad-help {
    margin-bottom: 25px;
    color: #555;
    line-height: 1.5;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.asset-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 160px;
    padding: 20px;
    box-sizing: border-box;

    background: #fff;
    border: 4px solid #4caf50;
    border-radius: 12px;

    text-align: center;
    text-decoration: none;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.asset-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.12);
}

.asset-card.overdue {
    border-color: #f0a000;
}

.asset-card.due {
    border-color: #d32f2f;
}

.asset-icon {
    display: block;
    width: 90px;
    max-width: 100%;
    height: auto;
    margin: 0 auto 12px;
}

.asset-title {
    color: #244b68;
    font-size: 18px;
    font-weight: 600;
}

.toast {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);

    padding: 14px 22px;

    background: #4caf50;
    color: #fff;

    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);

    font-size: 20px;

    opacity: 0;
    transition: opacity 0.5s;

    z-index: 9999;
}

.toast.show {
    opacity: 1;
}

@media (max-width: 700px) {
    .cpad-page {
        padding: 20px 12px;
    }

    .asset-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .asset-card {
        padding: 15px 10px;
    }

    .asset-icon {
        width: 65px;
    }

    .asset-title {
        font-size: 15px;
    }
}
/* ========================================
   CPAD inspection form
======================================== */

.form-section {
    margin: 15px 0 20px;
    padding: 18px;

    background: #fbfdff;
    border: 1px solid #d9e6ef;
    border-radius: 8px;
}

.readonly {
    background: #f3f5f7 !important;
    color: #555;
}

.form-container input[type="number"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #9bb8cb;
    border-radius: 5px;
    background: #edf4fb;
    box-sizing: border-box;
    font-size: 16px;
}

.form-container input[readonly] {
    cursor: default;
}

.form-container .radio-group {
    margin-top: 6px;
}

.form-container .answer-option-label {
    min-width: 70px;
}

/* ========================================
   Member Information
======================================== */

.member-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 35px 25px;
    box-sizing: border-box;
}

.member-page h1 {
    margin: 0 0 10px;
    padding-bottom: 12px;
    border-bottom: 3px solid #d8edf8;

    color: #244b68;
    font-size: 28px;
    font-weight: 500;
}

.member-intro {
    margin: 18px 0 20px;
    color: #555;
}


/* ========================================
   Member filters
======================================== */

.member-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin: 0 0 35px;
}

.filter-btn {
    padding: 8px 15px;

    background: #fff;
    border: 1px solid #aaa;
    border-radius: 20px;

    color: #222;
    font-family: inherit;
    font-size: 15px;

    cursor: pointer;
}

.filter-btn:hover {
    background: #edf4fb;
}

.filter-btn.active {
    border-color: green;
}

.filter-btn.supporter {
    border-color: orange;
}

.filter-btn.inactive {
    border-color: red;
}

.filter-btn.other {
    border-color: gray;
}

.filter-btn.selected {
    background: #244b68;
    border-color: #244b68;
    color: #fff;
}


/* ========================================
   Member cards
======================================== */

.member-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 38px 40px;
}

.member-card {
    min-height: 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 14px 20px;

    background: #fff;

    border: 2px solid gray;
    border-radius: 18px;

    box-shadow: 0 3px 10px rgba(0,0,0,0.14);

    color: #263d55;

    font-size: 18px;
    font-weight: 600;

    text-align: center;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}

.member-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.20);
}

.member-card.active {
    border-color: green;
}

.member-card.supporter {
    border-color: orange;
}

.member-card.inactive {
    border-color: red;
}

.member-card.other {
    border-color: gray;
}


/* ========================================
   Member modal
======================================== */

.modal {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 9999;

    background: rgba(0,0,0,0.55);

    padding: 6vh 20px;

    box-sizing: border-box;
}

.modal-content {
    position: relative;

    width: 100%;
    max-width: 640px;
    max-height: 88vh;

    margin: 0 auto;

    padding: 28px 28px 50px;

    box-sizing: border-box;

    background: #fff;

    border-radius: 16px;

    box-shadow: 0 20px 40px rgba(0,0,0,0.25);

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.close {
    position: absolute;

    top: 10px;
    right: 16px;

    color: #777;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;
}

.close:hover {
    color: #222;
}

.modal-handle {
    width: 40px;
    height: 4px;

    margin: 0 auto 18px;

    background: #ccc;

    border-radius: 2px;
}

#modalBody h2 {
    margin: 0 0 18px;

    color: #244b68;

    font-size: 24px;
    font-weight: 500;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
}

.modal-table th,
.modal-table td {
    padding: 10px 8px;

    border-bottom: 1px solid #e5edf2;

    text-align: left;
    vertical-align: top;
}

.modal-table th {
    width: 40%;

    color: #555;

    font-weight: 600;
}

.modal-table td {
    color: #222;

    overflow-wrap: anywhere;
}

.modal-table a {
    color: #244b68;
}

body.modal-open {
    overflow: hidden;
}


/* ========================================
   Member page mobile
======================================== */

@media (max-width: 700px) {

    .member-page {
        padding: 20px 12px;
    }

    .member-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .member-card {
        min-height: 70px;

        padding: 14px 10px;

        font-size: 15px;
    }

    .member-summary {
        gap: 8px;
        margin-bottom: 25px;
    }

    .filter-btn {
        padding: 7px 12px;
        font-size: 14px;
    }

    .modal {
        padding: 4vh 10px;
    }

    .modal-content {
        max-height: 92vh;

        padding: 25px 18px 50px;
    }
    
    /* Hours datagrid */
    .hours-page {
    width: calc(100% - 20px);
    margin: 20px auto;
    overflow-x: auto;
    }
    
    /* Calls datagrid */
    .calls-page {
        width: calc(100% - 20px);
        margin: 20px auto;
        overflow-x: auto;
    }

    /* Assets datagrid */
    .assets-page {
        width: calc(100% - 20px);
        margin: 20px auto;
        overflow-x: auto;
    }

    /* Member Administration datagrid */
    .member-admin-page {
        width: calc(100% - 20px);
        margin: 20px auto;
        overflow-x: auto;
    }
}