/* UPmarket admin. Same brand tokens as the public site (app/globals.css). */
@font-face { font-family: Poppins; font-weight: 400; src: url(fonts/poppins-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Poppins; font-weight: 500; src: url(fonts/poppins-latin-500-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Poppins; font-weight: 600; src: url(fonts/poppins-latin-600-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --forest: #1f3320; --forest-2: #2a452b; --green: #68b33a; --green-7: #3d7a1f; --orange: #e99038; --orange-7: #a85a14;
  --ink: #1e2a1a; --muted: #5a6555; --paper: #f5f6f0; --line: #dde2d6; --white: #fff; --red: #b3261e;
  --side: 248px; --r: 14px; --shadow: 0 10px 30px -18px rgb(31 51 32 / .35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 Poppins, system-ui, sans-serif; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--green-7); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; line-height: 1.2; }
h1 { font-size: 28px; font-weight: 600; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
svg { width: 20px; height: 20px; flex: none; }
code { font: 13px/1 ui-monospace, Menlo, monospace; background: var(--paper); padding: 3px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.r { text-align: right; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green-7); }
.warn-txt { color: var(--orange-7); }

/* layout */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--forest); color: #fff; display: flex; flex-direction: column; padding: 22px 16px; z-index: 20; }
.side .brand img { height: 58px; display: block; margin: 0 0 22px 6px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a, .side-foot a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgb(255 255 255 / .8); font-weight: 500; }
.side nav a:hover, .side-foot a:hover { background: rgb(255 255 255 / .08); color: #fff; text-decoration: none; }
.side nav a.on { background: rgb(104 179 58 / .22); color: #fff; }
.side nav a.on svg { color: var(--green); }
.side-foot { margin-top: auto; border-top: 1px solid rgb(255 255 255 / .12); padding-top: 12px; }
.who { padding: 12px 12px 6px; line-height: 1.3; }
.who strong { display: block; font-weight: 600; }
.who span { font-size: 12px; color: rgb(255 255 255 / .6); }
.top { display: none; }
.main { margin-left: var(--side); padding: 36px 44px 64px; max-width: 1240px; }
body.bare .main { margin: 0; padding: 0; max-width: none; }

@media (max-width: 900px) {
  .top { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .top .brand img { height: 40px; display: block; }
  .burger { border: 1px solid var(--line); background: #fff; border-radius: 10px; width: 42px; height: 42px; display: grid; place-items: center; }
  .side { transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vw rgb(31 51 32 / .45); }
  .main { margin: 0; padding: 20px 16px 48px; }
}

/* page head */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.head .muted { margin-top: 6px; }
.head .muted svg { width: 14px; height: 14px; vertical-align: -2px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumb svg { width: 16px; height: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { margin: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; transition: .15s; }
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: var(--ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(.95); }
.btn.ghost { background: transparent; }
.btn.red { color: var(--red); border-color: rgb(179 38 30 / .35); }
.btn.red:hover { background: rgb(179 38 30 / .06); border-color: var(--red); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

/* cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.card h2 { margin-bottom: 14px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card.narrow { max-width: 640px; }
.card.danger { border-color: rgb(179 38 30 / .25); box-shadow: none; }
.stack > .card + .card { margin-top: 20px; }
.cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; color: var(--ink); box-shadow: var(--shadow); transition: .15s; }
.stat:hover { transform: translateY(-2px); text-decoration: none; border-color: var(--green-7); }
.stat .n { font-size: 36px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.stat .n small { font-size: 18px; color: var(--muted); font-weight: 500; }
.stat .l { color: var(--muted); font-size: 14px; }
.stat .bar { height: 6px; background: var(--paper); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.note { display: flex; align-items: center; gap: 10px; background: #fff8ef; border: 1px solid rgb(233 144 56 / .45); color: var(--orange-7); padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; }
.note a { color: var(--orange-7); font-weight: 600; }

/* flash */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-weight: 500; }
.f-ok { background: #edf7e6; color: #2b5a14; border: 1px solid rgb(104 179 58 / .4); }
.f-err { background: #fdecea; color: var(--red); border: 1px solid rgb(179 38 30 / .3); }

/* badges */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; line-height: 1.4; }
.b-grey { background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.b-orange { background: #fff1e0; color: var(--orange-7); }
.b-green { background: #e6f4dc; color: #2b5a14; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
.tbl th.r { text-align: right; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr[onclick] { cursor: pointer; }
.tbl tbody tr[onclick]:hover { background: var(--paper); }
.tbl tr.off td { opacity: .55; }
@media (max-width: 700px) { .tbl th:nth-child(n+3), .tbl td:nth-child(n+3) { display: none; } .tbl td:last-child, .tbl th:last-child { display: table-cell; } }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 20px; }
.tabs a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { background: var(--forest); color: #fff; }
.tabs-note { margin-left: auto; color: var(--muted); font-size: 13px; }

/* property grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.prop { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: var(--ink); box-shadow: var(--shadow); transition: .15s; }
.prop:hover { transform: translateY(-2px); text-decoration: none; border-color: var(--green-7); }
.prop-img { position: relative; aspect-ratio: 4 / 3; background: var(--paper); }
.prop-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; }
.prop-state { position: absolute; top: 10px; left: 10px; }
.prop-n { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; background: rgb(31 51 32 / .75); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 999px; }
.prop-n svg { width: 14px; height: 14px; }
.prop-body { padding: 14px 16px 16px; }
.prop-body .price { font-weight: 600; color: var(--orange-7); font-size: 17px; }
.prop-body .price .muted { font-size: 13px; font-weight: 500; }
.prop-body h3 { margin-top: 2px; }
.prop-body .muted { display: flex; align-items: center; gap: 4px; font-size: 13px; margin-top: 4px; }
.prop-body .muted svg { width: 14px; height: 14px; }
.prop-body .agent { font-size: 13px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* forms */
label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 14px; }
label small { display: block; font-weight: 400; color: var(--muted); margin: 2px 0 4px; }
label input + small, label select + small { margin-top: 6px; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 14px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; outline: none; transition: .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--green-7); box-shadow: 0 0 0 3px rgb(61 122 31 / .15); }
input:disabled { background: var(--paper); color: var(--muted); }
textarea { resize: vertical; min-height: 44px; line-height: 1.5; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.row .w2 { grid-column: span 2; }
@media (max-width: 600px) { .row .w2 { grid-column: auto; } }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; }
.check input { width: 18px; height: 18px; margin: 0; }
.form-foot { display: flex; align-items: center; gap: 14px; margin-top: 6px; }

/* photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
.photo { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--paper); border: 2px solid transparent; }
.photo.cover { border-color: var(--green); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-tag { position: absolute; top: 6px; left: 6px; background: var(--green); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.photo-tools { position: absolute; inset: auto 0 0 0; display: flex; gap: 2px; padding: 4px; background: linear-gradient(transparent, rgb(31 51 32 / .8)); opacity: 0; transition: .15s; }
.photo:hover .photo-tools, .photo:focus-within .photo-tools { opacity: 1; }
@media (hover: none) { .photo-tools { opacity: 1; } }
.photo-tools button { flex: 1; font: inherit; font-size: 12px; font-weight: 600; background: rgb(255 255 255 / .9); border: 0; border-radius: 6px; padding: 4px 0; cursor: pointer; }
.photo-tools button:disabled { opacity: .4; cursor: default; }
.photo-tools button.del { color: var(--red); flex: 0 0 28px; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.drop { flex: 1; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed var(--line); border-radius: 12px; cursor: pointer; margin: 0; font-weight: 400; transition: .15s; }
.drop:hover { border-color: var(--green-7); background: #fafbf7; }
.drop svg { color: var(--green-7); width: 26px; height: 26px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop strong { font-weight: 600; }

/* definition lists, steps */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }

/* sign in / set up */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 24px; }
.auth-logo { height: 64px; }
.auth .card { width: 100%; max-width: 420px; }
.auth h1 { font-size: 22px; margin-bottom: 4px; }
.auth .muted { margin-bottom: 18px; }
.auth form { margin-top: 4px; }
.auth .btn { width: 100%; justify-content: center; margin-top: 4px; }
.auth .small { margin-top: 16px; margin-bottom: 0; }

/* Team page */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #f9cb3f; color: var(--ink); font-weight: 600; font-size: 14px; }
.avatar.big { width: 96px; height: 96px; font-size: 28px; }
.who-cell { display: flex; align-items: center; gap: 12px; }
.photo-pick { display: flex; align-items: flex-start; gap: 18px; }
form.inline { display: inline-flex; gap: 4px; margin: 0; }
.nowrap { white-space: nowrap; }
