/* Site Fabrikası panel. One quiet, dense system: white modules on a grey ground, ruled by hairlines, square corners,
   a 13px semi-condensed gothic with a real title size. Red marks place and the one "new" action; ink is chrome and the
   primary button; status is always a tinted badge. Modules sit on a 1px lift; only things that float cast a shadow. */
/* Windows has no flag emoji glyphs: Twemoji's flags (country-flag-emoji-polyfill 0.1.10, MIT/CC-BY) draw them */
@font-face { font-family: Flags; font-display: swap; src: url(twemoji-flags.woff2) format("woff2"); unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E007F; }
@font-face { font-family: Archivo; font-weight: 400 700; font-stretch: 87.5%; font-display: swap; src: url(archivo-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Archivo; font-weight: 400 700; font-stretch: 87.5%; font-display: swap; src: url(archivo-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


:root {
  --bg: #fff; --fill: #f4f5f7; --wash: #f8f9fb; --ink: #14161a; --ink-2: #2a2d34; --soft: #5d636e; --line: #dcdfe4; --hair: #eceef1;
  --red: #d7001d; --red-dk: #a80017; --red-bg: #fdebed; --green: #087443; --green-bg: #e2f4ea;
  --blue: #1447b8; --blue-bg: #e6edfb; --amber: #8a5a00; --amber-bg: #fdf1d3;
  --pad: 16px; --gap: 16px; --ease: cubic-bezier(.16, 1, .3, 1);
  --lift: 0 1px 2px rgba(20, 22, 26, .05), 0 1px 1px rgba(20, 22, 26, .03);
  --float: 0 18px 48px -12px rgba(20, 22, 26, .35), 0 2px 6px rgba(20, 22, 26, .08);
  --mono: Flags, ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
::selection { background: var(--red); color: #fff; }
html { color-scheme: light; scrollbar-color: #c4c9d0 transparent; }
body { margin: 0; font: 13px/1.45 Flags, Archivo, "Helvetica Neue", Arial, sans-serif; font-stretch: 87.5%; background: var(--fill); color: var(--ink);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; caret-color: var(--red); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
code, pre { font-family: var(--mono); font-size: 12px; }
code { background: var(--fill); padding: 1px 4px; }
h1, h2, h3 { font-size: 13px; margin: 0; font-weight: 600; }
p { margin: 8px 0; }
hr { border: 0; border-top: 1px solid var(--hair); margin: var(--pad) calc(-1 * var(--pad)); }
svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mark { stroke: none; }
.muted, .hint { color: var(--soft); }
.hint { font-size: 12px; font-weight: 400; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
main, .side, .rail { scrollbar-width: thin; }

/* ---- shell: ink top bar, white rail, page on the grey ground, side column ---- */
body.app { display: grid; grid-template: 44px minmax(0, 1fr) / 216px minmax(0, 1fr) 312px; height: 100vh; overflow: hidden; }
.top { grid-column: 1 / -1; background: var(--ink); color: #fff; display: flex; align-items: center; padding: 0 14px 0 0; gap: 16px; }
.top .brand { width: 216px; padding: 0 18px; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: #fff; flex: none; }
.top .brand .mark { width: 16px; height: 17px; }
.top .brand:hover { text-decoration: none; }
.cmd { flex: 0 1 460px; height: 30px; background: #22252b; border: 1px solid #33373f; color: #aab0bb; display: flex; align-items: center; gap: 9px;
  padding: 0 6px 0 10px; font-weight: 400; line-height: normal; box-shadow: none; }
.cmd:hover { border-color: #555a66; color: #fff; background: #22252b; }
.cmd span { flex: 1; text-align: left; }
kbd { font: inherit; font-size: 11px; border: 1px solid #555a66; padding: 0 5px; line-height: 16px; }
.top .r { margin-left: auto; display: flex; gap: 16px; align-items: center; color: #c6cad2; white-space: nowrap; }
.top .r a { color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.top .r a:hover { color: #fff; text-decoration: none; }
.me i { width: 24px; height: 24px; display: grid; place-items: center; background: var(--red); color: #fff; font-style: normal; font-weight: 700; font-size: 12px; }
.top .r button { background: none; border: 1px solid #3c404a; color: #c6cad2; padding: 0 10px; line-height: 24px; font-weight: 500; box-shadow: none; }
.top .r button:hover { border-color: #aab0bb; color: #fff; background: none; }
.cap { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.cap i { width: 72px; height: 4px; background: #3c404a; display: block; }
.cap i b { display: block; height: 100%; background: #f0b429; }
.cap.full i b { background: #ff5a6e; }

.rail { background: var(--bg); border-right: 1px solid var(--line); padding: 14px 10px; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.rail a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; color: var(--ink); font-weight: 500; transition: background .12s, color .12s; }
.rail a > svg { color: #8a909b; transition: color .12s; }
.rail a:hover { background: var(--fill); text-decoration: none; }
.rail a:hover > svg { color: var(--ink); }
.rail a.on { background: var(--fill); font-weight: 600; box-shadow: inset 0 0 0 1px var(--hair); }
.rail a.on > svg { color: var(--red); }
.rail a em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; color: var(--soft); }
.rail a em + em { margin-left: 4px; }
.rail a em.att { display: none; color: var(--red); }
.rail a em.hot { background: var(--red); color: #fff; padding: 0 6px; line-height: 17px; }
.rail-new { height: 36px !important; margin: 0 0 14px; justify-content: center; gap: 8px !important; background: var(--red); color: #fff !important; font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(168, 0, 23, .3), inset 0 1px 0 rgba(255, 255, 255, .12); }
.rail-new:hover { background: var(--red-dk) !important; }
.rail-new svg { width: 14px; height: 14px; stroke-width: 2.5; color: #fff !important; }
.rail .more { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 1px; }
.rail .more summary { display: flex; align-items: center; gap: 6px; padding: 4px 10px 6px; font-size: 11px; color: var(--soft); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; width: auto; list-style: none; margin: 0; }
.rail .more summary::-webkit-details-marker { display: none; }
.rail .more summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform .15s var(--ease); }
.rail .more[open] summary::after { transform: rotate(45deg) translate(-2px, -1px); }
.rail .more summary:hover { text-decoration: none; color: var(--ink); }

main { background: var(--fill); overflow: auto; min-width: 0; padding: 0 28px 56px; }
.side { background: var(--bg); border-left: 1px solid var(--line); overflow: auto; }

/* ---- page head: a real title, its context beside it, actions on the right ---- */
.head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 24px 0 18px; position: sticky; left: 0; }
.head h1 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; }
.head .sub { color: var(--soft); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; padding-top: 3px; }
.head .sub strong { color: var(--ink); font-weight: 600; }
.x { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.x form { display: contents; }
.note { margin: 0 0 var(--gap); padding: 10px 14px; background: var(--bg); border: 1px solid var(--line); color: var(--soft); font-size: 12px; }

/* ---- modules: white panels on the grey ground, a quiet header row, room between them ---- */
.card { background: var(--bg); border: 1px solid var(--line); box-shadow: var(--lift); padding: var(--pad); margin: 0 0 var(--gap); min-width: 0; }
.card > h2:first-child, .card > form:first-child > h2:first-child {
  display: flex; align-items: center; min-height: 46px; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) var(--pad); padding: 0 var(--pad);
  border-bottom: 1px solid var(--hair); font-size: 13px; font-weight: 600; }
.card > .row:first-child:has(> h2) { min-height: 46px; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) var(--pad); padding: 0 12px 0 var(--pad);
  border-bottom: 1px solid var(--hair); flex-wrap: nowrap; gap: 10px; }
.card > .row:first-child > h2 + * { margin-left: auto; }
.card.flush, .card.table-scroll { padding: 0; }
.card.flush > h2:first-child, .card.table-scroll > h2:first-child { margin: 0; }
.card > :last-child, .card > form:last-child > :last-child { margin-bottom: 0; }
.card > p:first-child { margin-top: 0; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: var(--gap); align-items: start; }
.grid > .card { margin: 0; }
.narrow { max-width: 760px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.danger-zone { border-color: #efc3c9; }
.danger-zone > h2:first-child { color: var(--red); }
.empty { text-align: center; padding: 48px 16px; color: var(--soft); margin: 0; }
.empty a { font-weight: 600; }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); padding: 9px 12px;
  border-bottom: 1px solid var(--line); background: var(--wash); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
th:first-child, td:first-child { padding-left: var(--pad); }
th:last-child, td:last-child { padding-right: var(--pad); }
.card > table tr:last-child td, .card > .table-scroll:last-child tr:last-child td, .list > .table-scroll tr:last-child td { border-bottom: 0; }
.card:not(.flush, .table-scroll) > table, .card:not(.flush, .table-scroll) > .table-scroll { margin: 0 calc(-1 * var(--pad)); width: calc(100% + 2 * var(--pad)); }
.card:not(.flush, .table-scroll) > .table-scroll:last-child, .card:not(.flush, .table-scroll) > table:last-child { margin-bottom: calc(-1 * var(--pad)); }
.card > h2:first-child + .table-scroll, .card > h2:first-child + table, .card > .row:first-child + .table-scroll, .card > .row:first-child + table { margin-top: calc(-1 * var(--pad)); }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--wash); }
td.wrap { word-break: break-word; max-width: 340px; }
.table-scroll { overflow-x: auto; }
tr.flash-row { animation: rowflash 1.4s ease-out; }
@keyframes rowflash { from { background: var(--green-bg); } }

/* sites list: filter bar and table are one module */
.list { padding: 0; }
.sites td { white-space: nowrap; height: 48px; }
.sites th { position: sticky; top: 0; z-index: 1; }
.sites td:first-child { position: relative; width: 100%; min-width: 180px; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sites tbody tr:hover td:first-child, .sites tbody tr:focus-within td:first-child { box-shadow: inset 2px 0 0 var(--red); }
.sites .pills { flex-wrap: nowrap; }
.sites .pills .pill.ok ~ .pill.ok { display: none; }  /* in the list a working site says so once; problems always show */
.hov { position: absolute; right: 0; top: 0; bottom: 0; padding: 0 10px 0 28px; display: flex; align-items: center; gap: 4px; opacity: 0; transform: translateX(4px);
  transition: opacity .14s, transform .18s var(--ease); background: linear-gradient(90deg, transparent, var(--wash) 22px); }
.hov form { display: contents; }
tr:hover .hov, tr:focus-within .hov { opacity: 1; transform: none; }
.addr { display: inline-block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.sites tr[hidden] { display: none; }

/* ---- status badge ---- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; font-size: 12px; font-weight: 600; line-height: 20px; background: var(--fill); color: var(--soft); white-space: nowrap; }
.pill.ok::before, .pill.warn::before, .pill.err::before, .pill.run::before, .pill.no::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.ok { background: var(--green-bg); color: var(--green); }
.pill.warn { background: var(--amber-bg); color: var(--amber); }
.pill.err { background: var(--red-bg); color: var(--red); }
.pill.run { background: var(--blue-bg); color: var(--blue); }
.pill.run::before { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.bar { display: inline-block; width: 64px; height: 4px; background: var(--hair); vertical-align: 2px; margin-right: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 40%; background: var(--blue); animation: slide 1.3s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---- controls ---- */
label { display: block; font-weight: 600; font-size: 12px; margin: 14px 0 6px; }
label.inline { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; font-size: 13px; margin: 4px 16px 4px 0; }
label .hint { margin-left: 4px; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=file], input[type=url], input[type=number], input[type=date], input[type=tel], input:not([type]), textarea, select {
  width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 0; font: inherit; font-stretch: inherit; background: var(--bg); color: var(--ink);
  box-shadow: inset 0 1px 1px rgba(20, 22, 26, .03); transition: border-color .12s, box-shadow .12s; }
input:hover, textarea:hover, select:hover { border-color: #aab0ba; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }
textarea { resize: vertical; display: block; }
select { appearance: none; padding-right: 28px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d636e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 11px; }
input[type=checkbox] { appearance: none; width: 16px; height: 16px; border: 1px solid #9aa1ad; margin: 0; cursor: pointer; display: inline-grid; place-items: center; flex: none; background: var(--bg); transition: background .12s, border-color .12s; vertical-align: -3px; box-shadow: none; }
input[type=checkbox]:hover { border-color: var(--ink); }
input[type=checkbox]:checked { background: var(--ink); border-color: var(--ink); }
input[type=checkbox]:checked::after { content: ""; width: 8px; height: 4px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
input[type=checkbox]:disabled { opacity: .45; cursor: not-allowed; }
input[type=file] { padding: 4px; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--wash); padding: 3px 10px; margin-right: 10px; cursor: pointer; }
::placeholder { color: #6f7683; }
input[type=checkbox]:focus-visible, input[type=file]:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

button, .btn { font: inherit; font-stretch: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; line-height: 30px;
  border-radius: 0; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 1px rgba(20, 22, 26, .05); transition: background .12s, border-color .12s, color .12s, box-shadow .12s; }
button:hover, .btn:hover { border-color: #aab0ba; background: var(--wash); color: var(--ink); text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); box-shadow: none; }
button.primary, .btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 1px 2px rgba(20, 22, 26, .2), inset 0 1px 0 rgba(255, 255, 255, .08); }
button.primary:hover, .btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.btn.new { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; box-shadow: 0 1px 2px rgba(168, 0, 23, .3), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.new:hover { background: var(--red-dk); border-color: var(--red-dk); color: #fff; }
button.danger { background: var(--bg); border-color: var(--red); color: var(--red); }
button.danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
button.quiet-danger { color: var(--red); }
button.quiet-danger:hover { background: var(--red-bg); border-color: #efc3c9; color: var(--red); }
button.small, .btn.small, .x button, .x .btn, .mini { padding: 0 10px; font-size: 12px; line-height: 26px; }
button[disabled], .btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
label.btn { margin: 0; }
label.btn:has(+ .visually-hidden:focus-visible) { outline: 2px solid var(--red); }
/* pressed: the request is on its way */
[aria-busy=true] { pointer-events: none; background: var(--blue-bg) !important; border-color: var(--blue) !important; color: var(--blue) !important; }
[aria-busy=true]::before, .spinner { content: ""; flex: none; width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
a[target=_blank]:not(:has(img))::after, form[target=_blank] button::after { content: ""; width: 9px; height: 9px; flex: none; display: inline-block; margin-left: 3px; background: currentColor; opacity: .7;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat; }

/* filter bar and chips */
.filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 6px; padding: 12px var(--pad); border-bottom: 1px solid var(--hair); background: var(--bg); position: sticky; left: 0; }
.filter input[type=search] { width: 220px; padding: 4px 10px; }
.filter select { width: auto; padding: 4px 26px 4px 10px; }
.filter .fg { display: inline-flex; align-items: center; gap: 3px; margin-left: 10px; }
.filter .fg > em { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); margin-right: 4px; }
.filter .n { margin-left: auto; color: var(--soft); display: inline-flex; align-items: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--fill); color: var(--ink); padding: 0 9px; font-size: 12px; font-weight: 500; line-height: 24px; white-space: nowrap;
  box-shadow: inset 0 0 0 1px transparent; transition: background .12s, color .12s, box-shadow .12s; }
.chip:hover { background: #e9ebef; text-decoration: none; }
.chip b { font-weight: 600; color: var(--soft); }
.chip[aria-current] { background: var(--ink); color: #fff; }
.chip[aria-current] b { color: #aab0bb; }

/* ---- messages ---- */
.flash, .errors { margin: 20px 0 0; padding: 10px 14px; border: 1px solid var(--line); word-break: break-word; }
.flash.keep { background: var(--amber-bg); border-color: #ecd59a; color: #5c3c00; font-weight: 600; user-select: all; }
.flash.ok { background: var(--green-bg); border-color: #b5dfc6; color: #05522f; }
.flash.err, .errors { background: var(--red-bg); border-color: #efc3c9; color: #8a0013; }
.errors { padding-left: 30px; }
.card > .flash { margin: 0 0 var(--pad); }
.toasts { position: fixed; left: 50%; bottom: 20px; translate: -50% 0; display: grid; gap: 8px; z-index: 30; justify-items: center; max-width: min(640px, calc(100vw - 24px)); }
.toast { background: var(--ink); color: #fff; padding: 10px 10px 10px 14px; display: flex; gap: 12px; align-items: center; font-weight: 500; box-shadow: var(--float); animation: up .26s var(--ease); word-break: break-word; }
.toast::before { content: ""; width: 7px; height: 7px; background: #4ade80; border-radius: 50%; flex: none; }
.toast.err::before { background: #ff5a6e; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; }
.toast a, .toast button { background: none; border: 0; box-shadow: none; color: #ff9aa6; font-weight: 700; padding: 0 2px; line-height: inherit; }
.toast a:hover, .toast button:hover { background: none; color: #fff; text-decoration: none; }
.toast .tx { color: #9aa1ad; display: flex; }
@keyframes up { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.loading { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--soft); }
.loading.htmx-indicator { display: none; }
.htmx-request .loading.htmx-indicator { display: flex; }
#nav-progress { position: fixed; inset: 0 0 auto; height: 2px; background: var(--red); transform-origin: left; transform: scaleX(0); z-index: 40; pointer-events: none; }
#nav-progress.on { animation: navp 8s var(--ease) forwards; }
@keyframes navp { to { transform: scaleX(.92); } }

/* ---- side column: three quiet sections ---- */
.mod { border-bottom: 1px solid var(--hair); background: var(--bg); padding-bottom: 6px; }
.mod > header { display: flex; align-items: center; height: 44px; padding: 0 var(--pad); }
.mod > header .x { font-size: 12px; font-weight: 600; }
.tab { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--red); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tab.k { color: var(--soft); }
.side .none { margin: 0; padding: 2px var(--pad) 10px; color: var(--soft); font-size: 12px; }
.job { padding: 10px var(--pad); display: grid; gap: 5px; color: var(--ink); transition: background .12s; }
.job:hover { background: var(--wash); text-decoration: none; }
.job .l1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.job .l1 span:last-child, .job .l2 { color: var(--soft); font-size: 12px; font-weight: 400; }
.job .l2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .bar { width: 100%; margin: 2px 0 0; }
.al { padding: 10px var(--pad); display: flex; gap: 10px; }
.al + .al { border-top: 1px solid var(--hair); }
.al > svg { margin-top: 2px; color: var(--red); }
.al.w > svg { color: var(--amber); }
.al b { display: block; font-weight: 600; word-break: break-word; }
.al span { color: var(--soft); font-size: 12px; }
.al .row { gap: 6px; margin-top: 8px; }
.ev { padding: 6px var(--pad); display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; font-size: 12px; color: var(--ink); transition: background .1s; }
.ev:hover { background: var(--wash); text-decoration: none; }
.ev::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.ev.failed::before, .ev.interrupted::before { background: var(--red); }
.ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev time { color: var(--soft); }
.ev time b, .bad { color: var(--red); font-weight: 600; }

/* ---- site page ---- */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: -4px 0 20px; overflow-x: auto; scrollbar-width: none; position: sticky; left: 0; }
.tabs [role=tab] { padding: 10px 0 11px; color: var(--soft); font-weight: 500; white-space: nowrap; transition: color .12s, box-shadow .2s var(--ease); }
.tabs [role=tab]:hover { color: var(--ink); text-decoration: none; }
.tabs [role=tab][aria-selected=true] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--red); }
.kv { display: grid; grid-template-columns: 140px 1fr; margin: calc(-1 * var(--pad)); }
.kv dt, .kv dd { padding: 8px var(--pad); border-bottom: 1px solid var(--hair); margin: 0; min-height: 44px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kv dt { color: var(--soft); font-size: 12px; padding-right: 8px; }
.kv dd { word-break: break-word; padding-left: 0; }
.kv dd form { display: contents; }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
pre.log { background: var(--ink); color: #e3e6eb; padding: 14px 16px; max-height: calc(100vh - 170px); overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0; line-height: 1.6; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 16px; }
details summary { cursor: pointer; font-weight: 600; color: var(--blue); width: fit-content; }
details summary:hover { text-decoration: underline; text-underline-offset: 2px; }
details[open] summary { margin-bottom: 8px; }
.api-key { display: block; width: 100%; margin-top: 8px; font-family: var(--mono); font-size: 12px; }
.api-docs pre { background: var(--fill); padding: 10px 12px; overflow-x: auto; white-space: pre; }
.api-docs td code { white-space: nowrap; }
#metadata .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* copyable texts (Ad Assets, Post Maker) */
.copy-group { margin: 0 calc(-1 * var(--pad)); border-top: 1px solid var(--hair); }
.copy-group > .row { padding: 8px 10px 8px var(--pad); background: var(--wash); border-bottom: 1px solid var(--hair); }
.copy-list { list-style: none; margin: 0; padding: 0; }
.copy-list li { display: flex; gap: 12px; align-items: center; padding: 8px 10px 8px var(--pad); border-bottom: 1px solid var(--hair); transition: background .1s; }
.copy-list li:hover { background: var(--wash); }
.copy-list li > span:first-child { flex: 1; word-break: break-word; }
.copy-group > p { padding: 8px var(--pad); margin: 0; }
#ads form { margin: 0 calc(-1 * var(--pad)); padding: var(--pad) var(--pad) 0; border-top: 1px solid var(--hair); }
.copied { background: var(--green-bg) !important; border-color: var(--green) !important; color: var(--green) !important; }

/* Post Maker */
.editor { padding: 0; }
.brand-tabs { display: flex; gap: 6px; padding: 10px var(--pad); border-bottom: 1px solid var(--hair); overflow-x: auto; }
.brand-tabs a { display: flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border: 1px solid var(--line); color: var(--ink); font-weight: 500; white-space: nowrap; transition: border-color .12s, background .12s; }
.brand-tabs a:hover { border-color: #aab0ba; background: var(--wash); text-decoration: none; }
.brand-tabs a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.brand-tabs .logo-chip { width: 48px; height: 26px; padding: 3px; }
.editor-body { display: grid; grid-template-columns: 240px 1fr; }
.editor-brand { padding: var(--pad); border-right: 1px solid var(--hair); }
.editor-form { padding: var(--pad) 20px; }
.editor-brand > .logo-chip { width: 100%; height: 120px; padding: 16px; margin-bottom: 10px; }
.editor-form h2 { font-size: 15px; }
.brand-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.brand-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.brand-latest { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.brand-latest .thumb { height: 44px; }
.logo-chip { display: flex; flex: none; align-items: center; justify-content: center; width: 112px; height: 56px; padding: 8px; }
.logo-chip.light { background: #12141c; }
.logo-chip.dark { background: #eef1f7; }
.logo-chip img { max-width: 100%; max-height: 100%; }
.brand-settings-logo { width: 150px; height: 90px; margin: 10px 0 0; }
.thumbs { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.thumbs figure { margin: 0; }
.thumbs figcaption { font-size: 12px; margin-top: 4px; }
.thumbs figcaption button.link { padding: 0; border: 0; background: none; box-shadow: none; color: var(--blue); font: inherit; line-height: inherit; cursor: pointer; }
.thumbs figcaption button.link:hover { background: none; color: var(--blue); text-decoration: underline; }
.thumbs figcaption.downloads { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.thumb { display: block; height: 150px; width: auto; border: 1px solid var(--line); background: var(--fill); transition: border-color .12s, box-shadow .12s; }
a:hover > .thumb { border-color: var(--ink); box-shadow: var(--lift); }
.thumb.banner { height: 72px; }
.gens { margin: calc(-1 * var(--pad)); }
.gen { padding: 14px var(--pad); border-top: 1px solid var(--hair); }
.gen:first-child { border-top: 0; }
.gen-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.gen-note { margin: 4px 0 0; }
.gen-body { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 12px; }
.gen-body .thumbs { flex: none; max-width: 100%; }
.post-copy { flex: 1 1 320px; min-width: 0; max-width: 640px; }
.post-text { white-space: pre-wrap; background: var(--wash); border: 1px solid var(--hair); padding: 8px 10px; margin: 6px 0 8px; word-break: break-word; max-height: 160px; overflow: auto; }

/* ---- small shared pieces ---- */
.pills { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: middle; }
.nm { font-weight: 600; color: var(--ink); }
.slug { color: var(--soft); font-size: 12px; margin-left: 8px; font-family: inherit; background: none; }

/* ---- site tags: panel-only labels; each tag keeps one of ten hues (colour = --tc, tint = --tb) ---- */
.c0 { --tc: #5b3fc4; --tb: #eeeafb; } .c1 { --tc: #0b6e6e; --tb: #dff2f1; } .c2 { --tc: #a64b00; --tb: #fdeedf; }
.c3 { --tc: #b0186a; --tb: #fbe7f1; } .c4 { --tc: #1d4fb8; --tb: #e5edfb; } .c5 { --tc: #566700; --tb: #eff4d6; }
.c6 { --tc: #7a4a1f; --tb: #f3ebe2; } .c7 { --tc: #00708f; --tb: #ddf3f9; } .c8 { --tc: #3d4a5c; --tb: #e8ecf1; }
.c9 { --tc: #8a1fa8; --tb: #f5e6fa; }
.tag { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding: 0 7px; font-size: 11px; font-weight: 600; line-height: 18px;
  background: var(--tb); color: var(--tc); box-shadow: inset 2px 0 0 var(--tc); white-space: nowrap; vertical-align: 1px; }
a.tag:hover { text-decoration: none; background: var(--tc); color: #fff; }
.tags.edit { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tags.edit .tag { margin: 0; line-height: 22px; padding-right: 2px; font-size: 12px; }
.tags.edit form { display: contents; }
.tag-x { all: unset; cursor: pointer; width: 18px; height: 18px; display: grid; place-items: center; font-size: 14px; line-height: 1; opacity: .55; }
.tag-x:hover { opacity: 1; background: rgba(0, 0, 0, .08); }
.tag-x:focus-visible { outline: 2px solid var(--tc); opacity: 1; }
.tag-add input { width: 92px; height: 24px; padding: 0 7px; font-size: 12px; border: 1px dashed var(--line); background: transparent; }
.tag-add input::-webkit-calendar-picker-indicator { display: none !important; }
.tag-add input:focus { width: 130px; border-style: solid; background: var(--bg); }
.hov .tag-add input { height: 28px; background: var(--bg); border-color: var(--soft); }
.hov .tag-add input:focus { width: 150px; }
.tag-err { margin-left: 8px; font-size: 12px; }
.head .sub:has(.tags.edit) { overflow: visible; flex-wrap: wrap; white-space: normal; }
.chip.tagchip i { width: 8px; height: 8px; background: var(--tc); flex: none; }
.chip.tagchip[aria-current] { background: var(--tc); }
.chip.tagchip[aria-current] i { background: #fff; }
.chip.tagchip[aria-current] b { color: rgba(255, 255, 255, .7); }
.lj { color: var(--ink); font-weight: 500; }
.lj::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-right: 6px; vertical-align: 1px; }
.lj.failed::before, .lj.interrupted::before { background: var(--red); }
.lj.running::before, .lj.queued::before { background: var(--blue); animation: pulse 1.2s ease-in-out infinite; }
.delivered { margin: 0; gap: 8px; color: var(--soft); font-size: 12px; cursor: pointer; }
.delivered input:checked { background: var(--green); border-color: var(--green); }
.al b a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.al b a:hover { text-decoration-color: currentColor; }
.card h3 { margin: var(--pad) 0 6px; }
.card h3:first-child, .copy-group h3 { margin: 0; }
.card > table + form, .card > .table-scroll + form, .card > .table-scroll + p { margin-top: var(--pad); }
.card > .row:first-child select { width: auto; padding: 2px 26px 2px 8px; font-size: 12px; }
.card > .row:first-child > h2 ~ .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opts { display: grid; gap: 2px; margin: var(--pad) 0 2px; }
.opts label.inline { margin: 3px 0; }
.actions { margin: 20px 0 0; display: flex; gap: 8px; }
.theme-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.theme-row select { flex: 1; min-width: 0; }
.lucky { background: var(--bg); border-color: var(--line); color: var(--ink); white-space: nowrap; }
.lucky:hover { background: var(--wash); border-color: #aab0ba; }
.advanced { margin: var(--pad) 0 0; }
.addrow { align-items: flex-end; }
.addrow > div { flex: 0 1 300px; }
.addrow > div:has(select) { flex-basis: 160px; }
.addrow label { margin-top: 0; }
.addrow button { line-height: 30px; }
.inl { gap: 6px; flex-wrap: nowrap; }
.inl select, td select { width: auto; padding: 3px 26px 3px 8px; }
.pair { flex-wrap: nowrap; }
.pair button { line-height: 30px; }
.acts { gap: 6px; justify-content: flex-end; }
.tog[aria-pressed=true] { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.pick { max-height: 200px; overflow: auto; border: 1px solid var(--hair); padding: 4px 10px; margin: 6px 0 10px; display: grid; }
td details form { margin-top: 8px; }
td .empty, td.empty { padding: 36px 16px; }
.grow { flex: 1; min-width: 220px; }
.w-role { width: 160px; }
.w-code { width: 150px; }
.break { word-break: break-word; }
form.card:not(.launch) { max-width: 960px; }

/* ---- the ad-copy question before a design ---- */
dialog.ask { border: 1px solid var(--line); padding: 22px 24px 20px; width: min(460px, calc(100vw - 24px)); background: var(--bg); color: var(--ink); box-shadow: var(--float); }
dialog.ask[open] { animation: up .2s var(--ease); }
dialog.ask::backdrop { background: rgba(20, 22, 26, .45); }
dialog.ask h2 { margin: 0 0 10px; font-size: 17px; }
dialog.ask p { margin: 0 0 8px; color: var(--soft); font-size: 13px; line-height: 1.5; }
.ask-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ask-actions .ghost { margin-left: auto; background: transparent; border-color: transparent; }

/* ---- command palette ---- */
dialog.palette { border: 1px solid var(--line); padding: 0; width: min(600px, calc(100vw - 24px)); margin-top: 12vh; background: var(--bg); color: var(--ink); box-shadow: var(--float); }
dialog.palette[open] { animation: up .2s var(--ease); }
dialog.palette::backdrop { background: rgba(20, 22, 26, .45); }
.palette input { border: 0; border-bottom: 1px solid var(--hair); padding: 14px 16px; font-size: 15px; box-shadow: none !important; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 46vh; overflow: auto; }
.palette li { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; cursor: pointer; }
.palette li b { font-weight: 600; }
.palette li span { color: var(--soft); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette li em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--soft); white-space: nowrap; }
.palette li[aria-selected=true] { background: var(--red); color: #fff; }
.palette li[aria-selected=true] span, .palette li[aria-selected=true] em { color: #fff; }
.palette footer { display: flex; gap: 16px; padding: 8px 16px; background: var(--wash); border-top: 1px solid var(--hair); color: var(--soft); font-size: 11px; }
.palette footer kbd { border-color: var(--line); margin-right: 4px; }

/* ---- one-click launcher (home): the product's main action, given the most room on the page ---- */
.launch { margin: 24px 0 0; padding: 22px 24px 20px; position: sticky; left: 0; scroll-margin-top: 24px; }
.launch h1 { margin: 0 0 4px; font-size: 20px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.launch-sub { margin: 0 0 16px; color: var(--soft); }
.launch-row { display: flex; gap: 10px; max-width: 720px; }
.launch-row select { flex: 1; min-width: 0; height: 44px; font-size: 15px; padding-left: 14px; }
.launch .go { height: 44px; padding: 0 24px; font-size: 15px; font-weight: 700; background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 1px 2px rgba(168, 0, 23, .3), inset 0 1px 0 rgba(255, 255, 255, .12); }
.launch .go:hover { background: var(--red-dk); border-color: var(--red-dk); color: #fff; }
.launch-foot { margin: 12px 0 0; color: var(--soft); font-size: 12px; }
.launch-foot .bad { color: var(--red); }
.launch:target .launch-row select { border-color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }

/* ---- login: one composed column on ink ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: var(--ink); }
.login-col { width: min(380px, 100%); display: grid; gap: 22px; }
.login-id { display: flex; align-items: center; gap: 12px; color: #fff; }
.login-id .mark { width: 30px; height: 31px; }
.login-id span { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.login-card { background: var(--bg); padding: 30px 30px 28px; box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .7); }
.login-card h1 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 2px; }
.login-card .sub { margin: 0 0 10px; color: var(--soft); }
.login-card .flash { margin: 12px 0 0; }
.login-card input { height: 40px; }
.login-card button { width: 100%; line-height: 40px; margin-top: 22px; font-size: 14px; }
.login-line { margin: 0; color: #8a909b; font-size: 12px; }
/* The one authored moment: the line runs once, tile by tile, the red one last. */
.login-id .mark path { transform-box: fill-box; transform-origin: bottom; animation: tile-in .55s var(--ease) backwards; }
.login-id .mark path:nth-child(2) { animation-delay: .1s; }
.login-id .mark path:nth-child(3) { animation-delay: .2s; }
.login-card { animation: rise .5s var(--ease) .12s backwards; }
@keyframes tile-in { from { transform: scaleY(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---- narrower screens: the side column goes first, then the rail becomes a strip ---- */
/* With the side column open on a narrower screen the last job keeps its dot, any failure word and its age; the name is in the tooltip. */
@media (min-width: 1301px) and (max-width: 1440px) { .sites .c-job .lj span { display: none; } .sites td:first-child { min-width: 150px; } .addr { max-width: 150px; } }
@media (max-width: 1300px) { .rail a em.att { display: inline; } body.app { grid-template-columns: 216px minmax(0, 1fr); } .side { display: none; } }
@media (max-width: 820px) {
  body.app { grid-template: 44px auto minmax(0, 1fr) / minmax(0, 1fr); }
  .top .brand { width: auto; padding: 0 14px; } .cmd span, .cmd kbd, .cap, .top .r > a { display: none; } .cmd { flex: none; }
  .rail { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; overflow-x: auto; gap: 4px; }
  .rail a { white-space: nowrap; flex: none; } .rail-new { margin: 0; padding: 0 12px !important; }
  .rail .more { flex-direction: row; margin: 0; padding: 0; border: 0; } .rail .more summary { display: none; } .rail .more:not([open]) { display: contents; }
  main { padding: 0 14px 40px; }
  .head { padding: 18px 0 14px; } .head h1, .launch h1 { font-size: 18px; }
  th.hide-sm, td.hide-sm { display: none; }
  .kv { grid-template-columns: 104px 1fr; } .editor-body { grid-template-columns: 1fr; } .editor-brand { border-right: 0; border-bottom: 1px solid var(--hair); }
  .launch { padding: 18px 16px 16px; margin-top: 14px; } .launch-row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Doc Generator */
.doc-clients { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.doc-client { display: inline-flex; align-items: center; gap: 8px; }
.brand-tabs a.doc-tab { padding: 3px 12px; }
.brand-tabs a[aria-current] .hint { color: inherit; opacity: .75; }
.doc-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.gazette-company { min-width: 0; margin: 16px 0; padding: var(--pad); border: 1px solid var(--line); }
.gazette-company legend { padding: 0 6px; font-weight: 600; }
.gazette-section { border-top: 1px solid var(--hair); margin: 10px 0; padding-top: 6px; }
.gazette-section:not(:has(option[value="field"]:checked)) [data-field-label] { display: none; }
.doc-fields:disabled { opacity: .55; }
.doc-fields > input, .doc-fields > select, .doc-fields > textarea { width: 100%; }
.doc-fields > .doc-var { display: flex; gap: 6px; align-items: center; }
.doc-fields > .doc-var input { flex: 1; min-width: 0; }
/* compact: label and control side by side on wider screens */
@media (min-width: 560px) {
  .doc-fields { display: grid; grid-template-columns: 11rem 1fr; gap: 7px 14px; align-items: start; }
  .doc-fields > label { margin: 0; padding-top: 7px; }
  .doc-fields > input, .doc-fields > select, .doc-fields > textarea, .doc-fields > .doc-var { margin: 0; }
  .doc-fields > .doc-kept, .doc-fields > .doc-tools, .doc-fields > p, .doc-fields > .brand-actions { grid-column: 1 / -1; }
}

/* Doc Generator: a generation's drawer, and the image tools on the form */
.gen-head .gen-more { margin-left: auto; font-size: 12px; }
.gen[data-detail] { cursor: pointer; }
.gen[data-detail]:hover { background: var(--wash); }
dialog.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(480px, 100vw); padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--bg); color: var(--ink); box-shadow: var(--float); }
dialog.drawer[open] { animation: drawer-in .2s var(--ease); }
dialog.drawer::backdrop { background: rgba(20, 22, 26, .35); }
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } }
.drawer-body { padding: 16px 20px 24px; }
dialog.drawer { overflow-y: auto; }
/* Create drawer: the list of doc types, then the fill-in form */
.doc-types { display: grid; gap: 8px; margin: 10px 0; }
.doc-type { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: inherit; cursor: pointer; }
.doc-type:hover { background: var(--wash); border-color: var(--soft); }
.doc-type:has(:checked) { border-color: var(--ink); background: var(--wash); }
.doc-type > input { flex: none; }
.doc-type > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-type strong { font-size: 15px; }
.drawer-scroll .editor-form { padding: 0; }
/* Create / multi-select drawer: one column always — every config shows the same stacked areas, no side-by-side fields */
.drawer-scroll .doc-fields { display: block; }
.drawer-scroll .brand-options { grid-template-columns: 1fr; }
.multi-doc { padding-top: var(--gap); margin-top: var(--gap); border-top: 2px solid var(--line); }
.multi-doc:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.multi-doc h3 { margin: 0 0 8px; font-size: 15px; }
.head .x { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.drawer-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.drawer-head h2 { margin: 0; font-size: 16px; flex: 1; }
.drawer-head .tx { width: 32px; padding: 0; }
.drawer-head .tx svg, .doc-tools svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.drawer-out { display: block; max-width: 100%; max-height: 320px; margin: 0 auto 16px; border: 1px solid var(--line); background: var(--fill); }
.drawer-kv { margin: 0 0 16px; border-top: 1px solid var(--hair); }
.drawer-kv dt, .drawer-kv dd { padding-left: 0; padding-right: 0; }
.drawer-text { white-space: pre-wrap; }
.drawer-error { color: var(--red); font-family: ui-monospace, monospace; font-size: 12px; }
.drawer-in { display: block; max-height: 96px; max-width: 100%; border: 1px solid var(--line); background: var(--fill); }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-actions form { display: contents; }
.doc-kept { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; }
.doc-kept img { height: 56px; width: auto; border: 1px solid var(--line); background: var(--fill); }
.doc-kept label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.doc-tools { margin: 8px 0 4px; display: grid; gap: 8px; max-width: 420px; }
.doc-crop { position: relative; overflow: hidden; width: 100%; background: repeating-conic-gradient(var(--fill) 0 25%, var(--bg) 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); cursor: grab; touch-action: none; }
.doc-crop:active { cursor: grabbing; }
.doc-crop img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; pointer-events: none; }
.doc-tools-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.doc-tools-row input[type=range] { flex: 1; min-width: 120px; }

/* Personel Kartları */
.card-box { margin-top: var(--pad); padding-top: var(--pad); border-top: 1px solid var(--hair); }
.card-box:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.inline-form { display: flex; gap: var(--gap); flex-wrap: wrap; align-items: center; }
.inline-form input { flex: 1; min-width: 200px; }
.verify { margin-top: var(--gap); padding: var(--gap); border-radius: 10px; border: 1px solid var(--line); }
.verify.ok { background: var(--green-bg); border-color: #b5dfc6; }
.verify.err { background: var(--red-bg); border-color: #efc3c9; }
.verify .checks { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .25rem; }
table.rows { width: 100%; border-collapse: collapse; margin-top: var(--gap); }
table.rows th, table.rows td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--hair); vertical-align: top; }
table.rows th { color: var(--soft); font-weight: 600; font-size: .85em; }
.sample { margin-top: var(--gap); padding: var(--gap); border: 1px dashed var(--line); border-radius: 10px; }
.staff-card { margin-top: var(--gap); padding: var(--gap); border: 1px solid var(--line); border-radius: 10px; }
.staff-card.renewed, .staff-card.void { opacity: .7; }
.staff-card-head { display: flex; gap: var(--gap); align-items: baseline; flex-wrap: wrap; justify-content: space-between; }
.staff-card-sides { display: flex; gap: var(--gap); flex-wrap: wrap; margin-top: var(--gap); }
.staff-card-sides figure { margin: 0; flex: 1; min-width: 180px; }
.staff-card-sides figcaption { color: var(--soft); font-size: .85em; margin-bottom: .25rem; }
.staff-card-sides img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--hair); }

/* ---- Proxy Gen ---- */
.proxy-form fieldset { border: 0; padding: 0; margin: 0; }
.proxy-form legend { font-weight: 600; font-size: 12px; margin-bottom: 6px; }
.proxy-fields { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.proxy-fields select, .proxy-fields input { width: 100%; }
.proxy-form:not(:has(#prov-fusion:checked)) .country-fusion,
.proxy-form:not(:has(#prov-seller:checked)) .country-seller,
.proxy-form:not(:has(#mode option[value=sticky]:checked)) .sticky-min { display: none; }
.proxy-go { margin-top: 16px; }
.proxy-gen h2 { display: flex; align-items: center; gap: 6px; }
.proxy-gen > .row > button { margin-left: auto; }
.proxy-flag { font-size: 16px; line-height: 1; }
.proxy-lines { list-style: none; margin: 10px 0 0; padding: 0; max-height: 50vh; overflow: auto; border-top: 1px solid var(--line); }
.proxy-lines li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.proxy-lines code { flex: 1; min-width: 0; overflow-wrap: anywhere; user-select: all; }
.proxy-lines button { flex: none; }
