/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
    /* Arctic palette */
    --accent:        #3573CE;
    --accent-hover:  #2960b8;
    --accent-dim:    #2458ae;
    --accent-soft:   rgba(53, 115, 206, 0.10);
    --accent-medium: rgba(53, 115, 206, 0.20);

    /* Secondary — arctic teal (used sparingly: 10%) */
    --teal:        #1aaa8a;
    --teal-soft:   rgba(26, 170, 138, 0.12);
    --teal-medium: rgba(26, 170, 138, 0.22);

    /* Sidebar */
    --sidebar-bg:      #0b1a26;
    --sidebar-border:  rgba(255,255,255,0.06);
    --sidebar-hover:   rgba(255,255,255,0.055);
    --sidebar-active:  rgba(53, 115, 206, 0.15);
    --sidebar-text:    rgba(255,255,255,0.45);
    --sidebar-text-hi: rgba(255,255,255,0.90);
    --sidebar-width:   252px;

    /* Content */
    --page-bg:     #eaecf4;
    --card-bg:     #ffffff;
    --card-border: rgba(15,23,42,0.065);
    --card-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 4px 16px rgba(15,23,42,0.05);
    --card-shadow-hover: 0 2px 4px rgba(15,23,42,0.06), 0 12px 32px rgba(15,23,42,0.09);
    --card-radius: 14px;

    /* Typography scale */
    --text-xs:   0.72rem;   /* 10.8px — labels, tags */
    --text-sm:   0.8125rem; /* 13px  — captions, meta */
    --text-base: 0.9375rem; /* 15px  — body */
    --text-md:   1.0625rem; /* 17px  — subheadings */
    --text-lg:   1.25rem;   /* 20px  — section titles */
    --text-xl:   1.625rem;  /* 26px  — page titles */
    --text-2xl:  2rem;      /* 32px  — hero numbers */
    --text-3xl:  2.75rem;   /* 44px  — landing hero */

    /* Text */
    --text-primary:   #0c1e30;
    --text-secondary: #64748b;
    --text-muted:     #94a3b8;

    /* Spacing scale (4px base) */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-12: 48px;

    /* Motion */
    --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
    --dur-fast:    100ms;
    --dur-base:    180ms;
    --dur-slow:    280ms;

    /* Interface layers */
    --layer-modal: 3000;

    /* Status */
    --status-planning-color:   #1d4ed8;
    --status-planning-bg:      rgba(29, 78, 216, 0.16);
    --status-planning-border:  rgba(29, 78, 216, 0.30);
    --status-unfilled-color:   #7c3aed;
    --status-unfilled-bg:      rgba(124, 58, 237, 0.16);
    --status-unfilled-border:  rgba(124, 58, 237, 0.30);
    --status-recruiting-color: #c2410c;
    --status-recruiting-bg:    rgba(234, 88, 12, 0.16);
    --status-recruiting-border: rgba(234, 88, 12, 0.30);
    --status-full-color:       #15803d;
    --status-full-bg:          rgba(21, 128, 61, 0.16);
    --status-full-border:      rgba(21, 128, 61, 0.30);
    --status-running-color:    #0f766e;
    --status-running-bg:       rgba(15, 118, 110, 0.16);
    --status-running-border:   rgba(15, 118, 110, 0.30);
    --status-reporting-color:  #b91c1c;
    --status-reporting-bg:     rgba(185, 28, 28, 0.14);
    --status-reporting-border: rgba(185, 28, 28, 0.28);
    --status-finished-color:   #475569;
    --status-finished-bg:      rgba(71, 85, 105, 0.16);
    --status-finished-border:  rgba(71, 85, 105, 0.28);
    --status-pending-color:    #b45309;
    --status-pending-bg:       rgba(245, 158, 11, 0.14);
    --status-pending-border:   rgba(180, 83, 9, 0.24);
    --status-approved-color:   #166534;
    --status-approved-bg:      rgba(22, 101, 52, 0.14);
    --status-approved-border:  rgba(22, 101, 52, 0.24);
}

.text-warning {
    --bs-text-opacity: 1;
    color: rgba(180, 83, 9, var(--bs-text-opacity)) !important;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'kern' 1, 'liga' 1;
}

a { color: inherit; text-decoration: none; }

/* =============================================
   APP LAYOUT
   ============================================= */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-body--public .app-layout {
    flex-direction: column;
    min-height: 0;
}
.app-body--public .app-main  { margin-left: 0 !important; flex: 1; }
.app-body--public .app-content { padding: 0; max-width: 100%; }
.app-body--public.event-detail-page-body .app-content {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 56px;
}

@media (max-width: 640px) {
    .app-body--public.event-detail-page-body .app-content {
        padding: 20px 16px 40px;
    }
}

/* =============================================
   SIDEBAR
   ============================================= */

.sidebar-legal-links {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-legal-links a {
    color: var(--sidebar-text);
    font-size: 0.5rem;
    text-decoration: none;
    line-height: 1.1;
}

.sidebar-legal-links a:hover,
.sidebar-legal-links a:focus-visible {
    color: #fff;
}


.app-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    transition: transform var(--dur-slow) var(--ease-drawer), width var(--dur-slow) var(--ease-drawer);
    overflow: hidden;
    will-change: transform;
    contain: layout style;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 22px 14px 18px 18px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    transition: opacity var(--dur-fast);
}
.sidebar-brand:hover { opacity: 0.85; }

.sidebar-brand-emblem {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: block;
    filter: brightness(0) invert(1);
}

.sidebar-brand-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--sidebar-text-hi);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 42px;
    padding: 3px 0;
    min-width: 0;
    white-space: nowrap;
}
.sidebar-brand-text strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #fff;
}

.sidebar-close {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border: none; background: transparent;
    color: var(--sidebar-text);
    font-size: 1rem; cursor: pointer;
    border-radius: 7px;
    flex-shrink: 0;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.sidebar-close:hover { background: var(--sidebar-hover); color: var(--sidebar-text-hi); }

.sidebar-collapse-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border: none; background: transparent;
    color: var(--sidebar-text);
    font-size: 0.9rem; cursor: pointer;
    border-radius: 7px;
    flex-shrink: 0;
    transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.sidebar-collapse-toggle:hover { background: var(--sidebar-hover); color: var(--sidebar-text-hi); }

/* =============================================
   SIDEBAR — collapsed (desktop only)
   ============================================= */
@media (min-width: 1025px) {
    :root { --sidebar-width-collapsed: 68px; }

    .app-layout.sidebar-collapsed .app-sidebar { width: var(--sidebar-width-collapsed); }
    .app-layout.sidebar-collapsed .app-main { margin-left: var(--sidebar-width-collapsed); }

    .app-layout.sidebar-collapsed .sidebar-header { padding: 22px 12px 18px; justify-content: center; }
    .app-layout.sidebar-collapsed .sidebar-brand-text,
    .app-layout.sidebar-collapsed .sidebar-section-label,
    .app-layout.sidebar-collapsed .sidebar-link span,
    .app-layout.sidebar-collapsed .sidebar-user-info,
    .app-layout.sidebar-collapsed .sidebar-badge,
    .app-layout.sidebar-collapsed .sidebar-legal-links {
        display: none;
    }
    .app-layout.sidebar-collapsed .sidebar-brand { justify-content: center; }
    .app-layout.sidebar-collapsed .sidebar-link { justify-content: center; padding: 9px; }
    .app-layout.sidebar-collapsed .sidebar-user { justify-content: center; }
    .app-layout.sidebar-collapsed .sidebar-collapse-toggle i { transform: rotate(180deg); }

    /* До инициализации JS (первая отрисовка) — читаем состояние из localStorage
       синхронным скриптом в <head>, который ставит класс на <html>. */
    html.sidebar-collapsed-init .js-sidebar-collapse-target .app-sidebar { width: var(--sidebar-width-collapsed); }
    html.sidebar-collapsed-init .js-sidebar-collapse-target .app-main { margin-left: var(--sidebar-width-collapsed); }
    html.sidebar-collapsed-init .js-sidebar-collapse-target .sidebar-brand-text,
    html.sidebar-collapsed-init .js-sidebar-collapse-target .sidebar-section-label,
    html.sidebar-collapsed-init .js-sidebar-collapse-target .sidebar-link span,
    html.sidebar-collapsed-init .js-sidebar-collapse-target .sidebar-user-info,
    html.sidebar-collapsed-init .js-sidebar-collapse-target .sidebar-badge,
    html.sidebar-collapsed-init .js-sidebar-collapse-target .sidebar-legal-links {
        display: none;
    }
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 10px;
    scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-section { margin-bottom: 22px; }

.sidebar-section-label {
    display: block;
    padding: 0 8px;
    margin-bottom: 4px;
    color: var(--sidebar-text);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.sidebar-menu {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 1px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition:
        background var(--dur-fast),
        color var(--dur-fast),
        transform var(--dur-fast) var(--ease-out);
}

.sidebar-link i {
    font-size: 1rem;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    transition: transform var(--dur-fast) var(--ease-out);
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-hi);
}
.sidebar-link:hover i { transform: translateX(1px); }

.sidebar-link:active { transform: scale(0.98); }

.sidebar-link.active,
.sidebar-link.is-active {
    background: var(--sidebar-active);
    color: var(--accent);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-nav--media-mode .sidebar-link:not(.sidebar-link--media).active,
.sidebar-nav--media-mode .sidebar-link:not(.sidebar-link--media).is-active {
    background: transparent;
    color: var(--sidebar-text);
    font-weight: 500;
    box-shadow: none;
}

.sidebar-link--danger { color: rgba(239,68,68,0.65); }
.sidebar-link--danger:hover { background: rgba(239,68,68,0.08); color: #f87171; }
.sidebar-link--accent { color: var(--accent); }
.sidebar-link--accent:hover { background: var(--accent-soft); }

.sidebar-badge {
    margin-left: auto;
    min-width: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(214, 81, 48, 0.14);
    color: #b54422;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}

.sidebar-footer {
    padding: 14px 18px 8px;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-footer-actions {
    margin: 8px 0 0;
    padding: 6px 0 0;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-footer-actions .sidebar-link {
    font-size: 0.8rem;
    padding: 7px 10px;
    opacity: 0.8;
}
.sidebar-footer-actions .sidebar-link i {
    font-size: 0.875rem;
}
.sidebar-footer-actions .sidebar-link:hover {
    opacity: 1;
}



.sidebar-user { display: flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 8px; padding: 4px; margin: -4px; transition: background var(--dur-fast); }
.sidebar-user:hover { background: rgba(255,255,255,0.07); }

.sidebar-user-avatar {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #1e4fa0);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.sidebar-user-info { min-width: 0; }

.sidebar-user-info strong {
    display: block;
    color: var(--sidebar-text-hi);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info span {
    display: block;
    color: var(--sidebar-text);
    font-size: 0.72rem;
}

/* Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    z-index: 199;
    background: rgba(8,16,28,0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity var(--dur-slow) var(--ease-out);
}
.sidebar-backdrop.is-visible { opacity: 1; }

/* =============================================
   MAIN AREA
   ============================================= */
.app-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--dur-slow) var(--ease-drawer);
}

/* =============================================
   TOP BAR (mobile)
   ============================================= */
.app-topbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; gap: 12px;
    height: 54px;
    padding: 0 16px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--sidebar-border);
}

.topbar-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border: none; background: transparent;
    color: rgba(255,255,255,0.75); font-size: 1.25rem;
    cursor: pointer; border-radius: 7px;
    transition: background var(--dur-fast);
}
.topbar-toggle:hover { background: rgba(255,255,255,0.08); }

.topbar-title {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 600;
}

/* =============================================
   CONTENT
   ============================================= */
.app-content {
    flex: 1;
    min-width: 0;
    padding: 28px clamp(20px, 2.4vw, 42px) 64px;
    max-width: none;
    width: 100%;
}

/* =============================================
   CARDS & PANELS
   ============================================= */
.lk-panel,
.lk-profile-card,
.lk-preview-card,
section.lk-panel,
article.lk-panel {
    min-width: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 22px 26px;
    margin-bottom: 14px;
    transition: box-shadow var(--dur-base) var(--ease-out);
}

/* =============================================
   PAGE TITLE & PANEL HEAD
   ============================================= */
.lk-page-title,
.lk-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 18px;
}

.lk-page-title h3,
.lk-panel-head h3 {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.lk-panel-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lk-panel-head h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--accent);
    flex-shrink: 0;
}

.lk-page-title p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.lk-panel-head a {
    color: var(--accent);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background var(--dur-fast);
}
.lk-panel-head a:hover { background: var(--accent-soft); }

.lk-panel-head span {
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* =============================================
   PROFILE CARD
   ============================================= */
.lk-profile-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-bottom: 14px;
}

.lk-profile-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lk-profile-photo {
    position: relative;
    width: 148px; height: 148px;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid var(--accent);
    background: var(--accent-soft);
    flex-shrink: 0;
    transition: border-color var(--dur-base);
}

.lk-profile-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--dur-slow) var(--ease-out);
}
.lk-profile-photo:hover img { transform: scale(1.04); }

.lk-profile-photo span {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.lk-qr-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-medium);
    border-radius: 7px;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background var(--dur-fast),
        transform var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-fast);
}
.lk-qr-button:hover {
    background: var(--accent-medium);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39,193,163,0.2);
}
.lk-qr-button:active { transform: scale(0.97); }
.lk-qr-button--mobile { display: none; }

.lk-profile-header-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.lk-profile-header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    padding: 7px 16px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-medium);
    border-radius: 7px;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.lk-profile-header-action:hover {
    background: var(--accent-medium);
    transform: translateY(-1px);
    color: var(--accent);
}
.lk-profile-header-action:active { transform: scale(0.97); }
@media (min-width: 640.02px) {
    .lk-profile-header-action--settings { display: none; }
}

.lk-profile-title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 24px;
}

.lk-profile-title > div:first-child {
    min-width: 0;
}

.lk-profile-title h2 {
    margin: 0 0 8px;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -0.025em;
    overflow-wrap: break-word;
    word-break: break-word;
}

.lk-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lk-profile-tags span {
    display: inline-flex;
    align-items: center;
    padding: 3px 11px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.01em;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-medium);
}

.lk-profile-tags span:nth-child(n+2) {
    background: rgba(15,23,42,0.04);
    color: var(--text-secondary);
    border-color: transparent;
}

.lk-profile-actions {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

.notification-bell,
.topbar-notification {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--card-border);
    border-radius: 50%;
    color: var(--text-primary);
    background: var(--card-bg);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}

.notification-bell {
    padding: 0;
    cursor: pointer;
}

.notification-bell:hover,
.topbar-notification:hover {
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.notification-bell > span,
.topbar-notification > span {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
    border-radius: 999px;
    color: #fff;
    background: #dc3545;
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 1;
}

.notification-popover {
    position: absolute;
    top: 44px;
    right: 0;
    z-index: 300;
    width: min(330px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid rgba(53, 115, 206, 0.18);
    border-radius: 16px;
    color: var(--text-primary);
    background: #f1f6fd;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.notification-popover[hidden] {
    display: none;
}

.notification-popover > span {
    display: block;
    color: var(--accent);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.notification-popover > strong {
    display: block;
    margin-top: 4px;
    font-size: var(--text-md);
}

.notification-popover p {
    margin: 4px 0 14px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.notification-popover a {
    display: inline-flex;
    padding: 8px 13px;
    border-radius: 9px;
    color: #fff;
    background: var(--accent);
    font-size: var(--text-sm);
    font-weight: 700;
}

.lk-edit-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(15,23,42,0.04);
    transition: background var(--dur-fast), color var(--dur-fast);
}
.lk-edit-link:hover { background: rgba(15,23,42,0.08); color: var(--text-primary); }
.lk-edit-link--danger { color: #dc2626; background: rgba(220,38,38,0.06); }
.lk-edit-link--danger:hover { background: rgba(220,38,38,0.12); color: #b91c1c; }

.lk-edit-menu { position: relative; }
.lk-edit-menu__toggle { border: none; cursor: pointer; gap: 4px; }
.lk-edit-menu__dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.12);
    z-index: 100;
    overflow: hidden;
}
.lk-edit-menu__item {
    display: block;
    width: 100%;
    padding: 9px 14px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background var(--dur-fast), color var(--dur-fast);
    text-decoration: none;
}
.lk-edit-menu__item:hover { background: rgba(15,23,42,0.05); color: var(--text-primary); }
.lk-edit-menu__item--danger { color: rgba(239,68,68,0.75); }
.lk-edit-menu__item--danger:hover { background: rgba(239,68,68,0.06); color: #ef4444; }

.lk-logout-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: rgba(239,68,68,0.65);
    background: transparent;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.lk-logout-link:hover { background: rgba(239,68,68,0.07); color: #ef4444; }

/* =============================================
   DATA GRID
   ============================================= */
.lk-data-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 14px 24px;
}

.lk-data-grid div { min-width: 0; }

.lk-data-grid span {
    display: block;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 3px;
}

.lk-data-grid strong {
    display: block;
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* =============================================
   DETAILS / EXPAND
   ============================================= */
.lk-details { margin-top: 18px; }

.lk-details summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 7px;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.lk-details summary::-webkit-details-marker { display: none; }
.lk-details summary:hover { background: var(--accent-medium); transform: translateY(-1px); }
.lk-details summary:active { transform: scale(0.98); }

.lk-details-grid { display: grid; gap: 10px; margin-top: 14px; }

.lk-details-grid section {
    padding: 16px 18px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid rgba(15,23,42,0.05);
    box-shadow: none;
    margin-bottom: 0;
}

.lk-details-grid h3 {
    margin: 0 0 10px;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.lk-details-grid .lk-data-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px 20px;
}

.lk-document-groups {
    display: grid;
    gap: 14px;
}

.lk-document-group {
    padding-top: 12px;
    border-top: 1px solid rgba(15,23,42,0.08);
}

.lk-document-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.lk-document-group h4 {
    margin: 0 0 10px;
    color: var(--text-primary);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

/* =============================================
   CARD GRID
   ============================================= */
.lk-card-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.lk-card-grid--two { grid-template-columns: repeat(2, minmax(0,1fr)); }

/* =============================================
   PREVIEW CARDS
   ============================================= */
.lk-preview-card {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 120px;
    padding: 22px 26px;
    text-decoration: none;
    color: var(--text-primary);
    transition:
        box-shadow var(--dur-base) var(--ease-out),
        transform var(--dur-base) var(--ease-out),
        border-color var(--dur-base);
}

.lk-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
    color: var(--text-primary);
    border-color: rgba(15,23,42,0.1);
}
.lk-preview-card:active { transform: scale(0.995); }

.lk-preview-card > div > p {
    margin: 0 0 3px;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.lk-preview-card h3 {
    margin: 0 0 2px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--text-2xl);
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.lk-preview-card > div > span,
.lk-status-list span {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
}

.lk-score-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    background: var(--accent-soft);
    transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
.lk-preview-card:hover .lk-score-ring { transform: scale(1.06); }

.lk-score-ring strong {
    color: var(--accent);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.lk-score-ring span {
    color: var(--text-muted);
    font-size: 0.68rem;
    margin-top: 2px;
    font-weight: 600;
}

.lk-status-list {
    display: grid;
    gap: 5px;
    min-width: 170px;
    align-content: center;
}

/* Цветовые акценты preview-карточек */
.lk-rating-preview {
    background: linear-gradient(135deg, #fff 60%, var(--accent-soft) 100%);
    border-color: var(--accent-medium);
}
.lk-rating-preview:hover { border-color: var(--accent); }
.lk-rating-preview .lk-preview-card h3,
.lk-rating-preview .lk-score-ring strong { color: var(--accent); }

.lk-events-preview {
    background: linear-gradient(135deg, #fff 60%, var(--teal-soft) 100%);
    border-color: var(--teal-medium);
}
.lk-events-preview:hover { border-color: var(--teal); }

/* =============================================
   BRS MOBILE LEADERBOARD
   ============================================= */
.lk-brs-mobile { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; max-width: 480px; margin-left: auto; margin-right: auto; }

.lk-brs-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lk-brs-mobile-row {
    display: grid;
    grid-template-columns: 32px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 10px;
    font-size: var(--text-base);
    color: var(--text-primary);
}

.lk-brs-mobile-row > span:first-child {
    color: var(--text-muted);
    font-weight: 600;
}

.lk-brs-mobile-row > span:last-child {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.lk-brs-mobile-row--head {
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    padding: 0 8px 6px;
}
.lk-brs-mobile-row--head > span:first-child,
.lk-brs-mobile-row--head > span:last-child { font-weight: 600; }

.lk-brs-mobile-row--gap {
    grid-template-columns: repeat(3, 1fr);
    padding: 5px 8px;
}
.lk-brs-mobile-row--gap > span {
    width: 6px;
    height: 6px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--accent);
}

.lk-brs-mobile-row--own {
    background: var(--accent-soft);
    font-weight: 700;
}
.lk-brs-mobile-row--own > span:first-child { color: var(--accent); }
.lk-brs-mobile-row--own em {
    margin-left: 6px;
    font-style: normal;
    font-size: var(--text-xs);
    color: var(--accent);
    font-weight: 600;
}

.lk-brs-mobile-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: linear-gradient(140deg, #0c1e30, #1e3a5f);
    border-radius: var(--card-radius);
    padding: 22px 24px;
    margin-bottom: 14px;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.lk-brs-mobile-card__wave {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.16;
    pointer-events: none;
}
.lk-brs-mobile-card__wave svg {
    width: 100%;
    height: 100%;
}
.lk-brs-mobile-card__wave path {
    fill: var(--accent);
}
.lk-brs-mobile-card__label {
    position: relative;
    z-index: 1;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--sidebar-text, #9fb3c8);
}
.lk-brs-mobile-card__row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
}
.lk-brs-mobile-card__place {
    font-size: var(--text-3xl);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.lk-brs-mobile-card__divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.18);
}
.lk-brs-mobile-card__score-block {
    flex: 1;
    text-align: right;
}
.lk-brs-mobile-card--preview {
    text-decoration: none;
    transition: transform var(--dur-fast) var(--ease-out);
}
.lk-brs-mobile-card--preview:hover { transform: translateY(-2px); }
.lk-brs-mobile-card--preview:active { transform: scale(0.99); }
.lk-brs-mobile-card__score-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: #fff;
    opacity: 0.75;
}
.lk-brs-mobile-card__score {
    font-size: var(--text-3xl);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 992px) {
    .lk-brs-mobile {
        display: grid;
        grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
        gap: 18px;
        width: 100%;
        max-width: none;
        margin-right: 0;
        margin-left: 0;
    }

    .lk-brs-mobile-leaderboard,
    .lk-brs-mobile-breakdown,
    .lk-brs-mobile > .lk-brs-mobile-card {
        margin-bottom: 0;
    }

    .lk-brs-mobile-leaderboard {
        min-height: 100%;
    }

    .lk-brs-mobile-row {
        grid-template-columns: 72px minmax(0, 1fr) 110px;
        min-height: 44px;
        padding: 10px 14px;
    }

    .lk-brs-mobile > .lk-brs-mobile-card {
        min-height: 100%;
        justify-content: center;
        padding: 30px;
    }

    .lk-brs-mobile-card__place,
    .lk-brs-mobile-card__score {
        font-size: clamp(2.2rem, 3vw, 3.25rem);
    }

    .lk-brs-mobile-breakdown {
        grid-column: 1 / -1;
    }

    .lk-brs-mobile-breakdown .lk-score-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .lk-brs-mobile-breakdown .lk-score-grid__item {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 18px;
        text-align: left;
    }
}

/* =============================================
   SCORE GRID
   ============================================= */
.lk-score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
}

.lk-score-grid__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 16px 10px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    transition: background var(--dur-fast), transform var(--dur-base) var(--ease-out);
}
.lk-score-grid__item:hover { background: var(--accent-soft); transform: translateY(-1px); }

.lk-score-grid__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.2rem;
}
.lk-score-grid__icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.lk-score-grid strong {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.lk-score-grid__label {
    display: block;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lk-score-grid__item--wide {
    grid-column: span 2;
}

.lk-score-grid__sub {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
}

/* =============================================
   LIST ITEMS
   ============================================= */
.lk-list, .lk-event-list { display: grid; gap: 0; }

.lk-list a, .lk-event-card {
    display: grid;
    gap: 2px;
    padding: 12px 0;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(15,23,42,0.055);
    transition: color var(--dur-fast), padding-left var(--dur-base) var(--ease-out);
}
.lk-list a:last-child, .lk-event-card:last-child { border-bottom: none; }
.lk-list a:hover { color: var(--accent); padding-left: 4px; }

.lk-list strong, .lk-event-card strong {
    font-size: var(--text-sm);
    font-weight: 600;
    color: currentColor;
}

.lk-list span, .lk-event-card span {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 500;
}

.lk-assessment-list {
    display: grid;
    gap: 14px;
}

.lk-assessment-card {
    padding: 14px 0;
    border-bottom: 1px solid rgba(15,23,42,0.055);
}

.lk-assessment-card:last-child { border-bottom: none; }

.lk-assessment-card__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.lk-assessment-card__head strong {
    display: block;
    color: var(--text-primary);
    font-size: var(--text-md);
    font-weight: 700;
}

.lk-assessment-card__head span {
    display: block;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.lk-assessment-scores {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.lk-assessment-scores div {
    min-width: 0;
    padding: 7px 8px;
    background: #f8fafc;
    border: 1px solid rgba(15,23,42,0.06);
}

.lk-assessment-scores span {
    display: block;
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.lk-assessment-scores strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
}

.lk-assessment-comment {
    margin: 12px 0 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.lk-event-card {
    grid-template-columns: minmax(0,1.4fr) minmax(110px,0.5fr) auto;
    align-items: center;
    gap: 14px;
}

.lk-event-card mark {
    justify-self: end;
    padding: 4px 10px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* =============================================
   ACTIVITY TABLE
   ============================================= */
.lk-activity-table {
    overflow-x: auto;
    contain: layout style;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
}

.lk-activity-row {
    display: grid;
    grid-template-columns: minmax(160px,1.3fr) minmax(120px,1fr) minmax(200px,1.3fr) minmax(110px,0.8fr) minmax(90px,0.7fr);
    gap: 14px;
    min-width: 760px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid rgba(15,23,42,0.055);
    transition: background var(--dur-fast);
}
.lk-activity-row:last-child { border-bottom: none; }
.lk-activity-row:not(.lk-activity-row--head):hover { background: rgba(15,23,42,0.018); }

.lk-activity-row--head {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding-bottom: 7px;
}

.lk-activity-row strong {
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    min-width: 0; overflow-wrap: anywhere;
}

.lk-activity-row span {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 400;
    min-width: 0; overflow-wrap: anywhere;
}

.lk-activity-table--selectable .lk-activity-row {
    grid-template-columns: minmax(150px,1.2fr) minmax(110px,0.8fr) minmax(190px,1.2fr) minmax(120px,0.8fr) minmax(80px,0.55fr) minmax(90px,0.7fr) 46px;
    min-width: 980px;
}

.lk-activity-table--selectable label.lk-activity-row {
    cursor: pointer;
}

.lk-activity-table--selectable .form-check-input {
    margin: 0;
}

.lk-activity-select-cell {
    justify-self: end;
    padding-right: 8px;
}

/* =============================================
   EVENTS TABLE
   ============================================= */
.event-filter-bar {
    --filter-control-height: 38px;
    position: relative;
    z-index: 1050;
    display: grid;
    grid-template-columns: minmax(145px, max-content) minmax(120px, max-content) 142px 142px minmax(210px, 1fr) auto;
    gap: 10px;
    align-items: start;
}

:where(
    .event-filter-bar,
    .brs-header-filter-form,
    .incentive-history-filter,
    .merch-history-filter,
    .knowledge-filters,
    .smm-filter-row
) :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select,
    button,
    .btn,
    .smm-btn,
    .knowledge-btn,
    .finance-filter-toggle
) {
    box-sizing: border-box;
    height: var(--filter-control-height, 38px);
    min-height: var(--filter-control-height, 38px);
}

:where(
    .event-filter-bar,
    .brs-header-filter-form,
    .incentive-history-filter,
    .merch-history-filter,
    .knowledge-filters,
    .smm-filter-row
) :is(.filter-actions, .knowledge-actions, .smm-actions) {
    align-items: stretch;
}

.gantt-filter-chip,
.gantt-option-toggle,
.gantt-mode-switch__btn,
.notification-filters a {
    box-sizing: border-box;
    min-height: 38px;
    align-items: center;
}

.brs-filter-search,
.brs-filter-actions button {
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
}

.event-filter-dropdown > .form-select {
    min-width: 0;
    white-space: nowrap;
}

.filter-panel__toggle {
    display: none;
}

.filter-panel {
    position: relative;
    z-index: 1100;
}

.filter-panel.is-open {
    position: relative;
    z-index: 1100;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.filter-reset-btn {
    display: inline-flex;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.brs-header-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.brs-header-filter-form input[type="search"] {
    width: 210px;
}

.brs-header-filter-form input[type="date"] {
    width: 142px;
}

.incentive-history-filter {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(160px, 1fr) 142px minmax(170px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.merch-history-filter {
    grid-template-columns: minmax(170px, 1fr) 142px minmax(170px, 1fr) minmax(145px, max-content) auto;
}

.event-filter-bar--finance {
    grid-template-columns: minmax(80px, 0.5fr) minmax(80px, 0.5fr) 120px 120px minmax(200px, 1.5fr) auto auto;
    align-items: center;
}
.finance-filter-dropdown-btn {
    font-size: var(--text-xs);
    padding-top: 5px;
    padding-bottom: 5px;
    height: auto;
}

.event-filter-dropdown {
    position: relative;
}

.event-filter-dropdown.is-open {
    z-index: 1060;
}

.event-filter-dropdown__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1101;
    display: none;
    min-width: 100%;
    padding: 8px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
}

.event-filter-dropdown.is-open .event-filter-dropdown__menu {
    display: grid;
    gap: 4px;
}

.event-filter-dropdown__menu--rich {
    width: 320px;
    max-width: 90vw;
    padding: 14px 16px 12px;
    gap: 8px;
}

.event-filter-search {
    margin-bottom: 2px;
}

.event-filter-bulk {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: var(--text-xs);
}

.event-filter-bulk button {
    border: none;
    background: none;
    padding: 0;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
}

.event-filter-values {
    max-height: 260px;
    overflow-y: auto;
    display: grid;
    gap: 2px;
}

.event-filter-values .event-filter-check {
    white-space: normal;
}

.event-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.event-filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: var(--text-sm);
    cursor: pointer;
    white-space: nowrap;
}

.event-filter-check:hover {
    background: rgba(53, 115, 206, 0.08);
}

.event-filter-check input {
    margin: 0;
}

.finance-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
}

.finance-filter-toggle input {
    margin: 0;
}

.lk-events-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 220px);
    border: 1px solid rgba(15,23,42,0.08);
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom;
    contain: layout style;
}
.lk-events-table-wrap--finance {
    max-height: calc(200vh - 440px);
}
.lk-events-table-wrap--finance .lk-events-table {
    min-width: 1320px;
    table-layout: auto;
}
.lk-events-table-wrap--finance .lk-events-table th,
.lk-events-table-wrap--finance .lk-events-table td {
    white-space: normal;
}
/* № — минимум по содержимому */
.lk-events-table-wrap--finance col.col-num     { width: 1px; }
/* Даты — не переносить */
.lk-events-table-wrap--finance col.col-date    { width: 86px; }
.lk-events-table-wrap--finance .finance-date {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}
/* Чел. — не переносить */
.lk-events-table-wrap--finance col.col-pax     { width: 72px; }
.finance-pax-cell {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}
/* Деньги — не переносить */
.lk-events-table-wrap--finance col.col-money   { width: 142px; }
/* Название — широкое */
.lk-events-table-wrap--finance col.col-title   { width: 34%; }
/* Руководитель — 2 строки max */
.lk-events-table-wrap--finance col.col-leader  { width: 16%; }
.finance-leader strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
}
/* Статус — не переносить внутри слова */
.lk-events-table-wrap--finance col.col-status  { width: 124px; }
.finance-status-cell {
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
}
.finance-status-edit {
    min-width: 0;
}
.finance-status-button {
    display: inline-flex;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.finance-status-form {
    min-width: 118px;
}
.finance-status-text,
.finance-closed-badge {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
}
/* Комментарий */
.lk-events-table-wrap--finance col.col-comment { width: 14%; }

.lk-events-table {
    width: 100%;
    min-width: 820px;
    border-collapse: separate;
    border-spacing: 0;
}

.garage-events-table {
    min-width: 980px;
}

.lk-events-table th {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 7px 14px 10px;
    color: var(--text-muted);
    background: #f8fafc;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid rgba(15,23,42,0.07);
    white-space: nowrap;
}

.lk-events-table--strong th,
.lk-events-table--strong td {
    border-right: 1px solid rgba(15,23,42,0.055);
}

.lk-events-table--strong th:last-child,
.lk-events-table--strong td:last-child {
    border-right: 0;
}

.lk-events-table td {
    padding: 13px 14px;
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    border-bottom: 1px solid rgba(15,23,42,0.05);
    vertical-align: middle;
}

.lk-events-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.018);
}

.lk-events-table tbody tr {
    cursor: pointer;
    transition: background var(--dur-fast);
}
.lk-events-table tbody tr:hover { background: rgba(39,193,163,0.04); }
.lk-events-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; background: rgba(39,193,163,0.04); }
.lk-events-table tbody tr:last-child td { border-bottom: none; }

.lk-events-table td:first-child strong {
    display: block;
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
}
.lk-events-table td:first-child span {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.lk-events-table mark,
.lk-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(53, 115, 206, 0.16);
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.finance-amount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-width: 112px;
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 700;
    transition: background var(--dur-base), border-color var(--dur-base), color var(--dur-base), filter var(--dur-base);
}

.finance-amount.is-masked {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.52), rgba(226, 232, 240, 0.3));
    border-color: rgba(148, 163, 184, 0.42);
    backdrop-filter: blur(10px);
    color: rgba(12, 30, 48, 0.9);
    filter: blur(5px);
}

.finance-amount.is-revealed {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(53, 115, 206, 0.24);
    filter: none;
}

.finance-leader-cell {
    min-width: 150px;
}
.finance-pencil-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 0.78rem;
    line-height: 1;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    opacity: 1;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.finance-pencil-btn:hover {
    opacity: 1;
    color: var(--bs-primary, #0d6efd);
}
.finance-issued-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: visible;
}

.finance-leader + .finance-leader {
    margin-top: 8px;
}

.finance-leader strong {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
}

.finance-leader span {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.finance-issued-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
}

.finance-inline-edit-toggle {
    flex-shrink: 0;
}

.finance-inline-form {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
}

.finance-inline-form .form-control {
    min-width: 70px;
    flex: 1 1 auto;
}

.finance-form-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.btn-xs {
    padding: 1px 5px;
    font-size: 0.7rem;
    line-height: 1.4;
    border-radius: 3px;
}
.finance-remaining--nonzero {
    background: rgba(234, 179, 8, 0.12);
}
.finance-closed-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    background: #f1f5f9;
    border-radius: 4px;
    padding: 1px 5px;
    vertical-align: middle;
}
.finance-closed-badge--green {
    color: #fff;
    background: var(--status-running-color, #16a34a);
}
.finance-date--running { color: var(--status-running-color); font-weight: 600; }
.finance-date--done { color: var(--text-muted); }
.finance-title-compact {
    display: block;
    font-size: 0.85rem;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
}
.finance-comment-cell {
    max-width: 160px;
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: normal;
    word-break: break-word;
}
.finance-comment-display {
    display: flex;
    align-items: center;
    gap: 4px;
}
.finance-comment-text {
    flex: 1 1 auto;
    min-width: 0;
}
.finance-comment-form {
    display: flex;
    gap: 4px;
    align-items: center;
}
.finance-comment-form input {
    min-width: 0;
    flex: 1 1 auto;
}

@media (max-width: 1100px) {
    .event-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .event-filter-bar--finance {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .event-filter-bar__search {
        grid-column: 1 / -1;
    }
}

@media (min-width: 640.02px) and (max-width: 767.98px) {
    .filter-panel__toggle {
        display: flex;
        width: 100%;
        min-height: 42px;
        padding: 8px 12px;
        align-items: center;
        gap: 8px;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 10px;
        background: #fff;
        color: var(--text-primary);
        font-weight: 600;
    }
    .filter-panel__toggle .bi-chevron-down {
        margin-left: auto;
        transition: transform .2s ease;
    }
    .filter-panel.is-open .filter-panel__toggle .bi-chevron-down {
        transform: rotate(180deg);
    }
    .filter-panel > .filter-panel__body {
        display: none;
        margin-top: 8px;
    }
    .filter-panel.is-open > .filter-panel__body {
        display: grid;
    }
    .event-filter-bar,
    .brs-header-filter-form,
    .incentive-history-filter,
    .merch-history-filter {
        grid-template-columns: 1fr;
    }
    .event-filter-bar__search {
        grid-column: auto;
    }
    .filter-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
        width: 100%;
    }
    .brs-header-filters,
    .brs-header-filter-form input[type="search"],
    .brs-header-filter-form input[type="date"] {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .filter-panel__toggle {
        display: flex;
        width: 100%;
        min-height: 42px;
        padding: 8px 12px;
        align-items: center;
        gap: 8px;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 10px;
        background: #fff;
        color: var(--text-primary);
        font-weight: 600;
    }
    .filter-panel__toggle .bi-chevron-down {
        margin-left: auto;
        transition: transform .2s ease;
    }
    .filter-panel.is-open .filter-panel__toggle .bi-chevron-down {
        transform: rotate(180deg);
    }
    .filter-panel > .filter-panel__body {
        display: none;
        margin-top: 8px;
    }
    .filter-panel.is-open > .filter-panel__body {
        display: grid;
    }
    .event-filter-bar {
        grid-template-columns: 1fr;
    }
    .event-filter-bar--finance {
        grid-template-columns: 1fr;
    }
    .event-filter-bar__search {
        grid-column: auto;
    }
    .filter-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
        width: 100%;
    }
    .filter-reset-btn {
        width: 42px;
        height: 38px;
    }
    .brs-header-filters {
        width: 100%;
    }
    .brs-header-filter-form,
    .incentive-history-filter,
    .merch-history-filter {
        grid-template-columns: 1fr;
    }
    .brs-header-filter-form input[type="search"],
    .brs-header-filter-form input[type="date"] {
        width: 100%;
    }
    .lk-events-table-wrap {
        display: block;
        width: calc(100% + 28px);
        max-width: none;
        max-height: none;
        margin-inline: -14px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-y pinch-zoom;
    }
    .lk-events-table {
        min-width: 920px;
    }
    .lk-activity-table {
        width: calc(100% + 28px);
        margin-inline: -14px;
        padding-inline: 14px;
        overscroll-behavior-x: contain;
    }
    .lk-events-table-wrap--events-page {
        width: calc(100% + 28px);
        max-width: none;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-y pinch-zoom;
    }
    .lk-events-table--events-page {
        min-width: 1120px;
    }
    .finance-filter-toggle {
        min-height: 48px;
        justify-content: flex-start;
    }
    .finance-inline-form {
        flex-wrap: wrap;
    }
}

.lk-status-chip.lk-status-chip--pending {
    color: var(--status-pending-color);
    background: var(--status-pending-bg);
    border-color: var(--status-pending-border);
}

.lk-status-chip.lk-status-chip--approved {
    color: var(--status-approved-color);
    background: var(--status-approved-bg);
    border-color: var(--status-approved-border);
}

.lk-status-chip.lk-status-chip--reserve {
    color: var(--status-planning-color);
    background: var(--status-planning-bg);
    border-color: var(--status-planning-border);
}

.lk-status-chip.lk-status-chip--confirmation_required {
    color: var(--status-unfilled-color);
    background: var(--status-unfilled-bg);
    border-color: var(--status-unfilled-border);
}

.lk-status-chip.lk-status-chip--rejected,
.lk-status-chip.lk-status-chip--cancelled {
    color: var(--status-reporting-color);
    background: var(--status-reporting-bg);
    border-color: var(--status-reporting-border);
}

.lk-status-chip.lk-status-chip--draft {
    color: var(--status-planning-color);
    background: var(--status-planning-bg);
    border-color: var(--status-planning-border);
}

.lk-status-chip.lk-status-chip--wait {
    color: var(--status-unfilled-color);
    background: var(--status-unfilled-bg);
    border-color: var(--status-unfilled-border);
}

.lk-status-chip.lk-status-chip--recruiting {
    color: var(--status-recruiting-color);
    background: var(--status-recruiting-bg);
    border-color: var(--status-recruiting-border);
}

.lk-status-chip.lk-status-chip--full {
    color: var(--status-full-color);
    background: var(--status-full-bg);
    border-color: var(--status-full-border);
}

.lk-status-chip.lk-status-chip--running {
    color: var(--status-running-color);
    background: var(--status-running-bg);
    border-color: var(--status-running-border);
}

.lk-status-chip.lk-status-chip--reporting {
    color: var(--status-reporting-color);
    background: var(--status-reporting-bg);
    border-color: var(--status-reporting-border);
}

.lk-status-chip.lk-status-chip--done {
    color: var(--status-finished-color);
    background: var(--status-finished-bg);
    border-color: var(--status-finished-border);
}

.lk-status-chip.lk-status-chip--active {
    color: var(--status-recruiting-color);
    background: var(--status-recruiting-bg);
    border-color: var(--status-recruiting-border);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: var(--text-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    font-family: inherit;
    transition:
        background var(--dur-fast),
        color var(--dur-fast),
        transform var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-fast);
    -webkit-font-smoothing: antialiased;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(39,193,163,0.25);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    box-shadow: 0 4px 16px rgba(39,193,163,0.35);
}

.btn-outline-primary {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent-medium);
}
.btn-outline-primary:hover { background: var(--accent-soft); border-color: var(--accent); }

.btn-outline-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid rgba(15,23,42,0.14);
}
.btn-outline-secondary:hover { background: rgba(15,23,42,0.04); color: var(--text-primary); }

.btn-outline-light {
    background: rgba(255,255,255,0.10);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.18); color: #fff; }

.btn-sm { padding: 5px 12px; font-size: var(--text-xs); border-radius: 6px; }

/* =============================================
   FORMS
   ============================================= */
.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: 9px 13px;
    border: 1.5px solid rgba(15,23,42,0.11);
    border-radius: 8px;
    background: #fff;
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: inherit;
    line-height: 1.5;
    transition:
        border-color var(--dur-fast),
        box-shadow var(--dur-fast),
        background var(--dur-fast);
    -webkit-appearance: none;
}

.form-control:focus,
.form-select:focus {
    outline: 2px solid transparent;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(39,193,163,0.12);
    background: #fff;
}
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.form-control:hover:not(:focus),
.form-select:hover:not(:focus) {
    border-color: rgba(15,23,42,0.2);
}

.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 90px; }

.avatar-upload {
    display: grid;
    gap: 0.45rem;
}
.avatar-upload__body {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.avatar-upload__preview {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 2.35rem;
}
.avatar-upload__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.avatar-upload__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.avatar-upload__button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 50%;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.avatar-upload__button:hover {
    border-color: rgba(53, 115, 206, 0.35);
    background: rgba(53, 115, 206, 0.08);
    color: var(--accent);
}
.avatar-upload__button--danger:hover {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}
.avatar-upload__input,
.avatar-upload__clear {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}
body.avatar-cropper-open { overflow: hidden; }
.avatar-cropper[hidden] { display: none; }
.avatar-cropper {
    position: fixed;
    inset: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 1090;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow: auto;
}
.avatar-cropper__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
}
.avatar-cropper__dialog {
    position: relative;
    width: min(100%, 470px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
}
.avatar-cropper__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}
.avatar-cropper__header h2 { margin: 0; color: #0f172a; font-size: 1.2rem; }
.avatar-cropper__header p { margin: 4px 0 0; color: #64748b; font-size: 0.88rem; }
.avatar-cropper__close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
}
.avatar-cropper__stage {
    position: relative;
    width: min(100%, 390px);
    aspect-ratio: 1;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    background: #0f172a;
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.avatar-cropper__stage.is-dragging { cursor: grabbing; }
.avatar-cropper__stage > img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    transform-origin: 0 0;
    pointer-events: none;
    will-change: transform;
}
.avatar-cropper__grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.25);
    background-image:
        linear-gradient(to right, transparent 33.2%, rgba(255,255,255,.42) 33.3%, rgba(255,255,255,.42) 33.6%, transparent 33.7%, transparent 66.3%, rgba(255,255,255,.42) 66.4%, rgba(255,255,255,.42) 66.7%, transparent 66.8%),
        linear-gradient(to bottom, transparent 33.2%, rgba(255,255,255,.42) 33.3%, rgba(255,255,255,.42) 33.6%, transparent 33.7%, transparent 66.3%, rgba(255,255,255,.42) 66.4%, rgba(255,255,255,.42) 66.7%, transparent 66.8%);
}
.avatar-cropper__zoom {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 18px 4px;
    color: #64748b;
}
.avatar-cropper__zoom input { width: 100%; accent-color: var(--accent); }
.avatar-cropper__footer { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 520px) {
    .avatar-cropper { padding: 10px; }
    .avatar-cropper__dialog { padding: 16px; border-radius: 16px; }
    .avatar-cropper__footer .btn { flex: 1 1 0; }
}
.avatar-upload__hint {
    color: var(--text-muted);
    font-size: var(--text-sm);
}
.avatar-upload__status {
    min-height: 1.2em;
    font-size: var(--text-sm);
    font-weight: 600;
}
.avatar-upload__status:empty {
    display: none;
}
.avatar-upload__status--pending {
    color: var(--text-muted);
}
.avatar-upload__status--ok {
    color: #15803d;
}
.avatar-upload__status--warning {
    color: #b45309;
}

/* =============================================
   ALERTS / MESSAGES
   ============================================= */
.app-toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2147482000;
    display: flex;
    width: min(420px, calc(100vw - 32px));
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.app-message {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 28px;
    gap: 10px;
    align-items: start;
    margin: 0;
    padding: 13px 12px 13px 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-left-width: 4px;
    border-radius: 11px;
    background: #fff;
    color: var(--text-primary);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.18);
    font-size: var(--text-sm);
    font-weight: 500;
    animation: fadeSlideIn var(--dur-slow) var(--ease-out) both;
    pointer-events: auto;
}

.app-message > .bi { margin-top: 2px; font-size: 1rem; }
.app-toast__text { min-width: 0; overflow-wrap: anywhere; }
.app-toast__close {
    display: inline-flex;
    width: 28px;
    height: 28px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: currentColor;
    opacity: 0.55;
    cursor: pointer;
}
.app-toast__close:hover { background: rgba(15, 23, 42, 0.07); opacity: 1; }
.app-toast--success { border-left-color: #16a085; }
.app-toast--success > .bi { color: #16a085; }
.app-toast--warning { border-left-color: #d97706; }
.app-toast--warning > .bi { color: #d97706; }
.app-toast--error,
.app-toast--danger { border-left-color: #dc2626; }
.app-toast--error > .bi,
.app-toast--danger > .bi { color: #dc2626; }
.app-toast--info { border-left-color: #2563eb; }
.app-toast--info > .bi { color: #2563eb; }

@media (max-width: 767.98px) {
    .app-toast-stack {
        right: 16px;
        bottom: 84px;
    }
}

.alert-success { background: rgba(39,193,163,0.09); color: #0f6a52; }
.alert-warning { background: rgba(245,158,11,0.09); color: #92400e; }
.alert-danger  { background: rgba(239,68,68,0.09);  color: #991b1b; }
.alert-info    { background: rgba(59,130,246,0.09);  color: #1e3a8a; }

/* =============================================
   PILLS & BADGES
   ============================================= */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.01em;
    background: var(--accent-soft);
    color: var(--accent);
}

.pill-blue  { background: rgba(59,130,246,0.09);  color: var(--status-new-color); }
.pill-amber { background: rgba(245,158,11,0.09);  color: var(--status-active-color); }

.object-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(15,23,42,0.05);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

/* Stagger children into view */
.lk-card-grid > *,
.lk-score-grid > * {
    animation: fadeSlideIn var(--dur-slow) var(--ease-out) both;
    will-change: transform, opacity;
}
.lk-card-grid > *:nth-child(2),
.lk-score-grid > *:nth-child(2) { animation-delay: 40ms; }
.lk-card-grid > *:nth-child(3),
.lk-score-grid > *:nth-child(3) { animation-delay: 80ms; }
.lk-card-grid > *:nth-child(4),
.lk-score-grid > *:nth-child(4) { animation-delay: 120ms; }

/* =============================================
   BRS TABLE
   ============================================= */
.brs-table { min-width: 980px; }
.brs-table-wrap { padding-bottom: 220px; overflow-x: auto; }

.participants-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: none;
    touch-action: pan-y pinch-zoom;
}

.participants-table-scroll > .table {
    display: table;
    width: max-content;
    min-width: 100%;
    overflow: visible;
}

.participants-table-scroll > .incentive-table {
    min-width: 760px;
}

.brs-row--unlinked-profile > * {
    background: rgba(239, 68, 68, 0.12) !important;
}

.brs-row--unlinked-profile a {
    color: #b91c1c;
    font-weight: 700;
}

.brs-profile-warning {
    display: inline-flex;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.16);
    color: #991b1b;
    font-size: var(--text-xs);
    font-weight: 700;
    vertical-align: middle;
}

.brs-table thead th {
    position: relative;
    padding: 0;
    background: #f8fafc;
    border-color: rgba(15,23,42,0.07);
    color: var(--text-primary);
    font-size: var(--text-xs);
    font-weight: 700;
    vertical-align: top;
}

.brs-filter-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    gap: 8px;
    padding: 7px 10px;
    white-space: nowrap;
}

.brs-column-filter { position: static; }

.brs-column-filter summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    cursor: pointer;
    list-style: none;
    border-radius: 4px;
    transition: background var(--dur-fast);
}
.brs-column-filter summary::-webkit-details-marker { display: none; }

.brs-column-filter summary::before {
    content: "";
    width: 14px; height: 14px;
    background:
        linear-gradient(var(--accent), var(--accent)) 3px 4px / 8px 1.5px no-repeat,
        linear-gradient(var(--accent), var(--accent)) 4px 7px / 5px 1.5px no-repeat,
        linear-gradient(var(--accent), var(--accent)) 6px 10px / 2px 1.5px no-repeat;
}

.brs-column-filter summary:hover,
.brs-column-filter[open] summary,
.brs-column-filter.is-active summary { background: var(--accent-soft); }

.brs-column-filter.is-active summary::after {
    content: "";
    position: absolute;
    top: 4px; right: 4px;
    width: 5px; height: 5px;
    background: var(--accent);
    border-radius: 50%;
}

.brs-filter-menu {
    display: none;
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    width: 360px;
    max-height: 420px;
    overflow: hidden;
    padding: 16px 20px 14px;
    color: var(--text-primary);
    background: #fff;
    border: 1px solid rgba(15,23,42,0.09);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(15,23,42,0.12);
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: normal;
    will-change: transform, opacity;
}

.brs-filter-menu.is-open {
    display: block;
}

.brs-filter-menu a { display: block; color: var(--text-primary); text-decoration: none; }
.brs-filter-menu > a { padding: 7px 0; }
.brs-filter-menu > a + a { margin-top: 3px; }

.brs-filter-menu form {
    display: grid;
    grid-template-rows: auto auto auto 158px auto;
    gap: 9px;
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid rgba(15,23,42,0.06);
}

.brs-filter-menu label { margin: 0; font-size: 0.82rem; color: var(--text-secondary); }

.brs-filter-menu select,
.brs-filter-menu input {
    width: 100%;
    min-height: 34px;
    padding: 6px 10px;
    border: 1.5px solid rgba(15,23,42,0.1);
    border-radius: 6px;
    background: #fff;
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--text-sm);
    transition: border-color var(--dur-fast);
}
.brs-filter-menu select:focus,
.brs-filter-menu input:focus {
    outline: 2px solid transparent;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(39,193,163,0.12);
}
.brs-filter-menu select:focus-visible,
.brs-filter-menu input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.brs-filter-search { margin-top: 2px; }

.brs-filter-bulk {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.brs-filter-bulk button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.brs-filter-bulk a,
.brs-filter-clear {
    color: var(--accent);
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.brs-filter-values {
    display: grid;
    align-content: start;
    align-items: start;
    gap: 2px;
    height: 158px;
    overflow-y: auto;
    padding-right: 4px;
}

.brs-filter-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 30px;
    color: var(--text-primary) !important;
    cursor: pointer;
}

.brs-filter-option input {
    width: 16px;
    min-height: 16px;
    height: 16px;
    padding: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.brs-filter-empty {
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.brs-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
    padding-bottom: 10px;
}
.brs-filter-actions button {
    min-width: 80px; min-height: 34px; padding: 0 16px;
    border-radius: 7px;
    font-weight: 600; font-size: var(--text-sm);
    cursor: pointer;
    transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.brs-filter-cancel {
    border: 1.5px solid rgba(15,23,42,0.18);
    background: #fff;
    color: var(--text-primary);
}
.brs-filter-cancel:hover { background: rgba(15,23,42,0.04); }
.brs-filter-ok {
    border: 0;
    background: var(--accent);
    color: #fff;
}
.brs-filter-ok:hover { background: var(--accent-hover); transform: translateY(-1px); }

.brs-own-pinned-row > * {
    background: var(--accent-soft) !important;
    position: sticky; top: 0; z-index: 3;
    box-shadow: inset 0 -2px 0 rgba(39,193,163,0.3);
}

/* =============================================
   BOOTSTRAP TABLE OVERRIDES
   ============================================= */
.table {
    border-radius: 0;
    overflow: hidden;
    background: #fff;
}
.table,
.table thead,
.table tbody,
.table tr,
.table th,
.table td,
.table-responsive,
.lk-activity-table,
.lk-events-table-wrap,
.assignment-picker__table {
    border-radius: 0 !important;
}
.table thead { background: #f8fafc; }
.table > :not(caption) > * > * {
    border-bottom-color: rgba(15,23,42,0.055);
    padding: 11px 15px;
    font-size: var(--text-sm);
}

/* =============================================
   MODAL
   ============================================= */
.modal {
    z-index: 2147483646 !important;
    isolation: isolate;
}
.modal-backdrop { z-index: 2147483645 !important; }

.modal-dialog,
.modal-content {
    position: relative;
    z-index: 1;
}

.modal-content {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 20px 60px rgba(15,23,42,0.18);
    animation: scaleIn var(--dur-base) var(--ease-out) both;
}

.modal-header {
    border-bottom: 1px solid rgba(15,23,42,0.07);
    padding: 16px 20px;
    font-size: var(--text-md);
    font-weight: 700;
}
.modal-body { padding: 18px 20px; }
.modal-body-scrollable { max-height: calc(100vh - 8rem); overflow-y: auto; }
.modal-footer { border-top: 1px solid rgba(15,23,42,0.07); padding: 13px 20px; }

/* =============================================
   ASSIGNMENT PICKER
   ============================================= */
.assignment-picker {
    border: 1px solid rgba(15,23,42,0.07);
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.assignment-picker__table {
    border: 1px solid rgba(15,23,42,0.05);
    border-radius: 9px;
    overflow: hidden;
}
.assignment-picker__table table { margin-bottom: 0; }
.assignment-picker__table tbody tr { transition: background var(--dur-fast); }
.assignment-picker__table tbody tr:hover { background: rgba(39,193,163,0.04); }

.assignment-picker__pagination {
    display: flex; align-items: center;
    justify-content: flex-end; gap: 6px;
}

.assignment-picker__page-info {
    font-size: var(--text-xs);
    min-width: 60px;
    display: inline-block;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.assignment-picker__check input[type="checkbox"] {
    width: 1rem; height: 1rem; cursor: pointer;
}

/* =============================================
   SETTINGS DIRECTORY
   ============================================= */
.settings-directory {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 14px;
    padding: 0 0 20px;
}

.settings-directory__group {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 16px 18px;
    transition: box-shadow var(--dur-base);
}
.settings-directory__group:hover { box-shadow: var(--card-shadow-hover); }

.settings-directory__column {
    display: flex; flex-direction: column; gap: 14px;
}

.settings-directory__title {
    margin: 0 0 10px;
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.settings-directory__links {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 3px;
}

.settings-directory__link {
    display: block !important;
    width: 100% !important;
    padding: 7px 9px;
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    background: transparent;
    transition:
        color var(--dur-fast),
        background var(--dur-fast),
        transform var(--dur-fast) var(--ease-out);
}
.settings-directory__link:hover {
    color: var(--text-primary);
    background: var(--accent-soft);
    transform: translateX(3px);
}

.settings-directory__link--with-icon {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
}

.settings-directory__link-icon {
    width: 22px;
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1rem;
    line-height: 1.2;
}

.settings-directory__link-body {
    min-width: 0;
}

.settings-directory__link.text-danger .settings-directory__link-icon {
    color: currentColor;
}

.settings-directory--user {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 920px;
}

.settings-directory__meta {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 500;
}

.dashboard-notification-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid rgba(53, 115, 206, 0.22);
    border-radius: var(--card-radius);
    color: var(--text-primary);
    background: #eaf2fd;
    box-shadow: var(--card-shadow);
    transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base);
}

.dashboard-notification-card:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.dashboard-notification-card__icon,
.push-permission-card__icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-size: 1.15rem;
}

.dashboard-notification-card__content > span {
    color: var(--accent-dim);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-notification-card h3 {
    margin: 5px 0 3px;
    font-size: var(--text-lg);
}

.dashboard-notification-card p {
    margin: 0 0 14px;
    color: var(--text-secondary);
}

.dashboard-notification-card strong {
    color: var(--accent);
    font-size: var(--text-sm);
}

.push-permission-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--card-radius);
    background: #fff8e8;
    box-shadow: var(--card-shadow);
}

.push-permission-card[hidden] {
    display: none;
}

.push-permission-card__icon {
    color: #854d0e;
    background: #fde68a;
}

.push-permission-card h4 {
    margin: 0 0 3px;
    font-size: var(--text-md);
}

.push-permission-card p {
    margin: 0;
    max-width: 68ch;
    color: #785d28;
    font-size: var(--text-sm);
}

.push-platform-guide {
    display: grid;
    gap: 6px;
    margin: 12px 0 0;
    padding-left: 20px;
    color: #604817;
    font-size: var(--text-sm);
}

.push-platform-guide[hidden] {
    display: none;
}

.push-permission-card .btn {
    min-height: 44px;
    touch-action: manipulation;
}

.push-permission-card__close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(133, 77, 14, 0.08);
    color: #854d0e;
}

.push-permission-card__close:hover {
    background: rgba(133, 77, 14, 0.14);
}

.notification-settings-form {
    max-width: 900px;
}

.notification-preferences-table th,
.notification-preferences-table td {
    vertical-align: middle;
}

.notification-preferences-table th:nth-child(2),
.notification-preferences-table th:nth-child(3),
.notification-preferences-table td:nth-child(2),
.notification-preferences-table td:nth-child(3) {
    width: 140px;
}

.notification-preferences-table__checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
}

.notification-preferences-table td.is-disabled {
    opacity: 0.45;
}

.notification-preferences-table__checkbox:disabled {
    cursor: not-allowed;
}

.notification-toggle-list {
    display: grid;
    gap: 2px;
}

.notification-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 4px;
    border-bottom: 1px solid var(--card-border);
    cursor: pointer;
}

.notification-toggle:last-child {
    border-bottom: 0;
}

.notification-toggle span {
    display: grid;
    gap: 2px;
}

.notification-toggle strong {
    color: var(--text-primary);
    font-size: var(--text-base);
}

.notification-toggle small {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.notification-toggle input {
    width: 42px;
    height: 23px;
    flex: 0 0 auto;
    appearance: none;
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: background var(--dur-base);
}

.notification-toggle input::before {
    content: "";
    display: block;
    width: 17px;
    height: 17px;
    margin: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform var(--dur-base) var(--ease-out);
}

.notification-toggle input:checked {
    border-color: var(--accent);
    background: var(--accent);
}

.notification-toggle input:checked::before {
    transform: translateX(19px);
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.notifications-header > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notifications-header h1 {
    margin: 0;
    font-size: var(--text-xl);
}

.notifications-header p {
    margin: 1px 0 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.notifications-header__back {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.notification-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.notification-filters::-webkit-scrollbar {
    display: none;
}

.notification-filters a {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.62);
    font-size: var(--text-sm);
    font-weight: 600;
}

.notification-filters a.is-active {
    color: #fff;
    background: var(--text-primary);
}

.notification-filters span {
    margin-left: 4px;
    opacity: 0.75;
}

.notification-feed {
    overflow: hidden;
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.notification-feed__item {
    margin: 0;
    border-bottom: 1px solid var(--card-border);
}

.notification-feed__item:last-child {
    border-bottom: 0;
}

.notification-feed__item button {
    position: relative;
    width: 100%;
    display: grid;
    gap: 5px;
    padding: 20px 54px 20px 20px;
    border: 0;
    color: var(--text-primary);
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background var(--dur-fast);
}

.notification-feed__item button:hover {
    background: rgba(53, 115, 206, 0.045);
}

.notification-feed__item--unread button {
    background: #f3f7fd;
}

.notification-feed__meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.notification-feed__item strong {
    max-width: 70ch;
    font-size: var(--text-md);
}

.notification-feed__title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-feed__unread-marker {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.notification-feed__message {
    max-width: 75ch;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.notification-feed__status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.notification-feed__arrow {
    position: absolute;
    top: 50%;
    right: 20px;
    color: var(--text-muted);
    transform: translateY(-50%);
}

.notification-feed__empty {
    padding: 54px 24px;
    color: var(--text-secondary);
    text-align: center;
}

.notification-feed__empty > i {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 2rem;
}

.notification-feed__empty h3 {
    margin: 0 0 4px;
    color: var(--text-primary);
}

.notification-feed__empty p {
    max-width: 52ch;
    margin: 0 auto;
}

.profile-settings-form {
    max-width: 1040px;
}

.profile-settings-form--with-floating {
    padding-bottom: 120px;
}

.profile-settings-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
}

.profile-settings-section h5 {
    margin: 0 0 16px;
    color: var(--text-primary);
    font-size: var(--text-lg);
    font-weight: 700;
}

.profile-settings-section label {
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
}

.profile-settings-check {
    min-height: 38px;
    align-items: center;
    padding-top: 8px;
}

.profile-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-primary);
    cursor: pointer;
}

.profile-chip input {
    margin: 0;
}

.profile-chip:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.profile-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}

.profile-settings-actions--floating {
    position: fixed;
    right: max(24px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 1100;
    width: max-content;
    max-width: calc(100vw - 48px);
    margin: 0;
    padding: 12px;
    flex-wrap: nowrap;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
    transform: translateZ(0);
}

.profile-settings-actions--cabinet {
    align-items: stretch;
}

.profile-settings-actions--cabinet .btn {
    min-width: 112px;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
    transform: none;
}

.profile-settings-actions--cabinet .btn:hover,
.profile-settings-actions--cabinet .btn:active {
    transform: none;
}

.profile-delete-subtle {
    max-width: 1040px;
    margin-left: auto;
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid var(--card-border);
    text-align: right;
}

.profile-delete-subtle h5 {
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 600;
}

.profile-delete-subtle p {
    max-width: 560px;
    margin-left: auto;
}

.lk-incentive-profile-card {
    padding: 10px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: #fff;
}

.lk-incentive-profile-card h5 {
    margin: 0 0 8px;
    font-size: var(--text-base);
}

.lk-incentive-profile-list {
    display: grid;
    gap: 4px;
}

.lk-incentive-profile-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    min-height: 30px;
    padding: 5px 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}

.lk-incentive-profile-row:hover,
.lk-incentive-profile-row:focus-visible {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--text-primary);
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.lk-incentive-profile-row strong {
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.2;
}

.lk-incentive-profile-row span {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

@media (max-width: 991px) {
    .profile-settings-actions--floating {
        right: 14px;
        bottom: max(12px, env(safe-area-inset-bottom));
        max-width: calc(100vw - 28px);
    }

    .profile-settings-actions--cabinet {
        left: 14px;
        right: 14px;
        width: auto;
    }

    .profile-settings-actions--cabinet .btn {
        flex: 1 1 0;
        min-width: 0;
    }
}

.role-staff-card {
    display: grid;
    grid-template-columns: minmax(180px, 0.35fr) minmax(240px, 1fr);
    gap: 16px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: #f8fafc;
}

.role-staff-card__toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    margin: 0;
    color: var(--text-primary);
}

.admin-access-switches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-access-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-primary);
    cursor: pointer;
}

.admin-access-switch input {
    order: 2;
    width: 42px;
    height: 24px;
    margin: 0;
    appearance: none;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    transition: background var(--dur-fast);
}

.admin-access-switch input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15,23,42,0.25);
    transition: transform var(--dur-fast);
}

.admin-access-switch input:checked {
    background: var(--accent);
}

.admin-access-switch input:checked::after {
    transform: translateX(18px);
}

.admin-access-switch--locked {
    cursor: not-allowed;
    opacity: 0.55;
}

.admin-access-switch--locked input {
    pointer-events: none;
}

.password-criteria {
    list-style: none;
    padding-left: 0;
    margin-top: 6px;
}

.password-criteria li {
    position: relative;
    padding-left: 20px;
}

.password-criteria li::before {
    content: "○";
    position: absolute;
    left: 0;
    color: var(--text-secondary, #94a3b8);
}

.password-criteria li.is-valid-rule {
    color: #198754;
}

.password-criteria li.is-valid-rule::before {
    content: "✓";
    color: #198754;
}

.password-criteria li.is-invalid-rule {
    color: #dc3545;
}

.password-criteria li.is-invalid-rule::before {
    content: "✕";
    color: #dc3545;
}

.beta-badge {
    display: inline-block;
    padding: 1px 7px;
    font-size: 0.62em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.5;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    vertical-align: middle;
    white-space: nowrap;
}

.error-shell {
    display: grid;
    place-items: center;
    min-height: min(620px, calc(100vh - 160px));
    padding: 24px;
}

.error-card {
    width: min(620px, 100%);
    padding: 34px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    text-align: center;
}

.error-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 38px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
}

.error-card h1 {
    margin: 0 0 10px;
    color: var(--text-primary);
    font-size: var(--text-xl);
}

.error-card p {
    margin: 0 auto 22px;
    max-width: 440px;
    color: var(--text-secondary);
}

.error-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.fill-suggest-box {
    position: absolute;
    z-index: 3000;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15,23,42,0.14);
}

.fill-suggest-item {
    display: block;
    width: 100%;
    padding: 9px 11px;
    border: 0;
    border-bottom: 1px solid rgba(15,23,42,0.06);
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.fill-suggest-item:last-child {
    border-bottom: 0;
}

.fill-suggest-item:hover {
    background: var(--accent-soft);
}

.fill-suggest-custom-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.fill-suggest-custom-check {
    flex-shrink: 0;
    cursor: pointer;
}

.fill-suggest-custom-label {
    font-size: 0.875rem;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    user-select: none;
}

.fill-suggest-custom-input {
    width: 100%;
    margin-top: 6px;
}

.event-meta-dl {
    display: block;
    margin-bottom: 24px;
    padding: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    overflow: hidden;
}
.event-meta-dl > div {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    align-items: stretch;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}
.event-meta-dl > div:last-child {
    border-bottom: none;
}
.event-meta-dl dt {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    padding: 14px 18px;
    margin: 0;
    background: rgba(248, 250, 252, 0.88);
    border-right: 1px solid rgba(15, 23, 42, 0.07);
}
.event-meta-dl dd {
    font-size: var(--text-base);
    color: var(--text-primary);
    margin: 0;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.event-period-dates--running {
    color: var(--status-running-color);
    font-weight: 600;
}
.event-period-dates--done {
    color: var(--text-muted);
}

.event-description {
    margin-bottom: 24px;
    padding: 18px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.event-description h4 {
    margin: 0 0 10px;
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 700;
}

.event-description div {
    color: var(--text-secondary);
    line-height: 1.6;
}

.event-description-block {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 18px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.event-description-block__media {
    flex: 0 0 280px;
}

.event-description-block__media img {
    width: 100%;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    max-height: 220px;
}

.event-description-block__text {
    flex: 1 1 auto;
}

.event-description-block__text h4 {
    margin: 0 0 10px;
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 700;
}

.event-description-block__text div {
    color: var(--text-secondary);
    line-height: 1.6;
}

.event-description-markdown {
    color: var(--text-primary) !important;
    font-size: var(--text-base);
    line-height: 1.6;
}

.event-description-markdown h1,
.event-description-markdown h2,
.event-description-markdown h3,
.event-description-markdown h4,
.event-description-markdown h5,
.event-description-markdown h6 {
    margin: 1.1em 0 0.45em;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.event-description-markdown > :first-child {
    margin-top: 0;
}

.event-description-markdown p,
.event-description-markdown li {
    color: var(--text-primary);
}

.event-description-markdown > :last-child {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .event-description-block {
        flex-direction: column;
    }
    .event-description-block__media {
        flex: 0 0 auto;
        width: 100%;
    }
    .event-description-block__media img {
        max-height: 160px;
    }
}

.event-actionbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
}

.event-actionbar form {
    margin: 0;
}

.event-import-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
}

.event-import-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
}

.event-import-modal__dialog {
    position: relative;
    width: min(680px, calc(100vw - 32px));
    margin: 7vh auto 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.event-import-modal__header,
.event-import-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.event-import-modal__footer {
    border-bottom: none;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    justify-content: flex-end;
}

.event-import-modal__body {
    padding: 18px;
}

.event-import-progress__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.event-actionbar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-primary);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}

.event-actionbar__btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.event-actionbar__btn--edit {
    border-color: rgba(100, 116, 139, 0.28);
    background: rgba(100, 116, 139, 0.08);
    color: #475569;
}

.event-actionbar__btn--edit:hover {
    border-color: rgba(71, 85, 105, 0.42);
    background: rgba(100, 116, 139, 0.14);
    color: #334155;
}

.event-actionbar__btn--scan {
    border-color: #16a34a;
    background: #22c55e;
    color: #fff;
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.24);
}

.event-actionbar__btn--scan:hover {
    border-color: #15803d;
    background: #16a34a;
    color: #fff;
}

.event-actionbar__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* =============================================
   Plan preview
   ============================================= */
.plan-preview {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    background: var(--surface-alt, #f8fafc);
}
.plan-preview__content {
    font-family: inherit;
    font-size: var(--text-sm);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    color: var(--text-primary);
}

/* =============================================
   QR
   ============================================= */
.qr-box { text-align: center; }
.qr-box img {
    max-width: 210px;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(15,23,42,0.12);
}

/* =============================================
   PROFILE DRAWER
   ============================================= */
.profile-drawer-backdrop {
    position: fixed; inset: 0;
    z-index: 2147483600;
    background: rgba(8,16,28,0.45);
    backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none;
    transition: opacity var(--dur-slow) var(--ease-out);
}
.profile-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

.profile-drawer {
    position: fixed;
    top: 50%; left: 50%;
    z-index: 2147483640;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(580px, 92vw);
    max-height: min(88dvh, 780px);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15,23,42,0.24);
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--dur-slow) var(--ease-drawer), opacity var(--dur-slow) var(--ease-out);
    will-change: transform, opacity;
}
.profile-drawer.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }

.profile-drawer__header,
.profile-drawer__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(15,23,42,0.07);
}

.profile-drawer__header {
    border-radius: 16px 16px 0 0;
}

.profile-drawer__footer {
    position: sticky; bottom: 0;
    min-height: 68px;
    justify-content: center;
    border-top: 1px solid rgba(15,23,42,0.07);
    border-bottom: 0;
    border-radius: 0 0 16px 16px;
    background: #fff;
}

.profile-drawer__body {
    overflow-y: auto;
    padding: 14px 18px;
    background: #f8fafc;
}

.profile-case-block {
    margin-bottom: 10px;
    border-radius: 10px;
    padding: 13px 15px;
    background: #fff;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
}
.profile-case-block h5 { margin-bottom: 9px; font-weight: 700; font-size: var(--text-sm); }

.profile-case-grid {
    display: grid;
    grid-template-columns: var(--profile-label-col, minmax(110px, 34%)) minmax(0, 1fr);
    gap: 5px 10px;
    margin-bottom: 0;
}
.profile-case-grid[data-profile-contacts] { --profile-label-col: minmax(84px, 26%); }
.profile-case-grid[data-profile-about]    { --profile-label-col: minmax(136px, 40%); }
.profile-case-grid--main                  { --profile-label-col: minmax(108px, 32%); }

.profile-case-grid dt {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--text-sm);
    min-width: 0;
    overflow-wrap: anywhere;
}
.profile-case-grid dd {
    margin-bottom: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: var(--text-sm);
}

.profile-case-value { display: block; white-space: pre-wrap; }
.profile-case-value.is-collapsed {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.profile-case-toggle {
    display: inline-flex;
    border: 0; background: transparent;
    color: var(--accent); padding: 2px 0 0;
    font: inherit; font-size: var(--text-sm); font-weight: 600;
    cursor: pointer;
    transition: color var(--dur-fast);
}
.profile-case-toggle:hover { text-decoration: underline; color: var(--text-primary); }

.profile-case-entry {
    border-top: 1px solid rgba(15,23,42,0.06);
    padding-top: 9px; margin-top: 9px;
}
.profile-case-entry:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

.profile-case-avatar {
    width: 112px; height: 112px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(15,23,42,0.07);
    background: #f8fafc;
}

.profile-case-photo-placeholder {
    display: flex; align-items: center; justify-content: center;
    width: 112px; height: 112px;
    border-radius: 8px;
    color: var(--text-secondary);
    background: #f8fafc;
    border: 1px solid rgba(15,23,42,0.07);
}

.profile-case-photo-card { flex: 0 0 112px; }

.profile-case-pagination {
    display: flex; align-items: center;
    justify-content: space-between; gap: 9px; margin-top: 9px;
}

.profile-case-pagination__button {
    border: 1px solid rgba(15,23,42,0.1);
    border-radius: 6px;
    background: #fff;
    color: var(--text-primary);
    padding: 5px 11px;
    font: inherit; font-size: var(--text-sm); font-weight: 600;
    cursor: pointer;
    transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.profile-case-pagination__button:hover { background: #f8fafc; transform: translateY(-1px); }
.profile-case-pagination__button:disabled { opacity: 0.32; cursor: default; transform: none; }

.profile-drawer__actions {
    display: flex; align-items: center; justify-content: center; gap: 9px;
}

.profile-drawer__assessment { width: min(100%, 390px); }

.profile-drawer__assessment-scores {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 5px; margin-bottom: 5px;
}

.profile-drawer__assessment label {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.profile-drawer__assessment .form-control {
    margin-top: 3px; border-radius: 6px;
    padding: 5px 7px; font-size: var(--text-sm);
}
.profile-drawer__assessment-comment { display: block; margin-bottom: 5px; }
.profile-drawer__assessment-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.approval-preview-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.approval-preview-list {
    display: grid;
    gap: 14px;
}

.approval-preview-list--compact {
    gap: 10px;
}

.approval-card {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #fff;
}

.approval-card--pending {
    border-color: rgba(217, 119, 6, 0.35);
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.08);
}

.approval-card--approved {
    border-color: rgba(22, 163, 74, 0.28);
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.08);
}

.approval-card--rejected {
    border-color: rgba(220, 38, 38, 0.32);
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.08);
}

.approval-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.approval-card__head h4 {
    margin: 2px 0 0;
    font-size: 1rem;
}

.approval-card__compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.approval-card__content {
    min-width: 0;
    flex: 1 1 auto;
}

.approval-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    margin-right: 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    vertical-align: middle;
}

.approval-chip i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.74rem;
    color: #fff;
}

.approval-chip--pending {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

.approval-chip--pending i {
    background: #d97706;
}

.approval-chip--approved {
    background: rgba(0, 128, 0, 0.12);
    color: #008000;
}

.approval-chip--approved i {
    background: #008000;
}

.approval-chip--rejected {
    background: rgba(255, 0, 0, 0.12);
    color: #ff0000;
}

.approval-chip--rejected i {
    background: #ff0000;
}

.approval-card__type {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.approval-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.approval-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.approval-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.approval-inline-form--compact {
    flex: 0 0 auto;
}

.approval-inline-form__fields {
    display: flex;
    flex: 1 1 420px;
    flex-wrap: wrap;
    gap: 8px;
}

.approval-inline-form__fields .form-control,
.approval-inline-form--compact .form-control {
    min-width: 220px;
}

.approval-inline-form__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.approval-budget-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    font-size: 0.92rem;
}

.approval-section-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 8px;
}

.approval-status-text--pending {
    color: #b45309;
}

.approval-status-text--approved {
    color: #15803d;
}

.approval-status-text--rejected {
    color: #b91c1c;
}

.approval-note {
    display: inline-block;
    font-size: 0.82rem;
    line-height: 1.35;
}

.approval-note--rejected {
    color: #b91c1c;
}

.approval-table--compact {
    font-size: 0.92rem;
}

.profile-drawer__nav {
    position: absolute; bottom: 16px;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(15,23,42,0.1);
    background: #fff;
    color: var(--text-primary);
    font-size: 1.05rem; font-weight: 700; line-height: 1;
    box-shadow: 0 6px 20px rgba(15,23,42,0.10);
    cursor: pointer;
    transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base), opacity var(--dur-base);
}
.profile-drawer__nav:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(15,23,42,0.14); }
.profile-drawer__nav:disabled { opacity: 0.28; transform: none; box-shadow: none; }
.profile-drawer__nav--prev { left: 14px; }
.profile-drawer__nav--next { right: 14px; }

.profile-drawer-link {
    border: 0; background: transparent;
    color: var(--accent); padding: 0;
    font: inherit; font-weight: 600;
    text-align: left; cursor: pointer;
    transition: color var(--dur-fast);
}
.profile-drawer-link:hover { text-decoration: underline; color: var(--text-primary); }

/* =============================================
   LANDING PAGE
   ============================================= */
.landing-page { width: 100%; }

.landing-hero {
    min-height: min(640px, calc(100vh - 68px));
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(190px,260px);
    gap: 2rem;
    align-items: flex-end;
    padding: 3.5rem;
    color: #fff;
    border-radius: 0;
    overflow: hidden;
    background:
        linear-gradient(110deg, rgba(5,20,35,0.92), rgba(5,20,35,0.45), rgba(5,20,35,0.12)),
        url("../img/landing/hero.5e97b70f30de.webp") center/cover;
    margin-bottom: 0;
}

.landing-hero__content { max-width: 640px; }

.landing-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-medium);
    border-radius: 20px;
}

.landing-hero h1 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    line-height: 0.95;
    margin-bottom: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.landing-lead {
    max-width: 560px;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.88;
}

.landing-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.landing-hero__stats { display: grid; gap: 10px; align-content: end; }

.landing-hero__stats div {
    border-radius: 10px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    transition: background var(--dur-base), transform var(--dur-base) var(--ease-out);
}
.landing-hero__stats div:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }

.landing-hero__stats strong {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.landing-hero__stats span {
    display: block;
    margin-top: 3px;
    color: rgba(255,255,255,0.75);
    font-size: var(--text-sm);
}

.landing-actions .btn, .landing-page .btn { border-radius: 8px; }

.landing-quote {
    padding: 2.75rem 3.5rem;
    color: #fff;
    background: linear-gradient(110deg, #0a394f, #1aa58b);
}

.landing-quote p {
    max-width: 680px;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(1.6rem, 4vw, 3.5rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.landing-band {
    display: grid;
    grid-template-columns: minmax(190px,0.72fr) minmax(0,1.4fr);
    gap: 2rem;
    align-items: start;
    padding: 3rem 3.5rem;
    background: #fff;
    border-bottom: 1px solid rgba(15,23,42,0.06);
}
.landing-band--reverse { grid-template-columns: minmax(0,1.4fr) minmax(190px,0.72fr); }

.landing-band h2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin-bottom: 12px;
}
.landing-band p { color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.65; max-width: 52ch; }

.landing-directions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
}

.landing-directions article {
    min-height: 150px;
    border-radius: 10px;
    padding: 16px;
    background: #f4f7fc;
    border: 1px solid rgba(53, 115, 206, 0.10);
    transition: background var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-out);
}
.landing-directions article:hover {
    background: var(--accent-soft);
    border-color: var(--accent-medium);
    transform: translateY(-2px);
}

.landing-directions strong {
    display: block;
    margin-bottom: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--accent);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.landing-directions h3 {
    font-size: var(--text-sm);
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: -0.01em;
}
.landing-directions p { margin-bottom: 0; color: var(--text-secondary); font-size: var(--text-sm); }

.landing-feature {
    display: grid;
    grid-template-columns: minmax(0,1.1fr) minmax(250px,0.9fr);
    gap: 0;
    align-items: stretch;
}

.landing-feature__image {
    min-height: 360px;
    aspect-ratio: 4 / 3;
    background:
        linear-gradient(180deg, rgba(8,27,38,0.06), rgba(8,27,38,0.3)),
        url("../img/landing/feature.776991f6a77c.webp") center/cover;
}

.landing-feature__text {
    padding: 3rem 3.5rem;
    background: #fff;
    border-left: 1px solid rgba(15,23,42,0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.landing-feature__text h2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 3rem);
    line-height: 1.05;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.landing-feature__text p:not(.landing-kicker) {
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: var(--text-sm);
}

/* =============================================
   STAT CARDS
   ============================================= */
.stat-card {
    background: var(--accent-soft);
    border-radius: 9px;
    padding: 13px 15px;
    border: 1px solid var(--accent-medium);
    transition: background var(--dur-fast), border-color var(--dur-fast);
}
.stat-card:hover { background: rgba(53,115,206,0.15); border-color: var(--accent); }

.card, .card-metric, .logical-block, .object-block {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 18px 22px;
    margin-bottom: 14px;
}
.card-metric { padding: 18px 22px; }
.card h3, .card h4, .card h5 { font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex; align-items: center;
    gap: 3px; flex-wrap: wrap;
}

.page-link {
    display: flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px;
    padding: 0 11px;
    border-radius: 7px;
    border: 1px solid rgba(15,23,42,0.09);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    background: #fff;
    text-decoration: none;
    transition:
        background var(--dur-fast),
        color var(--dur-fast),
        border-color var(--dur-fast),
        transform var(--dur-fast) var(--ease-out);
}
.page-link:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-medium); transform: translateY(-1px); }
.page-item.active .page-link { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-item.disabled .page-link { opacity: 0.35; pointer-events: none; }

/* =============================================
   AVATAR GROUP
   ============================================= */
.avatar-group { display: flex; align-items: center; }
.avatar-group img {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -7px;
    box-shadow: 0 2px 6px rgba(15,23,42,0.1);
}
.avatar-group img:first-child { margin-left: 0; }

/* =============================================
   PUBLIC LAYOUT (guests)
   ============================================= */
.app-body--public {
    background:
        radial-gradient(circle at top left, rgba(27, 104, 224, 0.14), transparent 30%),
        radial-gradient(circle at top right, rgba(10, 68, 168, 0.12), transparent 26%),
        linear-gradient(180deg, #f7fbff 0%, #f1f5fb 100%);
}

.pub-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(244, 247, 251, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(14, 33, 74, 0.08);
    transition: box-shadow var(--dur-base);
}
.pub-header.is-scrolled { box-shadow: 0 2px 20px rgba(15,23,42,0.08); }

.pub-header__inner {
    display: flex; align-items: center; gap: 16px;
    max-width: 1180px; margin: 0 auto;
    padding: 0 16px; min-height: 76px;
}

.pub-brand {
    display: flex; align-items: center;
    gap: 14px; text-decoration: none; flex-shrink: 0;
}

.pub-brand-emblem {
    width: 48px;
    height: 48px;
    display: block;
}

.pub-brand-text {
    font-family: "Geologica", sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #0d1b3d;
}

.pub-brand-text strong {
    font-weight: 700;
}

.pub-nav {
    display: flex; align-items: center; gap: 2px;
    margin-left: 6px; flex: 1;
}

.pub-nav-link {
    padding: 6px 12px;
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: var(--text-sm); font-weight: 500;
    text-decoration: none;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.pub-nav-link:hover { background: rgba(15,23,42,0.05); color: var(--text-primary); }

.pub-header__actions {
    display: flex; align-items: center;
    gap: 12px; margin-left: auto;
}

.pub-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 15px; font-weight: 800;
    text-decoration: none;
    transition:
        background var(--dur-fast),
        color var(--dur-fast),
        box-shadow var(--dur-fast),
        transform var(--dur-fast) var(--ease-out);
}
.pub-btn:hover { transform: translateY(-1px); }
.pub-btn:active { transform: scale(0.97); }

.pub-btn--ghost {
    color: #0d1b3d;
    background: rgba(255, 255, 255, 0.74);
    border-color: rgba(14, 33, 74, 0.08);
}
.pub-btn--ghost:hover { background: rgba(255,255,255,0.92); color: #0d1b3d; }

.pub-btn--accent {
    background: linear-gradient(135deg, #1b68e0 0%, #0f46ba 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(27, 104, 224, 0.24);
}
.pub-btn--accent:hover { color: #fff; box-shadow: 0 16px 30px rgba(27, 104, 224, 0.28); }

.pub-burger {
    display: none; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border: none; background: transparent;
    color: var(--text-primary); font-size: 1.3rem;
    cursor: pointer; border-radius: 8px; margin-left: auto;
    transition: background var(--dur-fast);
}
.pub-burger:hover { background: rgba(15,23,42,0.05); }

.pub-mobile-nav {
    display: none; flex-direction: column;
    padding: 7px 18px 12px;
    border-top: 1px solid rgba(15,23,42,0.06);
    gap: 2px;
    animation: fadeSlideIn var(--dur-base) var(--ease-out) both;
}
.pub-mobile-nav.is-open { display: flex; }

.pub-mobile-nav a {
    padding: 9px 10px;
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: var(--text-sm); font-weight: 500;
    text-decoration: none;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.pub-mobile-nav a:hover { background: rgba(15,23,42,0.05); color: var(--text-primary); }

.pub-content { width: 100%; }

.pub-message {
    max-width: 1200px; margin: 14px auto 0;
    padding: 11px 32px;
    border: none; border-radius: 9px;
    font-size: var(--text-sm);
    animation: fadeSlideIn var(--dur-slow) var(--ease-out) both;
}

/* Landing inside public shell — edge-to-edge */
.app-body--public .landing-hero { border-radius: 0; margin: 0; }

.app-body--public .landing-quote,
.app-body--public .landing-band,
.app-body--public .landing-band--reverse,
.app-body--public .landing-feature {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.app-body--public .landing-feature__text { border-radius: 0; border: none; box-shadow: none; }
.app-body--public .landing-feature__image { border-radius: 0; }

.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 2147483644;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.cookie-banner__content {
    width: min(760px, 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 252, 245, 0.98);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    pointer-events: auto;
}

.cookie-banner__text {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--text-sm);
    line-height: 1.55;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-banner__icon {
    font-size: 1.15rem;
    color: #c07a22;
    flex-shrink: 0;
}

.cookie-banner__text a {
    color: var(--brand);
    font-weight: 700;
}

.cookie-banner__form {
    flex-shrink: 0;
}

.legal-page {
    width: min(980px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.legal-page__title {
    margin: 0 0 18px;
    font-size: clamp(1.6rem, 2vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.legal-page__card {
    padding: 32px 36px;
    border-radius: 22px;
}

.legal-page__card p,
.legal-page__card ul,
.legal-page__card ol {
    margin-bottom: 16px;
    line-height: 1.75;
}

.legal-page__card ul,
.legal-page__card ol {
    padding-left: 22px;
}

.legal-page__card li + li {
    margin-top: 8px;
}

.legal-page__card h5 {
    margin: 28px 0 12px;
    font-size: 1rem;
    font-weight: 800;
}

.legal-page__date {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-align: right;
}

.legal-page__actions {
    margin-top: 18px;
}

@media (max-width: 768px) {
    .landing-hero {
        background:
            linear-gradient(110deg, rgba(5,20,35,0.94), rgba(5,20,35,0.58), rgba(5,20,35,0.18)),
            url("../img/landing/hero-mobile.90079a20e952.webp") center/cover;
    }

    .landing-feature__image {
        min-height: 180px;
        background: linear-gradient(135deg, #0a394f, #1aa58b);
    }
}

/* =============================================
   AUTH PAGES
   ============================================= */
.auth-wrap {
    display: flex; justify-content: center; align-items: flex-start;
    padding: 64px 20px 80px;
    min-height: calc(100vh - 64px);
    background: #f8fafc;
}

.auth-card {
    width: 100%; max-width: 400px;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: 0 4px 30px rgba(15,23,42,0.08);
    padding: 32px 28px;
    animation: scaleIn var(--dur-slow) var(--ease-out) both;
}

.auth-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 22px;
    letter-spacing: -0.025em;
}

.auth-hint {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
    line-height: 1.55;
}

/* =============================================
   COMPAT ALIASES
   ============================================= */
.zone-block {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 22px 26px;
    margin-bottom: 14px;
}

.app-hero {
    background: linear-gradient(140deg, #0c3c68, #1e5783);
    color: #fff; position: relative;
    padding: 24px 0 32px;
    border-radius: var(--card-radius);
    margin-bottom: 14px;
    box-shadow: 0 16px 40px rgba(10,33,56,0.25);
}
.app-hero__wave {
    position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.18), transparent 45%),
                radial-gradient(circle at 90% 10%, rgba(116,224,213,0.26), transparent 40%);
    pointer-events: none;
}
.app-hero__shell { position: relative; z-index: 2; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop { display: block; pointer-events: none; }
    .sidebar-backdrop.is-visible { pointer-events: auto; }
    .app-main { margin-left: 0; }
    .app-content { padding: 20px 18px 44px; }
    .settings-directory { grid-template-columns: 1fr; }
    .lk-profile-card { grid-template-columns: 1fr; }
    .lk-card-grid--two { grid-template-columns: 1fr; }
    .lk-data-grid, .lk-score-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .lk-assessment-scores { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .approval-preview-meta { grid-template-columns: 1fr; }
    .approval-card__compact,
    .approval-inline-form { flex-direction: column; align-items: stretch; }
    .approval-budget-summary { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .app-content { padding: 14px 16px 40px; }
    .lk-panel, .lk-profile-card, .lk-preview-card { padding: 16px 14px; }
    .lk-data-grid, .lk-details-grid .lk-data-grid { grid-template-columns: 1fr; }
    .lk-score-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 8px;
    }
    .lk-score-grid__item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
    .lk-score-grid__item {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 10px 12px;
        gap: 10px;
    }
    .lk-score-grid__icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        flex-shrink: 0;
    }
    .lk-score-grid__icon img { width: 20px; height: 20px; }
    .lk-score-grid__item > div {
        display: flex;
        flex-direction: column;
    }
    .lk-score-grid strong { font-size: 1.1rem; }
    .lk-profile-card {
        display: grid;
        grid-template-columns: auto minmax(0,1fr);
        grid-template-rows: auto auto auto;
        column-gap: 14px;
        row-gap: 0;
    }
    .lk-profile-card .lk-profile-media {
        grid-column: 1;
        grid-row: 1;
        flex-direction: row;
        align-items: center;
    }
    .lk-profile-card .lk-profile-photo {
        width: 64px;
        height: 64px;
        flex-shrink: 0;
    }
    .lk-profile-card .lk-profile-photo span { font-size: 1.5rem; }
    .lk-profile-card .lk-qr-button { display: none; }
    .lk-profile-card .lk-profile-main {
        grid-column: 1 / -1;
        grid-row: 2;
        display: contents;
    }
    .lk-profile-card .lk-profile-title {
        grid-column: 2;
        grid-row: 1;
        flex-direction: row;
        align-items: center;
        margin-bottom: 14px;
        min-width: 0;
    }
    .lk-profile-card .lk-profile-title > div:first-child { min-width: 0; }
    .lk-profile-card .lk-profile-actions { width: auto; flex-shrink: 0; }
    .lk-profile-card .lk-profile-title h2 {
        font-size: var(--text-md);
        margin-bottom: 6px;
    }
    .lk-profile-card .lk-profile-tags span:nth-child(n+2) { display: none; }
    .lk-profile-card .lk-data-grid {
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: repeat(2, minmax(0,1fr));
        margin-top: 20px;
    }
    .lk-profile-card .lk-qr-button--mobile {
        grid-column: 1 / -1;
        grid-row: 3;
        display: flex;
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }
    .lk-profile-card .lk-profile-header-actions {
        grid-column: 1 / -1;
        grid-row: 4;
        margin-top: 12px;
    }
    .lk-profile-card .lk-details { grid-column: 1 / -1; grid-row: 5; }
    .lk-assessment-scores { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .lk-preview-card { grid-template-columns: 1fr; }
    .lk-event-card { grid-template-columns: 1fr; }
    .lk-event-card mark { justify-self: start; }
    .lk-profile-title, .lk-panel-head, .lk-page-title { flex-direction: column; align-items: flex-start; }
    .lk-profile-actions { width: 100%; }
    .push-permission-card { grid-template-columns: auto 1fr; }
    .push-permission-card .btn { grid-column: 1 / -1; width: 100%; }
    .push-permission-card__close { top: 8px; right: 8px; }
    .dashboard-notification-card { padding: 18px 16px; }
    .notification-toggle { align-items: flex-start; }
    .notification-preferences-table th:nth-child(2),
    .notification-preferences-table th:nth-child(3),
    .notification-preferences-table td:nth-child(2),
    .notification-preferences-table td:nth-child(3) { width: 120px; }
    .notifications-header { align-items: flex-start; }
    .notification-feed__item button { padding: 17px 42px 17px 15px; }
    .notification-feed__meta { flex-direction: column; gap: 0; }
    .landing-hero { grid-template-columns: 1fr; padding: 2rem; min-height: 480px; }
    .landing-band, .landing-band--reverse, .landing-directions, .landing-feature { grid-template-columns: 1fr; }
    .landing-quote { padding: 1.75rem 1.5rem; }
    .landing-feature__image { min-height: 240px; }
    .landing-band, .landing-feature__text { padding: 2rem 1.5rem; }
    .legal-page { width: min(980px, calc(100% - 24px)); padding: 16px 0 36px; }
    .legal-page__card { padding: 22px 18px; border-radius: 18px; }
    .legal-page__title { margin-bottom: 14px; }
    .event-meta-dl > div { grid-template-columns: 1fr; }
    .event-meta-dl dt {
        border-right: none;
        border-bottom: none;
        background: transparent;
        padding: 8px 12px 0;
        font-size: 0.78rem;
    }
    .event-meta-dl dd { padding: 2px 12px 8px; }
    .cookie-banner { left: 12px; right: 12px; bottom: 12px; }
    .cookie-banner__content { flex-direction: column; align-items: stretch; border-radius: 16px; padding: 14px; }
    .cookie-banner__form .btn { width: 100%; }
    .pub-header__inner { padding: 0 12px; min-height: 70px; }
    .pub-brand-text { font-size: 13px; }
    .pub-nav, .pub-header__actions { display: none; }
    .pub-burger { display: flex; }

    /* ── Auth pages ── */
    .auth-wrap {
        padding: 24px 0 80px;
        align-items: flex-start;
        background: #fff;
    }
    .auth-card {
        max-width: 100%;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 24px 20px 32px;
    }

    /* ── Form inputs: larger touch targets ── */
    .form-control, .form-select {
        min-height: 48px;
        font-size: 1rem;
    }
    .form-check-input {
        width: 20px;
        height: 20px;
        margin-top: 2px;
    }
    .form-check-label { font-size: 0.9375rem; }

    /* ── Buttons: full width in forms ── */
    .auth-card .btn,
    .auth-card .btn-lg { font-size: 1rem; min-height: 48px; }

    /* ── Tables without explicit wrapper: auto scroll ── */
    .table:not(.table-no-scroll) {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .participants-table-scroll > .table:not(.table-no-scroll) {
        display: table;
        overflow: visible;
        -webkit-overflow-scrolling: auto;
    }

    /* ── Scan page ── */
    #reader { max-width: 100% !important; }
    #scan-form .form-select { min-height: 48px; font-size: 1rem; }
    #scan-form .col-md-4 { margin-bottom: 4px; }

    /* ── Page headings with actions ── */
    .d-flex.justify-content-between.flex-wrap { gap: 10px; }
    .d-flex.justify-content-between.flex-wrap h3,
    .d-flex.justify-content-between.flex-wrap h4 { font-size: 1.15rem; }
}

/* Lift-on-hover: only for pointer devices, not touch */
@media not all and (hover: hover) and (pointer: fine) {
    .btn:hover,
    .lk-panel:hover,
    .lk-score-grid div:hover,
    .landing-hero__stats div:hover,
    .landing-directions article:hover,
    .pub-btn:hover,
    .page-link:hover,
    .brs-filter-actions button:hover,
    .profile-case-pagination__button:hover { transform: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =============================================
   MOBILE BOTTOM NAVIGATION
   ============================================= */
.mobile-bottom-nav {
    display: none;
}
.mbn-sheet-backdrop,
.mbn-sheet {
    display: none;
}

/* Hide topbar on desktop — sidebar replaces it */
@media (min-width: 1025px) {
    .app-topbar { display: none !important; }
}

@media (max-width: 1024px) {
    /* Hide old topbar burger — bottom nav replaces it */
    .app-topbar { display: none !important; }

    /* Extra padding so content doesn't hide behind bottom nav */
    .app-content { padding-bottom: 104px !important; }

    /* Bottom nav bar — floating pill */
    .mobile-bottom-nav {
        display: flex;
        align-items: stretch;
        position: fixed;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        left: 14px;
        right: 14px;
        z-index: 900;
        background: var(--sidebar-bg);
        border: 1px solid var(--sidebar-border);
        border-radius: 999px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
        height: 64px;
        max-width: 440px;
        margin: 0 auto;
        overflow: visible;
    }

    .mbn-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--sidebar-text);
        text-decoration: none;
        font-size: 0.68rem;
        font-weight: 500;
        letter-spacing: 0.01em;
        padding: 6px 2px 4px;
        border: none;
        background: transparent;
        cursor: pointer;
        transition: color 150ms, background 150ms;
        -webkit-tap-highlight-color: transparent;
        min-width: 48px;
        position: relative;
        white-space: nowrap;
    }

    .mobile-bottom-nav > .mbn-item:first-child,
    .mobile-bottom-nav > a.mbn-item:first-child {
        border-radius: 999px 0 0 999px;
    }
    .mobile-bottom-nav > .mbn-item:last-child,
    .mobile-bottom-nav > a.mbn-item:last-child,
    .mobile-bottom-nav > button.mbn-item:last-child {
        border-radius: 0 999px 999px 0;
    }

    .mbn-item i {
        font-size: 1.45rem;
        line-height: 1;
        transition: transform 120ms cubic-bezier(0.34,1.56,0.64,1);
    }

    .mbn-item span {
        display: none;
    }

    .mbn-item:hover,
    .mbn-item:focus-visible {
        color: var(--sidebar-text-hi);
        background: var(--sidebar-hover);
        outline: none;
    }

    .mbn-item:active i { transform: scale(0.88); }

    .mbn-item.is-active,
    .mbn-item.active {
        color: #fff;
    }

    .mbn-item.is-active i,
    .mbn-item.active i {
        color: var(--accent, #3573ce);
    }

    .mbn-item--more.is-open {
        color: var(--sidebar-text-hi);
    }

    .mbn-item--placeholder {
        flex: 1;
        pointer-events: none;
    }

    /* Центральная выделенная кнопка (QR / Личный состав) */
    .mbn-item--center {
        position: relative;
        flex: 1;
        background: transparent;
        border: none;
        padding: 6px 2px 4px;
        gap: 1px;
    }
    .mbn-item--center::before {
        content: "";
        position: absolute;
        top: -20px;
        left: 50%;
        transform: translateX(-50%);
        width: 62px;
        height: 62px;
        border-radius: 50%;
        background: var(--accent, #3573ce);
        border: 4px solid var(--sidebar-bg);
        box-shadow: 0 4px 14px rgba(0,0,0,0.28);
        transition: transform 150ms cubic-bezier(0.34,1.56,0.64,1);
    }
    .mbn-item--center i {
        position: absolute;
        top: 11px;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 1.35rem;
        color: #fff;
        line-height: 1;
    }
    .mbn-item--center span {
        display: none;
    }
    .mbn-item--center:hover,
    .mbn-item--center:focus-visible {
        background: transparent;
    }
    .mbn-item--center:active::before { transform: translateX(-50%) scale(0.92); }
    .mbn-item--center:active i { transform: none; }
    .mbn-item--center.is-active i,
    .mbn-item--center.active i {
        color: #fff;
    }
    .mbn-item--center.is-active span,
    .mbn-item--center.active span {
        color: var(--sidebar-text-hi);
    }

    /* Badge on «Ещё» button (inherited from approvals count) */
    .mbn-item .mbn-badge {
        position: absolute;
        top: 4px;
        right: calc(50% - 18px);
        background: var(--accent, #3573ce);
        color: #fff;
        font-size: 0.55rem;
        font-weight: 700;
        line-height: 1;
        padding: 2px 4px;
        border-radius: 99px;
        min-width: 14px;
        text-align: center;
    }

    /* ── Admin «more» sheet backdrop ── */
    .mbn-sheet-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(0,0,0,0.45);
        opacity: 0;
        transition: opacity 200ms;
    }
    .mbn-sheet-backdrop.is-visible {
        display: block;
        opacity: 1;
    }

    /* ── Admin «more» bottom sheet ── */
    .mbn-sheet {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        background: #0f2235;
        border-radius: 18px 18px 0 0;
        border-top: 1px solid var(--sidebar-border);
        padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        transform: translateY(100%);
        transition: transform 280ms cubic-bezier(0.32,0.72,0,1);
        will-change: transform;
    }
    .mbn-sheet.is-open {
        transform: translateY(0);
    }

    .mbn-sheet-handle {
        width: 36px;
        height: 4px;
        border-radius: 99px;
        background: rgba(255,255,255,0.18);
        margin: 0 auto 14px;
    }

    .mbn-sheet-title {
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--sidebar-text);
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 12px;
        padding: 0 4px;
    }

    .mbn-sheet-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .mbn-sheet-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 12px 6px 10px;
        border-radius: 12px;
        background: rgba(255,255,255,0.04);
        color: var(--sidebar-text-hi);
        text-decoration: none;
        font-size: 0.65rem;
        font-weight: 500;
        text-align: center;
        border: 1px solid rgba(255,255,255,0.06);
        transition: background 150ms, color 150ms;
        -webkit-tap-highlight-color: transparent;
        position: relative;
        cursor: pointer;
    }

    .mbn-sheet-item i {
        font-size: 1.25rem;
        line-height: 1;
    }

    .mbn-sheet-item:hover,
    .mbn-sheet-item:focus-visible {
        background: rgba(255,255,255,0.09);
        color: #fff;
        outline: none;
    }

    .mbn-sheet-item:active {
        transform: scale(0.95);
    }

    .mbn-sheet-item.is-active,
    .mbn-sheet-item.active {
        background: rgba(53,115,206,0.18);
        border-color: rgba(53,115,206,0.3);
        color: #fff;
    }

    .mbn-sheet-item--danger {
        color: rgba(239,68,68,0.75);
    }
    .mbn-sheet-item--danger:hover {
        background: rgba(239,68,68,0.1);
        color: #f87171;
    }

    .mbn-badge {
        position: absolute;
        top: 6px;
        right: 6px;
        background: var(--accent, #3573ce);
        color: #fff;
        font-size: 0.55rem;
        font-weight: 700;
        padding: 1px 4px;
        border-radius: 99px;
        min-width: 14px;
        text-align: center;
        line-height: 1.4;
    }
}

/* ── lk-event-card: мобильные карточки событий/активности ── */
.lk-event-cards-mobile {
    display: none;
}

.lk-event-card {
    display: block;
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    margin-bottom: 10px;
}
.lk-event-card:last-child { margin-bottom: 0; }

.lk-event-card__title {
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: 4px;
}

.lk-event-card__desc {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.45;
    margin-bottom: 8px;
}

.lk-event-card__role {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.lk-event-card__date {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    white-space: nowrap;
}

.lk-event-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lk-event-card__row + .lk-event-card__row {
    margin-top: 6px;
}

.lk-event-card__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.lk-event-card__chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 99px;
    border: 1px solid transparent;
    font-size: var(--text-xs);
    font-weight: 700;
    white-space: nowrap;
}

.lk-event-card__chip--muted {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(53, 115, 206, 0.18);
}

.lk-event-card__chip--status {
    background: var(--status-recruiting-bg);
    color: var(--status-recruiting-color);
    border-color: var(--status-recruiting-border);
}

.lk-event-card__chip--active {
    background: var(--status-full-bg);
    color: var(--status-full-color);
    border-color: var(--status-full-border);
}

.lk-event-card__chip--completed {
    background: rgba(100, 116, 139, 0.12);
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.24);
}

.lk-event-card__chip--points {
    background: var(--status-full-bg);
    color: var(--status-full-color);
    border-color: var(--status-full-border);
}

@media (max-width: 640px) {
    .lk-event-cards-mobile {
        display: block;
    }
    .lk-event-cards-mobile ~ .lk-activity-table,
    .lk-activity-table.lk-activity-table--has-mobile-cards,
    .lk-list.lk-list--has-mobile-cards,
    .lk-events-table-wrap.lk-events-table-wrap--has-mobile-cards {
        display: none;
    }
}

/* ── exp-activity: блок "Экспедиционная деятельность" ── */
.exp-activity-year-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.exp-activity-year-picker {
    position: relative;
}

.exp-activity-year-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--primary, #1a56db);
    background: #eef3fc;
    color: var(--primary, #1a56db);
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--dur-fast);
    white-space: nowrap;
}
.exp-activity-year-btn:hover { background: #dce8fb; }
.exp-activity-year-btn__arrow {
    font-size: 11px;
    transition: transform 0.15s;
}
.exp-activity-year-btn.open .exp-activity-year-btn__arrow { transform: rotate(180deg); }

.exp-activity-year-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    padding: 4px;
    z-index: 100;
    min-width: 100px;
}
.exp-activity-year-option {
    display: block;
    width: 100%;
    padding: 8px 16px;
    text-align: left;
    background: none;
    border: none;
    border-radius: 7px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}
.exp-activity-year-option:hover { background: rgba(15,23,42,0.05); }
.exp-activity-year-option.active { color: var(--primary, #1a56db); background: #eef3fc; }

.exp-activity-stats__text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--surface-alt, #f1f5f9);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    white-space: nowrap;
}

.exp-activity-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
@media (max-width: 767px) {
    .exp-activity-cols { grid-template-columns: 1fr; }
}

.exp-activity-col {
    background: var(--surface-alt, #f8fafc);
    border-radius: 12px;
    padding: 16px;
}
.exp-activity-col__head {
    display: flex;
    align-items: center;
    gap: 8px;
}
.exp-activity-col__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #dce8fb;
    color: var(--primary, #1a56db);
    font-size: 15px;
    flex-shrink: 0;
}
.exp-activity-col__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    flex: 1;
}
.exp-activity-col__arrow {
    font-size: 12px;
    color: var(--primary, #1a56db);
}
.exp-activity-col__divider {
    margin: 10px 0;
    border-color: var(--card-border, #e2e8f0);
}
.exp-activity-list {
    margin: 0;
    padding-left: 16px;
    font-size: var(--text-sm);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.exp-activity-list .text-muted { font-size: 0.8em; }
.exp-activity-nets-hours {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 0;
    text-align: center;
}
.exp-activity-nets-hours__icon {
    font-size: 2rem;
    color: var(--primary, #1a56db);
}
.exp-activity-nets-hours__value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary, #1a56db);
    line-height: 1;
}
.exp-activity-nets-hours__label {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* =============================================
   AFISHA — FEATURED CAROUSEL
   ============================================= */
.afisha-featured__title {
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: 12px;
}

.afisha-featured__viewport {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.afisha-featured__track {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(3, auto);
    grid-auto-columns: 240px;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    padding: 12px 12px 18px;
    margin: -12px -12px -18px;
    flex: 1 1 auto;
    scrollbar-width: none;
}
.afisha-featured__track::-webkit-scrollbar { display: none; }

.afisha-featured__nav {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.afisha-featured__nav:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.afisha-featured-card {
    width: 100%;
    min-width: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    text-decoration: none;
    color: inherit;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.afisha-featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.afisha-featured-card__cover {
    aspect-ratio: 16 / 9;
    background: var(--surface-soft);
    overflow: hidden;
}
.afisha-featured-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.afisha-featured-card__cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--text-muted);
}

.afisha-featured-card__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.afisha-featured-card__type {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
}

.afisha-featured-card__title {
    font-size: var(--text-sm);
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.afisha-featured-card__date {
    font-size: var(--text-xs);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 640px) {
    .afisha-featured__track {
        grid-template-rows: repeat(3, auto);
        grid-auto-columns: 200px;
    }
}

/* =============================================
   AFISHA — NETS COMPACT SCHEDULE
   ============================================= */
.afisha-nets__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: 12px;
}
.afisha-nets__title img {
    width: 28px;
    height: 28px;
}

.afisha-nets__track {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto);
    grid-auto-columns: calc((100% - 42px) / 4);
    gap: 10px 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.afisha-nets__track::-webkit-scrollbar { display: none; }

.afisha-nets-card {
    grid-row: span 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 14px 18px 14px 22px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(53, 115, 206, 0.06), var(--card-bg) 55%);
    border: 1px solid var(--card-border);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast);
}
.afisha-nets-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    border-radius: 999px 0 0 999px;
}
.afisha-nets-card:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 16px rgba(53, 115, 206, 0.16);
    transform: translateY(-1px);
}

.afisha-nets-card__date {
    font-size: var(--text-sm);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    white-space: nowrap;
}

.afisha-nets-card__time {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

@media (min-width: 641px) and (max-width: 991px) {
    .afisha-nets__track {
        grid-auto-columns: calc((100% - 28px) / 3);
    }
}

@media (max-width: 640px) {
    .afisha-nets__track {
        display: grid;
        grid-auto-flow: row;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        grid-auto-columns: unset;
        overflow-x: visible;
        gap: 8px;
    }
    .afisha-nets-card {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2px;
        padding: 10px 12px 10px 16px;
        border-radius: 12px;
    }
    .afisha-nets-card::before { width: 3px; }
    .afisha-nets-card__date { font-size: var(--text-xs); }
    .afisha-nets-card__time { font-size: var(--text-xs); }
}

/* =============================================
   AFISHA — FILTER BAR & CARD
   ============================================= */
/* ── afisha topbar ── */
.afisha-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.afisha-topbar__title { flex: 0 0 auto; margin-right: auto; }
.afisha-topbar__controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.afisha-topbar__search {
    position: relative;
    display: flex;
    align-items: center;
}
.afisha-topbar__search-icon {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}
.afisha-topbar__search-input {
    padding: 8px 14px 8px 32px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    font-size: var(--text-sm);
    color: var(--text-primary);
    outline: none;
    width: 200px;
    transition: border-color var(--dur-fast);
}
.afisha-topbar__search-input:focus { border-color: var(--accent); }
@media (max-width: 576px) {
    .afisha-topbar { flex-direction: column; align-items: stretch; }
    .afisha-topbar__title { margin-right: 0; }
    .afisha-topbar__controls { justify-content: flex-start; }
    .afisha-topbar__search-input { width: 100%; }
}
.afisha-topbar__filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: border-color var(--dur-fast), color var(--dur-fast);
    white-space: nowrap;
}
.afisha-topbar__filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.afisha-topbar__filter-badge {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
}
.afisha-topbar__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 15px;
    text-decoration: none;
    transition: color var(--dur-fast), border-color var(--dur-fast);
}
.afisha-topbar__reset:hover { color: var(--accent); border-color: var(--accent); }

.afisha-filter-modal {
    position: fixed;
    inset: 0;
    z-index: var(--layer-modal);
    display: flex;
    justify-content: flex-end;
    isolation: isolate;
}

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

body.afisha-filter-modal-open {
    overflow: hidden;
}

.afisha-filter-modal__overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(12, 30, 48, 0.45);
}

.afisha-filter-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    height: 100%;
    background: var(--card-bg);
    box-shadow: var(--card-shadow-hover);
    display: flex;
    flex-direction: column;
    animation: afisha-filter-slide-in var(--dur-slow) var(--ease-out);
}

@keyframes afisha-filter-slide-in {
    from { transform: translateX(24px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.afisha-filter-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--card-border);
}

.afisha-filter-modal__close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}
.afisha-filter-modal__close:hover { background: rgba(15, 23, 42, 0.06); }

.afisha-filter-modal__body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.afisha-filter-field__label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.afisha-date-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.afisha-date-range__field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.afisha-date-range__field > span {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
}

@media (max-width: 380px) {
    .afisha-date-range { grid-template-columns: 1fr; }
}

.afisha-filter-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}
.afisha-filter-modal__actions .btn { flex: 1 1 0; }

@media (max-width: 640px) {
    .afisha-filter-modal__panel { max-width: 100%; }
}

/* Card */
.afisha-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    color: var(--text-primary);
    transition: box-shadow var(--dur-base), transform var(--dur-base);
}
.afisha-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.afisha-card__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--page-bg);
    overflow: hidden;
}
.afisha-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.afisha-card__cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.afisha-card__type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
}
.afisha-card__type-badge img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.afisha-card__type-badge--nets             { background: var(--teal); }
.afisha-card__type-badge--solba            { background: var(--status-recruiting-color); }
.afisha-card__type-badge--expedition       { background: var(--accent); }
.afisha-card__type-badge--activity         { background: var(--status-unfilled-color); }
.afisha-card__type-badge--special_training { background: var(--status-reporting-color); }

.afisha-card__tags {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.afisha-card__tags-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.afisha-card__tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-primary);
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}
.afisha-card__tag i {
    font-size: 0.85em;
    line-height: 1;
}
.afisha-card__tag--extra {
    color: #fff;
    background: var(--accent);
}
.afisha-card__tag--preliminary {
    color: #7a4f00;
    background: #fff3cd;
}

.afisha-card__body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.afisha-card__title {
    font-size: var(--text-sm);
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.afisha-card__annotation {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0 0 8px;
    flex: 1 1 auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.afisha-card__location {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 6px;
}

.afisha-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
}

.afisha-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--text-md);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.015em;
}

.afisha-section-title::after {
    content: "";
    flex: 1 1 auto;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.35), rgba(59, 130, 246, 0));
}

/* =============================================
   EVENT FORM — TAG ICON PICKER
   ============================================= */
.event-tag-icon-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
    max-width: 320px;
}

.event-tag-icon-option {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
}
.event-tag-icon-option:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.event-tag-icon-option.is-selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

@media (max-width: 480px) {
    .event-tag-icon-grid { grid-template-columns: repeat(5, 1fr); max-width: 100%; }
}

/* Afisha filter switch */
.afisha-filter-field--switch {
    display: flex;
}

.afisha-filter-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.afisha-filter-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.afisha-filter-switch__track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.16);
    transition: background var(--dur-fast);
    flex-shrink: 0;
}
.afisha-filter-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
    transition: transform var(--dur-fast);
}
.afisha-filter-switch input:checked + .afisha-filter-switch__track {
    background: var(--accent);
}
.afisha-filter-switch input:checked + .afisha-filter-switch__track::after {
    transform: translateX(18px);
}

.afisha-filter-switch__label {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 600;
}

.afisha-filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 2px;
}

.afisha-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.afisha-filter-checkbox input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--accent);
}

/* ── Full moderation block ── */
.lk-full-moderation-block {
    text-align: center;
    padding: 48px 24px;
    max-width: 520px;
    margin: 40px auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}
.lk-full-moderation-block__icon {
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.7;
    margin-bottom: 16px;
}
.lk-full-moderation-block h4 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: 12px;
}
.lk-full-moderation-block p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Django form error lists (non_field_errors, field.errors) — red, no default bullets */
.errorlist {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    color: #dc3545;
    font-size: 0.875rem;
}
.errorlist li {
    color: #dc3545;
}

/* Reporting receipts — styled choose-file button + current-PDF pill */
[data-role="reporting-table"] .report-receipt-cell {
    display: flex;
    align-items: center;
}
[data-role="reporting-table"] .report-receipt-choose {
    font-size: 0.82rem;
}
[data-role="reporting-table"] .report-receipt-current {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px 3px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
}
[data-role="reporting-table"] .report-receipt-current a {
    color: var(--accent);
    text-decoration: none;
}
[data-role="reporting-table"] .report-receipt-current a:hover {
    text-decoration: underline;
}
[data-role="reporting-table"] .report-receipt-current i.bi-file-earmark-pdf-fill {
    font-size: 0.85rem;
}
[data-role="reporting-table"] .report-receipt-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--accent);
    font-size: 0.68rem;
    cursor: pointer;
    transition: background 120ms, color 120ms;
}
[data-role="reporting-table"] .report-receipt-remove:hover {
    background: var(--accent-medium);
    color: var(--accent-dim);
}
