.form-narrow {
    max-width: 100%;
    margin: 1rem auto;
}

.site-header {
    margin-left: 10px;
    padding: 0.5rem 2rem;
}

/* Flex layout for nav */
    .site-header nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: .5rem 1rem;
    }

    .site-header .brand {
        display: flex;
        align-items: center;
        gap: .75rem;
    }

    /* Brand (left side) */
    .site-header .brand h3,
    .site-header .brand h5 {
        margin: 0;
        line-height: 1.5;
    }

    .site-header .brand h3 {
        color: purple;
    }

    .site-header .brand h5 {
        font-weight: normal;
        font-size: 0.9rem;
        color: #555;
    }

    .site-header .menu {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

        .site-header .menu h4 {
            margin: 0;
            padding-top: .25rem;
            color: purple;
            text-align: right;
            white-space: nowrap;
        }

        .site-header .menu ul {
            display: flex;
            gap: 1.5rem;
            list-style: none;
            margin: .4rem 0 0 0;
            padding: 0;
            align-items: center;
            justify-content: flex-end;
        }

    .site-header .dropdown {
        position: relative;
        display: inline-block;
    }

        .site-header .dropdown ul {
            position: absolute;
            right: 0;
            left: auto;
            top: calc(100% + .25rem);
            min-width: 12rem;
            margin: 0;
            padding: .25rem .5rem;
            list-style: none;
            border-radius: .5rem;
            border: 1px solid rgba(0,0,0,.12);
            background: #fff;
            overflow: hidden;
            text-align: right;
            line-height: normal;
        }

            .site-header .dropdown ul li {
                margin: 0;
                padding: 0;
            }

                .site-header .dropdown ul li details ul {
                    margin: 0;
                    padding: 0;
                }

                    .site-header .dropdown ul li details ul li a {
                        display: block;
                        margin: 0;
                        padding: .25rem .75rem; /* smaller padding top/bottom */
                        line-height: 1; /* tightly pack vertical space */
                        font-size: .9rem;
                    }

.action-buttons {
    padding: 0.5rem 0.75rem; /* slimmer button */
    margin-top: .5rem;
    width: 10rem;
}


.background-green {
    background-color: #00895A;
}

.button-default {
    border-radius: var(--pico-border-radius);
    margin-top: .5rem;
    min-width: 6rem;
}

.button-details {
    padding: 0.5rem 0.75rem; /* slimmer button */
    margin-top: .5rem;
    width: 6rem;
}

.inline-row {
    display: flex;
    align-items: flex-start; /* top-align blocks; or center */
    gap: .5rem;
    flex-wrap: nowrap; /* keep button on same line */
}

    .inline-row .grow {
        flex: 1 1 auto; /* let left side take remaining space */
        min-width: 0; /* allow wrapping of long text */
    }

.push-right {
    margin-left: auto; /* push button to the right */
    white-space: nowrap; /* prevent button text wrapping */
}

.curriculum-group legend {
    font-weight: bold;
    margin-top: 1.5em;
}

.details-action-button {
    padding: 0.5rem 0.75rem; /* slimmer button */
    margin-top: .5rem;
    width: 6rem;
    min-width: 6em;
}

.button-hide {
    color: black;
    background-color: white;
    border-color: black;
    border-width: thin;

}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}


.member-search {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}



.member-information {
    list-style: none !important; /* force remove bullets */
    margin: 0; /* remove extra space */
    line-height: 2rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #ffe6e6;
    color: #a33;
    border: 1px solid #a33;
}

.alert-success {
    background: #e6ffe6;
    color: #2d7;
    border: 1px solid #2d7;
}

.user-admin
.reporting {
    display: grid;
    gap: 1rem;
}

    .user-admin
    .reporting button {
        padding: 0.5rem 0.75rem; /* slimmer button */
        margin-top: .5rem;
        max-width: 12em;
        min-width: 10em;
    }




.member-details {
    display: grid;
    gap: 1rem;
}

.add-member-details ul,
.add-member-details ul li,
.member-details ul,
.member-details ul li {
    list-style: none;
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    line-height: 2rem;
}

.card {
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--card-bg, #fff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 2fr 1.25fr;
    border: 1px solid #ccc;
    border-radius: .5rem;
    overflow: hidden;
}
    .user-grid > div {
        padding: .6rem .75rem; 
        border-bottom: 1px solid #eee;
    }

/* vertical borders between columns */
        .user-grid > div:not(:nth-child(5n)) {
            border-right: 1px solid #eee;
        }

/* ======== Header Styling ======== */
.user-grid-th {
    font-weight: 600;
    background: #f8f9fb;
    border-bottom: 2px solid #ccc;
}


/* 768px: inline input + grouped buttons; sensible widths */
@media (min-width: 768px) {

    .member-search {
        display: flex;
        gap: 2rem;
        margin-bottom: 1rem;
    }

    .member-search .search-area {
        flex: 1;
        margin: 0;
        min-width: 22rem;
        max-width: 48rem;
        width: 100%;
    }

    .member-search .reset-search {
        width: 8rem;
        max-width: 8rem;
    }
    html {
        font-size: 16px;
    }

    .form-narrow {
        max-width: 400px; /* constrain width */
        margin: 2rem auto;
    }

    .member-details {
/*        grid-template-columns: 1fr 1fr;*/
        grid-template-columns: 1fr 1fr 1fr;
    }

}

@media (max-width: 768px){
    .user-grid {
        grid-template-columns: 1fr; /* stack vertically */
    }

        .user-grid .th {
            display: none; /* hide header row */
        }

        .user-grid > div {
            border-right: 0;
        }
}


/* Scope styles to our modals only */
dialog.compact-modal article {
    max-width: 420px; /* nice readable width */
    margin: 0 auto;
    padding: var(--pico-spacing);
}

/* Make date input not 100% width */
dialog.compact-modal input[type="date"] {
    inline-size: min(16rem, 100%);
}

/* Neat row with label and control */
.field-inline {
    display: flex;
    align-items: center;
    gap: .75rem;
}

    .field-inline label {
        min-width: 4.5rem; /* keeps label from wrapping awkwardly */
        margin: 0;
    }

/* Footer buttons */
dialog.compact-modal footer.grid {
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

/* Optional: smaller heading inside modal */
dialog.compact-modal header h3 {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.2;
}

/* Optional: subtle open/close animation */
dialog.compact-modal[open] article {
    transform: translateY(-2px);
    transition: transform .12s ease-out;
}


/* Compact, aligned rows */
.form-row {
    display: grid;
    grid-template-columns: 7rem 1fr; /* label width | control */
    align-items: center;
    gap: .75rem;
    margin-block: .5rem;
}

    /* Keep controls from stretching comically wide */
    .form-row input[type="date"] {
        inline-size: min(16rem, 100%);
    }

    /* Switch/checkbox shouldn’t stretch */
    .form-row input[type="checkbox"] {

    }


.lookup-results {
    position: relative;
    margin-top: .25rem;
    border: 1px solid var(--muted-border-color, #4443);
    border-radius: .5rem;
    max-height: 16rem;
    overflow: auto;
}

    /* Make the option text clearly readable */
    .lookup-results button[role="option"] {
        color: #000 !important; /* force black in light mode */
        background: transparent;
    }

        /* If you render extra bits like <small class="contrast">, un-dim them */
        .lookup-results button[role="option"] small,
        .lookup-results button[role="option"] strong {
            color: inherit !important;
        }

        /* Hover/selected state still visible */
        .lookup-results button[role="option"]:hover,
        .lookup-results button[role="option"][aria-selected="true"] {
            background: var(--pico-muted-border-color, rgba(0,0,0,.06));
        }

    .lookup-results button {
        display: block;
        width: 100%;
        text-align: left;
        padding: .5rem .75rem;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .lookup-results button:hover,
    .lookup-results button[aria-selected="true"] {
        background: var(--muted-border-color, #4441);
    }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

table th,
table td {
    padding: 0.25rem 0.5rem; /* top/bottom, left/right */
    line-height: 1.2; /* tighter line height */
    vertical-align: middle;
}

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

body {
    margin-bottom: 60px;
}

