.admin-body { background: #edf0ec; }
.store-manager-mark { width: 42px; height: 42px; flex: 0 0 auto; display: block; border-radius: 10px; background: #0f766e url('/icons/store-manager-paw.svg') center/cover no-repeat; }
.admin-brand strong { color: white; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: #eaf4f1; }
.login-card { width: min(460px, 100%); padding: clamp(1.8rem, 6vw, 3.4rem); background: var(--white); border: 1px solid rgba(13,79,75,.13); border-radius: 28px; box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 3.5rem; }
.login-card h1 { font-size: clamp(2.7rem, 8vw, 4rem); margin-bottom: .6rem; }
.login-card > p:not(.eyebrow) { color: var(--muted); }
.login-card form { margin-top: 1.7rem; }
.login-card label, .account-content label { display: block; margin-top: 1rem; font-weight: 700; }
.login-card input, .account-content input { width: 100%; margin-top: .4rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: white; }
.back-site { display: block; margin-top: 1.3rem; color: var(--teal); text-align: center; font-weight: 700; font-size: .85rem; }

.admin-shell { min-height: 100vh; grid-template-columns: 250px 1fr; }
.admin-shell:not([hidden]) { display: grid; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 1.7rem 1.1rem; display: flex; flex-direction: column; color: white; background: #113d39; }
.admin-brand { color: white; padding: 0 .5rem; }
.admin-brand small { color: rgba(255,255,255,.6); }
.admin-sidebar nav { display: grid; gap: .35rem; margin-top: 3rem; }
.admin-nav { min-height: 48px; padding: .7rem .9rem; display: flex; align-items: center; gap: .7rem; color: rgba(255,255,255,.74); background: transparent; border: 0; border-radius: 11px; font-weight: 700; text-align: left; cursor: pointer; }
.admin-nav:hover, .admin-nav.is-active { color: white; background: rgba(255,255,255,.11); }
.admin-nav svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.count-badge { min-width: 22px; height: 22px; margin-left: auto; display: inline-grid; place-items: center; color: #1e2e2b; background: var(--gold); border-radius: 999px; font-size: .7rem; }
.sidebar-bottom { margin-top: auto; display: grid; gap: .75rem; }
.notification-control { min-height: 40px; padding: .6rem; color: #19332f; background: var(--gold); border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; }
.notification-control:disabled { opacity: .7; cursor: default; }
.account-button { padding: .75rem .5rem; display: flex; align-items: center; gap: .65rem; color: white; background: transparent; border: 0; text-align: left; cursor: pointer; }
.account-button span:not(.avatar) { min-width: 0; }
.account-button strong, .account-button small { display: block; overflow: hidden; text-overflow: ellipsis; }
.account-button small { color: rgba(255,255,255,.58); }
.avatar { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: var(--teal); background: var(--gold); border-radius: 50%; font-weight: 800; }

.admin-main { min-width: 0; padding: 0 clamp(1rem, 4vw, 3.5rem) 4rem; }
.admin-topbar { min-height: 150px; padding: 2.4rem 0 1.8rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.admin-topbar h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); margin: 0 0 .3rem; }
.admin-topbar p { margin: 0; color: var(--muted); }
.mobile-brand { display: none; }
.admin-view { padding-top: 1.5rem; }
.admin-filters { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.segmented { display: flex; gap: .2rem; padding: .25rem; background: rgba(13,79,75,.08); border-radius: 12px; }
.segmented button { min-height: 38px; padding: .5rem .85rem; color: var(--muted); background: transparent; border: 0; border-radius: 9px; font-weight: 700; cursor: pointer; }
.segmented button.is-active { color: var(--teal); background: white; box-shadow: 0 2px 10px rgba(17,52,48,.08); }
.admin-search input { width: min(300px, 36vw); min-height: 44px; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: white; }
.admin-list { display: grid; gap: .65rem; }
.admin-listing-row { min-height: 90px; padding: .7rem; display: grid; grid-template-columns: 72px minmax(180px,1fr) minmax(110px,.4fr) auto auto; gap: 1rem; align-items: center; background: var(--white); border: 1px solid rgba(23,36,33,.08); border-radius: 16px; cursor: pointer; }
.admin-listing-row:hover { border-color: rgba(13,79,75,.35); box-shadow: 0 6px 20px rgba(17,52,48,.06); }
.admin-listing-thumb { width: 72px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--mint); display: grid; place-items: center; color: var(--teal); font-weight: 800; }
.admin-listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-listing-info { min-width: 0; }
.admin-listing-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-listing-info small, .admin-listing-category { color: var(--muted); }
.row-price { font-weight: 700; }
.visibility-pill, .row-status { width: fit-content; padding: .35rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: capitalize; }
.visibility-pill { color: #216042; background: #dcefe3; }
.visibility-pill.draft { color: #775f2d; background: #f4e8c6; }
.row-status { color: var(--muted); background: #e9ebe8; }
.admin-empty { padding: 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-align: left; background: white; border-left: 4px solid var(--teal); }
.admin-empty h2 { margin: 0 0 .25rem; font-size: 1.3rem; }
.admin-empty p { margin: 0; color: var(--muted); }

.inbox-view { min-height: calc(100vh - 174px); grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.5fr); gap: 1rem; }
.inbox-view:not([hidden]) { display: grid; }
.conversation-list, .conversation-pane { min-height: 600px; max-height: calc(100vh - 200px); overflow: auto; background: var(--white); border: 1px solid rgba(23,36,33,.08); border-radius: 18px; }
.conversation-item { width: 100%; padding: 1rem; display: block; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.conversation-item:hover, .conversation-item.is-active { background: rgba(217,235,228,.55); }
.conversation-item-top { display: flex; justify-content: space-between; gap: .7rem; }
.conversation-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item time { flex: 0 0 auto; color: var(--muted); font-size: .7rem; }
.conversation-item p { margin: .45rem 0 0; color: var(--muted); font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.conversation-context { margin-top: .45rem; color: var(--teal); font-size: .7rem; font-weight: 700; }
.unread-dot { display: inline-block; width: 8px; height: 8px; margin-right: .35rem; background: var(--coral); border-radius: 50%; }
.conversation-empty { min-height: 600px; display: grid; align-content: center; justify-items: center; padding: 2rem; color: var(--muted); text-align: center; }
.conversation-empty > div { font-size: 2.5rem; }
.conversation-empty h2 { margin: .8rem 0 .3rem; font-size: 2rem; color: var(--ink); }
.thread-pane { height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.thread-header { padding: 1.1rem 1.3rem; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.thread-header h2 { margin: 0; font: 800 1.35rem/1.1 "DM Sans", sans-serif; }
.thread-header p { margin: .3rem 0 0; color: var(--muted); font-size: .8rem; }
.thread-header button { height: 36px; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; }
.admin-thread { padding: 1.3rem; overflow-y: auto; background: #f2f1eb; }
.admin-thread .bubble { max-width: 72%; }
.admin-thread .bubble.admin { margin-left: auto; color: white; background: var(--teal); border-radius: 16px 16px 4px 16px; }
.admin-thread .bubble.admin small { color: rgba(255,255,255,.68); }
.thread-reply { padding: .9rem; display: flex; gap: .6rem; border-top: 1px solid var(--line); }
.thread-reply textarea { flex: 1; resize: none; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; }
.thread-reply button { padding: 0 1.2rem; color: white; background: var(--teal); border: 0; border-radius: 12px; font-weight: 700; cursor: pointer; }

.content-view { max-width: 1000px; }
.content-intro { padding: 1.5rem; margin-bottom: 1rem; color: white; background: var(--teal); border-radius: 18px; }
.content-intro h2 { font-size: 2rem; margin-bottom: .4rem; }
.content-intro p { margin: 0; color: rgba(255,255,255,.72); }
.content-form { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.form-section-heading span { font: 800 1.2rem/1 "DM Sans", sans-serif; }
.form-section-heading p { margin-top: .5rem; color: var(--muted); font-size: .85rem; }
.form-fields { display: grid; gap: 1rem; }
.form-fields label, .editor-grid > label { display: block; color: var(--ink); font-weight: 700; }
.form-fields label span, .editor-grid label span { color: var(--muted); font-size: .75rem; font-weight: 500; }
.form-fields input, .form-fields textarea, .editor-grid input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .editor-grid textarea, .editor-grid select { width: 100%; margin-top: .4rem; padding: .82rem .9rem; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 11px; outline: none; }
.form-fields input:focus, .form-fields textarea:focus, .editor-grid input:focus, .editor-grid textarea:focus, .editor-grid select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,79,75,.08); }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.hours-editor { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
.hours-editor legend { font-weight: 700; }
.hours-edit-row { display: grid; grid-template-columns: 95px 1fr; gap: .7rem; align-items: center; }
.hours-edit-row + .hours-edit-row { margin-top: .45rem; }
.hours-edit-row strong { font-size: .82rem; }
.hours-edit-row input { margin: 0; }
.save-content { justify-self: start; }
.form-status { min-height: 1.2em; margin: 0; color: #216042; font-size: .84rem; }
.service-edit-card { padding: 1rem; display: grid; gap: .8rem; background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: 14px; }
.service-edit-card h3 { margin: 0; font: 800 1.2rem/1 "DM Sans", sans-serif; }
.service-save-row { grid-column: 2; }

.listing-editor { width: min(820px, calc(100% - 1.2rem)); }
.listing-editor form { padding: clamp(1.3rem, 4vw, 3rem); }
.editor-heading h2 { font-size: clamp(2.3rem, 5vw, 3.7rem); margin-bottom: .6rem; }
.editor-heading > p:not(.eyebrow) { color: var(--muted); }
.kind-picker { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1.5rem 0; }
.kind-picker input { position: absolute; opacity: 0; pointer-events: none; }
.kind-picker span { min-height: 56px; padding: .8rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; font-weight: 700; cursor: pointer; }
.kind-picker input:checked + span { color: white; background: var(--teal); border-color: var(--teal); }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.span-two { grid-column: 1/-1; }
.photo-panel { margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
.photo-panel legend { padding: 0 .35rem; font-weight: 700; }
.photo-panel legend span { color: var(--muted); font-size: .75rem; font-weight: 500; }
.photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.photo-action { min-height: 94px; padding: 1rem; display: grid !important; place-items: center; align-content: center; text-align: center; color: var(--teal) !important; background: rgba(217,235,228,.45); border: 1px solid rgba(13,79,75,.35); border-radius: 10px; cursor: pointer; }
.photo-action:hover { border-color: var(--teal); background: rgba(217,235,228,.75); }
.photo-action input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-action strong { font-size: 1rem; }
.photo-action small { color: var(--muted); }
.pending-photo-previews { display: flex; gap: .55rem; margin-top: .8rem; overflow-x: auto; }
.pending-photo-previews:empty { display: none; }
.pending-photo { width: 76px; height: 76px; flex: 0 0 auto; overflow: hidden; display: grid; place-items: center; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 8px; font-size: .68rem; text-align: center; }
.pending-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-selection { margin: .75rem 0 0; color: var(--muted); font-size: .82rem; }
.check-row { padding: .85rem; display: flex !important; gap: .7rem; align-items: flex-start; background: white; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.check-row input { width: 19px; height: 19px; accent-color: var(--teal); }
.check-row strong, .check-row small { display: block; }
.check-row small { color: var(--muted); font-weight: 400; }
.existing-photos { display: flex; gap: .7rem; flex-wrap: wrap; }
.existing-photo { position: relative; width: 92px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
.existing-photo img { width: 100%; height: 100%; object-fit: cover; }
.existing-photo button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; color: white; background: rgba(0,0,0,.72); border: 0; border-radius: 50%; cursor: pointer; }
.editor-actions { display: flex; justify-content: flex-end; gap: .6rem; align-items: center; margin-top: 1.2rem; }
.delete-button { margin-right: auto; padding: .6rem; color: #a13a27; background: transparent; border: 0; text-decoration: underline; cursor: pointer; }
.account-modal { width: min(480px, calc(100% - 1.2rem)); }
.account-content { padding: 2.4rem; }
.account-content h2 { font-size: 2.6rem; }
.account-notifications { width: 100%; margin: .7rem 0 1rem; }
.logout-button { width: 100%; margin-top: 1rem; padding: .7rem; color: #8f3a28; background: transparent; border: 0; text-decoration: underline; cursor: pointer; }
.mobile-admin-nav { display: none; }

@media (max-width: 900px) {
  .admin-shell:not([hidden]) { display: block; }
  .admin-sidebar { display: none; }
  .admin-main { padding-bottom: 6rem; }
  .admin-topbar { min-height: 120px; padding-top: 1.2rem; }
  .mobile-brand { display: block !important; color: var(--teal) !important; font-weight: 800; }
  .mobile-admin-nav { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; min-height: 68px; display: grid; grid-template-columns: repeat(4, 1fr); padding: .45rem max(.5rem, env(safe-area-inset-right)) max(.45rem, env(safe-area-inset-bottom)) max(.5rem, env(safe-area-inset-left)); background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -8px 26px rgba(17,52,48,.09); }
  .mobile-admin-nav button { color: var(--muted); background: transparent; border: 0; font-size: .76rem; font-weight: 700; }
  .mobile-admin-nav button.is-active { color: var(--teal); }
  .inbox-view { grid-template-columns: minmax(240px,.8fr) minmax(350px,1.3fr); }
}

@media (max-width: 640px) {
  .admin-main { padding-inline: .8rem; }
  .admin-topbar { align-items: center; gap: .7rem; }
  .admin-topbar h1 { font-size: 2rem; }
  .admin-topbar p:not(.mobile-brand) { display: none; }
  .admin-topbar .button { min-height: 44px; padding: .7rem .9rem; font-size: .82rem; }
  .admin-filters { display: grid; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .admin-search input { width: 100%; }
  .admin-listing-row { grid-template-columns: 62px minmax(0,1fr) auto; gap: .7rem; }
  .admin-listing-thumb { width: 62px; }
  .admin-listing-category, .row-status { display: none; }
  .visibility-pill { grid-column: 3; }
  .inbox-view:not([hidden]) { display: block; }
  .conversation-list, .conversation-pane { min-height: calc(100vh - 180px); max-height: none; }
  .conversation-pane { display: none; position: fixed; z-index: 40; inset: 0; border-radius: 0; }
  .conversation-pane.is-open { display: block; }
  .mobile-thread-back { display: inline-block !important; }
  .content-form { grid-template-columns: 1fr; gap: .5rem; }
  .service-save-row { grid-column: 1; }
  .two-fields, .editor-grid { grid-template-columns: 1fr; }
  .photo-actions { grid-template-columns: 1fr 1fr; }
  .span-two { grid-column: 1; }
  .kind-picker { grid-template-columns: 1fr 1fr; }
  .listing-editor form { padding: 1.2rem; }
  .editor-actions { position: sticky; bottom: 0; margin: 1.2rem -1.2rem -1.2rem; padding: .8rem 1.2rem; background: var(--white); border-top: 1px solid var(--line); }
  .editor-actions .button { min-height: 44px; padding: .6rem .8rem; }
  .delete-button { font-size: .78rem; }
}

@media (min-width: 641px) { .mobile-thread-back { display: none !important; } }
