/* =========================================================
   Projekty — LifeCenter OS
   ========================================================= */

.lc-projects {
    background: #f8fafc;
    min-height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 80rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .lc-projects { padding: 2rem; }
}

/* =========================================================
   Header
   ========================================================= */
.lc-projects__header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

@media (min-width: 768px) {
    .lc-projects__header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.lc-projects__title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    color: #1e293b;
    margin: 0;
}

.lc-projects__subtitle {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: #64748b;
    margin: 0.25rem 0 0;
}

.lc-btn--lg {
    height: 2.75rem;
    padding: 0 1.5rem;
    font-size: 0.9375rem;
}

/* =========================================================
   Grid
   ========================================================= */
.lc-projects__grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .lc-projects__grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Project card
   ========================================================= */
.lc-proj-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 200ms, transform 200ms;
}

.lc-proj-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,.1);
    transform: translateY(-4px);
}

/* Kolorowy pasek na górze */
.lc-proj-card__bar {
    height: 0.5rem;
    width: 100%;
    flex-shrink: 0;
}

/* Card header */
.lc-proj-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 2rem 2rem 1rem;
    gap: 1rem;
}

.lc-proj-card__header-left {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

/* Status badge */
.lc-proj-status {
    display: inline-block;
    font-size: 0.5625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    line-height: 1.25rem;
    width: fit-content;
}

.lc-proj-card__title {
    font-size: 1.375rem;
    font-weight: 900;
    color: #1e293b;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

.lc-proj-card__desc {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    max-width: 28rem;
}

.lc-proj-card__more {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Card body */
.lc-proj-card__body {
    padding: 1rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

/* Pożądany rezultat */
.lc-proj-outcome {
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    background: #faf5ff;
    border-left: 3px solid #a855f7;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
}
.lc-proj-outcome__label {
    font-weight: 700;
    color: #7c3aed;
    white-space: nowrap;
    flex-shrink: 0;
}
.lc-proj-outcome__text {
    color: #374151;
    line-height: 1.5;
}

/* Następne działanie */
.lc-proj-next-action {
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
}
.lc-proj-next-action--empty {
    background: #f8fafc;
    border-left-color: #cbd5e1;
}
.lc-proj-next-action__label {
    font-weight: 700;
    color: #d97706;
    white-space: nowrap;
    flex-shrink: 0;
}
.lc-proj-next-action--empty .lc-proj-next-action__label { color: #94a3b8; }
.lc-proj-next-action__text {
    color: #374151;
    line-height: 1.5;
}
.lc-proj-next-action--empty .lc-proj-next-action__text { color: #94a3b8; font-style: italic; }

/* Termin w stopce karty */
.lc-proj-deadline-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #64748b;
}
.lc-proj-deadline-row strong { color: #1e293b; }

/* Progress */
.lc-proj-progress {}

.lc-proj-progress__labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.6875rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 0.625rem;
}

.lc-proj-progress__pct { color: #4f46e5; }

.lc-proj-progress__track {
    height: 0.625rem;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}

.lc-proj-progress__fill {
    height: 100%;
    background: #4f46e5;
    border-radius: 9999px;
    transition: width 600ms ease;
}

/* Stats */
.lc-proj-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.lc-proj-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 1rem;
    padding: 1rem;
}

.lc-proj-stat__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lc-proj-stat__icon--indigo { background: #4f46e5; }
.lc-proj-stat__icon--rose   { background: #f43f5e; }

.lc-proj-stat__label {
    font-size: 0.5625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin: 0 0 0.125rem;
}

.lc-proj-stat__value {
    font-size: 0.875rem;
    font-weight: 900;
    color: #1e293b;
    margin: 0;
}

/* Card footer */
.lc-proj-card__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
}

/* Three-dot dropdown */
.lc-proj-card__actions {
    position: relative;
    flex-shrink: 0;
}

.lc-proj-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    min-width: 11rem;
    z-index: 50;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 150ms, transform 150ms;
}

.lc-proj-dropdown--open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.lc-proj-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background 100ms;
    white-space: nowrap;
}

.lc-proj-dropdown__item:hover { background: #f8fafc; }
.lc-proj-dropdown__item + .lc-proj-dropdown__item { border-top: 1px solid #f1f5f9; }

.lc-proj-dropdown__item svg {
    flex-shrink: 0;
    stroke: #64748b;
}

/* Small button variant */
.lc-btn--sm {
    height: 2rem;
    padding: 0 0.875rem;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
}

/* Szczegóły button (legacy — still used in details modal) */
.lc-proj-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4f46e5;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    transition: background 150ms;
    font-family: inherit;
}

.lc-proj-details-btn:hover { background: #eef2ff; }

/* =========================================================
   Empty state
   ========================================================= */
.lc-projects__empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 5rem 1.5rem;
    border: 2px dashed #e2e8f0;
    border-radius: 0.75rem;
    text-align: center;
    color: #94a3b8;
}

.lc-projects__empty-icon {
    width: 4rem;
    height: 4rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lc-projects__empty-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    stroke: #4f46e5;
    opacity: .3;
}

.lc-projects__empty p {
    font-size: 0.875rem;
}

/* =========================================================
   Modal — projekt (overrides + extras)
   ========================================================= */
.lc-modal--wide { max-width: 40rem; }

.lc-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

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

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

/* Color swatches */
.lc-color-picker {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}

.lc-color-swatch {
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 150ms, border-color 150ms;
    outline: none;
}

.lc-color-swatch:hover { transform: scale(1.15); }

.lc-color-swatch--active {
    border-color: #1e293b;
    transform: scale(1.1);
}

/* Details modal body */
.lc-details-status {
    display: inline-block;
    font-size: 0.5625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.lc-details-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.5rem 0 1.5rem;
    line-height: 1.5;
}

.lc-details-progress { margin-bottom: 1.5rem; }

.lc-details-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.lc-details-stat {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 1rem;
    padding: 1rem;
}

.lc-details-stat svg {
    width: 1rem;
    height: 1rem;
    margin-bottom: 0.25rem;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lc-details-stat__label {
    font-size: 0.5625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin: 0.25rem 0 0.125rem;
}

.lc-details-stat__value {
    font-size: 0.875rem;
    font-weight: 900;
    color: #1e293b;
}

/* New card animation */
.lc-proj-card--new {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 300ms ease, transform 300ms ease;
}

.lc-proj-card--visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   Mobile (< 640px)
   ========================================================= */
@media (max-width: 639px) {
    .lc-projects { padding: 1rem; }

    .lc-proj-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
