/* Sparky control panel. Large, clear and friendly. */

:root {
  --navy: #0d1726;
  --navy-2: #15233a;
  --accent: #ffc21a;
  --primary: #1857d6;
  --primary-dark: #1145b0;
  --ink: #18212f;
  --muted: #5d6878;
  --line: #dfe4ec;
  --bg: #f2f4f8;
  --ok: #1e8a4f;
  --danger: #c6291e;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.55 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--primary); }
h1, h2 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
h2 em, .field em { font-style: normal; font-weight: 400; color: var(--muted); font-size: .9em; }
img { max-width: 100%; display: block; }
.icon { width: 1.2em; height: 1.2em; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }
.lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 24px; max-width: 46em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 2px solid transparent; font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; background: #fff; color: var(--ink); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn--lg { padding: 15px 28px; font-size: 1.08rem; }
.btn--sm { padding: 7px 13px; font-size: .92rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--ghost { border-color: var(--line); background: #fff; }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--danger-ghost { color: var(--danger); background: transparent; border-color: transparent; }
.btn--danger-ghost:hover { background: #fdecea; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #c9d2df; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side__brand { display: flex; gap: 12px; align-items: center; color: #fff; text-decoration: none; padding: 4px 10px 22px; border-bottom: 1px solid #22324b; margin-bottom: 14px; }
.side__brand strong { display: block; line-height: 1.2; }
.side__brand small { color: #8d9bb0; }
.side__mark, .auth__mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--accent); color: var(--navy); flex: none; }
.side__mark .icon, .auth__mark .icon { fill: currentColor; }
.side__toggle { display: none; }
.side__nav { display: grid; gap: 3px; }
.side__nav a, .side__logout { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 500; font: inherit; background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.side__nav a:hover, .side__logout:hover { background: var(--navy-2); color: #fff; }
.side__nav a[aria-current="page"] { background: var(--accent); color: var(--navy); font-weight: 700; }
.side__nav .icon { opacity: .9; }
.side__nav form { margin-top: 14px; padding-top: 14px; border-top: 1px solid #22324b; }
.side__nav .pill { margin-left: auto; }
.pill { display: inline-block; font-style: normal; background: var(--danger); color: #fff; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; vertical-align: middle; }
.main { padding: 30px 44px 80px; max-width: 1080px; width: 100%; }
.main__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.main__top h1 { margin: 0; }

/* ---------- Notices ---------- */
.notice { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.notice--success { background: #e2f6ea; color: #14613a; border-left: 5px solid var(--ok); }
.notice--error { background: #fdecea; color: #8f1c14; border-left: 5px solid var(--danger); }

/* ---------- Panels & forms ---------- */
.panel { background: #fff; border-radius: 14px; padding: 26px 28px; margin-bottom: 20px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .03); scroll-margin-top: 20px; }
.panel h2:not(:first-of-type) { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.panel--add { border: 2px dashed #b9c6dc; background: #fafcff; }
.stack > * + * { margin-top: 0; }
.narrow { max-width: 520px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: block; margin-bottom: 20px; }
.field > span { display: block; font-weight: 700; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); margin-top: 6px; font-size: .9rem; }
.field input, .field textarea, .field select { width: 100%; font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(24, 87, 214, .15); }
.check { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 20px; cursor: pointer; }
.check input { width: 20px; height: 20px; }
.savebar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.form-actions { margin-top: 8px; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-weight: 700; margin-bottom: 8px; padding: 0; }

/* On/off switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; margin-bottom: 20px; }
.switch input { position: absolute; opacity: 0; }
.switch__ui { position: relative; width: 56px; height: 32px; border-radius: 99px; background: #c5cdd9; transition: background .2s; flex: none; }
.switch__ui::after { content: ""; position: absolute; left: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked + .switch__ui { background: var(--ok); }
.switch input:checked + .switch__ui::after { transform: translateX(24px); }
.switch input:focus-visible + .switch__ui { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Dashboard ---------- */
.welcome { display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 16px; padding: 28px 30px; margin-bottom: 24px; background-image: radial-gradient(circle at 100% 0, rgba(255, 194, 26, .25), transparent 50%); }
.welcome p { margin: 0; color: #c9d2df; }
.welcome__alert { display: inline-flex; gap: 10px; align-items: center; background: var(--accent); color: var(--navy); padding: 14px 20px; border-radius: 12px; text-decoration: none; font-size: 1.05rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-bottom: 24px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 14px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tile:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 10px 24px rgba(13, 23, 38, .08); }
.tile strong { font-size: 1.1rem; }
.tile > span:last-child { color: var(--muted); font-size: .95rem; }
.tile__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #e8effc; color: var(--primary); margin-bottom: 8px; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.mini-list a { text-decoration: none; color: var(--ink); min-width: 0; }
.mini-list a span { display: block; color: var(--muted); }
.mini-list time { color: var(--muted); font-size: .9rem; white-space: nowrap; }

/* ---------- Enquiries ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 10px 18px; border-radius: 99px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.tabs a[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.enquiry { background: #fff; border-radius: 14px; padding: 24px 28px; margin-bottom: 16px; border: 1px solid var(--line); border-left: 6px solid var(--line); scroll-margin-top: 20px; }
.enquiry--new { border-left-color: var(--accent); }
.enquiry header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.enquiry h2 { margin: 0; }
.enquiry time { color: var(--muted); font-size: .92rem; }
.enquiry__msg { font-size: 1.08rem; background: var(--bg); padding: 16px 18px; border-radius: 10px; white-space: normal; }
.enquiry__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline { display: inline-flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.tag { display: inline-block; align-self: flex-start; padding: 5px 12px; border-radius: 99px; background: #e8effc; color: var(--primary-dark); font-weight: 600; font-size: .88rem; }
.tag--sample { background: #fff4d1; color: #7a5600; }
.empty-state { text-align: center; padding: 50px 20px; background: #fff; border-radius: 14px; border: 1px solid var(--line); color: var(--muted); }
.empty-state > .icon { width: 48px; height: 48px; color: #b3bfd0; margin-bottom: 10px; }
.empty-state h2 { justify-content: center; color: var(--ink); }

/* ---------- Pictures ---------- */
.picture { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.picture__preview { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg); aspect-ratio: 4 / 3; display: grid; place-items: center; }
.picture__preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.picture__preview--logo { background: repeating-conic-gradient(#eef1f5 0 25%, #fff 0 50%) 0 0 / 20px 20px; aspect-ratio: 3 / 2; }
.picture__preview--logo img { object-fit: contain; padding: 18px; }
.picture__preview .tag { position: absolute; left: 10px; top: 10px; }
.picture__none { color: var(--muted); text-align: center; }
.upload { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 14px 0 6px; }
.filepick { position: relative; display: inline-flex; cursor: pointer; }
.filepick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.filepick span { display: inline-flex; gap: 8px; align-items: center; padding: 11px 20px; border: 2px dashed #9fb0ca; border-radius: 10px; font-weight: 600; background: #fff; }
.filepick:hover span, .filepick input:focus-visible + span { border-color: var(--primary); color: var(--primary); }
.filepick.is-chosen span { border-style: solid; border-color: var(--ok); color: var(--ok); }
.filepick--big span { padding: 18px 28px; font-size: 1.05rem; }

/* ---------- Lists ---------- */
.item { scroll-margin-top: 20px; }
.item__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.is-flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 4px var(--accent); } to { box-shadow: 0 0 0 4px transparent; } }
.icon-pick > label, .star-pick > label { display: inline-block; cursor: pointer; margin: 0 6px 6px 0; }
.icon-pick input, .star-pick input { position: absolute; opacity: 0; }
.icon-pick label > span { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 10px; border: 2px solid var(--line); color: var(--muted); }
.icon-pick input:checked + span { border-color: var(--primary); background: #e8effc; color: var(--primary); }
.icon-pick input:focus-visible + span, .star-pick input:focus-visible + span { outline: 3px solid var(--accent); }
.star-pick label > span { display: inline-block; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--line); color: #e0a400; letter-spacing: 1px; }
.star-pick input:checked + span { border-color: var(--primary); background: #fff8e0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.photo { padding: 0; overflow: hidden; margin: 0; }
.photo__img { position: relative; aspect-ratio: 4 / 3; background: var(--bg); }
.photo__img img { width: 100%; height: 100%; object-fit: cover; }
.photo__img .tag { position: absolute; left: 10px; top: 10px; }
.photo form { padding: 16px 18px 18px; }
.photo .field { margin-bottom: 12px; }

/* ---------- Pages ---------- */
.page-card { padding: 20px 24px; }
.page-card__head { display: flex; gap: 16px; align-items: center; }
.page-card__head .switch { margin: 0; }
.page-card__title strong { font-size: 1.15rem; }
.page-card__title small { display: block; color: var(--muted); }
.page-card__state { font-style: normal; font-size: .8rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #e2f6ea; color: var(--ok); vertical-align: middle; }
.page-card.is-off .page-card__state { background: #eceff3; color: var(--muted); }
.page-card.is-off .page-card__title strong { color: var(--muted); }
.page-card details { margin-top: 14px; }
.page-card summary { cursor: pointer; color: var(--primary); font-weight: 600; padding: 4px 0; }
.page-card details[open] summary { margin-bottom: 16px; }

/* ---------- Colours ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.swatch input { position: absolute; opacity: 0; }
.swatch__card { display: block; border: 3px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; text-align: center; }
.swatch input:checked + .swatch__card { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(24, 87, 214, .15); }
.swatch input:focus-visible + .swatch__card { outline: 3px solid var(--accent); }
.swatch__preview { display: block; background: var(--navy); border-radius: 9px; padding: 16px; margin-bottom: 10px; }
.swatch__bar { display: block; height: 6px; width: 50%; background: var(--a); border-radius: 3px; margin-bottom: 14px; }
.swatch__btn { display: inline-block; background: var(--a); color: var(--i); padding: 7px 12px; border-radius: 7px; font-weight: 700; font-size: .9rem; }

/* ---------- Login ---------- */
.auth { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: var(--navy); background-image: radial-gradient(circle at 20% 0, rgba(255, 194, 26, .18), transparent 45%); }
.auth__box { background: #fff; width: min(460px, 100%); border-radius: 18px; padding: 36px 34px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); border-top: 6px solid var(--accent); }
.auth__mark { width: 56px; height: 56px; margin-bottom: 18px; }
.auth__mark .icon { width: 30px; height: 30px; }
.auth h1 { font-size: 1.6rem; }
.auth__box > p { color: var(--muted); }
.auth__back { text-align: center; margin: 20px 0 0; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; z-index: 10; height: auto; padding: 10px 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .side__brand { border: 0; padding: 4px; margin: 0; }
  .side__toggle { display: inline-flex; gap: 8px; align-items: center; background: var(--navy-2); color: #fff; border: 0; padding: 10px 16px; border-radius: 10px; font: 600 1rem var(--font); cursor: pointer; }
  .side__nav { display: none; width: 100%; padding: 10px 0 6px; }
  .menu-open .side__nav { display: grid; }
  .main { padding: 22px 16px 60px; }
  .row, .picture { grid-template-columns: 1fr; gap: 0; }
  .picture__preview { margin-bottom: 18px; }
  .panel { padding: 20px 18px; }
  h1 { font-size: 1.6rem; }
}

/* Logo + business name option */
.logo-name { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.logo-name .check { margin-bottom: 4px; font-weight: 600; }
.logo-name p { margin: 0 0 12px 28px; }

/* Google & search */
.notice--warn { background: #fff6dc; color: #6b4b00; border-left: 5px solid #e0a400; align-items: flex-start; font-weight: 500; }
.notice--warn .icon { margin-top: 3px; }
.notice--tip { background: #eef4ff; color: #1a3c80; border-left: 5px solid var(--primary); font-weight: 500; }
.panel--tip { border-color: #bcd0f5; background: #f6f9ff; }
.copy-row { display: flex; gap: 10px; flex-wrap: wrap; }
.copy-row input { flex: 1; min-width: 220px; font: inherit; padding: 11px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist strong { display: block; }
.checklist span:not(.status) { color: var(--muted); }
.status { flex: none; display: inline-flex; align-items: center; gap: 4px; min-width: 76px; justify-content: center; font-size: .82rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.status .icon { width: 1em; height: 1em; }
.status--ok { background: #e2f6ea; color: var(--ok); }
.status--todo { background: #fff1d6; color: #8a5a00; }
.status--info { background: #e8effc; color: var(--primary-dark); }
.seo-fields { margin-top: 10px; padding-top: 18px; border-top: 1px dashed var(--line); }
.seo-fields h3 { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; margin: 0 0 12px; }
.seo-fields h3 em { font-style: normal; font-weight: 400; color: var(--muted); }
.google-preview { display: grid; gap: 2px; max-width: 600px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: Arial, sans-serif; }
.google-preview__url { color: #202124; font-size: .82rem; overflow-wrap: anywhere; }
.google-preview__title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; }
.google-preview__desc { color: #4d5156; font-size: .9rem; }
