:root {
  --pp-bg: #f5f7fb;
  --pp-bg-accent: #eef3ff;
  --pp-surface: rgba(255, 255, 255, 0.88);
  --pp-surface-strong: #ffffff;
  --pp-text: #1f2a37;
  --pp-muted: #667085;
  --pp-line: rgba(15, 23, 42, 0.09);
  --pp-primary: #1f6feb;
  --pp-primary-strong: #1557b0;
  --pp-success: #0f9d74;
  --pp-warning: #c27c1b;
  --pp-danger: #d14343;
  --pp-shadow: 0 22px 44px rgba(15, 23, 42, 0.08);
  --pp-radius-lg: 28px;
  --pp-radius-md: 20px;
  --pp-radius-sm: 14px;
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--pp-text);
  background:
    radial-gradient(circle at top left, rgba(31, 111, 235, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 157, 116, 0.08), transparent 24%),
    linear-gradient(180deg, #fbfcfe 0%, var(--pp-bg) 100%);
  font-family: "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

.app-frame {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell {
  max-width: 1200px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 0;
  backdrop-filter: blur(18px);
  background: rgba(245, 247, 251, 0.8);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.header-bar,
.header-branding,
.header-actions,
.app-nav,
.hero-actions,
.dashboard-date-form,
.toolbar-header,
.footer-content,
.task-main,
.task-form-grid,
.auth-form {
  display: flex;
}

.header-bar,
.header-branding,
.header-actions {
  align-items: center;
}

.header-bar {
  justify-content: space-between;
  gap: 1rem;
}

.header-branding {
  gap: 1.25rem;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.app-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--pp-primary), #4d91ff);
  box-shadow: 0 12px 30px rgba(31, 111, 235, 0.26);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.app-brand strong,
.app-brand small {
  display: block;
}

.app-brand strong {
  font-size: 1rem;
}

.app-brand small {
  color: var(--pp-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-nav {
  gap: 0.9rem;
  flex-wrap: wrap;
}

.app-nav a,
.user-chip,
.status-pill,
.feature-card__meta {
  font-size: 0.9rem;
  font-weight: 600;
}

.app-nav a {
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  color: var(--pp-muted);
}

.app-nav a:hover {
  color: var(--pp-text);
  background: rgba(255, 255, 255, 0.7);
}

.header-actions {
  gap: 0.75rem;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--pp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--pp-muted);
}

.page-hero,
.content-card,
.feature-card,
.auth-card {
  border: 1px solid var(--pp-line);
  background: var(--pp-surface);
  box-shadow: var(--pp-shadow);
}

.page-hero,
.content-card,
.feature-card,
.auth-card,
.metric-card {
  border-radius: var(--pp-radius-lg);
}

.page-hero {
  display: grid;
  gap: 1rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 255, 0.9)),
    var(--pp-surface);
}

.page-hero--compact {
  padding: 1.7rem 2rem;
}

.page-hero h1,
.section-heading h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.02;
}

.page-hero h1 {
  max-width: 14ch;
  font-size: clamp(2.35rem, 5vw, 4.2rem);
  letter-spacing: -0.04em;
}

.page-copy,
.section-heading p,
.feature-card p,
.empty-state,
.inline-hint,
.task-main span,
.task-timestamp,
.metric-card small,
.recommendation-note p,
.footer-content,
.auth-card p {
  color: var(--pp-muted);
}

.page-copy,
.section-heading p,
.feature-card p,
.recommendation-note p {
  margin: 0.8rem 0 0;
  max-width: 48rem;
  font-size: 1rem;
}

.info-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--pp-muted);
}

.info-list li + li {
  margin-top: 0.55rem;
}

.hero-actions {
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 0.85rem;
  color: var(--pp-primary-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.feature-grid,
.prep-grid,
.metric-grid,
.dashboard-task-grid {
  display: grid;
  gap: 1rem;
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.prep-grid {
  grid-template-columns: 1.05fr 1.2fr;
}

.prep-grid-wide {
  align-items: start;
}

.feature-card,
.content-card--padded,
.auth-card {
  padding: 1.5rem;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.feature-card__icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.14), rgba(15, 157, 116, 0.1));
  color: var(--pp-primary);
  font-size: 1.15rem;
}

.user-cell,
.profile-photo-panel {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.user-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.14), rgba(15, 157, 116, 0.12));
  color: var(--pp-primary-strong);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar--xl {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 1.6rem;
  font-size: 2rem;
}

.user-detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.user-detail-card {
  padding: 1rem;
  border: 1px solid rgba(31, 111, 235, 0.08);
  border-radius: var(--pp-radius-md);
  background: rgba(255, 255, 255, 0.8);
}

.user-detail-card strong,
.user-detail-card small {
  display: block;
}

.user-detail-card strong {
  margin-top: 0.35rem;
  font-size: 1.25rem;
}

.user-detail-card small {
  margin-top: 0.3rem;
  color: var(--pp-muted);
}

.feature-card__body {
  flex: 1;
}

.feature-card__meta {
  color: var(--pp-primary-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-card h2,
.recommendation-note h3 {
  margin: 0.35rem 0 0;
}

.feature-card__arrow {
  color: var(--pp-muted);
}

.feature-card--link:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card--muted {
  opacity: 0.82;
}

.section-heading {
  margin-bottom: 1.2rem;
}

.section-heading--split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.content-card {
  overflow: hidden;
}

.stack-lg {
  display: grid;
  gap: 1rem;
}

.toolbar-header {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 1.35rem 0;
}

.dashboard-task-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 1.35rem;
}

.metric-card {
  padding: 1rem;
  border: 1px solid rgba(31, 111, 235, 0.1);
  background: var(--pp-surface-strong);
}

.metric-card strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}

.metric-card__label {
  color: var(--pp-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.recommendation-note {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--pp-radius-md);
  background: rgba(246, 249, 255, 0.75);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.status-pill--neutral {
  background: rgba(100, 116, 139, 0.11);
  color: #516074;
}

.status-pill--success {
  background: rgba(15, 157, 116, 0.12);
  color: #0b7a5b;
}

.status-pill--warning {
  background: rgba(194, 124, 27, 0.12);
  color: #9e6617;
}

.status-pill--info {
  background: rgba(31, 111, 235, 0.12);
  color: var(--pp-primary-strong);
}

.empty-state-card,
.empty-state {
  text-align: center;
}

.empty-state {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  padding: 1.5rem 1rem;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: var(--pp-radius-md);
  background: rgba(255, 255, 255, 0.54);
}

.empty-state i {
  color: var(--pp-primary);
  font-size: 1.5rem;
}

.prep-table {
  margin-bottom: 0;
}

.prep-table > :not(caption) > * > * {
  padding: 1rem 0.75rem;
  border-bottom-color: rgba(15, 23, 42, 0.07);
  background: transparent;
}

.task-main {
  flex-direction: column;
  gap: 0.2rem;
}

.task-form-grid {
  gap: 0.45rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.task-form-grid > .form-control-sm,
.task-form-grid > .form-select-sm,
.task-form-grid > .btn {
  flex: 1 1 0;
}

.task-complete-form {
  min-width: min(100%, 420px);
}

.task-complete-form--board {
  margin-left: auto;
}

.table-action-stack {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.detail-grid__wide {
  grid-column: 1 / -1;
}

.task-board-summary,
.task-board-filters,
.task-board-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.task-board-actions {
  justify-content: flex-end;
}

.recommendation-note h3 {
  margin-bottom: 0.5rem;
}

.recommendation-note p {
  margin-top: 0;
}

.recommendation-note [data-dough-quantity-preview] {
  color: var(--pp-text);
  font-weight: 600;
}

.dashboard-date-form {
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.dashboard-date-form .form-control {
  min-width: 210px;
}

.dashboard-note {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: var(--pp-radius-md);
  border: 1px solid rgba(31, 111, 235, 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.dashboard-note i {
  margin-top: 0.15rem;
  color: var(--pp-primary);
}

.dashboard-note strong,
.dashboard-note p {
  display: block;
}

.dashboard-note p {
  margin: 0.35rem 0 0;
  color: var(--pp-muted);
}

.dashboard-ai-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dashboard-ai-message {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(31, 111, 235, 0.12);
  border-radius: var(--pp-radius-md);
  background: rgba(246, 249, 255, 0.75);
}

.dashboard-ai-message p {
  margin: 0;
  color: var(--pp-text);
}

.dashboard-ai-message--error {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-color: rgba(209, 67, 67, 0.16);
  background: rgba(255, 245, 245, 0.9);
}

.dashboard-ai-message--error i {
  margin-top: 0.15rem;
  color: var(--pp-danger);
}

.status-banner {
  margin-bottom: 1rem;
  border-radius: var(--pp-radius-md);
  border: none;
  box-shadow: var(--pp-shadow);
}

.admin-form-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding-left: 0;
}

.admin-form-check .form-check-input {
  margin: 0;
  position: static;
  float: none;
}

.admin-form-check .form-check-label {
  margin: 0;
  color: var(--pp-text);
  font-weight: 600;
}

.task-form-grid .form-control-sm {
  min-width: 120px;
}

.task-form-help {
  justify-content: flex-end;
  margin-top: 0.35rem;
  width: 100%;
}

.task-timestamp {
  margin-top: 0.35rem;
  font-size: 0.8rem;
}

.weekly-calendar-table__today td {
  background: rgba(31, 111, 235, 0.05) !important;
}

.inline-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 70vh;
}

.auth-card {
  width: min(100%, 460px);
}

.auth-form {
  flex-direction: column;
  gap: 1rem;
}

.footer {
  margin-top: auto;
  padding: 0 0 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pp-primary), #4d91ff);
  border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--pp-primary-strong), #3b7ee2);
}

.btn-dark {
  background: #1f2a37;
  border-color: #1f2a37;
}

.btn-outline-secondary {
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--pp-text);
}

.form-control,
.form-select {
  border-color: rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  min-height: 3rem;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(31, 111, 235, 0.36);
  box-shadow: 0 0 0 0.25rem rgba(31, 111, 235, 0.12);
}

@media (max-width: 991.98px) {
  .header-bar,
  .header-branding,
  .header-actions,
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .prep-grid {
    grid-template-columns: 1fr;
  }

  .section-heading--split,
  .task-board-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 767.98px) {
  .app-shell {
    padding-inline: 1rem;
  }

  .page-hero,
  .content-card--padded,
  .feature-card,
  .auth-card {
    padding: 1.25rem;
  }

  .page-hero h1 {
    max-width: none;
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .task-form-grid {
    justify-content: stretch;
  }

  .task-form-grid > * {
    width: 100%;
  }

  .table-action-stack {
    width: 100%;
    justify-content: stretch;
  }

  .table-action-stack > * {
    flex: 1 1 100%;
  }

  .task-complete-form {
    min-width: 100%;
  }
}
