/* ===== /home – dashboard (hm-*) ===== */
.hm-ticker { border-radius: 10px; margin-bottom: 16px !important; }

.c-green { color: #3fb950; } .c-gold { color: #e3b341; } .c-red { color: #f85149; }
.c-blue { color: #58a6ff; } .c-purple { color: #a371f7; } .c-dia { color: #7dd3fc; }

/* Kort */
.hm-card {
    display: block; background: #161b22; border: 1px solid #262c36; border-radius: 14px;
    padding: 16px; color: #e6edf3; text-decoration: none; min-width: 0;
}
a.hm-card { transition: border-color .15s, transform .15s; }
a.hm-card:hover { border-color: #58a6ff80; transform: translateY(-1px); }
.hm-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.hm-card__title { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #c9d1d9; }
.hm-card__link { font-size: 12px; color: #58a6ff; text-decoration: none; font-weight: 600; }
.hm-card__link:hover { text-decoration: underline; }
.hm-card__foot { margin-top: 10px; font-size: 11px; color: #6e7681; }
.hm-pill { font-size: 11px; font-weight: 700; color: #58a6ff; background: #58a6ff14; border: 1px solid #58a6ff33; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.hm-empty { padding: 28px 12px; text-align: center; color: #6e7681; font-size: 13px; }
.hm-empty--sm { padding: 12px; font-size: 12px; }

/* Crime event */
.hm-event {
    display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding: 14px 18px;
    border-radius: 14px; border: 1px solid #ff6b0055;
    background: linear-gradient(135deg, #2a0f00 0%, #1a0808 55%, #161b22 100%);
}
.hm-event__icon { font-size: 34px; line-height: 1; }
.hm-event__body { flex: 1; min-width: 0; }
.hm-event__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.hm-tag { font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; }
.hm-tag--red { color: #ff8c42; background: #ff6b0022; border: 1px solid #ff6b0055; }
.hm-tag--gold { color: #e3b341; background: #d2992222; border: 1px solid #d2992255; }
.hm-event__name { font-size: 16px; font-weight: 800; color: #fff; }
.hm-event__desc { font-size: 12px; color: #c9a882; margin-top: 2px; }
.hm-event__timer { text-align: right; flex-shrink: 0; }
.hm-event__timer-label { font-size: 10px; color: #8b949e; text-transform: uppercase; letter-spacing: .08em; }
.hm-event__timer-val { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.hm-event__timer-at { font-size: 10px; color: #6e7681; }

/* Hero */
.hm-hero {
    --hm-accent: #30363d;
    display: grid; grid-template-columns: minmax(240px, 1.1fr) minmax(260px, 1.3fr) minmax(280px, 1.4fr);
    grid-template-areas: "id bars stats" "alerts alerts alerts" "cta cta cta";
    gap: 18px 24px; align-items: center; margin-bottom: 16px; padding: 20px 22px;
    border-radius: 16px; border: 1px solid #262c36; border-top: 3px solid var(--hm-accent);
    background:
        radial-gradient(1200px 200px at 0% 0%, #f8514912, transparent 60%),
        linear-gradient(180deg, #171d26 0%, #12161d 100%);
    box-shadow: 0 10px 30px #0006;
}
.hm-hero__id { grid-area: id; display: flex; align-items: center; gap: 14px; min-width: 0; }
.hm-avatar {
    position: relative; width: 72px; height: 72px; flex-shrink: 0; border-radius: 16px;
    background: #0d1117; border: 2px solid #f8514966; display: flex; align-items: center; justify-content: center;
    font-size: 36px; box-shadow: 0 0 0 4px #f851490f;
}
.hm-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.hm-avatar__lvl {
    position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); white-space: nowrap;
    font-size: 10px; font-weight: 900; letter-spacing: .06em; color: #0d1117;
    background: linear-gradient(135deg, #f0c24b, #d29922); padding: 2px 7px; border-radius: 999px;
}
.hm-hero__who { min-width: 0; }
.hm-name { margin: 0 0 6px; font-size: 24px; font-weight: 900; color: #fff; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #21262d; border: 1px solid #30363d; color: #c9d1d9; }
.hm-badge--class { color: #ff7b72; border-color: #f8514944; background: #f8514914; }
.hm-badge--vip { color: #e3b341; border-color: #d2992255; background: #d2992218; }

.hm-hero__bars { grid-area: bars; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hm-bar__meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: #8b949e; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.hm-bar__meta b { color: #e6edf3; font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.hm-bar__meta small { color: #6e7681; font-weight: 600; }
.hm-track { height: 8px; border-radius: 999px; background: #0d1117; border: 1px solid #21262d; overflow: hidden; }
.hm-fill { height: 100%; border-radius: 999px; transition: width .6s ease; }
.hm-bar--hp .hm-fill { background: linear-gradient(90deg, #da3633, #f85149); box-shadow: 0 0 8px #f8514966; }
.hm-bar--hp.is-low .hm-fill { animation: hm-pulse 1.2s ease-in-out infinite; }
.hm-bar--xp .hm-fill { background: linear-gradient(90deg, #1f6feb, #58a6ff); box-shadow: 0 0 8px #58a6ff55; }
.hm-bar--en .hm-fill { background: linear-gradient(90deg, #bb8009, #e3b341); box-shadow: 0 0 8px #e3b34155; }
@keyframes hm-pulse { 50% { opacity: .55; } }

.hm-hero__stats { grid-area: stats; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hm-stat { background: #0d111799; border: 1px solid #21262d; border-radius: 10px; padding: 8px 10px; min-width: 0; }
.hm-stat span { display: block; font-size: 10px; color: #8b949e; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-stat b { display: block; margin-top: 2px; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hm-hero__alerts { grid-area: alerts; display: flex; flex-wrap: wrap; gap: 8px; }
.hm-alert { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 10px; text-decoration: none; }
.hm-alert--jail { color: #e3b341; background: #d2992218; border: 1px solid #d2992255; }
.hm-alert--bounty { color: #ff7b72; background: #f8514918; border: 1px solid #f8514955; }

.hm-hero__cta { grid-area: cta; display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 10px; padding-top: 16px; border-top: 1px solid #21262d; }
.hm-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 14px;
    border-radius: 12px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    text-decoration: none; color: #e6edf3; background: #21262d; border: 1px solid #30363d;
    transition: transform .12s, filter .12s, border-color .12s, background .12s; white-space: nowrap;
}
.hm-btn span { font-size: 16px; }
.hm-btn:hover { transform: translateY(-1px); filter: brightness(1.12); }
.hm-btn:active { transform: translateY(0); }
.hm-btn:focus-visible { outline: 2px solid #58a6ff; outline-offset: 2px; }
.hm-btn--primary { color: #fff; border-color: #f85149; background: linear-gradient(135deg, #da3633, #a4201d); box-shadow: 0 6px 18px #da363340; font-size: 14px; }
.hm-btn--jobs { color: #79c0ff; border-color: #1f6feb66; background: #1f6feb1c; }
.hm-btn--quests { color: #e3b341; border-color: #d2992266; background: #d299221c; }
.hm-btn--arena { color: #d2a8ff; border-color: #a371f766; background: #a371f71c; }
.hm-btn--ghost { color: #c9d1d9; }

/* Layout */
.hm-mobile-friends { margin-bottom: 16px; }
.hm-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.hm-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hm-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

/* Snabbval */
.hm-qa { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.hm-qa__item {
    --qa: #8b949e;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 4px;
    border-radius: 12px; background: #0d1117; border: 1px solid #21262d; text-decoration: none;
    transition: border-color .15s, background .15s, transform .15s;
}
.hm-qa__item:hover { border-color: var(--qa); background: color-mix(in srgb, var(--qa) 10%, #0d1117); transform: translateY(-1px); }
.hm-qa__emoji { font-size: 22px; line-height: 1; }
.hm-qa__label { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--qa); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Live-flöde */
.hm-live { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #6e7681; }
.hm-live.is-on { color: #3fb950; }
.hm-feed { max-height: 420px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.hm-feed__row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-left: 3px solid var(--fc, #30363d); border-radius: 6px; margin-bottom: 4px; background: #0d111766; }
.hm-feed__row:hover { background: #0d1117; }
.hm-feed__emoji { font-size: 16px; flex-shrink: 0; }
.hm-feed__body { flex: 1; min-width: 0; }
.hm-feed__text { font-size: 13px; color: #e6edf3; line-height: 1.35; }
.hm-feed__time { font-size: 10px; color: #6e7681; font-family: ui-monospace, monospace; margin-top: 1px; }
.hm-feed__money { font-size: 12px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Streak */
.hm-streak.is-gold { border-color: #d2992255; background: linear-gradient(180deg, #1e1a0e 0%, #161b22 60%); }
.hm-streak__count { font-size: 12px; color: #8b949e; }
.hm-streak__count b { font-size: 20px; color: #e3b341; font-weight: 900; margin-right: 2px; }
.hm-streak__sub { font-size: 12px; color: #8b949e; margin: -6px 0 10px; }
.hm-streak__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.hm-streak__day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 8px; background: #0d1117; border: 1px solid #21262d; font-size: 15px; opacity: .55; }
.hm-streak__day small { font-size: 9px; font-weight: 800; color: #6e7681; }
.hm-streak__day.is-done { opacity: 1; border-color: #2ea04355; }
.hm-streak__day.is-today { border-color: #e3b341; box-shadow: 0 0 0 2px #e3b34122; }
.hm-streak__reward { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: #2ea04314; border: 1px solid #2ea04344; font-size: 12px; font-weight: 700; }
.hm-streak__reward-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* Zon */
.hm-zone__map { height: 170px; border-radius: 10px; overflow: hidden; background: #0d1117; border: 1px solid #21262d; position: relative; }
.hm-zone__loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #6e7681; font-size: 12px; }

/* Listor */
.hm-list { display: flex; flex-direction: column; gap: 2px; }
.hm-list__row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: #e6edf3; }
.hm-list__row:hover { background: #0d1117; }
.hm-list__icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.hm-list__main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.hm-list__main b { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-list__main small { font-size: 11px; color: #6e7681; white-space: nowrap; }
.hm-list__val { font-size: 12px; font-weight: 800; color: #c9d1d9; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-rank { width: 18px; text-align: center; font-size: 12px; font-weight: 900; flex-shrink: 0; }

.hm-server { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hm-server > div { background: #0d1117; border: 1px solid #21262d; border-radius: 10px; padding: 8px 10px; }
.hm-server span { display: block; font-size: 10px; color: #8b949e; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.hm-server b { font-size: 18px; font-weight: 900; }

/* ===== Responsivt ===== */
@media (max-width: 1280px) {
    .hm-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "id bars" "stats stats" "alerts alerts" "cta cta"; }
    .hm-hero__stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    .hm-grid { grid-template-columns: minmax(0, 1fr); }
    .hm-col--side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
    .hm-col--side > .gw-only-desktop { grid-column: 1 / -1; }
    .hm-qa { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .hm-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "id" "bars" "stats" "alerts" "cta"; gap: 14px; padding: 16px; }
    .hm-hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hm-hero__cta { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 14px; }
    .hm-btn--primary { grid-column: 1 / -1; min-height: 52px; }
}
@media (max-width: 599.98px) {
    .hm-ticker { margin-bottom: 12px !important; }
    .hm-event { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
    .hm-event__icon { font-size: 26px; }
    .hm-event__timer { text-align: left; width: 100%; display: flex; align-items: baseline; gap: 8px; }
    .hm-hero { border-radius: 14px; margin-bottom: 12px; }
    .hm-avatar { width: 60px; height: 60px; font-size: 30px; border-radius: 14px; }
    .hm-name { font-size: 20px; }
    .hm-stat { padding: 7px 8px; }
    .hm-stat b { font-size: 14px; }
    .hm-btn { min-height: 44px; font-size: 12px; padding: 0 10px; }
    .hm-grid, .hm-col, .hm-col--side, .hm-duo { gap: 12px; }
    .hm-mobile-friends { margin-bottom: 12px; }
    .hm-card { padding: 14px; border-radius: 12px; }
    .hm-qa { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .hm-qa__item { padding: 10px 2px; }
    .hm-qa__emoji { font-size: 20px; }
    .hm-qa__label { font-size: 9px; letter-spacing: .03em; }
    .hm-feed { max-height: 340px; }
    .hm-duo { grid-template-columns: minmax(0, 1fr); }
    .hm-col--side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 374.98px) {
    .hm-hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-qa { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
