/* Hinduja Law Firm client app. Sky blue and white.
   Headings use a serif for a measured, professional tone; body text uses the phone's own font. */
:root {
  --sky-300: #7dd3fc;
  --sky-200: #bae6fd;
  --sky-100: #e0f2fe;
  --sky-50: #f0f9ff;
  --ink: #0c4a6e;
  --ink-2: #3b5a70;
  --action: #0369a1;
  --action-press: #075985;
  --line: #cfe8f7;
  --white: #ffffff;
  --ok: #046c4e;
  --ok-bg: #def5ea;
  --warn: #8a4b08;
  --warn-bg: #fdf0cf;
  --bad: #b42318;
  --bad-bg: #fde8e6;
  --radius: 16px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --nav-h: 66px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #dff0fa;
  color: var(--ink);
  font: 16px/1.5 var(--font-body);
}
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--sky-50);
  position: relative;
  box-shadow: 0 0 0 1px var(--line);
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0; line-height: 1.2; color: var(--ink); }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
a { color: var(--action); }
.muted { color: var(--ink-2); }
.fine { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; border-radius: 8px; }

/* ---------- top band and sheet ---------- */
.band {
  background: linear-gradient(180deg, var(--sky-300) 0%, var(--sky-200) 100%);
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px 52px;
}
.band.small { padding-bottom: 40px; }
.band .top { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.band h1 { font-size: 28px; }
.band .sub { margin: 4px 0 0; color: var(--ink); opacity: .85; }
.mark {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--white); color: var(--action);
  display: grid; place-items: center;
}
.mark svg { width: 28px; height: 28px; }
.back {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--white);
  color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none;
}
.sheet {
  background: var(--white);
  margin: -32px 12px 0;
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: 0 0 0 1px var(--line), 0 10px 28px rgba(3, 105, 161, .09);
  position: relative;
}
.sheet + .sheet { margin-top: 14px; }
.main { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 28px); }
.main.no-nav { padding-bottom: 32px; }
.gap { height: 14px; }

/* ---------- icons ---------- */
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- rows (home actions, lists) ---------- */
.rows { margin: -4px 0; }
.row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 2px; border: 0; border-top: 1px solid var(--line);
  background: none; font: inherit; color: inherit; text-align: left; text-decoration: none; cursor: pointer;
  min-height: 64px;
}
.row:first-child { border-top: 0; }
.row .ico {
  width: 44px; height: 44px; border-radius: 50%; background: var(--sky-100); color: var(--action);
  display: grid; place-items: center; flex: none;
}
.row .txt { flex: 1; min-width: 0; }
.row .t { font-weight: 650; display: block; }
.row .d { font-size: 14px; color: var(--ink-2); display: block; }
.row .chev { color: var(--ink-2); width: 20px; height: 20px; }
.count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--action); color: #fff;
  font-size: 13px; font-weight: 700; display: inline-grid; place-items: center;
}

/* ---------- forms ---------- */
label.lbl { display: block; font-weight: 600; margin: 16px 0 6px; }
label.lbl:first-child { margin-top: 0; }
.hint { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; }
input[type=text], input[type=tel], input[type=email], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1.5px solid #9cc7e3; border-radius: 12px;
  padding: 12px 14px; min-height: 50px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--sky-300); border-color: var(--action); }
.phone-field { display: flex; align-items: stretch; border: 1.5px solid #9cc7e3; border-radius: 12px; overflow: hidden; background: #fff; }
.phone-field:focus-within { outline: 3px solid var(--sky-300); border-color: var(--action); }
.phone-field span { display: grid; place-items: center; padding: 0 14px; background: var(--sky-100); font-weight: 650; }
.phone-field input { border: 0; border-radius: 0; outline: 0 !important; flex: 1; min-width: 0; letter-spacing: .5px; }
.code-input { text-align: center; font-size: 28px !important; letter-spacing: 10px; font-weight: 650; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; font-size: 15px; }
.check input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--action); flex: none; }
.err { background: var(--bad-bg); color: var(--bad); border-radius: 12px; padding: 10px 12px; margin: 12px 0 0; font-size: 15px; }
.demo { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; font-size: 15px; }
.demo b { font-size: 18px; letter-spacing: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 52px; padding: 12px 18px; border: 0; border-radius: 14px;
  background: var(--action); color: #fff; font: inherit; font-weight: 650; font-size: 17px;
  text-decoration: none; cursor: pointer; margin-top: 16px;
}
.btn:active { background: var(--action-press); transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.alt { background: var(--sky-100); color: var(--ink); }
.btn.alt:active { background: var(--sky-200); }
.btn.line { background: #fff; color: var(--action); box-shadow: inset 0 0 0 1.5px var(--action); }
.btn.danger { background: #fff; color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.btn.slim { min-height: 44px; font-size: 15px; width: auto; padding: 8px 16px; margin-top: 0; }
.link { background: none; border: 0; color: var(--action); font: inherit; font-weight: 600; padding: 10px 4px; cursor: pointer; text-decoration: underline; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -4px; scrollbar-width: thin; }
.chip {
  border: 1.5px solid #9cc7e3; background: #fff; color: var(--ink); border-radius: 12px;
  padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; flex: none;
}
.chip[aria-pressed=true] { background: var(--action); border-color: var(--action); color: #fff; }
.chip[disabled] { background: #f1f6f9; border-color: var(--line); color: #7a95a6; cursor: not-allowed; }
.day { display: flex; flex-direction: column; align-items: center; min-width: 58px; line-height: 1.2; padding: 8px 10px; }
.day small { font-weight: 500; font-size: 12px; }
.day b { font-size: 20px; font-family: var(--font-head); }

.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--sky-100); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.seg button { border: 0; background: none; font: inherit; font-weight: 650; padding: 10px; border-radius: 11px; color: var(--ink-2); min-height: 44px; cursor: pointer; }
.seg button[aria-selected=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(12, 74, 110, .18); }

.opt { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit; background: #fff; border: 1.5px solid #9cc7e3; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; min-height: 64px; }
.opt[aria-pressed=true] { border-color: var(--action); background: var(--sky-50); box-shadow: inset 0 0 0 1.5px var(--action); }
.opt .ico { width: 42px; height: 42px; border-radius: 50%; background: var(--sky-100); color: var(--action); display: grid; place-items: center; flex: none; }
.opt .txt { flex: 1; }
.opt .t { font-weight: 650; display: block; }
.opt .d { font-size: 14px; color: var(--ink-2); }
.opt .price { font-weight: 700; font-family: var(--font-head); font-size: 18px; }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 650; background: var(--sky-100); color: var(--ink); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.wait { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- cards in lists ---------- */
.item { padding: 14px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 0; }
.item .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.item .head b { font-weight: 650; }
.item p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply { background: var(--sky-50); border-left: 4px solid var(--sky-300); border-radius: 0 10px 10px 0; padding: 10px 12px; margin-top: 10px; }
.reply .who { font-size: 13px; font-weight: 650; color: var(--action); margin-bottom: 2px; }
.empty { text-align: center; color: var(--ink-2); padding: 18px 8px; }

/* ---------- next appointment card ---------- */
.next { background: var(--sky-100); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.next .when { font-family: var(--font-head); font-size: 20px; font-weight: 700; margin: 2px 0 8px; }

/* ---------- plans ---------- */
.plan { border: 1.5px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; background: #fff; }
.plan.current { border-color: var(--action); box-shadow: inset 0 0 0 1.5px var(--action); }
.plan .price { font-family: var(--font-head); font-size: 30px; font-weight: 700; }
.plan .price small { font-family: var(--font-body); font-size: 15px; font-weight: 500; color: var(--ink-2); }
.plan ul { list-style: none; margin: 12px 0 0; padding: 0; }
.plan li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.plan li .ic { width: 20px; height: 20px; color: var(--ok); margin-top: 2px; }

/* ---------- chat ---------- */
.chat-wrap { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.chat-head { background: linear-gradient(180deg, var(--sky-300), var(--sky-200)); padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 12px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 5; }
.chat-head .who { font-family: var(--font-head); font-weight: 700; font-size: 18px; line-height: 1.2; }
.chat-head .who small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 13px; opacity: .85; }
.chat-body { flex: 1; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.note { align-self: center; max-width: 92%; text-align: center; font-size: 13px; color: var(--ink-2); background: var(--sky-100); border-radius: 12px; padding: 8px 12px; }
.bubble { max-width: 82%; padding: 10px 13px; border-radius: 18px; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble time { display: block; font-size: 11px; opacity: .75; margin-top: 3px; }
.bubble.me { align-self: flex-end; background: var(--action); color: #fff; border-bottom-right-radius: 6px; }
.bubble.firm { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.composer { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 10px); display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 48px; max-height: 120px; height: 48px; padding: 11px 14px; border-radius: 24px; resize: none; }
.send { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--action); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.send[disabled] { opacity: .5; }

/* ---------- bottom navigation ---------- */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px); z-index: 10;
}
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 8px; min-height: var(--nav-h); color: var(--ink-2); text-decoration: none; font-size: 12px; font-weight: 600; position: relative; }
.nav a .pill { width: 56px; height: 32px; border-radius: 16px; display: grid; place-items: center; }
.nav a[aria-current=page] { color: var(--ink); }
.nav a[aria-current=page] .pill { background: var(--sky-200); color: var(--ink); }
.nav .dot { position: absolute; top: 6px; left: calc(50% + 10px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--action); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; }

/* ---------- toast and modal ---------- */
.toast { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 12px); left: 50%; transform: translateX(-50%); max-width: 440px; width: calc(100% - 24px); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; z-index: 50; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.toast.bad { background: var(--bad); }
.overlay { position: fixed; inset: 0; background: rgba(12, 74, 110, .45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 20px 18px calc(env(safe-area-inset-bottom, 0px) + 20px); }
.modal h2 { margin-bottom: 10px; }
.modal h3 { margin: 16px 0 4px; }
.modal .btn:first-of-type { margin-top: 18px; }
.legal p { margin: 0 0 10px; }

/* ---------- login ---------- */
.login-band { padding: calc(env(safe-area-inset-top, 0px) + 36px) 24px 64px; background: linear-gradient(180deg, var(--sky-300), var(--sky-200)); text-align: center; }
.login-band .mark { width: 72px; height: 72px; margin: 0 auto 14px; }
.login-band .mark svg { width: 44px; height: 44px; }
.login-band h1 { font-size: 30px; }
.login-band p { margin: 6px 0 0; }

/* ---------- done / success ---------- */
.done { text-align: center; padding: 24px 8px 8px; }
.tick { width: 84px; height: 84px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; }
.tick svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .15s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.summary { background: var(--sky-50); border-radius: 14px; padding: 14px; margin: 4px 0 6px; }
.summary .line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-weight: 700; font-size: 20px; font-family: var(--font-head); }
.loading { text-align: center; color: var(--ink-2); padding: 40px 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .tick svg { stroke-dashoffset: 0; }
}
@media (min-width: 520px) {
  body { padding: 0; }
}

/* ---------- languages and documents ---------- */
.langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--sky-100); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.langs button { border: 0; background: none; font: inherit; font-weight: 650; padding: 10px 6px; border-radius: 11px; color: var(--ink-2); min-height: 44px; cursor: pointer; }
.langs button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(12, 74, 110, .18); }
label.lbl .ic { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.link-inline { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 600; min-height: 44px; text-decoration: none; }
.link-inline .ic { width: 18px; height: 18px; }
input[type=file]:not(.sr) {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  border: 1.5px dashed #6fb4dc; border-radius: 12px; padding: 12px;
}
input[type=file]:not(.sr)::file-selector-button {
  font: inherit; font-weight: 650; color: #fff; background: var(--action); border: 0; border-radius: 9px;
  padding: 9px 14px; margin-right: 12px; cursor: pointer;
}
.item.doc .fname { overflow-wrap: anywhere; min-width: 0; }
.doc-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.doc-actions .btn { margin: 0; width: auto; display: inline-flex; }
.btn .ic { width: 20px; height: 20px; vertical-align: -4px; }
:lang(hi) body, :lang(mr) body { line-height: 1.6; }
.filepick { display: flex; align-items: center; gap: 12px; border: 1.5px dashed #6fb4dc; border-radius: 12px; padding: 10px; background: #fff; }
.filebtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 12px; background: var(--sky-100); color: var(--ink); font-weight: 650; font-size: 15px; cursor: pointer; flex: none; }
.filebtn:active { background: var(--sky-200); }
.filebtn .ic { width: 20px; height: 20px; }
.filepick .fname { min-width: 0; overflow-wrap: anywhere; font-size: 14px; color: var(--ink-2); }
input.sr:focus-visible + .filepick { outline: 3px solid var(--action); outline-offset: 2px; }
