/* =========================================================
   Dashboard — LifeCenter OS
   ========================================================= */

/* Slate palette */
:root {
  --sl-50:  #f8fafc;
  --sl-100: #f1f5f9;
  --sl-200: #e2e8f0;
  --sl-300: #cbd5e1;
  --sl-400: #94a3b8;
  --sl-500: #64748b;
  --sl-600: #475569;
  --sl-700: #334155;
  --sl-800: #1e293b;
  --sl-900: #0f172a;

  --in-50:  #eef2ff;
  --in-100: #e0e7ff;
  --in-300: #a5b4fc;
  --in-400: #818cf8;
  --in-500: #6366f1;
  --in-600: #4f46e5;
  --in-700: #4338ca;
  --in-900: #312e81;

  --am-400: #fbbf24;
  --ro-500: #f43f5e;
  --em-500: #10b981;
  --re-100: #fee2e2;
  --re-600: #dc2626;
  --bl-100: #dbeafe;
  --bl-600: #2563eb;
  --gr-100: #dcfce7;
  --gr-700: #15803d;
}

/* =========================================================
   Wrapper
   ========================================================= */
.lc-dash {
  background: var(--sl-50);
  min-height: 100%;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

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

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

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

.lc-dash-header__title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.lc-dash-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--sl-800);
  margin: 0;
}

.lc-dash-header__subtitle {
  font-size: 0.875rem;
  color: var(--sl-500);
  margin: 0;
}

.lc-dash-header__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ===================== SZYBKIE AKCJE ===================== */
.lc-quick-actions {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.lc-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: filter 0.15s, transform 0.1s;
  white-space: nowrap;
}
.lc-quick-btn:hover { filter: brightness(0.93); transform: translateY(-1px); }
.lc-quick-btn:active { transform: translateY(0); }

.lc-quick-btn--indigo  { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.lc-quick-btn--blue    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.lc-quick-btn--amber   { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.lc-quick-btn--emerald { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

/* Badge */
.lc-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.lc-badge--green {
  background: var(--gr-100);
  color: var(--gr-700);
}

/* Buttons */
.lc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity 150ms, box-shadow 150ms, background 150ms;
  white-space: nowrap;
  text-decoration: none;
}

.lc-btn--indigo {
  background: var(--in-600);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,.25);
}

.lc-btn--indigo:hover { background: var(--in-700); }

.lc-btn--outline {
  background: #fff;
  color: var(--sl-700);
  border: 1px solid var(--sl-200);
}

.lc-btn--outline:hover { background: var(--sl-50); }

.lc-btn--dark {
  background: var(--sl-900);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  height: 1.75rem;
  padding: 0 1rem;
  border-radius: 0.375rem;
  margin-top: 0.75rem;
}

.lc-btn--full { width: 100%; justify-content: center; margin-top: 1.5rem; }

/* =========================================================
   Quote popup (modal after login)
   ========================================================= */
.lc-quote-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

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

.lc-quote-modal {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2.5rem 2.5rem 2rem;
  max-width: 520px;
  width: calc(100% - 2rem);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
  text-align: center;
  transform: translateY(16px) scale(0.97);
  transition: transform 300ms ease;
  position: relative;
}

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

.lc-quote-modal__mark {
  width: 3rem;
  height: 3rem;
  background: var(--in-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--in-600);
  margin: 0 auto 1.5rem;
}

.lc-quote-modal__greeting {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--in-500);
  margin: 0 0 0.75rem;
}

.lc-quote-modal__text {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--sl-800);
  line-height: 1.7;
  margin: 0 0 1rem;
}

.lc-quote-modal__author {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sl-500);
  margin: 0 0 2rem;
}

.lc-quote-modal__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--in-600);
  color: #fff;
  border: none;
  border-radius: 0.625rem;
  padding: 0.75rem 2rem;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms;
}

.lc-quote-modal__btn:hover { background: var(--in-700); }

/* =========================================================
   Quote of the day — dashboard widget
   ========================================================= */
.lc-quote {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(135deg, var(--in-50) 0%, #fff 100%);
  border: 1px solid var(--in-100);
  border-left: 4px solid var(--in-500);
  border-radius: 0.75rem;
  padding: 1.125rem 1.25rem;
}

.lc-quote__icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--in-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--in-600);
  margin-top: 0.1rem;
}

.lc-quote__body { flex: 1; min-width: 0; }

.lc-quote__label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--in-500);
  margin: 0 0 0.375rem;
}

.lc-quote__text {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--sl-700);
  line-height: 1.6;
  margin: 0 0 0.25rem;
}

.lc-quote__author {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sl-400);
}

/* =========================================================
   Stats grid (4 cards)
   ========================================================= */
.lc-stats-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 1024px) {
  .lc-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.lc-stat-card {
  background: #fff;
  border: 1px solid var(--sl-200);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: box-shadow 150ms;
}

.lc-stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }

.lc-stat-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.lc-stat-card__label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sl-500);
}

.lc-stat-card__icon {
  width: 1rem;
  height: 1rem;
  stroke: var(--sl-400);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.lc-stat-card__value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--sl-800);
  line-height: 1.1;
}

.lc-stat-card__suffix {
  font-size: 1rem;
  font-weight: 700;
}

.lc-stat-card__sub {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--sl-400);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lc-stat-card__sub--destructive { color: #dc2626; }

/* =========================================================
   Main 2-column grid
   ========================================================= */
.lc-main-grid {
  display: grid;
  gap: 1.5rem;
}

.lc-main-grid__col {
  display: flex;
  flex-direction: column;
}

@media (min-width: 900px) {
  .lc-main-grid {
    grid-template-columns: 1fr 1fr 1fr;
    /* align-items: stretch (default) — wszystkie kolumny tej samej wysokości */
  }

  /* Karta wypełnia całą wysokość kolumny */
  .lc-main-grid__col > .lc-card,
  .lc-main-grid__col > .lc-dark-card {
    flex: 1;
  }
}

/* =========================================================
   Generic card
   ========================================================= */
.lc-card {
  background: #fff;
  border: 1px solid var(--sl-200);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  overflow: hidden;
}

.lc-card--pad { padding: 1rem; }

.lc-card--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.lc-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--sl-100);
}

.lc-card--pad .lc-card__head {
  padding: 0 0 0.75rem 0;
  border-bottom: none;
  margin-bottom: 0.75rem;
}

.lc-card__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--sl-700);
}

.lc-card__title--dot-amber {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lc-card__title--dot-amber::before {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--am-400);
  flex-shrink: 0;
}

.lc-ghost-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--in-600);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  transition: background 150ms;
}

.lc-ghost-btn:hover { background: var(--in-50); }

.lc-ghost-btn--indigo {
  font-size: 0.625rem;
  color: var(--in-500);
}

/* =========================================================
   Task rows
   ========================================================= */
.lc-task-rows {}

.lc-task-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--sl-50);
  transition: background 150ms;
  text-decoration: none;
  color: inherit;
}

.lc-task-row:hover { background: rgba(248,250,252,.5); }

.lc-task-row--last { border-bottom: none; }

.lc-task-row__check {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lc-task-row__check--empty {
  border: 1.5px solid var(--sl-300);
}

.lc-task-row__check--done {
  background: var(--in-600);
  border: 1.5px solid var(--in-600);
}

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

.lc-task-row__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sl-800);
}

.lc-task-row__name--done {
  color: var(--sl-400);
  text-decoration: line-through;
}

.lc-task-row__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.375rem;
  flex-wrap: wrap;
}

.lc-task-row__time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--sl-400);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lc-task-row__time svg {
  stroke: var(--sl-300);
}

/* Priority badges */
.lc-prio {
  font-size: 0.5625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid transparent;
}

.lc-prio--high {
  background: var(--re-100);
  color: var(--re-600);
  border-color: rgba(220,38,38,.15);
}

.lc-prio--blue {
  background: var(--bl-100);
  color: var(--bl-600);
  border-color: rgba(37,99,235,.15);
}

/* Progress bar */
.lc-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lc-progress-bar {
  width: 5rem;
  height: 0.375rem;
  background: var(--sl-100);
  border-radius: 9999px;
  overflow: hidden;
}

.lc-progress-bar__fill {
  height: 100%;
  background: var(--in-500);
  border-radius: 9999px;
}

.lc-progress-wrap__label {
  font-size: 0.625rem;
  color: var(--sl-400);
  font-weight: 700;
}

/* =========================================================
   Mini 2-card grid (notatki + kalendarz widget)
   ========================================================= */
.lc-mini-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .lc-mini-grid { grid-template-columns: 1fr 1fr; }
}

/* Notes list */
.lc-notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lc-note-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
  color: inherit;
}

.lc-note-row:hover {
  background: var(--sl-50);
  border-left-color: var(--am-400);
}

.lc-note-row__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.lc-note-row__empty {
  padding: 1rem 0.5rem;
  font-size: 0.75rem;
  color: var(--sl-400);
}

.lc-task-rows__empty {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--sl-400);
}

.lc-task-rows__empty a {
  color: #6366f1;
  text-decoration: none;
}

.lc-note-row__title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sl-800);
}

.lc-note-row__desc {
  font-size: 0.625rem;
  color: var(--sl-400);
  margin-top: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Calendar widget */
.lc-cal-widget__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--in-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.lc-cal-widget__title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sl-800);
}

.lc-cal-widget__sub {
  font-size: 0.625rem;
  color: var(--sl-400);
  margin-top: 0.25rem;
}

/* =========================================================
   Dark card — Projekty Freelance
   ========================================================= */
.lc-dark-card {
  background: var(--sl-900);
  border-radius: 0.75rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}

.lc-dark-card__blur {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 10rem;
  height: 10rem;
  background: rgba(99,102,241,.1);
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}

.lc-dark-card__content { position: relative; z-index: 1; }

.lc-dark-card__heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1.5rem;
}

.lc-dark-card__heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--in-300);
  margin: 0;
}

.lc-dark-card__link {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--sl-400);
  text-decoration: none;
  transition: color 150ms;
}

.lc-dark-card__link:hover { color: #fff; }

.lc-dark-card__projects {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lc-dark-project { color: inherit; }

.lc-dark-project--faded { opacity: .5; }

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

.lc-dark-project__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.lc-dark-project__name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex: 1;
}

.lc-dark-project__tasks {
  font-size: 0.625rem;
  color: var(--sl-500);
  margin-top: 0.375rem;
}

.lc-dark-project__empty {
  font-size: 0.75rem;
  color: var(--sl-500);
  text-align: center;
  padding: 1rem 0;
}

.lc-dark-project__pct {
  font-size: 0.75rem;
  color: var(--sl-400);
}

.lc-dark-project__pct--indigo { color: var(--in-300); }

.lc-dark-bar {
  width: 100%;
  height: 0.375rem;
  background: var(--sl-800);
  border-radius: 9999px;
  overflow: hidden;
}

.lc-dark-bar__fill {
  height: 100%;
  border-radius: 9999px;
}

.lc-dark-bar__fill--indigo {
  background: var(--in-400);
  box-shadow: 0 0 8px rgba(129,140,248,.5);
}

.lc-dark-bar__fill--slate { background: var(--sl-400); }

.lc-dark-tip {
  margin-top: 3rem;
  padding: 1rem;
  background: rgba(49,46,129,.4);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 0.5rem;
}

.lc-dark-tip__label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--in-200, #c7d2fe);
  margin-bottom: 0.25rem;
}

.lc-dark-tip__text {
  font-size: 0.75rem;
  color: #fff;
  line-height: 1.5;
  font-style: italic;
}

/* =========================================================
   Budget card
   ========================================================= */
.lc-budget-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sl-400);
  margin-bottom: 1rem;
}

.lc-budget-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.lc-budget-top__sub {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--sl-400);
  letter-spacing: 0.05em;
}

.lc-budget-top__amount {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--sl-800);
  line-height: 1.1;
}

.lc-budget-top__growth {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--em-500);
}

.lc-budget-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lc-budget-bar-item {}

.lc-budget-bar-item__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.625rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.lc-budget-bar-item__labels span:first-child { color: var(--sl-500); }
.lc-budget-bar-item__labels span:last-child  { color: var(--sl-700); }

.lc-bbar {
  width: 100%;
  height: 0.5rem;
  background: var(--sl-100);
  border-radius: 9999px;
  overflow: hidden;
}

.lc-bbar__fill {
  height: 100%;
  border-radius: 9999px;
}

.lc-bbar__fill--indigo { background: var(--in-500); }
.lc-bbar__fill--rose   { background: var(--ro-500); }

/* =========================================================
   Mobile (< 480px)
   ========================================================= */
@media (max-width: 479px) {
    .lc-quick-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .lc-quick-btn {
        justify-content: center;
    }

    .lc-dash-header__title {
        font-size: 1.25rem;
    }
}

/* =========================================================
   Widget kalendarza
   ========================================================= */
.lc-calw .lc-card__head { margin-bottom: 0.25rem; }

.lc-calw__day {
  padding: 0.875rem 0;
}
.lc-calw__day--sep {
  border-bottom: 1px solid #f1f5f9;
}

.lc-calw__day-hd {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.lc-calw__day-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
}
.lc-calw__day--today .lc-calw__day-name {
  color: #6366f1;
}
.lc-calw__day-date {
  font-size: 0.75rem;
  color: #94a3b8;
}

.lc-calw__empty {
  font-size: 0.8125rem;
  color: #cbd5e1;
  margin: 0;
  padding-left: 0.25rem;
}

.lc-calw__events {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.lc-calw__event {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.lc-calw__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lc-calw__label {
  font-size: 0.8125rem;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
