/* Altima Inspect portal: plain CSS, no build step. */
:root {
	--bg: #f3f6f8;
	--card: #ffffff;
	--text: #1d2c35;
	--muted: #687b87;
	--line: #d8e0e5;
	--brand: #075c91;
	--brand-dark: #073a5b;
	--ok-bg: #e7f6ec;
	--ok-text: #1e6b3a;
	--err-bg: #fdecec;
	--err-text: #a3262e;
	--radius: 10px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1d2a;
		--card: #172937;
		--text: #edf5fa;
		--muted: #a8bbc8;
		--line: #405363;
		--brand: #1970b5;
		--brand-dark: #4a9be0;
		--ok-bg: #173323;
		--ok-text: #8fd9a8;
		--err-bg: #3a1c1e;
		--err-text: #f5a3a7;
		color-scheme: dark;
	}
}

*:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)) { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)) { color: var(--brand); }
h1:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)) { font-size: 1.6rem; margin: 0 0 .25rem; }
h2:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)) { font-size: 1.15rem; margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small:where(:not(.tsi-wp *, body > [class^="tsi-"] *)) { font-size: .875rem; }

/* Brand mark */
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--text); text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; color: #fff; font-size: .9rem; }

/* Signed-out pages */
.guest { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.guest-card { width: 100%; max-width: 420px; }
.guest-card .brand { margin-bottom: 1.25rem; }

/* Cards and forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 16px; }
.field { margin-bottom: 1rem; }
label:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)) { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
input:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *))[type=text], input:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *))[type=email], input:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *))[type=password], select:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)) {
	width: 100%; padding: .6rem .7rem; font: inherit; color: var(--text);
	background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
input:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)):focus, select:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)):focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .3rem; }
.error { color: var(--err-text); font-size: .85rem; margin-top: .25rem; }
.hint { color: var(--muted); font-size: .85rem; margin-top: .25rem; }

.btn {
	display: inline-block; border: 0; border-radius: 8px; padding: .65rem 1.1rem;
	font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
	background: var(--brand); color: #fff;
}
.btn:hover { background: var(--brand-dark); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--muted); padding: .4rem .6rem; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger-link { background: none; border: 0; color: var(--err-text); cursor: pointer; font: inherit; padding: 0; }

.alert { border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; }
.alert-ok { background: var(--ok-bg); color: var(--ok-text); }
.alert-err { background: var(--err-bg); color: var(--err-text); }

.links { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-size: .9rem; flex-wrap: wrap; }

/* Signed-in layout */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.nav { display: flex; gap: .25rem; flex: 1; }
.nav a { color: var(--muted); text-decoration: none; padding: .4rem .7rem; border-radius: 8px; font-weight: 600; }
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.active { background: var(--bg); color: var(--text); }
.who { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.who form { margin: 0; }
.main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; }
.page-head { margin-bottom: 1.25rem; }

.trial { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 16px 0; }
.stat .num { font-size: 1.8rem; font-weight: 700; }
.steps { margin: 0; padding-left: 1.2rem; }
.steps li { margin-bottom: .4rem; }
/* Only the portal's own checklists: the plugin screens use "done" too (their ✓ ticks), which must not be struck through. */
.steps .done { color: var(--muted); text-decoration: line-through; }

/* Team table */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.badge { display: inline-block; white-space: nowrap; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--bg); border: 1px solid var(--line); }
.badge-owner { border-color: var(--brand); color: var(--brand); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* Layout helpers */
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid-4 { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 0 16px; }
.cards { gap: 16px; margin-bottom: 16px; }
.cards > .card { margin: 0; }
.mt { margin-top: 1.25rem; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; margin: 0; }
[hidden] { display: none !important; }

/* Forms (extra inputs) */
textarea:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)), input:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *))[type=search], input:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *))[type=datetime-local], input:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)):disabled {
	width: 100%; padding: .6rem .7rem; font: inherit; color: var(--text);
	background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
input:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)):disabled { opacity: .7; }
textarea:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)) { resize: vertical; }
form > .card + .btn, form > .card:last-of-type { margin-bottom: 16px; }
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--bg); }

/* List filters */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 16px; }
.filters select, .filters input[type=search] { width: auto; flex: 1 1 160px; }
.filters .btn { flex: 0 0 auto; }

/* Inspection status pills */
.status { display: inline-block; white-space: nowrap; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.status-scheduled { background: #e8f0fe; color: #1a56c4; }
.status-in_progress { background: #fff4e0; color: #9a5b00; }
.status-submitted { background: #f3e8fd; color: #7b3fbf; }
.status-delivered { background: var(--ok-bg); color: var(--ok-text); }
.status-cancelled { background: var(--bg); color: var(--muted); text-decoration: line-through; }
@media (prefers-color-scheme: dark) {
	.status-scheduled { background: #1c2b45; color: #9dbcf5; }
	.status-in_progress { background: #3a2c12; color: #f2c475; }
	.status-submitted { background: #2f2140; color: #cfa8f5; }
}
.status-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.status-actions form { margin: 0; }

/* Detail lists */
.details { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
.details dt { color: var(--muted); font-size: .9rem; }
.details dd { margin: 0; }

a.stat { color: inherit; text-decoration: none; }
a.stat:hover { border-color: var(--brand); }
.danger-zone { margin-top: 24px; }

/* Inspection forms */
.wm-options { display: grid; gap: .35rem; }
.wm-option > .check { padding: .45rem .55rem; border-radius: 8px; border: 1px solid transparent; }
.wm-option > .check:has(input:checked) { border-color: var(--brand); background: var(--bg); }
.wm-option .wm-detail { margin: .25rem 0 .5rem 2rem; display: grid; gap: .2rem; }
.wm-box { margin-top: .75rem; padding: .75rem; border: 1px dashed var(--line); border-radius: 8px; }
.wm-fields { margin-top: .75rem; }
.check.small { font-size: .875rem; }
.hint { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }
.photo-note { display: inline-block; margin-left: .25rem; }
.table-scroll { overflow-x: auto; }
.wm-table input[type=text], .wm-table input[type=date] { min-width: 120px; padding: .35rem .5rem; }
.wm-chart td, .wm-chart th { padding: .4rem; }
.wm-chart td:first-child { min-width: 220px; }
.center { text-align: center; }
.checklist { margin: .25rem 0 1rem; padding-left: 1.2rem; }
.checklist li { margin-bottom: .2rem; }
.checklist.warn li { color: #9a5b00; }
.sticky-actions { position: sticky; bottom: 0; display: flex; gap: .5rem; justify-content: flex-end; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); margin-top: 16px; }

/* Phone app page */
.connect-box { border: 2px solid var(--brand); }
.details.big dd { font-size: 1.15rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; user-select: all; word-break: break-all; }
.strong { font-weight: 700; letter-spacing: .05em; }
.inline-form { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 220px; margin-bottom: 0; }

/* Page links */
.pagination { display: flex; gap: .25rem; list-style: none; padding: 0; margin: 1rem 0 0; flex-wrap: wrap; }
.pagination li > a, .pagination li > span { display: block; padding: .3rem .65rem; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.pagination .active > span { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .disabled > span { color: var(--muted); }

@media (max-width: 640px) {
	.grid-2, .grid-3 { grid-template-columns: 1fr; }
	.grid-4 { grid-template-columns: 1fr 1fr; }
	.details { grid-template-columns: 1fr; gap: 0; }
	.details dd { margin-bottom: .5rem; }
	.table .hide-sm { display: none; }
	.nav { order: 3; flex-basis: 100%; }
}

/* Phone report photos */
.photo-group-title { font-size: 0.95rem; margin: 1.25rem 0 0.5rem; }
.photo-group-title:first-of-type { margin-top: 0.5rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.photo-tile { margin: 0; }
.photo-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--line); border: 1px solid var(--line); }
.photo-tile figcaption { margin-top: 0.25rem; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 480px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }

/* Report emails */
.btn-link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
td form + form { margin-top: .35rem; }
fieldset:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)) { border: 0; margin: 0; padding: 0; min-width: 0; }
legend:where(:not(.tsi-wp *, body > [class^="tsi-"], body > [class^="tsi-"] *)) { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.pay-choice { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.pay-choice .sub-fields { margin: .25rem 0 .5rem 1.6rem; }
.shared-card { max-width: 560px; }

/* Customers */
.cstatus { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--line); color: var(--text); }
.cstatus-new { background: #e6efff; color: #1f4fa3; }
.cstatus-contacted { background: #fff4d6; color: #8a5a00; }
.cstatus-scheduled { background: #efe6ff; color: #5b2ea3; }
.cstatus-inspected { background: var(--ok-bg); color: var(--ok-text); }
.cstatus-closed { background: var(--line); color: var(--muted); }

/* Calendar */
.cal-month { min-width: 9rem; text-align: center; }
.cal-card { padding: 0; overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head { padding: .5rem; font-size: .8rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); text-align: center; }
.cal-day { min-height: 6.5rem; padding: .35rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-out { background: color-mix(in srgb, var(--line) 35%, transparent); }
.cal-out .cal-date { color: var(--muted); }
.cal-date { font-size: .85rem; font-weight: 600; margin-bottom: .25rem; }
.cal-weekday { display: none; }
.cal-today .cal-date { color: var(--brand); }
.cal-event { display: block; font-size: .75rem; line-height: 1.25; padding: .2rem .35rem; border-radius: 5px; margin-bottom: .2rem; text-decoration: none; color: inherit; border-left: 3px solid; overflow: hidden; }
.cal-event span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-time { font-weight: 600; }
.cal-detail { color: var(--muted); }
.cal-booked { background: #e6efff; border-color: #1f4fa3; }
.cal-phone { background: #fff4d6; border-color: #c48a00; }
.cal-done { background: var(--ok-bg); border-color: var(--ok-text); }
@media (prefers-color-scheme: dark) {
	.cal-booked, .cal-phone, .cal-done, .cstatus-new, .cstatus-contacted, .cstatus-scheduled { background: color-mix(in srgb, currentColor 14%, transparent); }
	.cstatus-new, .cal-booked { color: #8fb4ff; }
	.cstatus-contacted, .cal-phone { color: #ffcc66; }
	.cstatus-scheduled { color: #c6a6ff; }
	.cal-event { color: var(--text); }
}
.cal-legend { display: flex; gap: .4rem 1rem; flex-wrap: wrap; align-items: center; color: var(--muted); }
.cal-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; border-left: 3px solid; vertical-align: middle; margin-right: .25rem; }
@media (max-width: 700px) {
	.cal-grid { grid-template-columns: 1fr; }
	.cal-head, .cal-empty, .cal-out { display: none; }
	.cal-day { min-height: 0; border-right: 0; }
	.cal-weekday { display: inline; }
}

/* Leads */
.badge-unread { background: var(--brand); color: #fff; margin-left: .35rem; font-size: .7rem; padding: .05rem .4rem; border-radius: 999px; vertical-align: middle; }
.reply-box { margin: .75rem 0; }
.reply-box > summary { display: inline-block; list-style: none; cursor: pointer; }
.reply-box > summary::-webkit-details-marker { display: none; }
.timeline { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.timeline-item { border-left: 3px solid var(--brand); padding: .4rem 0 .6rem .9rem; margin-bottom: .6rem; }
.timeline-item.is-note { border-color: #c48a00; }
.timeline-item.is-request { border-color: var(--line); }
.timeline-item .pre { margin: .25rem 0 0; }
.file-list { margin: 0; padding-left: 1.2rem; }
.copy-box { display: flex; gap: .5rem; align-items: flex-start; }
.copy-box textarea, .copy-box input { flex: 1; font-family: ui-monospace, monospace; font-size: .8rem; }

/* Public booking form */
.booking { max-width: 760px; margin: 0 auto; padding: 1.5rem 1rem; }
.booking-embed { padding: .5rem; }
.booking .grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.booking .wide { grid-column: 1 / -1; }
.booking .options { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.booking .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) { .booking .grid-form { grid-template-columns: 1fr; } }

/* The ToughShield screens (reports, editor, calendar, customers, settings) use the full width */
.main-wide { max-width: none; padding-left: 1rem; padding-right: 1rem; }
.main-wide .tsi-app { margin-top: .5rem; }

/* Inter, the same variable font file the WordPress site (Extendable theme) serves, so the ToughShield
   screens draw text and ticks exactly as in wp-admin. Open Font License. */
@font-face { font-family: Inter; src: url("../webapp-fit/fonts/inter-variable.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap;
	/* Letters, numbers, punctuation and currency only: symbols such as the ✓ and ○ of the photo checklist come from the
	   system, as in wp-admin (this Inter file has its own thinner ✓, which looked different from the plugin). */
	unicode-range: U+0000-218F; }

/* Same look as the ToughShield screens: navy header, blue buttons, Inter type */
body { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.topbar { background: #073a5b; border-bottom: 0; }
.topbar .brand, .topbar .who .muted { color: #fff; }
.topbar .brand-mark { background: #fff; color: #073a5b; }
.topbar .nav a { color: #cfe0ec; }
.topbar .nav a:hover, .topbar .nav a.active { background: rgba(255, 255, 255, .14); color: #fff; }
.topbar .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.topbar .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.page-head h1 { color: var(--text); }
.card { border-radius: 14px; }
@media (prefers-color-scheme: dark) { .topbar { background: #0b1823; } }
.settings-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s; }
.settings-link:hover { border-color: var(--brand); }
.settings-link h2 { color: var(--brand); }

/* ---------------------------------------------------------------- WordPress-style layout:
   slim top bar, dark menu on the left, content using the rest of the width */
.has-sidebar .topbar { position: sticky; top: 0; z-index: 30; height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: #0b1823; color: #fff; }
.has-sidebar .topbar .brand { color: #fff; font-size: .95rem; }
.has-sidebar .topbar .brand-mark { background: #1970b5; color: #fff; width: 26px; height: 26px; }
.has-sidebar .who { margin-left: auto; color: #fff; font-size: .85rem; gap: .75rem; }
.muted-light { color: #9fb3c2; }
.has-sidebar .who .btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .3); padding: .3rem .7rem; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; padding: 4px 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.sidebar { position: fixed; top: 48px; bottom: 0; left: 0; width: 200px; background: #10202d; padding: 10px 0 24px; overflow-y: auto; z-index: 20; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 9px 16px; color: #d6e2ea; text-decoration: none; font-size: .9rem; font-weight: 500; border-left: 3px solid transparent; }
.sidebar a:hover { background: #172f42; color: #fff; }
.sidebar a.active { background: #075c91; color: #fff; border-left-color: #6fb7ea; font-weight: 600; }
.sidebar .ico { width: 18px; text-align: center; opacity: .85; }
.sidebar .count { margin-left: auto; background: #d63638; color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 7px; }
.sidebar-group { margin: 16px 16px 6px; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #7f98aa; font-weight: 700; }

.has-sidebar .main { margin-left: 200px; max-width: 1080px; padding: 24px 24px 48px; }
.has-sidebar .main-wide { max-width: none; padding: 16px 20px 40px; }
.has-sidebar .main-wide .tsi-app { margin: 0; }

@media (max-width: 900px) {
	.menu-toggle { display: inline-block; }
	.sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 18px rgba(0, 0, 0, .3); }
	.menu-open .sidebar { transform: none; }
	.has-sidebar .main { margin-left: 0; padding: 16px; }
	.has-sidebar .who > span { display: none; }
}
.view-as-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #fff7e0; color: #5c4400; border: 1px solid #e0b84c; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.view-as-banner form { margin: 0; }
form.inline { display: inline; margin-right: .75rem; }

/* ---------------------------------------------------------------- Platform admin */
.admin .topbar { background: #2a1036; }
.admin-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: #d63aa0; color: #fff; border-radius: 6px; padding: 2px 7px; margin-left: 6px; vertical-align: middle; }
.admin .sidebar { background: #1d1024; }
.admin .sidebar a.active { background: #7a2b8f; border-left-color: #e59be0; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.admin-stats .stat { text-decoration: none; color: inherit; }
.admin-stats .num { font-size: 1.6rem; font-weight: 700; }
.admin-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.admin-row:last-child { border-bottom: 0; }
.health-strip { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.health-strip a, .health-strip > span { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.ok { background: #2e9e57; } .dot.warn { background: #d69e2e; } .dot.bad { background: #d63638; }
.plan { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--line); color: var(--text); }
.plan-big { font-size: .9rem; padding: 5px 12px; }
.plan-trial { background: #e6efff; color: #1f4fa3; } .plan-active { background: var(--ok-bg); color: var(--ok-text); }
.plan-free { background: #efe6ff; color: #5b2ea3; } .plan-suspended { background: #fff4d6; color: #8a5a00; } .plan-closed { background: var(--err-bg); color: var(--err-text); }
.support-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #fde7f3; color: #6b1046; border: 1px solid #e59bc6; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.support-banner form { margin: 0; }
.announcement { border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; border: 1px solid; }
.announcement-info { background: #e6f1fb; color: #0b3f66; border-color: #9cc6ea; }
.announcement-warning { background: #fff7e0; color: #5c4400; border-color: #e0b84c; }
.show-sm { display: none; }
@media (max-width: 640px) { .show-sm { display: block; } }

/* Billing */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 12px; }
.plan-card { display: flex; flex-direction: column; }
.plan-card form { margin-top: auto; }
.plan-price { font-size: 1.4rem; font-weight: 700; color: var(--brand); margin: 4px 0 8px; }
.billing-status { border-left: 4px solid var(--brand); }
.billing-past_due, .billing-needs_plan { border-left-color: #d63638; }
.billing-free { border-left-color: #7a2b8f; }
.plan-form { border-bottom: 1px solid var(--line); padding: 12px 0; }

/* Admin → Settings */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0 1.25rem; }
.setting-source { font-size: .72rem; font-weight: 600; padding: .05rem .4rem; border-radius: 999px; margin-left: .35rem; background: #eef1f5; color: #5b6573; vertical-align: middle; }
.setting-source.source-saved { background: #e3f4ea; color: #1d6b3a; }
.setting-source.source-none { background: #fdecec; color: #9b2c2c; }
.settings-card .field select, .settings-card .field input { width: 100%; }
.settings-card label.check { display: flex; gap: .4rem; align-items: center; font-weight: normal; margin-top: .3rem; }
.settings-card label.check input { width: auto; }

/* Admin → Billing */
.subnav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.subnav a.active, .subnav a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.billing-badge { text-transform: capitalize; }
.billing-badge-active { border-color: #2f8f5b; color: #1d6b3a; }
.billing-badge-trialing { border-color: var(--brand); color: var(--brand); }
.billing-badge-past_due, .billing-badge-unpaid, .billing-badge-incomplete { border-color: #c0392b; color: #9b2c2c; }
.billing-badge-canceled, .billing-badge-incomplete_expired { color: var(--muted); }
.billing-actions { display: grid; gap: 12px; padding: 12px 0 4px; }
.billing-actions .inline-form .field { flex: 0 1 260px; }
.refund-box { flex-basis: 100%; }
.refund-box[open] { padding: 8px 0; }
.sub-row > span:last-child { text-align: right; }

/* Dashboard: the plugin's 2.0.24 Dashboard in the portal's look */
.dash-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 16px 0; }
.dash-tiles .stat { padding: 16px 18px; text-decoration: none; color: var(--text); border-left: 4px solid transparent; }
.dash-tiles .stat:hover { border-color: var(--brand); }
.dash-tiles .stat.is-warn { border-left-color: #d98b1f; }
.dash-tiles .stat.is-info { border-left-color: var(--brand); }
.dash-tiles .stat.is-good { border-left-color: #2f9e5e; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-col > .card + .card { margin-top: 16px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-count { display: inline-block; min-width: 1.5em; padding: 0 .4em; border-radius: 999px; background: var(--brand); color: #fff; font-size: .8rem; text-align: center; vertical-align: middle; }
.dash-visit, .dash-attn, .dash-recent { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.dash-visit:first-of-type, .dash-attn:first-of-type, .dash-recent:first-of-type { border-top: 0; }
.dash-visit:hover strong, .dash-attn:hover strong, .dash-recent:hover strong { color: var(--brand); }
.dash-visit time { width: 84px; flex: none; font-weight: 600; font-size: .9rem; }
.dash-visit time small { display: block; color: var(--muted); font-weight: 400; }
.dash-visit > span, .dash-attn > span, .dash-recent > span, .dash-feed > span { flex: 1; min-width: 0; }
.dash-visit small, .dash-attn small, .dash-recent small, .dash-feed small { display: block; color: var(--muted); font-size: .82rem; }
.dash-visit em { font-style: normal; }
.badge.is-done { color: var(--ok-text); background: var(--ok-bg); border-color: transparent; }
.dash-attn i, .dash-feed i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: var(--bg); color: var(--muted); }
.dash-attn.is-warn i { background: #fff1d6; color: #9a5b00; }
.dash-attn.is-info i { background: #e3effa; color: var(--brand); }
.dash-attn.is-bad i { background: var(--err-bg); color: var(--err-text); }
.dash-feed { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.dash-feed:first-of-type { border-top: 0; }
.dash-feed time { flex: none; }
.dash-recent img, .dash-recent-ph { width: 54px; height: 40px; flex: none; border-radius: 6px; object-fit: cover; }
.dash-recent-ph { display: grid; place-items: center; background: var(--bg); color: var(--muted); font-weight: 700; }
.dash-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 6px; }
.dash-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.dash-bar i { display: block; width: 70%; max-width: 34px; background: var(--brand); border-radius: 4px 4px 0 0; }
.dash-bar small { font-size: .72rem; color: var(--muted); }
.dash-bar span { font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); width: 100%; text-align: center; padding-top: 4px; }
