:root {
  --bg: #f6f7fb;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-muted: #f1f4f8;

  --text: #172033;
  --text-soft: #667085;
  --text-faint: #98a2b3;

  --border: rgba(16, 24, 40, 0.08);

  --brand: #7067f0;
  --brand-dark: #5b52db;
  --brand-soft: #eeecff;

  --green: #39b980;
  --green-soft: #e9f8f1;

  --yellow: #e8b53f;
  --yellow-soft: #fff7df;

  --orange: #ef8d47;
  --orange-soft: #fff0e4;

  --red: #df5f69;
  --red-soft: #ffeaec;

  --shadow-sm:
    0 1px 2px rgba(16, 24, 40, 0.03),
    0 2px 8px rgba(16, 24, 40, 0.04);

  --shadow-md:
    0 8px 24px rgba(31, 38, 66, 0.08),
    0 2px 8px rgba(31, 38, 66, 0.04);

  --shadow-lg:
    0 24px 60px rgba(25, 31, 55, 0.14);

  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(112, 103, 240, 0.08), transparent 32rem),
    var(--bg);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

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

.nf-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 0 20px;
}

.nf-mobile-shell {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- Header ---------- */

.nf-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(246, 247, 251, 0.82);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.nf-header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.nf-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.nf-brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background:
    linear-gradient(145deg, #887ffd 0%, #655be9 54%, #5147c8 100%);
  box-shadow:
    0 8px 22px rgba(91, 82, 219, 0.28),
    inset 0 1px rgba(255, 255, 255, 0.32);
}

.nf-brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.nf-brand-name {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.nf-brand-subtitle {
  margin-top: 1px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 500;
}

/* ---------- Typography ---------- */

.nf-eyebrow {
  margin: 0 0 7px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nf-page-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.nf-page-copy {
  max-width: 580px;
  margin: 9px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Cards ---------- */

.nf-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.nf-card-elevated {
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
}

/* ---------- Controls ---------- */

.nf-field {
  display: grid;
  gap: 7px;
}

.nf-label {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
}

.nf-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #e3e7ee;
  border-radius: 15px;
  outline: none;
  background: #fff;
  color: var(--text);
  padding: 0 15px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.nf-input::placeholder {
  color: #abb3c1;
}

.nf-input:focus {
  border-color: rgba(112, 103, 240, 0.75);
  box-shadow: 0 0 0 4px rgba(112, 103, 240, 0.11);
}

.nf-button {
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 120ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.nf-button:active {
  transform: scale(0.975);
}

.nf-button-primary {
  color: #fff;
  background:
    linear-gradient(135deg, #776ef4 0%, #655be9 55%, #574dce 100%);
  box-shadow: 0 9px 24px rgba(91, 82, 219, 0.25);
}

.nf-button-primary:hover {
  box-shadow: 0 12px 28px rgba(91, 82, 219, 0.32);
}

.nf-button-secondary {
  color: var(--text);
  background: var(--surface-muted);
}

.nf-button-success {
  color: #fff;
  background: linear-gradient(135deg, #43c68d, #31ad75);
  box-shadow: 0 8px 20px rgba(49, 173, 117, 0.22);
}

/* ---------- Auth ---------- */

.nf-auth-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 15% 15%, rgba(137, 127, 253, 0.28), transparent 27rem),
    radial-gradient(circle at 88% 82%, rgba(75, 194, 152, 0.14), transparent 24rem),
    linear-gradient(145deg, #171b32 0%, #242343 48%, #171a2d 100%);
}

.nf-auth-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
  opacity: 0.65;
}

.nf-auth-orb-one {
  top: -190px;
  right: -130px;
  background: radial-gradient(circle, rgba(125, 115, 246, 0.34), transparent 68%);
}

.nf-auth-orb-two {
  bottom: -220px;
  left: -170px;
  background: radial-gradient(circle, rgba(54, 190, 136, 0.2), transparent 68%);
}

.nf-auth-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
}

.nf-auth-brand {
  margin-bottom: 25px;
  text-align: center;
}

.nf-auth-brand .nf-brand-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 21px;
  font-size: 25px;
}

.nf-auth-title {
  margin: 0;
  color: #fff;
  font-size: 31px;
  font-weight: 780;
  letter-spacing: -0.045em;
}

.nf-auth-copy {
  margin: 7px 0 0;
  color: #aeb5cc;
  font-size: 14px;
}

.nf-auth-card {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.09);
  padding: 28px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.27),
    inset 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(26px) saturate(125%);
}

.nf-auth-card .nf-label {
  color: #d4d8e7;
}

.nf-auth-card .nf-input {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nf-auth-card .nf-input::placeholder {
  color: #80889f;
}

.nf-auth-card .nf-input:focus {
  border-color: rgba(144, 136, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(124, 114, 244, 0.13);
}

.nf-auth-error {
  margin-bottom: 18px;
  border: 1px solid rgba(255, 122, 136, 0.2);
  border-radius: 14px;
  padding: 11px 13px;
  background: rgba(225, 83, 102, 0.14);
  color: #ffc6cc;
  font-size: 13px;
}

/* ---------- Room / urgency primitives ---------- */

.nf-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9ecf2;
}

.nf-progress-fill {
  height: 100%;
  border-radius: inherit;
  transition:
    width 550ms cubic-bezier(.2,.8,.2,1),
    background 250ms ease;
}

.nf-status-green {
  background: linear-gradient(90deg, #46c88f, #35b47e);
}

.nf-status-yellow {
  background: linear-gradient(90deg, #f1c44e, #e1a932);
}

.nf-status-orange {
  background: linear-gradient(90deg, #f3a058, #e97d37);
}

.nf-status-red {
  background: linear-gradient(90deg, #e96d76, #d95160);
}

/* ---------- Animations ---------- */

@keyframes nf-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nf-rise {
  animation: nf-rise 420ms both;
}

.nf-rise-delay-1 {
  animation-delay: 70ms;
}

.nf-rise-delay-2 {
  animation-delay: 140ms;
}

/* ---------- Mobile ---------- */

@media (max-width: 520px) {
  .nf-auth-card {
    padding: 23px 20px;
    border-radius: 24px;
  }

  .nf-auth-title {
    font-size: 28px;
  }

  .nf-shell {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* =========================================================
   NESTFLOW HOME / ROOMS
   ========================================================= */

.nf-home {
  min-height: 100vh;
  padding-bottom: calc(110px + var(--safe-bottom));
}

.nf-home-main {
  padding-top: 28px;
}

.nf-home-greeting {
  margin-bottom: 28px;
}

.nf-home-greeting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.nf-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, #877efe, #6258e2);
  color: white;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(99, 91, 229, 0.25);
}

.nf-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.nf-section-title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.nf-section-caption {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

/* ---------- Room Grid ---------- */

.nf-room-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.nf-room-card {
  position: relative;
  isolation: isolate;
  min-height: 184px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 25px;
  padding: 18px;
  box-shadow:
    0 10px 28px rgba(31, 38, 66, 0.09),
    inset 0 1px rgba(255,255,255,.45);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.nf-room-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 15px 34px rgba(31, 38, 66, 0.13),
    inset 0 1px rgba(255,255,255,.45);
}

.nf-room-card:active {
  transform: scale(.975);
}

.nf-room-card::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background: var(--room-gradient);
}

.nf-room-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -32px;
  top: -34px;
  width: 135px;
  height: 135px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  box-shadow:
    -65px 125px 0 12px rgba(255,255,255,.07);
}

.nf-room-good {
  --room-gradient:
    linear-gradient(145deg, #56c99b 0%, #35ad7c 100%);
}

.nf-room-upcoming {
  --room-gradient:
    linear-gradient(145deg, #edc75f 0%, #dda83b 100%);
}

.nf-room-due {
  --room-gradient:
    linear-gradient(145deg, #f2a15e 0%, #e67d3e 100%);
}

.nf-room-overdue {
  --room-gradient:
    linear-gradient(145deg, #e97a82 0%, #d95765 100%);
}

.nf-room-empty {
  --room-gradient:
    linear-gradient(145deg, #aeb6c5 0%, #8d96a8 100%);
}

.nf-room-icon-wrap {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 17px;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 1px rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
}

.nf-room-icon {
  font-size: 26px;
  line-height: 1;
}

.nf-room-name {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.nf-room-meta {
  margin-top: 5px;
  color: rgba(255,255,255,.79);
  font-size: 11px;
  line-height: 1.4;
}

.nf-room-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: rgba(255,255,255,.94);
  font-size: 11px;
  font-weight: 650;
}

.nf-room-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 3px rgba(255,255,255,.14);
}

/* ---------- Empty State ---------- */

.nf-empty {
  grid-column: 1 / -1;
  padding: 44px 24px;
  border: 1px dashed #d9dde6;
  border-radius: 24px;
  text-align: center;
  background: rgba(255,255,255,.55);
}

.nf-empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 22px;
  background: var(--brand-soft);
  font-size: 30px;
}

.nf-empty-title {
  margin: 0;
  font-weight: 720;
}

.nf-empty-copy {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

/* ---------- Floating Add Button ---------- */

.nf-fab {
  position: fixed;
  z-index: 60;
  right: max(20px, calc((100vw - 680px) / 2 + 20px));
  bottom: calc(24px + var(--safe-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 54px;
  border: 0;
  border-radius: 18px;
  padding: 0 19px;
  cursor: pointer;
  color: #fff;
  background:
    linear-gradient(135deg, #776ef4 0%, #6258df 100%);
  font-weight: 720;
  box-shadow:
    0 15px 34px rgba(86, 77, 207, 0.36);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.nf-fab:hover {
  transform: translateY(-2px);
}

.nf-fab:active {
  transform: scale(.97);
}

.nf-fab-plus {
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

/* ---------- Modal / Sheet ---------- */

.nf-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 24, 39, .46);
  backdrop-filter: blur(5px);
}

.nf-modal.is-open {
  display: flex;
}

.nf-sheet {
  width: min(100%, 500px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 28px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(17, 24, 39, .22);
  animation: nf-sheet-in 220ms cubic-bezier(.2,.8,.2,1);
}

@keyframes nf-sheet-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.nf-sheet-handle {
  width: 42px;
  height: 5px;
  margin: -5px auto 18px;
  border-radius: 999px;
  background: #e3e6ec;
}

.nf-sheet-title {
  margin: 0;
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -.03em;
}

.nf-sheet-copy {
  margin: 5px 0 20px;
  color: var(--text-soft);
  font-size: 13px;
}

.nf-form-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
}

.nf-icon-input {
  padding: 0;
  text-align: center;
  font-size: 23px;
}

.nf-sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.nf-sheet-actions .nf-button {
  flex: 1;
}

/* ---------- Desktop ---------- */

@media (min-width: 760px) {
  .nf-home-main {
    padding-top: 40px;
  }

  .nf-room-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nf-room-card {
    min-height: 205px;
  }

  .nf-modal {
    align-items: center;
  }
}

@media (max-width: 380px) {
  .nf-room-grid {
    gap: 10px;
  }

  .nf-room-card {
    min-height: 170px;
    padding: 15px;
    border-radius: 21px;
  }

  .nf-room-icon-wrap {
    margin-bottom: 23px;
  }

  .nf-room-name {
    font-size: 16px;
  }

  .nf-fab-label {
    display: none;
  }

  .nf-fab {
    width: 54px;
    padding: 0;
    border-radius: 50%;
  }
}
/* =========================================================
   NESTFLOW ROOM DETAIL / TASKS
   ========================================================= */

.nf-room-page {
  min-height: 100vh;
  padding-bottom: calc(110px + var(--safe-bottom));
}

.nf-room-main {
  padding-top: 24px;
}

.nf-room-header {
  display: flex;
  align-items: center;
  gap: 13px;
}

.nf-back-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255,255,255,.82);
  color: var(--text);
  font-size: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 130ms ease, background 130ms ease;
}

.nf-back-button:hover {
  background: #fff;
}

.nf-back-button:active {
  transform: scale(.96);
}

.nf-room-heading-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: var(--brand-soft);
  font-size: 23px;
}

.nf-room-heading-copy {
  min-width: 0;
  flex: 1;
}

.nf-room-heading-name {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nf-room-heading-count {
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 11px;
}

/* ---------- Room Intro ---------- */

.nf-room-hero {
  margin: 22px 0 24px;
}

.nf-room-hero-title {
  margin: 0;
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.nf-room-hero-copy {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Task List ---------- */

.nf-task-list {
  display: grid;
  gap: 14px;
}

.nf-task-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255,255,255,.93);
  box-shadow: var(--shadow-sm);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.nf-task-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.nf-task-inner {
  padding: 18px;
}

.nf-task-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.nf-task-copy {
  min-width: 0;
  flex: 1;
}

.nf-task-title {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 740;
  line-height: 1.3;
  letter-spacing: -.02em;
}

.nf-task-frequency {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.nf-status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: .02em;
}

.nf-pill-good {
  color: #23845b;
  background: var(--green-soft);
}

.nf-pill-upcoming {
  color: #9a751c;
  background: var(--yellow-soft);
}

.nf-pill-due {
  color: #b55f24;
  background: var(--orange-soft);
}

.nf-pill-overdue {
  color: #b73e4a;
  background: var(--red-soft);
}

.nf-pill-paused {
  color: #667085;
  background: #eef0f4;
}

.nf-status-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Progress ---------- */

.nf-task-progress-wrap {
  margin-top: 18px;
}

.nf-task-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.nf-task-due {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 550;
}

.nf-task-percent {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 650;
}

/* ---------- Actions ---------- */

.nf-task-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: 17px;
}

.nf-complete-button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  color: #fff;
  background:
    linear-gradient(135deg, #48c990 0%, #32ac76 100%);
  font-size: 13px;
  font-weight: 720;
  box-shadow: 0 8px 19px rgba(48, 172, 117, .2);
  transition: transform 120ms ease, box-shadow 150ms ease;
}

.nf-complete-button:hover {
  box-shadow: 0 10px 24px rgba(48, 172, 117, .26);
}

.nf-complete-button:active {
  transform: scale(.98);
}

.nf-more-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 17px;
  transition: background 130ms ease, color 130ms ease;
}

.nf-more-button:hover {
  background: #e8ebf1;
  color: var(--text);
}

/* ---------- Small Task Menu ---------- */

.nf-task-menu-wrap {
  position: relative;
}

.nf-task-menu {
  position: absolute;
  z-index: 30;
  right: 0;
  bottom: 50px;
  display: none;
  min-width: 150px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.nf-task-menu.is-open {
  display: block;
}

.nf-task-menu form {
  margin: 0;
}

.nf-task-menu-button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  cursor: pointer;
  color: var(--text-soft);
  text-align: left;
  font-size: 12px;
  font-weight: 620;
}

.nf-task-menu-button:hover {
  background: var(--surface-muted);
}

.nf-task-menu-danger {
  color: #c34b56;
}

/* ---------- Add Task Sheet ---------- */

.nf-task-form {
  display: grid;
  gap: 15px;
}

.nf-interval-row {
  display: grid;
  grid-template-columns: 1fr 125px;
  gap: 10px;
}

.nf-input-help {
  margin: 5px 0 0;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.4;
}

/* ---------- Empty Tasks ---------- */

.nf-task-empty {
  padding: 48px 24px;
  border: 1px dashed #d9dde6;
  border-radius: 24px;
  background: rgba(255,255,255,.57);
  text-align: center;
}

.nf-task-empty-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 15px;
  border-radius: 23px;
  background: var(--green-soft);
  font-size: 31px;
}

.nf-task-empty-title {
  margin: 0;
  font-size: 16px;
  font-weight: 730;
}

.nf-task-empty-copy {
  margin: 5px auto 0;
  max-width: 280px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

@media (min-width: 760px) {
  .nf-room-main {
    padding-top: 34px;
  }

  .nf-task-inner {
    padding: 20px;
  }
}
/* =========================================================
   NESTFLOW V2 — COLORFUL MOBILE APP SHELL
   ========================================================= */

.nf-app-bg {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(143, 193, 255, 0.42), transparent 26rem),
    radial-gradient(circle at 85% 18%, rgba(184, 160, 255, 0.34), transparent 24rem),
    radial-gradient(circle at 40% 90%, rgba(131, 218, 181, 0.30), transparent 28rem),
    linear-gradient(
      180deg,
      #eaf3ff 0%,
      #f1ecff 38%,
      #edf7f2 72%,
      #e9f2ff 100%
    );
}

.nf-app-header {
  position: sticky;
  top: 0;
  z-index: 50;

  background: rgba(239, 246, 255, 0.78);

  border-bottom:
    1px solid rgba(255, 255, 255, 0.75);

  backdrop-filter:
    blur(24px) saturate(150%);

  -webkit-backdrop-filter:
    blur(24px) saturate(150%);
}

.nf-app-header-inner {
  min-height: 82px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 14px;
}


/* ---------- NestFlow Branding ---------- */

.nf-logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nf-nest-logo {
  position: relative;

  display: grid;
  place-items: center;

  width: 50px;
  height: 50px;

  border-radius: 18px;

  background:
    linear-gradient(
      145deg,
      #8e82ff 0%,
      #6d61e6 55%,
      #554abe 100%
    );

  box-shadow:
    0 10px 24px rgba(86, 75, 195, 0.30),
    inset 0 1px rgba(255, 255, 255, 0.40);

  overflow: hidden;
}

.nf-nest-logo::before {
  content: "";

  position: absolute;

  width: 31px;
  height: 15px;

  bottom: 10px;

  border: 3px solid rgba(255,255,255,.96);
  border-top: 0;

  border-radius:
    0 0 50% 50%;

  transform: rotate(-2deg);
}

.nf-nest-logo::after {
  content: "";

  position: absolute;

  width: 6px;
  height: 6px;

  top: 13px;

  border-radius: 50%;

  background: #fff;

  box-shadow:
    9px 3px 0 -1px rgba(255,255,255,.86),
    -7px 4px 0 -1px rgba(255,255,255,.75);
}

.nf-wordmark {
  line-height: 1;
}

.nf-wordmark-main {
  display: flex;
  align-items: baseline;

  gap: 1px;

  color: var(--text);
}

.nf-wordmark-nest {
  font-family:
    "Pacifico",
    "Brush Script MT",
    cursive;

  font-size: 23px;

  font-weight: 400;

  color: #6459d7;

  letter-spacing: -0.02em;
}

.nf-wordmark-flow {
  font-size: 20px;

  font-weight: 800;

  letter-spacing: -0.045em;

  color: #293146;
}

.nf-wordmark-sub {
  margin-top: 5px;

  color: #7e8798;

  font-size: 11px;

  font-weight: 600;
}


/* ---------- Home Hero ---------- */

.nf-home-v2 {
  min-height: 100vh;

  padding-bottom:
    calc(100px + env(safe-area-inset-bottom, 0px));
}

.nf-home-main-v2 {
  padding-top: 26px;
}

.nf-home-hero-card {
  position: relative;

  overflow: hidden;

  margin-bottom: 26px;

  border:
    1px solid rgba(255, 255, 255, 0.86);

  border-radius: 30px;

  padding: 24px;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.84),
      rgba(255,255,255,.58)
    );

  box-shadow:
    0 22px 50px rgba(46, 54, 89, 0.11);

  backdrop-filter:
    blur(22px);

  -webkit-backdrop-filter:
    blur(22px);
}

.nf-home-hero-card::before {
  content: "";

  position: absolute;

  right: -70px;
  top: -70px;

  width: 180px;
  height: 180px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(126, 111, 245, 0.22),
      transparent 70%
    );
}

.nf-home-hero-title {
  margin: 0;

  max-width: 380px;

  color: #263044;

  font-size:
    clamp(29px, 8vw, 39px);

  line-height: 1.08;

  letter-spacing: -0.045em;
}

.nf-home-hero-copy {
  margin: 10px 0 0;

  max-width: 450px;

  color: #667085;

  font-size: 14px;

  line-height: 1.55;
}


/* ---------- Household Summary ---------- */

.nf-summary-row {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 10px;

  margin-top: 19px;
}

.nf-summary-card {
  border:
    1px solid rgba(255,255,255,.78);

  border-radius: 18px;

  padding: 13px;

  background:
    rgba(255,255,255,.58);

  box-shadow:
    0 8px 22px rgba(35, 42, 70, .05);
}

.nf-summary-value {
  color: #263044;

  font-size: 18px;

  font-weight: 800;
}

.nf-summary-label {
  margin-top: 3px;

  color: #8790a1;

  font-size: 10px;

  font-weight: 650;
}


/* ---------- Mobile Bottom Navigation ---------- */

.nf-bottom-nav {
  position: fixed;

  z-index: 80;

  left: 50%;

  bottom:
    calc(12px + env(safe-area-inset-bottom, 0px));

  transform:
    translateX(-50%);

  width:
    min(calc(100% - 24px), 660px);

  display: grid;

  grid-template-columns:
    repeat(5, 1fr);

  padding: 8px;

  border:
    1px solid rgba(255,255,255,.86);

  border-radius: 24px;

  background:
    rgba(255,255,255,.84);

  box-shadow:
    0 18px 45px rgba(26, 34, 62, .17);

  backdrop-filter:
    blur(24px) saturate(160%);

  -webkit-backdrop-filter:
    blur(24px) saturate(160%);
}

.nf-nav-item {
  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 4px;

  min-height: 51px;

  border-radius: 17px;

  color: #8b94a4;

  font-size: 9px;

  font-weight: 650;

  transition:
    background 140ms ease,
    color 140ms ease,
    transform 120ms ease;
}

.nf-nav-icon {
  font-size: 20px;
  line-height: 1;
}

.nf-nav-item.is-active {
  color: #665bdd;

  background:
    linear-gradient(
      145deg,
      #eeeaff,
      #e5e1ff
    );
}

.nf-nav-item:active {
  transform: scale(.95);
}


/* ---------- Profile Button ---------- */

.nf-profile-button {
  display: grid;

  place-items: center;

  width: 45px;
  height: 45px;

  border:
    2px solid rgba(255,255,255,.85);

  border-radius: 50%;

  color: #fff;

  background:
    linear-gradient(
      145deg,
      #6b9ef4,
      #7365e5
    );

  font-size: 15px;

  font-weight: 800;

  box-shadow:
    0 8px 22px rgba(84, 90, 190, .24);
}


/* ---------- Section Headings ---------- */

.nf-v2-section {
  margin-top: 24px;
}

.nf-v2-section-header {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 13px;
}

.nf-v2-section-title {
  margin: 0;

  color: #273044;

  font-size: 18px;

  font-weight: 800;

  letter-spacing: -.03em;
}

.nf-v2-section-sub {
  margin-top: 3px;

  color: #7b8496;

  font-size: 11px;
}


/* ---------- Mobile ---------- */

@media (max-width: 420px) {

  .nf-home-hero-card {
    padding: 20px;
  }

  .nf-summary-card {
    padding: 11px 9px;
  }

  .nf-summary-value {
    font-size: 16px;
  }

  .nf-summary-label {
    font-size: 9px;
  }

}
