/* Namma Property - front-end mockup (mobile app screens) */
:root {
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #ccfbf1;
  --accent: #f59e0b;
  --bg: #eef2f1;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --grey: #8a94a3;
  --line: #e5e7eb;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans", "Noto Sans Kannada", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #cbd5d3;
  color: var(--text);
  font-size: 15px;
}
a { color: var(--brand); text-decoration: none; }

/* Phone-width app shell (looks like the Android app on desktop too) */
.app {
  max-width: 420px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(0, 0, 0, .15);
}
main { flex: 1; padding: 16px; }

/* Header - on every page */
.np-header {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
}
.np-header img { width: 40px; height: 40px; border-radius: 10px; background: #fff2; }
.np-header .titles { flex: 1; line-height: 1.15; }
.np-header .en { font-size: 19px; font-weight: 700; letter-spacing: .3px; }
.np-header .kn { font-family: "Noto Sans Kannada", sans-serif; font-size: 15px; color: #fde68a; }
.np-header .back { color: #fff; font-size: 24px; padding: 0 4px; line-height: 1; }
.page-title {
  background: var(--surface);
  padding: 10px 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.page-title small { color: var(--muted); font-weight: 400; }

/* Footer - on every page */
.np-footer {
  position: sticky; bottom: 0; z-index: 10;
  background: #134e4a;
  color: #d1fae5;
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
}
.np-footer a { color: #fff; font-weight: 600; white-space: nowrap; }
.np-footer .sep { opacity: .5; margin: 0 6px; }

/* Forms */
.card-box {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.field label .req { color: var(--danger); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.field input[readonly] { background: #f3f4f6; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }
.row .x { flex: 0 0 auto; color: var(--muted); font-weight: 700; }
.row select.unit { flex: 0 0 110px; }

/* Map pin on the Sales form. isolation keeps the map's layers below the sticky header and footer */
#map { height: 300px; border-radius: 10px; border: 1px solid var(--line); isolation: isolate; margin-top: 10px; }
.map-tools { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.map-tools .view { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.map-tools .view[hidden] { display: none; }
.map-tools .view button { border: 0; background: #fff; color: var(--text); padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.map-tools .view button.on { background: var(--brand); color: #fff; }
.pin-note { font-size: 13px; color: var(--muted); margin-top: 8px; }
.pin-note.set { color: var(--brand-dark); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px;
  padding: 13px 16px;
  font: inherit; font-weight: 600;
  cursor: pointer;
  background: var(--brand); color: #fff;
}
.btn.block { width: 100%; }
.btn.light { background: var(--brand-soft); color: var(--brand-dark); }
.btn.outline { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #fecaca; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }

.auto-stamp {
  background: #f0fdfa; border: 1px dashed #5eead4; border-radius: 10px;
  padding: 10px 12px; font-size: 13px; color: var(--brand-dark);
}

/* Photo slots (max 2) */
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-slot {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  background: #f8fafc;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; text-align: center;
  overflow: hidden; cursor: pointer;
}
/* .field label would otherwise override the flex centring above */
.field .photo-slot { display: flex; margin-bottom: 0; }
.photo-slot .plus { font-size: 28px; line-height: 1; color: var(--brand); }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot .remove {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 16px; cursor: pointer;
}
.photo-slot input { display: none; }

/* Sales section / property list */
.welcome { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.welcome b { color: var(--text); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 17px; }
.section-head .count { font-size: 12px; color: var(--muted); }

.prop-list { display: flex; flex-direction: column; gap: 10px; }
.prop-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  display: flex; gap: 12px; align-items: center;
  color: inherit;
}
.prop-card .thumb { flex: 0 0 72px; text-align: center; }
.prop-card .thumb img {
  width: 72px; height: 56px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); display: block; background: #f1f5f9;
}
.prop-card .pno {
  display: inline-block; margin-top: 5px;
  background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 1px 10px; border-radius: 20px;
}
.prop-card .info { flex: 1; min-width: 0; }
.prop-card .area { font-size: 17px; font-weight: 700; }
.prop-card .dim { color: var(--grey); font-size: 14px; margin-top: 1px; }
.prop-card .price { color: var(--brand-dark); font-size: 14px; font-weight: 700; margin-top: 2px; }
.buy-sec .prop-card .price, .prop-card.buy .price { color: var(--buy); }
.prop-card .loc { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prop-card .edit {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

.fab {
  position: fixed; bottom: 56px;
  left: 50%; transform: translateX(150px);
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 30px; line-height: 56px; text-align: center;
  box-shadow: 0 6px 16px rgba(245, 158, 11, .45); z-index: 11;
}
@media (max-width: 420px) { .fab { left: auto; right: 16px; transform: none; } }

/* View page */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #e2e8f0; }
.gallery.one { grid-template-columns: 1fr; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: right; }
.actions { display: flex; gap: 10px; }
.actions .btn { flex: 1; }

.toast {
  position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px;
  z-index: 20; opacity: 0; transition: opacity .25s;
}
.toast.show { opacity: 1; }

/* ---------- Sales / Purchase sections ---------- */
:root { --buy: #4f46e5; --buy-soft: #e0e7ff; }
.tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 5px; margin-bottom: 14px;
}
.tabs a {
  text-align: center; padding: 10px 4px; border-radius: 10px;
  font-weight: 700; font-size: 14px; color: var(--muted);
}
.tabs a small { display: block; font-weight: 400; font-size: 11px; }
.tabs a.on { background: var(--brand); color: #fff; }
.tabs a.on.buy { background: var(--buy); }
.buy-sec .btn:not(.outline):not(.danger):not(.light) { background: var(--buy); }
.buy-sec .btn.outline { color: var(--buy); border-color: var(--buy); }
.buy-sec .pno, .prop-card.buy .pno { background: var(--buy); }
.buy-sec .fab { background: var(--buy); box-shadow: 0 6px 16px rgba(79, 70, 229, .4); }
.buy-sec .prop-card .edit { background: var(--buy-soft); color: var(--buy); }
.prop-card.done .thumb img { filter: grayscale(.8); opacity: .7; }
.st.sold { background: #fee2e2; color: #b91c1c; }
.st.open { background: #dcfce7; color: #15803d; }
.st.tbuy { background: var(--buy-soft); color: var(--buy); }
.st.tsale { background: var(--brand-soft); color: var(--brand-dark); }
.status-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-box .big { font-size: 18px; font-weight: 700; }
.status-box .t { font-size: 12px; color: var(--muted); }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 8px 0 0; }

/* ---------- Admin section ---------- */
.hdr-badge {
  background: #fde68a; color: #78350f;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  padding: 3px 9px; border-radius: 20px;
}
.page-title a { font-weight: 600; font-size: 13px; }

.date-bar {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 8px; margin-bottom: 12px;
}
.date-bar button {
  border: 0; background: var(--brand-soft); color: var(--brand-dark);
  width: 36px; height: 36px; border-radius: 10px; font-size: 16px; cursor: pointer;
}
.date-bar input {
  flex: 1; min-width: 0; text-align: center;
  border: 1px solid #d1d5db; border-radius: 10px; padding: 8px; font: inherit; font-weight: 700;
}
.date-bar input.bad { border-color: var(--danger); }
.chips { display: flex; gap: 6px; margin-bottom: 12px; }
.chip {
  flex: 1; text-align: center; padding: 7px 4px; border-radius: 20px;
  background: #fff; border: 1px solid var(--line); color: var(--text);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.tile {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; color: inherit; border-left: 5px solid var(--c, var(--brand));
}
.tile .num { font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--c, var(--brand)); }
.tile .lbl { font-size: 14px; font-weight: 600; }
.tile .sub { font-size: 11px; color: var(--muted); }
.tile.overall { --c: #0f766e; }
.tile.discussed { --c: #d97706; }
.tile.success { --c: #16a34a; }
.tile.noresponse { --c: #6b7280; }

.list-head { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 8px; }
.list-head h3 { margin: 0; font-size: 16px; }
.list-head a { font-size: 13px; font-weight: 600; }
.list-block { margin-bottom: 18px; }

.st {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.st.new { background: #dbeafe; color: #1d4ed8; }
.st.discussed { background: #fef3c7; color: #b45309; }
.st.success { background: #dcfce7; color: #15803d; }
.st.noresponse { background: #f3f4f6; color: #4b5563; }
.st.late { background: #fee2e2; color: #b91c1c; }
.prop-card .side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.prop-card .who { font-size: 12px; color: var(--text); margin-top: 4px; font-weight: 600; }
.prop-card .when { font-size: 11px; color: var(--muted); }

.status-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 10px 0; }
.status-btns button {
  border: 2px solid var(--line); background: #fff; border-radius: 12px;
  padding: 10px 4px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.status-btns button.discussed { color: #b45309; }
.status-btns button.success { color: #15803d; }
.status-btns button.noresponse { color: #4b5563; }
.status-btns button.sel { border-color: currentColor; background: #f8fafc; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 3px solid var(--line); padding: 0 0 12px 12px; position: relative; font-size: 13px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 3px;
  width: 11px; height: 11px; border-radius: 50%; background: var(--brand);
}
.timeline .t { color: var(--muted); font-size: 12px; }
.call-row { display: flex; gap: 8px; margin-top: 10px; }
.call-row .btn { flex: 1; }

.pin-box { text-align: center; }
.pin-box input {
  width: 160px; text-align: center; font-size: 26px; letter-spacing: 12px;
  padding: 10px; border: 1px solid #d1d5db; border-radius: 12px; margin: 12px 0;
}

/* Requirements page */
.req h2 { font-size: 16px; color: var(--brand-dark); margin: 0 0 8px; }
.req ol, .req ul { padding-left: 20px; margin: 0; }
.req li { margin-bottom: 6px; line-height: 1.45; }
.req table { width: 100%; border-collapse: collapse; font-size: 13px; }
.req th, .req td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.req th { background: #f0fdfa; }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 20px; background: #fef3c7; color: #92400e; font-weight: 600; }
