
:root{
  --bg:#f4f7fb; --card:#fff; --text:#0d2740; --muted:#6e8192;
  --primary:#0b67c2; --primary2:#0a4f8e; --line:#dce6ef;
  --success:#e6f7e9; --successText:#187a38; --shadow:0 8px 24px rgba(16,46,75,.08);
  --nav:#ffffffee;
}
[data-theme="dark"]{
  --bg:#071522; --card:#0d2235; --text:#edf6ff; --muted:#9ab0c2;
  --primary:#43a1ff; --primary2:#1878d3; --line:#1f3c52;
  --success:#113923; --successText:#66d88a; --shadow:0 8px 24px rgba(0,0,0,.24);
  --nav:#0b1c2bcc;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
body{min-height:100vh}
button,a{font:inherit}
.app{max-width:760px;margin:0 auto;min-height:100vh;padding-bottom:86px}
.hero{position:relative;background:linear-gradient(160deg,#0c6bbf,#0c4776);color:#fff;padding:30px 20px 26px;border-radius:0 0 28px 28px;overflow:hidden}
.hero:after{content:"";position:absolute;right:-45px;top:-55px;width:180px;height:180px;border-radius:50%;background:#ffffff14}
.brand{display:flex;gap:12px;align-items:center}
.brand-logo{width:48px;height:48px;display:grid;place-items:center;border-radius:16px;background:#ffffff1a;border:1px solid #ffffff30;font-size:28px}
.hero h1{margin:0;font-size:30px;line-height:1.05}
.hero p{margin:5px 0 0;color:#e7f3ff}
.content{padding:18px}
.topline{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.date-pill{background:var(--card);border:1px solid var(--line);padding:11px 14px;border-radius:14px;box-shadow:var(--shadow);font-weight:700}
.icon-btn{border:1px solid var(--line);background:var(--card);color:var(--text);width:42px;height:42px;border-radius:12px;cursor:pointer}
.section-title{font-size:20px;margin:24px 0 12px}
.card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:var(--shadow);margin-bottom:12px}
.mass-card{display:grid;grid-template-columns:58px 1fr auto;gap:13px;align-items:center}
.church-thumb{width:58px;height:58px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(160deg,#cfe9ff,#8ac7ff);font-size:28px}
.mass-card h3,.event-card h3{margin:0 0 5px;font-size:16px}
.mass-time{font-size:23px;font-weight:800;margin:2px 0}
.muted{color:var(--muted);font-size:14px}
.today{display:inline-block;margin-top:6px;background:var(--success);color:var(--successText);font-size:12px;font-weight:800;padding:5px 8px;border-radius:999px}
.chev{font-size:24px;color:var(--muted)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:13px;padding:12px 15px;background:var(--primary);color:white;font-weight:800;text-decoration:none;cursor:pointer}
.btn.secondary{background:transparent;color:var(--primary);border:1px solid var(--primary)}
.full{width:100%}
.tabs{display:flex;gap:8px;overflow:auto;padding-bottom:5px}
.tab{white-space:nowrap;border:1px solid var(--line);background:var(--card);color:var(--text);padding:9px 12px;border-radius:999px;cursor:pointer}
.tab.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.event-card{display:grid;grid-template-columns:60px 1fr auto;gap:12px;align-items:center}
.event-date{width:60px;height:60px;border-radius:14px;background:#e6f1fb;color:#0b5ea8;display:flex;flex-direction:column;justify-content:center;align-items:center;font-weight:800}
[data-theme="dark"] .event-date{background:#123856;color:#8fc8ff}
.event-date b{font-size:22px}
.event-date span{font-size:12px;text-transform:uppercase}
.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;text-align:center}
.cal-head{font-size:12px;color:var(--muted);font-weight:700}
.day{min-height:38px;display:grid;place-items:center;border-radius:10px;position:relative}
.day.active{background:var(--primary);color:#fff;font-weight:800}
.day.dot:after{content:"";width:5px;height:5px;background:#ff9d2e;border-radius:50%;position:absolute;bottom:2px}
.detail-hero{height:185px;border-radius:0 0 28px 28px;background:linear-gradient(160deg,#78bff4,#d8efff);display:grid;place-items:center;font-size:70px}
.detail-wrap{padding:18px}
.detail-title{font-size:26px;margin:0 0 6px}
.list-row{display:flex;gap:12px;align-items:flex-start;padding:13px 0;border-bottom:1px solid var(--line)}
.list-row:last-child{border-bottom:0}
.nav{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(760px,100%);display:grid;grid-template-columns:repeat(4,1fr);background:var(--nav);backdrop-filter:blur(16px);border-top:1px solid var(--line);padding:8px 8px max(8px,env(safe-area-inset-bottom));z-index:50}
.nav button{border:0;background:transparent;color:var(--muted);padding:7px 3px;display:grid;gap:3px;place-items:center;font-size:12px;cursor:pointer}
.nav button.active{color:var(--primary);font-weight:800}
.nav .ico{font-size:21px}
.setting{display:flex;align-items:center;justify-content:space-between;gap:14px}
.switch{position:relative;width:52px;height:30px;background:#b7c6d2;border-radius:99px;cursor:pointer}
.switch:after{content:"";position:absolute;top:3px;left:3px;width:24px;height:24px;background:white;border-radius:50%;transition:.2s}
.switch.on{background:var(--primary)}
.switch.on:after{left:25px}
.notice{padding:12px 14px;border-radius:13px;background:#eaf4ff;color:#0c4d82;font-size:13px}
[data-theme="dark"] .notice{background:#102f49;color:#a7d4ff}
.empty{text-align:center;padding:40px 20px;color:var(--muted)}
.small{font-size:12px}
@media (min-width:700px){
  .hero{margin-top:16px;border-radius:28px}
  .app{padding-left:10px;padding-right:10px}
}

.field{width:100%;border:1px solid var(--line);background:var(--card);color:var(--text);border-radius:12px;padding:12px 13px;margin:7px 0;outline:none}
.field:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(11,103,194,.12)}
.checkrow{display:flex;align-items:center;gap:10px;padding:8px 0;color:var(--text)}
.checkrow input{width:20px;height:20px}
.buttonrow{display:flex;gap:10px;margin-top:12px}
.buttonrow .btn{flex:1}
.adminitem{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.adminitem:last-child{border-bottom:0}
