/* ArtGM.online — shared stylesheet. Version: see version.txt (appended to the URL as ?v=). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
:root {
  --bg:#f7f5f0; --surface:#fff; --border:#ddd9d0; --border-light:#eeebe4;
  --text:#2a2a2a; --text-muted:#6a6a6a;
  --accent:#8b6914; --accent-dark:#6a4f0e; --accent-light:#f5edd8; --accent-line:#d4ad50; --on-accent:#fff;
  /* Gold accent defaults. A gallery's brand colour re-points these (includes/header.php, brandAccentCss()). */
  --nav-bg:#1a1a1a; --nav-text:#ede9e0; --nav-hover:#8b6914;
  /* Nav theme tokens. Defaults = the dark nav. .nav-custom (below) re-points them for a custom bar colour;
     header.php supplies the values. */
  --nav-hover-text:#fff; --nav-brand:#e8c96a; --nav-brand-hover:#f0d87a; --nav-brand-line:#3a3a3a;
  --nav-logout:#999; --nav-logout-line:#444;
  --nav-menu-bg:#252525; --nav-menu-line:#333; --nav-menu-divider:#2e2e2e;
  --nav-m-line:#2a2a2a; --nav-m-menu-bg:#1e1e1e; --nav-m-menu-divider:#1a1a1a;
  --nav-shadow:0 2px 6px rgba(0,0,0,.3);
  --green:#2d6a2d; --green-bg:#eaf4ea; --red:#c0392b; --red-bg:#fdf0ee;
  --orange:#a35900; --orange-bg:#fff4e5; --blue:#1a5276; --blue-bg:#eaf2fb; /* orange darkened for >=4.5:1 text contrast on --orange-bg */
  --th-bg:#f0ede5; --row-hover:#faf8f4; --btn-secondary-hover:#ccc9c0; --green-dark:#1d4a1d;
  --radius:6px; --shadow:0 2px 8px rgba(0,0,0,.08); --shadow-sm:0 1px 4px rgba(0,0,0,.06);
}
body { font-family:'Segoe UI',system-ui,-apple-system,sans-serif; background:var(--bg); color:var(--text); font-size:15px; line-height:1.6; min-height:100vh; min-height:100dvh; /* dvh: iOS Safari's 100vh includes the collapsing URL bar */ display:flex; flex-direction:column; }
img { max-width:100%; height:auto; }
/* Not inside tables: a percentage max-width on an image in an auto-width table cell collapses it to 0 (list thumbnails vanished). */
table img { max-width:none; }
a { color:var(--accent); text-decoration:none; }
a:hover { color:var(--accent-dark); text-decoration:underline; }
/* Visible keyboard focus for every interactive element (inputs get their own ring below). */
:focus-visible { outline:2px solid var(--accent-line, #d4ad50); outline-offset:2px; }

.nav { background:var(--nav-bg); padding:0 24px; display:flex; align-items:center; position:sticky; top:0; z-index:100; box-shadow:var(--nav-shadow); }
.nav-brand { font-family:Georgia,serif; font-size:1.15rem; color:var(--nav-brand); padding:16px 24px 16px 0; margin-right:8px; border-right:1px solid var(--nav-brand-line); white-space:nowrap; text-decoration:none; }
.nav-brand:hover { color:var(--nav-brand-hover); text-decoration:none; }
.nav-links { display:flex; align-items:stretch; flex:1; }
/* Top-level nav items: plain links and the Modules dropdown toggle share one base. */
.nav-links a, .nav-dropdown-toggle { color:var(--nav-text); padding:0 16px; display:flex; align-items:center; font-size:.92rem; transition:background .15s,color .15s; text-decoration:none; height:52px; }
.nav-links a:hover, .nav-links a.active { background:var(--nav-hover); color:var(--nav-hover-text); text-decoration:none; }
.nav-right { margin-left:auto; display:flex; align-items:center; gap:12px; }
.nav-right a { color:var(--nav-text); font-size:.82rem; text-decoration:none; padding:6px 10px; border-radius:var(--radius); transition:background .15s,color .15s; }
.nav-right a:hover, .nav-right a.active { background:var(--nav-hover); color:var(--nav-hover-text); text-decoration:none; }
.nav-logo { max-height:40px; width:auto; display:block; }
.nav-logout { font-size:.8rem; color:var(--nav-logout) !important; border:1px solid var(--nav-logout-line); padding:5px 12px !important; border-radius:var(--radius); transition:background .15s,color .15s; }
.nav-logout:hover { background:var(--nav-hover); color:var(--nav-hover-text) !important; border-color:var(--nav-hover); }
.nav-toggle { display:none; background:none; border:none; cursor:pointer; padding:10px; margin-left:auto; flex-direction:column; justify-content:center; gap:5px; }
.nav-toggle span { display:block; width:22px; height:2px; background:var(--nav-text); border-radius:2px; transition:transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity:0; transform:scaleX(0); }
.nav-open .nav-toggle span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }
/* Modules dropdown */
.nav-dropdown { position:relative; display:flex; align-items:stretch; }
.nav-dropdown-toggle { gap:5px; cursor:pointer; } /* base: shared rule with .nav-links a above */
.nav-dropdown-toggle:hover, .nav-dropdown.open .nav-dropdown-toggle, .nav-dropdown-toggle.active { background:var(--nav-hover); color:var(--nav-hover-text); text-decoration:none; }
.nav-dropdown-arrow { font-size:.7rem; opacity:.75; }
.nav-dropdown-menu { display:none; position:absolute; top:100%; left:0; background:var(--nav-menu-bg); border:1px solid var(--nav-menu-line); border-top:none; min-width:180px; z-index:200; box-shadow:0 6px 18px rgba(0,0,0,.4); }
.nav-dropdown.open .nav-dropdown-menu { display:block; }
.nav-dropdown-menu a { display:block; color:var(--nav-text); padding:11px 18px; font-size:.87rem; text-decoration:none; border-bottom:1px solid var(--nav-menu-divider); white-space:nowrap; transition:background .12s,color .12s; }
.nav-dropdown-menu a:last-child { border-bottom:none; }
/* Add-on the gallery has no subscription for: muted, with a padlock; links to the Subscription page */
.nav-dropdown-menu a.nav-locked { opacity:.55; }
.nav-dropdown-menu a.nav-child, .nav-right .nav-dropdown-menu a.nav-child { padding-left:31px; font-size:.82rem; border-left:3px solid var(--nav-menu-divider); background:color-mix(in srgb, var(--nav-menu-divider) 45%, transparent); }   /* a child item (Voting under Exhibitions): tinted, with a bar on its left edge */
.nav-dropdown-menu a.nav-child:hover, .nav-dropdown-menu a.nav-child.active { background:var(--nav-hover); }
/* A menu row with sub-items behind a chevron: the row is the link plus the chevron button; the sub-items show when .open */
.nav-dropdown-menu .nav-sub { border-bottom:1px solid var(--nav-menu-divider); }
.nav-dropdown-menu .nav-sub:last-child { border-bottom:none; }
.nav-dropdown-menu .nav-sub a { border-bottom:none; }
.nav-sub-row { display:flex; align-items:stretch; }
.nav-sub-row a { flex:1; }
.nav-sub-toggle { background:none; border:0; border-left:1px solid var(--nav-menu-divider); color:var(--nav-text); padding:0 14px; cursor:pointer; }
.nav-sub-toggle:hover { background:var(--nav-hover); color:var(--nav-hover-text); }
.nav-sub-menu { display:none; }
.nav-dropdown-menu .nav-sub.open .nav-sub-row { background:color-mix(in srgb, var(--nav-menu-divider) 45%, transparent); }   /* an open group: its parent row carries the same tint as the child items */
.nav-sub.open .nav-sub-menu { display:block; }
.nav-dropdown-menu a.nav-locked:hover { opacity:.85; }
.nav-lock-icon { margin-left:6px; vertical-align:-1px; }
/* Past-due notice under the nav bar (includes/nav.php) */
.past-due-banner { background:var(--orange-bg); color:var(--orange); border-bottom:1px solid var(--orange); padding:10px 24px; font-size:.88rem; text-align:center; }
.past-due-banner a { color:inherit; font-weight:600; text-decoration:underline; margin-left:6px; white-space:nowrap; }
.past-due-form { display:inline; margin:0; }
.past-due-form button { background:none; border:none; padding:0; margin-left:6px; font:inherit; font-weight:600; color:inherit; text-decoration:underline; cursor:pointer; white-space:nowrap; }
.nav-dropdown-menu a:hover, .nav-dropdown-menu a.active { background:var(--nav-hover); color:var(--nav-hover-text); text-decoration:none; }
/* Settings dropdown in the right-hand nav group: small toggle matching the other right-hand links; menu opens right-aligned */
.nav-right .nav-dropdown { align-items:center; }
.nav-right .nav-dropdown-toggle { height:auto; padding:6px 10px; font-size:.82rem; border-radius:var(--radius); }
.nav-right .nav-dropdown-menu { top:calc(100% + 10px); left:auto; right:0; }
.nav-right .nav-dropdown-menu a { padding:11px 18px; font-size:.87rem; border-radius:0; }

/* Custom nav bar colour (Appearance > Branding > Nav bar colour). includes/header.php sets every --nav-* token
   for the chosen colour; only the shadow is fixed here. */
.nav-custom { --nav-shadow:0 1px 0 rgba(0,0,0,.12); }

.page-wrapper { max-width:1200px; margin:0 auto; padding:32px 24px 60px; flex:1; width:100%; }
.page-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:28px; padding-bottom:16px; border-bottom:2px solid var(--border); gap:16px; flex-wrap:wrap; }
.page-title { font-family:Georgia,serif; font-size:1.7rem; font-weight:normal; overflow-wrap:anywhere; }
.page-subtitle { font-size:.9rem; color:var(--text-muted); margin-top:2px; }

.btn { display:inline-flex; align-items:center; gap:6px; padding:9px 18px; border-radius:var(--radius); font-size:.88rem; font-weight:500; cursor:pointer; border:none; transition:background .15s; text-decoration:none; white-space:nowrap; }
.btn:hover { text-decoration:none; }
.btn-primary { background:var(--accent); color:var(--on-accent); }
.btn-primary:hover { background:var(--accent-dark); color:var(--on-accent); }
.btn-secondary { background:var(--border); color:var(--text); }
.btn-secondary:hover { background:var(--btn-secondary-hover); color:var(--text); }
.btn-danger { background:var(--red-bg); border:1px solid var(--red); color:var(--red); }
.btn-danger:hover { background:var(--red); border-color:var(--red); color:#fff; }
.btn-success { background:var(--green); color:#fff; }
.btn-success:hover { background:var(--green-dark); color:#fff; }
.btn-sm { padding:5px 12px; font-size:.82rem; }
.page-header-actions { display:flex; gap:8px; flex-wrap:wrap; }
.page-header-actions form { display:flex; margin:0; }
.page-header-actions form .btn { height:100%; } /* post-form buttons (Archive, Restore, Delete) stretch to the same height as the bordered link buttons beside them */
.gd-ic { justify-content:center; width:30px; height:30px; padding:0; } /* icon-only button: pair with .btn, title + aria-label, and docIcon() */
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); border:0; } /* visually hidden, e.g. the copy-fallback textarea in js/payment-link.js */
.btn-outline { background:transparent; border:1px solid var(--accent); color:var(--accent); }
.btn-outline:hover { background:var(--accent); color:var(--on-accent); }

/* Shared "surface card" base — .card and .stat-card
   use the same background/border/radius/shadow; each below only adds
   its own padding/layout on top. */
.card, .stat-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.card { padding:24px; }
.card-title { font-family:Georgia,serif; font-size:1.05rem; font-weight:normal; margin-bottom:16px; padding-bottom:10px; border-bottom:1px solid var(--border-light); }
body.style-gold .card { overflow:hidden; }
body.style-gold .card-title { background:var(--accent-light); border-bottom:2px solid var(--accent-line); color:var(--accent-dark); margin:-24px -24px 20px; padding:15px 24px; }
body.style-gold .detail-section:first-child h3 { background:var(--accent-light); border-bottom:2px solid var(--accent-line); color:var(--accent-dark); margin:-24px -24px 12px; padding:10px 24px; }
body.style-gold .detail-section + .detail-section h3 { background:var(--accent-light); border-top:1px solid var(--accent-line); border-bottom:2px solid var(--accent-line); color:var(--accent-dark); margin:0 -24px 12px; padding:10px 24px; }
body.style-gold .card-table-header { background:var(--accent-light); border-bottom:2px solid var(--accent-line); }
body.style-gold .card-table-header h2 { color:var(--accent-dark); }

.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:16px; margin-bottom:32px; }
.card-grid      { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(340px,100%),1fr)); gap:24px; }
.card-grid-2-1  { display:grid; grid-template-columns:2fr 1fr; gap:24px; }
/* Equal-width card columns (minmax(0,…) so wide content can't blow a column out); stack on narrower screens.
   .card-grid-2 = two across; .card-grid-3 = three across, two under 1000px. */
.card-grid-2, .card-grid-3 { display:grid; gap:24px; align-items:start; grid-template-columns:repeat(2, minmax(0, 1fr)); }
.card-grid-3 { grid-template-columns:repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .card-grid-3 { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .card-grid-2 { grid-template-columns:minmax(0, 1fr); } }
@media (max-width: 640px)  { .card-grid-3 { grid-template-columns:minmax(0, 1fr); } }

/* The app's one chevron for anything that opens and closes: <span class="chev" aria-hidden="true"></span>.
   Points right when closed and turns down when open: inside an open <details>, inside an open .nav-dropdown, inside a
   button with aria-expanded="true", or when it carries .is-open. Colour and size come from the parent (set font-size
   and color on the span or its container). The table-row version (.chevron-btn below) uses the same glyph. */
.chev { display:inline-block; font-size:.8rem; line-height:1; flex-shrink:0; transition:transform .2s; }
.chev::before { content:"\276F"; }
details[open] > summary .chev, .nav-dropdown.open .chev, [aria-expanded="true"] .chev, .chev.is-open { transform:rotate(90deg); }

/* Expand/collapse chevron on table rows + the panel that opens under the row (Users settings) */
.chevron-btn { background:none; border:none; cursor:pointer; color:var(--text-muted); font-size:.9rem; padding:4px 8px; border-radius:var(--radius); transition:color .15s, transform .2s; display:inline-block; transform:rotate(0deg); }
.chevron-btn:hover { color:var(--accent); }
.chevron-btn.open  { transform:rotate(90deg); color:var(--accent); }
.staff-expand-row td { background:#faf8f4; border-bottom:2px solid var(--border); }
.staff-panel { padding:18px 20px; }
.staff-panel-fields { display:flex; flex-wrap:wrap; gap:14px 20px; margin-bottom:16px; }
.sp-field { display:flex; flex-direction:column; gap:4px; }
.sp-field label { font-size:.82rem; font-weight:500; color:var(--text-muted); }
.sp-field input[type="text"], .sp-field input[type="email"], .sp-field select { padding:7px 10px; border:1px solid var(--border); border-radius:var(--radius); font-size:.88rem; font-family:inherit; background:#fff; min-width:180px; }
.sp-field input:focus, .sp-field select:focus { outline:none; border-color:var(--accent-line, #d4ad50); box-shadow:0 0 0 3px var(--accent-light, rgba(139,105,20,.12)); }
.sp-field-check { justify-content:flex-end; }
.sp-field-check label { display:flex; align-items:center; gap:6px; font-size:.88rem; cursor:pointer; }
.staff-panel-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

/* A checkbox/radio label that should read as normal text, not the muted field label.
   label.check-label (not just .check-label) so it also beats `.sp-field label`. */
label.check-label { font-weight:normal; font-size:.88rem; color:var(--text); cursor:pointer; }
/* Checkbox labels stacked one per line */
.check-stack { display:flex; flex-direction:column; gap:8px; }

/* One-time-code box (authenticator / recovery code): wide-spaced digits */
.code-input { letter-spacing:.2em; font-size:1.2rem; }
.stat-card { padding:20px; text-align:center; border-top:3px solid var(--accent); }
/* Shared with .stat-card-v's vertical variant below — only font-size/margin differ per layout. */
.stat-value, .stat-card-v .stat-value { font-family:Georgia,serif; color:var(--accent); font-weight:normal; line-height:1; }
.stat-label, .stat-card-v .stat-label { color:var(--text-muted); }
.stat-value { font-size:2rem; margin-bottom:6px; }
.stat-label { font-size:.85rem; }

.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:.9rem; }
thead th { text-align:left; padding:10px 14px; background:var(--th-bg); border-bottom:2px solid var(--border); font-weight:500; font-size:.85rem; color:var(--text-muted); white-space:nowrap; }
tbody tr { border-bottom:1px solid var(--border-light); }
tbody tr:last-child { border-bottom:none; }
tbody tr:hover { background:var(--row-hover); }
tbody td { padding:11px 14px; vertical-align:middle; }
.td-actions { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.td-actions-nowrap { flex-wrap:nowrap; } /* icon-only actions: keep on one row, the column grows to fit */

thead th.sortable a { display:inline-flex; align-items:center; gap:3px; color:inherit; text-decoration:none; }
thead th.sortable a:hover { color:var(--accent-dark); text-decoration:none; }
thead th.sortable .arrow { font-size:.7rem; color:var(--accent); }
thead th.sort-active { color:var(--accent-dark); background:var(--accent-light); }


.badge { display:inline-block; padding:3px 9px; border-radius:var(--radius); font-size:.78rem; font-weight:500; }
/* Colour-named badges (.badge-green etc.) are aliases for the status-named
   ones — same look, used when the badge isn't about artwork/sale status,
   so the class name matches what it actually looks like. */
.badge-available, .badge-sold, .badge-green  { background:var(--green-bg);  color:var(--green); }
.badge-red                      { background:var(--red-bg);    color:var(--red); }
.badge-reserved,  .badge-amber  { background:var(--orange-bg); color:var(--orange); }
.badge-transfer_pending, .badge-blue { background:var(--blue-bg); color:var(--blue); }
.badge-not_for_sale, .badge-archived, .badge-gray { background:var(--border); color:var(--text-muted); }

.form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:18px 24px; }
.form-section { grid-column:1/-1; margin-top:12px; padding-top:16px; border-top:1px solid var(--border-light); font-family:Georgia,serif; font-size:.95rem; color:var(--accent); }
.form-group { display:flex; flex-direction:column; gap:5px; }
.form-group.full-width { grid-column:1/-1; }
/* Two equal columns for fields that should line up in rows (the buyer block on the sale form), and the small heading above such a group. */
.form-grid.cols-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.form-subsection { font-size:.8rem; font-weight:600; color:var(--text-muted); margin:0 0 8px; }
/* A thin outlined box around a group of fields (Contact and Address on the sale form). */
.form-box { border:1px solid var(--border); border-radius:var(--radius); padding:14px 16px; }
/* One artwork row of the sale form: artwork, quantity, price, commission and a remove button, with a line of detail under them. */
.sale-line { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,.7fr) minmax(0,1.1fr) minmax(0,1fr) auto; gap:12px 16px; align-items:end; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius); margin-bottom:10px; }
.sale-line .line-info { grid-column:1/-1; font-size:.85rem; color:var(--text-muted); margin-top:-4px; }
.sale-line .line-info:empty { display:none; }
.sale-line .line-warn { grid-column:1/-1; margin-top:-4px; }
.field-error[hidden] { display:none; }   /* .field-error sets display:flex, which would otherwise beat the hidden attribute */
/* Breathing space between stacked (non-.form-grid) form-groups — e.g. a
   single-column card with several fields in a row. .form-grid already
   spaces its own children via `gap`, so that case is reset back to 0
   here rather than doubling up. */
.form-group + .form-group { margin-top:18px; }
.form-grid .form-group + .form-group { margin-top:0; }
label { font-size:.85rem; font-weight:500; color:var(--text-muted); }
label .required { color:var(--red); margin-left:2px; }
input[type="text"],input[type="email"],input[type="tel"],input[type="number"],input[type="date"],input[type="password"],input[type="url"],select,textarea {
  width:100%; padding:9px 12px; border:1px solid var(--border); border-radius:var(--radius); font-size:.92rem; font-family:inherit; background:#fff; color:var(--text); transition:border-color .15s,box-shadow .15s; appearance:none; }
input:focus,select:focus,textarea:focus { outline:2px solid var(--accent-line, #d4ad50); outline-offset:-1px; border-color:var(--accent-line, #d4ad50); box-shadow:0 0 0 3px var(--accent-light, rgba(139,105,20,.12)); }
textarea { resize:vertical; min-height:90px; }
select { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236a6a6a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; padding-right:32px; }
.field-hint { font-size:.78rem; color:var(--text-muted); margin-top:2px; }
.field-error { font-size:.78rem; color:var(--red); font-weight:600; margin-top:2px; display:flex; align-items:center; gap:4px; }
.text-muted { color:var(--text-muted); }
.sub-body { font-size:.9rem; color:var(--text); margin-top:4px; margin-bottom:0; }
.sub-hint { font-size:.82rem; color:var(--text-muted); margin-top:4px; margin-bottom:0; }
/* Subscription page Storage card: gap before the next card, and a <progress> bar drawn like the trial bar */
.storage-card { margin-bottom:24px; }
.storage-progress { display:block; width:100%; height:6px; margin-top:10px; border:0; border-radius:3px; overflow:hidden; background:var(--border); -webkit-appearance:none; appearance:none; }
.storage-progress::-webkit-progress-bar { background:var(--border); border-radius:3px; }
.storage-progress::-webkit-progress-value { background:var(--accent); border-radius:3px; }
.storage-progress::-moz-progress-bar { background:var(--accent); border-radius:3px; }
.form-group.has-error input,.form-group.has-error select,.form-group.has-error textarea { border-color:var(--red); box-shadow:0 0 0 3px rgba(192,57,43,.12); }
.form-actions { display:flex; gap:12px; align-items:center; margin-top:28px; padding-top:20px; border-top:1px solid var(--border-light); flex-wrap:wrap; }

.alert { padding:12px 16px; border-radius:var(--radius); margin-bottom:20px; font-size:.9rem; border-left:4px solid; }
.alert ul { margin:6px 0 0 18px; }
.alert-success { background:var(--green-bg); border-color:var(--green); color:var(--green); }
.alert-error   { background:var(--red-bg);   border-color:var(--red);   color:var(--red); }
.alert-info    { background:var(--blue-bg);  border-color:var(--blue);  color:var(--blue); }
.alert-warning { background:var(--orange-bg);border-color:var(--orange);color:var(--orange); }

.detail-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:24px; }
.detail-section h3 { font-family:Georgia,serif; font-size:.95rem; font-weight:normal; color:var(--accent); margin-bottom:12px; padding-bottom:6px; border-bottom:1px solid var(--border-light); }
.detail-section +.detail-section { margin-top:16px; padding-top:16px; border-top:1px solid var(--border-light); }
body.style-gold .detail-section + .detail-section { border-top:none; padding-top:0; }
/* Clamp a long text block to N lines (set via data-clamp-lines, JS applies -webkit-line-clamp) with a "Show more"/"Show less" toggle */
.clamp-text[data-clamp-lines] p { display:-webkit-box; -webkit-box-orient:vertical; overflow:hidden; }
.clamp-text.is-expanded p { display:block; -webkit-line-clamp:unset; }
.clamp-text-toggle { background:none; border:none; padding:4px 0 0; margin-top:4px; font-size:.82rem; color:var(--accent); cursor:pointer; text-decoration:underline; }
.card-table-header { padding:20px 24px 12px; display:flex; justify-content:space-between; align-items:center; }
.card-table-header h2 { font-family:Georgia,serif; font-size:1.1rem; font-weight:normal; }
dl { display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px 16px; align-items:baseline; }
dt { font-size:.85rem; font-weight:500; color:var(--text-muted); white-space:nowrap; }
dd { font-size:.92rem; color:var(--text); min-width:0; overflow-wrap:anywhere; } /* long emails/locations wrap instead of widening the card */
/* Very narrow screens: label above value */
@media (max-width:480px) {
  dl { grid-template-columns:minmax(0,1fr); gap:0; }
  dd { margin-bottom:8px; }
}
/* artwork_view: image column left, details right (collapses to one column at 768px, see below). minmax(0,…) stops wide content blowing a column out. */
.av-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.8fr); gap:24px; align-items:start; margin-bottom:24px; }

.artwork-image { width:100%; max-width:400px; border-radius:var(--radius); border:1px solid var(--border); display:block; margin-bottom:16px; }
.image-placeholder { width:100%; max-width:400px; height:200px; background:var(--bg); border:2px dashed var(--border); border-radius:var(--radius); display:flex; align-items:center; justify-content:center; color:var(--text-muted); font-size:.85rem; margin-bottom:16px; }

.login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; background:var(--nav-bg); padding:24px; }
.login-box { background:var(--surface); border-radius:8px; padding:40px 44px; width:100%; max-width:420px; box-shadow:0 8px 32px rgba(0,0,0,.35); }
.login-logo { font-family:Georgia,serif; font-size:1.5rem; color:var(--accent); text-align:center; margin-bottom:4px; }
.login-subtitle { text-align:center; font-size:.9rem; color:var(--text-muted); margin-bottom:32px; }
.login-box .btn { width:100%; justify-content:center; padding:11px; }

.filter-bar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:20px; }
.filter-bar input,.filter-bar select { width:auto; min-width:140px; height:34px; padding:0 12px; font-size:.87rem; box-sizing:border-box; }
.filter-bar .btn { height:34px; padding:0 14px; font-size:.87rem; box-sizing:border-box; }

.thumb { width:48px; height:48px; object-fit:cover; border-radius:4px; border:1px solid var(--border); }
.thumb-placeholder { width:48px; height:48px; background:var(--bg); border:1px solid var(--border); border-radius:4px; display:flex; align-items:center; justify-content:center; color:var(--text-muted); font-size:.7rem; }

.sale-summary { background:var(--accent-light); border:1px solid var(--accent-line); border-radius:var(--radius); padding:18px 22px; margin-bottom:24px; display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px 24px; }
.sale-summary-item .label { font-size:.85rem; font-weight:500; color:var(--accent-dark); margin-bottom:2px; }
.sale-summary-item .value { font-family:Georgia,serif; font-size:1.2rem; color:var(--accent-dark); }


.dash-layout { display:grid; grid-template-columns:200px 1fr; gap:20px; align-items:stretch; margin-bottom:24px; }
.dash-stats { display:flex; flex-direction:column; gap:8px; }
.stat-card-v { display:flex; flex-direction:column; align-items:flex-start; padding:8px 12px; border-top:none; border-left:3px solid var(--accent); position:relative; }
.stat-card-v .stat-label { font-size:.8rem; line-height:1; }
.stat-card-v .stat-value { font-size:1.15rem; margin-top:3px; }
.stat-card-v .stat-value-sm { font-size:1rem; }
.stat-card-v .drag-grip { position:absolute; top:6px; right:8px; }
.dash-chart-card { padding:20px; display:flex; flex-direction:column; }
.dash-chart-header { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:16px; }
.dash-range-form { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.dash-range-form select, .dash-range-form input[type=date] { font-size:.82rem; padding:5px 8px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text); }
.dash-chart-checks { display:flex; flex-wrap:wrap; gap:6px 18px; margin-top:14px; padding-top:14px; border-top:1px solid var(--border-light); }
.dash-check { display:flex; align-items:center; gap:6px; font-size:.82rem; cursor:pointer; user-select:none; color:var(--text-muted); }
.dash-check input { accent-color:var(--accent); cursor:pointer; flex-shrink:0; }
.stat-now { font-size:.72rem; font-weight:500; background:var(--border-light); color:var(--text-muted); border-radius:3px; padding:0 4px; vertical-align:middle; }
.drag-grip { font-size:1rem; color:#8a8a8a; /* >=3:1 on white (was --border, ~1.4:1) */ cursor:grab; padding:0 2px; user-select:none; transition:color .15s; flex-shrink:0; }
.stat-card-v:hover .drag-grip { color:var(--text-muted); }
.drag-grip:active { cursor:grabbing; }


.breadcrumb { font-size:.92rem; color:color-mix(in srgb, var(--text-muted) 50%, var(--text)); margin-bottom:20px; }
.breadcrumb a { color:inherit; text-decoration:underline; }
.breadcrumb a:hover { color:var(--accent); }
.breadcrumb .sep { margin:0 6px; }

.empty-state { text-align:center; padding:48px 24px; color:var(--text-muted); }
.empty-state .empty-icon { color:var(--border); line-height:0; margin-bottom:14px; }
.empty-state p { margin-bottom:16px; }

#toast-container { position:fixed; bottom:24px; right:24px; z-index:9999; display:flex; flex-direction:column; gap:10px; pointer-events:none; }
.toast { background:var(--surface); border:1px solid var(--border); border-left:4px solid; border-radius:var(--radius); padding:12px 16px; min-width:260px; max-width:380px; box-shadow:0 4px 20px rgba(0,0,0,.15); font-size:.88rem; pointer-events:all; display:flex; align-items:flex-start; gap:10px; animation:toast-in .25s ease; }
.toast-success { border-left-color:var(--green); color:var(--green); }
.toast-error   { border-left-color:var(--red);   color:var(--red); }
.toast-info    { border-left-color:var(--blue);   color:var(--blue); }
.toast-warning { border-left-color:var(--orange); color:var(--orange); }
.toast-msg { flex:1; color:var(--text); }
.toast-close { cursor:pointer; font-size:.8rem; line-height:1.4; color:var(--text-muted); background:none; border:none; padding:0; flex-shrink:0; }
.toast-close:hover { color:var(--text); }
@keyframes toast-in { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }

/* Small confirm dialog (unsell, reverse sale): the overlay keeps an inline display:none that the page script toggles. */
.confirm-overlay { position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:1000; align-items:center; justify-content:center; }
.confirm-card { background:var(--surface); border-radius:8px; padding:28px; max-width:460px; width:90%; max-height:90vh; max-height:90dvh; overflow-y:auto; box-shadow:0 4px 24px rgba(0,0,0,.2); }
.confirm-card h3 { margin:0 0 8px; }
.confirm-card > p { font-size:.9rem; color:var(--text-muted); margin-bottom:16px; }

/* Exhibition picker inside .confirm-card (artworks list > With selected > Add to exhibition): one radio row per exhibition. */
.exhibition-choice-list { display:flex; flex-direction:column; gap:6px; max-height:50vh; overflow-y:auto; }
.exhibition-choice { display:flex; align-items:center; gap:10px; padding:9px 12px; border:1px solid var(--border); border-radius:var(--radius); cursor:pointer; }
.exhibition-choice:hover { background:var(--border-light); }
.exhibition-modal-actions { display:flex; gap:10px; margin-top:16px; }
/* "With selected" dropdown on the artworks list: sized to its longest option (not full width) so Apply sits right after it. */
.bulk-select { width:auto; font-size:.85rem; }
.exhibition-new-fields { display:flex; flex-direction:column; gap:12px; margin-top:12px; }
.exhibition-new-fields[hidden] { display:none; }
.exhibition-new-dates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.exhibition-new-fields .form-group + .form-group { margin-top:0; }
.exhibition-choice-name { flex:1; min-width:0; overflow-wrap:anywhere; }

.picker-modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:900; align-items:center; justify-content:center; }
.picker-modal-overlay.open { display:flex; }
.picker-modal { background:#fff; border-radius:8px; width:min(92vw,800px); max-height:82vh; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 8px 32px rgba(0,0,0,.18); }
.picker-modal-header { padding:14px 20px; border-bottom:1px solid var(--border-light); display:flex; align-items:center; gap:12px; }
.picker-modal-header h3 { flex:1; font-size:1rem; margin:0; }
.picker-body { flex:1; overflow-y:auto; padding:16px 20px; }


.table-tabs { display:flex; gap:4px; padding-left:12px; margin:8px 0 -1px; position:relative; z-index:1; }   /* tabs attached to the top of the table card below */
.table-tabs a { padding:9px 22px; border:1px solid var(--border); border-bottom:0; border-radius:var(--radius) var(--radius) 0 0; background:var(--bg); color:var(--text-muted); font-size:.9rem; text-decoration:none; }
.table-tabs a:hover { color:var(--text); }
.table-tabs a.on { background:var(--th-bg); color:var(--text); font-weight:600; }   /* same tint as the table header it joins */
.table-tabs + div > .card { border-top-left-radius:0; }   /* the card sits inside #sales-panel */
.pagination-bar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:16px; scroll-margin-top:70px; }
.pagination-label { font-size:.85rem; font-weight:normal; color:var(--text-muted); }   /* the "Paginate at" label: plain weight, not the medium-weight form-label style */
.pagination-info { font-size:.82rem; color:var(--text-muted); flex:1; min-width:160px; }
.pagination-controls { display:flex; gap:4px; flex-wrap:wrap; }
.page-btn { display:inline-flex; align-items:center; justify-content:center; min-width:30px; height:30px; padding:0 8px; border-radius:var(--radius); border:1px solid var(--border); background:#fff; color:var(--text); font-size:.82rem; text-decoration:none; }
.page-btn:hover { border-color:var(--accent); color:var(--accent); text-decoration:none; }
.page-btn.active { background:var(--accent-light, #f5edd8); border-color:var(--accent-line, #d4ad50); color:var(--accent-dark, #6a4f0e); font-weight:600; }   /* selection = muted brand tint + muted outline */
.page-btn.disabled { opacity:.4; pointer-events:none; }

#scroll-top { position:fixed; bottom:80px; right:24px; width:38px; height:38px; border-radius:50%; background:var(--surface); border:1px solid var(--border); box-shadow:var(--shadow); cursor:pointer; display:flex; align-items:center; justify-content:center; color:var(--text-muted); opacity:0; visibility:hidden; transition:opacity .2s,visibility .2s,background .15s,color .15s; z-index:500; }
#scroll-top.scroll-top-visible { opacity:1; visibility:visible; }
#scroll-top:hover { background:var(--accent-light); color:var(--accent); border-color:var(--accent); }

/* Image drop zone (artwork_add / artwork_edit) */
.drop-zone { border:2px dashed var(--border); border-radius:8px; padding:28px 20px; text-align:center; cursor:pointer; background:var(--bg); transition:border-color .15s,background .15s; display:flex; flex-direction:column; align-items:center; gap:6px; user-select:none; }
.drop-zone:hover, .drop-zone.drag-over { border-color:var(--accent); background:var(--accent-light); }
.drop-zone.has-file { border-color:var(--accent); border-style:solid; background:var(--accent-light); }
.drop-zone-icon { color:var(--text-muted); line-height:0; }
.drop-zone-text { font-size:.9rem; color:var(--text); }
.drop-zone-hint { font-size:.78rem; color:var(--text-muted); }

/* Profile page: other cards in a grid (left), the tall Notification Preferences card beside them (right) */
.profile-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:24px; align-items:start; }
.profile-layout-single { grid-template-columns:minmax(0,1fr); }
.profile-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:24px; align-items:start; }

/* Notification bell (core/notifications.php, includes/nav.php). One panel shared by a desktop bell (in .nav-right)
   and a mobile bell (beside the hamburger). The panel uses the page's light surface, not the nav colours. */
.nav-bell { position:relative; display:flex; align-items:center; background:none; border:none; cursor:pointer; color:var(--nav-text); padding:7px; border-radius:var(--radius); transition:background .15s,color .15s; }
.nav-bell:hover { background:var(--nav-hover); color:var(--nav-hover-text); }
.nav-bell-mobile { display:none; }
.nav-bell-badge { position:absolute; top:0; right:0; min-width:16px; height:16px; padding:0 4px; border-radius:99px; background:var(--red); color:#fff; font-size:.7rem; font-weight:600; line-height:16px; text-align:center; }
.nav-bell-badge[hidden] { display:none; }
.nav-notif-panel { display:none; position:absolute; top:100%; right:12px; width:380px; max-width:calc(100vw - 24px); background:var(--surface); color:var(--text); border:1px solid var(--border); border-top:none; border-radius:0 0 var(--radius) var(--radius); box-shadow:0 6px 18px rgba(0,0,0,.25); z-index:200; }
.nav-notif-panel.open { display:block; }
.nav-notif-head { display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-bottom:1px solid var(--border-light); font-size:.9rem; }
.nav-notif-head-actions { display:flex; align-items:center; gap:10px; }
.nav-notif-compose { display:flex; align-items:center; background:none; border:none; padding:2px; border-radius:var(--radius); color:var(--text-muted); cursor:pointer; }
.nav-notif-compose:hover { color:var(--accent); background:var(--accent-light); }
.nav-notif-msg { white-space:pre-line; color:var(--text); }
.msg-modal { width:min(92vw,460px); }
/* Payment settings: "Apply for Paytrail" link under the credentials form and its modal (wider than a message modal) */
.paytrail-apply-link { margin-top:12px; }
.paytrail-apply-modal { width:min(92vw,720px); }
.paytrail-apply-modal input[readonly] { background:var(--bg); color:var(--text-muted); cursor:default; }
.paytrail-activate-confirm { display:flex; align-items:center; gap:8px; margin-top:14px; font-size:.9rem; color:var(--text); cursor:pointer; }
.msg-modal-meta { display:flex; justify-content:space-between; gap:12px; margin-top:4px; }
.msg-modal-error { margin:8px 0 0; color:var(--red); font-size:.85rem; }
.msg-modal-error[hidden] { display:none; }
.msg-modal-foot { display:flex; justify-content:flex-end; gap:8px; padding:12px 20px; border-top:1px solid var(--border-light); }
.bc-table { margin-top:10px; }
.bc-table th, .bc-table td { padding:6px 10px; text-align:right; white-space:nowrap; }
.bc-table th:first-child { text-align:left; font-weight:500; white-space:normal; }
.bc-table thead th { font-size:.78rem; color:var(--text-muted); font-weight:500; }
.bc-example th, .bc-example td { color:color-mix(in srgb, var(--text-muted) 65%, var(--surface)); font-weight:400; }
.bc-note { margin-top:10px; }
.sub-head-status { display:block; margin-top:2px; font-family:'Segoe UI',system-ui,-apple-system,sans-serif; font-size:.9rem; color:var(--text); }
.sub-head-status-muted { font-size:.95rem; color:var(--text-muted); }
.bc-panel { scroll-margin-top:90px; /* the sticky nav would otherwise cover it when jumped to (#billing-card) */ border:1px solid var(--border-light); border-radius:var(--radius); background:var(--bg); margin-top:16px; padding:13px 16px; }
.bc-panel-solo { border:0; background:none; margin-top:0; padding:0; }
.bc-panel-title { font-weight:500; font-size:.9rem; margin-bottom:6px; }
.bc-expired { color:var(--red); font-size:.85rem; margin:2px 0 0; }
.bc-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.nav-notif-markread { background:none; border:none; color:var(--accent); cursor:pointer; font-size:.8rem; padding:0; }
.nav-notif-markread:hover { color:var(--accent-dark); text-decoration:underline; }
.nav-notif-markread[hidden] { display:none; }
.nav-notif-list { max-height:min(420px, 60vh); overflow-y:auto; }
.nav-notif-item { padding:10px 14px; border-bottom:1px solid var(--border-light); border-left:3px solid transparent; color:var(--text); font-size:.85rem; line-height:1.4; }
.nav-notif-item:hover { background:var(--row-hover); }
.nav-notif-item.is-unread { border-left-color:var(--accent); background:var(--accent-light); }
.nav-notif-item.is-unread .nav-notif-title { font-weight:600; }
.nav-notif-item.is-failed .nav-notif-title { color:var(--red); }
.nav-notif-main { display:block; color:inherit; text-decoration:none; }
.nav-notif-main:hover { color:inherit; text-decoration:none; }
.nav-notif-title, .nav-notif-detail { display:block; overflow-wrap:anywhere; }
.nav-notif-detail { color:var(--text-muted); font-size:.8rem; }
.nav-notif-foot { display:flex; justify-content:space-between; align-items:baseline; gap:10px; margin-top:2px; }
.nav-notif-time { color:var(--text-muted); font-size:.75rem; }
.nav-notif-actions { color:var(--text-muted); font-size:.72rem; white-space:nowrap; }
.nav-notif-actions button { background:none; border:none; padding:0; font:inherit; color:var(--text-muted); cursor:pointer; text-decoration:underline; }
.nav-notif-actions button:hover { color:var(--accent); }
.nav-notif-empty { padding:18px 14px; color:var(--text-muted); font-size:.85rem; }
.nav-notif-all { display:block; padding:10px 14px; text-align:center; font-size:.85rem; border-top:1px solid var(--border-light); }
.notif-page { padding:0; overflow:hidden; }
.notif-page .nav-notif-item:last-child { border-bottom:none; }
.notif-pager { display:flex; gap:16px; align-items:center; justify-content:center; margin:14px 0; font-size:.88rem; }

/* Hamburger nav. Kicks in at 1024px, not 768px: with ~10 links plus the right-hand group the desktop bar overflows on tablets in portrait. */
@media (max-width:1024px) {
  .nav { padding:0 12px; flex-wrap:wrap; }
  .nav-toggle { display:flex; margin-left:0; }
  .nav-bell-mobile { display:flex; margin-left:auto; }
  .nav-bell-desktop { display:none; } /* the mobile bell beside the hamburger replaces it */
  .nav-notif-panel { left:0; right:0; width:auto; max-width:none; border-left:none; border-right:none; border-radius:0; }
  .nav-links { display:none; flex:none; width:100%; }
  .nav-right { display:none; flex:none; width:100%; margin-left:0; }
  .nav-open .nav-links { display:flex; flex-direction:column; border-top:1px solid var(--nav-m-line); }
  .nav-open .nav-right { display:flex; flex-direction:column; align-items:stretch; gap:0; padding:0; border-top:1px solid var(--nav-m-line); }
  /* right-hand links (Help, Audit log, Profile, Log out) become full-width rows like the main links */
  .nav-right a { padding:13px 16px; font-size:.9rem; border-radius:0; border-bottom:1px solid var(--nav-m-line); }
  .nav-right .nav-logout { padding:13px 16px !important; border-width:0 0 1px 0; text-align:left; font-size:.9rem; }
  .nav-links a { height:auto; padding:13px 16px; border-bottom:1px solid var(--nav-m-line); font-size:.9rem; }
  .nav-dropdown { display:flex; flex-direction:column; align-items:stretch; position:static; }
  .nav-dropdown-toggle { height:auto; padding:13px 16px; border-bottom:1px solid var(--nav-m-line); font-size:.9rem; }
  .nav-dropdown-menu { position:static; border:none; box-shadow:none; min-width:auto; background:var(--nav-m-menu-bg); }
  .nav-dropdown-menu a { padding:11px 28px; border-bottom:1px solid var(--nav-m-menu-divider); font-size:.9rem; }
  .nav-right .nav-dropdown { width:100%; align-items:stretch; }
  .nav-right .nav-dropdown-toggle { padding:13px 16px; font-size:.9rem; border-radius:0; }
  .nav-right .nav-dropdown-menu { position:static; }
  .nav-right .nav-dropdown-menu a { padding:11px 28px; font-size:.9rem; border-bottom:1px solid var(--nav-m-menu-divider); }
}

@media (max-width:768px) {
  .profile-layout { grid-template-columns:minmax(0,1fr); }
  .av-grid { grid-template-columns:minmax(0,1fr); } /* artwork_view: image above details */
  .page-wrapper { padding:20px 14px 40px; }
  .form-grid, .form-grid.cols-2 { grid-template-columns:1fr; }
  .sale-line { grid-template-columns:1fr 1fr; }
  .sale-line .form-group:first-child { grid-column:1/-1; }
  .card-grid-2-1 { grid-template-columns:1fr; }
  .dash-layout { grid-template-columns:1fr; }
  .dash-stats { display:grid; grid-template-columns:repeat(2,1fr); }
  .stat-card-v { border-left:none; border-top:3px solid var(--accent); }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .login-box { padding:28px 22px; }
  .page-header { flex-direction:column; align-items:flex-start; }
}

/* Respect the OS "reduce motion" setting: no smooth scroll or slide effects. */
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; }
}
.avatar-circle { width:64px; height:64px; border-radius:50%; object-fit:cover; border:1px solid var(--border-light); flex-shrink:0; }
.avatar-circle.avatar-sm { width:36px; height:36px; }
img.avatar-circle { display:block; }
.avatar-circle.avatar-initials { display:flex; box-sizing:border-box; line-height:1; align-items:center; justify-content:center; background:var(--accent-light); color:var(--accent-dark); font-size:1.3rem; }
.avatar-circle.avatar-sm.avatar-initials { font-size:.8rem; }
dd.dd-trunc { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── Documents: segmented two-way choice (Send dialog From / How; Sent tab Group by) ── */
/* Segmented two-way choice (same shape as Portrait | Landscape in the label editor): the chosen side uses the muted brand tint; primary actions keep the full brand colour. */
.gd-seg { display: inline-flex; width: max-content; max-width: 100%; border: 1px solid var(--border-light, #cfc9be); border-radius: 8px; overflow: hidden; background: #fff; }
.gd-seg-btn { display: inline-flex; align-items: center; padding: 6px 14px; border: 0; border-right: 1px solid var(--border-light, #cfc9be); background: transparent; color: inherit; font: inherit; font-size: .85rem; cursor: pointer; }
.gd-seg-btn:last-child { border-right: 0; }
.gd-seg-btn:hover { background: #f3efe7; }
.gd-seg-btn[aria-pressed="true"] { background: var(--accent-light, #f5edd8); color: var(--accent-dark, #6a4f0e); font-weight: 600; }
.gd-seg-btn:focus-visible { outline: 2px solid var(--accent-line, #d4ad50); outline-offset: -2px; }

/* ── Documents: Sent tab (modules/gallery_documents/_sent.php, js/document-sent.js) ── */
.gd-sent-bar { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; margin-bottom: 12px; }
.gd-sent-bar label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 4px; }
.gd-sent-bar select { min-width: 170px; max-width: 260px; }
.gd-sent-count { margin-left: auto; font-size: .85rem; color: var(--text-muted); }
.gd-sent-group { margin-bottom: 12px; }
.gd-sent-group > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.gd-sent-group[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.gd-sent-group > summary::-webkit-details-marker { display: none; }
.gd-sent-gname { font-weight: 600; }
.gd-sent-gmeta { font-size: .82rem; color: var(--text-muted); }
.gd-sent-gcount { margin-left: auto; font-size: .82rem; color: var(--text-muted); white-space: nowrap; }
.gd-sent-group .table-wrap { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 8px 8px; background: var(--surface); }
.gd-sent-sub { display: block; font-size: .82rem; color: var(--text-muted); }
.gd-sent-none { padding: 16px; color: var(--text-muted); }
.gd-sent-when { white-space: nowrap; }

/* ── Open calls module settings (modules/open_calls/settings.php, js/open-calls-settings.js) ── */
.oc-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.oc-tab-btn { padding: 10px 18px; border: none; background: none; cursor: pointer; font-size: .95rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.oc-tab-btn.active { color: var(--accent-dark, #6a4f0e); border-bottom-color: var(--accent-line, #d4ad50); font-weight: 600; }
.oc-tab-panel[hidden] { display: none; }
.oc-card { max-width: 820px; margin-bottom: 24px; }
.oc-card .text-muted { margin-bottom: 14px; }
.oc-copy-wrap { display: flex; align-items: center; gap: 6px; }
.oc-copy-wrap input { min-width: 0; flex: 1; font-family: monospace; font-size: .85rem; }
.oc-copy-btn { flex-shrink: 0; width: 30px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text-muted); font-size: 1rem; line-height: 1; cursor: pointer; }
.oc-copy-btn:hover { border-color: var(--accent); color: var(--text); }
.oc-copy-btn.copied { border-color: var(--green); color: var(--green); }
.oc-reveal-box { margin: 10px 0; padding: 12px 14px; border: 1px solid var(--accent, #0e6e85); border-radius: var(--radius); background: var(--bg-alt, #f7fbfc); }
.oc-reveal-box[hidden] { display: none; }
.oc-reveal-box .sub-body { margin-bottom: 6px; }
.oc-reveal-box .btn { margin-top: 8px; }
.oc-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.oc-docs { max-width: 820px; }
.oc-docs h2 { margin: 28px 0 12px; font-family: Georgia, serif; font-size: 1.2rem; font-weight: normal; color: var(--accent-dark); padding-bottom: 8px; border-bottom: 1px solid var(--border-light); }
.oc-docs h2:first-child { margin-top: 0; }
.oc-docs p, .oc-docs ul, .oc-docs ol { margin: 0 0 12px; line-height: 1.7; }
.oc-docs ul, .oc-docs ol { padding-left: 22px; }
.oc-docs .table-wrap { margin-bottom: 12px; }
.oc-pre { margin: 8px 0 14px; padding: 10px 14px; background: var(--bg-alt, #f7fbfc); border-radius: var(--radius); overflow-x: auto; }

/* Voting add-on (modules/exhibitions/voting.php) */
.vote-card { margin-bottom: 24px; }
.vote-option { margin: 16px 0 4px; }
/* Voting: the saved look, previewed on a picture-coloured strip */
.vote-style { margin-top: 24px; }
.vote-preview { display: flex; gap: 24px; padding: 20px; background: #c9c3b6; border-radius: var(--radius); }
.vote-preview-item { display: inline-block; --vs: 36px; }
.vote-btn.vp-btn { --vs: 36px; }
/* Look of the button: settings on the left, the colours table on the right; one column on a narrower screen */
.vote-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; column-gap: 48px; }
@media (max-width: 1100px) { .vote-cols { grid-template-columns: minmax(0, 1fr); } }
.vote-group { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.vote-grid { grid-template-columns: repeat(auto-fill, 160px); margin-top: 14px; }   /* the site's .form-grid with fixed narrow columns, so every row's fields line up */
.vote-group > .vote-grid:first-child { margin-top: 0; }
.vote-group .check-label { display: inline-flex; align-items: center; gap: 8px; }
.vote-colours { width: 100%; }
/* The Colours table reads as part of the form: its header is a field label (as "Text", "Voted" beside it), not the site's shaded table header, and the first column lines up with the fields' left edge */
.vote-colours thead th { background: none; padding: 0 20px 8px 0; border-bottom: 1px solid var(--border-light); font-size: .85rem; }
.vote-colours td { padding-left: 0; padding-right: 20px; }
.vote-colours input[type=color] { width: 44px; height: 28px; padding: 0; }
.vote-same { font-size: .8rem; color: var(--text-muted); }
#vote-form [hidden] { display: none !important; }   /* a setting that doesn't apply to the current choices (js/voting-settings.js): the classes above set display, which would otherwise beat the hidden attribute */
.vote-status { margin: 16px 0 0; font-size: .85rem; color: var(--text-muted); }
.vote-status.is-error { color: var(--red, #c0392b); }
.vote-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }   /* both settings on one row */
.vote-limit-label { display: flex; align-items: center; gap: 10px; font-weight: normal; }
.vote-limit-text small { display: block; color: var(--text-muted); }   /* "(0 = no limit)" on its own line */
.vote-limit-label input { width: 70px; }
.vc-plot { position: relative; height: 260px; }
.vc-artworks { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.vc-chips-h { font-size: .75rem; color: var(--text-muted); margin-bottom: 8px; }
.vc-chips + .vc-chips-h { margin-top: 12px; }
.vc-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow-y: auto; }
.vc-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; font: inherit; font-size: .8rem; cursor: pointer; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; }
.vc-chip:focus-visible { outline: 2px solid var(--ic); outline-offset: 2px; }
.vc-chip-sw { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--ic); }
.vc-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-chip-n { font-variant-numeric: tabular-nums; }
.vc-chip[aria-pressed="true"] { color: var(--text); background: var(--surface); border-color: var(--ic); }
.vc-chip[aria-pressed="true"] .vc-chip-sw { background: var(--ic); }
/* Vote for this artist (modules/exhibitions/voting.php, js/voting-artists.js) */
.va-group th { background: var(--bg); font-weight: 600; text-align: left; }
.va-link-cell { width: 50%; }
.va-qr-cell { width: 1%; white-space: nowrap; }
.va-row { display: flex; align-items: center; gap: 8px; }
.va-link { flex: 1; min-width: 0; }
.va-qr { background: #fff; }
/* ── Access matrix (core/access.php renderAccessMatrix, js/access-matrix.js) ── */
.am { border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:var(--surface); }
.am-row { display:grid; grid-template-columns:minmax(0, 1fr) 64px 64px; align-items:center; min-height:38px; padding:0 14px; border-bottom:1px solid var(--border); font-size:.9rem; }
.am-kids .am-row:last-child, .am > .am-row:last-child { border-bottom:0; }
.am-row:not(.am-th):hover { background:var(--bg); }
.am-th { min-height:34px; background:var(--bg); color:var(--text-muted); font-size:.78rem; font-weight:500; }
.am-c { text-align:center; }
.am-row input[type=checkbox] { margin:0; cursor:pointer; }
.am-lbl { display:flex; align-items:center; gap:6px; min-width:0; }
.am-grp { font-weight:500; }
.am-d1 { padding-left:22px; }
.am-d2 { padding-left:44px; }
.am-d3 { padding-left:66px; }
.am-sp { display:inline-block; width:24px; flex-shrink:0; }
.am-chev { background:none; border:none; cursor:pointer; color:var(--text-muted); padding:2px 6px; border-radius:var(--radius); }
.am-chev:hover { color:var(--accent); }
.am-chev[aria-expanded="true"] .chev { transform:rotate(90deg); }
.am-dash, .am-note { color:var(--text-muted); }
.am-note { font-size:.75rem; }
.am-locked .am-lbl { color:var(--text-muted); }
.am-off { opacity:.55; }
.am-off input, .am-off .am-chev { cursor:default; }
.am-off .am-chev { pointer-events:auto; }
.access-default-cb { margin-bottom:8px; }
/* Collapsible card (Users page: Assistant access, Invite new user; same look as the role-group cards: card header strip, body joined underneath) */
.collapse-card > summary { cursor:pointer; list-style:none; display:flex; align-items:center; }
.collapse-card > summary::-webkit-details-marker { display:none; }
.collapse-card-head { flex:1; display:flex; align-items:center; gap:8px; padding:12px 16px; }
.collapse-card-title { font-weight:600; }
.collapse-card-head .chev { margin-left:auto; color:var(--text-muted); }
.collapse-card-body { border-top:0; border-top-left-radius:0; border-top-right-radius:0; }
.am-hint { margin-bottom:12px; }
.access-group { margin-bottom:12px; }
/* Users page: page stack, and every card on it in one column, capped in width */
.su-stack { display:flex; flex-direction:column; gap:24px; max-width:820px; }
.su-stack > .card, .su-stack > .user-groups-wrap, .su-stack > .empty-state { margin:0; }
.user-groups-wrap { display:flex; flex-direction:column; gap:24px; }
