/* ============================================================================
   RealtyReach — Admin panel styles. Self-contained; not used on the public site.
   ============================================================================ */
:root {
  --a-bg: #f4f5f7;
  --a-panel: #ffffff;
  --a-ink: #16161c;
  --a-muted: #6b6f76;
  --a-line: #e4e6ea;
  --a-accent: #e63946;
  --a-accent-soft: #fdecec;
  --a-ok: #15803d;
  --a-ok-soft: #e9f8ef;
  --a-radius: 10px;
  --a-shadow: 0 1px 2px rgba(16,16,24,.05), 0 4px 16px rgba(16,16,24,.05);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--a-ink); background: var(--a-bg); font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }

/* ---- Shell layout -------------------------------------------------------- */
.a-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.a-side { background: #1c1c23; color: #eaeaf0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.a-brand { padding: 22px 22px 18px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.25rem; letter-spacing: .5px; }
.a-brand span { color: var(--a-accent); }
.a-nav { flex: 1; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.a-nav-link { display: block; padding: 9px 12px; border-radius: 8px; color: #b9bbc6; font-size: .92rem; }
.a-nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.a-nav-link.is-active { background: rgba(230,57,70,.16); color: #fff; font-weight: 600; }
.a-nav-group { padding: 14px 18px 4px; font-size: .68rem; letter-spacing: 1.2px; text-transform: uppercase; color: #6f7180; }
.a-nav-tools { flex: none; padding-bottom: 4px; }
.a-tools-ext { color: #6f7180; font-size: .78rem; }
.a-select-sm { font-size: .82rem; padding: 4px 6px; border: 1px solid var(--a-line); border-radius: 6px; background: var(--a-panel); color: var(--a-ink); cursor: pointer; }
.a-bulk > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.a-bulk > summary::-webkit-details-marker { display: none; }
.a-bulk > summary::after { content: "▾"; margin-left: auto; color: var(--a-muted); font-size: .9rem; }
.a-bulk[open] > summary::after { content: "▴"; }
.a-side-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.a-logout { background: none; border: 0; color: #b9bbc6; font-size: .92rem; cursor: pointer; padding: 4px 0; }
.a-logout:hover { color: #fff; }

.a-main { display: flex; flex-direction: column; min-width: 0; }
.a-topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 26px; background: var(--a-panel); border-bottom: 1px solid var(--a-line); }
.a-title { margin: 0; font-size: 1.25rem; font-family: Georgia, serif; font-weight: 600; }
.a-user { text-align: right; }
.a-name { font-weight: 600; display: block; }
.a-role { color: var(--a-accent); text-transform: uppercase; font-size: .7rem; letter-spacing: 1px; }
.a-content { padding: 26px; display: flex; flex-direction: column; gap: 22px; max-width: 1080px; width: 100%; }
.a-foot { padding: 16px 26px; color: var(--a-muted); font-size: .82rem; border-top: 1px solid var(--a-line); }

/* ---- Cards, stats, alerts -------------------------------------------------- */
.a-card { background: var(--a-panel); border: 1px solid var(--a-line); border-radius: var(--a-radius); box-shadow: var(--a-shadow); padding: 20px 22px; }
.a-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.a-card-head h2 { margin: 0; font-size: 1.05rem; font-family: Georgia, serif; }
.a-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.a-grid-2 { grid-template-columns: repeat(2, 1fr); }
.a-grid-3 { grid-template-columns: repeat(3, 1fr); }
.a-grid-stats { grid-template-columns: repeat(4, 1fr); }
.a-stat { background: var(--a-panel); border: 1px solid var(--a-line); border-radius: var(--a-radius); box-shadow: var(--a-shadow); padding: 18px 20px; text-align: left; }
.a-stat:hover { border-color: var(--a-accent); }
.a-stat-num { font-size: 1.9rem; font-weight: 700; font-family: Georgia, serif; }
.a-stat-label { color: var(--a-muted); font-size: .85rem; }
.a-empty { color: var(--a-muted); }

.a-alert { padding: 11px 14px; border-radius: 8px; margin-bottom: 18px; border: 1px solid transparent; }
.a-alert-success { background: var(--a-ok-soft); border-color: #bfe3cc; color: #14532d; }
.a-alert-error { background: var(--a-accent-soft); border-color: #f6c6cb; color: #8f1d27; }
.a-alert-info { background: #eef4fd; border-color: #c4d7f5; color: #1e3a8a; }

.a-badge { background: var(--a-accent); color: #fff; border-radius: 999px; font-size: .7rem; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.a-muted { color: var(--a-muted); font-size: .85rem; }
.a-tag { background: #eef0f3; color: #333; border-radius: 6px; font-size: .74rem; padding: 2px 7px; text-transform: uppercase; letter-spacing: .3px; }
.a-pill { background: #eef0f3; border-radius: 999px; font-size: .72rem; padding: 3px 9px; }
.a-pill-on { background: var(--a-ok-soft); color: var(--a-ok); font-weight: 600; }

/* ---- Tabs & stars (Google reviews) ---------------------------------------- */
.a-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.a-tabs a { padding: 6px 12px; border-radius: 8px; font-size: .84rem; color: var(--a-muted); text-decoration: none; border: 1px solid transparent; }
.a-tabs a:hover { background: var(--a-bg); }
.a-tabs a.is-active { background: var(--a-accent-soft); color: var(--a-accent); font-weight: 600; }
.a-stars { color: #f59e0b; letter-spacing: 2px; }

/* ---- Tables ---------------------------------------------------------------- */
.a-table { width: 100%; border-collapse: collapse; }
.a-table th { text-align: left; color: var(--a-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .6px; padding: 8px 10px; border-bottom: 1px solid var(--a-line); }
.a-table td { padding: 11px 10px; border-bottom: 1px solid var(--a-line); vertical-align: top; }
.a-table tr:last-child td { border-bottom: 0; }
a.a-table-external:hover { text-decoration: underline; }

/* ---- Buttons ---------------------------------------------------------------- */
.a-btn { display: inline-block; padding: 8px 14px; border-radius: 8px; font-size: .88rem; font-weight: 600; border: 1px solid transparent; cursor: pointer; background: none; }
.a-btn-primary { background: var(--a-accent); color: #fff; }
.a-btn-primary:hover { background: #d22f3d; }
.a-btn-ghost { border-color: var(--a-line); color: var(--a-ink); background: #fff; }
.a-btn-ghost:hover { border-color: var(--a-accent); color: var(--a-accent); }
.a-btn-danger { border-color: #f3c1c6; color: #b02533; background: #fdf3f4; }
.a-btn-danger:hover { background: var(--a-accent); color: #fff; border-color: var(--a-accent); }
.a-btn-sm { padding: 4px 9px; font-size: .78rem; }
.a-btn-block { display: block; width: 100%; }
.a-actions { white-space: nowrap; }
.a-actions form, .a-inline { display: inline; margin: 0; }
.a-toolbar { display: flex; gap: 8px; }

/* ---- Forms ------------------------------------------------------------------ */
.af-field { margin-bottom: 15px; }
.af-label { display: block; font-size: .83rem; font-weight: 600; margin-bottom: 5px; }
.af-hint { display: block; color: var(--a-muted); font-size: .78rem; margin-top: 4px; }
.af-input { width: 100%; padding: 9px 11px; border: 1px solid var(--a-line); border-radius: 8px; font: inherit; background: #fff; }
.af-input:focus { outline: 2px solid var(--a-accent); outline-offset: 0; border-color: var(--a-accent); }
.a-input-sm { width: auto; padding: 4px 8px; font-size: .85rem; }
.af-check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; margin: 10px 0 16px; cursor: pointer; }
.af-actions { margin-top: 6px; }

/* ---- Enquiries -------------------------------------------------------------- */
.a-enquiry { border: 1px solid var(--a-line); border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
.a-enquiry-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.a-enquiry-right { text-align: right; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.a-enquiry-msg { background: #fafbfc; border-radius: 8px; padding: 10px 12px; margin: 6px 0 10px; }

/* ---- Media ------------------------------------------------------------------ */
.a-upload { padding: 6px 0 4px; }
.a-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.a-media-item { border: 1px solid var(--a-line); border-radius: 8px; overflow: hidden; background: #fff; }
.a-media-item img { width: 100%; height: 130px; object-fit: cover; display: block; }
.a-media-meta { padding: 8px 10px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.a-media-meta code { font-size: .7rem; color: var(--a-muted); word-break: break-all; }

/* ---- User menu --------------------------------------------------------------- */
.a-menu { position: absolute; background: #fff; border: 1px solid var(--a-line); border-radius: 8px; box-shadow: var(--a-shadow); padding: 12px; margin-top: 6px; min-width: 220px; z-index: 10; }

/* ---- Login ------------------------------------------------------------------ */
.a-login-body { display: grid; place-items: center; min-height: 100vh; background: #1c1c23; }
.a-login-card { background: #fff; border-radius: 14px; padding: 34px 32px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.a-login-brand { font-family: Georgia, serif; font-size: 1.5rem; margin-bottom: 22px; }
.a-login-brand span { color: var(--a-accent); }
.a-login-form .af-label { margin-top: 10px; }
.a-login-form .af-input { margin-bottom: 14px; }
.a-login-note { margin-top: 16px; text-align: center; font-size: .85rem; color: var(--a-muted); }
.a-login-note a { color: var(--a-accent); }

@media (max-width: 820px) {
  .a-shell { grid-template-columns: 1fr; }
  .a-side { position: static; height: auto; }
  .a-nav { flex-direction: row; flex-wrap: wrap; overflow: visible; }
  .a-grid-stats, .a-grid-2, .a-grid-3 { grid-template-columns: 1fr; }
  .a-content { padding: 16px; }
}
/* ---- Broker / listings (2026-08-09) -------------------------------- */
.a-btn-success { background: #16a34a; color: #fff; }
.a-btn-success:hover { background: #15803d; }
.a-tag-attr { background: #eef4fd; color: #1e3a8a; }
