:root {
  --bg: #f4f5f8;
  --panel: #fff;
  --nav: #2b2f3a;
  --nav-ink: #c9cdd8;
  --line: #e3e6ee;
  --line-strong: #cfd4e0;
  --text: #1b1e27;
  --muted: #6a7184;
  --accent: #2f6bff;
  --accent-ink: #1f55e0; /* the accent hovered */
  --accent-soft: #eaf0ff;
  --accent-text: #1f55e0; /* the accent as text on white */
  --on-accent: #fff; /* text on the accent */
  --ring: var(--accent); /* a selected item's outline */
  --danger: #d23b3b;
  --success: #18865a;
  --k-image: #6f8cff;
  --k-video: #2bb38a;
  --k-pdf: #f0a03c;
  --k-other: #a0a6b6;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
/* each shop's colours, from its PS9 theme tokens (themes/<theme>/.dev/style/sass/_theme_variables.scss) */
[data-site="mariejeanne"] { --nav: #15141a; --accent: #f9e800; --accent-ink: #e6d600; --accent-soft: #fffad0; --accent-text: #15141a; --on-accent: #15141a; --ring: #15141a; }
[data-site="cigaretteelec"] { --nav: #1c1528; --accent: #ed6624; --accent-ink: #d4561a; --accent-soft: #fdeee6; --accent-text: #c24f17; --on-accent: #fff; --ring: #ed6624; }
[data-site="sport-orthese"] { --nav: #091e42; --accent: #0096e6; --accent-ink: #007fc4; --accent-soft: #e5f4fd; --accent-text: #0073b3; --on-accent: #fff; --ring: #0096e6; }
[data-site="valebio"] { --nav: #465041; --accent: #697b63; --accent-ink: #56664f; --accent-soft: #eef1ec; --accent-text: #4f5e4a; --on-accent: #fff; --ring: #697b63; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font: 13px/1.45 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }

.app { display: grid; grid-template-columns: 236px minmax(0, 1fr) auto; height: 100vh; }

/* navigation: the shop spaces, the trash, the usage */
.nav { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; background: var(--nav); color: var(--nav-ink); overflow: auto; }
.brand { font-size: 16px; font-weight: 800; color: #fff; text-decoration: none; padding: 0 8px 12px; }
.nav__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; color: var(--nav-ink); text-decoration: none; }
.icon { width: 16px; height: 16px; flex: none; }

/* the shop switcher: the shop shown, a click lists the four */
.switch { position: relative; }
.switch__btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 9px; background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; text-align: left; }
.switch__btn:hover, .switch__btn[aria-expanded="true"] { background: rgba(255, 255, 255, .12); }
.switch__btn .icon { margin-left: auto; color: var(--nav-ink); }
.switch__text { display: grid; min-width: 0; flex: 1 1 auto; }
.switch__text .space__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 7px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 14px; }
.spaces { position: absolute; z-index: 35; top: calc(100% + 6px); left: 0; right: 0; list-style: none; margin: 0; padding: 4px; display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 64, .28); }
.nav .spaces a { color: var(--text); padding: 6px; }
.nav .spaces a:hover, .nav .spaces a:focus { background: var(--bg); color: var(--text); outline: none; }
.nav .spaces a.is-on { background: none; color: var(--text); font-weight: 400; }
.nav .spaces a.is-on:hover, .nav .spaces a.is-on:focus { background: var(--bg); }
.spaces .switch__text .space__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spaces a .icon { margin-left: auto; color: var(--muted); }
.spaces .space__meta { color: var(--muted); }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.is-on { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
.space__name { display: block; }
.space__meta { display: block; font-size: 11.5px; color: #8b91a3; }
/* the bottom of the menu: the trash, the usage and logging out, then what is used and the guide, at the very end */
.nav__foot { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.nav__links { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .08); }
.nav__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px; background: none; color: var(--nav-ink); font: inherit; text-align: left; cursor: pointer; }
.nav__item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav__item:focus-visible { outline: 2px solid rgba(255, 255, 255, .5); outline-offset: -2px; }
/* what the sites shown hold, together: on as many lines as it takes, never cut */
.nav__usage { margin: 0; padding: 0 8px; font-size: 12px; line-height: 1.4; color: #8b91a3; overflow-wrap: anywhere; }

.btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; cursor: pointer; font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--text); }
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn:disabled { opacity: .45; cursor: default; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover:not(:disabled) { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover:not(:disabled) { background: var(--bg); border-color: transparent; }
.btn--danger { color: var(--danger); }
.btn--small { height: 28px; padding: 0 10px; font-size: 12px; }
.btn--small .icon { width: 14px; height: 14px; }
.btn--icon { padding: 0; width: 28px; justify-content: center; }

.main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1 1 220px; font-weight: 600; font-size: 14px; overflow: hidden; }
.crumbs a { color: var(--muted); text-decoration: none; padding: 2px 4px; border-radius: 5px; white-space: nowrap; }
.crumbs a:hover { color: var(--accent-text); background: var(--accent-soft); }
.crumbs a:last-child { color: var(--text); }
.crumbs span { color: var(--line-strong); }
.search { flex: 0 1 300px; }
.search input { width: 100%; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--bg); }
.head__acts { display: flex; gap: 8px; flex-wrap: wrap; }

.tools { display: flex; align-items: center; gap: 12px; padding: 10px 20px; flex-wrap: wrap; }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chips button { height: 28px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; cursor: pointer; font-size: 12px; }
.chips button[aria-checked="true"] { background: var(--text); border-color: var(--text); color: #fff; font-weight: 600; }
.here { margin: 0; color: var(--muted); font-size: 12px; flex: 1 1 200px; }
.tools__end { display: flex; align-items: center; gap: 8px; }
.tools select { height: 28px; padding: 0 28px 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 12px; }
/* selects drawn alike everywhere: the words from the left edge, the chevron inside the right padding */
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a7184' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 14px; cursor: pointer; }
.tools .btn--small, .seg button { display: inline-flex; align-items: center; gap: 6px; }
.seg .icon, .tools .btn--small .icon { width: 14px; height: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 7px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 0 10px; height: 26px; cursor: pointer; font-size: 12px; }
.seg button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }

.selbar { display: flex; align-items: center; gap: 8px; margin: 0 20px 8px; padding: 6px 10px; background: var(--accent-soft); border-radius: var(--radius); flex-wrap: wrap; }
.selbar > span { font-weight: 600; margin-right: 8px; }

.files { flex: 1 1 auto; overflow: auto; padding: 4px 20px 32px; outline: none; }
.section-title { margin: 12px 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.item { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); cursor: default; user-select: none; overflow: hidden; }
.item:hover { border-color: var(--line-strong); }
.item--dir { cursor: pointer; }
.item.is-selected { border-color: var(--ring); box-shadow: 0 0 0 2px var(--ring); }
.item__thumb { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: repeating-conic-gradient(#f2f3f7 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.item__thumb img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; display: block; } /* out of flow: a tall image never stretches its card */
.item__icon { display: grid; color: var(--muted); }
.item__icon .icon { width: 44px; height: 44px; stroke-width: 1.5; }
.item--dir .item__thumb { aspect-ratio: 16 / 10; background: var(--accent-soft); }
.item--dir .item__icon { color: var(--accent-text); }
.item--dir .item__icon .icon { fill: color-mix(in srgb, var(--accent) 22%, transparent); }
.item__name { padding: 8px 10px 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__meta { padding: 0 10px 8px; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__check { position: absolute; z-index: 1; top: 8px; left: 8px; width: 18px; height: 18px; accent-color: var(--ring); opacity: 0; cursor: pointer; }
.item:hover .item__check, .item.is-selected .item__check, .files.has-selection .item__check { opacity: 1; }

.list { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.list th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.list td { padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list tr.item { display: table-row; border: 0; box-shadow: none; }
.list tr.item.is-selected td { background: var(--accent-soft); }
.list .item__check { position: static; opacity: 1; }
.list .item__mini { width: 32px; height: 32px; object-fit: contain; vertical-align: middle; }
.list .item__icon { display: inline-grid; vertical-align: middle; }
.list .item__icon .icon { width: 22px; height: 22px; }
.list td.name .icon, .side__dir .icon, .picker button .icon { vertical-align: -3px; margin-right: 6px; color: var(--accent-text); }
.list td.name { max-width: 420px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.list td.num { text-align: right; color: var(--muted); }

.trash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.trash-head p { margin: 0; color: var(--muted); }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.drop { position: absolute; inset: 8px; border: 2px dashed var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent-soft) 90%, transparent); display: grid; place-items: center; font-size: 16px; font-weight: 600; color: var(--accent-text); pointer-events: none; }

/* usage: a bar per shop space, split by kind of file */
.usage { display: grid; gap: 14px; max-width: 900px; }
.usage__card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; }
.usage__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.usage__head strong { font-size: 14px; }
.usage__head span { color: var(--muted); }
.usage__head a { color: inherit; text-decoration: none; }
.usage__head a:hover { color: var(--accent-text); }
.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--bg); }
.bar span { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.k-image { background: var(--k-image); }
.k-video { background: var(--k-video); }
.k-pdf { background: var(--k-pdf); }
.k-other { background: var(--k-other); }

.side { width: 360px; background: var(--panel); border-left: 1px solid var(--line); overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.side h2 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.side > * { flex-shrink: 0; } /* a column taller than the panel scrolls; its blocks never squeeze under each other */
.side__preview { border: 0; padding: 0; border-radius: var(--radius); background: repeating-conic-gradient(#f2f3f7 0% 25%, #fff 0% 50%) 50% / 16px 16px; display: grid; place-items: center; min-height: 160px; cursor: zoom-in; }
.side__preview img { max-width: 100%; max-height: 300px; display: block; }

/* the image viewer, over the whole page */
.viewer { position: fixed; inset: 0; z-index: 45; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #0e1016; color: #fff; outline: none; }
.viewer__bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.viewer__bar h2 { margin: 0; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__meta { flex: 1 1 auto; color: #a3a9b8; font-size: 12px; white-space: nowrap; }
.viewer__stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 64px 24px; } /* flex: the image's max-height resolves against the stage */
.viewer__stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; background: repeating-conic-gradient(#f2f3f7 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 32px; cursor: pointer; }
.viewer__nav:hover { background: rgba(255, 255, 255, .18); }
.viewer__nav--prev { left: 12px; }
.viewer__nav--next { right: 12px; }
.side dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 8px; margin: 0; font-size: 12.5px; }
.side dt { color: var(--muted); }
.side dd { margin: 0; overflow-wrap: anywhere; }
.side__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.side h3 { margin: 6px 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.field input[type="text"], .field input[type="password"], .field input[type="number"], .field select, .field textarea { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 7px; background-color: #fff; color: var(--text); }
.field select { padding: 0 28px 0 10px; }
.field textarea { height: auto; padding: 6px 8px; font-family: var(--mono); font-size: 11.5px; resize: vertical; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.checks { display: flex; gap: 14px; font-size: 12.5px; }
.copyrow { display: flex; gap: 6px; }
.copyrow input { flex: 1 1 auto; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 7px; font-family: var(--mono); font-size: 11.5px; background: var(--bg); }

.uploads { position: fixed; right: 16px; bottom: 16px; width: 340px; max-height: 50vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(16, 24, 64, .18); padding: 12px; z-index: 30; }
.uploads h4 { margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.up { display: grid; gap: 4px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12px; }
.up__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up progress { width: 100%; height: 6px; accent-color: var(--accent); }
.up.is-done .up__state { color: var(--success); }
.up.is-error .up__state { color: var(--danger); }

.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; }
.toast { background: #1b1e27; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.toast--error { background: #a12b2b; }

.ctx { position: fixed; z-index: 40; margin: 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 64, .18); min-width: 200px; }
.ctx button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.ctx button:hover, .ctx button:focus { background: var(--accent-soft); outline: none; }
.ctx .danger { color: var(--danger); }
.ctx .icon { width: 15px; height: 15px; color: var(--muted); }
.ctx .danger .icon { color: inherit; }
.ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

dialog { border: 0; border-radius: 12px; padding: 0; width: min(460px, calc(100% - 32px)); box-shadow: 0 24px 64px rgba(16, 24, 64, .3); }
dialog::backdrop { background: rgba(20, 24, 36, .38); }
.dlg { display: grid; gap: 12px; padding: 18px; }
.dlg h3 { margin: 0; font-size: 15px; }
.dlg p { margin: 0; color: var(--muted); }
.dlg input[type="text"] { height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; }
.dlg__acts { display: flex; justify-content: flex-end; gap: 8px; }
.picker { border: 1px solid var(--line); border-radius: 8px; max-height: 260px; overflow: auto; }
.picker button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 7px 10px; cursor: pointer; }
.picker button:hover { background: var(--accent-soft); }
.picker__here { font-weight: 600; padding: 6px 10px; background: var(--bg); font-size: 12px; }

.login-page { display: grid; place-items: center; background: var(--nav); }
.login { width: min(360px, calc(100% - 32px)); background: var(--panel); border-radius: 12px; padding: 24px; display: grid; gap: 14px; box-shadow: 0 24px 64px rgba(0, 0, 0, .3); }
.login h1 { margin: 0; font-size: 20px; }
.login__error { margin: 0; color: var(--danger); }

@media (max-width: 1000px) {
  .app { grid-template-columns: 200px minmax(0, 1fr); }
  .side { position: fixed; inset: 0 0 0 auto; width: min(360px, 100%); z-index: 20; box-shadow: -12px 0 40px rgba(16, 24, 64, .18); }
}
@media (max-width: 700px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .nav { display: none; }
}

/* the configuration: who may open the manager */
.config { display: grid; gap: 14px; max-width: 1080px; }
.config__card { container-type: inline-size; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 12px; min-width: 0; }
.config__card h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.config__lede { margin: 0; color: var(--muted); max-width: 70ch; }
.config__note { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--text); max-width: 80ch; }
.config__invite { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.config__invite .field { flex: 1 1 280px; max-width: 420px; }
.config__invite input { width: 100%; height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--text); font: inherit; }
.config .empty { padding: 0; text-align: left; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.people li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.people li .person { flex: 1 1 240px; }
.people__when { color: var(--muted); font-size: 12px; }
.people__acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.table-scroll { overflow-x: auto; }
.people__role { display: grid; }
.person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.person__pic { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--muted); font-weight: 700; font-size: 13px; object-fit: cover; }
.person__text { display: grid; min-width: 0; }
.person__text strong, .person__text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person__text span { color: var(--muted); font-size: 12px; }
.status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--muted); }
.status--approved { background: #e7f6ec; color: #1d7a3e; }
.status--refused { background: #fdecec; color: #b42318; }
.status--pending { background: #fff4e0; color: #9a5b00; }
.muted { color: var(--muted); font-size: 12px; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.nav a .badge { margin-left: auto; }

/* the sign-in: Google, or the password on a dev machine */
.login__lede { margin: 0; color: var(--muted); }
.login__google { display: flex; align-items: center; justify-content: center; gap: 10px; height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: #1f1f1f; font-weight: 600; text-decoration: none; }
.login__google:hover { background: #f6f7f9; }
.login__google:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.login__google svg { width: 18px; height: 18px; flex: none; }
.login__info { margin: 0; padding: 10px 12px; border-radius: 8px; background: #fff4e0; color: #6b4000; }
.login__info strong { display: block; margin-bottom: 2px; }
.login__form { display: grid; gap: 14px; }

/* the configuration: adding, approving, changing an access (role and sites) */
.config__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.roles { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 12.5px; }
.roles dt { font-weight: 600; }
.roles dd { margin: 0; color: var(--muted); }
.chips-sites { display: flex; flex-wrap: wrap; gap: 4px; }
.site-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 600; white-space: nowrap; }
dialog.dialog--wide { width: min(520px, calc(100% - 32px)); }
.dlg__error { margin: 0; color: var(--danger) !important; }
.grant { display: grid; gap: 14px; }
.grant .field input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--text); }
.grant__who { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.grant__set { margin: 0; padding: 0; border: 0; display: grid; gap: 6px; min-width: 0; }
.grant__set legend { padding: 0; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.choice > span { display: grid; gap: 1px; min-width: 0; }
.choice > span > span { color: var(--muted); font-size: 12px; }
.grant__sites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.choice--site { align-items: center; }
.choice--site input { margin: 0; }
.choice--site .mark { width: 24px; height: 24px; font-size: 12px; border-radius: 6px; }
.choice--site > span:last-child { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice.is-off { opacity: .5; cursor: default; }
.grant__note { margin: 0; font-size: 12px; }
@media (max-width: 480px) { .grant__sites { grid-template-columns: minmax(0, 1fr); } }

/* a person without a site yet */
.none { max-width: 520px; margin: 48px auto; padding: 24px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.none h2 { margin: 0 0 6px; font-size: 16px; }
.none p { margin: 0; color: var(--muted); }

/* the page Google's way back leads to while a request waits */
.access__who { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.access__state { margin: 0; padding: 12px 14px; border-radius: 9px; display: grid; gap: 4px; }
.access__state strong { font-size: 14px; }
.access__state p { margin: 0; }
.access__state--pending { background: #fff4e0; color: #6b4000; }
.access__state--approved { background: #e7f6ec; color: #14532d; }
.access__state--refused, .access__state--removed { background: #fdecec; color: #7a1a12; }
.access__links { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; }
.access__links a { color: var(--accent-text); }

/* the users: a row per person, four columns, stacked when the card is narrow */
.users { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.users__head, .user { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr) 150px 104px; align-items: center; gap: 14px; padding: 10px 12px; }
.users__head { padding-block: 8px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; }
.users__list { list-style: none; margin: 0; padding: 0; }
.user { border-top: 1px solid var(--line); }
.user .person { min-width: 0; }
.user__grant { display: grid; gap: 5px; justify-items: start; min-width: 0; }
.user__role { font-weight: 600; }
.user__role .muted { font-weight: 400; }
.user__access { display: grid; gap: 3px; justify-items: start; }
.user .people__acts { flex-wrap: nowrap; }
@container (max-width: 640px) {
  .users__head { display: none; }
  .user { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .user .person { grid-column: 1; grid-row: 1; }
  .user .people__acts { grid-column: 2; grid-row: 1; }
  .user__grant, .user__access { grid-column: 1 / -1; }
  .user__access { grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; }
}

/* a dev account: its shop's colours, its mark outlined; its production account's files tagged */
.mark--dev { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.switch__btn .mark--dev { color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.spaces__group { padding: 8px 6px 2px; margin-top: 2px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; background: var(--bg); color: var(--muted); font-size: 10.5px; font-weight: 600; line-height: 16px; vertical-align: 1px; }
.item__name { display: flex; align-items: center; min-width: 0; }
.item__name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__name .tag { flex: none; }
.side__note { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
