/* Resident-facing design system — from docs/handoff (mayors-office-pwa). Orange / navy, mobile-first, RTL.
   --rr-primary is kept as an alias so municipality branding (PrimaryColor) still flows in. */
:root {
  --orange: #f46a21; --orange2: #ff813b; --orange-soft: #fff0e5;
  --navy: #14294a; --blue: #114987; --blue-soft: #eaf2ff;
  --bg: #f4f7fb; --surface: #fff; --text: #14294a; --muted: #657995;
  --line: #e2e9f2; --green: #0e8a62; --green-soft: #e4f8ee;
  --amber: #b97808; --amber-soft: #fff3dc;
  --r: 23px; --shadow: 0 14px 38px rgba(22, 48, 86, .075);
  --rr-primary: var(--orange);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body.md-public {
  margin: 0; color: var(--text); background: var(--bg); font-size: 14px; -webkit-font-smoothing: antialiased;
  font-family: 'Heebo', 'Assistant', 'Noto Sans Hebrew', Arial, sans-serif; min-height: 100dvh; display: block;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #87b4f8; outline-offset: 2px; }
a { text-decoration: none; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- shell ---- */
.app { min-height: 100dvh; position: relative; background: var(--bg); }
.inner { max-width: 520px; margin: auto; padding: 0 21px 120px; }
.app-header { height: 90px; padding: 21px 21px 14px; max-width: 560px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand img { height: 44px; max-width: 170px; object-fit: contain; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.brand-txt strong { color: var(--orange); font-size: 15px; font-weight: 850; }
.brand-txt span { color: var(--navy); font-weight: 650; font-size: 12px; margin-top: 3px; }
.icon-btn { border: 1px solid var(--line); border-radius: 50%; height: 40px; width: 40px; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--navy); font-size: 18px; }
.eyebrow { font-size: 12px; color: var(--muted); font-weight: 650; }
.h1 { font-weight: 850; font-size: 29px; letter-spacing: -.6px; line-height: 1.25; margin: 0 0 9px; color: var(--navy); }
.h2 { font-weight: 850; font-size: 19px; margin: 0; color: var(--navy); }
.lead { line-height: 1.75; color: var(--muted); font-size: 14px; margin: 0; }
.card { background: #fff; border: 1px solid #edf1f8; box-shadow: var(--shadow); border-radius: var(--r); padding: 20px; }
.btn { border: 0; border-radius: 17px; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; font-weight: 800; font-size: 15px; text-decoration: none; }
.btn-main { background: linear-gradient(105deg, var(--orange), var(--orange2)); color: #fff; box-shadow: 0 10px 20px rgba(244, 106, 33, .18); }
.btn-main:hover { color: #fff; filter: brightness(1.03); }
.btn-outline { border: 1px solid #cbd8ea; background: #fff; color: var(--blue); }
.btn:disabled { opacity: .47; cursor: not-allowed; }
.wide { width: 100%; }
.form-field { display: flex; flex-direction: column; gap: 9px; }
.form-field label, .field-title { font-size: 13px; font-weight: 850; color: var(--navy); }
.field-input, .field-select { height: 54px; width: 100%; border: 1px solid #d6e1f0; background: #fff; border-radius: 14px; padding: 0 15px; color: var(--navy); font-size: 16px; transition: .18s; }
.field-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23657995' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 15px center; padding-left: 40px; }
.field-input:focus, .field-textarea:focus, .field-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #dae9ff; outline: none; }
.field-textarea { width: 100%; min-height: 157px; border: 1px solid #d6e1f0; border-radius: 14px; padding: 14px 15px; background: #fff; resize: vertical; font-size: 15px; line-height: 1.7; color: var(--navy); }
.field-input::placeholder, .field-textarea::placeholder { color: #a0adc0; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
.error, .field-validation-error, .text-danger { color: #b42318; font-size: 12px; margin: 0; display: block; }
.error:empty, .field-validation-valid { display: none; }
.alert-box { border-radius: 16px; padding: 13px 16px; font-size: 13px; line-height: 1.6; margin: 0 0 16px; }
.alert-box.ok { background: var(--green-soft); color: var(--green); }
.alert-box.bad { background: #fde8e6; color: #b42318; }
.secure-note { text-align: center; display: flex; gap: 6px; justify-content: center; align-items: center; margin: 19px auto; color: #68809c; font-size: 12px; line-height: 1.6; }
.back { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; font-weight: 750; color: #215798; background: none; border: 0; padding: 8px 0; }

/* ---- identify ---- */
.auth-page { min-height: 100dvh; background: linear-gradient(170deg, #eff6ff 0%, #f7f9fd 64%, #fff5f0 100%); padding-bottom: 34px; }
.auth-head { max-width: 520px; margin: auto; padding: 24px 25px 14px; display: flex; align-items: center; justify-content: space-between; }
.city-hero { display: flex; flex-direction: column; overflow: hidden; background: #f5f8fc; }
.city-hero .hero-photo { display: block; height: 235px; flex-shrink: 0; background: var(--hero-image, none) center 48% / cover no-repeat; }
.hero-overlay { max-width: 520px; width: 100%; margin: auto; position: relative; display: block; padding: 10px 25px 21px; background: #f5f8fc; }
.hero-copy .small { display: inline-block; padding: 7px 12px; background: rgba(255, 255, 255, .88); border-radius: 100px; color: var(--navy); font-size: 12px; font-weight: 800; margin-bottom: 10px; }
.hero-copy h1 { font-size: 29px; font-weight: 950; margin: 0; color: #0f2d50; line-height: 1.24; }
.hero-copy h1 span { color: var(--orange); }
.hero-copy p { font-size: 14px; line-height: 1.8; margin: 9px 0 0; color: #3f5675; max-width: 380px; white-space: pre-line; }
.auth-content { max-width: 520px; margin: 0 auto; padding: 0 21px; }
.auth-card { position: relative; margin-top: 4px; padding: 22px 21px 20px; }
.auth-card h2 { font-size: 21px; font-weight: 850; margin: 0 0 5px; color: var(--navy); }
.auth-card .lead { margin-bottom: 20px; }
.auth-card .btn { margin-top: 16px; }

/* ---- otp ---- */
.otp-screen { padding: 12px 0 32px; }
.otp-icon { width: 77px; height: 77px; border-radius: 25px; background: #eaf2ff; color: #0d4c99; display: grid; place-items: center; margin: 19px auto 24px; font-size: 30px; }
.otp-title { text-align: center; font-size: 26px; font-weight: 850; margin: 0 0 6px; color: var(--navy); }
.otp-desc { text-align: center; color: var(--muted); line-height: 1.8; margin: 0 0 26px; }
.otp-code { display: flex; gap: 7px; direction: ltr; justify-content: center; }
.digit { width: min(14vw, 52px); height: 60px; text-align: center; border: 1px solid #d2deec; border-radius: 13px; background: #fff; font-size: 23px; color: var(--navy); font-weight: 800; }
.digit:focus { border-color: #1d6dbf; outline: 2px solid #b9d6ff; }
.otp-help { text-align: center; margin: 27px 0; color: var(--muted); font-size: 12px; line-height: 2; }
.link-btn { border: 0; background: transparent; color: var(--blue); text-decoration: underline; font-weight: 750; padding: 0; }

/* ---- home ---- */
.page-title { margin: 7px 0 20px; }
.page-title .lead { margin-top: 7px; }
.home-hero { position: relative; overflow: hidden; background: linear-gradient(118deg, #123e77 0%, #0b2c59 100%); color: #fff; border-radius: 26px; padding: 28px 24px 26px; box-shadow: 0 16px 30px rgba(5, 45, 90, .17); margin: 0 0 22px; }
.home-hero::before { content: ""; position: absolute; width: 305px; height: 305px; border: 45px solid rgba(255, 255, 255, .047); border-radius: 50%; left: -100px; top: -180px; }
.home-hero::after { content: ""; position: absolute; width: 220px; height: 220px; border: 3px solid rgba(255, 255, 255, .075); border-radius: 50%; left: -60px; bottom: -150px; }
.home-hero .eyebrow { color: #bad6f9; position: relative; z-index: 1; }
.home-hero .hello { font-size: 25px; font-weight: 850; line-height: 1.4; position: relative; z-index: 1; margin: 0 0 7px; color: #fff; }
.home-hero p { color: #e3ebf7; margin: 0 0 18px; line-height: 1.75; position: relative; z-index: 1; font-size: 13px; }
.home-hero .btn { width: 100%; position: relative; z-index: 1; }
.section-top { display: flex; justify-content: space-between; align-items: center; margin: 0 0 13px; }
.section-top h2 { font-size: 18px; margin: 0; font-weight: 850; color: var(--navy); }
.text-action { font-size: 12px; font-weight: 700; color: var(--blue); background: none; border: 0; }
.request-card { display: block; background: #fff; border: 1px solid var(--line); box-shadow: 0 5px 16px rgba(16, 51, 96, .04); border-radius: 18px; padding: 17px 16px; margin-bottom: 11px; transition: transform .14s; color: inherit; }
.request-card:hover { transform: translateY(-2px); }
.request-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 9px; }
.request-num { font-size: 12px; direction: ltr; color: #7890ad; font-weight: 700; }
.badge-status { display: inline-flex; align-items: center; border-radius: 100px; padding: 5px 11px; font-size: 11px; font-weight: 850; gap: 6px; white-space: nowrap; }
.badge-status::before { content: ""; height: 6px; width: 6px; border-radius: 50%; background: currentColor; }
.status-progress { color: #185aba; background: #eaf2ff; }
.status-done { color: #078056; background: #e5f8ef; }
.status-wait { color: #ae6e07; background: #fff3de; }
.status-received { color: #60758d; background: #f0f4f9; }
.request-card h3 { font-size: 15px; font-weight: 800; margin: 0 0 6px; color: var(--navy); }
.request-card .sub { color: var(--muted); font-size: 12px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; }
.arrow-circle { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #dce7f5; border-radius: 50%; color: var(--blue); }
.mini-info { border-radius: 18px; background: #eaf2fd; color: #224d87; padding: 15px 17px; display: flex; align-items: center; gap: 12px; font-size: 12px; line-height: 1.7; margin-top: 17px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty i { font-size: 34px; display: block; margin-bottom: 8px; color: #b9c9df; }

/* ---- bottom nav ---- */
.bottom-nav { height: 76px; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255, 255, 255, .97); border-top: 1px solid #e5ecf4; box-shadow: 0 -7px 28px rgba(10, 52, 88, .04); display: flex; justify-content: space-around; align-items: center; z-index: 30; padding: 0 max(15px, env(safe-area-inset-right)) env(safe-area-inset-bottom); }
.nav-item { flex: 1; color: #7286a4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: none; border: 0; font-size: 10px; font-weight: 750; height: 63px; min-width: 0; }
.nav-item i { font-size: 22px; line-height: 1; }
.nav-item.active { color: var(--blue); }
.nav-item.primary .nav-icon { height: 45px; width: 45px; display: grid; place-items: center; background: var(--orange); color: #fff; border-radius: 50%; box-shadow: 0 7px 16px rgba(245, 112, 34, .2); margin-top: -22px; font-size: 24px; }
.nav-item.primary { color: var(--orange); }

/* ---- filters ---- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 17px; }
.filter-btn { min-height: 36px; padding: 7px 15px; border-radius: 17px; border: 1px solid #cbd8ea; background: #fff; color: var(--blue); font-weight: 750; font-size: 13px; }
.filter-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---- forms ---- */
.form-card { display: flex; flex-direction: column; gap: 17px; }
.check-line { display: flex; gap: 9px; align-items: flex-start; color: #536987; font-size: 12px; line-height: 1.6; cursor: pointer; }
.check-line input { margin-top: 3px; accent-color: var(--orange); width: 17px; height: 17px; flex-shrink: 0; }
.rr-dropzone { display: flex; min-height: 120px; gap: 6px; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #b9cbe3; border-radius: 15px; background: #f8fbff; color: #3064a0; text-align: center; padding: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.rr-dropzone:hover, .rr-dropzone.dragover { border-color: var(--orange); background: var(--orange-soft); }
.rr-dropzone .rr-dz-icon { font-size: 1.9rem; color: #3064a0; }
.rr-dropzone .rr-dz-text { font-weight: 800; font-size: 13px; color: var(--navy); }
.rr-dropzone .rr-dz-hint { font-size: 11px; color: var(--muted); }
.rr-dz-preview { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 10px; width: 100%; }
.rr-dz-file { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rr-dz-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.rr-dz-name { font-weight: 600; word-break: break-all; }
.rr-dz-clear { border: 0; background: none; color: #b42318; font-size: 12px; font-weight: 700; }

/* ---- detail ---- */
.detail-head { padding: 20px 18px; }
.detail-head h2 { font-size: 21px; line-height: 1.4; margin: 7px 0; color: var(--navy); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12px; }
.content-box { padding: 18px; background: #f8fafd; border-radius: 16px; margin-top: 15px; }
.content-box h3 { margin: 0 0 8px; font-size: 13px; color: var(--navy); }
.content-box p { font-size: 13px; line-height: 1.85; color: #566a85; margin: 0; white-space: pre-line; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.files a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid #dce7f5; border-radius: 12px; background: #fff; font-size: 12px; font-weight: 700; color: var(--blue); }
.timeline { list-style: none; padding: 3px 15px 6px 0; margin: 0; }
.timeline li { border-right: 2px solid #dbe4ef; position: relative; padding: 0 22px 24px 0; }
.timeline li:last-child { border-right-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; right: -8px; top: 3px; height: 13px; width: 13px; background: #fff; border: 3px solid #b9c9df; border-radius: 100%; }
.timeline li.current::before { border-color: var(--orange); background: #fff0e4; }
.timeline h4 { margin: 0; font-size: 13px; color: var(--navy); }
.timeline time { display: block; font-size: 11px; color: #8091a7; margin-top: 4px; }
.timeline p { font-size: 12px; line-height: 1.7; color: #657894; margin: 5px 0 0; white-space: pre-line; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 92%; padding: 12px 15px; border-radius: 16px; background: #fff; border: 1px solid var(--line); font-size: 13px; line-height: 1.7; white-space: pre-line; }
.msg.me { align-self: flex-start; background: var(--blue-soft); border-color: transparent; }
.msg.staff { align-self: flex-end; background: var(--orange-soft); border-color: transparent; }
.msg .meta { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* ---- success ---- */
.success-screen { text-align: center; padding: 41px 20px 0; }
.success-icon { height: 92px; width: 92px; display: grid; place-items: center; border-radius: 50%; background: #dff6eb; color: #068858; margin: 14px auto 22px; font-size: 44px; }
.success-screen h1 { font-weight: 850; font-size: 27px; margin: 0 0 8px; color: var(--navy); }
.success-screen p { line-height: 1.85; color: #5e7290; }
.receipt { margin: 25px auto; padding: 18px; background: #fff; border: 1px solid #dce7f4; border-radius: 19px; }
.receipt b { display: block; font-size: 24px; color: var(--navy); margin: 7px 0; direction: ltr; }

/* ---- desktop ---- */
@media (min-width: 800px) {
  .inner { max-width: 800px; padding: 20px 30px 80px; }
  .app-header { max-width: 850px; height: 94px; padding: 22px 30px; }
  .auth-page { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(450px, 1fr); grid-template-areas: 'intro form'; align-items: center; padding: 6vh max(6vw, 20px); gap: 0 30px; }
  .auth-head { grid-area: form; align-self: start; width: 100%; max-width: 550px; padding: 0 20px 17px; }
  .city-hero { grid-area: intro; height: min(720px, 85vh); border-radius: 30px; box-shadow: var(--shadow); align-self: stretch; }
  .city-hero .hero-photo { flex: 1; min-height: 280px; height: auto; }
  .hero-copy h1 { font-size: 42px; }
  .auth-content { grid-area: form; width: 100%; align-self: center; max-width: 550px; padding: 0 20px; }
  .auth-card { padding: 30px; }
  .bottom-nav { width: max-content; min-width: 410px; height: 76px; border: 1px solid #e1eaf4; box-shadow: var(--shadow); border-radius: 24px; bottom: 20px; left: 50%; right: auto; transform: translateX(-50%); padding: 0 16px; }
  .home-hero { padding: 37px; }
  .request-card { padding: 22px; }
  .page-title { margin-top: 26px; }
}
@media (max-width: 374px) {
  .brand-txt strong { font-size: 13px; } .h1 { font-size: 26px; } .digit { width: 13vw; height: 53px; }
  .city-hero .hero-photo { height: 195px; } .hero-copy h1 { font-size: 28px; } .app-header { height: 78px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* ---- profile / notifications ---- */
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--orange-soft); color: var(--orange); display: grid; place-items: center; font-weight: 850; font-size: 22px; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 84px; height: 84px; font-size: 32px; }
.icon-btn.bell { position: relative; }
.bell-badge { position: absolute; top: -4px; left: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.request-card.unread { border-color: var(--orange); }
