/* HeatMedia Dashboard — front-end styling
   Huisstijl: rood #DE2918 + warm wit. Display: Sora, body: Hanken Grotesk. */

:root {
    --hm-red: #DE2918;
    --hm-red-dark: #B81F11;
    --hm-ink: #1A1614;
    --hm-paper: #F6F3EF;
    --hm-card: #FFFFFF;
    --hm-line: #ECE7E1;
    --hm-muted: #8C847C;
    --hm-display: 'Sora', sans-serif;
    --hm-body: 'Hanken Grotesk', sans-serif;
    --hm-radius: 16px;
    --hm-shadow: 0 1px 2px rgba(26,22,20,.04), 0 12px 32px rgba(26,22,20,.06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--hm-paper);
    color: var(--hm-ink);
    font-family: var(--hm-body);
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
    line-height: 1.5;
}

a { color: inherit; }

/* ============================ LOGIN ============================ */

.hm-login {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

/* Linker rode merkpaneel */
.hm-login__brand {
    position: relative;
    overflow: hidden;
    background: var(--hm-red);
    color: #fff;
    padding: 56px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.hm-login__brand::before {
    /* subtiele ruitjes-textuur die de logo-ruit echoot */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(135deg, rgba(255,255,255,.06) 25%, transparent 25%),
        linear-gradient(225deg, rgba(255,255,255,.06) 25%, transparent 25%);
    background-size: 64px 64px;
    opacity: .5;
    pointer-events: none;
}
.hm-login__brandinner { position: relative; z-index: 1; max-width: 460px; }

.hm-wordmark {
    font-family: var(--hm-display);
    font-weight: 800;
    letter-spacing: .14em;
    font-size: clamp(34px, 4.4vw, 56px);
    line-height: 1;
}
.hm-wordmark span { font-weight: 300; }

.hm-tagline {
    margin: 14px 0 0;
    font-weight: 500;
    letter-spacing: .04em;
    opacity: .85;
}
.hm-login__pitch {
    position: relative;
    z-index: 1;
    max-width: 420px;
    font-size: 18px;
    line-height: 1.6;
    opacity: .92;
}

/* Decoratieve grote ruit met H, rechtsonder */
.hm-diamond {
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 320px;
    height: 320px;
    border: 3px solid rgba(255,255,255,.25);
    transform: rotate(45deg);
    z-index: 0;
}
.hm-diamond::after {
    content: "H";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    transform: rotate(-45deg);
    font-family: var(--hm-display);
    font-weight: 800;
    font-size: 120px;
    color: rgba(255,255,255,.16);
}

/* Rechter formulierzijde */
.hm-login__form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 8vw;
    background: var(--hm-card);
}
.hm-login__logo { width: 190px; height: auto; margin-bottom: 40px; border-radius: 6px; }
.hm-login__form h1 {
    font-family: var(--hm-display);
    font-weight: 700;
    font-size: 30px;
    margin: 0 0 6px;
}
.hm-login__form .hm-sub { color: var(--hm-muted); margin: 0 0 28px; }

.hm-field { margin-bottom: 18px; }
.hm-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: 7px;
    color: #5b544d;
}
.hm-field input {
    width: 100%;
    padding: 13px 15px;
    font-family: var(--hm-body);
    font-size: 16px;
    border: 1.5px solid var(--hm-line);
    border-radius: 11px;
    background: #fbfaf8;
    transition: border-color .15s, box-shadow .15s;
}
.hm-field input:focus {
    outline: none;
    border-color: var(--hm-red);
    box-shadow: 0 0 0 4px rgba(222,41,24,.12);
    background: #fff;
}

.hm-btn {
    width: 100%;
    border: 0;
    cursor: pointer;
    padding: 14px 18px;
    border-radius: 11px;
    background: var(--hm-ink);
    color: #fff;
    font-family: var(--hm-display);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: .01em;
    transition: transform .12s, background .15s;
}
.hm-btn:hover { background: #000; transform: translateY(-1px); }

.hm-error {
    background: #fdecea;
    border: 1px solid #f5c4be;
    color: #a01b0f;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}
.hm-login__help { margin-top: 26px; font-size: 14px; color: var(--hm-muted); }

/* ============================ DASHBOARD ============================ */

.hm-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    background: var(--hm-card);
    border-bottom: 1px solid var(--hm-line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.hm-top__logo { height: 34px; width: auto; border-radius: 4px; display: block; }
.hm-top__right { display: flex; align-items: center; gap: 18px; }
.hm-top__client { font-weight: 600; }
.hm-top__logout {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--hm-red);
    padding: 7px 14px;
    border: 1.5px solid var(--hm-line);
    border-radius: 9px;
    transition: border-color .15s, background .15s;
}
.hm-top__logout:hover { border-color: var(--hm-red); background: #fdf1ef; }

.hm-wrap { max-width: 1120px; margin: 0 auto; padding: 44px 28px 80px; box-sizing: border-box; width: 100%; }

.hm-intro { margin-bottom: 36px; }
.hm-eyebrow {
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 12px;
    font-weight: 700;
    color: var(--hm-red);
    margin: 0 0 10px;
}
.hm-intro h1 {
    font-family: var(--hm-display);
    font-weight: 700;
    font-size: clamp(26px, 3.4vw, 38px);
    margin: 0 0 8px;
    letter-spacing: -.01em;
}
.hm-lead { color: var(--hm-muted); max-width: 560px; margin: 0; font-size: 17px; }

.hm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
/* Detailpagina heeft altijd één kaart — full width */
.hm-grid:has(> article:only-child) {
    grid-template-columns: 1fr;
}

.hm-card {
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius);
    padding: 22px 22px 18px;
    box-shadow: var(--hm-shadow);
    opacity: 0;
    transform: translateY(10px);
    animation: hm-rise .5s cubic-bezier(.2,.7,.2,1) forwards;
    animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes hm-rise { to { opacity: 1; transform: none; } }

.hm-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.hm-card__id { display: flex; align-items: center; gap: 13px; }
.hm-card__mark {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: #fdf1ef;
    color: var(--hm-red);
    font-family: var(--hm-display);
    font-weight: 700;
    font-size: 18px;
}
.hm-card__id h3 { font-family: var(--hm-display); font-weight: 600; font-size: 16px; margin: 0; }
.hm-card__sub { margin: 1px 0 0; font-size: 13px; color: var(--hm-muted); }

.hm-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 100px;
    white-space: nowrap;
}
.hm-pill--connected { background: #e7f6ec; color: #1a7f37; }
.hm-pill--disconnected { background: #f1eee9; color: #8c847c; }
.hm-pill--error { background: #fdecea; color: #b32d2e; }

.hm-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
    border-top: 1px solid var(--hm-line);
    padding-top: 16px;
}
@media (min-width: 480px) {
    .hm-metrics { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
}
@media (min-width: 700px) {
    .hm-metrics { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
.hm-metric { text-align: left; min-width: 0; }
.hm-metric__val {
    display: block;
    font-family: var(--hm-display);
    font-weight: 700;
    font-size: 22px;
    color: var(--hm-ink);
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}
.hm-metric__label {
    display: block;
    font-size: 12px;
    color: var(--hm-muted);
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.hm-empty {
    background: var(--hm-card);
    border: 1px dashed var(--hm-line);
    border-radius: var(--hm-radius);
    padding: 48px 28px;
    text-align: center;
    color: var(--hm-muted);
}
.hm-empty strong { color: var(--hm-ink); display: block; font-family: var(--hm-display); margin-bottom: 6px; }

.hm-note {
    max-width: 520px;
    margin: 12vh auto;
    text-align: center;
    padding: 0 24px;
}
.hm-note img { width: 200px; border-radius: 6px; margin-bottom: 24px; }

/* ============================ RESPONSIVE ============================ */

@media (max-width: 880px) {
    .hm-login { grid-template-columns: 1fr; }
    .hm-login__brand { padding: 40px 32px; min-height: 280px; }
    .hm-login__form { padding: 40px 32px; }
    .hm-diamond { right: -120px; bottom: -120px; width: 240px; height: 240px; }
}

/* ============================ CONTROLS / COMPARE / PANELS ============================ */

.hm-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 26px;
    padding: 14px 16px;
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: 12px;
}
.hm-controls select,
.hm-controls input[type="date"] {
    font-family: var(--hm-body);
    font-size: 14px;
    padding: 9px 11px;
    border: 1.5px solid var(--hm-line);
    border-radius: 9px;
    background: #fbfaf8;
}
.hm-controls__custom { display: flex; align-items: center; gap: 8px; color: var(--hm-muted); font-size: 14px; }
.hm-controls button {
    border: 0; cursor: pointer;
    background: var(--hm-ink); color: #fff;
    font-family: var(--hm-display); font-weight: 600; font-size: 14px;
    padding: 9px 16px; border-radius: 9px;
}
.hm-controls__note { margin-left: auto; font-size: 13px; color: var(--hm-muted); }

.hm-metric { position: relative; }
.hm-delta {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 100px;
}
.hm-delta--up   { background: #e7f6ec; color: #1a7f37; }
.hm-delta--down { background: #fdecea; color: #b32d2e; }
.hm-delta--flat { background: #f1eee9; color: #8C847C; }

.hm-panel {
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius);
    padding: 20px 22px;
    box-shadow: var(--hm-shadow);
    margin-top: 20px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.hm-panel h2 {
    font-family: var(--hm-display);
    font-weight: 600;
    font-size: 17px;
    margin: 0 0 14px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.hm-panel__src { font-family: var(--hm-body); font-size: 12px; font-weight: 600; color: var(--hm-red); text-transform: uppercase; letter-spacing: .1em; }
.hm-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 14px; }
.hm-panel--wide .hm-table { min-width: 800px; }
.hm-table th, .hm-table td { white-space: nowrap; }
.hm-table th:first-child, .hm-table td:first-child { white-space: normal; min-width: 140px; max-width: 220px; }
.hm-table th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--hm-muted);
    font-weight: 600;
    padding: 0 12px 10px 0;
    border-bottom: 1px solid var(--hm-line);
}
.hm-table th + th, .hm-table td + td { text-align: right; padding-left: 16px; }
.hm-table td { padding: 11px 12px 11px 0; border-bottom: 1px solid #f4f1ec; }
.hm-table tr:last-child td { border-bottom: 0; }

/* ============================ CHARTS ============================ */

.hm-chart {
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius);
    padding: 20px 22px;
    box-shadow: var(--hm-shadow);
    margin-top: 20px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.hm-chart__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.hm-chart__head h2 {
    font-family: var(--hm-display);
    font-weight: 600;
    font-size: 17px;
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.hm-chart__src { font-family: var(--hm-body); font-size: 12px; font-weight: 600; color: var(--hm-red); text-transform: uppercase; letter-spacing: .1em; }
.hm-chart__controls { display: flex; gap: 8px; }
.hm-chart__controls select {
    font-family: var(--hm-body);
    font-size: 14px;
    padding: 8px 11px;
    border: 1.5px solid var(--hm-line);
    border-radius: 9px;
    background: #fbfaf8;
}
.hm-chart__canvas { position: relative; height: 300px; }

/* ============================ TILES / DETAIL ============================ */

.hm-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}
.hm-tile {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius);
    padding: 20px 20px 16px;
    box-shadow: var(--hm-shadow);
    transition: transform .14s, box-shadow .14s, border-color .14s;
    opacity: 0;
    transform: translateY(10px);
    animation: hm-rise .5s cubic-bezier(.2,.7,.2,1) forwards;
    animation-delay: calc(var(--i, 0) * 70ms);
}
.hm-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 1px 2px rgba(26,22,20,.05), 0 18px 40px rgba(26,22,20,.10);
    border-color: #e3ddd5;
}
.hm-tile__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hm-tile h3 { font-family: var(--hm-display); font-weight: 600; font-size: 18px; margin: 0 0 12px; }
.hm-tile__kpi { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.hm-tile__val { font-family: var(--hm-display); font-weight: 700; font-size: 28px; letter-spacing: -.02em; }
.hm-tile__lbl { font-size: 13px; color: var(--hm-muted); }
.hm-tile__more { display: block; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--hm-red); }

.hm-back { margin: 0 0 6px; }
.hm-back a { color: var(--hm-muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.hm-back a:hover { color: var(--hm-ink); }

/* ===================== PANELS: grid, zoek, scroll ===================== */
.hm-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; margin-top: 20px; min-width: 0; }
.hm-panels .hm-panel { margin-top: 0; }
.hm-panels .hm-panel--wide { grid-column: 1 / -1; }
@media (max-width: 820px) { .hm-panels { grid-template-columns: 1fr; } }
.hm-panel__scroll { max-height: 360px; overflow: auto; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hm-table--search thead th { position: sticky; background: var(--hm-card); }
.hm-table--search thead tr:first-child th { top: 0; z-index: 2; }
.hm-table--search thead tr.hm-search th { top: 2.1em; z-index: 2; padding: 0 0 8px; }
.hm-table--search .hm-search th + th { padding-left: 8px; }
.hm-search input { width: 100%; min-width: 80px; box-sizing: border-box; font: inherit; font-size: 12px; padding: 6px 8px; border: 1px solid var(--hm-line); border-radius: 8px; background: #fff; }
.hm-search input:focus { outline: none; border-color: var(--hm-red); }
.hm-flag { display: inline-flex; align-items: center; margin: 10px 0 0; padding: 7px 13px; font-size: 13px; font-weight: 600; color: var(--hm-red); background: rgba(222,41,24,.08); border: 1px solid rgba(222,41,24,.25); border-radius: 999px; }

/* ── Navigatie + preview + abonnement (v0.10) ───────────────────────── */
.hm-preview-bar {
    background: var(--hm-ink);
    color: #fff;
    font-family: var(--hm-body);
    font-size: 14px;
    text-align: center;
    padding: 10px 16px;
}
.hm-preview-bar strong { color: #fff; }

.hm-nav {
    background: var(--hm-card);
    border-bottom: 1px solid var(--hm-line);
    position: sticky;
    top: 0;
    z-index: 20;
}
.hm-nav__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.hm-nav__link {
    font-family: var(--hm-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--hm-muted);
    text-decoration: none;
    padding: 16px 14px;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
}
.hm-nav__link:hover { color: var(--hm-ink); }
.hm-nav__link.is-active {
    color: var(--hm-red);
    border-bottom-color: var(--hm-red);
}

.hm-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.hm-sub-grid .hm-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--hm-line);
    vertical-align: top;
}
.hm-sub-grid .hm-table tr:last-child td { border-bottom: 0; }

/* ── SEO-scanner (v0.11) ────────────────────────────────────────────── */
.hm-seo-form {
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--hm-shadow);
}
.hm-seo-form__row { display: flex; gap: 10px; flex-wrap: wrap; }
.hm-seo-form__row input[type="url"] { flex: 2 1 320px; }
.hm-seo-form__row input[type="text"] { flex: 1 1 200px; }
.hm-seo-form__row input {
    font-family: var(--hm-body);
    font-size: 15px;
    padding: 12px 14px;
    border: 1.5px solid var(--hm-line);
    border-radius: 10px;
}
.hm-seo-form__row input:focus { border-color: var(--hm-red); outline: none; }
.hm-seo-form__row .hm-btn { flex: 0 0 auto; width: auto; padding: 12px 22px; cursor: pointer; }
.hm-seo-form__note { color: var(--hm-muted); font-size: 13px; margin: 10px 0 0; }

.hm-seo-score {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-left: 6px solid var(--hm-muted);
    border-radius: var(--hm-radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--hm-shadow);
}
.hm-seo-score__num { font-family: var(--hm-display); font-size: 44px; font-weight: 700; line-height: 1; }
.hm-seo-score__num span { font-size: 18px; color: var(--hm-muted); font-weight: 600; }
.hm-seo-score__meta { display: flex; flex-direction: column; gap: 4px; }
.hm-seo-score__meta strong { font-family: var(--hm-display); font-size: 18px; }
.hm-seo-score__meta span { color: var(--hm-muted); font-size: 14px; word-break: break-all; }
.hm-seo-score--goed { border-left-color: #1a7f37; }
.hm-seo-score--goed .hm-seo-score__num { color: #1a7f37; }
.hm-seo-score--voldoende { border-left-color: #bf8700; }
.hm-seo-score--voldoende .hm-seo-score__num { color: #bf8700; }
.hm-seo-score--aandacht { border-left-color: var(--hm-red); }
.hm-seo-score--aandacht .hm-seo-score__num { color: var(--hm-red); }

.hm-seo-groups { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
.hm-seo-grp__count {
    display: inline-block; min-width: 22px; text-align: center;
    font-size: 13px; font-weight: 700; color: #fff; background: var(--hm-muted);
    border-radius: 11px; padding: 1px 8px; margin-left: 6px; vertical-align: middle;
}
.hm-seo-grp--problem .hm-seo-grp__count { background: var(--hm-red); }
.hm-seo-grp--improve .hm-seo-grp__count { background: #bf8700; }
.hm-seo-grp--good .hm-seo-grp__count { background: #1a7f37; }
.hm-seo-list { list-style: none; margin: 0; padding: 0; }
.hm-seo-list li {
    padding: 12px 0 12px 22px;
    border-bottom: 1px solid var(--hm-line);
    position: relative;
}
.hm-seo-list li:last-child { border-bottom: 0; }
.hm-seo-list li::before {
    content: ''; position: absolute; left: 0; top: 17px;
    width: 10px; height: 10px; border-radius: 50%; background: var(--hm-muted);
}
.hm-seo-grp--problem .hm-seo-list li::before { background: var(--hm-red); }
.hm-seo-grp--improve .hm-seo-list li::before { background: #bf8700; }
.hm-seo-grp--good .hm-seo-list li::before { background: #1a7f37; }
.hm-seo-list__label { display: block; font-family: var(--hm-display); font-weight: 600; font-size: 15px; }
.hm-seo-list__advice { display: block; color: var(--hm-muted); font-size: 14px; margin-top: 2px; }

/* ── Abonnement v0.12: volle breedte, WYSIWYG, facturen, contacten ──── */
.hm-wrap > .hm-panel--wide { margin-bottom: 20px; width: 100%; }
.hm-sub-start { color: var(--hm-muted); margin: 0 0 14px; }
.hm-sub-content { font-size: 15px; line-height: 1.65; }
.hm-sub-content h1, .hm-sub-content h2, .hm-sub-content h3 { font-family: var(--hm-display); }
.hm-sub-content ul, .hm-sub-content ol { padding-left: 1.3em; }
.hm-sub-content li { margin: 4px 0; }
.hm-sub-content a { color: var(--hm-red); }

.hm-inv-status {
    display: inline-block; font-size: 12px; font-weight: 700;
    padding: 2px 10px; border-radius: 11px; background: #eee; color: #555;
}
.hm-inv-status--paid { background: #e3f3e7; color: #1a7f37; }
.hm-inv-status--open { background: #fff3d6; color: #bf8700; }
.hm-inv-status--overdue { background: #fbe2e0; color: var(--hm-red); }
.hm-inv-status--credited { background: #ece6fb; color: #6b46c1; }
.hm-inv-pdf {
    display: inline-block; font-size: 12px; font-weight: 700; text-decoration: none;
    padding: 3px 11px; border-radius: 8px; border: 1px solid var(--hm-line); color: var(--hm-ink);
}
.hm-inv-pdf:hover { border-color: var(--hm-red); color: var(--hm-red); }
.hm-inv-actions { white-space: nowrap; }
.hm-inv-actions > a { margin-left: 6px; }
.hm-inv-actions > a:first-child { margin-left: 0; }
.hm-inv-pay {
    display: inline-block; font-size: 12px; font-weight: 700; text-decoration: none;
    padding: 4px 12px; border-radius: 8px; background: var(--hm-red); color: #fff;
}
.hm-inv-pay:hover { filter: brightness(0.92); color: #fff; }
.hm-inv-more { margin-top: 14px; }
.hm-btn-ghost {
    display: inline-block; font-size: 13px; font-weight: 600; text-decoration: none;
    padding: 8px 16px; border-radius: 9px; border: 1px solid var(--hm-line); color: var(--hm-ink);
}
.hm-btn-ghost:hover { border-color: var(--hm-red); color: var(--hm-red); }

.hm-cell-media { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hm-cell-media > span { overflow-wrap: anywhere; }
.hm-cell-img {
    width: 44px; height: 44px; flex: 0 0 44px; object-fit: cover;
    border-radius: 8px; border: 1px solid var(--hm-line); background: #f3f1ee;
}

.hm-contacts-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
}
.hm-contact-card {
    display: flex; flex-direction: column; gap: 3px;
    border: 1px solid var(--hm-line); border-radius: 12px; padding: 14px 16px;
}
.hm-contact-card strong { font-family: var(--hm-display); font-size: 15px; }
.hm-contact-role { color: var(--hm-muted); font-size: 13px; margin-bottom: 4px; }
.hm-contact-card a { color: var(--hm-red); font-size: 14px; text-decoration: none; }
.hm-contact-card a:hover { text-decoration: underline; }

/* ── Abonnement-extra + SEO-geschiedenis (v0.13) ────────────────────── */
.hm-sub-terms { margin: 16px 0 0; }
.hm-sub-terms a { color: var(--hm-red); font-weight: 600; text-decoration: none; }
.hm-sub-terms a:hover { text-decoration: underline; }

.hm-seo-viewed { color: var(--hm-muted); font-size: 13px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.hm-seo-history { margin-top: 24px; }
.hm-seo-history__url { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-seo-badge {
    display: inline-block; min-width: 34px; text-align: center;
    font-family: var(--hm-display); font-weight: 700; font-size: 13px;
    padding: 3px 8px; border-radius: 9px; color: #fff; background: var(--hm-muted);
}
.hm-seo-badge--goed { background: #1a7f37; }
.hm-seo-badge--voldoende { background: #bf8700; }
.hm-seo-badge--aandacht { background: var(--hm-red); }

/* ── Site-crawl (v0.14) ─────────────────────────────────────────────── */
.hm-btn--ghost { background: transparent; color: var(--hm-red); border: 1.5px solid var(--hm-red); }
.hm-btn--ghost:hover { background: var(--hm-red); color: #fff; }
.hm-seo-progress { margin-top: 14px; }
.hm-seo-progress__bar { height: 8px; background: var(--hm-line); border-radius: 6px; overflow: hidden; }
.hm-seo-progress__bar span { display: block; height: 100%; width: 0; background: var(--hm-red); transition: width .3s ease; }
.hm-seo-progress__txt { color: var(--hm-muted); font-size: 13px; margin: 8px 0 0; }

/* ── SEO popup + restrictie + sitemap (v0.15) ───────────────────────── */
.hm-seo-admin {
    background: #fff7ed; border: 1px solid #f3d9b8; border-radius: var(--hm-radius);
    padding: 16px 18px; margin-bottom: 18px;
}
.hm-seo-admin__label { display: block; font-size: 13px; font-weight: 600; color: var(--hm-muted); margin-bottom: 8px; }
.hm-seo-admin input[type="url"] { flex: 1 1 320px; font-family: var(--hm-body); font-size: 15px; padding: 11px 14px; border: 1.5px solid var(--hm-line); border-radius: 10px; }
.hm-seo-admin .hm-btn { width: auto; flex: 0 0 auto; padding: 11px 20px; cursor: pointer; }

.hm-seo-cellbtn {
    font-family: var(--hm-display); font-weight: 700; font-size: 14px; cursor: pointer;
    border: 0; border-radius: 8px; padding: 3px 12px; color: #fff; background: var(--hm-muted);
}
.hm-seo-cellbtn--problem { background: var(--hm-red); }
.hm-seo-cellbtn--improve { background: #bf8700; }
.hm-seo-cellbtn:hover { filter: brightness(1.08); }

.hm-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.hm-modal[hidden] { display: none; }
.hm-modal__backdrop { position: absolute; inset: 0; background: rgba(26,22,20,.55); }
.hm-modal__box {
    position: relative; z-index: 1; background: #fff; border-radius: var(--hm-radius);
    max-width: 640px; width: calc(100% - 40px); max-height: 80vh; overflow: auto;
    padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.hm-modal__close { position: absolute; top: 12px; right: 16px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--hm-muted); }
.hm-modal__box h3 { font-family: var(--hm-display); margin: 0 0 4px; }
.hm-modal__url { color: var(--hm-muted); font-size: 13px; word-break: break-all; margin: 0 0 16px; }
.hm-modal__h { font-family: var(--hm-display); font-size: 15px; margin: 16px 0 6px; }
.hm-modal__h--improve { color: #bf8700; }
.hm-modal__h--problem { color: var(--hm-red); }
.hm-modal__list li::before { top: 17px; }

/* ── 0-meting (v0.16) ───────────────────────────────────────────────── */
.hm-seo-baseline { border-left: 4px solid var(--hm-ink); }
.hm-seo-baseline h2 { display: flex; align-items: baseline; gap: 8px; }

/* ── Mail (v0.18) ───────────────────────────────────────────────────────── */
.hm-intro__lead { color: var(--hm-muted); margin: 6px 0 0; }
.hm-back { color: var(--hm-muted); text-decoration: none; font-size: 14px; }
.hm-back:hover { color: var(--hm-red); }

.hm-mail-list { display: flex; flex-direction: column; gap: 1px; background: var(--hm-line); border: 1px solid var(--hm-line); border-radius: var(--hm-radius); overflow: hidden; }
.hm-mail-row { display: grid; grid-template-columns: 220px 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; background: var(--hm-card); text-decoration: none; color: var(--hm-ink); transition: background .12s; }
.hm-mail-row:hover { background: #FBF9F6; }
.hm-mail-row__who { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-mail-row__subject { color: var(--hm-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-mail-row__meta { color: var(--hm-muted); font-size: 13px; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.hm-mail-count { background: var(--hm-paper); border: 1px solid var(--hm-line); border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600; color: var(--hm-ink); }
@media (max-width: 720px) {
    .hm-mail-row { grid-template-columns: 1fr; gap: 4px; }
    .hm-mail-row__meta { font-size: 12px; }
}

.hm-thread { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.hm-msg { border: 1px solid var(--hm-line); border-radius: 14px; padding: 14px 16px; background: var(--hm-card); max-width: 88%; }
.hm-msg--in  { align-self: flex-start; border-left: 3px solid var(--hm-line); }
.hm-msg--out { align-self: flex-end; background: #FBF1EF; border-left: 3px solid var(--hm-red); }
.hm-msg__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 2px; }
.hm-msg__from { font-weight: 600; font-family: var(--hm-display); }
.hm-msg__email { color: var(--hm-muted); font-weight: 400; font-size: 13px; }
.hm-msg__date { color: var(--hm-muted); font-size: 13px; white-space: nowrap; }
.hm-msg__to { color: var(--hm-muted); font-size: 12px; margin-bottom: 10px; }
.hm-msg__clip { font-size: 13px; }
.hm-msg__body { line-height: 1.55; word-break: break-word; overflow-wrap: anywhere; }
.hm-msg__body img { max-width: 100%; height: auto; }
.hm-msg__body a { color: var(--hm-red); }
.hm-msg__body table { max-width: 100%; }
@media (max-width: 720px) { .hm-msg { max-width: 100%; } }

/* ── Inzichten / maandrapport (v0.21) ───────────────────────────────────── */
.hm-report-months { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px; }
.hm-month { padding:8px 14px; border:1px solid var(--hm-line); border-radius:999px; text-decoration:none; color:var(--hm-ink); background:var(--hm-card); font-size:14px; transition:all .12s; }
.hm-month:hover { border-color:var(--hm-red); }
.hm-month.is-active { background:var(--hm-red); color:#fff; border-color:var(--hm-red); }
.hm-report { background:var(--hm-card); border:1px solid var(--hm-line); border-radius:var(--hm-radius); padding:28px 30px; box-shadow:var(--hm-shadow); }
.hm-report__title { font-family:var(--hm-display); margin:0 0 18px; font-size:24px; }
.hm-report-block { margin:0 0 26px; }
.hm-report-block h3 { font-family:var(--hm-display); font-size:16px; margin:0 0 12px; padding-bottom:8px; border-bottom:1px solid var(--hm-line); }
.hm-report-text { line-height:1.65; font-size:16px; }
.hm-report-text p { margin:0 0 12px; }
.hm-report-highlights ul { list-style:none; margin:0; padding:0; }
.hm-report-highlights li { padding:10px 14px; margin:0 0 8px; background:#e9f5ee; border-left:3px solid #1a7f37; border-radius:8px; }
.hm-report-actions ul { list-style:none; margin:0; padding:0; }
.hm-report-actions li { padding:10px 14px 10px 34px; margin:0 0 8px; background:var(--hm-paper); border:1px solid var(--hm-line); border-radius:8px; position:relative; }
.hm-report-actions li::before { content:'\2192'; position:absolute; left:14px; color:var(--hm-red); font-weight:700; }
.hm-report-done ul { list-style:none; margin:0; padding:0; }
.hm-report-done li { padding:10px 14px 10px 34px; margin:0 0 8px; background:#e9f5ee; border:1px solid #cde9d6; border-radius:8px; position:relative; }
.hm-report-done li::before { content:'\2713'; position:absolute; left:14px; color:#1a7f37; font-weight:700; }
.hm-report-note { color:var(--hm-muted); font-size:14px; font-style:italic; margin:0 0 12px; }
.hm-report-kpis { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.hm-report-kpi { border:1px solid var(--hm-line); border-radius:12px; padding:14px 16px; }
.hm-report-kpi__v { display:block; font-family:var(--hm-display); font-size:22px; font-weight:700; }
.hm-report-kpi__l { display:block; font-size:13px; color:var(--hm-muted); margin:2px 0 8px; }
.hm-report-chip { font-size:12px; font-weight:600; padding:2px 9px; border-radius:999px; background:var(--hm-paper); }
.hm-report-chip.up { background:#e5f3ea; color:#1a7f37; }
.hm-report-chip.down { background:#fbeae8; color:#b32d2e; }
.hm-report-chip.flat { color:var(--hm-muted); }

/* ── Rapport: tabel-blok (bijv. SEO-stijgers uit CSV) ───────────────────── */
.hm-report-tablewrap { overflow-x:auto; }
.hm-report-table { width:100%; border-collapse:collapse; font-size:15px; }
.hm-report-table th, .hm-report-table td { text-align:left; padding:9px 12px; border-bottom:1px solid var(--hm-line); }
.hm-report-table thead th { font-family:var(--hm-display); font-size:13px; color:var(--hm-muted); border-bottom:2px solid var(--hm-line); }
.hm-report-table tbody tr:last-child td { border-bottom:0; }

/* Contactformulier — conversie-markering */
.hm-table--conv td.hm-conv-cell { text-align:center; white-space:nowrap; }
.hm-conv-switch { display:inline-flex; align-items:center; gap:6px; cursor:pointer; font-size:12px; color:#6b7280; user-select:none; }
.hm-conv-switch input { width:16px; height:16px; accent-color:#1a7f37; cursor:pointer; }
.hm-table--conv tr.is-converted { background:#e9f5ee; }
.hm-table--conv tr.is-converted td { color:#14532d; }

/* ============================ RESPONSIVE v0.35 ============================ */

/* Waarden mogen nooit buiten hun cel lopen */
.hm-metric__val {
    font-size: clamp(16px, 3.5vw, 22px);
    overflow-wrap: anywhere;
    word-break: break-word;
}


/* Minimale kolombreedte zodat tabeldata leesbaar blijft */
.hm-table {
    min-width: 420px;
}
.hm-table--search {
    min-width: 500px;
}

/* --- Panels grid: eerder naar 1 kolom --- */
@media (max-width: 960px) {
    .hm-panels {
        grid-template-columns: 1fr;
    }
}

/* --- Controls: beter stapelgedrag op mobiel --- */
@media (max-width: 640px) {
    .hm-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .hm-controls select,
    .hm-controls input[type="date"] {
        width: 100%;
    }
    .hm-controls__custom {
        flex-wrap: wrap;
    }
    .hm-controls button {
        width: 100%;
    }
    .hm-controls__note {
        margin-left: 0;
        text-align: center;
    }
}

/* --- Topbar: klantnaam verbergen op heel smal scherm --- */
@media (max-width: 480px) {
    .hm-top {
        padding: 12px 16px;
    }
    .hm-top__client {
        display: none;
    }
    .hm-wrap {
        padding: 24px 16px 60px;
    }
}

/* --- Navigatietabs: scrollbaar op mobiel --- */
@media (max-width: 640px) {
    .hm-nav__inner {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 16px;
        scrollbar-width: none;
    }
    .hm-nav__inner::-webkit-scrollbar { display: none; }
    .hm-nav__link {
        white-space: nowrap;
        font-size: 14px;
        padding: 14px 10px;
    }
}

/* --- Grid op overzichtspagina: 1 kolom op mobiel --- */
@media (max-width: 480px) {
    .hm-grid {
        grid-template-columns: 1fr;
    }
    .hm-tiles {
        grid-template-columns: 1fr;
    }
}

/* --- Chart: minder hoogte op mobiel --- */
@media (max-width: 480px) {
    .hm-chart__canvas {
        height: 200px;
    }
    .hm-chart__head {
        flex-direction: column;
        align-items: flex-start;
    }
    .hm-chart__controls {
        width: 100%;
    }
    .hm-chart__controls select {
        flex: 1;
    }
}

/* --- Detail-kaart (samenvatting): op mobiel full-width --- */
@media (max-width: 640px) {
    .hm-card {
        padding: 16px 16px 14px;
    }
    .hm-card__mark {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
}

/* --- Tabel-zoekfilters op mobiel leesbaar --- */
@media (max-width: 640px) {
    .hm-search input {
        font-size: 14px;
        padding: 7px 8px;
    }
}

/* ============================ OVERZICHT-DASHBOARD ============================ */

.hm-overview-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .hm-overview-charts {
        grid-template-columns: 1fr;
    }
}

.hm-overview-chart {
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius);
    padding: 20px 22px 16px;
    box-shadow: var(--hm-shadow);
    min-width: 0;
    overflow: hidden;
}

.hm-overview-chart__title {
    font-family: var(--hm-display);
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 2px;
}

.hm-overview-chart__sub {
    font-size: 12px;
    color: var(--hm-muted);
    margin: 0;
}

.hm-overview-chart__legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 12px 0 10px;
}

.hm-overview-chart__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hm-overview-chart__lbl {
    font-size: 12px;
    color: var(--hm-ink);
    margin-left: -8px;
}

.hm-overview-chart .hm-chart__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
}

.hm-overview-chart .hm-chart__canvas {
    height: 220px;
    margin-top: 8px;
}

.hm-overview-chart__interval {
    font-family: var(--hm-body);
    font-size: 13px;
    padding: 6px 10px;
    border: 1.5px solid var(--hm-line);
    border-radius: 9px;
    background: #fbfaf8;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .hm-overview-chart .hm-chart__canvas {
        height: 180px;
    }
    .hm-overview-chart .hm-chart__head {
        flex-direction: column;
        gap: 8px;
    }
    .hm-overview-chart__interval {
        width: 100%;
    }
}


/* ============================ CONNECT HUB OVERRIDES ============================ */
.hm-login__brand { background: #1d1d1f; }
.hm-top__brand { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 18px; }
.hm-empty { background: var(--hm-card); border: 1px solid var(--hm-line); border-radius: var(--hm-radius); padding: 32px; text-align: center; color: var(--hm-muted); }
.hm-empty strong { display: block; font-family: var(--hm-display); font-size: 17px; color: var(--hm-ink); margin-bottom: 8px; }

/* ============================ MIJN ACCOUNT ============================ */

/* Override base .hm-btn voor account pagina */
.hm-account-panel .hm-btn {
    width: auto;
    display: inline-block;
    padding: 11px 24px;
    font-size: 14px;
    font-family: var(--hm-body);
    border-radius: 8px;
    margin-top: 4px;
}

.hm-account-panel .hm-btn--primary {
    background: var(--hm-red) !important;
    color: #fff !important;
}

.hm-account-panel .hm-btn--primary:hover {
    background: #b32018 !important;
    transform: none;
    opacity: 1;
}

.hm-account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 720px) {
    .hm-account-grid { grid-template-columns: 1fr; }
}

.hm-account-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hm-panel__title {
    font-family: var(--hm-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--hm-ink);
    margin: 0 0 20px;
}

.hm-account-field {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.hm-account-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--hm-muted);
    margin-bottom: 6px;
    width: 100%;
    clear: both;
}

.hm-account-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--hm-line);
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    color: var(--hm-ink);
    background: #fbfaf8;
    transition: border-color .15s;
    box-sizing: border-box;
}

.hm-account-input:focus {
    outline: none;
    border-color: var(--hm-red);
    background: #fff;
}

.hm-account-hint {
    font-size: 12px;
    color: var(--hm-muted);
    margin: 4px 0 0;
}

.hm-account-msg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.hm-account-msg--ok {
    background: #edfaf3;
    border: 1px solid #b7e8cd;
    color: #1a7f37;
}

.hm-account-msg--err {
    background: #fdf2f1;
    border: 1px solid #f5c6c2;
    color: #c0392b;
}

.hm-account-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 4px;
}

.hm-account-notice--ok {
    background: #edfaf3;
    border: 1px solid #b7e8cd;
    color: #1a7f37;
}

.hm-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .15s, opacity .15s;
    margin-top: auto;
}

.hm-btn--primary {
    background: var(--hm-red);
    color: #fff;
}

.hm-btn--primary:hover { opacity: .88; }
.hm-btn:disabled { opacity: .5; cursor: not-allowed; }
