/* Admin & portal – builds on app.css tokens */
.admin { display: grid; min-height: 100dvh; grid-template-columns: 1fr; background: var(--c-bg); }
@media (min-width: 1000px) { .admin { grid-template-columns: 248px 1fr; } }
.admin-side { background: var(--c-surface); border-inline-end: 1px solid var(--c-line); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.25rem; }
@media (max-width: 999px) { .admin-side { border-inline-end: 0; border-bottom: 1px solid var(--c-line); } .admin-side nav { display: none; } .admin-side.is-open nav { display: block; } }
.admin-side__top { display: flex; justify-content: space-between; align-items: center; }
.admin-side nav h2 { font-size: var(--fs-xs); color: var(--c-muted); font-weight: 560; margin: 1.1rem .6rem .35rem; letter-spacing: 0; font-family: var(--f-sans); }
.admin-side nav ul { list-style: none; display: grid; gap: 1px; }
.admin-side nav a { display: flex; justify-content: space-between; align-items: center; padding: .48rem .65rem; border-radius: 8px; text-decoration: none; font-size: .9rem; color: var(--c-text-2); }
.admin-side nav a:hover { background: var(--c-surface-2); color: var(--c-text); }
.admin-side nav a[aria-current="page"] { background: var(--c-text); color: var(--c-bg); }
.admin-side .count { font-size: var(--fs-xs); background: var(--c-accent); color: #fff; border-radius: 999px; padding: 0 .45rem; min-width: 1.4rem; text-align: center; }
.admin-main { padding: clamp(1.25rem, 1rem + 1.5vw, 2.5rem); min-width: 0; }
.admin-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: end; margin-bottom: 1.75rem; }
.admin-head h1 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem); letter-spacing: -.025em; }
.admin-menu-btn { display: inline-flex; }
@media (min-width: 1000px) { .admin-menu-btn { display: none; } }
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 1.35rem; }
.card + .card { margin-top: 1.25rem; }
.card h2 { font-size: 1.1rem; letter-spacing: -.01em; margin-bottom: 1rem; }
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.stat { display: grid; gap: .25rem; }
.stat__value { font-family: var(--f-display); font-size: 2rem; font-weight: 640; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat__label { font-size: var(--fs-small); color: var(--c-muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: start; padding: .7rem .9rem; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.table th { font-weight: 560; color: var(--c-muted); font-size: var(--fs-xs); background: var(--c-surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table a { text-decoration: none; font-weight: 560; }
.table a:hover { text-decoration: underline; }
.pill { display: inline-block; font-size: var(--fs-xs); font-weight: 560; padding: .12rem .55rem; border-radius: 999px; background: var(--c-surface-2); border: 1px solid var(--c-line); white-space: nowrap; }
.pill--new { background: color-mix(in srgb, var(--c-accent) 12%, var(--c-surface)); border-color: color-mix(in srgb, var(--c-accent) 35%, var(--c-line)); }
.pill--won, .pill--published, .pill--ok { background: color-mix(in srgb, var(--c-ok) 12%, var(--c-surface)); border-color: color-mix(in srgb, var(--c-ok) 35%, var(--c-line)); }
.pill--lost, .pill--archived, .pill--bad { background: color-mix(in srgb, var(--c-err) 10%, var(--c-surface)); border-color: color-mix(in srgb, var(--c-err) 30%, var(--c-line)); }
.pill--high { background: color-mix(in srgb, var(--c-warn) 14%, var(--c-surface)); }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; }
.toolbar .field { min-width: 9rem; }
.toolbar .input, .toolbar .select { min-height: 42px; padding-block: .5rem; }
.grid-2 { display: grid; gap: 1.25rem; }
@media (min-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--c-line); margin-bottom: 1.25rem; }
.tabs a, .tabs button { padding: .55rem .85rem; border: 0; background: none; text-decoration: none; font-size: .9rem; color: var(--c-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--c-text); border-bottom-color: var(--c-text); font-weight: 560; }
.lang-tabs [data-lang-panel]:not(.is-active) { display: none; }
.no-js .lang-tabs [data-lang-panel] { display: block !important; }
.media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.media-item { border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; background: var(--c-surface); font-size: var(--fs-small); }
.media-item img { width: 100%; height: 160px; object-fit: cover; object-position: top; background: var(--c-surface-2); }
.media-item__body { padding: .75rem; display: grid; gap: .5rem; }
.flash { margin-bottom: 1.25rem; }
.kv { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: .45rem 1rem; font-size: .9rem; }
.kv dt { color: var(--c-muted); }
.kv dd { margin: 0; word-break: break-word; }
.timeline { list-style: none; display: grid; gap: .9rem; }
.timeline li { border-inline-start: 2px solid var(--c-line); padding-inline-start: .9rem; font-size: .9rem; }
.timeline small { color: var(--c-muted); display: block; }
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; background: var(--c-bg); }
.auth-card { width: min(100%, 26rem); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 2rem; box-shadow: var(--shadow-2); }
.auth-card--wide { width: min(100%, 44rem); }
.auth-card h1 { font-size: 1.5rem; margin: 1.25rem 0 .5rem; }
.req-list { list-style: none; display: grid; gap: .3rem; font-size: .88rem; }
.req-list li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--c-line); padding: .35rem 0; }
.btn--danger { --btn-bg: var(--c-err); --btn-fg: #fff; }
.inline-form { display: inline; }
.sortable-handle { cursor: grab; color: var(--c-muted); }
.status-steps { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; }
.status-steps li { font-size: var(--fs-xs); padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--c-line); color: var(--c-muted); }
.status-steps li.is-done { background: var(--c-surface-2); color: var(--c-text); }
.status-steps li.is-current { background: var(--c-text); color: var(--c-bg); border-color: var(--c-text); }
.crop-preview { position: relative; aspect-ratio: 16/10; overflow: hidden; border-radius: 10px; border: 1px solid var(--c-line); background: var(--c-surface-2); }
.crop-preview img { width: 100%; height: 100%; object-fit: cover; }
.cards > .card + .card, .grid-2 > .card + .card { margin-top: 0; }
