/* MyBlock website — plain CSS, no build step. Brand: navy #0a1f6b, blue #1d4ed8, green #22c55e -> lime #a3e635. */
:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --ink: #141a2e;
  --muted: #667085;
  --line: #e4e7ee;
  --brand: #1d4ed8;
  --brand-ink: #ffffff;
  --brand-soft: #e6eeff;
  --navy: #0a1f6b;
  --navy-2: #0f2f9e;
  --green: #22c55e;
  --lime: #a3e635;
  --accent: #f59e0b;
  --ok: #067647;
  --ok-soft: #dcfae6;
  --err: #b42318;
  --err-soft: #fee4e2;
  --warn: #93370d;
  --warn-soft: #fef0c7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1220; --card: #171c2f; --ink: #eef1fb; --muted: #9aa3bd; --line: #262d47;
    --brand: #7aa2ff; --brand-ink: #0b1020; --brand-soft: #1b2756;
    --ok: #75e0a7; --ok-soft: #0f2e22; --err: #fda29b; --err-soft: #3a1512; --warn: #fec84b; --warn-soft: #3a2a07;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: .2rem 0 .8rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
h3 { font-size: 1rem; margin: 0 0 .3rem; }
p { margin: .3rem 0 .8rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 18px; padding-bottom: 60px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* top bar */
.topbar { background: linear-gradient(90deg, var(--navy), var(--navy-2)); border-bottom: 0; position: sticky; top: 0; z-index: 20; }
.topbar .bar { display: flex; align-items: center; gap: 18px; height: 56px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.15rem; color: #fff; white-space: nowrap; letter-spacing: -.01em; }
.brand .g { background: linear-gradient(90deg, #10d39b, var(--lime)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-img { width: 34px; height: 34px; border-radius: 9px; display: block; }
.brand:hover { text-decoration: none; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand); color: var(--brand-ink); font-size: .8rem; font-weight: 800; }
.topbar nav.main { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.topbar nav.main a { color: #c7d4ff; padding: 6px 10px; border-radius: 8px; white-space: nowrap; font-weight: 500; }
.topbar nav.main a:hover, .topbar nav.main a.on { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.topbar .who .link { color: #c7d4ff; }
.topbar .who .link:hover { color: #fff; }
.who { display: flex; align-items: center; gap: 10px; }
.who form { margin: 0; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .8rem; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 76px; height: 76px; font-size: 1.4rem; }
.subnav { background: var(--card); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 0; }
.subnav .cname { padding-bottom: 8px; }
.subnav nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.subnav nav a { color: var(--muted); padding: 10px 12px; border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 500; }
.subnav nav a.on { color: var(--brand); border-color: var(--green); }
.subnav nav a:hover { text-decoration: none; color: var(--brand); }

/* cards + forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.hero { background: radial-gradient(120% 140% at 85% 0%, var(--navy-2) 0%, var(--navy) 60%); color: #fff; border: 0; position: relative; overflow: hidden; }
.card.hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -40px; height: 80px; border-radius: 50%;
  background: linear-gradient(90deg, #10d39b, var(--lime)); opacity: .9; }
.card.hero > * { position: relative; z-index: 1; }
.hero .g { color: var(--lime); }
.btn.cta { background: var(--lime); color: var(--navy); }
.card.hero a { color: #fff; }
.card h2 .count { background: var(--brand-soft); color: var(--brand); border-radius: 99px; padding: 1px 9px; font-size: .8rem; margin-left: 6px; }
label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 96px; resize: vertical; }
input[type=file] { padding: 8px; }
.field { margin-bottom: 12px; }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.hint { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: 10px; font: inherit; font-weight: 600; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { background: var(--brand-soft); color: var(--brand); }
.btn.danger { background: var(--err-soft); color: var(--err); }
.btn.ok { background: var(--ok-soft); color: var(--ok); }
.btn.sm { padding: 6px 11px; font-size: .85rem; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 4px; }
button.link:hover { color: var(--brand); }
form.inline { display: inline; margin: 0; }
details > summary { cursor: pointer; font-weight: 600; color: var(--brand); list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 10px; }

/* flash + badges */
.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--err-soft); color: var(--err); }
.flash.info { background: var(--brand-soft); color: var(--brand); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.b-PENDING, .b-PENDING_VERIFICATION, .b-PENDING_PAYMENT, .b-ANNOUNCEMENT { background: var(--warn-soft); color: var(--warn); }
.b-APPROVED, .b-ACTIVE, .b-CONFIRMED, .b-ENTERED, .b-PAID { background: var(--ok-soft); color: var(--ok); }
.b-DENIED, .b-REJECTED, .b-CANCELLED, .b-ALERT, .b-SUSPENDED { background: var(--err-soft); color: var(--err); }
.b-EXPIRED, .b-EXITED, .b-REMOVED { background: var(--line); color: var(--muted); }

/* tables + pager */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 18px 0 0; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 5px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: .85rem; font-weight: 500; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip:hover { text-decoration: none; border-color: var(--brand); }
.filters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; margin-bottom: 16px; }

/* feed */
.post { display: flex; flex-direction: column; gap: 6px; }
.post .meta { color: var(--muted); font-size: .83rem; }
.post .body { white-space: pre-line; }
.post img { max-width: 100%; border-radius: 10px; margin-top: 6px; }
.post.pinned { border-left: 4px solid var(--accent); }

/* ads */
.ad { display: flex; gap: 12px; align-items: center; border: 1px dashed var(--accent); border-radius: var(--radius); padding: 12px; background: var(--warn-soft); color: var(--warn); }
.ad a { color: inherit; font-weight: 700; }
.ad img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; }
.ad .tag { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }

/* amenities + slots */
.amenity-card { padding: 0; overflow: hidden; }
.amenity-card .pic { height: 120px; background: linear-gradient(135deg, var(--brand-soft), var(--line)); display: grid; place-items: center; font-size: 2.4rem; }
.amenity-card .pic img { width: 100%; height: 100%; object-fit: cover; }
.amenity-card .info { padding: 14px; }
.slots { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.slot { text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; }
.slot strong { display: block; }
.slot span { color: var(--muted); font-size: .8rem; }
.slot:hover:not([disabled]) { border-color: var(--brand); background: var(--brand-soft); }
.slot[disabled] { opacity: .45; cursor: not-allowed; background: var(--bg); }
.code { font: 700 1.6rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .25em; color: var(--brand); background: var(--brand-soft); padding: 8px 14px; border-radius: 10px; display: inline-block; }

/* login */
.auth { max-width: 420px; margin: 40px auto; }
.otp { font-size: 1.6rem; letter-spacing: .5em; text-align: center; }
.hero-title { font-size: 2.2rem; line-height: 1.15; margin: 0 0 10px; letter-spacing: -.02em; }
.feature { display: flex; gap: 12px; }
.feature .ico { font-size: 1.6rem; }

@media (max-width: 640px) {
  .topbar .bar { gap: 8px; }
  .brand span.t { display: none; }
  h1 { font-size: 1.35rem; }
  th, td { padding: 8px; }
}

/* platform admin console */
.adminbar { background: #1f2a44; border-bottom: 0; }
.adminbar .cname, .adminbar .cname strong { color: #fff; }
.adminbar nav a { color: #c9d3ea; }
.adminbar nav a.on, .adminbar nav a:hover { color: #fff; border-color: #fff; }
.grid.c4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
@media (max-width: 720px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
.stat { display: flex; flex-direction: column; gap: 2px; color: inherit; }
.stat:hover { text-decoration: none; border-color: var(--brand); }
.stat .n { font-size: 1.8rem; font-weight: 800; }

/* security portal: big touch targets for the gate */
.secbar { background: #14532d; }
.secbar .brand .t, .secbar .main a, .secbar .who, .secbar .who .link { color: #fff; }
.btn.big { width: 100%; padding: 14px 18px; font-size: 1.05rem; }
body.sec input, body.sec select { font-size: 1.05rem; padding: 11px 12px; }
body.sec .otp { font-size: 1.6rem; letter-spacing: .4em; text-align: center; }

/* dues */
.b-DUE { background: var(--warn-soft); color: var(--warn); }
.b-ONLINE { background: var(--ok-soft); color: var(--ok); }
.stat .n.money { font-size: 1.4rem; }

/* MyBlock resident home: welcome banner + tile grid + bottom tabs on phones */
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 20px 22px; margin-bottom: 16px;
  border-radius: 18px; color: #fff; background: radial-gradient(120% 160% at 90% 0%, var(--navy-2), var(--navy) 65%); }
.welcome h1 { margin: 0; color: #fff; }
.welcome .sub { color: #c7d4ff; }
.welcome img { width: 64px; height: 64px; border-radius: 16px; }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px 8px; min-height: 104px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); color: var(--ink); text-align: center; font-weight: 600; font-size: .9rem; }
.tile:hover { text-decoration: none; border-color: var(--green); transform: translateY(-1px); }
.tile .ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.tile .ic.green { background: #dcfce7; color: #15803d; }
.tile .ic svg { width: 24px; height: 24px; }
.tile .n { font-size: .72rem; font-weight: 700; color: #fff; background: var(--err); border-radius: 99px; padding: 0 7px; }
.updates { display: flex; align-items: center; gap: 12px; }
.bottomtabs { display: none; }
@media (max-width: 640px) {
  .bottomtabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line);
    justify-content: space-around; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .bottomtabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; color: var(--muted); padding: 4px 10px; border-radius: 12px; }
  .bottomtabs a.on { color: #fff; background: var(--brand); }
  .bottomtabs svg { width: 22px; height: 22px; }
  main.wrap { padding-bottom: 90px; }
  .topbar nav.main { display: none; }
}
/* essentials + services */
.product { display: flex; flex-direction: column; gap: 6px; }
.product .price { font-weight: 800; font-size: 1.1rem; }
.b-REQUESTED, .b-PLACED, .b-PAUSED { background: var(--warn-soft); color: var(--warn); }
.b-ACCEPTED, .b-DELIVERED, .b-COMPLETED { background: var(--ok-soft); color: var(--ok); }
