/* Verno Nests — shared styles for the login, landlord and admin pages.
   Same green and Inter as the public site, so the three feel like one product. */
:root {
  --green: #059669; --green-d: #047857; --green-l: #ecfdf5; --ink: #13221b; --muted: #5b6b63;
  --line: #e3e9e6; --bg: #f6f8f7; --warn: #a3341f; --warn-l: #fdecea;
  --vacant: #e7f6ef; --vacant-b: #9bd8bc; --occ: #e8eefc; --occ-b: #a9bdf0; --late: #fdecea; --late-b: #ef9f95;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; }
body { font-family: Inter, system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.45; }
a { color: var(--green-d); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }

/* top bar */
.top { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.top .brand { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.top .who { font-size: 13px; color: var(--muted); }
.tabs { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 12px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-current="page"] { background: #eaf4ef; color: var(--ink); }
.banner { background: var(--green-l); color: #065f46; font-size: 14px; padding: 10px 20px; border-bottom: 1px solid #c8eedb; }

main { max-width: 1120px; margin: 0 auto; padding: 24px 20px 64px; }
h1 { font-size: 26px; letter-spacing: -0.01em; margin-bottom: 6px; }
h2 { font-size: 21px; margin-bottom: 12px; }
h3 { font-size: 16px; margin-bottom: 8px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 18px; }

/* numbers row on overview pages */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.alert b { color: var(--warn); }

/* controls */
.btn { font: inherit; font-size: 14px; font-weight: 600; border-radius: 9px; padding: 9px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-d); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.danger { color: var(--warn); }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; font-size: 14px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; width: 100%; background: #fff; color: var(--ink); }
label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #93e0c4; outline-offset: 1px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 6px 0; font-weight: 500; }
.check input { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); }
td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 2px 9px; background: #eef1f0; color: var(--muted); }
.pill.ok { background: #d1fae5; color: #065f46; }
.pill.warn { background: var(--warn-l); color: var(--warn); }
.pill.info { background: #e0e9fb; color: #2b4c9b; }
.badge { font-size: 11px; font-weight: 600; color: #065f46; background: #d1fae5; border-radius: 6px; padding: 2px 6px; }

/* space cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; font: inherit; color: var(--ink); }
.card[aria-pressed="true"] { border-color: var(--green); box-shadow: 0 0 0 2px #b7ebd5; }
.card small { color: var(--muted); }

/* the unit board — the one element on these pages that must be unmistakable */
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.board .floor { margin-bottom: 16px; } .board .floor > b { font-size: 13px; color: var(--muted); }
.room { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.room > span { width: 90px; flex: none; font-size: 13px; font-weight: 600; padding-top: 10px; }
.units { display: flex; flex-wrap: wrap; gap: 8px; }
.unit { width: 112px; min-height: 64px; border-radius: 10px; border: 1.5px solid; padding: 8px; font: inherit; font-size: 12px; text-align: left; cursor: pointer; color: var(--ink); }
.unit b { display: block; font-size: 13px; }
.unit.vacant { background: var(--vacant); border-color: var(--vacant-b); }
.unit.occupied { background: var(--occ); border-color: var(--occ-b); }
.unit.overdue { background: var(--late); border-color: var(--late-b); }

/* bars for the 6-month chart */
.bars { display: flex; gap: 10px; align-items: flex-end; height: 140px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 12px; color: var(--muted); }
.bars i { display: block; width: 100%; max-width: 44px; background: var(--green); border-radius: 6px 6px 0 0; min-height: 2px; }

/* inbox */
.inbox { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.thread { display: block; width: 100%; text-align: left; font: inherit; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; cursor: pointer; color: var(--ink); }
.thread .unread { background: var(--green); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; margin-left: 6px; }
.msgs { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; margin-bottom: 12px; }
.msg { max-width: 78%; padding: 9px 12px; border-radius: 12px; font-size: 14px; white-space: pre-wrap; }
.msg.in { background: #f1f3f2; align-self: flex-start; } .msg.out { background: #dcf5e8; align-self: flex-end; }

dialog { border: 0; border-radius: 14px; padding: 22px; width: min(460px, 92vw); max-height: 90vh; }
dialog::backdrop { background: rgba(10, 25, 18, .35); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; display: none; max-width: 90vw; z-index: 20; }

@media (max-width: 760px) {
  .grid2, .inbox { grid-template-columns: 1fr; }
  .tabs { margin-left: 0; width: 100%; }
  .room { flex-direction: column; gap: 6px; } .room > span { width: auto; padding-top: 0; }
  .unit { width: calc(50% - 4px); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
