/* Gwarantuje że [hidden] zawsze ukrywa element niezależnie od display CSS */
[hidden] { display: none !important; }

/* =========================================================
   LifeCenter OS – Design Tokens (odwzorowanie z React app)
   ========================================================= */
:root {
    --lc-font:          'Inter', 'Geist', system-ui, -apple-system, sans-serif;

    /* Kolory ogólne */
    --lc-bg:            oklch(0.984 0.003 247.858);
    --lc-fg:            oklch(0.208 0.042 265.755);
    --lc-primary:       oklch(0.511 0.262 264.352);
    --lc-primary-hex:   #6366f1;
    --lc-radius:        0.75rem;

    /* Sidebar */
    --lc-sidebar-bg:    oklch(0.208 0.042 265.755);
    --lc-sidebar-fg:    oklch(0.708 0 0);
    --lc-sidebar-border:oklch(1 0 0 / 10%);
    --lc-sidebar-accent:oklch(1 0 0 / 5%);
    --lc-sidebar-width: 256px;
    --lc-sidebar-width-collapsed: 80px;
    --lc-transition:    200ms ease;
}

/* =========================================================
   Reset / Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--lc-font);
    background: var(--lc-bg);
    color: var(--lc-fg);
    display: flex;
    min-height: 100vh;
}

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

/* =========================================================
   Layout
   ========================================================= */
#lc-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

#lc-main {
    flex: 1;
    overflow: auto;
    transition: margin-left var(--lc-transition);
}

/* =========================================================
   Sidebar
   ========================================================= */
#lc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--lc-sidebar-width);
    background: var(--lc-sidebar-bg);
    border-right: 1px solid var(--lc-sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--lc-transition);
    overflow: hidden;
}

#lc-sidebar.collapsed {
    width: var(--lc-sidebar-width-collapsed);
}

body.sidebar-open #lc-main,
html[data-lc-sidebar="sidebar-open"] #lc-main   { margin-left: var(--lc-sidebar-width); }

body.sidebar-collapsed #lc-main,
html[data-lc-sidebar="sidebar-collapsed"] #lc-main { margin-left: var(--lc-sidebar-width-collapsed); }

/* ---------- Header / Logo ---------- */
.lc-sidebar-header {
    padding: 1.5rem 1rem;
    flex-shrink: 0;
    overflow: hidden;
}

#lc-sidebar.collapsed .lc-sidebar-header {
    display: flex;
    justify-content: center;
    padding: 1.25rem 0;
}

.lc-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    min-width: 0;
}

/* Pełne logo (PNG) — widoczne gdy sidebar rozwinięty */
.lc-logo-full {
    display: block;
    height: 75px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    object-position: left center;
    opacity: 1;
    transition: opacity var(--lc-transition), max-width var(--lc-transition);
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

#lc-sidebar.collapsed .lc-logo-full {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
}

/* Ikona — widoczna tylko w trybie collapsed */
.lc-logo-collapsed {
    display: block;
    width: 0;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity var(--lc-transition), width var(--lc-transition);
    filter: brightness(0) invert(1);
}

#lc-sidebar.collapsed .lc-logo-collapsed {
    opacity: 1;
    width: 40px;
}

/* ---------- Nav content ---------- */
.lc-sidebar-content {
    flex: 1;
    padding: 0 1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.lc-nav-group {
    margin-bottom: 1.5rem;
}

.lc-nav-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: oklch(0.708 0 0 / 50%);
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--lc-transition);
}

#lc-sidebar.collapsed .lc-nav-label {
    opacity: 0;
}

.lc-nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* ---------- Menu item ---------- */
.lc-nav-item {}

.lc-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--lc-radius);
    color: var(--lc-sidebar-fg);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--lc-transition), background var(--lc-transition);
    white-space: nowrap;
    position: relative;
}

.lc-nav-link:hover {
    color: #fff;
    background: var(--lc-sidebar-accent);
}

/* Active state – left border accent (jak w React) */
.lc-nav-link.active {
    color: var(--lc-primary-hex);
    background: oklch(0.511 0.262 264.352 / 10%);
    border-left: 2px solid var(--lc-primary-hex);
    border-radius: 0 var(--lc-radius) var(--lc-radius) 0;
    margin-left: -1rem;
    padding-left: calc(0.75rem + 14px);
}

/* Ikona SVG */
.lc-nav-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: color var(--lc-transition);
}

.lc-nav-link-text {
    opacity: 1;
    transition: opacity var(--lc-transition);
}

#lc-sidebar.collapsed .lc-nav-link-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Tooltip w trybie collapsed */
#lc-sidebar.collapsed .lc-nav-link {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    margin-left: 0;
    border-left: none;
    border-radius: var(--lc-radius);
}

#lc-sidebar.collapsed .lc-nav-link.active {
    background: oklch(0.511 0.262 264.352 / 10%);
    color: var(--lc-primary-hex);
}

.lc-nav-link[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 0.75rem);
    top: 50%;
    transform: translateY(-50%);
    background: #1e2135;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 150ms ease;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#lc-sidebar.collapsed .lc-nav-link:hover[data-tooltip]::after {
    opacity: 1;
}

/* ---------- User profile (footer) ---------- */
.lc-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--lc-sidebar-border);
    flex-shrink: 0;
}

.lc-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: oklch(1 0 0 / 5%);
    padding: 0.75rem;
    border-radius: var(--lc-radius);
    overflow: hidden;
}

.lc-user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: oklch(0.511 0.262 264.352 / 40%);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lc-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.lc-user-info {
    overflow: hidden;
    transition: opacity var(--lc-transition), width var(--lc-transition);
}

.lc-user-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-user-role {
    font-size: 0.625rem;
    color: oklch(0.708 0 0 / 50%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#lc-sidebar.collapsed .lc-user-info {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

#lc-sidebar.collapsed .lc-user-card {
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
}

.lc-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
    flex-shrink: 0;
    color: oklch(0.708 0 0 / 40%);
    text-decoration: none;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 600;
    transition: color 150ms, background 150ms;
    white-space: nowrap;
}

.lc-logout-btn:hover {
    color: #f43f5e;
    background: oklch(1 0 0 / 6%);
}

.lc-logout-btn__text {
    transition: opacity var(--lc-transition), width var(--lc-transition);
}

#lc-sidebar.collapsed .lc-logout-btn__text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

#lc-sidebar.collapsed .lc-version-badge {
    display: none;
}

#lc-sidebar.collapsed .lc-sidebar-footer {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

/* ---------- Toggle button ---------- */
.lc-sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: calc(var(--lc-sidebar-width) - 0.875rem);
    width: 1.75rem;
    height: 1.75rem;
    background: var(--lc-sidebar-bg);
    border: 1px solid var(--lc-sidebar-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    transition: left var(--lc-transition), background var(--lc-transition);
    color: var(--lc-sidebar-fg);
}

.lc-sidebar-toggle:hover {
    background: oklch(0.511 0.262 264.352 / 15%);
    color: #fff;
}

.lc-sidebar-toggle svg {
    width: 0.875rem;
    height: 0.875rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--lc-transition);
}

body.sidebar-collapsed .lc-sidebar-toggle {
    left: calc(var(--lc-sidebar-width-collapsed) - 0.875rem);
}

body.sidebar-collapsed .lc-sidebar-toggle svg {
    transform: rotate(180deg);
}

/* =========================================================
   Mobile – hamburger
   ========================================================= */
#lc-mobile-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 150;
    height: 3.5rem;
    background: var(--lc-sidebar-bg);
    border-bottom: 1px solid var(--lc-sidebar-border);
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
}

.lc-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--lc-sidebar-fg);
    display: flex;
    align-items: center;
}

.lc-hamburger svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lc-mobile-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.lc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
}

@media (max-width: 1023px) {
    #lc-mobile-bar { display: flex; }
    #lc-main { margin-left: 0 !important; padding-top: 3.5rem; }

    #lc-sidebar {
        transform: translateX(-100%);
        transition: transform var(--lc-transition), width var(--lc-transition);
        width: var(--lc-sidebar-width) !important;
    }

    #lc-sidebar.mobile-open {
        transform: translateX(0);
    }

    body.sidebar-open #lc-main,
    body.sidebar-collapsed #lc-main {
        margin-left: 0;
    }

    .lc-sidebar-toggle { display: none; }

    .lc-overlay.visible { display: block; }
}

/* =========================================================
   Scrollbar sidebar
   ========================================================= */
.lc-sidebar-content::-webkit-scrollbar { width: 4px; }
.lc-sidebar-content::-webkit-scrollbar-track { background: transparent; }
.lc-sidebar-content::-webkit-scrollbar-thumb {
    background: oklch(1 0 0 / 15%);
    border-radius: 2px;
}

/* =========================================================
   Sekcje / layout strony
   ========================================================= */
.lc-section {
    padding: 2rem;
    max-width: 1200px;
}

/* =========================================================
   Page Header
   ========================================================= */
.lc-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.lc-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lc-fg);
    line-height: 1.2;
}

.lc-page-subtitle {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.lc-page-header__actions {
    flex-shrink: 0;
}

/* =========================================================
   Buttons
   ========================================================= */
.lc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: var(--lc-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: opacity 150ms ease, background 150ms ease;
    text-decoration: none;
}

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

.lc-btn--primary:hover { opacity: 0.88; }

/* =========================================================
   Dashboard – karty statystyk
   ========================================================= */
.lc-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.lc-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--lc-radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lc-card__header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.5rem;
}

.lc-card__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lc-card__icon svg {
    width: 1rem;
    height: 1rem;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lc-card__icon--primary { background: var(--lc-primary); }
.lc-card__icon--violet  { background: #7c3aed; }
.lc-card__icon--amber   { background: #d97706; }
.lc-card__icon--green   { background: #059669; }

.lc-card__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
}

.lc-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--lc-fg);
    line-height: 1;
}

.lc-card__desc {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* =========================================================
   Panel (lista na dashboardzie)
   ========================================================= */
.lc-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--lc-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.lc-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.lc-panel__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--lc-fg);
}

.lc-link-muted {
    font-size: 0.8125rem;
    color: var(--lc-primary-hex);
    text-decoration: none;
}

.lc-link-muted:hover { text-decoration: underline; }

/* Lista pozycji */
.lc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.lc-list__item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.lc-list__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--lc-primary-hex);
    flex-shrink: 0;
}

.lc-list__dot--violet { background: #7c3aed; }

.lc-list__link {
    flex: 1;
    font-size: 0.875rem;
    color: var(--lc-fg);
}

.lc-list__link:hover { color: var(--lc-primary-hex); }

.lc-list__meta {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* =========================================================
   Zadania – lista archiwum
   ========================================================= */
.lc-task-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lc-task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--lc-radius);
    padding: 0.875rem 1rem;
    transition: border-color 150ms ease;
}

.lc-task-item:hover { border-color: var(--lc-primary-hex); }

.lc-task-item__check {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    color: #9ca3af;
}

.lc-task-item__check svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lc-task-item__body { flex: 1; }

.lc-task-item__title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--lc-fg);
}

.lc-task-item__title:hover { color: var(--lc-primary-hex); }

.lc-task-item__excerpt {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.lc-task-item__date {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* =========================================================
   Projekty – siatka kart
   ========================================================= */
.lc-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.lc-project-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--lc-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 150ms ease;
}

.lc-project-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.lc-project-card__thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.lc-project-card__body {
    padding: 1.125rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lc-project-card__title a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--lc-fg);
}

.lc-project-card__title a:hover { color: var(--lc-primary-hex); }

.lc-project-card__excerpt {
    font-size: 0.8125rem;
    color: #6b7280;
    flex: 1;
}

.lc-project-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.lc-project-card__date {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* =========================================================
   Notatki – siatka kart
   ========================================================= */
.lc-notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.lc-note-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--lc-radius);
    padding: 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    transition: box-shadow 150ms ease;
}

.lc-note-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.lc-note-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.lc-note-card__title a {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--lc-fg);
    line-height: 1.3;
}

.lc-note-card__title a:hover { color: var(--lc-primary-hex); }

.lc-note-card__date {
    font-size: 0.6875rem;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

.lc-note-card__excerpt {
    font-size: 0.8125rem;
    color: #6b7280;
    flex: 1;
}

.lc-note-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lc-tag {
    font-size: 0.6875rem;
    font-weight: 500;
    background: oklch(0.511 0.262 264.352 / 8%);
    color: var(--lc-primary-hex);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
}

.lc-note-card__link {
    font-size: 0.8125rem;
    color: var(--lc-primary-hex);
    margin-left: auto;
}

/* =========================================================
   Kalendarz
   ========================================================= */
.lc-calendar-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--lc-radius);
    padding: 1.5rem;
    max-width: 600px;
}

.lc-cal__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.lc-cal__heading {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--lc-fg);
}

.lc-cal__nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--lc-radius);
    color: #6b7280;
    transition: background 150ms ease, color 150ms ease;
}

.lc-cal__nav-btn:hover {
    background: #f3f4f6;
    color: var(--lc-fg);
}

.lc-cal__nav-btn svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lc-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.lc-cal__weekday {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #9ca3af;
    text-align: center;
    padding: 0.25rem 0;
}

.lc-cal__day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--lc-fg);
    cursor: default;
    transition: background 150ms ease;
}

.lc-cal__day:not(.lc-cal__day--empty):hover { background: #f3f4f6; }

.lc-cal__day--empty { background: transparent; }

.lc-cal__day--today {
    background: var(--lc-primary);
    color: #fff;
    font-weight: 700;
}

.lc-cal__day--today:hover { background: var(--lc-primary); }

/* =========================================================
   Empty state
   ========================================================= */
.lc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem 1.5rem;
    text-align: center;
    color: #6b7280;
}

.lc-empty-state__icon {
    width: 3rem;
    height: 3rem;
    stroke: #d1d5db;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lc-empty { color: #6b7280; font-size: 0.875rem; }
.lc-empty a { color: var(--lc-primary-hex); }

/* =========================================================
   Version badge (sidebar footer)
   ========================================================= */
.lc-version-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.625rem;
    padding: 0 0.25rem;
    opacity: 1;
    transition: opacity var(--lc-transition);
}

#lc-sidebar.collapsed .lc-version-badge {
    opacity: 0;
    pointer-events: none;
}

.lc-version-badge__dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: oklch(0.511 0.262 264.352);
    flex-shrink: 0;
    box-shadow: 0 0 6px oklch(0.511 0.262 264.352 / 60%);
    animation: lc-pulse 2.5s ease-in-out infinite;
}

@keyframes lc-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.lc-version-badge__text {
    font-size: 0.625rem;
    font-weight: 700;
    color: oklch(0.511 0.262 264.352);
    letter-spacing: 0.03em;
    font-family: ui-monospace, 'Cascadia Code', monospace;
}

.lc-version-badge__label {
    font-size: 0.5625rem;
    color: oklch(0.708 0 0 / 35%);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* =========================================================
   Changelog
   ========================================================= */
.lc-changelog {
    max-width: 720px;
    padding: 2rem 2.5rem;
}

.lc-changelog__current-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 1rem;
    background: #ede9fe;
    color: #4f46e5;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    border: 1.5px solid #c4b5fd;
    flex-shrink: 0;
    align-self: flex-start;
}

.lc-changelog__timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 2rem;
    position: relative;
}

.lc-changelog__timeline::before {
    content: '';
    position: absolute;
    left: 88px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.lc-changelog__entry {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 2rem;
    position: relative;
}

.lc-changelog__entry::before {
    content: '';
    position: absolute;
    left: 82px;
    top: 0.875rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 2px solid #fff;
    z-index: 1;
}

.lc-changelog__entry--latest::before {
    background: #6366f1;
    box-shadow: 0 0 0 4px #ede9fe;
}

.lc-changelog__meta {
    width: 80px;
    flex-shrink: 0;
    text-align: right;
    padding-top: 0.75rem;
}

.lc-changelog__version {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6366f1;
    font-family: ui-monospace, 'Cascadia Code', monospace;
}

.lc-changelog__date {
    display: block;
    font-size: 0.6875rem;
    color: #94a3b8;
    margin-top: 0.125rem;
    white-space: nowrap;
}

.lc-changelog__card {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    position: relative;
    margin-left: 0.75rem;
}

.lc-changelog__entry--latest .lc-changelog__card {
    border-color: #c4b5fd;
    box-shadow: 0 4px 16px rgba(99,102,241,0.08);
}

.lc-changelog__latest-tag {
    display: inline-block;
    background: #ede9fe;
    color: #4f46e5;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.lc-changelog__label {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.875rem;
}

.lc-changelog__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0;
    margin: 0;
}

.lc-changelog__list li {
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.55;
    padding-left: 1.25rem;
    position: relative;
}

.lc-changelog__list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #c4b5fd;
    font-size: 0.75rem;
}

/* =========================================================
   Modale — globalne (wszystkie moduły)
   ========================================================= */
.lc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

.lc-modal-overlay--visible {
    opacity: 1;
    pointer-events: all;
}

.lc-modal {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    width: 100%;
    max-width: 28rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(8px) scale(0.98);
    transition: transform 200ms ease;
}

.lc-modal-overlay--visible .lc-modal {
    transform: translateY(0) scale(1);
}

.lc-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.lc-modal__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.lc-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: background 150ms, color 150ms;
}

.lc-modal__close:hover {
    background: #f1f5f9;
    color: #475569;
}

.lc-modal__body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lc-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.lc-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.lc-field__label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
}

.lc-field__input,
.lc-field__select,
.lc-field__textarea {
    padding: 0 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color 150ms, box-shadow 150ms;
    font-family: inherit;
    width: 100%;
}

.lc-field__input,
.lc-field__select {
    height: 2.5rem;
}

.lc-field__textarea {
    min-height: 4.5rem;
    padding: 0.625rem 0.75rem;
    resize: vertical;
}

.lc-field__input:focus,
.lc-field__select:focus,
.lc-field__textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* =========================================================
   Mobile — globalne (< 768px)
   ========================================================= */
@media (max-width: 767px) {
    .lc-section {
        padding: 1rem;
    }

    .lc-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .lc-page-title {
        font-size: 1.375rem;
    }

    /* Modalne — pełna wysokość ekranu na małych urządzeniach */
    .lc-modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .lc-modal {
        border-radius: 1rem 1rem 0 0 !important;
        max-height: 92dvh !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .lc-modal__body {
        overflow-y: auto !important;
        flex: 1 !important;
    }

    .lc-modal__footer {
        flex-wrap: wrap;
    }
}
