/* agents.harborandhelm.group — styles matching the Harbor & Helm brand
   (colors and fonts taken from harborandhelm.group's harborhelm theme). */

@font-face {
    font-family: 'thyssenjhh';
    src: url('../fonts/thyssenjhh-_-webfont.woff2') format('woff2'),
         url('../fonts/thyssenjhh-_-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'sourcesanspro';
    src: url('../fonts/sourcesanspro-regular-webfont.woff2') format('woff2'),
         url('../fonts/sourcesanspro-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

:root {
    --hh-cream: #FAF9F4;
    --hh-navy: #2F3D4C;
    --hh-lightblue: #B7D4D4;
    --hh-rust: #924D3D;
    --hh-text: #404040;
    --hh-link: #4169e1;
    --hh-link-hover: #191970;
}

*, *::before, *::after { box-sizing: border-box; }

/* The hidden attribute always wins, even over rules that set display */
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--hh-cream);
    color: var(--hh-text);
    font-family: 'sourcesanspro', serif;
    font-size: 1.1em;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'thyssenjhh', serif;
    text-transform: uppercase;
    color: var(--hh-navy);
}

a { color: var(--hh-link); }
a:hover, a:focus, a:active { color: var(--hh-link-hover); }

img { max-width: 100%; height: auto; }

/* Header / navigation — matches the main site: branding, navy nav with
   light-blue stripe, then the cream/red .banding stripe below it. */
.site-header { text-align: center; }

.banding {
    padding: 3px;
    margin: 0;
    background-color: var(--hh-cream);
    border-bottom: 8px solid var(--hh-rust); /* red stripe under the nav */
}

.banding-blue {
    padding: 6px;
    margin-bottom: 12px;
    background-color: var(--hh-navy); /* navy stripe above the footer */
    border-bottom: 8px solid var(--hh-lightblue);
}

.custom-logo-link {
    display: inline-block;
    margin-top: 16px;
}

/* Logo at 80% of its natural 300px width */
.custom-logo { width: 240px; height: auto; }

.main-navigation {
    width: 100%;
    background-color: var(--hh-navy);
    border-bottom: 16px solid var(--hh-lightblue);
    font-size: calc(1em - 2pt); /* 2pt smaller than body text */
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.main-navigation a {
    display: block;
    text-decoration: none;
    color: var(--hh-cream);
    padding: 10px 16px;
}

.main-navigation a:hover,
.main-navigation a:focus {
    color: var(--hh-lightblue);
}

/* Main content */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.hero {
    text-align: center;
    margin-bottom: 24px;
}

/* Login modal — the ship image lives only here */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(47, 61, 76, 0.7); /* navy scrim */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-overlay[hidden] { display: none; }

.modal-card {
    position: relative;
    background: var(--hh-cream);
    border-radius: 12px;
    border-top: 8px solid var(--hh-lightblue);
    border-bottom: 8px solid var(--hh-rust);
    padding: 24px 32px 32px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.modal-card h2 { margin: 0 0 12px; }

/* Small, faded ship — same width and filter treatment as the main site */
.modal-ship {
    width: 150px;
    filter: invert(1) opacity(0.1) invert(1);
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: none;
    font-size: 1.5em;
    line-height: 1;
    color: var(--hh-navy);
    cursor: pointer;
    padding: 4px;
}

.login-form {
    text-align: left;
    max-width: 320px;
    margin: 0 auto;
}

.login-form label {
    display: block;
    margin: 12px 0 4px;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--hh-navy);
    border-radius: 3px;
    font-size: 1em;
}

.btn-primary {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    background: var(--hh-navy);
    color: var(--hh-cream);
    border: none;
    border-bottom: 4px solid var(--hh-lightblue);
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
}

.btn-primary:hover { background: #3d4f63; }

.form-error {
    color: var(--hh-rust);
    font-weight: 700;
}

.form-notice {
    color: var(--hh-navy);
    font-weight: 700;
}

.modal-alt {
    text-align: center;
    margin: 12px 0 0;
    font-size: 0.9em;
}

.form-card .login-form { max-width: 360px; }

/* Link cards ([card] shortcode) — button-like boxes with a sensible max
   width, centered, instead of stretching to fill the row */
.dashboard-menu {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.dashboard-menu li {
    flex: 0 1 280px;
    max-width: 100%;
}

.dashboard-menu a {
    display: block;
    text-align: center;
    padding: 22px 16px;
    background: var(--hh-cream);
    border: 1px solid var(--hh-navy);
    border-bottom: 6px solid var(--hh-lightblue);
    border-radius: 12px;
    text-decoration: none;
    font-family: 'thyssenjhh', serif;
    text-transform: uppercase;
    color: var(--hh-navy);
    font-size: 1.1em;
}

.dashboard-menu a:hover {
    border-bottom-color: var(--hh-rust);
    color: var(--hh-navy);
}

/* Profile card — white panel like the main site's entry-content */
.profile-card {
    background-color: white;
    border: 1px solid var(--hh-navy);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.profile-photo-wrap { text-align: center; }

.profile-photo {
    width: 144px;
    height: 144px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--hh-lightblue);
}

.profile-heading { text-align: center; }

.profile-heading h1 { margin: 12px 0 0; }

.profile-title {
    margin: 4px 0 0;
    color: var(--hh-rust);
    font-weight: 700;
}

/* .dm-title was centred here for the old stacked card (photo and title above
   the name). The editorial restyle made that card a left-aligned two-column
   layout and theme.css now owns .dm-title entirely, so the centring was
   orphaning the title against the name, address and buttons beside it. */

/* Team card and office card side by side; stacked on narrow screens */
.home-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 720px) {
    .home-cards { grid-template-columns: 3fr 2fr; }
}

.home-cards .profile-card { margin-bottom: 0; }

.dm-info {
    text-align: center;
    margin-top: 12px;
}

.dm-name { font-size: 1.2em; }

.dm-hours {
    max-width: 320px;
    margin: 24px auto 0;
}

/* Team card: DM on the left, staff stacked on the right;
   wraps to a single column on narrow screens */
.team-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px 48px;
}

.dm-block {
    flex: 1 1 260px;
    text-align: center;
}

.staff-col {
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.staff-member {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    /* Uniform row width so the headshot circles line up vertically */
    width: 100%;
    max-width: 300px;
}

.staff-photo {
    width: 108px;
    height: 108px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--hh-lightblue);
    flex-shrink: 0;
}

.staff-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hh-cream);
    color: var(--hh-navy);
    font-family: 'thyssenjhh', serif;
    font-size: 2em;
}

.staff-title {
    margin: 0;
    font-size: 0.9em;
    color: var(--hh-rust);
}

/* Two-class selector so this beats .agent-address's `margin: 0`,
   which appears later in this file */
.dm-hours .office-address {
    text-align: left;
    margin-bottom: 24px;
}

/* Agents directory — territory map washed behind the card */
.agents-card {
    position: relative;
    overflow: hidden; /* keep the map inside the rounded corners */
}

.agents-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/images/map.png') center / cover no-repeat;
    opacity: 0.2;
    pointer-events: none;
}

.agents-card > * {
    position: relative; /* content renders above the map layer */
}

.agents-title { margin: 0; }

.agents-map-link {
    margin: 6px 0 0;
    font-weight: 700;
}

/* District 10 Agency Map page — sized to the territory screenshot's ratio */
#agency-map {
    width: 100%;
    aspect-ratio: 2.2 / 1;
    min-height: 420px;
    border: 1px solid var(--hh-navy);
    border-radius: 8px;
    margin-top: 16px;
    z-index: 0; /* keep Leaflet controls under the site's modals */
}

#agency-map:fullscreen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
    border: none;
    border-radius: 0;
}

.map-fs-btn {
    font-size: 18px;
    line-height: 26px;
    text-align: center;
}

.map-popup {
    font-family: 'sourcesanspro', sans-serif;
    font-size: 0.95em;
    line-height: 1.5;
}

.pin-icon {
    background: none;
    border: none;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}

.agents-subtitle {
    margin: 4px 0 0;
    color: var(--hh-rust);
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 20px 24px;
    margin-top: 24px;
}

.agent {
    padding: 12px;
    border: 1px solid var(--hh-navy);
    border-left: 4px solid var(--hh-lightblue);
    background: var(--hh-cream); /* solid — fully opaque above the map */
    border-radius: 0 6px 6px 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease,
                border-left-color 0.15s ease, background 0.15s ease;
}

/* On-brand hover: lift the card, swap the light-blue edge for the rust
   banding accent, and let the name pick up the link color */
.agent:hover {
    background: white;
    border-left-color: var(--hh-rust);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(47, 61, 76, 0.18);
}

.agent:hover .agent-name a {
    color: var(--hh-link);
    text-decoration: underline;
}

.agent-name {
    margin: 0 0 4px;
    font-weight: 700;
    color: var(--hh-navy);
}

.agent-address {
    margin: 0;
    font-style: normal;
    font-size: 0.9em;
}

.agent-phone {
    margin: 4px 0 0;
    font-size: 0.9em;
}

.core-block h2 {
    font-size: 1.1em;
    border-bottom: 3px solid var(--hh-lightblue);
    padding-bottom: 6px;
}

.core-line { margin: 0 0 0.75em; font-style: normal; }

.hours-table {
    border-collapse: collapse;
    width: 100%;
}

.hours-table td { padding: 2px 0; }

.hours-day { font-weight: 700; }

.hours-time { text-align: right; }

.hours-closed { color: var(--hh-rust); }

/* Dashboard integrations */
.integration-card {
    margin-top: 24px;
    padding: 20px 24px;
    background: var(--hh-cream);
    border: 1px solid var(--hh-navy);
    border-left: 6px solid var(--hh-lightblue);
    border-radius: 12px;
}

.integration-card h2 { margin-top: 0; font-size: 1.1em; }
.integration-card h3 { font-size: 1em; }

.btn-inline {
    display: inline-block;
    width: auto;
    padding: 10px 24px;
    text-decoration: none;
    text-align: center;
}

.ms-events {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ms-events li {
    padding: 6px 0;
    border-bottom: 1px solid var(--hh-lightblue);
}

.ms-events li:last-child { border-bottom: none; }

.ms-event-when {
    display: inline-block;
    min-width: 11em;
    font-weight: 700;
    color: var(--hh-navy);
}

/* Admin panel */
.admin-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 16px 0 24px;
}

.pill {
    display: inline-block;
    padding: 8px 22px;
    border: 1px solid var(--hh-navy);
    border-radius: 999px;
    text-decoration: none;
    color: var(--hh-navy);
    background: var(--hh-cream);
    font-family: 'thyssenjhh', serif;
    text-transform: uppercase;
    font-size: 0.9em;
}

.pill:hover {
    border-bottom-color: var(--hh-rust);
    color: var(--hh-navy);
}

.pill-active,
.pill-active:hover {
    background: var(--hh-navy);
    color: var(--hh-cream);
    border-bottom: 3px solid var(--hh-lightblue);
}

.admin-intro {
    text-align: center;
    font-size: 0.95em;
    margin: 0 0 16px;
}

.card-explainer {
    font-size: 0.9em;
    color: #666;
    margin-top: 0;
}

/* Status banners */
.banner-warn,
.banner-success {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.95em;
    margin-bottom: 16px;
}

.banner-warn {
    background: #fdf6ec;
    border-left: 4px solid var(--hh-rust);
    color: #6b3a2e;
}

.banner-success {
    background: #eef5f0;
    border-left: 4px solid var(--hh-lightblue);
    color: var(--hh-navy);
}

.banner-sub {
    display: block;
    margin-top: 2px;
    font-size: 0.85em;
}

/* Inline status lines under forms */
.status-ok,
.status-note {
    font-size: 0.85em;
    margin: 10px 0 0;
}

.status-ok { color: #2e6b45; }
.status-note { color: #666; }

code {
    background: var(--hh-cream);
    border: 1px solid var(--hh-lightblue);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.9em;
}

.field-help {
    display: block;
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.login-form select,
.login-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--hh-navy);
    border-radius: 3px;
    font-size: 1em;
    font-family: inherit;
}

/* Day-of-week toggle chips */
.day-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.chip {
    padding: 8px 14px;
    border: 1px solid var(--hh-navy);
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    background: white;
    color: var(--hh-navy);
}

.chip input { display: none; }

.chip:has(input:checked) {
    background: var(--hh-navy);
    color: var(--hh-cream);
    border-bottom: 3px solid var(--hh-lightblue);
}

.ms-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.users-table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0 24px;
}

.users-table th {
    text-align: left;
    border-bottom: 2px solid var(--hh-navy);
    padding: 6px 8px;
}

.users-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--hh-lightblue);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-admin {
    background: var(--hh-navy);
    color: var(--hh-cream);
}

.badge-temp {
    background: var(--hh-rust);
    color: var(--hh-cream);
}

.inline-form { display: inline; }

.btn-danger {
    background: none;
    border: 1px solid var(--hh-rust);
    color: var(--hh-rust);
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 0.85em;
    cursor: pointer;
}

.btn-danger:hover {
    background: var(--hh-rust);
    color: var(--hh-cream);
}

.admin-create-form { margin: 0; }

/* Checkbox sits to the LEFT of its label text, on the same line */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 4px;
    font-weight: 700;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

/* Sub-section pills (smaller, under the main pills) */
.sub-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: -12px 0 20px;
}

.pill-sm {
    padding: 5px 14px;
    font-size: 0.85em;
}

/* Inline record editors (accounts) */
.record {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-bottom: 1px solid var(--hh-lightblue);
}

.record-add { border-bottom: none; }

.record-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.rf {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 110px;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    color: #777;
}

.rf input {
    padding: 6px 8px;
    border: 1px solid var(--hh-navy);
    border-radius: 3px;
    font-size: 1rem;
    font-weight: 400;
    width: 100%;
}

.rf-lg { flex: 2 1 150px; }
.rf-sm { flex: 0.8 1 70px; }
.rf-xs { flex: 0.6 1 58px; }

.record .btn-primary.btn-mini {
    width: auto;
    margin-top: 0;
    padding: 8px 16px;
}

.record .btn-danger { padding: 9px 12px; }

.record .checkbox-label {
    margin: 0 0 8px;
    flex: 0 0 auto;
}

.record-meta {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 9px;
    flex: 0 0 auto;
}

/* Directory listing with hover-to-edit (agents/staff admin) */
.dir-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 16px;
    margin-top: 12px;
}

.dir-item {
    position: relative;
    padding: 12px 14px;
    border-left: 4px solid var(--hh-lightblue);
    background: white;
    border-radius: 0 6px 6px 0;
    border-top: 1px solid var(--hh-lightblue);
    border-right: 1px solid var(--hh-lightblue);
    border-bottom: 1px solid var(--hh-lightblue);
}

.dir-item-staff {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* One block per office inside an agent's directory item */
.office-row + .office-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dotted var(--hh-lightblue);
}

.office-warn {
    margin: 4px 0 0;
    font-size: 0.8em;
    color: #a8281e;
}

/* Whether a staff member has a scheduling link set */
.staff-booking {
    margin: 4px 0 0;
    font-size: 0.78em;
    color: #2f7d5e;
}

.staff-booking-off {
    color: #999;
}

/* The district manager sits above the staff and edits a different table */
.dir-item-dm {
    border-left-color: var(--hh-navy);
}

.office-add {
    margin: 10px 0 0;
}

.btn-office {
    margin-top: 4px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--hh-navy);
    font: inherit;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.btn-office:hover {
    text-decoration: underline;
}

.dir-photo {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--hh-lightblue);
    flex-shrink: 0;
}

.dir-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hh-cream);
    color: var(--hh-navy);
    font-family: 'thyssenjhh', serif;
    font-size: 1.1em;
}

.btn-edit {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 12px;
    background: var(--hh-navy);
    color: var(--hh-cream);
    border: none;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}

.dir-item:hover .btn-edit,
.dir-item:focus-within .btn-edit,
.user-row:hover .btn-edit,
.user-row:focus-within .btn-edit {
    opacity: 1;
}

/* Touch devices have no hover — keep the button visible */
@media (hover: none) {
    .btn-edit { opacity: 1; }
}

.add-row {
    text-align: center;
    margin: 20px 0 0;
}

/* Edit modal (agents/staff) */
.modal-edit {
    text-align: left;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-edit h2 { text-align: center; }

.field-grid-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr;
    gap: 10px;
}

.modal-delete {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--hh-lightblue);
    text-align: center;
}

.back-link {
    margin: 0 0 8px;
    font-size: 0.95em;
    font-weight: 700;
}

.back-link a { text-decoration: none; }
.back-link a:hover { text-decoration: underline; }

/* Bonus reports — tabbed viewer */
.report-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.report-tabs .pill { cursor: pointer; background: white; }
.report-tabs .pill-active { background: var(--hh-navy); }

.report-block { margin-bottom: 32px; }

.report-name {
    margin: 0;
    font-size: 1.2em;
}

.report-date {
    margin: 2px 0 12px;
    font-size: 0.9em;
    color: var(--hh-rust);
    font-weight: 700;
}

.report-scroll { overflow-x: auto; }

/* Full-width tables; the per-report <colgroup> distributes the numeric
   columns evenly so the name column can't swallow the space */
.report-table {
    border-collapse: collapse;
    width: 100%;
}

.report-table th {
    background: var(--hh-navy);
    color: var(--hh-cream);
    text-align: left;
    padding: 8px 18px;
    font-size: 0.85em;
    text-transform: uppercase;
    white-space: nowrap;
}

.report-table td {
    padding: 7px 18px;
    border-bottom: 1px solid var(--hh-lightblue);
    white-space: nowrap;
}

.report-table th:first-child,
.report-table td:first-child { padding-left: 12px; }

.report-table tbody tr:nth-child(even) { background: var(--hh-cream); }
.report-table tbody tr:hover { background: #eef3f3; }

.report-table th.num,
.report-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.report-table td.neg { color: #b3372a; font-weight: 700; }

/* Report builder */
.rb-actions {
    display: flex;
    gap: 4px;
}

.cat-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cat-head h2 { margin: 0; }

.btn-move {
    background: white;
    border: 1px solid var(--hh-navy);
    color: var(--hh-navy);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.75em;
}

.btn-move:hover {
    background: var(--hh-navy);
    color: var(--hh-cream);
}

.modal-report { max-width: 620px; }

.modal-report textarea {
    font-family: consolas, monaco, monospace;
    font-size: 0.85em;
    white-space: pre;
}

/* Page-content editor wraps long lines (report paste boxes stay pre) */
.modal-report textarea.t-wrap {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons .btn-primary {
    flex: 1;
    margin-top: 0;
}

.btn-secondary {
    background: white;
    color: var(--hh-navy);
    border: 1px solid var(--hh-navy);
    border-bottom: 4px solid var(--hh-lightblue);
}

.btn-secondary:hover { background: var(--hh-cream); }

.btn-geocode {
    margin-top: 12px;
    width: 100%;
}

.btn-geocode:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Account list — compact rows for many users */
.user-list { margin-top: 12px; }

.user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 8px;
    border-bottom: 1px solid var(--hh-lightblue);
}

.user-row:hover { background: var(--hh-cream); }

.user-email {
    font-weight: 700;
    color: var(--hh-navy);
    flex: 1 1 220px;
}

a.user-email {
    text-decoration: none;
    cursor: pointer;
}

a.user-email:hover {
    color: var(--hh-link);
    text-decoration: underline;
}

.stats-email {
    text-align: center;
    font-weight: 700;
    color: var(--hh-rust);
    margin: 0 0 12px;
}

.stats-total td {
    font-weight: 700;
    border-top: 2px solid var(--hh-navy);
}

/* Pages list: aligned columns — Name | URL | Flags | Updated | Edit */
.page-list { overflow-x: auto; }

.page-list-head,
.page-list .page-row {
    display: grid;
    grid-template-columns: minmax(120px, 1.1fr) minmax(110px, 1fr) minmax(190px, 1.4fr) minmax(110px, 0.9fr) 70px;
    gap: 12px;
    align-items: center;
    min-width: 620px;
}

.page-list-head {
    padding: 6px 8px;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    color: #777;
    border-bottom: 2px solid var(--hh-navy);
}

.page-row .user-badges { white-space: nowrap; }
.page-row .btn-edit { margin-left: 0; justify-self: end; }

a.page-stats-link {
    text-decoration: none;
    cursor: pointer;
}

a.page-stats-link:hover {
    color: var(--hh-link);
    text-decoration: underline;
}

.user-badges { flex: 0 0 auto; }

.user-created {
    font-size: 0.8em;
    color: #888;
}

.user-row .btn-edit {
    position: static;
    margin-left: auto;
}

/* Legal pages */
.legal-card {
    overflow-wrap: break-word;
}

.legal-card h1 { font-size: 1.6em; }
.legal-card h2 { font-size: 1.3em; }

/* Footer — faded centered logo + muted small text, matching the family
   footers on jobs. and sales.harborandhelm.group */
.site-footer {
    text-align: center;
    font-size: calc(1em - 2pt); /* 2pt smaller than body text */
    padding: 28px 24px 36px;
    color: #999;
    line-height: 1.6;
}

.footer-logo {
    height: 56px;
    width: auto;
    opacity: 0.7;
    display: block;
    margin: 0 auto 14px;
}

.footer-org {
    margin: 0 0 10px;
    color: #666;
}

.footer-org strong { color: var(--hh-navy); }

.footer-org a,
.footer-muted a,
.footer-family-links a {
    color: inherit;
    text-decoration: none;
}

.footer-org a:hover,
.footer-muted a:hover,
.footer-family-links a:hover {
    color: var(--hh-link);
    text-decoration: underline;
}

.footer-muted {
    margin: 0 0 18px;
    font-size: 0.9em;
    color: #b0b0b0;
}

.footer-family {
    margin: 0;
    font-size: 0.9em;
}

.footer-family-links {
    margin: 2px 0 0;
    font-size: 0.9em;
}

.footer-current {
    color: var(--hh-navy);
    font-weight: 700;
}
