/* Food to Am — calm olive / soft green, mobile-first */
:root {
  --olive: #5a7a4a;
  --olive-dark: #3d5534;
  --olive-light: #8aab78;
  --olive-soft: #eef5e8;
  --cream: #f3f6ef;
  --card: #ffffff;
  --muted: #6b7a64;
  --border: #d5e0cc;
  --danger: #b54a3a;
  --ok: #3d7a4a;
  --warn: #a07a30;
  --shadow: 0 2px 12px rgba(60, 80, 50, 0.07);
  --radius: 16px;
  --font: "Noto Sans Bengali", "Hind Siliguri", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font);
  background: var(--cream);
  color: #2a3326;
  min-height: 100%;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.45;
}

body { padding-bottom: 78px; }

.app-header {
  background: linear-gradient(135deg, var(--olive) 0%, var(--olive-dark) 100%);
  color: #fff;
  padding: 16px 18px 14px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: var(--shadow);
}

.app-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.app-header .sub {
  font-size: 0.8rem;
  opacity: 0.92;
  margin-top: 3px;
  font-weight: 400;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-ghost {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.05rem;
  color: var(--olive-dark);
  margin-bottom: 10px;
  font-weight: 700;
}

.page-title {
  font-size: 1.15rem;
  color: var(--olive-dark);
  font-weight: 700;
}

.muted { color: var(--muted); font-size: 0.85rem; }

.tip {
  background: var(--olive-soft);
  border-left: 3px solid var(--olive-light);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  color: var(--olive-dark);
  margin-bottom: 14px;
  line-height: 1.4;
}

.tip-inline {
  margin-bottom: 10px;
  font-size: 0.82rem;
}

/* Onboarding strip */
.onboard-strip {
  background: var(--olive-soft);
  border: 1px solid var(--border);
  color: var(--olive-dark);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

.onboard-strip.tiny {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 8px 10px;
  opacity: 0.95;
}

/* HOW-IT-WORKS */
.how-card h2 { margin-bottom: 14px; }

.how-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.how-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--olive);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-steps strong {
  display: block;
  color: var(--olive-dark);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.how-steps p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.role-hint { margin-bottom: 12px; }

/* Role profile cards */
.profile-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 16px 16px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fafcf8 0%, #f5f9f2 100%);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  font-family: inherit;
  min-height: 72px;
}

.profile-btn:hover,
.profile-btn:focus {
  border-color: var(--olive);
  background: var(--olive-soft);
  outline: none;
  box-shadow: 0 0 0 3px rgba(90, 122, 74, 0.15);
}

.profile-btn .label {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--olive-dark);
  line-height: 1.3;
}

.profile-btn .duty {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.35;
}

.profile-btn .meta {
  font-size: 0.75rem;
  color: var(--olive-light);
  margin-top: 8px;
  font-weight: 500;
}

.profile-btn .role-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e4ecde;
  color: var(--olive-dark);
  margin-bottom: 6px;
}

.profile-btn .role-tag.owner {
  background: #dce8f5;
  color: #345a8a;
}

.pin-box { margin-top: 4px; }
.pin-box label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--muted);
}

input[type="password"],
input[type="text"],
input[type="time"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1.05rem;
  font-family: inherit;
  background: #fff;
}

input:focus, textarea:focus {
  outline: 2px solid var(--olive-light);
  border-color: var(--olive);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.btn-lg {
  padding: 16px 14px;
  font-size: 1.05rem;
  min-height: 52px;
}

.btn-primary { background: var(--olive); color: #fff; }
.btn-primary:active { background: var(--olive-dark); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:active { background: #2f5e3a; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:active { background: #943a2e; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--olive);
  color: var(--olive-dark);
}
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.btn-row .btn { flex: 1; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.big-actions { margin-top: 16px; }

.err {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 8px;
  min-height: 1.2em;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}
.badge-in { background: #d4edd8; color: var(--ok); }
.badge-out { background: #eceeea; color: #666; }
.badge-done { background: #e0e8f5; color: #345a8a; }

/* Today / home */
.today-card .today-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.today-card .today-head h2 { margin-bottom: 0; }

.shift-block {
  margin-top: 12px;
  padding: 14px;
  background: var(--olive-soft);
  border-radius: 12px;
  text-align: center;
}

.shift-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.shift-range {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--olive-dark);
  letter-spacing: 0.02em;
}

.att-status { margin-top: 8px; }
.att-times { margin-top: 10px; text-align: center; font-size: 0.8rem; }

.task-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.task-head h2 { margin-bottom: 0; }

.task-pct {
  font-weight: 700;
  color: var(--olive);
  font-size: 0.95rem;
}

.task-hint { margin: 10px 0 8px; }

/* Tasks */
.task-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.task-item:last-child { border-bottom: none; }

.task-item input[type="checkbox"] {
  width: 24px;
  height: 24px;
  accent-color: var(--olive);
  margin-top: 2px;
}

.task-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #2a3326;
}

.task-item.done .task-title {
  text-decoration: line-through;
  color: var(--muted);
}

.task-note {
  grid-column: 2;
  font-size: 0.88rem !important;
  padding: 8px 10px !important;
  background: #fafcf8 !important;
}

/* Progress */
.progress {
  height: 6px;
  background: #e4ecde;
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}

.progress-lg {
  height: 10px;
  border-radius: 6px;
  margin-top: 0;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--olive-light), var(--olive));
  border-radius: 6px;
  transition: width 0.25s ease;
}

/* Dashboard */
.dash-title-row {
  margin-bottom: 14px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

.dash-stat {
  text-align: center;
  padding: 18px 12px;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--olive-dark);
  line-height: 1.25;
}

.stat-value .stat-sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
}

.people-list { margin-top: 4px; }

.person-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.person-card:last-child { border-bottom: none; }

.person-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.person-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--olive-dark);
}

.person-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.person-task-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
}

.activity-list { margin-top: 4px; }

.activity-item {
  font-size: 0.82rem;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--muted);
  line-height: 1.4;
}

.activity-item:last-child { border-bottom: none; }
.activity-item strong { color: #333; }
.activity-item .act-time {
  display: block;
  font-size: 0.72rem;
  margin-top: 2px;
  opacity: 0.85;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 30;
  box-shadow: 0 -2px 10px rgba(60, 80, 50, 0.05);
}

.bottom-nav button {
  flex: 1;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 6px 2px;
  cursor: pointer;
}

.bottom-nav button.active {
  color: var(--olive-dark);
  font-weight: 700;
}

.bottom-nav .ico {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.hidden { display: none !important; }

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.settings-form .row-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.settings-card-title {
  font-weight: 700;
  color: var(--olive-dark);
  margin-bottom: 10px;
  font-size: 1rem;
}

@media (min-width: 600px) {
  .bottom-nav {
    max-width: 560px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 14px 14px 0 0;
  }
}
