/* ============================================================
   Mom Care App — warm, calm, domestic. Cream + deep teal + coral.
   ============================================================ */

:root {
  --teal-900: #0a4a42;
  --teal-800: #0e5c52;
  --teal-700: #0f766e;
  --teal-100: #d6ebe7;
  --teal-50:  #e9f4f2;

  --coral:      #f18f88;
  --coral-soft: #fbdad6;
  --coral-deep: #d96a62;

  --amber:      #c47a1d;
  --amber-soft: #f8ecd9;

  --green:      #2e8b57;
  --green-deep: #237246;
  --green-soft: #ddf0e4;

  --red:      #c9443a;
  --red-soft: #fae3e0;

  --cream:      #faf5ec;
  --cream-deep: #f3ecdf;
  --card:       #fffdf8;
  --line:       #eadfce;

  --ink:      #33302a;
  --ink-soft: #6f6a5f;
  --ink-faint:#a39c8d;

  --shadow-card: 0 2px 6px rgba(90, 74, 40, 0.06), 0 10px 28px rgba(90, 74, 40, 0.08);
  --shadow-float: 0 8px 30px rgba(60, 48, 22, 0.22);

  --r-card: 22px;
  --r-btn: 16px;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito", -apple-system, "Segoe UI", sans-serif;

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

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(120% 60% at 50% -8%, #f0e6d3 0%, transparent 60%),
    var(--cream);
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

.hidden { display: none !important; }

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; color: inherit; }

/* ============ SIGN IN ============ */

.signin {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px calc(32px + var(--safe-bottom));
  background:
    radial-gradient(90% 45% at 50% 0%, #14695e 0%, transparent 100%),
    linear-gradient(175deg, var(--teal-800) 0%, var(--teal-900) 70%);
  position: relative;
  overflow: hidden;
}

.signin-glow {
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241,143,136,0.22) 0%, transparent 65%);
  top: -140px; right: -160px;
  pointer-events: none;
}

.signin-inner {
  width: 100%;
  max-width: 360px;
  text-align: center;
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.signin-logo {
  width: 84px; height: 84px;
  margin: 0 auto 18px;
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.1);
  border: 1px solid rgba(255, 253, 248, 0.18);
  display: grid; place-items: center;
  backdrop-filter: blur(4px);
}

/* mc·♥ brand mark — italic serif "mc" with the coral heart as exponent */
.mc-mark { display: inline-flex; align-items: flex-start; line-height: 1; }
.mc-txt {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
}
.mc-h { fill: #e8836f; flex: none; }

.signin-logo .mc-txt { font-size: 31px; }
.signin-logo .mc-h {
  width: 16px; height: 14.5px;
  margin: -5px 0 0 2px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
  animation: heartbeat 2.8s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.09); }
  24% { transform: scale(1); }
  36% { transform: scale(1.06); }
  48% { transform: scale(1); }
}

.signin-title {
  font-family: "Nunito Sans", var(--font-body, sans-serif);
  font-weight: 900;
  font-size: 34px;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.signin-sub {
  color: rgba(250, 245, 236, 0.75);
  font-size: 16px;
  margin: 6px 0 32px;
}

.signin-form { display: grid; gap: 14px; text-align: left; }

.field { display: grid; gap: 6px; }

.field-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(250, 245, 236, 0.65);
  padding-left: 4px;
}

.signin .field input {
  height: 54px;
  border-radius: var(--r-btn);
  border: 1.5px solid rgba(250, 245, 236, 0.22);
  background: rgba(255, 253, 248, 0.1);
  color: var(--cream);
  font-size: 17px;
  font-weight: 600;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.signin .field input::placeholder { color: rgba(250, 245, 236, 0.4); }
.signin .field input:focus {
  border-color: var(--coral);
  background: rgba(255, 253, 248, 0.16);
}

.signin-status {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.5;
  color: #ffd9a8;
  text-align: center;
  margin-top: 10px;
}
.signin-status.hidden { display: none; }

.signin-hint {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(250, 245, 236, 0.55);
  text-align: center;
  margin-top: 6px;
}
.signin-hint strong { color: rgba(250, 245, 236, 0.85); }
.signin-back { color: rgba(250, 245, 236, 0.75); font-weight: 700; text-decoration: none; }
.signin-back:hover { color: rgba(250, 245, 236, 1); }

/* ============ BUTTONS ============ */

.btn-primary {
  border: none;
  border-radius: var(--r-btn);
  background: linear-gradient(180deg, #f49a92, var(--coral-deep));
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(217, 106, 98, 0.35);
  transition: transform 0.12s, box-shadow 0.2s;
}
.btn-primary:active { transform: scale(0.97); }

.btn-big { height: 56px; margin-top: 6px; }

.btn-secondary {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  padding: 12px 20px;
}

.btn-ghost-danger {
  border: 1.5px solid rgba(255,255,255,0.35);
  background: transparent;
  color: #ffb4ac;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  padding: 12px 20px;
}

/* ============ APP SHELL ============ */

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  background: linear-gradient(180deg, var(--teal-800), var(--teal-700));
  border-radius: 0 0 24px 24px;
  box-shadow: 0 6px 20px rgba(10, 74, 66, 0.25);
}

.topbar-brand { display: flex; align-items: center; gap: 9px; }

.topbar-mark {
  width: 34px; height: 34px;
  border-radius: 11px;
  background: rgba(255, 253, 248, 0.13);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.topbar-mark .mc-txt { font-size: 13px; }
.topbar-mark .mc-h { width: 7px; height: 6.5px; margin: -2px 0 0 1px; }

.topbar-title {
  font-family: "Nunito Sans", var(--font-body, sans-serif);
  font-weight: 800;
  font-size: 19px;
  color: var(--cream);
  letter-spacing: -0.01em;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: rgba(255, 253, 248, 0.14);
  border-radius: 999px;
  padding: 5px 12px 5px 5px;
  color: var(--cream);
}

.user-initial {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: grid; place-items: center;
}

.user-chip-name { font-weight: 700; font-size: 14px; }

.main {
  flex: 1;
  padding: 18px 16px calc(96px + var(--safe-bottom));
}

.tab-panel { animation: fadein 0.25s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ TAB BAR ============ */

.tabbar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: space-around;
  padding: 8px 14px calc(10px + var(--safe-bottom));
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 30;
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: none;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 20px;
  border-radius: 16px;
  transition: color 0.15s, background 0.15s;
}

.tab-btn svg { width: 23px; height: 23px; }

.tab-btn.active {
  color: var(--teal-700);
  background: var(--teal-50);
}

/* ============ CARDS & COMMON ============ */

.card {
  background: var(--card);
  border-radius: var(--r-card);
  border: 1px solid rgba(234, 223, 206, 0.7);
  box-shadow: var(--shadow-card);
  padding: 18px;
  margin-bottom: 16px;
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin-bottom: 12px;
}

.card-heading svg { width: 19px; height: 19px; color: var(--teal-700); flex: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 800;
}
.pill-scheduled { background: var(--teal-100); color: var(--teal-800); }
.pill-off       { background: var(--cream-deep); color: var(--ink-soft); }
.pill-hours     { background: var(--green-soft); color: var(--green-deep); }
.pill-live      { background: var(--green-soft); color: var(--green-deep); }
.pill-done      { background: var(--green-soft); color: var(--green-deep); }

.pill-live .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ============ TODAY ============ */

.today-date {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 27px;
  letter-spacing: -0.01em;
  margin: 4px 2px 2px;
}

.today-sub {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  margin: 0 2px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* timer card */
.timer-card { text-align: center; padding: 24px 18px 20px; }

.timer-elapsed {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 52px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  color: var(--teal-900);
}

.timer-label {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.btn-checkin, .btn-checkout {
  width: 100%;
  height: 62px;
  border: none;
  border-radius: 20px;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.12s;
}
.btn-checkin:active, .btn-checkout:active { transform: scale(0.97); }

.btn-checkin {
  background: linear-gradient(180deg, #37a267, var(--green-deep));
  box-shadow: 0 8px 22px rgba(46, 139, 87, 0.35);
}

.btn-checkout {
  background: linear-gradient(180deg, #d95a4f, #b93a30);
  box-shadow: 0 8px 22px rgba(201, 68, 58, 0.32);
}

.btn-checkin svg, .btn-checkout svg { width: 24px; height: 24px; }

.time-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.time-cell {
  background: var(--cream);
  border-radius: 16px;
  padding: 11px 8px;
}

.time-cell .k {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.time-cell .v {
  font-size: 17px;
  font-weight: 800;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.time-cell .v.green { color: var(--green-deep); }
.time-cell .v.red   { color: var(--red); }

/* tasks */
.task-list { display: grid; gap: 9px; }

.task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--cream);
  border-radius: 16px;
  padding: 13px 14px;
  border: 1.5px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  text-align: left;
  width: 100%;
  font-size: inherit;
}

button.task { border: 1.5px solid transparent; }
button.task:active { border-color: var(--teal-100); }

.task.done { background: var(--green-soft); }

.task-check {
  flex: none;
  width: 27px; height: 27px;
  border-radius: 50%;
  border: 2.5px solid var(--ink-faint);
  display: grid; place-items: center;
  margin-top: 1px;
  background: var(--card);
  transition: background 0.2s, border-color 0.2s;
}

.task.done .task-check {
  background: var(--green);
  border-color: var(--green);
}

.task-check svg {
  width: 15px; height: 15px;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.task.done .task-check svg { opacity: 1; transform: scale(1); }

.task-text { font-weight: 700; font-size: 16px; line-height: 1.35; }
.task.done .task-text { color: var(--green-deep); text-decoration: line-through; text-decoration-thickness: 1.5px; }

.task-place {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--amber);
  margin-top: 3px;
}
.task-place svg { width: 14px; height: 14px; flex: none; }

.task-remove {
  flex: none;
  margin-left: auto;
  border: none;
  background: none;
  color: var(--ink-faint);
  padding: 4px;
  border-radius: 8px;
}
.task-remove svg { width: 18px; height: 18px; }

/* notes */
.notes-area {
  width: 100%;
  min-height: 110px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--cream);
  padding: 13px 14px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.notes-area:focus { border-color: var(--teal-700); background: var(--card); }
.notes-area::placeholder { color: var(--ink-faint); font-weight: 600; }

.notes-saved {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--green-deep);
  margin-top: 6px;
  opacity: 0;
  transition: opacity 0.3s;
}
.notes-saved.show { opacity: 1; }

/* photos */
.photo-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.photo-thumb {
  flex: none;
  width: 86px; height: 86px;
  border-radius: 16px;
  object-fit: cover;
  border: none;
  padding: 0;
  background: var(--cream-deep);
  box-shadow: 0 2px 8px rgba(90, 74, 40, 0.14);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; display: block; }

.photo-add {
  flex: none;
  width: 86px; height: 86px;
  border-radius: 16px;
  border: 2px dashed var(--ink-faint);
  background: var(--cream);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  gap: 0;
  font-size: 12px;
  font-weight: 800;
}
.photo-add svg { width: 26px; height: 26px; margin-bottom: 2px; }

/* empty / rest day */
.rest-card {
  text-align: center;
  padding: 44px 24px;
}
.rest-emoji {
  width: 74px; height: 74px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--teal-50);
  display: grid; place-items: center;
  font-size: 34px;
}
.rest-title { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin-bottom: 6px; }
.rest-sub { color: var(--ink-soft); font-size: 15px; font-weight: 600; line-height: 1.5; }

.next-visit-link {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: var(--teal-50);
  color: var(--teal-800);
  font-weight: 800;
  font-size: 15px;
  border-radius: 999px;
  padding: 10px 18px;
}
.next-visit-link svg { width: 16px; height: 16px; }

/* ============ CALENDAR ============ */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 2px 14px;
}

.cal-month {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
}

.cal-nav { display: flex; gap: 8px; }

.cal-nav button {
  width: 40px; height: 40px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  display: grid; place-items: center;
}
.cal-nav svg { width: 18px; height: 18px; }

.cal-grid-card { padding: 14px 10px 12px; }

.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1 / 1.06;
  border: none;
  background: none;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  position: relative;
  transition: background 0.15s;
}
.cal-day:active { background: var(--cream-deep); }
.cal-day.blank { pointer-events: none; }
.cal-day.other { color: var(--ink-faint); }

.cal-day.scheduled {
  background: var(--teal-100);
  color: var(--teal-900);
  font-weight: 800;
}

.cal-day.today-ring { box-shadow: inset 0 0 0 2.5px var(--coral); }

.cal-day .hours-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.cal-day .spacer-dot { width: 6px; height: 6px; }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 6px 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-chip { width: 14px; height: 14px; border-radius: 5px; }
.legend-chip.sched { background: var(--teal-100); }
.legend-chip.today { box-shadow: inset 0 0 0 2px var(--coral); background: var(--card); }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ============ SHEET ============ */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(38, 32, 22, 0.45);
  z-index: 40;
  animation: fadein-plain 0.2s ease both;
}
@keyframes fadein-plain { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  max-height: 86dvh;
  background: var(--card);
  border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-float);
  z-index: 50;
  display: flex;
  flex-direction: column;
  animation: slideup 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes slideup {
  from { transform: translateX(-50%) translateY(100%); }
  to   { transform: translateX(-50%) translateY(0); }
}

.sheet-grab {
  width: 44px; height: 5px;
  border-radius: 3px;
  background: var(--line);
  margin: 10px auto 2px;
  flex: none;
}

.sheet-body {
  overflow-y: auto;
  padding: 10px 18px calc(26px + var(--safe-bottom));
}

.sheet-date {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 23px;
  margin-bottom: 4px;
}

.sheet-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.sheet-section {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
  margin: 18px 0 9px;
}

.sheet-note-text {
  background: var(--cream);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-soft);
}

.sheet-empty {
  color: var(--ink-faint);
  font-size: 14.5px;
  font-weight: 700;
  padding: 4px 2px;
}

/* admin editing inside sheet */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cream);
  border-radius: 16px;
  padding: 13px 15px;
  margin-bottom: 12px;
}
.toggle-row .t-label { font-weight: 800; font-size: 16px; }

.switch {
  position: relative;
  width: 54px; height: 32px;
  border-radius: 999px;
  border: none;
  background: var(--line);
  transition: background 0.2s;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.switch.on { background: var(--teal-700); }
.switch.on::after { transform: translateX(22px); }

.inline-input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--cream);
  padding: 0 14px;
  font-size: 16px;
  font-weight: 700;
  outline: none;
}
.inline-input:focus { border-color: var(--teal-700); background: var(--card); }

.add-task-row { display: grid; gap: 8px; margin-top: 10px; }

.btn-add-task {
  height: 48px;
  border: none;
  border-radius: 14px;
  background: var(--teal-700);
  color: #fff;
  font-size: 15.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.btn-add-task svg { width: 18px; height: 18px; }
.btn-add-task:active { background: var(--teal-800); }

/* ============ ACTIVITY ============ */

.activity-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 27px;
  margin: 4px 2px 2px;
}
.activity-sub {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  margin: 0 2px 16px;
}

.act-card { padding: 16px 18px; }

.act-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.act-date { font-family: var(--font-display); font-weight: 600; font-size: 18px; }

.act-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.act-meta .pill { font-size: 12.5px; padding: 3px 11px; }
.pill-tasks  { background: var(--teal-50); color: var(--teal-800); }
.pill-photos { background: var(--amber-soft); color: var(--amber); }

.act-note {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.5;
  border-left: 3px solid var(--coral-soft);
  padding-left: 11px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.act-caregiver { font-size: 13px; font-weight: 800; color: var(--ink-faint); }

/* ============ PHOTO VIEWER ============ */

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 17, 12, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  animation: fadein-plain 0.2s ease both;
}

.photo-viewer img {
  max-width: 100%;
  max-height: 70dvh;
  border-radius: 18px;
  box-shadow: 0 12px 44px rgba(0,0,0,0.5);
}

.photo-viewer-actions { display: flex; gap: 12px; }

/* misc */
.screen-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ============================================================
   Desktop Admin — "Fern" system. Deep green sidebar, mint,
   coral. Active for admins at >=1024px viewports.
   ============================================================ */

.da {
  --da-green: #1e5c50;
  --da-green-deep: #175046;
  --da-green-line: #2e7263;
  --da-mint: #8fe0c8;
  --da-mint-dim: #7fb3a5;
  --da-nav-text: #a9cfc4;
  --da-bg: #eef3ef;
  --da-ink: #1c332c;
  --da-muted: #6b8078;
  --da-faint: #9fb0a9;
  --da-line: #f0f4f1;
  --da-chip: #e6f0ec;
  --da-coral: #e8836f;
  --da-coral-soft: #fdf0ec;
  --da-amber: #b0764a;
  --da-amber-soft: #faf1e6;
  --da-card-shadow: 0 1px 4px rgba(20, 60, 50, 0.08);

  font-family: "Nunito Sans", "Nunito", -apple-system, sans-serif;
  color: var(--da-ink);
  background: var(--da-bg);
  min-height: 100dvh;
  display: flex;
}

/* :where() keeps this reset at zero extra specificity so single-class
   button styles (.da-btn, .da-daycard, …) below can override it */
.da :where(button) { border: none; background: none; color: inherit; font: inherit; }

/* ---- sidebar ---- */

.da-side {
  width: 240px;
  flex: none;
  background: var(--da-green);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  position: sticky;
  top: 0;
  height: 100dvh;
  box-sizing: border-box;
}

.da-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 26px;
  font-size: 18px;
  font-weight: 800;
}

.da-logo {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: rgba(255, 253, 248, 0.13);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.da-logo .mc-txt { font-size: 13.5px; }
.da-logo .mc-h { width: 7.5px; height: 7px; margin: -2px 0 0 1px; }

.da-nav { display: flex; flex-direction: column; gap: 4px; }

.da-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--da-nav-text);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.da-nav-item svg { width: 18px; height: 18px; flex: none; }
.da-nav-item:hover { background: rgba(255,255,255,0.06); }
.da-nav-item.active {
  background: var(--da-green-deep);
  color: #fff;
  font-weight: 800;
}
.da-nav-item.active svg { color: var(--da-mint); }

.da-side-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 10px 0;
  border-top: 1px solid var(--da-green-line);
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.da-side-user .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--da-green-line);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
  flex: none;
}
.da-side-user .who { display: flex; flex-direction: column; line-height: 1.25; }
.da-side-user .who .n { font-size: 13.5px; font-weight: 800; }
.da-side-user .who .r { font-size: 11.5px; color: var(--da-nav-text); font-weight: 600; }

/* ---- content ---- */

.da-content {
  flex: 1;
  min-width: 0;
  padding: 30px 34px 44px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.da-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.da-title { font-size: 25px; font-weight: 800; }
.da-subtitle { font-size: 14.5px; color: var(--da-muted); font-weight: 600; margin-top: 3px; }

.da-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--da-card-shadow);
  padding: 20px 24px;
}

.da-btn {
  background: var(--da-green);
  color: #fff;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s;
}
.da-btn:hover { background: var(--da-green-deep); }

.da-btn-soft {
  background: var(--da-chip);
  color: var(--da-green);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
.da-btn-soft:hover { background: #d9e8e1; }

.da-btn-coral {
  background: var(--da-coral);
  color: #fff;
  border-radius: 999px;
  padding: 13px 0;
  width: 100%;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.da-btn-coral:hover { filter: brightness(0.96); }

.da-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 800;
}
.da-pill.neutral { background: var(--da-bg); color: var(--da-muted); }
.da-pill.green   { background: var(--da-chip); color: var(--da-green); }
.da-pill.amber   { background: var(--da-amber-soft); color: var(--da-amber); }
.da-pill.coral   { background: var(--da-coral-soft); color: var(--da-coral); }

/* ---- overview / stats ---- */

.da-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

.da-stat {
  background: #fff;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--da-card-shadow);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.da-stat .v { font-size: 24px; font-weight: 800; color: var(--da-green); font-variant-numeric: tabular-nums; }
.da-stat .k { font-size: 13px; color: var(--da-muted); font-weight: 700; }
.da-stat.hero { background: var(--da-green-deep); }
.da-stat.hero .v { color: #fff; }
.da-stat.hero .k { color: var(--da-nav-text); }

/* ---- week planner ---- */

.da-week-head { display: flex; align-items: center; gap: 14px; }
.da-week-label { font-size: 22px; font-weight: 800; }

.da-week-nav {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  color: var(--da-muted);
  font-weight: 800;
  font-size: 16px;
  box-shadow: var(--da-card-shadow);
  cursor: pointer;
  display: grid; place-items: center;
}
.da-week-nav:hover { color: var(--da-green); }

.da-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: stretch;
}

.da-daycard {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--da-card-shadow);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
  min-height: 118px;
  box-sizing: border-box;
}
.da-daycard:hover { border-color: #cfdcd6; }
.da-daycard.is-today { border-color: var(--da-coral); }
.da-daycard.is-selected { border-color: var(--da-green); }

.da-daycard .dow { font-size: 11px; font-weight: 800; color: var(--da-faint); line-height: 1.2; }
.da-daycard .dom { font-size: 18px; font-weight: 800; color: var(--da-muted); line-height: 1.2; }
.da-daycard.has-visit .dow { color: var(--da-muted); }
.da-daycard.has-visit .dom { color: var(--da-green); }
.da-daycard.is-today .dow { color: var(--da-coral); }

.da-visit-chip {
  background: var(--da-chip);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.da-visit-chip.live { background: var(--da-coral-soft); }

.da-visit-chip .cg { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; }
.da-visit-chip .cg .av {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--da-green);
  color: #fff;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800;
  flex: none;
}
.da-visit-chip.live .cg .av { background: var(--da-coral); }

.da-visit-chip .st { font-size: 11.5px; font-weight: 800; color: var(--da-green); font-variant-numeric: tabular-nums; }
.da-visit-chip.live .st { color: var(--da-coral); }
.da-visit-chip .mt { font-size: 11px; color: var(--da-muted); font-weight: 600; }

.da-add-visit {
  border: 2px dashed #cfdcd6;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--da-green);
}
.da-daycard:hover .da-add-visit { border-color: var(--da-mint-dim); }

.da-novisit { font-size: 12.5px; color: var(--da-faint); font-weight: 700; flex: 1; }

/* ---- editor + side column ---- */

.da-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.da-editor { display: flex; flex-direction: column; gap: 14px; }

.da-editor-head { display: flex; align-items: center; justify-content: space-between; }
.da-editor-head .t { font-size: 16.5px; font-weight: 800; }

.da-cg-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.da-cg-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px 8px 8px;
  border-radius: 999px;
  background: var(--da-bg);
  color: var(--da-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.da-cg-chip .av {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #dfe9e3;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
}
.da-cg-chip.selected { background: var(--da-green); color: #fff; }
.da-cg-chip.selected .av { background: var(--da-green-line); color: #fff; }

.da-task-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--da-bg);
  border-radius: 12px;
  padding: 11px 14px;
}
.da-task-row .r1 { display: flex; align-items: center; gap: 10px; }
.da-task-row .r1 .txt { flex: 1; font-size: 14px; font-weight: 700; }
.da-task-row .r1 .txt.done { color: var(--da-green); text-decoration: line-through; }
.da-task-row .rm { color: var(--da-faint); font-size: 15px; cursor: pointer; padding: 2px 4px; }
.da-task-row .rm:hover { color: var(--da-coral); }
.da-task-row .pl { font-size: 12px; color: var(--da-amber); font-weight: 800; }

.da-addtask { display: flex; gap: 8px; }
.da-addtask input {
  border: 2px solid #e2eae5;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  background: #fff;
  min-width: 0;
}
.da-addtask input:focus { border-color: var(--da-green); }
.da-addtask .f-task { flex: 1.3; }
.da-addtask .f-place { flex: 1; }
.da-addtask .go {
  width: 44px;
  flex: none;
  border-radius: 12px;
  background: var(--da-green);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: grid; place-items: center;
}

.da-tpl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.da-tpl-chip {
  background: var(--da-bg);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--da-muted);
  cursor: pointer;
}
.da-tpl-chip:hover { border-color: var(--da-green); color: var(--da-green); }

.da-editor-foot { display: flex; align-items: center; gap: 12px; }
.da-unschedule {
  font-size: 13px;
  font-weight: 800;
  color: var(--da-coral);
  cursor: pointer;
  white-space: nowrap;
  padding: 0 6px;
}

.da-side-col { display: flex; flex-direction: column; gap: 16px; }

.da-person-row { display: flex; align-items: center; gap: 11px; padding: 7px 0; }
.da-person-row .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--da-chip);
  color: var(--da-green);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
  flex: none;
}
.da-person-row .av.solid { background: var(--da-green); color: #fff; }
.da-person-row .info { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.da-person-row .info .n { font-size: 14px; font-weight: 800; }
.da-person-row .info .d { font-size: 12px; color: var(--da-muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.da-h3 { font-size: 16.5px; font-weight: 800; }
.da-card-headrow { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; }
.da-link { font-size: 13px; font-weight: 800; color: var(--da-green); cursor: pointer; }
.da-link:hover { text-decoration: underline; }

/* ---- lists on manage ---- */

.da-list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--da-line);
}
.da-list-row .av {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--da-chip);
  color: var(--da-green);
  display: grid; place-items: center;
  font-size: 16px; font-weight: 800;
  flex: none;
}
.da-list-row .av.solid { background: var(--da-green); color: #fff; }
.da-list-row .info { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.da-list-row .info .n { font-size: 15.5px; font-weight: 800; }
.da-list-row .info .d { font-size: 12.5px; color: var(--da-muted); font-weight: 600; }

.da-tpl-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--da-line); }
.da-tpl-row .ic { font-size: 16px; flex: none; }
.da-tpl-row .info { flex: 1; display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.da-tpl-row .info .n { font-size: 14.5px; font-weight: 700; }
.da-tpl-row .info .d { font-size: 12px; color: var(--da-muted); font-weight: 600; }

.da-manage-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; align-items: start; }

.da-profile-card { display: flex; align-items: center; gap: 18px; padding: 22px 26px; }
.da-profile-card .badge {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--da-coral-soft);
  display: grid; place-items: center;
  flex: none;
}
.da-profile-card .info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.da-profile-card .info .n { font-size: 19px; font-weight: 800; }
.da-profile-card .info .d { font-size: 13.5px; color: var(--da-muted); font-weight: 600; }

.da-heart-lg { position: relative; width: 26px; height: 23px; }
.da-heart-lg .c { position: absolute; left: 0; top: 5px; width: 17px; height: 17px; background: var(--da-coral); transform: rotate(45deg); border-radius: 3px; }
.da-heart-lg .l { position: absolute; left: -2px; top: 0; width: 15px; height: 15px; background: var(--da-coral); border-radius: 50%; }
.da-heart-lg .r { position: absolute; right: -2px; top: 0; width: 15px; height: 15px; background: var(--da-coral); border-radius: 50%; }

/* ---- activity ---- */

.da-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.da-filter-chip {
  font-size: 13px;
  font-weight: 800;
  background: #fff;
  color: var(--da-muted);
  border-radius: 999px;
  padding: 9px 16px;
  box-shadow: var(--da-card-shadow);
  cursor: pointer;
}
.da-filter-chip.active { background: var(--da-green); color: #fff; }

.da-act-row { display: flex; gap: 22px; }

.da-act-left {
  width: 180px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--da-line);
  padding-right: 22px;
}
.da-act-left .d { font-size: 15.5px; font-weight: 800; }
.da-act-left .w { font-size: 12.5px; color: var(--da-muted); font-weight: 600; }
.da-act-left .h { font-size: 20px; font-weight: 800; color: var(--da-green); font-variant-numeric: tabular-nums; }
.da-act-left .live-tag { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--da-coral); }
.da-act-left .live-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--da-coral); animation: blink 1.6s ease-in-out infinite; }

.da-act-mid { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.da-act-note {
  font-size: 14px;
  line-height: 1.55;
  color: #41564e;
  border-left: 3px solid var(--da-coral-soft);
  padding-left: 12px;
  font-weight: 600;
}

.da-act-photos { display: flex; gap: 8px; align-items: flex-start; flex: none; }
.da-act-photos .ph {
  width: 74px; height: 74px;
  border-radius: 12px;
  object-fit: cover;
  cursor: pointer;
  border: none;
  padding: 0;
  background: var(--da-bg);
}
.da-act-photos .ph img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }

.da-empty { color: var(--da-faint); font-size: 14px; font-weight: 700; padding: 8px 0; }

/* ---- modal ---- */

.da-modal-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 40, 33, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadein-plain 0.18s ease both;
}

.da-modal {
  width: 460px;
  max-width: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(12, 40, 33, 0.35);
  font-family: "Nunito Sans", "Nunito", sans-serif;
  color: #1c332c;
  animation: rise 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.da-modal .m-head { display: flex; align-items: center; justify-content: space-between; }
.da-modal .m-title { font-size: 20px; font-weight: 800; }
.da-modal .m-close { font-size: 22px; color: #9fb0a9; cursor: pointer; border: none; background: none; }
.da-modal .m-sub { font-size: 14px; color: #6b8078; font-weight: 600; line-height: 1.55; }

.da-modal .m-field { display: flex; flex-direction: column; gap: 6px; }
.da-modal .m-field label { font-size: 13px; font-weight: 800; }
.da-modal .m-field input {
  border: 2px solid #e2eae5;
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 15.5px;
  font-weight: 700;
  outline: none;
}
.da-modal .m-field input:focus { border-color: #1e5c50; }

.da-modal .m-actions { display: flex; gap: 10px; padding-top: 4px; }
.da-modal .m-cancel {
  flex: 1;
  border: 2px solid #e2eae5;
  border-radius: 999px;
  padding: 13px 0;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: #6b8078;
  cursor: pointer;
  background: none;
}
.da-modal .m-go {
  flex: 1;
  background: #1e5c50;
  color: #fff;
  border-radius: 999px;
  padding: 13px 0;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  border: none;
}
.da-modal .m-go:hover { background: #175046; }

/* ---- settings ---- */

.da-settings-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; align-items: start; }

.da-set-field { display: flex; flex-direction: column; gap: 6px; padding: 10px 0 4px; }
.da-set-field label { font-size: 13px; font-weight: 800; }
.da-set-field input,
.da-set-field textarea {
  border: 2px solid #e2eae5;
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 15.5px;
  font-weight: 700;
  outline: none;
  resize: vertical;
  line-height: 1.5;
}
.da-set-field input:focus,
.da-set-field textarea:focus { border-color: #1e5c50; }

.da-card .hint { display: block; font-size: 13px; font-weight: 600; color: #6b8078; line-height: 1.5; padding: 2px 0 6px; }

.da-set-actions { display: flex; align-items: center; gap: 14px; padding-top: 10px; }
.da-set-status { font-size: 14px; font-weight: 800; color: #1e5c50; }

.da-set-share { padding: 6px 0 10px; }
.da-set-share img {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid #e2eae5;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}
