body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial; margin: 0; background:#f7faf9; }
.topbar { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; background:#0b8457; color:white; }
.container { max-width: 1000px; margin: 24px auto; padding: 0 16px; }
.card { background:white; padding:16px; border-radius:12px; box-shadow:0 1px 3px rgba(0,0,0,.1); margin-bottom:16px; }
.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
label { display:block; margin:8px 0; }
input, select { padding:8px; border:1px solid #cbd5e1; border-radius:8px; width:100%; max-width:360px; }
button, .btn { background:#0b8457; color:white; border:none; padding:8px 12px; border-radius:8px; cursor:pointer; }
button[disabled] { background:#9ca3af; cursor:not-allowed; }
.logout button { background:#0a6d49; }
.footer { color:#6b7280; font-size:12px; text-align:center; padding:16px 0; }
.tag { font-size:12px; background:#eef2ff; color:#3730a3; padding:2px 6px; border-radius:999px; margin-left:6px;}
.member { margin-bottom:12px; }
.err { color:#b91c1c; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: 16px; padding: 10px 14px; background:#065f46; color:#fff;
  border-radius: 10px; opacity:0; pointer-events:none; transition: opacity .6s ease;
  box-shadow:0 4px 14px rgba(0,0,0,.2); z-index:9999;
}
.toast.show { opacity:1; }
.toast.fade { opacity:0; transition: opacity 1.5s ease; }
.icon { margin-left:6px; }
/* Tabs */
.tabs { display:flex; gap:8px; padding:8px 16px; background:#e9f5f0; border-bottom:1px solid #cbd5e1; }
.tabs a { padding:8px 12px; border-radius:999px; text-decoration:none; color:#065f46; }
.tabs a.active { background:white; box-shadow:0 1px 3px rgba(0,0,0,.08); color:#0b8457; }
.card-header { display:flex; align-items:center; justify-content:space-between; }
.muted { color:#6b7280; font-size:.9em; }
/* --- Navigation Tabs (pill buttons) --- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;                 /* light, neutral bar */
  border-bottom: 1px solid #e2e8f0;
}

/* kill underline with high specificity (covers all link states) */
.tabs .tab,
.tabs .tab:link,
.tabs .tab:visited,
.tabs .tab:hover,
.tabs .tab:active,
.tabs .tab:focus {
  text-decoration: none !important;
}

/* base pill */
.tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1;
  color: #065f46;                       /* deep green text */
  background: #ffffff;
  border: 1px solid #d1fae5;            /* pale green border */
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  will-change: transform;
}

/* hover/focus */
.tabs .tab:hover,
.tabs .tab:focus {
  background: #ecfdf5;                  /* minty hover */
  color: #047857;
  border-color: #a7f3d0;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,.08);
  outline: none;
}

/* active/current tab */
.tabs .tab.active {
  color: #ffffff;
  background: #0b8457;                  /* theme green */
  border-color: #0b8457;
  box-shadow: 0 4px 12px rgba(11,132,87,.25);
}

/* small underline accent under active tab */
.tabs .tab.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 25%;
  width: 50%;
  height: 3px;
  border-radius: 2px;
  background: #0b8457;
}

/* compact on small screens */
@media (max-width: 640px) {
  .tabs {
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
  }
  .tabs .tab {
    padding: 8px 12px;
    font-weight: 600;
    white-space: nowrap;
  }
}

/* Tabs – force styles to beat :link/:visited */
.tabs .tab,
.tabs .tab:link,
.tabs .tab:visited,
.tabs .tab:hover,
.tabs .tab:active,
.tabs .tab:focus {
  text-decoration: none !important;
}

/* ensure ::after positions relative to the pill */
.tabs .tab {
  position: relative; /* needed for the active underline accent */
}

/* --- Groups page button layout --- */
.group-buttons {
  display: flex;
  gap: 8px;
}

/* Mobile: stack the buttons vertically so they don't squish */
@media (max-width: 640px) {
  .card-header {
    align-items: flex-start;
  }

  .group-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 220px;  /* optional: keeps them from getting too wide */
    margin-top: 8px;
  }

  .group-buttons .btn {
    width: 100%;
    text-align: center;
  }
}
/* --- App-style mobile tweaks --- */
body {
  line-height: 1.5;
}

/* Make the header & content feel more like a native app on small screens */
@media (max-width: 640px) {

  /* Top header: stack and shrink a bit */
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 16px 12px;
  }

  .topbar h1 {
    font-size: 1.4rem;     /* smaller so it doesn’t dominate */
    margin: 0;
    line-height: 1.3;
  }

  .topbar .welcome {
    font-size: 0.9rem;
    opacity: 0.95;
  }

  .logout button {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  /* Main content spacing */
  .container {
    margin: 12px auto 20px;
    padding: 0 12px 24px;
  }

  .card {
    padding: 14px 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
  }

  h2 {
    font-size: 1.3rem;
    margin: 8px 0 12px;
  }

  h3 {
    font-size: 1.1rem;
    margin: 4px 0 10px;
  }

  /* “My Groups” create/join area already stacks; this just softens it a bit */
  .group-buttons .btn {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  /* Gift lists: add breathing room between items */
  .list {
    padding-left: 1.1rem;
  }

  .list li {
    padding: 4px 0 6px;
  }

  .list li .tag {
    margin-top: 2px;
    display: inline-block;
  }

  /* “Add surprise gift” text box spacing */
  input[type="text"] {
    font-size: 0.95rem;
  }

  .footer {
    f



