:root {
  --green:#174d3b; --green-2:#236c50; --paper:#f6f0df; --paper-2:#fffdf5;
  --ink:#18332b; --muted:#67766f; --saffron:#e9772b; --gold:#e9b84d;
  --red:#b84b3c; --line:rgba(24,51,43,.12); --shadow:0 18px 45px rgba(36,57,44,.12);
  --radius:22px;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  margin:0; min-height:100vh; color:var(--ink); background:
    radial-gradient(circle at 10% 3%, rgba(233,184,77,.18), transparent 24rem),
    linear-gradient(180deg,#f9f4e6 0%,#efe8d5 100%);
  font-family:"Anek Devanagari",sans-serif; font-size:16px; line-height:1.45;
}
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
.app-shell { min-height:100vh; min-height:100dvh; padding-bottom:calc(96px + env(safe-area-inset-bottom,0px)); }
.topbar {
  position:sticky; top:0; z-index:40; height:74px; padding:0 max(20px,calc((100vw - 1180px)/2));
  display:flex; align-items:center; justify-content:space-between;
  background:rgba(249,244,230,.86); border-bottom:1px solid rgba(23,77,59,.08);
  backdrop-filter:blur(18px);
}
.brand { display:flex; align-items:center; border:0; background:transparent; color:var(--ink); padding:0; }
.brand-mark { width:43px; height:43px; display:grid; place-items:center; border-radius:15px 15px 15px 5px; background:var(--green); color:white; box-shadow:0 8px 20px rgba(23,77,59,.24); }
.brand-mark svg { width:25px; }
.brand-copy { text-align:left; }
.brand-copy strong { display:block; font-family:"Tiro Devanagari Hindi",serif; font-size:23px; line-height:1.1; }
.brand-copy span { color:var(--muted); font-size:12px; }
.profile-pill { display:flex; align-items:center; gap:9px; border:1px solid var(--line); background:rgba(255,253,245,.9); border-radius:99px; padding:5px 12px 5px 6px; color:var(--ink); }
.avatar { width:38px; height:38px; display:grid; place-items:center; flex:none; border-radius:50%; background:linear-gradient(135deg,var(--saffron),var(--gold)); color:white; font-weight:700; overflow:hidden; }
.profile-pill small { display:block; color:var(--muted); font-size:11px; }
.profile-pill b { display:block; font-size:14px; line-height:1.1; }
.page { width:min(1180px,calc(100% - 36px)); margin:0 auto; padding:28px 0 46px; animation:pageIn .35s ease both; }
@keyframes pageIn { from { opacity:0; transform:translateY(8px); } }
.page-heading { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:22px; }
.eyebrow { margin:0 0 5px; color:var(--saffron); font-weight:700; letter-spacing:.08em; text-transform:uppercase; font-size:12px; }
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:4px; font-family:"Tiro Devanagari Hindi",serif; font-size:clamp(28px,5vw,42px); line-height:1.2; font-weight:400; }
h2 { font-family:"Tiro Devanagari Hindi",serif; font-weight:400; }
.subtle { color:var(--muted); }
.bottom-nav { position:fixed !important; z-index:50; top:auto !important; left:50%; bottom:max(14px,env(safe-area-inset-bottom,0px)) !important; transform:translateX(-50%); width:min(680px,calc(100% - 24px)); height:68px; display:flex; align-items:center; justify-content:space-around; padding:7px; border:1px solid rgba(255,255,255,.6); border-radius:24px; background:rgba(23,77,59,.96); box-shadow:0 15px 45px rgba(17,50,39,.3); backdrop-filter:blur(14px); }
.nav-item { flex:1; height:54px; min-width:0; display:grid; place-items:center; align-content:center; gap:1px; border:0; border-radius:18px; background:transparent; color:rgba(255,255,255,.65); transition:.2s ease; }
.nav-item svg { width:21px; height:21px; }
.nav-item span { font-size:11px; line-height:1; }
.nav-item.active { background:#fff8e7; color:var(--green); transform:translateY(-3px); box-shadow:0 7px 20px rgba(0,0,0,.2); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; border:0; border-radius:14px; padding:10px 17px; font-weight:600; color:white; background:var(--green); transition:.2s ease; }
.btn:hover { transform:translateY(-1px); box-shadow:0 8px 22px rgba(23,77,59,.18); }
.btn.secondary { background:var(--saffron); }
.btn.ghost { background:transparent; border:1px solid var(--line); color:var(--ink); }
.btn.small { min-height:34px; padding:6px 12px; border-radius:10px; font-size:13px; }
.btn.icon { width:44px; padding:0; }
.grid { display:grid; gap:18px; }
.card { position:relative; overflow:hidden; border:1px solid rgba(23,77,59,.1); border-radius:var(--radius); background:rgba(255,253,245,.88); box-shadow:0 5px 18px rgba(36,57,44,.055); }
.card-pad { padding:22px; }
.section-title { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:30px 0 14px; }
.section-title h2 { margin:0; font-size:24px; }
.link-btn { border:0; background:transparent; color:var(--saffron); font-weight:700; }
.search-wrap { display:flex; align-items:center; gap:10px; min-width:min(370px,100%); padding:0 15px; background:var(--paper-2); border:1px solid var(--line); border-radius:15px; }
.search-wrap svg { width:20px; color:var(--muted); }
.search-wrap input { width:100%; height:46px; border:0; outline:0; color:var(--ink); background:transparent; }
.empty { padding:45px 20px; text-align:center; color:var(--muted); }
.empty .empty-icon { width:58px; height:58px; display:grid; place-items:center; margin:0 auto 12px; background:#ecf0e6; border-radius:20px; font-size:26px; }
@media(max-width:720px){
  .topbar { height:66px; padding:0 16px; }
  .brand-copy span,.profile-pill small { display:none; }
  .profile-pill { padding-right:7px; }
  .profile-pill b { display:none; }
  .page { width:min(100% - 24px,1180px); padding-top:20px; }
  .page-heading { align-items:stretch; flex-direction:column; }
  .search-wrap { min-width:100%; }
  .btn-label-mobile { display:none; }
  .bottom-nav { left:12px; right:12px; bottom:max(8px,env(safe-area-inset-bottom,0px)) !important; width:auto; transform:none; }
}

/* Home */
.hero { min-height:290px; display:grid; grid-template-columns:1.35fr .65fr; gap:28px; align-items:center; padding:34px 38px; color:white; border-radius:30px; overflow:hidden; background:var(--green); box-shadow:var(--shadow); }
.hero:before,.hero:after { content:""; position:absolute; pointer-events:none; }
.hero:before { width:330px; height:330px; right:-95px; top:-135px; border:45px solid rgba(233,184,77,.2); border-radius:50%; }
.hero:after { width:170px; height:170px; right:21%; bottom:-120px; border:35px solid rgba(255,255,255,.09); border-radius:50%; }
.hero-copy { position:relative; z-index:2; }
.hero .eyebrow { color:#f5c961; }
.hero h1 { max-width:650px; font-size:clamp(34px,6vw,58px); }
.hero p { max-width:590px; color:rgba(255,255,255,.75); }
.hero-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.hero .btn { background:#f8d16d; color:var(--ink); }
.hero .btn.ghost { background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.24); color:white; }
.village-art { position:relative; z-index:2; height:220px; display:flex; align-items:end; justify-content:center; }
.sun { position:absolute; top:5px; right:45px; width:78px; height:78px; border-radius:50%; background:var(--gold); box-shadow:0 0 0 18px rgba(233,184,77,.12); }
.house { position:relative; width:155px; height:108px; border-radius:7px 7px 0 0; background:#f3e2b3; box-shadow:-45px 20px 0 -9px #df7b42; }
.house:before { content:""; position:absolute; left:-17px; top:-54px; border-left:94px solid transparent; border-right:94px solid transparent; border-bottom:67px solid #bd4d31; }
.house:after { content:""; position:absolute; width:33px; height:65px; left:61px; bottom:0; border-radius:18px 18px 0 0; background:var(--green); }
.stats { grid-template-columns:repeat(4,1fr); margin-top:18px; }
.stat-card { padding:19px 20px; display:flex; align-items:center; gap:14px; }
.stat-icon { width:45px; height:45px; display:grid; place-items:center; flex:none; border-radius:15px; background:#e8eee4; color:var(--green); }
.stat-icon.orange { background:#fbe7d7; color:var(--saffron); }
.stat-icon.gold { background:#faefd0; color:#a96b16; }
.stat-icon.red { background:#f8dfdb; color:var(--red); }
.stat-number { font-size:25px; font-weight:700; line-height:1; }
.stat-label { color:var(--muted); font-size:13px; }
.home-columns { grid-template-columns:1.1fr .9fr; }
.event-spotlight { padding:25px; background:linear-gradient(135deg,#fff9e8,#f7ebc8); }
.date-badge { width:66px; height:72px; display:grid; place-items:center; align-content:center; float:left; margin:0 17px 10px 0; color:white; border-radius:18px; background:var(--saffron); transform:rotate(-2deg); }
.date-badge b { font-size:26px; line-height:1; }
.date-badge span { font-size:12px; }
.notice-list { display:grid; gap:10px; }
.notice { display:flex; gap:13px; padding:12px 0; border-bottom:1px dashed var(--line); }
.notice:last-child { border:0; }
.notice-dot { width:10px; height:10px; flex:none; margin-top:7px; border:3px solid #b5c7b8; border-radius:50%; }
.notice p { margin:0; font-size:14px; }
.notice time { color:var(--muted); font-size:12px; }

/* Members and businesses */
.member-grid,.business-grid { grid-template-columns:repeat(3,1fr); }
.member-card { padding:21px; }
.member-head { display:flex; align-items:center; gap:13px; }
.member-card .avatar { width:54px; height:54px; font-size:18px; }
.member-card h3,.business-card h3 { margin:0; font-size:18px; }
.member-card .role,.business-card .category { color:var(--saffron); font-size:13px; font-weight:600; }
.info-row { display:flex; gap:8px; align-items:center; margin-top:10px; color:var(--muted); font-size:13px; }
.info-row svg { width:16px; flex:none; }
.member-actions { display:flex; gap:8px; margin-top:17px; padding-top:15px; border-top:1px solid var(--line); }
.business-card { padding:0; }
.business-banner { height:112px; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#dfece2,#f8edcc); font-size:48px; }
.business-body { padding:19px; }
.tag { display:inline-flex; align-items:center; min-height:25px; padding:3px 9px; border-radius:99px; background:#e5eee7; color:var(--green); font-size:12px; }
.filter-row { display:flex; gap:8px; overflow:auto; margin-bottom:18px; padding-bottom:3px; scrollbar-width:none; }
.filter-chip { white-space:nowrap; border:1px solid var(--line); border-radius:99px; padding:7px 14px; background:rgba(255,253,245,.8); color:var(--muted); }
.filter-chip.active { background:var(--green); color:white; border-color:var(--green); }

/* Events and committee */
.event-list { display:grid; gap:15px; }
.event-card { display:grid; grid-template-columns:110px 1fr auto; gap:20px; align-items:center; padding:20px; }
.event-date { padding:16px; border-radius:17px; text-align:center; color:var(--green); background:#e5eee7; }
.event-date b { display:block; font-size:27px; }
.event-card h3 { margin-bottom:4px; }
.event-meta { display:flex; gap:15px; flex-wrap:wrap; color:var(--muted); font-size:13px; }
.privacy-banner { display:flex; gap:13px; align-items:center; padding:16px 20px; margin-bottom:17px; border:1px solid rgba(233,119,43,.25); border-radius:18px; background:#fff4e6; }
.privacy-banner svg { width:28px; color:var(--saffron); }
.privacy-banner p { margin:0; }
.ledger-summary { grid-template-columns:repeat(3,1fr); }
.money-card { padding:23px; }
.money-card small { color:var(--muted); }
.money-card strong { display:block; margin-top:3px; font-size:31px; }
.money-card.highlight { color:white; background:var(--green); }
.money-card.highlight small { color:rgba(255,255,255,.7); }
.progress { height:8px; overflow:hidden; border-radius:99px; background:#e1e5dd; }
.progress i { display:block; height:100%; border-radius:inherit; background:var(--saffron); }
.ledger-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:650px; }
th { padding:13px 16px; text-align:left; color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.05em; border-bottom:1px solid var(--line); }
td { padding:14px 16px; border-bottom:1px solid var(--line); }
.status { display:inline-flex; padding:4px 9px; border-radius:99px; font-size:12px; font-weight:600; }
.status.paid { color:#1c6648; background:#ddf0e5; }
.status.due { color:#9f473a; background:#f8dfdb; }

@media(max-width:900px){
  .hero { grid-template-columns:1fr; }
  .village-art { display:none; }
  .stats { grid-template-columns:repeat(2,1fr); }
  .home-columns { grid-template-columns:1fr; }
  .member-grid,.business-grid { grid-template-columns:repeat(2,1fr); }
}
@media(max-width:600px){
  .hero { min-height:auto; padding:27px 23px; border-radius:24px; }
  .stats { grid-template-columns:repeat(2,1fr); gap:10px; }
  .stat-card { padding:14px; gap:9px; }
  .stat-icon { width:38px; height:38px; }
  .stat-number { font-size:21px; }
  .member-grid,.business-grid,.ledger-summary { grid-template-columns:1fr; }
  .event-card { grid-template-columns:74px 1fr; gap:13px; }
  .event-card>.btn { grid-column:1/-1; }
}

/* Dialogs and controls */
.dialog-backdrop { position:fixed; z-index:100; inset:0; display:grid; place-items:center; padding:18px; background:rgba(13,34,28,.66); backdrop-filter:blur(7px); animation:fade .18s ease both; }
@keyframes fade { from { opacity:0; } }
.dialog { width:min(560px,100%); max-height:min(760px,calc(100vh - 36px)); overflow:auto; padding:25px; border-radius:27px; background:var(--paper-2); box-shadow:0 30px 90px rgba(0,0,0,.3); animation:pop .25s ease both; }
@keyframes pop { from { opacity:0; transform:scale(.96) translateY(10px); } }
.dialog-header { display:flex; justify-content:space-between; align-items:start; gap:12px; margin-bottom:18px; }
.dialog-header h2 { margin:0; }
.close-btn { width:38px; height:38px; border:0; border-radius:50%; background:#eee9db; color:var(--ink); font-size:22px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.field { display:grid; gap:6px; }
.field.full { grid-column:1/-1; }
.field label { font-size:13px; font-weight:600; }
.field input,.field select,.field textarea { width:100%; min-height:45px; outline:0; border:1px solid var(--line); border-radius:13px; padding:10px 12px; color:var(--ink); background:white; transition:.2s ease; }
.field textarea { min-height:86px; resize:vertical; }
.field input:focus,.field select:focus,.field textarea:focus { border-color:var(--green-2); box-shadow:0 0 0 3px rgba(35,108,80,.11); }
.dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:21px; }
.role-options { display:grid; gap:10px; }
.role-option { display:flex; align-items:center; gap:13px; padding:14px; border:1px solid var(--line); border-radius:16px; background:white; cursor:pointer; }
.role-option:hover { border-color:var(--green); }
.role-option.active { color:var(--green); border-color:var(--green); background:#eaf1e8; }
.role-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:14px; color:white; background:var(--green); }
.toast { position:fixed; z-index:150; left:50%; bottom:96px; transform:translateX(-50%); min-width:250px; max-width:calc(100% - 30px); padding:12px 18px; border-radius:14px; color:white; text-align:center; background:#153b30; box-shadow:0 15px 40px rgba(0,0,0,.25); animation:toastIn .25s ease both; }
@keyframes toastIn { from { opacity:0; transform:translate(-50%,12px); } }
.lock-screen { min-height:calc(100vh - 170px); display:grid; place-items:center; text-align:center; }
.lock-card { max-width:460px; padding:36px; }
.lock-symbol { width:74px; height:74px; display:grid; place-items:center; margin:0 auto 18px; border-radius:25px; color:white; background:var(--saffron); }
.lock-symbol svg { width:34px; }
.gallery-grid { grid-template-columns:repeat(3,1fr); }
.photo-tile { aspect-ratio:4/3; display:grid; place-items:end start; padding:16px; overflow:hidden; border-radius:20px; color:white; font-weight:600; background:linear-gradient(160deg,transparent 20%,rgba(15,40,32,.75)),var(--tile-bg,#9eaf91); }
.photo-tile:nth-child(2){ --tile-bg:#d89158; }
.photo-tile:nth-child(3){ --tile-bg:#668373; }
.photo-tile span { text-shadow:0 2px 8px rgba(0,0,0,.4); }
@media(max-width:600px){ .form-grid { grid-template-columns:1fr; } .field.full { grid-column:auto; } .gallery-grid { grid-template-columns:1fr 1fr; } }

/* Secure account gateway */
.auth-page { min-height:100vh; display:grid; grid-template-columns:1.05fr .95fr; background:var(--paper); }
.auth-story { position:relative; overflow:hidden; min-height:100vh; display:flex; flex-direction:column; justify-content:space-between; padding:clamp(32px,6vw,76px); color:white; background:var(--green); }
.auth-story:before { content:""; position:absolute; width:430px; height:430px; right:-160px; top:-160px; border:70px solid rgba(233,184,77,.18); border-radius:50%; }
.auth-brand { position:relative; z-index:2; font-family:"Tiro Devanagari Hindi",serif; font-size:30px; }
.auth-copy { position:relative; z-index:2; max-width:590px; }
.auth-copy h1 { font-size:clamp(40px,6vw,74px); }
.auth-copy p { max-width:520px; color:rgba(255,255,255,.75); font-size:18px; }
.privacy-note { position:relative; z-index:2; display:flex; align-items:center; gap:10px; color:rgba(255,255,255,.7); }
.privacy-note svg { width:22px; }
.auth-panel { display:grid; place-items:center; padding:28px; background:radial-gradient(circle at top right,rgba(233,184,77,.2),transparent 26rem),var(--paper); }
.auth-card { width:min(470px,100%); padding:30px; border:1px solid var(--line); border-radius:28px; background:var(--paper-2); box-shadow:var(--shadow); }
.auth-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:22px 0; padding:5px; border-radius:15px; background:#e9e7dc; }
.auth-tab { min-height:42px; border:0; border-radius:11px; background:transparent; color:var(--muted); font-weight:600; }
.auth-tab.active { color:var(--green); background:white; box-shadow:0 4px 12px rgba(24,51,43,.08); }
.auth-form { display:grid; gap:14px; }
.auth-alert { margin:14px 0; padding:13px 15px; border-radius:13px; color:#8b3b31; background:#f8dfdb; }
.auth-alert.success { color:#205f46; background:#dfeee4; }
.pending-card { text-align:center; }
.pending-symbol { width:72px; height:72px; display:grid; place-items:center; margin:0 auto 18px; border-radius:24px; color:white; background:var(--saffron); }
.pending-symbol svg { width:34px; }
.user-role { display:inline-flex; padding:3px 9px; border-radius:99px; color:var(--green); background:#e4eee7; font-size:12px; }
.admin-list { display:grid; gap:12px; }
.approval-card { display:grid; grid-template-columns:1fr auto; gap:18px; align-items:center; padding:18px; }
.approval-actions { display:flex; gap:8px; flex-wrap:wrap; }
.profile-pill .avatar { text-transform:uppercase; }
.avatar img { width:100%; height:100%; display:block; object-fit:cover; }
.avatar.large { width:92px; height:92px; font-size:28px; }
.profile-photo-preview { display:flex; justify-content:center; margin:-4px 0 20px; }
.topbar-actions { display:flex; align-items:center; gap:10px; }
.language-select { min-height:40px; padding:7px 30px 7px 11px; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:var(--paper-2); font-weight:600; }
.auth-language { position:fixed; z-index:10; top:22px; right:24px; }
.loading-screen { min-height:100vh; display:grid; place-items:center; background:var(--paper); }
.loader { width:48px; height:48px; border:5px solid #d5dacc; border-top-color:var(--green); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
@media(max-width:850px){
  .auth-page { grid-template-columns:1fr; }
  .auth-story { min-height:330px; padding:30px 24px; }
  .auth-story .privacy-note { display:none; }
  .auth-panel { padding:20px 14px 90px; }
  .auth-card { padding:23px; margin-top:-54px; position:relative; z-index:3; }
  .approval-card { grid-template-columns:1fr; }
}

/* Gallery, approved listings and member chat */
.post-photo { width:100%; height:190px; display:block; object-fit:cover; background:#e4e8dc; }
.gallery-photo { margin:0; overflow:hidden; }
.gallery-photo img { width:100%; aspect-ratio:4/3; display:block; object-fit:cover; }
.gallery-photo figcaption { display:grid; gap:3px; padding:14px 16px; }
.gallery-photo figcaption span { color:var(--muted); font-size:13px; }
.gallery-folder { margin:0 0 32px; }
.gallery-folder-head { display:flex; align-items:end; justify-content:space-between; gap:14px; margin:0 0 13px; }
.gallery-folder-head h2,.gallery-folder-head p { margin-bottom:0; }
.approval-thumb { width:92px; height:78px; border-radius:13px; object-fit:cover; }
.chat-shell { min-height:590px; display:grid; grid-template-columns:280px 1fr; }
.chat-people { padding:18px; border-right:1px solid var(--line); }
.chat-people h3 { margin-bottom:13px; }
.chat-person { width:100%; display:flex; align-items:center; gap:10px; padding:10px; border:0; border-radius:15px; text-align:left; color:var(--ink); background:transparent; }
.chat-person:hover,.chat-person.active { background:#e4eee7; }
.chat-person .avatar { width:39px; height:39px; }
.chat-person b,.chat-person small { display:block; }
.chat-person small { color:var(--muted); }
.chat-thread { min-width:0; display:grid; grid-template-rows:auto 1fr auto; }
.chat-thread>header { display:flex; align-items:center; gap:10px; min-height:64px; padding:14px 20px; border-bottom:1px solid var(--line); }
.messages { max-height:510px; overflow:auto; display:flex; flex-direction:column; gap:9px; padding:20px; }
.message { align-self:flex-start; max-width:min(72%,520px); padding:10px 13px; border-radius:4px 16px 16px 16px; background:#edf0e7; }
.message.mine { align-self:flex-end; color:white; border-radius:16px 4px 16px 16px; background:var(--green); }
.message p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.message time { display:block; margin-top:3px; opacity:.65; font-size:10px; }
.chat-compose { display:flex; gap:9px; padding:15px; border-top:1px solid var(--line); }
.chat-compose input { flex:1; min-width:0; border:1px solid var(--line); border-radius:14px; padding:10px 13px; outline:none; }
.chat-photo { width:min(330px,100%); max-height:300px; display:block; margin-bottom:7px; border-radius:10px; object-fit:cover; }
.chat-photo-button { min-width:62px; display:grid; place-items:center; padding:8px 10px; border:1px solid var(--line); border-radius:13px; color:var(--green); background:#edf2e9; font-weight:700; cursor:pointer; }
.chat-photo-button input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
@media(max-width:700px){
  .chat-shell { min-height:520px; grid-template-columns:105px 1fr; }
  .chat-people { padding:9px; }
  .chat-person { padding:8px 5px; }
  .chat-person .avatar { display:none; }
  .chat-person b { font-size:12px; }
  .chat-person small { font-size:10px; }
  .messages { padding:12px; }
  .message { max-width:88%; }
  .approval-thumb { width:100%; height:150px; }
  .language-select { max-width:104px; }
  .auth-language { top:12px; right:12px; }
}

/* Committee finance dashboard */
.finance-summary { grid-template-columns:repeat(5,1fr); }
.due-money { border-color:rgba(184,75,60,.24); background:#fff3f0; }
.due-money strong { color:var(--red); }
.committee-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.committee-actions select { min-height:44px; padding:8px 34px 8px 12px; border:1px solid var(--line); border-radius:13px; color:var(--ink); background:var(--paper-2); }
.monthly-ledger table { min-width:1600px; }
.monthly-ledger .sticky-name { position:sticky; left:0; z-index:2; min-width:180px; background:var(--paper-2); box-shadow:8px 0 14px -14px rgba(0,0,0,.5); }
.monthly-ledger thead .sticky-name { z-index:3; }
.monthly-ledger td { text-align:center; padding:11px 8px; }
.monthly-ledger th { text-align:center; padding:12px 8px; }
.monthly-ledger td.sticky-name,.monthly-ledger th.sticky-name { text-align:left; padding-left:16px; }
.monthly-ledger small,.ledger-wrap td small { display:block; color:var(--muted); font-size:11px; }
.month-cell { display:inline-flex; min-width:52px; min-height:31px; align-items:center; justify-content:center; padding:4px 7px; border-radius:10px; font-size:11px; font-weight:600; }
.month-cell.paid { color:#176140; background:#ddf0e5; }
.month-cell.due { color:#9f352d; background:#f8d8d3; }
.month-cell.future { color:#87918c; background:#ecece7; }
@media(max-width:1050px){ .finance-summary { grid-template-columns:repeat(3,1fr); } }
@media(max-width:620px){ .finance-summary { grid-template-columns:1fr 1fr; gap:10px; } .finance-summary .money-card { padding:16px; } .finance-summary .money-card strong { font-size:24px; } .committee-actions { justify-content:flex-start; } }

/* V12: mobile-first profiles, photo viewer and reliable chat upload */
.member-profile-card { cursor:pointer; transition:transform .2s ease,box-shadow .2s ease; }
.member-profile-card:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.member-bio { display:-webkit-box; margin:14px 0 0; overflow:hidden; color:var(--muted); -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.member-business { display:grid; gap:2px; margin-top:12px; padding:11px 12px; border-radius:14px; background:#edf2e9; }
.member-business small { color:var(--muted); }
.member-profile-card>.link-btn { margin-top:12px; padding:0; }
.profile-owner { margin:7px 0 2px; padding:0; border:0; color:var(--green); background:transparent; font-weight:700; }
.photo-open { cursor:zoom-in; }
.photo-viewer { position:fixed; z-index:300; inset:0; display:grid; grid-template-rows:1fr auto; place-items:center; gap:12px; padding:68px 20px 24px; color:white; background:rgba(5,12,10,.94); backdrop-filter:blur(16px); }
.photo-viewer img { max-width:min(1100px,100%); max-height:calc(100vh - 130px); object-fit:contain; border-radius:12px; box-shadow:0 25px 80px rgba(0,0,0,.45); }
.photo-viewer p { margin:0; text-align:center; }
.photo-viewer-close { position:absolute; top:17px; right:18px; width:46px; height:46px; border:1px solid rgba(255,255,255,.25); border-radius:50%; color:white; background:rgba(255,255,255,.12); font-size:30px; line-height:1; }
.social-profile { min-width:0; }
.profile-hero { display:grid; grid-template-columns:auto 1fr; gap:22px; align-items:center; padding:8px 0 22px; }
.avatar.profile-xl { width:104px; height:104px; font-size:30px; box-shadow:0 0 0 6px #f5ead2,0 0 0 8px var(--saffron); }
.profile-hero h2 { margin:0 0 4px; font-size:30px; }
.profile-hero p { margin:0; color:var(--muted); }
.profile-stats { display:flex; gap:20px; margin-top:12px; }
.profile-stats span { display:grid; color:var(--muted); font-size:12px; }
.profile-stats b { color:var(--ink); font-size:19px; }
.profile-facts { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.profile-facts>div { display:grid; gap:2px; padding:12px; border:1px solid var(--line); border-radius:14px; }
.profile-facts .wide { grid-column:1/-1; }
.profile-facts small { color:var(--muted); }
.profile-business-panel { margin-top:14px; padding:18px; border-radius:18px; background:linear-gradient(135deg,#e7f0e8,#fff2d8); }
.profile-business-panel h3 { margin:0 8px 8px 0; display:inline-block; }
.profile-business-panel p:last-child { margin:11px 0 0; }
.profile-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:15px; }
.profile-post-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.profile-post { position:relative; min-width:0; overflow:hidden; border-radius:13px; background:#e7ecdf; }
.profile-post img,.profile-post-text { width:100%; aspect-ratio:1; display:grid; place-items:center; object-fit:cover; color:var(--green); font-weight:800; }
.profile-post>div:last-child { position:absolute; inset:auto 0 0; display:grid; padding:22px 8px 7px; color:white; background:linear-gradient(transparent,rgba(9,29,22,.85)); }
.profile-post small { color:rgba(255,255,255,.72); }
.check-field { display:flex; grid-template-columns:auto 1fr; align-items:center; gap:10px; padding:12px; border:1px solid var(--line); border-radius:14px; background:#f3f1e7; }
.check-field input { width:20px; height:20px; }
.check-field span { display:grid; }
.check-field small { color:var(--muted); }
.heading-actions,.event-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.event-actions { justify-content:flex-end; }
.event-title-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.event-title-row h3 { margin:0; }
.event-description { max-width:720px; margin:9px 0; white-space:pre-wrap; color:var(--ink); }
.danger-link { min-height:34px; padding:5px 9px; border:0; color:var(--red); background:transparent; font-weight:700; }
.chat-photo-button { position:relative; overflow:hidden; }
.chat-photo-button input { position:absolute; inset:0; width:100%; height:100%; opacity:0; pointer-events:auto; cursor:pointer; }
.chat-upload-preview { display:grid; grid-template-columns:56px 1fr auto; align-items:center; gap:10px; margin:0 15px; padding:9px; border-radius:14px; color:var(--green); background:#e6efe7; }
.chat-upload-preview[hidden] { display:none; }
.chat-upload-preview img { width:56px; height:56px; object-fit:cover; border-radius:10px; }
.chat-upload-preview button { width:32px; height:32px; border:0; border-radius:50%; color:var(--red); background:white; font-size:21px; }
.mobile-ledger-list,.expense-mobile-list { display:none; }

@media(max-width:700px){
  .profile-post-grid { grid-template-columns:repeat(3,1fr); gap:4px; }
  .profile-hero { grid-template-columns:82px 1fr; gap:15px; align-items:start; }
  .avatar.profile-xl { width:76px; height:76px; }
  .profile-hero h2 { font-size:24px; }
  .event-actions { grid-column:1/-1; justify-content:flex-start; }
  .event-actions .btn.secondary { flex:1; }
  .heading-actions>* { flex:1; }
  .chat-shell { grid-template-columns:1fr; }
  .chat-people { display:flex; gap:5px; overflow-x:auto; padding:8px; border-right:0; border-bottom:1px solid var(--line); }
  .chat-people h3 { display:none; }
  .chat-person { flex:0 0 auto; width:auto; min-width:92px; }
  .chat-person .avatar { display:grid; }
  .chat-person b { max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .chat-thread { min-height:480px; }
  .messages { max-height:420px; }
  .chat-compose { padding:10px; gap:6px; }
  .chat-compose .btn { padding-inline:12px; }
  .monthly-ledger,.expense-desktop { display:none; }
  .mobile-ledger-list,.expense-mobile-list { display:grid; gap:11px; }
  .mobile-ledger-card { padding:15px; }
  .mobile-ledger-head { display:flex; justify-content:space-between; gap:10px; align-items:start; }
  .mobile-ledger-head h3 { margin:0; }
  .mobile-ledger-head small { color:var(--muted); }
  .mobile-month-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin-top:13px; }
  .mobile-month { min-width:0; display:grid; gap:2px; place-items:center; padding:7px 2px; border-radius:10px; }
  .mobile-month small { color:inherit; }
  .mobile-month b { max-width:100%; overflow:hidden; font-size:11px; text-overflow:ellipsis; }
  .mobile-month.paid { color:#176140; background:#ddf0e5; }
  .mobile-month.due { color:#9f352d; background:#f8d8d3; }
  .mobile-month.future { color:#87918c; background:#ecece7; }
  .mobile-ledger-total { display:flex; justify-content:space-between; gap:10px; margin-top:12px; padding-top:11px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
  .expense-mobile { display:flex; justify-content:space-between; gap:14px; padding:15px; }
  .expense-mobile h3,.expense-mobile p { margin:2px 0; }
  .expense-mobile small { color:var(--muted); }
  .expense-mobile strong { white-space:nowrap; color:var(--red); }
  .committee-actions { display:grid; grid-template-columns:1fr 1fr; width:100%; }
  .committee-actions>* { width:100%; }
}

/* v18 mobile polish */
.language-select { max-width:none; min-width:112px; font-size:14px; }
@media(max-width:380px){ .language-select { min-width:98px; font-size:13px; padding-left:8px; padding-right:24px; } .brand-copy strong { font-size:20px; } .topbar-actions { gap:6px; } }
.nav-item { padding:0 1px; }
.nav-item span { font-size:10.5px; line-height:1.15; text-align:center; max-width:100%; white-space:nowrap; letter-spacing:-.1px; }
@media(max-width:380px){ .bottom-nav { padding:5px; } .nav-item svg { width:19px; height:19px; } .nav-item span { font-size:9.5px; letter-spacing:-.2px; } }
.link-btn, .profile-owner { min-height:40px; display:inline-flex; align-items:center; }
.profile-post-grid > .empty, .profile-post-grid > .card.empty { grid-column:1 / -1; width:auto; }
.event-card { align-items:start; }
.event-date { min-width:88px; padding:14px 8px; }
.event-date span { display:block; font-size:12.5px; white-space:nowrap; }
@media(max-width:700px){
  .chat-shell { grid-template-columns:minmax(0,1fr); }
  .chat-people, .chat-thread, .messages { min-width:0; }
  .chat-thread { grid-template-columns:minmax(0,1fr); }
  .chat-compose { min-width:0; gap:6px; padding:10px; }
  .chat-photo { max-width:100%; }
  .message { max-width:86%; }
}
