/*
 * Wygląd portalu jak w apce mobilnej (src/theme/tokens.ts w MobileHeatingApp).
 * Jasne tło, białe karty z miękkim cieniem, akcent #E8510A, Plus Jakarta Sans.
 * Klasy z prefiksem hm- (heating mobile), żeby nie gryzły się z Bootstrapem.
 */
:root {
    --hm-bg: #F6F7F9;
    --hm-surface: #FFFFFF;
    --hm-accent: #E8510A;
    --hm-accent-dark: #C4430A;
    --hm-accent-light: #FF6B2B;
    --hm-accent-subtle: rgba(232, 81, 10, 0.08);
    --hm-text: #0F1729;
    --hm-text-2: #475569;
    --hm-muted: #94A3B8;
    --hm-border: #E8ECF1;
    --hm-border-visible: #CBD5E1;
    --hm-success: #10B981;
    --hm-error: #EF4444;
    --hm-warning: #F59E0B;
    --hm-info: #3B82F6;
    --hm-r-sm: 8px;
    --hm-r-md: 12px;
    --hm-r-lg: 16px;
    --hm-r-xl: 24px;
    --hm-shadow-sm: 0 1px 3px rgba(26, 36, 56, 0.06);
    --hm-shadow-md: 0 4px 12px rgba(26, 36, 56, 0.08);
    --hm-shadow-lg: 0 8px 24px rgba(26, 36, 56, 0.12);
    --hm-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.hm-page { background: var(--hm-bg); font-family: var(--hm-font); color: var(--hm-text); }
.hm-page h1, .hm-page h2, .hm-page h3, .hm-page h4, .hm-page h5 { font-family: var(--hm-font); }

/* --- Ekrany logowania / rejestracji: karta na środku --------------------- */
.hm-auth { min-height: calc(100vh - 40px); display: flex; align-items: center; justify-content: center;
           padding: 48px 20px; }
.hm-card { background: var(--hm-surface); border: 1px solid var(--hm-border); border-radius: var(--hm-r-xl);
           box-shadow: var(--hm-shadow-lg); padding: 40px 28px 32px; width: 100%; max-width: 460px; }
.hm-card-wide { max-width: 640px; }
.hm-center { text-align: center; }
.hm-logo { width: 72px; height: 72px; border-radius: var(--hm-r-xl); background: var(--hm-accent); color: #fff;
           display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 20px;
           box-shadow: 0 6px 12px rgba(232, 81, 10, 0.3); }
.hm-logo.is-soft { background: var(--hm-accent-subtle); color: var(--hm-accent); box-shadow: none; }
.hm-title { font-size: 24px; line-height: 32px; font-weight: 700; color: var(--hm-text); margin: 0 0 4px; }
.hm-subtitle { font-size: 13px; line-height: 18px; color: var(--hm-text-2); margin: 0 0 24px; }
.hm-back { position: fixed; top: 18px; left: 20px; z-index: 10; font-size: 13px; font-weight: 600;
           color: var(--hm-text-2); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.hm-back:hover { color: var(--hm-accent); }

/* --- Pola formularza: ikona + input w jednym „pudełku” jak w apce --------- */
.hm-field { display: flex; align-items: center; height: 48px; border: 1px solid var(--hm-border);
            border-radius: var(--hm-r-md); background: var(--hm-bg); margin-bottom: 12px;
            transition: border-color .15s, box-shadow .15s, background .15s; }
.hm-field:focus-within { border-color: var(--hm-accent); background: #fff; box-shadow: 0 0 0 3px var(--hm-accent-subtle); }
.hm-field.is-error { border-color: var(--hm-error); }
.hm-field-icon { width: 44px; flex: 0 0 44px; text-align: center; color: var(--hm-muted); font-size: 15px; }
.hm-field input, .hm-field select { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
            font-family: var(--hm-font); font-size: 15px; color: var(--hm-text); padding: 0 12px 0 0; }
.hm-field input::placeholder { color: var(--hm-muted); }
.hm-field-eye { width: 44px; flex: 0 0 44px; height: 100%; border: 0; background: transparent; color: var(--hm-muted); }
.hm-field-eye:hover { color: var(--hm-text-2); }
.hm-label { display: block; font-size: 12px; font-weight: 600; color: var(--hm-text-2); margin: 0 0 6px 2px; }
.hm-help { font-size: 11px; color: var(--hm-muted); margin: -6px 0 12px 4px; }
.hm-field-error { font-size: 11px; color: var(--hm-error); margin: -6px 0 12px 4px; }

/* Checkbox jak w apce: 18px, zaokrąglony, pomarańczowy po zaznaczeniu */
.hm-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--hm-text-2); cursor: pointer; }
.hm-check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border-radius: 4px;
                  border: 2px solid var(--hm-border-visible); display: inline-grid; place-content: center; cursor: pointer;
                  background: #fff; flex: 0 0 18px; }
.hm-check input:checked { background: var(--hm-accent); border-color: var(--hm-accent); }
.hm-check input:checked::before { content: ''; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
                                  transform: rotate(-45deg) translate(1px, -1px); }
.hm-link { color: var(--hm-accent); font-weight: 500; font-size: 13px; text-decoration: none; }
.hm-link:hover { color: var(--hm-accent-dark); text-decoration: underline; }

/* --- Przyciski -------------------------------------------------------------- */
.hm-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px;
          border-radius: var(--hm-r-md); font-family: var(--hm-font); font-size: 16px; font-weight: 700;
          border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: transform .1s, background .15s, opacity .15s; }
.hm-btn:active { transform: scale(0.98); }
.hm-btn:disabled { opacity: .6; cursor: default; }
.hm-btn-primary { background: var(--hm-accent); color: #fff; box-shadow: var(--hm-shadow-sm); }
.hm-btn-primary:hover { background: var(--hm-accent-dark); color: #fff; }
.hm-btn-outline { background: #fff; color: var(--hm-accent); border-color: var(--hm-accent); font-weight: 600; }
.hm-btn-outline:hover { background: var(--hm-accent-subtle); color: var(--hm-accent); }
.hm-btn-ghost { background: var(--hm-bg); color: var(--hm-text-2); border-color: var(--hm-border); font-weight: 600; }
.hm-btn-ghost:hover { color: var(--hm-text); }

.hm-divider { display: flex; align-items: center; gap: 16px; margin: 20px 0; color: var(--hm-muted); font-size: 13px; }
.hm-divider::before, .hm-divider::after { content: ''; flex: 1; height: 1px; background: var(--hm-border); }
.hm-muted-text { font-size: 13px; color: var(--hm-text-2); text-align: center; margin: 0 0 12px; }

/* --- Komunikaty ------------------------------------------------------------- */
.hm-alert { display: flex; gap: 8px; align-items: flex-start; border-radius: var(--hm-r-md); padding: 12px; font-size: 13px;
            margin-bottom: 16px; border: 1px solid; text-align: left; }
.hm-alert-error { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .15); color: var(--hm-error); }
.hm-alert-success { background: rgba(16, 185, 129, .08); border-color: rgba(16, 185, 129, .2); color: #047857; }
.hm-alert-info { background: rgba(59, 130, 246, .08); border-color: rgba(59, 130, 246, .18); color: #1D4ED8; }
.hm-alert-warning { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .2); color: #B45309; }

/* Flash z base.html na ekranach hm: w stylu apki */
.hm-page .alert { border-radius: var(--hm-r-md); font-family: var(--hm-font); font-size: 13px; box-shadow: var(--hm-shadow-sm); }

/* --- Dashboard: sekcje, kafelki, karty ------------------------------------- */
.hm-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 48px; }
.hm-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--hm-muted);
                    margin: 28px 0 12px; }
.hm-panel { background: var(--hm-surface); border: 1px solid var(--hm-border); border-radius: var(--hm-r-lg); box-shadow: var(--hm-shadow-sm); padding: 20px; }
.hm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.hm-tile { background: var(--hm-surface); border: 1px solid var(--hm-border); border-radius: var(--hm-r-lg); box-shadow: var(--hm-shadow-sm);
           padding: 16px; text-decoration: none; color: var(--hm-text); display: flex; flex-direction: column; gap: 10px;
           transition: transform .15s, box-shadow .15s, border-color .15s; min-height: 120px; }
.hm-tile:hover { transform: translateY(-2px); box-shadow: var(--hm-shadow-md); border-color: var(--hm-border-visible); color: var(--hm-text); }
.hm-tile-icon { width: 44px; height: 44px; border-radius: var(--hm-r-md); display: flex; align-items: center; justify-content: center;
                font-size: 18px; background: var(--hm-accent-subtle); color: var(--hm-accent); }
.hm-tile-title { font-size: 15px; font-weight: 700; line-height: 1.25; }
.hm-tile-meta { font-size: 12px; color: var(--hm-text-2); margin-top: -6px; }
.hm-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px;
            background: var(--hm-accent-subtle); color: var(--hm-accent); }

/* --- Ekrany auth w stylu apki: baner + karta formularza (RegisterScreen) ---- */
.hm-stack { width: 100%; max-width: 560px; margin: 0 auto; padding: 40px 16px 48px; }
.hm-stack-narrow { max-width: 480px; }
.hm-banner { position: relative; overflow: hidden; background: var(--hm-surface); border: 1px solid var(--hm-border);
             border-radius: var(--hm-r-xl); padding: 20px 20px 0; box-shadow: var(--hm-shadow-md); }
.hm-banner::before, .hm-banner::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.hm-banner::before { width: 140px; height: 140px; top: -50px; right: -30px; background: var(--hm-accent-subtle); }
.hm-banner::after { width: 80px; height: 80px; bottom: -20px; left: -10px; background: rgba(59, 130, 246, 0.04); }
.hm-banner > * { position: relative; z-index: 1; }
.hm-banner-back { width: 36px; height: 36px; border-radius: 50%; background: var(--hm-bg); border: 1px solid var(--hm-border);
                  display: inline-flex; align-items: center; justify-content: center; color: var(--hm-text); text-decoration: none;
                  font-size: 15px; margin-bottom: 16px; transition: border-color .15s, color .15s; }
.hm-banner-back:hover { color: var(--hm-accent); border-color: var(--hm-border-visible); }
.hm-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 500; color: var(--hm-muted);
              text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.hm-eyebrow i { font-size: 14px; }
.hm-banner-title { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--hm-text); margin: 0; }
.hm-banner-sub { font-size: 13px; line-height: 18px; color: var(--hm-text-2); margin: 4px 0 0; }
.hm-banner-line { height: 2px; margin: 16px -20px 0; background: linear-gradient(90deg, var(--hm-accent), var(--hm-accent-light), transparent); }

.hm-form-card { background: var(--hm-surface); border: 1px solid var(--hm-border); border-radius: var(--hm-r-lg);
                box-shadow: var(--hm-shadow-md); padding: 20px; margin-top: 12px; }
.hm-form-card .hm-label { font-size: 13px; color: var(--hm-text); margin-left: 0; margin-bottom: 8px; }
.hm-form-card .hm-field { margin-bottom: 4px; }
.hm-form-card .hm-help, .hm-form-card .hm-field-error { margin: 4px 0 0 2px; }
.hm-group { margin-bottom: 16px; }
.hm-field > input:first-child, .hm-field > select:first-child { padding-left: 16px; }
.hm-field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 0; }
.hm-field-chev { width: 40px; flex: 0 0 40px; text-align: center; color: var(--hm-muted); font-size: 12px; pointer-events: none; }
.hm-sect { border-top: 1px solid var(--hm-border); margin: 8px 0 16px; padding-top: 16px; font-size: 11px; font-weight: 700;
           color: var(--hm-muted); letter-spacing: 1px; text-transform: uppercase; }
.hm-empty-hint { text-align: center; padding: 24px 8px 8px; color: var(--hm-muted); font-size: 13px; }
.hm-empty-hint i { font-size: 22px; margin-bottom: 10px; display: block; }

/* Wymagania hasła (klasy .requirement/.valid/.invalid przełącza JS) */
.hm-pw { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0 0 16px; padding: 12px;
         background: var(--hm-bg); border: 1px solid var(--hm-border); border-radius: var(--hm-r-md); }
.hm-pw-title { grid-column: 1 / -1; font-size: 11px; font-weight: 600; color: var(--hm-text-2); }
.hm-pw .requirement { display: flex; align-items: center; font-size: 12px; color: var(--hm-muted); }
.hm-pw .requirement i { font-size: 13px; }
.hm-pw .requirement.valid { color: var(--hm-success); }
.hm-pw .requirement.invalid { color: var(--hm-muted); }

.hm-info { display: flex; gap: 8px; align-items: flex-start; background: rgba(59, 130, 246, 0.06);
           border: 1px solid rgba(59, 130, 246, 0.10); border-radius: var(--hm-r-md); padding: 12px; font-size: 13px;
           line-height: 18px; color: var(--hm-info); margin-bottom: 16px; }
.hm-info i { margin-top: 2px; }
.hm-btn-lg { height: 52px; font-size: 17px; }
.hm-btn-lg i { font-size: 18px; }
.hm-terms { align-items: flex-start; line-height: 18px; margin: 4px 0 20px; }
.hm-terms input { margin-top: 0; }
.hm-terms a { color: var(--hm-accent); font-weight: 600; text-decoration: none; }
.hm-terms a:hover { text-decoration: underline; }
.hm-below { text-align: center; font-size: 13px; color: var(--hm-text-2); margin: 20px 0 0; }
.hm-below a { color: var(--hm-accent); font-weight: 700; text-decoration: none; }
.hm-below a:hover { text-decoration: underline; }
.hm-page .modal-content { border-radius: var(--hm-r-lg); overflow: hidden; font-family: var(--hm-font); }

/* --- Dashboard w stylu apki --------------------------------------------------- */
.hm-hero { position: relative; overflow: hidden; background: var(--hm-surface); border-bottom: 1px solid var(--hm-border); }
.hm-hero::before, .hm-hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.hm-hero::before { width: 260px; height: 260px; top: -110px; right: -60px; background: var(--hm-accent-subtle); }
.hm-hero::after { width: 140px; height: 140px; bottom: -70px; right: 22%; background: rgba(232, 81, 10, 0.05); }
.hm-hero-in { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 24px 20px 24px; }
.hm-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.hm-role-pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 12px;
                font-size: 11px; font-weight: 600; border: 1px solid var(--hm-border); }
.hm-role-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hm-hero-actions { display: flex; gap: 8px; }
.hm-icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--hm-surface);
               border: 1px solid var(--hm-border); display: inline-flex; align-items: center; justify-content: center;
               color: var(--hm-text); font-size: 17px; text-decoration: none; transition: border-color .15s, color .15s, box-shadow .15s; }
a.hm-icon-btn:hover { color: var(--hm-accent); border-color: var(--hm-border-visible); box-shadow: var(--hm-shadow-sm); }
.hm-icon-btn.is-soft { color: var(--hm-text-2); }
.hm-icon-btn .hm-dot-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
                             background: var(--hm-error); color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; text-align: center;
                             border: 1.5px solid #fff; }
.hm-hero-greet { font-size: 15px; line-height: 22px; color: var(--hm-text-2); margin: 0 0 4px; }
.hm-hero-name { font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -0.5px; color: var(--hm-text); margin: 0; }
.hm-hero-sub { font-size: 13px; color: var(--hm-text-2); margin: 8px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hm-hero-sub .live { width: 8px; height: 8px; border-radius: 50%; background: var(--hm-success); box-shadow: 0 0 0 3px rgba(16, 185, 129, .15); }
.hm-hero-sub .off { width: 8px; height: 8px; border-radius: 50%; background: var(--hm-border-visible); }
.hm-hero-line { height: 2px; background: linear-gradient(90deg, var(--hm-accent), var(--hm-accent-light), transparent); }
.hm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.hm-stat { background: var(--hm-bg); border: 1px solid var(--hm-border); border-radius: var(--hm-r-lg); padding: 14px 16px; }
.hm-stat-value { display: block; font-size: 24px; line-height: 30px; font-weight: 700; color: var(--hm-text); }
.hm-stat-label { display: block; font-size: 11px; font-weight: 600; color: var(--hm-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.hm-stat.is-alert { background: rgba(232, 81, 10, 0.06); border-color: rgba(232, 81, 10, 0.18); }
.hm-stat.is-alert .hm-stat-value { color: var(--hm-accent); }

.hm-dash { max-width: 1180px; margin: 0 auto; padding: 8px 20px 96px; }
.hm-dash .hm-section-title { display: flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 1px; }
.hm-dash .hm-section-title:first-child { margin-top: 20px; }
.hm-tile { position: relative; }
.hm-tile-badge { position: absolute; top: 12px; right: 12px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
                 font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--hm-error); }
.hm-tile-meta { margin-top: -4px; }

.hm-cardx { background: var(--hm-surface); border: 1px solid var(--hm-border); border-radius: var(--hm-r-lg); box-shadow: var(--hm-shadow-sm); overflow: hidden; }
.hm-cardx-head { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--hm-border);
                 font-size: 13px; font-weight: 700; color: var(--hm-text); }
.hm-cardx-head i { color: var(--hm-accent); }
.hm-cardx-body { padding: 16px 20px; }

.hm-notice { display: flex; align-items: center; gap: 14px; padding: 16px; margin-top: 20px; background: var(--hm-surface);
             border: 1px solid rgba(232, 81, 10, .2); border-left: 4px solid var(--hm-accent); border-radius: var(--hm-r-lg);
             box-shadow: var(--hm-shadow-sm); color: var(--hm-text); text-decoration: none; }
.hm-notice:hover { color: var(--hm-text); box-shadow: var(--hm-shadow-md); }
.hm-notice-title { font-size: 15px; font-weight: 700; display: block; }
.hm-notice-sub { font-size: 12px; color: var(--hm-text-2); display: block; margin-top: 2px; }

/* Kolorowe przyciski paneli jak w apce (adminPanelStyles.panelBtn) */
.hm-panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.hm-panel-btn { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--hm-r-lg); color: #fff;
                text-decoration: none; box-shadow: var(--hm-shadow-sm); transition: transform .15s, box-shadow .15s, filter .15s; min-width: 0; }
.hm-panel-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--hm-shadow-md); filter: brightness(1.04); }
.hm-panel-ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--hm-r-md); background: rgba(255, 255, 255, .2);
                display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.hm-panel-txt { flex: 1; min-width: 0; }
.hm-panel-title { display: block; font-size: 17px; line-height: 22px; font-weight: 700; color: #fff; }
.hm-panel-desc { display: block; font-size: 11px; color: rgba(255, 255, 255, .7); margin-top: 2px; }
.hm-panel-num { font-size: 24px; font-weight: 700; line-height: 1; color: #fff; }
.hm-panel-chev { color: rgba(255, 255, 255, .8); font-size: 14px; }

/* Karta giełdy z pomarańczowym nagłówkiem (FairCardHeader) */
.hm-fair { background: var(--hm-surface); border: 1px solid var(--hm-border); border-radius: var(--hm-r-lg); box-shadow: var(--hm-shadow-md); overflow: hidden; }
.hm-fair-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 16px; color: #fff;
                background: linear-gradient(135deg, #C4430A, #E8510A, #FF6B2B); }
.hm-fair-label { font-size: 11px; color: rgba(255, 255, 255, .8); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.hm-fair-name { font-size: 17px; line-height: 24px; font-weight: 700; color: #fff; }
.hm-fair-days { flex: 0 0 auto; text-align: center; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .25);
                border-radius: var(--hm-r-md); padding: 8px 12px; }
.hm-fair-days b { display: block; font-size: 24px; line-height: 1; font-weight: 700; }
.hm-fair-days span { font-size: 11px; color: rgba(255, 255, 255, .85); }
.hm-fair-stats { display: flex; border-bottom: 1px solid var(--hm-border); }
.hm-fair-stat { flex: 1; text-align: center; padding: 14px 8px; }
.hm-fair-stat + .hm-fair-stat { border-left: 1px solid var(--hm-border); }
.hm-fair-stat-value { display: block; font-size: 20px; line-height: 26px; font-weight: 700; color: var(--hm-accent); }
.hm-fair-stat-label { display: block; font-size: 11px; color: var(--hm-muted); text-transform: uppercase; letter-spacing: .04em; }
.hm-fair-foot { padding: 14px 16px; text-align: center; font-size: 13px; color: var(--hm-text-2); }
.hm-btn-sm { height: 40px; font-size: 13px; width: auto; display: inline-flex; padding: 0 18px; }

/* Lista linków z ikonami i strzałkami */
.hm-list { list-style: none; margin: 0; padding: 0; }
.hm-list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: var(--hm-text); text-decoration: none;
                font-size: 15px; font-weight: 600; transition: background .15s; }
.hm-list li + li .hm-list-item { border-top: 1px solid var(--hm-border); }
.hm-list-item:hover { background: var(--hm-bg); color: var(--hm-text); }
.hm-chip { width: 36px; height: 36px; flex: 0 0 36px; border-radius: var(--hm-r-md); display: flex; align-items: center; justify-content: center;
           font-size: 15px; background: var(--hm-accent-subtle); color: var(--hm-accent); }
.hm-list-item .hm-chev { margin-left: auto; color: var(--hm-muted); font-size: 12px; }

.hm-news { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.hm-news + .hm-news { border-top: 1px solid var(--hm-border); }
.hm-news-title { font-size: 13px; font-weight: 600; color: var(--hm-text); }
.hm-news-time { font-size: 11px; color: var(--hm-muted); margin-top: 2px; }

.hm-profile { display: flex; flex-direction: column; gap: 12px; }
.hm-profile small { display: block; font-size: 11px; color: var(--hm-muted); text-transform: uppercase; letter-spacing: .06em; }
.hm-profile strong { font-size: 15px; font-weight: 600; color: var(--hm-text); word-break: break-word; }
.hm-role-tag { display: inline-block; background: var(--hm-bg); border: 1px solid var(--hm-border); color: var(--hm-text-2); font-size: 11px;
               font-weight: 600; padding: 2px 8px; border-radius: 999px; margin: 4px 4px 0 0; }

@media (max-width: 767.98px) {
    .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-hero-name { font-size: 24px; line-height: 32px; }
    .hm-hero-in { padding: 16px 16px 20px; }
    .hm-dash { padding: 4px 16px 96px; }
    .hm-panels { grid-template-columns: 1fr; }
    .hm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-stack { padding: 20px 16px 40px; }
    .hm-pw { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
    .hm-card { padding: 32px 20px 24px; border-radius: var(--hm-r-lg); }
    .hm-back { position: static; margin: 12px 0 0 16px; }
}

/* --- Animacje jak w apce (wejście kart + sprężyste wciśnięcie) ---------------
 * hm-rise: fade + przesunięcie 30px -> 0, 400 ms, easing jak w usePressAnim/Reanimated.
 * fill-mode backwards: po animacji transform wraca do normalnych reguł (hover/active).
 * Kolejność: --hm-i (blok, ustawiane w dashboard.html) + --hm-j (pozycja w siatce, nth-child).
 */
@keyframes hm-rise {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.hm-page .hm-card, .hm-page .hm-banner, .hm-page .hm-form-card,
.hm-page .hm-cardx, .hm-page .hm-fair, .hm-page .hm-notice, .hm-page .hm-panel,
.hm-page .hm-section-title, .hm-page .hm-stat, .hm-page .hm-tile, .hm-page .hm-panel-btn {
    animation: hm-rise .4s cubic-bezier(.16, 1, .3, 1) backwards;
    animation-delay: min(calc((var(--hm-i, 0) + var(--hm-j, 0)) * 70ms), 1100ms);
}
.hm-page .hm-form-card { --hm-j: 1; }
.hm-page .hm-stats > :nth-child(1), .hm-page .hm-tiles > :nth-child(1), .hm-page .hm-panels > :nth-child(1) { --hm-j: 0; }
.hm-page .hm-stats > :nth-child(2), .hm-page .hm-tiles > :nth-child(2), .hm-page .hm-panels > :nth-child(2) { --hm-j: 1; }
.hm-page .hm-stats > :nth-child(3), .hm-page .hm-tiles > :nth-child(3), .hm-page .hm-panels > :nth-child(3) { --hm-j: 2; }
.hm-page .hm-stats > :nth-child(4), .hm-page .hm-tiles > :nth-child(4), .hm-page .hm-panels > :nth-child(4) { --hm-j: 3; }
.hm-page .hm-stats > :nth-child(5), .hm-page .hm-tiles > :nth-child(5), .hm-page .hm-panels > :nth-child(5) { --hm-j: 4; }
.hm-page .hm-stats > :nth-child(6), .hm-page .hm-tiles > :nth-child(6), .hm-page .hm-panels > :nth-child(6) { --hm-j: 5; }
.hm-page .hm-stats > :nth-child(7), .hm-page .hm-tiles > :nth-child(7), .hm-page .hm-panels > :nth-child(7) { --hm-j: 6; }
.hm-page .hm-stats > :nth-child(8), .hm-page .hm-tiles > :nth-child(8), .hm-page .hm-panels > :nth-child(8) { --hm-j: 7; }
.hm-page .hm-tiles > :nth-child(9), .hm-page .hm-panels > :nth-child(9) { --hm-j: 8; }
.hm-page .hm-tiles > :nth-child(10), .hm-page .hm-panels > :nth-child(10) { --hm-j: 9; }
.hm-page .hm-tiles > :nth-child(n+11), .hm-page .hm-panels > :nth-child(n+11) { --hm-j: 10; }

/* Wciśnięcie: szybko w dół do .97, sprężyście z powrotem */
.hm-page .hm-btn, .hm-page .btn, .hm-page .hm-tile, .hm-page .hm-panel-btn, .hm-page .hm-icon-btn,
.hm-page .hm-notice, .hm-page .hm-list-item, .hm-page .hm-banner-back {
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background-color .15s, border-color .15s,
                box-shadow .15s, color .15s, opacity .15s, filter .15s;
}
.hm-page .hm-btn:active, .hm-page .btn:active, .hm-page .hm-tile:active, .hm-page .hm-panel-btn:active,
.hm-page .hm-icon-btn:active, .hm-page .hm-notice:active, .hm-page .hm-list-item:active, .hm-page .hm-banner-back:active {
    transform: scale(.97);
    transition-duration: .08s;
}
.hm-page .hm-btn:disabled:active, .hm-page .btn:disabled:active { transform: none; }

/* --- Tło ekranów logowania: miękkie plamy + delikatna siatka kropek -----------
 * Warstwy fixed z inset:0 (nie wychodzą poza ekran, brak poziomego scrolla),
 * z-index:-1 pod treścią, nad tłem body.
 */
body.hm-auth-bg::before, body.hm-auth-bg::after {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
body.hm-auth-bg::before {
    background:
        radial-gradient(520px circle at calc(100% - 40px) 0, rgba(232, 81, 10, .10), rgba(232, 81, 10, .05) 38%, rgba(232, 81, 10, 0) 70%),
        radial-gradient(380px circle at 0 100%, rgba(59, 130, 246, .06), rgba(59, 130, 246, .03) 40%, rgba(59, 130, 246, 0) 72%),
        radial-gradient(260px circle at 18% 22%, rgba(255, 107, 43, .045), rgba(255, 107, 43, 0) 70%);
}
body.hm-auth-bg::after {
    background-image: radial-gradient(rgba(15, 23, 41, .07) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, transparent 30%, #000 100%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, transparent 30%, #000 100%);
    opacity: .6;
}
.hm-auth-bg .hm-auth { overflow: hidden; }
.hm-auth-bg .hm-auth, .hm-auth-bg .hm-stack { position: relative; }
@media (max-width: 575.98px) {
    body.hm-auth-bg::before {
        background:
            radial-gradient(320px circle at 100% 0, rgba(232, 81, 10, .10), rgba(232, 81, 10, .04) 40%, rgba(232, 81, 10, 0) 72%),
            radial-gradient(240px circle at 0 100%, rgba(59, 130, 246, .06), rgba(59, 130, 246, 0) 72%);
    }
    body.hm-auth-bg::after { opacity: .4; }
}

@media (prefers-reduced-motion: reduce) {
    .hm-page .hm-card, .hm-page .hm-banner, .hm-page .hm-form-card,
    .hm-page .hm-cardx, .hm-page .hm-fair, .hm-page .hm-notice, .hm-page .hm-panel,
    .hm-page .hm-section-title, .hm-page .hm-stat, .hm-page .hm-tile, .hm-page .hm-panel-btn { animation: none; }
    .hm-page .hm-btn, .hm-page .btn, .hm-page .hm-tile, .hm-page .hm-panel-btn, .hm-page .hm-icon-btn,
    .hm-page .hm-notice, .hm-page .hm-list-item, .hm-page .hm-banner-back { transition: none; }
    .hm-page .hm-btn:active, .hm-page .btn:active, .hm-page .hm-tile:active, .hm-page .hm-panel-btn:active,
    .hm-page .hm-icon-btn:active, .hm-page .hm-notice:active, .hm-page .hm-list-item:active,
    .hm-page .hm-banner-back:active, .hm-page .hm-tile:hover, .hm-page .hm-panel-btn:hover { transform: none; }
}
