/* fp-cards — all the card patterns in the new design system.
   - .fp-body         page padding
   - .fp-h            big greeting headline
   - .fp-stats / .fp-stat   KPI grid (2-up mobile, 4-up desktop)
   - .fp-grid         2-col layout for hero + focus side-by-side on desktop
   - .fp-hero         large card with subtle accent glow
   - .fp-focus        today's focus multi-row card
   - .fp-focal        DARK focal card with sub-tabs and live-pulse dot
   - .fp-row          data-table row inside .fp-focal (avatar + name + status)
   - .fp-tools / .fp-tile   tappable action tiles */

.fp-body {
  padding: var(--space-5) var(--space-4);
}

@media (min-width: 1024px) {
  .fp-body {
    padding: var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }
}

/* Greeting headline */
.fp-h {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.05;
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-1);
}

@media (min-width: 1024px) {
  .fp-h { font-size: 2.25rem; }
}

.fp-h__sub {
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-4);
}

/* KPI grid */
.fp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

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

.fp-stat {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  border: 1px solid var(--border-subtle);
}

.fp-stat__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.fp-stat__label {
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: var(--fw-semibold);
}

.fp-stat__delta {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--accent-positive-soft);
  color: var(--accent-positive);
}

.fp-stat__delta--neutral {
  background: var(--bg-subtle);
  color: var(--text-tertiary);
}

.fp-stat__delta--negative {
  background: var(--accent-negative-soft);
  color: var(--accent-negative);
}

.fp-stat__value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
  margin-top: var(--space-1);
}

@media (min-width: 1024px) {
  .fp-stat__value { font-size: 2.25rem; }
}

.fp-stat__sub {
  font-size: var(--fs-2xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Two-column zone on desktop, stacked on mobile */
.fp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

@media (min-width: 1024px) {
  .fp-grid { grid-template-columns: 1.4fr 1fr; }
}

/* --- Hero card (most-recent / featured) --- */

.fp-hero {
  background: var(--bg-surface);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.fp-hero::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-primary-glow), transparent 70%);
  pointer-events: none;
}

.fp-hero__kicker {
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
  position: relative;
}

.fp-hero__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
  position: relative;
}

.fp-hero__sub {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  position: relative;
}

.fp-hero__cta {
  display: inline-flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  position: relative;
}

/* --- Today's focus card (multi-row) --- */

.fp-focus {
  background: var(--bg-surface);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  border: 1px solid var(--border-subtle);
}

.fp-focus__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-3);
}

.fp-focus__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}

.fp-focus__date {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
}

.fp-focus__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.fp-focus__row:last-child { border-bottom: none; }

.fp-focus__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fp-focus__rowtext { flex: 1; }

.fp-focus__rowlabel {
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: var(--fw-semibold);
}

.fp-focus__rowvalue {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  margin-top: 2px;
}

/* --- Dark focal card (the signature element) --- */

.fp-focal {
  background: #0a0a0c;
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  margin-bottom: var(--space-3);
  border: 1px solid #232328;
  color: #fafafa;
}

[data-theme="light"] .fp-focal { background: #1c1c20; }

.fp-focal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.fp-focal__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: #fafafa;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fp-focal__sub {
  font-size: var(--fs-2xs);
  color: #a1a1ab;
}

/* Pulsing dot for "live" / "right now" indicators */
.fp-focal__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
  animation: fp-pulse 2s ease-in-out infinite;
}

@keyframes fp-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2); }
  50%      { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0.05); }
}

@media (prefers-reduced-motion: reduce) {
  .fp-focal__pulse { animation: none; }
}

/* Pill on the right side of the focal head (e.g. "5 on shift") */
.fp-focal__pill {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  padding: 4px 10px;
  background: rgba(52, 211, 153, 0.18);
  color: #34d399;
  border-radius: var(--radius-pill);
}

/* Sub-tabs INSIDE the dark focal (dark variant) */
.fp-focal__subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-3);
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  width: fit-content;
}

.fp-focal__subtab {
  padding: 4px 10px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: #a1a1ab;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
}

.fp-focal__subtab.is-active {
  background: #fafafa;
  color: #0a0a0c;
}

/* Data row inside the dark focal (avatar + name + time + status pill) */
.fp-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fp-row:last-child { border-bottom: none; }

.fp-row__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0c;
  font-weight: var(--fw-bold);
  font-size: var(--fs-2xs);
  flex-shrink: 0;
}

.fp-row__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: #fafafa;
}

.fp-row__sub {
  font-size: var(--fs-2xs);
  color: #a1a1ab;
}

.fp-row__time {
  font-size: var(--fs-2xs);
  color: #a1a1ab;
}

/* --- Tools tile grid --- */

.fp-tools-label {
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-3);
  margin-top: var(--space-4);
}

.fp-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

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

.fp-tile {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: transform 100ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-tile:active { transform: scale(0.98); }

@media (hover: hover) and (pointer: fine) {
  .fp-tile:hover {
    border-color: var(--border-strong);
    background: var(--bg-elevated);
  }
}

.fp-tile__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fp-tile__icon svg {
  width: 18px;
  height: 18px;
}

.fp-tile__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}

.fp-tile__desc {
  font-size: var(--fs-2xs);
  color: var(--text-tertiary);
}
