/* Admin: layered on site.css. Built to be usable from a phone. */
body.admin { background: #f6f2ec; font-size: 16px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 36px 30px; display: grid; gap: 16px; }
.login-card img { width: 180px; margin: 0 auto 4px; }
.login-card h1 { font-size: 1.8rem; text-align: center; margin: 0; }
.back-link { text-align: center; font-size: .9rem; text-decoration: none; }

.app-bar { background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 24px; padding: 0 24px; min-height: 68px; position: sticky; top: 0; z-index: 30; flex-wrap: wrap; }
.app-bar .brand-sprig { width: 34px; margin-top: -4px; }
.app-bar .brand-wordmark { width: 150px; }
.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.tabs a { padding: 22px 14px 20px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--plum); }
.tabs a.active { color: var(--plum); border-bottom-color: var(--heather); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--heather); color: #fff; font-size: .75rem; margin-left: 4px; }
.count:empty { display: none; }
.count--soft { background: var(--heather-soft); color: var(--plum); }
.who { font-size: .88rem; color: var(--muted); display: flex; gap: 14px; align-items: center; }
.who a { text-decoration: none; }
.linkish { background: none; border: 0; color: var(--plum); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
@media (max-width: 860px) {
  .app-bar { padding: 10px 16px 0; gap: 8px; }
  .app-bar .brand { order: 1; }
  .who { order: 2; margin-left: auto; }
  .tabs { order: 3; flex-basis: 100%; }
  .tabs a { padding: 12px 12px 12px; }
  .who #who { display: none; }
}

.app-main { width: min(1180px, 100% - 32px); margin: 28px auto 80px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar h1 { font-size: 2rem; margin: 0 auto 0 0; }
.toolbar input[type='search'], .toolbar select { width: auto; min-height: 42px; padding-block: 8px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.rows { display: grid; gap: 10px; }
.row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; }
.row-thumb { width: 96px; height: 72px; border-radius: 8px; object-fit: cover; background: var(--cream-deep); }
.row-title { font-weight: 500; color: var(--plum-ink); }
.row-sub { font-size: .9rem; color: var(--muted); }
.row-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; align-items: center; font-size: .82rem; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.row-actions select { width: auto; min-height: 38px; padding: 6px 34px 6px 12px; font-size: .9rem; }
@media (max-width: 700px) {
  .row { grid-template-columns: 72px 1fr; }
  .row-thumb { width: 72px; height: 56px; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; letter-spacing: .04em; }
.pill--available { background: var(--moss-soft); color: var(--moss); }
.pill--let_agreed { background: var(--plum); color: #fff; }
.pill--draft { background: #eee; color: #555; }
.pill--let { background: #e9e4e9; color: #6d6170; }
.pill--sample { background: #fff6e0; color: #7a5410; }
.pill--match { background: var(--heather-soft); color: var(--plum); }
.pill--new { background: var(--heather); color: #fff; }
.pill--contacted { background: #e7eef8; color: #2d5286; }
.pill--closed { background: #eee; color: #666; }
.star { background: none; border: 0; cursor: pointer; font-size: 1.3rem; color: #d3c8bd; padding: 4px; line-height: 1; }
.star.on { color: #c79a2a; }
.icon-btn { background: #fff; border: 1.5px solid var(--line-strong); border-radius: 999px; min-height: 38px; padding: 0 14px; cursor: pointer; font: 500 .88rem var(--sans); color: var(--plum); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.icon-btn:hover { border-color: var(--plum); color: var(--plum); }
.icon-btn--danger { color: var(--danger); }
.icon-btn--danger:hover { border-color: var(--danger); color: var(--danger); }

/* Editor */
.editor { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .editor { grid-template-columns: 1fr; } }
.editor .panel { padding: 24px; margin-bottom: 20px; }
.editor h2 { font-size: 1.5rem; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 700px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
.stack { display: grid; gap: 14px; }
.inline-help { font-size: .82rem; color: var(--muted); }
.suggest { background: none; border: 0; color: var(--heather-deep); font: 500 .8rem var(--sans); cursor: pointer; padding: 0; text-align: left; }
.sticky-side { position: sticky; top: 92px; display: grid; gap: 16px; }
@media (max-width: 1000px) { .sticky-side { position: static; } }
.save-bar { display: grid; gap: 10px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.media-item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--cream-deep); border: 2px solid transparent; cursor: grab; }
.media-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.media-item.dragging { opacity: .4; }
.media-item.over { border-color: var(--heather); }
.media-item .cover { position: absolute; left: 6px; top: 6px; background: var(--plum); color: #fff; font-size: .7rem; padding: 3px 8px; border-radius: 999px; letter-spacing: .06em; text-transform: uppercase; }
.media-tools { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.media-tools button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); cursor: pointer; font-size: .95rem; color: var(--plum-ink); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.media-tools button:hover { background: #fff; }
.media-tools .del { color: var(--danger); }
.media-pdf { display: grid; place-items: center; height: 100%; font-weight: 600; color: var(--plum); }
.drop { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s; display: block; }
.drop:hover, .drop.over { border-color: var(--heather); background: var(--heather-soft); color: var(--plum); }
.drop input { display: none; }
.drop strong { color: var(--plum); }
.progress { font-size: .88rem; color: var(--heather-deep); margin-top: 8px; }

.match-list { display: grid; gap: 10px; }
.match { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.match strong { display: block; color: var(--plum-ink); }
.match a { margin-right: 10px; }

/* Enquiries + register */
.enq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 8px; }
.enq.is-new { border-left: 4px solid var(--heather); }
.enq-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.enq-head strong { font-size: 1.05rem; color: var(--plum-ink); }
.enq-head time { margin-left: auto; font-size: .85rem; color: var(--muted); }
.enq-contact { display: flex; gap: 16px; flex-wrap: wrap; font-size: .94rem; }
.enq-msg { white-space: pre-wrap; background: var(--cream); border-radius: 8px; padding: 10px 12px; font-size: .95rem; }
.enq-details { font-size: .88rem; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.enq-details b { color: var(--ink); font-weight: 500; }
.enq-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.enq-foot select { width: auto; min-height: 36px; padding: 4px 34px 4px 12px; font-size: .88rem; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chips button { border: 1.5px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font: 500 .88rem var(--sans); color: var(--ink); }
.filter-chips button.active { background: var(--plum); border-color: var(--plum); color: #fff; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 860px; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 500; color: var(--muted); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; background: #fbf8f3; }
.table tr:last-child td { border-bottom: 0; }
.table select { width: auto; min-height: 34px; padding: 4px 30px 4px 10px; font-size: .86rem; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(calc(100% + 40px)); visibility: hidden; background: var(--plum-ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .94rem; transition: transform .25s, visibility .25s; z-index: 200; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }
.toast.show { transform: translateX(-50%) translateY(0); visibility: visible; }
.toast.error { background: var(--danger); }
.loading { padding: 40px; text-align: center; color: var(--muted); }
