/* Village West Team app. Hand-written styles, no CDN. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #FFFFFF;
  --text: #191919;
  --muted: #6B6B6B;
  --line: #ECECEA;
  --soft: #FAFAF9;
  --green: #163D38;
  --green-soft: #E4ECE7;
  --coral-line: #E58B7C;
  --coral-bg: #F8E6E1;
  --coral-text: #A63A2B;
  --badge: #C9432F;
  --tab-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: anywhere;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--green); }
h1, h2, h3, p { margin: 0; }
svg.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

#app { max-width: 430px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.screen { padding: calc(24px + var(--safe-t)) 24px calc(var(--tab-h) + var(--safe-b) + 32px); animation: fade .22s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Header */
.hello { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 20px; flex: none; }
.hello-text { flex: 1; min-width: 0; }
.hello-small { color: var(--muted); font-size: 14px; line-height: 1.3; }
.hello-name { font-size: 22px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.wordmark { font-size: 11px; letter-spacing: .28em; color: var(--muted); font-weight: 500; white-space: nowrap; margin-right: -.28em; }
.beta { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 2px 8px; }

/* Cards and buttons */
.card { border: 1px solid var(--line); border-radius: 20px; padding: 20px; background: #fff; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 17px; font-weight: 600; line-height: 1.35; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 12px 20px; border-radius: 16px; font-weight: 600; font-size: 17px; text-decoration: none; transition: transform .08s ease, opacity .15s ease; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--green); color: #fff; }
.btn-outline { border: 1.5px solid var(--green); color: var(--green); background: #fff; }
.btn[disabled] { opacity: .55; }
.section-label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 28px 0 12px; }
.rows { margin-top: 12px; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.row:first-child { border-top: 0; }
.row b { font-weight: 600; text-align: right; }

/* Centered states */
.center { min-height: calc(100vh - var(--tab-h)); min-height: calc(100dvh - var(--tab-h)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 28px; animation: fade .22s ease both; }
.center.full { min-height: 100vh; min-height: 100dvh; }
.bubble { width: 96px; height: 96px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.bubble svg.ic { width: 40px; height: 40px; }
.bubble.coral { background: var(--coral-bg); color: var(--coral-text); }
.center h1 { font-size: 26px; font-weight: 600; line-height: 1.25; margin-bottom: 12px; }
.center p { color: var(--muted); font-size: 17px; max-width: 320px; }
.center .btn { margin-top: 28px; max-width: 320px; }

/* Skeleton */
.sk { background: #F1F1EF; border-radius: 10px; animation: pulse 1.3s ease-in-out infinite; }
.sk-circle { width: 52px; height: 52px; border-radius: 50%; }
.sk-card { height: 150px; border-radius: 20px; margin-top: 16px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* Bottom bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabbar[hidden] { display: none; }
.tabbar-in { max-width: 430px; margin: 0 auto; display: flex; height: var(--tab-h); }
.tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 500; position: relative; }
.tab.on { color: var(--green); font-weight: 600; }
.tab .ic-wrap { position: relative; display: flex; }
.tab .count { position: absolute; top: -7px; right: -12px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--badge); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-sizing: content-box; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px); background: var(--text); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 40; max-width: calc(100vw - 48px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
