:root {
    --haip-green: #0ba75d;
    --haip-green-dark: #07864a;
    --haip-green-soft: rgba(11, 167, 93, 0.18);
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-weight: 400;
    color: #172033;
    background: #f3f6fa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

a {
    color: #0a6b4d;
}

.wrap {
    max-width: 760px;
    margin: 8vh auto;
    padding: 0 20px;
}

.wrap.admin {
    max-width: 1040px;
    margin-top: 6vh;
}

.card {
    background: #ffffff;
    border-radius: 0;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(25, 35, 58, 0.1);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 78px;
    text-decoration: none;
}

.logo-mark img {
    width: 56px;
    height: 78px;
    object-fit: contain;
}

.brand-name,
.brand-subtitle {
    margin: 0;
}

.brand-name {
    color: #0d2438;
    font-weight: 600;
}

.brand-subtitle {
    color: #5f7282;
    font-size: 0.92rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.topbar .brand {
    margin-bottom: 0;
}

.nav-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

h1 {
    margin: 0 0 14px;
    color: #0d2438;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.05;
    font-weight: 600;
}

h2 {
    margin: 30px 0 12px;
    color: #0d2438;
    font-size: 1.28rem;
    font-weight: 600;
}

.intro,
.muted {
    line-height: 1.55;
}

.intro {
    margin: 0;
    color: #000000;
    font-size: 1.05rem;
    font-weight: 300;
}

.muted {
    color: #526676;
}

form {
    margin-top: 26px;
}

.section-form {
    padding-top: 4px;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 14px;
}

label {
    display: block;
    margin: 16px 0 6px;
    color: #24364a;
    font-weight: 600;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type=email],
input[type=text],
input[type=url],
input[type=password],
input[type=file],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #bbc4d1;
    border-radius: 0;
    background: #ffffff;
    font: inherit;
}

input:focus {
    outline: 3px solid var(--haip-green-soft);
    border-color: var(--haip-green);
}

.turnstile-frame {
    margin-top: 18px;
}

button,
.button {
    display: inline-block;
    margin-top: 18px;
    border: 0;
    border-radius: 0;
    padding: 12px 17px;
    background: var(--haip-green);
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--haip-green-dark);
}

.danger {
    margin: 0;
    padding: 8px 12px;
    background: #b53535;
}

.danger:hover {
    background: #982929;
}

.notice {
    margin: 18px 0;
    padding: 12px;
    border-radius: 0;
    color: #17456f;
    background: #edf5ff;
}

.privacy-note {
    margin: 22px 0 0;
    color: #667085;
    font-size: 0.88rem;
    line-height: 1.5;
}

.privacy-note a {
    color: #0a6b4d;
}

.error {
    color: #8a1717;
    background: #fff0f0;
}

.table-section {
    margin-top: 8px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    margin-top: 8px;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid #e3e7ed;
    text-align: left;
    vertical-align: top;
}

th {
    color: #526676;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
}

td a {
    overflow-wrap: anywhere;
}

.inline {
    display: inline;
}

.bulk-form {
    margin: 0;
}

.bulk-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 10px;
}

.bulk-actions .danger {
    margin-top: 0;
}

.mapping-checkbox,
#select_all_mappings {
    width: 18px;
    height: 18px;
    accent-color: var(--haip-green);
}

.chip-form {
    display: inline-block;
    margin: 0 6px 6px 0;
}

.chip {
    margin: 0;
    padding: 4px 8px;
    border: 1px solid #d7e2ea;
    background: #f8fafc;
    color: #24364a;
    font-size: 0.82rem;
    font-weight: 400;
}

.chip:hover {
    background: #eef3f6;
}

.status {
    display: inline-block;
    border-radius: 0;
    padding: 4px 9px;
    font-size: 0.82rem;
    font-weight: 600;
}

.status.active {
    color: #0b6549;
    background: #dff8eb;
}

.status.inactive {
    color: #6d7480;
    background: #eef1f4;
}

@media (max-width: 720px) {
    .wrap {
        margin: 24px auto;
    }

    .topbar,
    .row {
        display: block;
    }

    .nav-links {
        margin-top: 16px;
    }

    .card {
        padding: 22px;
    }
}
