/* ==========================================================================
   HAKA RECEPCJA — Application Shell Styles (hk-*)
   Light theme — accent: amber (#d97706) / gold (#facc15)
   ========================================================================== */

:root {
    --hk-accent: #d97706;
    --hk-accent-light: #fef3c7;
    --hk-accent-hover: #b45309;
    --hk-text: #1e293b;
    --hk-text-muted: #475569;
    --hk-bg: #eef1f6;
    --hk-white: #fff;
    --hk-border: #d5dbe5;
    --hk-radius: 12px;
    --hk-radius-lg: 16px;
    --hk-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --hk-shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --hk-green: #16a34a;
    --hk-blue: #2563eb;
    --hk-red: #dc2626;
    --hk-row-stripe: #f6f8fb;
    --hk-link: var(--hk-accent);
    --hk-link-hover: var(--hk-accent-hover);
    --hk-navbar-bg: var(--hk-white);
    --hk-navbar-text: var(--hk-text);
    --hk-card-bg: var(--hk-white);
    --hk-card-header-bg: #edf0f5;
    --hk-footer-bg: #e2e8f0;
}

/* ---------- Body ---------- */
body {
    background: var(--hk-bg);
    font-family: var(--rc-font, "Inter", system-ui, sans-serif);
    font-weight: 500;
    color: var(--hk-text);
}

/* ---------- Links ---------- */
a { color: var(--hk-link); }
a:hover { color: var(--hk-link-hover); }

/* ---------- Navbar ---------- */
.hk-navbar {
    background: var(--hk-navbar-bg);
    border-bottom: 1px solid var(--hk-border);
    padding: 0.75rem 0;
    font-family: var(--rc-font, "Inter", system-ui, sans-serif);
    z-index: 1040;
    box-shadow: var(--hk-shadow-sm);
}
.hk-navbar .container-fluid {
    align-items: center;
}

.hk-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.hk-brand-banner {
    height: 72px;
    width: auto;
    border-radius: 6px;
    object-fit: contain;
    margin: -0.25rem 0;
}

.hk-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
}

.hk-brand-text {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--hk-navbar-text);
    letter-spacing: 0.04em;
}

/* Hamburger — hidden when tab bar is present */
.hk-hamburger {
    padding: 0.4rem 0.5rem;
}
@media (max-width: 991px) {
    .hk-hamburger { display: none; }
    .navbar-collapse { display: none !important; }
}

.hk-hamburger .bi-list {
    font-size: 2rem;
    line-height: 1;
    color: var(--hk-navbar-text);
}

.hk-navbar .nav-link {
    color: var(--hk-navbar-text);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.hk-navbar .nav-link:hover {
    color: var(--hk-navbar-text);
    background: rgba(0,0,0,0.06);
}

.hk-navbar .nav-link.active {
    color: var(--hk-accent);
    background: var(--hk-accent-light);
    font-weight: 600;
}

/* CTA buttons in nav (Skanuj QR, Dodaj wejście) */
.hk-nav-cta {
    background: var(--hk-accent) !important;
    border: 1px solid var(--hk-accent) !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.hk-nav-cta:hover {
    background: var(--hk-accent-hover) !important;
    border-color: var(--hk-accent-hover) !important;
    color: #fff !important;
}

.hk-nav-cta.active {
    background: var(--hk-accent-hover) !important;
    border-color: var(--hk-accent-hover) !important;
    color: #fff !important;
}

.hk-nav-sep {
    width: 1px;
    background: var(--hk-border);
    margin: 0.3rem 0.4rem;
    align-self: stretch;
}

/* Dropdown */
.hk-dropdown {
    background: var(--hk-white);
    border: 1px solid var(--hk-border);
    border-radius: 10px;
    padding: 0.4rem;
    box-shadow: var(--hk-shadow-md);
}

.hk-dropdown .dropdown-item {
    color: var(--hk-text-muted);
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
}

.hk-dropdown .dropdown-item:hover {
    background: var(--hk-bg);
    color: var(--hk-text);
}

.hk-dropdown .dropdown-item i {
    color: var(--hk-accent);
}

.hk-dropdown .dropdown-divider {
    border-color: var(--hk-border);
    margin: 0.25rem 0;
}

/* User badge */
.hk-user-badge {
    color: var(--hk-text-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.hk-btn-logout {
    color: var(--hk-text-muted);
    border: 1px solid var(--hk-border);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    transition: all 0.15s ease;
}

.hk-btn-logout:hover {
    color: var(--hk-red);
    border-color: var(--hk-red);
    background: #fef2f2;
}

/* ---------- Messages / Alerts ---------- */
.hk-alert {
    font-size: 0.88rem;
    border-radius: 10px;
    font-weight: 500;
}

.alert-error {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

/* ---------- Main content ---------- */
.hk-main {
    min-height: calc(100vh - 160px);
    padding: 0;
    background: #fff;
}

/* ---------- Quick Actions (mobile FAB) ---------- */
.hk-quick-actions {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1030;
}

.hk-quick-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--hk-accent);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--hk-accent) 35%, transparent);
    transition: all 0.15s ease;
}

.hk-quick-btn:hover {
    background: var(--hk-accent-hover);
    color: #fff;
    transform: scale(1.08);
}

/* ---------- Bottom Tab Bar (mobile) ---------- */
.hk-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--hk-white);
    border-top: 0.5px solid var(--hk-border);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}
@media (max-width: 991px) {
    .hk-tab-bar { display: flex; justify-content: space-around; align-items: center; }
    .hk-quick-actions { display: none !important; }
    .hk-main { padding-bottom: 72px; }
}
.hk-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--hk-text-muted);
    font-size: 10px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 8px;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--rc-font, "Inter", system-ui, sans-serif);
}
.hk-tab-item i { font-size: 22px; line-height: 1; }
.hk-tab-item.active { color: var(--hk-accent); font-weight: 600; }
.hk-tab-item:hover { color: var(--hk-accent); }

/* QR FAB — central raised button */
.hk-tab-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--hk-accent);
    color: #fff;
    font-size: 24px;
    border: none;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--hk-accent) 40%, transparent);
    margin-top: -18px;
    text-decoration: none;
    transition: transform .15s, background .15s;
    -webkit-tap-highlight-color: transparent;
}
.hk-tab-fab:hover { background: var(--hk-accent-hover); color: #fff; transform: scale(1.05); }

/* "More" bottom sheet */
.hk-sheet-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(0,0,0,.35);
}
.hk-sheet-backdrop.open { display: block; }
.hk-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1061;
    background: var(--hk-white);
    border-radius: 16px 16px 0 0;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    max-height: 70vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.hk-sheet-backdrop.open .hk-sheet { transform: translateY(0); }
.hk-sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--hk-border);
    margin: 0 auto 12px;
}
.hk-sheet-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--hk-text);
    text-decoration: none;
    border-bottom: 0.5px solid var(--hk-border);
    transition: background .1s;
    font-family: var(--rc-font, "Inter", system-ui, sans-serif);
}
.hk-sheet-item:last-child { border-bottom: none; }
.hk-sheet-item:hover, .hk-sheet-item:active { background: var(--hk-bg); }
.hk-sheet-item i { font-size: 20px; color: var(--hk-accent); width: 24px; text-align: center; }
.hk-sheet-divider {
    height: 0;
    border-top: 0.5px solid var(--hk-border);
    margin: 4px 0;
}



/* ---------- Section cards ---------- */
.hk-section-card {
    background: var(--hk-card-bg);
    border: 1px solid var(--hk-border);
    border-radius: var(--hk-radius-lg);
    overflow: hidden;
    box-shadow: var(--hk-shadow-sm);
}

.hk-section-card .card-header {
    border-bottom: 1px solid var(--hk-border);
    background: var(--hk-card-header-bg);
    color: var(--hk-text);
    font-size: 0.88rem;
}

/* ---------- Footer ---------- */
.hk-footer {
    background: var(--hk-footer-bg);
    color: var(--hk-text-muted);
    padding: 1rem 0;
    margin-top: 2rem;
    font-size: 0.8rem;
}

/* ---------- Page Banner (reusable for list pages) ---------- */
.hk-page-banner {
    background: var(--hk-card-bg);
    color: var(--hk-text);
    border-radius: var(--hk-radius-lg);
    border: 1px solid var(--hk-border);
    border-left: 4px solid var(--hk-accent);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Accent buttons — pill CTA style (matches nav-cta) */
.hk-btn-accent {
    background: var(--hk-accent);
    color: #fff;
    border: 1px solid var(--hk-accent);
    border-radius: 8px;
    font-weight: 600;
}
.hk-btn-accent:hover {
    background: var(--hk-accent-hover);
    border-color: var(--hk-accent-hover);
    color: #fff;
}
.hk-btn-accent-outline {
    background: transparent;
    color: var(--hk-accent);
    border: 1px solid var(--hk-accent);
    border-radius: 8px;
    font-weight: 600;
}
.hk-btn-accent-outline:hover {
    background: var(--hk-accent);
    color: #fff;
}

.hk-page-banner h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: var(--hk-text);
}

.hk-page-banner .badge {
    background: var(--hk-accent-light);
    color: var(--hk-accent);
    font-weight: 700;
    font-size: 0.78rem;
}

/* ---------- Dashboard cards ---------- */
.hk-stat-card {
    background: var(--hk-card-bg);
    border: 1px solid var(--hk-border);
    border-top: 3px solid var(--hk-border);
    border-radius: var(--hk-radius);
    padding: 1.25rem 1.5rem;
    transition: box-shadow 0.15s ease;
}

.hk-stat-card:hover {
    box-shadow: var(--hk-shadow-md);
}

/* Color-coded top borders for stat cards */
.hk-stat-card--gold  { border-top-color: var(--hk-accent); }
.hk-stat-card--green { border-top-color: var(--hk-green); }
.hk-stat-card--blue  { border-top-color: var(--hk-blue); }
.hk-stat-card--red   { border-top-color: var(--hk-red); }

.hk-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--hk-text);
    line-height: 1.1;
}

.hk-stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--hk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.25rem;
}

.hk-stat-note {
    font-size: 0.78rem;
    color: var(--hk-text-muted);
    margin-top: 0.3rem;
}

.hk-stat-icon {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Color-matched stat icons */
.hk-stat-card--gold  .hk-stat-icon { color: var(--hk-accent); background: #fef3c7; }
.hk-stat-card--green .hk-stat-icon { color: var(--hk-green); background: #dcfce7; }
.hk-stat-card--blue  .hk-stat-icon { color: var(--hk-blue); background: #dbeafe; }
.hk-stat-card--red   .hk-stat-icon { color: var(--hk-red); background: #fee2e2; }

/* Clickable stat cards */
.hk-stat-card--link {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hk-stat-card--link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Active discipline filter panel */
.hk-stat-card--active {
    box-shadow: 0 0 0 2px var(--hk-accent), var(--hk-shadow-md);
    transform: translateY(-2px);
}

/* Clickable badge */
.hk-badge--link { cursor: pointer; transition: filter 0.15s; }
.hk-badge--link:hover { filter: brightness(0.9); }

/* ---------- ID Card (trainer / room panels) ---------- */
.hk-id-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.hk-id-card-link:hover {
    color: inherit;
    text-decoration: none;
}
.hk-id-card {
    background: var(--hk-card-bg);
    border: 1px solid var(--hk-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 8px color-mix(in srgb, var(--hk-accent) 25%, transparent);
    transition: box-shadow 0.3s ease;
    cursor: pointer;
}
.hk-id-card:hover {
    box-shadow: 0 0 18px color-mix(in srgb, var(--hk-accent) 50%, transparent), 0 0 40px color-mix(in srgb, var(--hk-accent) 20%, transparent);
}
.hk-id-card-header {
    background: var(--hk-card-header-bg);
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--hk-text-muted);
    border-bottom: 1px solid var(--hk-border);
}
.hk-id-card-banner {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 1.25rem 1rem;
    background: #fff;
    border-bottom: none;
}
.hk-id-card-banner-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 8px color-mix(in srgb, var(--hk-accent) 25%, transparent);
}
.hk-id-card-banner-initials {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--hk-accent-light);
    color: var(--hk-accent);
    box-shadow: 0 0 8px color-mix(in srgb, var(--hk-accent) 25%, transparent);
}
.hk-id-card-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #000;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    box-shadow: 0 0 8px color-mix(in srgb, var(--hk-accent) 25%, transparent);
}
.hk-id-card-body {
    padding: 1.25rem;
    text-align: center;
}
.hk-id-card-photo {
    margin-bottom: 0.75rem;
}
.hk-id-card-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.hk-id-card-name a {
    color: inherit;
    text-decoration: none;
}
.hk-id-card-name a:hover {
    color: var(--hk-accent);
}
.hk-id-card-body > .hk-btn-accent {
    box-shadow: 0 0 8px color-mix(in srgb, var(--hk-accent) 25%, transparent);
    transition: box-shadow 0.3s ease;
}
.hk-id-card:hover .hk-btn-accent,
.hk-id-card-body > .hk-btn-accent:hover {
    box-shadow: 0 0 18px color-mix(in srgb, var(--hk-accent) 50%, transparent), 0 0 40px color-mix(in srgb, var(--hk-accent) 20%, transparent);
}
.hk-id-card-details {
    margin: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
}
.hk-id-card-row {
    font-size: 0.85rem;
}
.hk-id-card-qr {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--hk-border);
}
.hk-btn-toggle {
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    letter-spacing: 0.02em;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.hk-btn-toggle--deactivate {
    background: #fff;
    color: #b45309;
    border: 2px solid #b45309;
}
.hk-btn-toggle--deactivate:hover {
    background: #b45309;
    color: #fff;
    box-shadow: 0 0 16px rgba(180, 83, 9, 0.45), 0 0 36px rgba(180, 83, 9, 0.18);
    transform: scale(1.03);
}
.hk-btn-toggle--activate {
    background: #fff;
    color: #16a34a;
    border: 2px solid #16a34a;
}
.hk-btn-toggle--activate:hover {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 0 16px rgba(22, 163, 74, 0.45), 0 0 36px rgba(22, 163, 74, 0.18);
    transform: scale(1.03);
}
.hk-thumb-disc {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
    border-radius: 6px;
    object-fit: contain;
    display: inline-block;
}
.hk-thumb-disc--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    color: #92400e;
    font-size: 1.1rem;
}
.hk-room-limit {
    background: var(--hk-bg);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

/* ---------- Pass / ID Badge Card ---------- */
.hk-pass-card {
    background: var(--hk-white);
    border: 1px solid var(--hk-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    position: relative;
}
.hk-pass-strip {
    height: 6px;
    background: linear-gradient(90deg, var(--hk-accent), #f59e0b, var(--hk-accent));
}
.hk-pass-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem 0.5rem;
}
.hk-pass-org-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
}
.hk-pass-org-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--hk-text);
}
.hk-pass-org-sub {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hk-text-muted);
}
.hk-pass-photo {
    display: flex;
    justify-content: center;
    padding: 1rem 0 0.5rem;
}
.hk-pass-photo-frame {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--hk-accent);
}
.hk-pass-photo-placeholder {
    font-size: 3rem;
    color: var(--hk-accent);
}
.hk-pass-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.hk-pass-name {
    text-align: center;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 0.25rem 1rem;
    color: var(--hk-text);
}
.hk-pass-role {
    text-align: center;
    padding: 0.25rem 1rem 0.75rem;
}
.hk-pass-role-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
}
.hk-pass-role--admin   { background: #1e293b; color: #f8fafc; }
.hk-pass-role--owner   { background: #fef3c7; color: #92400e; }
.hk-pass-role--recepcja { background: #dbeafe; color: #1e40af; }
.hk-pass-role--unknown { background: #f1f5f9; color: #475569; }

.hk-pass-details {
    padding: 0 1.25rem;
    margin: 0.25rem 0 0.75rem;
}
.hk-pass-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--hk-border);
    font-size: 0.82rem;
}
.hk-pass-detail-row:last-child {
    border-bottom: none;
}
.hk-pass-detail-label {
    color: var(--hk-text-muted);
    font-weight: 600;
}
.hk-pass-detail-value {
    color: var(--hk-text);
    font-weight: 500;
}
.hk-pass-barcode {
    text-align: center;
    padding: 0.75rem 1.25rem;
    border-top: 1px dashed var(--hk-border);
}
.hk-pass-barcode-lines {
    height: 32px;
    margin: 0 auto 0.35rem;
    max-width: 180px;
    background: repeating-linear-gradient(
        90deg,
        #1e293b 0px, #1e293b 2px,
        transparent 2px, transparent 5px,
        #1e293b 5px, #1e293b 6px,
        transparent 6px, transparent 10px,
        #1e293b 10px, #1e293b 13px,
        transparent 13px, transparent 15px
    );
    border-radius: 2px;
}
.hk-pass-barcode-id {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--hk-text-muted);
    letter-spacing: 0.1em;
}
.hk-pass-footer {
    background: #f8fafc;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--hk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- Horizontal Badge Card (karta członkowska / bilet) ---------- */
.hk-badge-h {
    background: var(--hk-white);
    border: 1px solid var(--hk-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.07);
}
.hk-badge-h-strip {
    height: 5px;
    background: linear-gradient(90deg, var(--hk-accent), #f59e0b, var(--hk-accent));
}
.hk-badge-h-body {
    display: flex;
    min-height: 220px;
}
/* LEFT panel */
.hk-badge-h-left {
    flex: 0 0 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1rem 0.75rem;
    background: linear-gradient(180deg, #fefce8 0%, #fff7ed 100%);
}
.hk-badge-h-org {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.hk-badge-h-org-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}
.hk-badge-h-photo-frame {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--hk-accent);
    overflow: hidden;
    background: #fef3c7;
    flex-shrink: 0;
}
.hk-badge-h-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.hk-badge-h-id {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--hk-text-muted);
    letter-spacing: 0.05em;
    margin-top: 0.3rem;
    text-align: center;
    word-break: break-all;
}

/* SEPARATOR */
.hk-badge-h-sep {
    width: 1px;
    background: repeating-linear-gradient(
        180deg,
        var(--hk-border) 0px, var(--hk-border) 6px,
        transparent 6px, transparent 12px
    );
    flex-shrink: 0;
}

/* RIGHT panel */
.hk-badge-h-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem 0.75rem;
    min-width: 0;
}
.hk-badge-h-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.hk-badge-h-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--hk-text);
    line-height: 1.2;
}
.hk-badge-h-subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hk-text-muted);
    margin-top: 0.1rem;
}
.hk-badge-h-badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.hk-badge-h-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.72rem;
    white-space: nowrap;
}
.hk-badge-h-pill--amber  { background: #fef3c7; color: #92400e; }
.hk-badge-h-pill--blue   { background: #dbeafe; color: #1e40af; }
.hk-badge-h-pill--green  { background: #dcfce7; color: #166534; }
.hk-badge-h-pill--red    { background: #fee2e2; color: #991b1b; }
.hk-badge-h-pill--orange { background: #ffedd5; color: #9a3412; }
.hk-badge-h-pill--purple { background: #ede9fe; color: #5b21b6; }

/* Field grid */
.hk-badge-h-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem 1rem;
    flex: 1;
}
.hk-badge-h-field {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--hk-border);
    min-width: 0;
}
.hk-badge-h-field--highlight {
    background: #fefce8;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    margin: 0 -0.5rem;
    border-bottom-color: transparent;
}
.hk-badge-h-field-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hk-text-muted);
    margin-bottom: 0.1rem;
}
.hk-badge-h-field-label i {
    margin-right: 0.2rem;
    font-size: 0.72rem;
}
.hk-badge-h-field-value {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--hk-text);
    word-break: break-word;
}
.hk-badge-h-field--email { color: #2563eb; text-decoration: none; }
.hk-badge-h-field--email:hover { text-decoration: underline; }
.hk-badge-h-field--phone { color: #16a34a; }

/* Footer */
.hk-badge-h-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--hk-border);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.hk-badge-h-validity {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.hk-badge-h-validity strong {
    font-size: 0.88rem;
    margin-left: 0.15rem;
}
.hk-badge-h-validity--active {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.hk-badge-h-validity--expired {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.hk-badge-h-footer-date {
    font-size: 0.68rem;
    color: var(--hk-text-muted);
    opacity: 0.7;
    text-transform: uppercase;
}

/* ---- Edit mode ---- */
.hk-badge-h--edit {
    box-shadow: 0 6px 24px color-mix(in srgb, var(--hk-accent) 12%, transparent);
    border-color: var(--hk-accent);
}
.hk-badge-h-input {
    display: block;
    width: 100%;
    padding: 0.25rem 0.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--hk-text);
    background: var(--hk-white);
    border: 1px solid var(--hk-border);
    border-radius: 6px;
    outline: none;
    transition: border-color .15s;
}
.hk-badge-h-input:focus {
    border-color: var(--hk-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--hk-accent) 12%, transparent);
}
.hk-badge-h-input--name {
    font-size: 1.05rem;
    font-weight: 700;
    flex: 1;
}
.hk-badge-h-input--pill {
    display: inline-block;
    width: auto;
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
    cursor: pointer;
}
/* Custom mini switch */
.hk-badge-h-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    user-select: none;
}
.hk-badge-h-switch input {
    width: 2rem;
    height: 1.1rem;
    appearance: none;
    background: #e5e7eb;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: background .15s;
}
.hk-badge-h-switch input::before {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: calc(1.1rem - 4px);
    height: calc(1.1rem - 4px);
    background: white;
    border-radius: 50%;
    transition: transform .15s;
}
.hk-badge-h-switch input:checked {
    background: #16a34a;
}
.hk-badge-h-switch input:checked::before {
    transform: translateX(calc(2rem - 1.1rem));
}
.hk-badge-h-switch-label {
    color: var(--hk-text-muted);
}
/* Photo overlay */
.hk-badge-h-photo-frame--edit {
    position: relative;
    cursor: pointer;
}
.hk-badge-h-photo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    border-radius: 50%;
    color: white;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity .2s;
    cursor: pointer;
}
.hk-badge-h-photo-frame--edit:hover .hk-badge-h-photo-overlay {
    opacity: 1;
}

/* Mobile: stack vertically */
@media (max-width: 575.98px) {
    .hk-badge-h-body {
        flex-direction: column;
    }
    .hk-badge-h-left {
        flex: none;
        flex-direction: row;
        gap: 1rem;
        padding: 0.75rem 1rem;
    }
    .hk-badge-h-photo-frame {
        width: 64px;
        height: 64px;
    }
    .hk-badge-h-sep {
        width: auto;
        height: 1px;
        background: repeating-linear-gradient(
            90deg,
            var(--hk-border) 0px, var(--hk-border) 6px,
            transparent 6px, transparent 12px
        );
    }
    .hk-badge-h-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- QR Banner (prominent CTA) ---------- */
.hk-qr-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: box-shadow 0.15s, transform 0.15s;
}
.hk-qr-btn:hover {
    box-shadow: 0 4px 16px rgba(30,41,59,0.4);
    transform: translateY(-1px);
    color: #fff;
}
.hk-qr-btn i {
    color: #93c5fd;
    font-size: 1.1rem;
}
.hk-qr-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #1e293b, #334155);
    border: none;
    border-radius: var(--hk-radius-lg);
    text-decoration: none;
    color: #fff;
    transition: box-shadow 0.15s, transform 0.15s;
}
.hk-qr-banner:hover {
    box-shadow: 0 4px 16px rgba(30,41,59,0.35);
    transform: translateY(-1px);
    color: #fff;
}
.hk-qr-banner-icon {
    font-size: 1.75rem;
    color: #93c5fd;
    flex-shrink: 0;
}
.hk-btn-totp {
    background: transparent;
    color: #7c3aed;
    border: 1px solid #7c3aed;
    border-radius: 8px;
    font-weight: 600;
}
.hk-btn-totp:hover {
    background: #7c3aed;
    color: #fff;
}
.hk-qr-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.hk-qr-banner-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}
.hk-qr-banner-sub {
    font-size: 0.78rem;
    color: #94a3b8;
}
.hk-qr-banner-arrow {
    font-size: 1.1rem;
    color: #94a3b8;
}

/* ---------- Activity feed ---------- */
.hk-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--hk-border);
}

.hk-feed-item:last-child {
    border-bottom: none;
}

.hk-feed-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--hk-accent);
    flex-shrink: 0;
    margin-top: 5px;
}

.hk-feed-dot.success { background: var(--hk-green); }
.hk-feed-dot.warning { background: #f59e0b; }
.hk-feed-dot.danger  { background: var(--hk-red); }

.hk-feed-text {
    font-size: 0.88rem;
    color: var(--hk-text);
    line-height: 1.4;
}

.hk-feed-time {
    font-size: 0.75rem;
    color: var(--hk-text-muted);
}

/* ---------- Empty state ---------- */
.hk-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--hk-text-muted);
}

.hk-empty-icon {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 0.75rem;
}

.hk-empty-text {
    font-size: 0.92rem;
    font-weight: 500;
}

/* ---------- Tables ---------- */
.hk-table {
    font-size: 0.88rem;
    margin-bottom: 0;
}

.hk-table thead th {
    background: var(--hk-accent);
    border-bottom: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.65rem 0.75rem;
    white-space: nowrap;
}

.hk-table tbody tr:nth-child(even) {
    background: var(--hk-row-stripe);
}

.hk-table tbody td {
    padding: 0.6rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--hk-border);
    color: var(--hk-text);
}

.hk-table tbody tr:hover {
    background: var(--hk-accent-light);
}

/* Clickable rows */
.hk-table tbody tr[data-href] {
    cursor: pointer;
}

.hk-table tbody tr[data-href] td a:not(.btn) {
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.hk-link-name {
    font-weight: 600;
    color: var(--hk-accent);
    text-decoration: none;
}

.hk-link-name:hover {
    color: var(--hk-accent-hover);
    text-decoration: underline;
}

.hk-cell-sub {
    font-size: 0.78rem;
    color: var(--hk-text-muted);
    margin-top: 1px;
}

/* ---------- QR thumbnail ---------- */
.hk-qr-thumb {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--hk-border);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hk-qr-thumb:hover {
    transform: scale(1.25);
    box-shadow: var(--hk-shadow-md);
}

/* ---------- Detail table (key-value) ---------- */
.hk-detail-table th {
    background: var(--hk-card-header-bg);
    color: var(--hk-text-muted);
    font-weight: 600;
    font-size: 0.82rem;
    width: 160px;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--hk-border);
    vertical-align: middle;
}

.hk-detail-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--hk-border);
    vertical-align: middle;
    font-size: 0.88rem;
    background: var(--hk-white);
}

.hk-detail-table tr:nth-child(even) td {
    background: var(--hk-row-stripe);
}

.hk-detail-table tr:nth-child(even) th {
    background: #e7eaf0;
}

/* ---------- Badges ---------- */
.hk-badge-active {
    background: #dcfce7;
    color: var(--hk-green);
    font-weight: 600;
}

.hk-badge-inactive {
    background: #fee2e2;
    color: var(--hk-red);
    font-weight: 600;
}

.hk-badge-yes {
    background: #dcfce7;
    color: var(--hk-green);
    font-weight: 600;
}

.hk-badge-no {
    background: #fee2e2;
    color: var(--hk-red);
    font-weight: 600;
}

.hk-badge-settled {
    background: #dbeafe;
    color: var(--hk-blue);
    font-weight: 600;
}

.hk-badge-unsettled {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

/* Inline data badges (phone, email, date, currency) */
.hk-data {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1.5;
}

.hk-data i { font-size: 0.78rem; }

.hk-data-phone {
    background: #f0fdf4;
    color: #166534;
}

.hk-data-email {
    background: #eff6ff;
    color: #1e40af;
}

.hk-data-date {
    background: #f5f3ff;
    color: #5b21b6;
}

.hk-data-money {
    background: #fefce8;
    color: #854d0e;
    font-weight: 600;
}

/* ---------- Avatars (member photos) ---------- */
.hk-avatar {
    border-radius: 8px;
    object-fit: contain;
    background: var(--hk-bg);
    flex-shrink: 0;
}
.hk-avatar-xs { width: 28px; height: 28px; }
.hk-avatar-sm { width: 36px; height: 36px; }
.hk-avatar-md { width: 48px; height: 48px; }
.hk-avatar-lg { width: 80px; height: 80px; }
.hk-avatar-xl { width: 120px; height: 120px; border: 3px solid var(--hk-border); }

/* ---------- Logo thumbnails (config models) ---------- */
.hk-logo-sm {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}
.hk-logo-md {
    width: 36px;
    height: 36px;
    object-fit: contain;
    vertical-align: middle;
}
.hk-logo-lg {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* ---------- Form labels ---------- */
.hk-form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--hk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---------- Calendar (weekly view) ---------- */
.hk-cal-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}
.hk-cal-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    padding: 0.55rem 0.75rem;
    border-radius: var(--hk-radius);
    background: var(--hk-white);
    border: 1px solid var(--hk-border);
    text-decoration: none;
    color: var(--hk-text);
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.hk-cal-tab:hover {
    background: var(--hk-accent-light);
    border-color: var(--hk-accent);
    color: var(--hk-text);
}
.hk-cal-tab--today {
    background: var(--hk-accent);
    border-color: var(--hk-accent);
    color: #fff;
}
.hk-cal-tab--today:hover {
    background: var(--hk-accent-hover);
    color: #fff;
}
.hk-cal-tab-name {
    font-weight: 600;
    font-size: 0.82rem;
}
.hk-cal-tab-count {
    font-size: 0.72rem;
    margin-top: 0.15rem;
    opacity: 0.75;
}
.hk-cal-day {
    margin-bottom: 1.5rem;
}
.hk-cal-day-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--hk-text);
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--hk-border);
}
.hk-cal-card {
    background: var(--hk-white);
    border: 1px solid var(--hk-border);
    border-radius: var(--hk-radius);
    box-shadow: var(--hk-shadow-sm);
    overflow: hidden;
    height: 100%;
}
.hk-cal-card-header {
    padding: 0.75rem;
    background: var(--hk-row-stripe);
    border-bottom: 1px solid var(--hk-border);
}
.hk-cal-card-name {
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.2;
}
.hk-cal-card-discipline {
    font-size: 0.78rem;
    color: var(--hk-text-muted);
}
.hk-cal-card-body {
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.hk-cal-card-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    color: var(--hk-text);
}
.hk-cal-card-row i {
    font-size: 0.9rem;
    color: var(--hk-accent);
    width: 1.1rem;
    text-align: center;
    flex-shrink: 0;
}
.hk-cal-card-desc {
    font-size: 0.78rem;
    color: var(--hk-text-muted);
    margin-top: 0.25rem;
    padding-top: 0.3rem;
    border-top: 1px solid var(--hk-border);
}

/* ---------- Timetable grid (hours × days) ---------- */
.hk-tt-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
}
.hk-tt {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}
.hk-tt th,
.hk-tt td {
    border: 1px solid var(--hk-border);
    vertical-align: top;
}
.hk-tt-day-head {
    text-align: center;
    padding: 0.5rem 0.25rem;
    font-weight: 700;
    font-size: 0.82rem;
    background: var(--hk-row-stripe);
    color: var(--hk-text);
    position: sticky;
    top: 0;
    z-index: 2;
}
.hk-tt-day-head--today {
    background: var(--hk-accent);
    color: #fff;
}
.hk-tt-hour-col {
    width: 56px;
    min-width: 56px;
    background: var(--hk-row-stripe);
    position: sticky;
    top: 0;
    z-index: 3;
}
.hk-tt-hour {
    padding: 0.35rem 0.4rem;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--hk-text-muted);
    text-align: center;
    background: var(--hk-row-stripe);
    white-space: nowrap;
    position: sticky;
    left: 0;
    z-index: 1;
}
.hk-tt-cell {
    padding: 0.25rem;
    min-height: 48px;
    background: var(--hk-white);
}
.hk-tt-cell--today {
    background: #fffbeb;
}
.hk-tt-block {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    background: var(--hk-accent-light);
    border-left: 4px solid var(--hk-accent);
    border-radius: 6px;
    padding: 0.3rem 0.4rem;
    margin-bottom: 0.2rem;
}
.hk-tt-block:last-child {
    margin-bottom: 0;
}
/* Overlapping trainings: side by side within a cell */
.hk-tt-cell-stack {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
@media (min-width: 992px) {
    .hk-tt-cell-stack {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        gap: 0.2rem;
    }
    .hk-tt-cell-stack > .hk-tt-block {
        flex: 1 1 0;
        min-width: 0;
    }
}
/* Room color legend */
.hk-tt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
}
.hk-tt-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--hk-text);
}
.hk-tt-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}
.hk-tt-room-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
    margin-right: 2px;
    vertical-align: middle;
}
.hk-tt-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 1px;
}
.hk-tt-block-info {
    min-width: 0;
}
.hk-tt-block-name {
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hk-tt-block-time {
    font-size: 0.72rem;
    color: var(--hk-accent-hover);
    font-weight: 600;
}
.hk-tt-block-meta {
    font-size: 0.7rem;
    color: var(--hk-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Mobile timetable (vertical day cards) ---------- */
.hk-tt-mob-day {
    margin-bottom: 1rem;
    border: 1px solid var(--hk-border);
    border-radius: var(--hk-radius);
    overflow: hidden;
    background: var(--hk-white);
}
.hk-tt-mob-day--today {
    border-color: var(--hk-accent);
}
.hk-tt-mob-day-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
    font-weight: 700;
    font-size: 0.88rem;
    background: var(--hk-row-stripe);
    border-bottom: 1px solid var(--hk-border);
}
.hk-tt-mob-day--today .hk-tt-mob-day-head {
    background: var(--hk-accent);
    color: #fff;
}
.hk-tt-mob-day-count {
    margin-left: auto;
    font-size: 0.72rem;
    opacity: 0.7;
}
.hk-tt-mob-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.55rem 0.75rem;
    border-left: 4px solid var(--hk-accent);
    border-bottom: 1px solid var(--hk-border);
}
.hk-tt-mob-block:last-child {
    border-bottom: none;
}
.hk-tt-mob-block-main {
    min-width: 0;
}
.hk-tt-mob-block-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.hk-tt-mob-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    color: var(--hk-text-muted);
    background: var(--hk-row-stripe);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid var(--hk-border);
}

/* ---------- Calendar past-training toggle ---------- */
.hk-cal-past-hidden {
    opacity: 0.25;
    pointer-events: none;
    filter: grayscale(1);
    transition: opacity 0.2s, filter 0.2s;
}

/* ----------  payment icons  ---------- */
img.hk-pay-icon {
    height: 32px;
    width: auto;
    border-radius: .5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    transition: transform .15s ease, box-shadow .15s ease;
}
img.hk-pay-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.hk-pay-icon--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: .5rem;
    background: var(--bs-light, #f8f9fa);
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    font-size: 1.25rem;
    color: #6c757d;
    transition: transform .15s ease, box-shadow .15s ease;
}
.hk-pay-icon--fallback:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

/* ==========================================================================
   RESPONSIVE — Mobile card layout for tables
   ========================================================================== */
@media (max-width: 767.98px) {
    /* Convert data tables to stacked card rows */
    .hk-table thead {
        display: none;
    }

    .hk-table tbody tr {
        display: block;
        background: var(--hk-white);
        border: 1px solid var(--hk-border);
        border-radius: var(--hk-radius);
        margin-bottom: 0.5rem;
        padding: 0.75rem;
        box-shadow: var(--hk-shadow-sm);
    }

    .hk-table tbody tr:nth-child(even) {
        background: var(--hk-white);
    }

    .hk-table tbody tr:hover {
        background: var(--hk-accent-light);
    }

    .hk-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.3rem 0;
        border-bottom: 1px solid #f0f2f5;
        font-size: 0.85rem;
    }

    .hk-table tbody td:last-child {
        border-bottom: none;
    }

    /* Member list: first td full-width, remaining tds inline as badge row */
    .hk-table.hk-table--badges tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .hk-table.hk-table--badges tbody td:first-child {
        flex: 0 0 100%;
        display: block;
        border-bottom: 1px solid #f0f2f5;
        margin-bottom: 0.25rem;
        padding-bottom: 0.4rem;
    }

    .hk-table.hk-table--badges tbody td:not(:first-child) {
        display: inline-flex;
        flex: none;
        justify-content: flex-start;
        border-bottom: none;
        padding: 0.15rem 0.35rem;
        font-size: 0.8rem;
    }

    .hk-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.76rem;
        color: var(--hk-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.03em;
        flex-shrink: 0;
        margin-right: 0.75rem;
    }

    /* Detail table (key-value) stacked */
    .hk-detail-table tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid var(--hk-border);
    }

    .hk-detail-table th {
        width: 100%;
        padding: 0.5rem 0.75rem 0.15rem;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        border-bottom: none;
    }

    .hk-detail-table td {
        padding: 0.15rem 0.75rem 0.5rem;
        border-bottom: none;
    }

    .hk-detail-table tr:nth-child(even) th,
    .hk-detail-table tr:nth-child(even) td {
        background: var(--hk-row-stripe);
    }
}

/* ---------- General responsive ---------- */
@media (max-width: 991.98px) {
    .hk-navbar .navbar-collapse {
        background: var(--hk-white);
        border: 1px solid var(--hk-border);
        border-radius: 0 0 12px 12px;
        padding: 0.75rem;
        margin-top: 0.25rem;
        box-shadow: var(--hk-shadow-md);
        max-height: calc(100vh - 5rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .hk-navbar .navbar-collapse .dropdown-menu {
        border: none;
        box-shadow: none;
        padding: 0 0 0 1rem;
        background: transparent;
    }

    .hk-nav-sep { display: none; }

    .hk-page-banner {
        flex-direction: column;
        text-align: center;
    }
}
