.abm-wrap {
    --abm-green: #015f43;
    --abm-green-dark: #024331;
    --abm-green-soft: #e9f4ef;
    --abm-gold: #c9993f;
    --abm-ink: #18332b;
    --abm-muted: #63756f;
    --abm-line: #dfe8e4;
    --abm-bg: #f7faf8;
    --abm-danger: #9a3c34;
    color: var(--abm-ink);
    font-family: inherit;
    line-height: 1.55;
}

.abm-section {
    background: #fff;
    border: 1px solid var(--abm-line);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(1, 95, 67, 0.07);
    margin: 0 0 26px;
    padding: 28px;
}

.abm-section h2 {
    color: var(--abm-green-dark);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 20px;
}

.abm-section h2::after {
    background: var(--abm-gold);
    content: "";
    display: block;
    height: 3px;
    margin-top: 10px;
    width: 54px;
}

.abm-heading-note {
    color: var(--abm-muted);
    display: inline;
    font-size: 14px;
    font-weight: 600;
}

.abm-specialty-match {
    font-weight: 900;
}

.abm-modal-backdrop {
    align-items: center;
    background: rgba(25, 47, 70, 0.48);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 99999;
}

.abm-modal {
    background: #fff;
    border: 1px solid var(--abm-line);
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(25, 47, 70, 0.26);
    max-width: 560px;
    padding: 28px;
    position: relative;
    width: 100%;
}

.abm-modal p {
    color: var(--abm-ink);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.55;
    margin: 0 0 20px;
}

.abm-modal-close {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--abm-ink);
    cursor: pointer;
    display: inline-flex;
    font-size: 28px;
    height: 34px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: 14px;
    top: 12px;
    width: 34px;
}

.abm-modal-close:hover {
    color: #192f46;
}

.abm-form,
.abm-reject-form {
    display: grid;
    gap: 18px;
}

.abm-filter-form {
    align-items: end;
    background: var(--abm-bg);
    border: 1px solid var(--abm-line);
    border-radius: 12px;
    display: grid;
    gap: 14px;
    grid-template-columns: 2fr 1fr 1fr auto;
    margin-bottom: 18px;
    padding: 16px;
}

.abm-form label,
.abm-form fieldset,
.abm-filter-form label {
    color: var(--abm-green-dark);
    display: grid;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.abm-form input,
.abm-form select,
.abm-form textarea,
.abm-filter-form input,
.abm-filter-form select,
.abm-reject-form textarea {
    background: #fff;
    border: 1px solid #cfdcd6;
    border-radius: 10px;
    color: var(--abm-ink);
    font: inherit;
    min-height: 44px;
    padding: 11px 13px;
    width: 100%;
}

.abm-form input:focus,
.abm-form select:focus,
.abm-form textarea:focus,
.abm-filter-form input:focus,
.abm-filter-form select:focus,
.abm-reject-form textarea:focus {
    border-color: var(--abm-green);
    box-shadow: 0 0 0 3px rgba(1, 95, 67, 0.12);
    outline: none;
}

.abm-form textarea,
.abm-reject-form textarea {
    min-height: 118px;
}

.abm-form fieldset {
    background: var(--abm-bg);
    border: 1px solid var(--abm-line);
    border-radius: 12px;
    padding: 16px;
}

.abm-form legend {
    color: var(--abm-green-dark);
    font-weight: 800;
    padding: 0 8px;
}

.abm-choice {
    align-items: start;
    color: var(--abm-ink) !important;
    display: grid !important;
    font-weight: 500 !important;
    gap: 10px !important;
    grid-template-columns: 18px minmax(0, 1fr);
    line-height: 1.45;
    margin: 0 !important;
    padding: 4px 0 !important;
}

.abm-choice input {
    align-self: start;
    height: 16px !important;
    margin: 3px 0 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    position: static !important;
    width: 16px !important;
}

.abm-choice span {
    display: block;
    min-width: 0;
}

.abm-required {
    color: var(--abm-danger);
    font-weight: 900;
}

.abm-optional {
    color: var(--abm-muted);
    font-weight: 700;
}

.abm-required-legend {
    color: var(--abm-muted);
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}

.abm-button,
.abm-link-button {
    align-items: center;
    background: #192f46;
    border: 1px solid #192f46;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0;
    line-height: 1.2;
    min-height: 44px;
    padding: 11px 20px;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.abm-button,
.abm-button:visited,
.abm-button:focus {
    color: #fff !important;
}

.abm-button:hover,
.abm-link-button:hover {
    background: #102235;
    border-color: #102235;
    color: var(--abm-gold) !important;
    transform: translateY(-1px);
}

.abm-button:hover *,
.abm-button:focus *,
.abm-link-button:hover *,
.abm-link-button:focus * {
    color: var(--abm-gold) !important;
}

.abm-button-small {
    min-height: 36px;
    padding: 8px 14px;
}

.abm-wrap .abm-section .abm-button:not(.abm-button-small) {
    height: auto;
    max-width: 100%;
    text-align: center;
    white-space: normal;
    width: 350px;
}

.abm-wrap .abm-section .abm-table .abm-button,
.abm-wrap .abm-section .abm-button-small {
    max-width: none;
    white-space: nowrap;
    width: auto;
}

.abm-wrap .abm-section .abm-member-main-button {
    width: 500px;
}

.abm-button-secondary {
    background: var(--abm-danger);
    border-color: var(--abm-danger);
}

.abm-button-secondary:hover {
    background: #753029;
    border-color: #753029;
    color: var(--abm-gold) !important;
}

.abm-wrap .abm-form button.abm-button[type="submit"],
.abm-wrap .abm-form input.abm-button[type="submit"] {
    background: #192f46 !important;
    border-color: #192f46 !important;
    color: #fff !important;
}

.abm-wrap .abm-form button.abm-button[type="submit"]:hover,
.abm-wrap .abm-form button.abm-button[type="submit"]:focus,
.abm-wrap .abm-form input.abm-button[type="submit"]:hover,
.abm-wrap .abm-form input.abm-button[type="submit"]:focus {
    background: #102235 !important;
    border-color: #102235 !important;
    color: var(--abm-gold) !important;
}

.abm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.abm-dashboard-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 16px 0 28px;
}

.abm-metric {
    background: var(--abm-bg);
    border: 1px solid var(--abm-line);
    border-radius: 12px;
    display: grid;
    gap: 8px;
    padding: 18px;
}

.abm-metric strong {
    color: var(--abm-green-dark);
    font-size: 32px;
    line-height: 1;
}

.abm-metric span {
    color: var(--abm-muted);
    font-weight: 700;
}

.abm-metric-link {
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.abm-metric-link:hover {
    border-color: var(--abm-gold);
    box-shadow: 0 14px 34px rgba(25, 47, 70, 0.14);
    transform: translateY(-1px);
}

.abm-dashboard-report {
    margin-top: 24px;
}

.abm-dashboard-click-row {
    cursor: pointer;
}

.abm-dashboard-click-row:focus td,
.abm-dashboard-click-row:hover td {
    background: #eef5f1;
}

.abm-dashboard-modal {
    overflow: auto;
}

.abm-dashboard-modal-box {
    max-height: calc(100vh - 48px);
    max-width: 1040px;
    overflow: auto;
}

.abm-dashboard-modal-box h2 {
    color: var(--abm-green-dark);
    font-size: 24px;
    line-height: 1.2;
    margin: 0 42px 20px 0;
}

.abm-dashboard-modal-box h3 {
    color: var(--abm-green-dark);
    margin: 22px 0 12px;
}

.abm-link-button {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--abm-green);
    min-height: auto;
    padding: 0;
    text-decoration: underline;
}

.abm-link-button:hover {
    background: #102235;
    color: var(--abm-gold) !important;
    transform: none;
}

.abm-table-scroll {
    border: 1px solid var(--abm-line);
    border-radius: 12px;
    max-height: 500px;
    overflow: auto;
}

.abm-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
    width: 100%;
}

.abm-table th,
.abm-table td {
    border-bottom: 1px solid var(--abm-line);
    padding: 14px;
    text-align: left;
    vertical-align: top;
}

.abm-table th {
    background: #192f46;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.abm-sort-button {
    appearance: none;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 0;
    text-align: left;
    width: 100%;
}

.abm-sort-button:hover,
.abm-sort-button:focus {
    color: #fff;
    text-decoration: underline;
}

#abm-invite-members-table th,
#abm-invite-members-table td,
#abm-invite-members-table .abm-sort-button {
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: normal;
}

#abm-invite-members-table .abm-sort-button {
    line-height: 1.25;
}

.abm-sort-button[data-sort-dir="asc"]::after {
    content: " ↑";
}

.abm-sort-button[data-sort-dir="desc"]::after {
    content: " ↓";
}

.abm-table tbody tr:nth-child(even) td {
    background: var(--abm-bg);
}

.abm-table tbody tr:hover td {
    background: var(--abm-green-soft);
}

.abm-table tr:last-child td {
    border-bottom: 0;
}

.abm-status-date-late {
    font-weight: 800;
}

.abm-status-date-critical {
    color: var(--abm-danger);
    font-weight: 800;
}

.abm-notice {
    background: var(--abm-green-soft);
    border: 1px solid #b8d9cb;
    border-left: 5px solid var(--abm-green);
    border-radius: 12px;
    color: var(--abm-green-dark);
    margin: 0 0 18px;
    padding: 14px 16px;
}

.abm-error {
    background: #fff1ef;
    border-color: #ecc4bf;
    border-left-color: var(--abm-danger);
    color: #743028;
}

.abm-detail-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.abm-detail-card {
    border: 1px solid var(--abm-line);
    border-radius: 12px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.abm-detail-card h3 {
    color: var(--abm-green);
    font-size: 16px;
    margin: 0;
}

.abm-detail {
    background: var(--abm-bg);
    border: 1px solid var(--abm-line);
    border-radius: 12px;
    display: grid;
    gap: 6px;
    padding: 14px;
}

.abm-detail strong {
    color: var(--abm-green);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.abm-detail strong a {
    color: inherit;
    font-size: 13px;
    margin-left: 4px;
    text-decoration: none;
}

.abm-detail span,
.abm-detail a {
    color: var(--abm-ink);
}

.abm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.abm-inline-form {
    display: inline-block;
    margin: 0 8px 0 0;
}

.abm-back-link {
    color: var(--abm-green);
    font-weight: 800;
    text-decoration: none;
}

.abm-back-link:hover {
    color: var(--abm-green-dark);
    text-decoration: underline;
}

@media (max-width: 720px) {
    .abm-section {
        border-radius: 12px;
        padding: 18px;
    }

    .abm-section h2 {
        font-size: 21px;
    }

    .abm-detail-grid {
        grid-template-columns: 1fr;
    }

    .abm-filter-form {
        grid-template-columns: 1fr;
    }
}
