/* ==========================================================================
   Rose Photography — admin + installer
   ========================================================================== */

:root {
  --ink:       #3a4552;
  --ink-soft:  #6e7987;
  --ink-faint: #a0a8b3;
  --line:      #e2e7ee;
  --bg:        #f4f6f9;
  --white:     #ffffff;
  --accent:    #7c97b8;
  --accent-dk: #5b7a9e;
  --ok:        #1f7a4d;
  --ok-bg:     #eaf6ef;
  --bad:       #a1483c;
  --bad-bg:    #f9eeec;
  --sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono:      ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --radius:    5px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

h1, h2, h3 { line-height: 1.25; }

code, .mono { font-family: var(--mono); font-size: .88em; }

.muted  { color: var(--ink-soft); }
.small  { font-size: .87rem; }
.nowrap { white-space: nowrap; }
.right  { text-align: right; }
.lede   { max-width: 70ch; margin: -6px 0 26px; }

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar__wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 26px;
  min-height: 58px;
  flex-wrap: wrap;
}

.topbar__brand {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: none;
}

.topbar__nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }

/* Grouped menu ---------------------------------------------------------- */
.navgroup { position: relative; }

.navgroup > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: .93rem;
  user-select: none;
  white-space: nowrap;
}

/* The default disclosure triangle, hidden in every engine that draws one. */
.navgroup > summary::-webkit-details-marker { display: none; }
.navgroup > summary::marker { content: ''; }

.navgroup > summary:hover { background: var(--bg); color: var(--ink); }
.navgroup > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.navgroup[open] > summary { background: var(--bg); color: var(--ink); }
.navgroup[open] > summary svg { transform: rotate(180deg); }
.navgroup > summary svg { transition: transform .18s ease; }

/* The group holding the page you are on, so you can see where you are even
   when the menu is shut. */
.navgroup.is-current > summary { color: var(--accent-dk); font-weight: 500; }

.navgroup__panel {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 60;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(58, 69, 82, .13);
}

.navgroup__panel a {
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .9rem;
  white-space: nowrap;
}

.navgroup__panel a:hover { background: var(--bg); color: var(--ink); }
.navgroup__panel a.is-active { background: var(--accent); color: var(--white); }

/* On a narrow screen a floating panel has nowhere to float. Let the group
   expand in place instead and push the page down. */
@media (max-width: 760px) {
  .topbar__wrap { flex-wrap: wrap; gap: 12px; }
  .topbar__nav { width: 100%; }
  .navgroup { position: static; width: 100%; }
  .navgroup > summary { justify-content: space-between; }
  .navgroup__panel {
    position: static;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    margin: 2px 0 6px 13px;
    padding: 2px 0 2px 8px;
  }
}

.topbar__right { display: flex; gap: 18px; font-size: .87rem; }
.topbar__right a { color: var(--ink-soft); text-decoration: none; }
.topbar__right a:hover { color: var(--ink); }

.admin-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 26px 60px;
}

.admin-foot {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 26px 40px;
  font-size: .84rem;
  color: var(--ink-faint);
}

.admin-foot p { margin: 0; }

.crumb { margin: 0 0 8px; font-size: .88rem; }
.crumb a { text-decoration: none; }

/* --------------------------------------------------------------------------
   Page header + tabs
   -------------------------------------------------------------------------- */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0;
  font-size: 1.55rem;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tabs { display: flex; gap: 3px; flex-wrap: wrap; }

.tabs a {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .87rem;
}

.tabs a:hover { border-color: var(--ink-faint); color: var(--ink); }
.tabs a.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat {
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat__n { display: block; font-size: 1.85rem; font-weight: 600; line-height: 1.1; }
.stat__l { display: block; font-size: .8rem; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Panels + layout
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.split--wide { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }

@media (max-width: 900px) {
  .split, .split--wide { grid-template-columns: 1fr; }
}

.panel {
  padding: 24px 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel h2 {
  margin: 30px 0 14px;
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.panel h2:first-child { margin-top: 0; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.stack { display: grid; gap: 15px; }

.stack label,
.row label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hint {
  font-weight: 400;
  font-size: .78rem;
  color: var(--ink-faint);
}

input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="password"], input[type="number"], input[type="date"],
input[type="time"], select, textarea {
  width: 100%;
  margin-top: 5px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 400;
  color: var(--ink);
}

textarea { resize: vertical; }

.mono-area { font-family: var(--mono); font-size: .84rem; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 151, 184, .16);
}

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > label { flex: 1; min-width: 120px; }

.check-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: flex-end;
  padding-bottom: 9px;
}

.check-inline input { width: auto; margin: 0; accent-color: var(--accent); }

.days {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.days legend { padding: 0 6px; font-size: .82rem; font-weight: 600; color: var(--ink-soft); }

.day-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 3px 12px 3px 0;
  font-weight: 400;
  cursor: pointer;
}

.day-check input { width: auto; margin: 0; accent-color: var(--accent); }

.inline { display: inline; margin: 0; }
.inline select { width: auto; margin: 0; padding: 5px 8px; font-size: .87rem; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--white);
  font-family: var(--sans);
  font-size: .89rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: var(--accent-dk); border-color: var(--accent-dk); }

.btn-sm { padding: 5px 11px; font-size: .82rem; }

.btn-quiet {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-quiet:hover { background: var(--bg); border-color: var(--ink-faint); color: var(--ink); }

.btn-danger { background: var(--white); border-color: #e2bdb8; color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-scroll { overflow-x: auto; }

.tbl {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: .91rem;
}

.tbl th {
  padding: 9px 12px;
  border-bottom: 2px solid var(--line);
  text-align: left;
  font-size: .74rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.tbl td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.is-off { opacity: .5; }

/* Only the dashboard's table sits directly on the page background. */
.admin-main > .table-scroll .tbl {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   Pills
   -------------------------------------------------------------------------- */

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  background: #eceef1;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pill--confirmed, .pill--paid    { background: var(--ok-bg);  color: var(--ok); }
.pill--pending,  .pill--invoiced { background: #fdf3e3; color: #8a5b12; }
.pill--cancelled, .pill--unpaid  { background: var(--bad-bg); color: var(--bad); }
.pill--completed, .pill--waived  { background: #eaeff7; color: #2f5487; }

/* --------------------------------------------------------------------------
   Key/value lists
   -------------------------------------------------------------------------- */

.kv {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  gap: 7px 18px;
  margin: 0;
}

.kv dt { font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); }
.kv dd { margin: 0; }

/* --------------------------------------------------------------------------
   Contract view
   -------------------------------------------------------------------------- */

.sig-proof {
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius);
  background: var(--ok-bg);
  font-size: .89rem;
}

.sig-proof p { margin: 0 0 4px; }
.sig-proof p:last-child { margin: 0; }

.contract-view {
  max-height: 460px;
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */

.alert {
  padding: 13px 17px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--radius);
  font-size: .92rem;
}

.alert ul, .alert ol { margin: 6px 0 0; padding-left: 20px; }
.alert p { margin: 0 0 8px; }
.alert p:last-child { margin: 0; }

.alert-ok    { background: var(--ok-bg);  border-left-color: var(--ok);  color: #17583a; }
.alert-error { background: var(--bad-bg); border-left-color: var(--bad); color: #8a2c22; }

/* --------------------------------------------------------------------------
   Login + installer
   -------------------------------------------------------------------------- */

.login-page, .install-page { background: var(--bg); }

.login-wrap {
  max-width: 380px;
  margin: 12vh auto;
  padding: 34px 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.login-wrap h1 { margin: 0 0 22px; font-size: 1.3rem; }

.install-wrap {
  max-width: 720px;
  margin: 7vh auto;
  padding: 36px 38px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.install-wrap h1 { margin: 0 0 24px; font-size: 1.45rem; }
.install-wrap h2 { margin: 28px 0 14px; font-size: 1.05rem; }

/* ==========================================================================
   Back-office components: CRM, invoicing, galleries
   ========================================================================== */

/* --- Search bar in a page header ---------------------------------------- */

.searchbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.searchbar input[type="search"] {
  width: auto;
  min-width: 220px;
  margin: 0;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: .9rem;
}

.searchbar select { width: auto; margin: 0; padding: 7px 9px; font-size: .88rem; }

/* --- Tabs that wrap onto several lines ---------------------------------- */

.tabs--wrap { margin-bottom: 22px; }

.tab-n {
  display: inline-block;
  min-width: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--bg);
  font-size: .72rem;
  text-align: center;
}

.tabs a.is-active .tab-n { background: rgba(255, 255, 255, .22); }

/* --- Read-only field you click to copy ---------------------------------- */

.copyfield {
  width: 100%;
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.copyfield:focus { outline: none; border-color: var(--accent); color: var(--ink); }

/* --- Blocks of prose ----------------------------------------------------- */

.notes-block {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: .92rem;
}

.response {
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.response h3 { margin: 0 0 12px; font-size: 1rem; }

/* --- Invoice line-item table -------------------------------------------- */

.tbl--form td { padding: 6px 6px; vertical-align: middle; }
.tbl--form input { margin: 0; padding: 7px 9px; font-size: .9rem; }

.totals-box {
  margin: 4px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  grid-template-columns: 1fr auto;
}

.totals-box dd { text-align: right; }

/* --- Gallery photo grid -------------------------------------------------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.photo {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.photo--cover { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(124, 151, 184, .22); }

.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

.photo figcaption { padding: 9px 10px 10px; }

.photo__name {
  display: block;
  font-size: .78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo__meta { display: block; margin-bottom: 7px; font-size: .72rem; color: var(--ink-faint); }

.photo__actions { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }

/* --- File input ---------------------------------------------------------- */

input[type="file"] {
  width: 100%;
  margin-top: 5px;
  padding: 9px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: .88rem;
}

input[type="file"]:focus { outline: none; border-color: var(--accent); }

/* --- Extra pill colours for the new statuses ---------------------------- */

.pill--active, .pill--published, .pill--sent, .pill--booked,
.pill--delivered                       { background: #e8f1fa; color: #35618c; }

.pill--lead, .pill--inquiry, .pill--draft,
.pill--upcoming                        { background: #fdf3e3; color: #8a5b12; }

.pill--past, .pill--archived,
.pill--shot, .pill--editing            { background: #eceef1; color: var(--ink-soft); }

.pill--partial                         { background: #fdf3e3; color: #8a5b12; }

/* --- Inquiry and order cards -------------------------------------------- */

.inquiry { margin-bottom: 18px; }

.inquiry__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.inquiry__head h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inquiry__head p { margin: 0; }

/* --- Questionnaire builder rows ----------------------------------------- */

.qrow {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.qrow__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Email placeholder chips -------------------------------------------- */

.ph-group { margin: 0 0 14px; font-size: .84rem; line-height: 2; }

.ph {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: .78rem;
  color: var(--ink-soft);
}

.stat__n--bad { color: var(--bad); }

.pill--replied, .pill--invoiced   { background: #e8f1fa; color: #35618c; }
.pill--converted, .pill--fulfilled { background: var(--ok-bg); color: var(--ok); }
.pill--new                         { background: #fdf3e3; color: #8a5b12; }
.pill--closed                      { background: #eceef1; color: var(--ink-soft); }

.photo-grid--tight { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo-grid--tight .photo figcaption { display: none; }
.photo__noimg {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: var(--bg);
  color: var(--ink-faint);
  font-size: .78rem;
}

/* ==========================================================================
   Pricing calculator + scorecard
   ========================================================================== */

.row-warn td { background: var(--bad-bg); }

/* --- Where the money goes ------------------------------------------------ */

.split-bar { display: grid; gap: 9px; margin-bottom: 18px; }

.split-bar__row {
  display: grid;
  grid-template-columns: minmax(120px, 150px) 1fr minmax(110px, auto);
  align-items: center;
  gap: 12px;
  font-size: .86rem;
}

.split-bar__label { color: var(--ink-soft); }

.split-bar__track {
  height: 10px;
  border-radius: 99px;
  background: var(--bg);
  overflow: hidden;
}

.split-bar__fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
}

.split-bar__row:last-child .split-bar__fill { background: var(--ok); }

.split-bar__val { text-align: right; color: var(--ink-soft); white-space: nowrap; }

/* --- Scorecard ----------------------------------------------------------- */

.scorebox {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 26px 30px;
  margin-bottom: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scorebox__dial {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  flex: none;
  border-radius: 50%;
  border: 4px solid var(--line);
  line-height: 1;
}

.scorebox__dial--good { border-color: var(--ok);     background: var(--ok-bg); }
.scorebox__dial--ok   { border-color: #7ba05b;       background: #f1f6ec; }
.scorebox__dial--mid  { border-color: #c9922f;       background: #fdf3e3; }
.scorebox__dial--low  { border-color: var(--bad);    background: var(--bad-bg); }

.scorebox__n  { font-size: 2.4rem; font-weight: 600; }
.scorebox__pc { font-size: .78rem; color: var(--ink-soft); margin-top: 3px; }

.scorebox__text h2 { margin: 0 0 6px; font-size: 1.3rem; }
.scorebox__text p  { margin: 0 0 6px; color: var(--ink-soft); max-width: 60ch; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.check {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.check:last-child { border-bottom: 0; }

.check__mark {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1;
}

.check--pass .check__mark { background: var(--ok-bg);  color: var(--ok); }
.check--warn .check__mark { background: #fdf3e3;       color: #8a5b12; }
.check--fail .check__mark { background: var(--bad-bg); color: var(--bad); }
.check--skip .check__mark { background: var(--bg);     color: var(--ink-faint); }

.check__body { display: grid; gap: 3px; }

.check__status {
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.check--fail .check__status { color: var(--bad); }
.check--warn .check__status { color: #8a5b12; }

.check__detail { font-size: .92rem; color: var(--ink-soft); }
.check__fix    { font-size: .88rem; color: var(--ink); }

.check__link {
  justify-self: start;
  margin-top: 3px;
  font-size: .84rem;
  text-decoration: none;
}

.check--skip .check__body strong { color: var(--ink-faint); font-weight: 500; }

/* --- Site image slots ---------------------------------------------------- */

.imgslot { margin-bottom: 18px; }

.imgslot__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.imgslot__head h2 { margin: 0 0 3px; font-size: 1.05rem; text-transform: none; letter-spacing: 0; color: var(--ink); }
.imgslot__head p { margin: 0; }

.imgslot__body {
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

/* A chequerboard so a transparent logo reads as transparent, not white. */
.imgslot__preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #eef1f5 25%, transparent 25%, transparent 75%, #eef1f5 75%),
    linear-gradient(45deg, #eef1f5 25%, transparent 25%, transparent 75%, #eef1f5 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  overflow: hidden;
}

.imgslot__preview img { max-width: 100%; max-height: 210px; height: auto; display: block; }

.imgslot__preview.is-empty {
  background: var(--bg);
  color: var(--ink-faint);
  font-size: .82rem;
  font-style: italic;
}

.imgslot__controls { display: grid; gap: 14px; }

.imgslot__url summary { cursor: pointer; font-size: .86rem; color: var(--accent); }
.imgslot__url input[type="text"] { font-family: var(--mono); font-size: .82rem; }

@media (max-width: 760px) {
  .imgslot__body { grid-template-columns: 1fr; }
}

/* Watermark controls -------------------------------------------------- */
.wm { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr); gap: 26px; align-items: start; }
.wm__preview img { width: 100%; border-radius: 10px; display: block; box-shadow: 0 2px 14px rgba(15, 48, 64, .16); }
.wm__preview p { margin: 8px 0 0; }
.wm__controls { display: grid; gap: 16px; }
.wm__controls label { display: block; font-size: 14px; font-weight: 500; }
.wm__controls input[type="range"] { width: 100%; margin-top: 8px; accent-color: var(--blue-deep, #4a6b82); }
.wm__controls .check-inline { font-weight: 400; }
.wm__controls p { margin: -8px 0 0; }
@media (max-width: 820px) { .wm { grid-template-columns: 1fr; } }

/* --- Editor hooks on the gallery screen ---------------------------------- */

/* A heading with an action sitting beside it. */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.panel-head h2 { margin: 0; }

/* Culling marks carried back from the editor. */
.photo__marks {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.photo__stars { color: #c8a13f; font-size: .78rem; letter-spacing: .04em; }

/* Rejected frames stay visible but stop competing for attention. */
.photo--reject { opacity: .55; }
.photo--reject:hover { opacity: 1; }

/* Users and the sign-in trail ------------------------------------------ */
.user__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.user__head h2 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.user__head p { margin: 0; }
.user__edit { margin-top: 14px; border-top: 1px solid var(--line, #e9e4df); padding-top: 12px; }
.user__edit summary { cursor: pointer; font-size: 14px; color: var(--blue-deep, #3d5c7c); }
.user__edit summary:hover { text-decoration: underline; }
.pill-ok  { background: #e7f1e9; color: #3d6b4c; }
.pill-bad { background: #f7e9e9; color: #8d4a4a; }

/* Portfolio management -------------------------------------------------- */
.pf-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px;
}
.pf-item { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.pf-item__img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius); background: var(--bg); display: block;
}
.pf-item__form { gap: 8px; }
.pf-item__form select, .pf-item__form input[type="text"] { font-size: .88rem; }
.pf-item__tools { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.pf-item__tools .btn-sm { padding: 5px 11px; }

/* SMTP conversation log -------------------------------------------------- */
.smtp-log {
  font-family: var(--mono); font-size: 12px; line-height: 1.65;
  background: var(--bg); border-radius: var(--radius);
  padding: 14px 16px; margin: 12px 0 0;
  max-height: 340px; overflow: auto; white-space: pre-wrap; word-break: break-all;
  color: var(--ink-soft);
}
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent-dk); font: inherit; text-decoration: underline;
}
.linkish:hover { color: var(--ink); }
