/*
 * Developer: MexTech Limited
 * Licenced: Naijasearch is officially licenced and authorized to be used from MexTech Limited
 * Copyright: (c) 2026 All Rights Reserved, MexTech Limited (https://mextechltd.name.ng).
 */

.small {
    font-size: 0.86rem;
}

.micro {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: var(--ink-3);
}

.muted {
    color: var(--ink-3);
}

.link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--brand-strong);
    font-weight: 650;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.between {
    justify-content: space-between;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.field > label,
.field-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink-2);
    margin-bottom: 0.4rem;
}

.hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.79rem;
    color: var(--ink-3);
    line-height: 1.45;
}

.field-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.79rem;
    font-weight: 600;
    color: var(--danger);
}

.field--error .input,
.field--error .select,
.field--error .textarea {
    border-color: var(--danger);
    background: var(--danger-soft);
}

.field--full {
    grid-column: 1 / -1;
}

.checkbox {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: var(--ink-2);
    cursor: pointer;
    line-height: 1.45;
}

.checkbox input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--brand);
    flex: none;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.8rem 0.95rem;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--surface-2);
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--ink-2);
}

.flash svg {
    flex: none;
    margin-top: 2px;
}

.flash strong {
    display: block;
    color: var(--ink);
    font-size: 0.86rem;
}

.flash--error {
    background: var(--danger-soft);
    border-color: rgba(178, 42, 36, 0.24);
    color: var(--danger-ink);
}

html[data-theme="dark"] .flash--error {
    border-color: var(--danger-line);
}

.flash--success {
    background: var(--brand-soft);
    border-color: rgba(var(--brand-rgb), 0.22);
    color: var(--brand-deep);
}

.flash--notice {
    background: var(--info-soft);
    border-color: rgba(38, 96, 160, 0.2);
    color: var(--info);
}

html[data-theme="dark"] .flash--notice {
    border-color: rgba(127, 180, 238, 0.3);
}

.ad-slot {
    display: block;
    margin: 1.5rem auto;
    padding: 0.75rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-md);
    background: var(--surface-2);
    text-align: center;
}

.ad-slot--wide {
    grid-column: 1 / -1;
    width: 100%;
}

.ad-slot__label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
}

.flash-bridge {
    display: none;
}

.flash-fallback {
    padding-top: 1rem;
}

.avatar--sm {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
}

.authwrap {
    padding: 2.2rem 0 3.4rem;
    background: linear-gradient(180deg, var(--surface-2), var(--canvas) 42%);
    border-bottom: 1px solid var(--line);
    min-height: calc(100vh - var(--header-h));
}

body.bare {
    background: var(--canvas);
    min-height: 100vh;
}

body.bare .authwrap {
    display: flex;
    align-items: center;
    min-height: 100vh;
}

body.bare .authwrap > .wrap {
    width: 100%;
}

.authwrap__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 2.2rem;
    align-items: start;
}

.authcard {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-2);
    overflow: hidden;
}

.authcard__head {
    padding: 1.5rem 1.6rem 0.2rem;
}

.authcard__head h1 {
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.authcard__head p {
    font-size: 0.9rem;
    color: var(--ink-3);
    line-height: 1.55;
}

.authcard__body {
    padding: 1.2rem 1.6rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.authcard__foot {
    padding: 0.95rem 1.6rem;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    font-size: 0.87rem;
    color: var(--ink-3);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.authback {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--ink-3);
    text-decoration: none;
    margin-bottom: 1rem;
}

.authback:hover {
    color: var(--brand-strong);
}

.authside {
    position: sticky;
    top: calc(var(--header-h) + 1.2rem);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.authside__card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.15rem 1.2rem;
    box-shadow: var(--sh-1);
}

.authside__title {
    font-size: 0.95rem;
    font-weight: 750;
    margin-bottom: 0.6rem;
}

.authside__list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    list-style: none;
}

.authside__list li {
    display: flex;
    gap: 0.55rem;
    font-size: 0.86rem;
    color: var(--ink-2);
    line-height: 1.45;
}

.authside__list svg {
    flex: none;
    margin-top: 2px;
    color: var(--brand);
}

.authside__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    text-align: center;
}

.authside__stats b {
    display: block;
    font-size: 1.05rem;
    color: var(--ink);
}

.authside__stats span {
    font-size: 0.71rem;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.phead {
    padding: 1.4rem 0 1.2rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.4rem;
}

.phead__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.9rem;
}

.phead h1 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.phead p {
    margin-top: 0.4rem;
    font-size: 0.92rem;
    color: var(--ink-3);
    max-width: 68ch;
    line-height: 1.55;
}

.phead__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.shell {
    display: grid;
    grid-template-columns: 246px minmax(0, 1fr);
    gap: 1.6rem;
    padding: 1.6rem 0 3rem;
    align-items: start;
}

.shell__side {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.shell__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.sideuser {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.sideuser b {
    display: block;
    font-size: 0.88rem;
    line-height: 1.3;
}

.sideuser span {
    font-size: 0.75rem;
    color: var(--ink-3);
}

.sidenav {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sidenav__label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-3);
    font-weight: 700;
    padding: 0.6rem 0.6rem 0.3rem;
}

.sidenav__link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.6rem;
    border-radius: var(--r-sm);
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--ink-2);
    text-decoration: none;
    transition: background var(--fast), color var(--fast);
}

.sidenav__link svg {
    color: var(--ink-3);
    flex: none;
}

.sidenav__link:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.sidenav__link.is-active {
    background: var(--brand-soft);
    color: var(--brand-deep);
}

.sidenav__link.is-active svg {
    color: var(--brand-strong);
}

.sidenav__count {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-3);
    background: var(--surface-2);
    border-radius: var(--r-pill);
    padding: 0.05rem 0.4rem;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.7rem;
}

.tile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 0.85rem 0.95rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transition: border-color var(--fast), transform var(--fast), box-shadow var(--fast);
}

a.tile:hover {
    border-color: var(--brand);
    box-shadow: var(--sh-2);
    transform: translateY(-1px);
}

.tile__label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    font-weight: 650;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tile__value {
    font-size: 1.5rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.2;
}

.tile__note {
    font-size: 0.78rem;
    color: var(--ink-3);
}

.meter {
    height: 9px;
    border-radius: var(--r-pill);
    background: var(--wash-2);
    overflow: hidden;
}

.meter > span {
    display: block;
    height: 100%;
    border-radius: var(--r-pill);
    background: linear-gradient(90deg, var(--brand), var(--brand-strong));
}

.table__cell-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.table__cell-title a {
    font-weight: 600;
}

.bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(4rem, 8rem) 3rem;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
}

.bar-row__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink-2);
}

.bar-row__track {
    height: 8px;
    border-radius: var(--r-pill);
    background: var(--wash-2);
    overflow: hidden;
}

.bar-row__fill {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: var(--r-pill);
    background: linear-gradient(90deg, var(--brand), var(--brand-strong));
}

.bar-row__value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    color: var(--ink);
}

.bar-row--plain {
    grid-template-columns: minmax(0, 1fr) 3rem;
}

.bars--plain .bar-row {
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed var(--line);
}

.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cell-sub {
    color: var(--muted);
    font-size: 0.85rem;
}

.admintop__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dashhead__eyebrow {
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.dashhead__title {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 750;
    letter-spacing: -0.025em;
    margin-top: 0.2rem;
}

.pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface);
    font-size: 0.86rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink-2);
    transition: border-color var(--fast), color var(--fast), background var(--fast), transform var(--fast), box-shadow var(--fast);
}

a.pagination__page:hover {
    border-color: var(--brand);
    color: var(--brand-strong);
    box-shadow: 0 4px 12px -6px rgba(var(--shade-rgb), 0.4);
}

a.pagination__page:active {
    transform: translateY(1px);
}

.pagination__page.is-current {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--on-brand);
    box-shadow: 0 6px 16px -8px rgba(var(--shade-rgb), 0.7);
}

.pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--faint);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.nf {
    max-width: 34rem;
    margin: 3rem auto 0;
    padding: 2.25rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
}

.nf__code {
    margin-top: 0.6rem;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--brand);
}

.nf__form {
    max-width: 34rem;
    margin: 1.25rem auto 3rem;
    text-align: center;
}

.nf__label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}

.nf__row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nf__row .input {
    flex: 1 1 14rem;
}

.panelbox--danger {
    border-color: rgba(178, 58, 42, 0.28);
}

html[data-theme="dark"] .panelbox--danger {
    border-color: var(--danger-line);
}

.panelbox--tint {
    background: var(--surface-2);
}

.panelbox--tint .panelbox__body {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.panelbox--danger .panelbox__head h2 {
    color: var(--danger);
}

.panelbox {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
    overflow: hidden;
}

.panelbox__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--line);
}

.panelbox__head h2 {
    font-size: 0.98rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.panelbox__head p {
    font-size: 0.8rem;
    color: var(--ink-3);
    margin-top: 0.1rem;
}

.panelbox__body {
    padding: 1.1rem;
}

.panelbox__body--flush {
    padding: 0;
}

.dlist {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    list-style: none;
}

.dlist li,
.dlist > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.87rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px dashed var(--line);
    color: var(--ink-2);
}

.dlist li:last-child,
.dlist > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dlist > div > span:first-child {
    color: var(--muted);
}

.dlist b {
    color: var(--ink);
    font-weight: 650;
    text-align: right;
}

.publayout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.6rem;
    align-items: start;
    padding-bottom: 3rem;
}

.pubmain {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pubside {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.fcard {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.25rem 1.3rem 1.4rem;
    box-shadow: var(--sh-1);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.fcard__head {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}

.fcard__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
    background: var(--brand-soft);
    color: var(--brand-strong);
    flex: none;
}

.fcard__head h2 {
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.fcard__head p {
    font-size: 0.82rem;
    color: var(--ink-3);
    margin-top: 0.15rem;
    line-height: 1.45;
}

.typegrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.6rem;
}

.typeopt {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.8rem;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    cursor: pointer;
    background: var(--surface);
    transition: border-color var(--fast), background var(--fast), box-shadow var(--fast);
}

.typeopt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.typeopt b {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--ink);
}

.typeopt small {
    font-size: 0.76rem;
    color: var(--ink-3);
    line-height: 1.4;
}

.typeopt:hover {
    border-color: var(--line-strong);
}

.typeopt.is-selected {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: 0 0 0 3px var(--brand-soft-2);
}

.typeopt.is-selected b {
    color: var(--brand-deep);
}

.routebuilder {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.routeblock {
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    padding: 0.9rem;
    background: var(--surface-2);
}

.routeblock__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--line);
}

.routeblock__num {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-deep);
}

.routeblock .form-grid {
    margin-bottom: 0.75rem;
}

.routesteps,
.routelegs {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px dashed var(--line);
}

.routesteps__label {
    margin: 0 0 0.45rem;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-3);
}

.steprow {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr) 1.6rem;
    align-items: start;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.steprow__n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.1rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--ink-3);
}

.steprow__del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink-3);
    cursor: pointer;
    transition: border-color var(--fast), color var(--fast);
}

.steprow__del:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.legrow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 2.1rem;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.identityrow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.identityopt {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border: 1.5px solid var(--line);
    border-radius: var(--r-pill, 999px);
    background: var(--surface);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: border-color var(--fast), background var(--fast), color var(--fast);
}

.identityopt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.identityopt:hover {
    border-color: var(--line-strong);
}

.identityopt.is-selected {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-deep);
}

@media (max-width: 620px) {
    .steprow {
        grid-template-columns: 1.4rem minmax(0, 1fr) 1.8rem;
    }

    .legrow {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 1.8rem;
    }

    .legrow > input:nth-child(4) {
        grid-column: 1 / 3;
    }
}

.uploader {
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--r-lg);
    padding: 1.1rem;
    background: var(--surface-2);
    transition: border-color var(--fast), background var(--fast);
}

.uploader.is-drag {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.uploader__zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    padding: 0.9rem 0.5rem;
    cursor: pointer;
}

.uploader__glyph {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--brand-strong);
    margin-bottom: 0.25rem;
}

.uploader__title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
}

.uploader__hint {
    font-size: 0.8rem;
    color: var(--ink-3);
    max-width: 46ch;
    line-height: 1.45;
}

.uploader__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin: 0.45rem 0 0.3rem;
}

.uploader__chips span {
    font-size: 0.71rem;
    font-weight: 650;
    color: var(--brand-deep);
    background: var(--brand-soft);
    border-radius: var(--r-pill);
    padding: 0.15rem 0.5rem;
}

.uploader__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.media-queue {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.media-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--r-sm);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-item__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0;
    background: rgba(9, 26, 20, 0.72);
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.media-summary {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--brand-deep);
}

.imgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.55rem;
}

.imgitem {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--r-sm);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.imgitem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.imgitem.is-removed {
    opacity: 0.45;
}

.imgitem.is-removed::after {
    content: "Removing";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 750;
    color: #fff;
    background: rgba(178, 42, 36, 0.62);
}

.imgitem__rm {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 0;
    background: rgba(9, 26, 20, 0.72);
    color: #fff;
    cursor: pointer;
}

.imgitem__rm input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}

.attrrow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 34px;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    align-items: center;
}

.attrrow__rm {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink-3);
    cursor: pointer;
}

.attrrow__rm:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.formactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-2);
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    list-style: none;
}

.checklist li {
    display: flex;
    gap: 0.5rem;
    font-size: 0.83rem;
    line-height: 1.45;
    color: var(--ink-2);
}

.checklist svg {
    flex: none;
    margin-top: 2px;
    color: var(--brand);
}

.checklist b {
    display: block;
    color: var(--ink);
    font-size: 0.85rem;
}

.admintop {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.admintop h1 {
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}

.docwrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 1.8rem;
    align-items: start;
    padding-bottom: 3rem;
}

.doc {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.5rem 1.6rem;
    box-shadow: var(--sh-1);
}

.doc h2 {
    font-size: 1.08rem;
    letter-spacing: -0.015em;
    margin-bottom: 0.5rem;
}

.doc h2:not(:first-child) {
    margin-top: 1.5rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--line);
}

.docsec {
    padding-bottom: 1.35rem;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid var(--line);
}

.docsec--last {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.docsec__title {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 0.5rem;
}

.docsec__num {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0;
}

.docsec__text {
    font-size: 0.92rem;
    line-height: 1.72;
    color: var(--ink-2);
    margin-bottom: 0.8rem;
}

.doc h3 {
    font-size: 0.95rem;
    margin: 1.15rem 0 0.35rem;
}

.doc p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--ink-2);
    margin-bottom: 0.7rem;
}

.doc ul,
.doc ol {
    margin: 0 0 0.9rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.doc li {
    font-size: 0.91rem;
    line-height: 1.65;
    color: var(--ink-2);
}

.doc a:not(.btn) {
    color: var(--brand-strong);
    font-weight: 600;
}

.docnav {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.docnav__title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.docnav__title:not(:first-child) {
    margin-top: 0.7rem;
}

.docnav .dlist a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--ink-2);
    text-decoration: none;
    padding: 0.15rem 0.35rem;
    border-radius: var(--r-xs);
}

.docnav .dlist a svg {
    flex: none;
    color: var(--ink-3);
}

.docnav .dlist a:hover {
    background: var(--surface-2);
    color: var(--brand-deep);
}

.docnav > p:last-child {
    margin: 0.45rem 0 0;
    line-height: 1.5;
}

.docnav__links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    list-style: none;
    margin: 0.15rem 0 0.5rem;
    padding: 0;
}

.docnav__link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.55rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 650;
    line-height: 1.3;
    text-decoration: none;
    transition: background var(--fast), border-color var(--fast), color var(--fast);
}

.docnav__link-icon {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: var(--r-xs);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--brand-strong);
}

.docnav__link-label {
    flex: 1 1 auto;
    min-width: 0;
}

.docnav__link-go {
    flex: none;
    color: var(--muted);
    transition: transform var(--fast), color var(--fast);
}

.docnav__link:hover,
.docnav__link:focus-visible {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-deep);
}

.docnav__link:hover .docnav__link-go,
.docnav__link:focus-visible .docnav__link-go {
    color: var(--brand-deep);
    transform: translateX(2px);
}

.docnav__cta {
    margin-top: 0.15rem;
}

.infogrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.9rem;
    padding-bottom: 1.2rem;
}

.infocard {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.15rem 1.2rem;
    box-shadow: var(--sh-1);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.infocard__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: var(--brand-soft);
    color: var(--brand-strong);
    margin-bottom: 0.2rem;
}

.infocard h2,
.infocard h3 {
    font-size: 0.98rem;
    letter-spacing: -0.01em;
}

.infocard p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--ink-2);
}

.adminbar {
    background: var(--brand-night);
    color: #eef4f0;
}

.adminbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
}

.adminbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.15;
}

.adminbar__brand b {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.adminbar__brand span span {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(238, 244, 240, 0.6);
}

.adminbar__brand .brand__mark {
    background: var(--amber);
    color: #1a1206;
}

.adminbar__links {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.82rem;
}

.adminbar__links .link {
    color: rgba(238, 244, 240, 0.82);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.adminbar__links .link:hover {
    color: #fff;
}

.adminbar__user {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(238, 244, 240, 0.72);
}

.adminbar__links .btn--ghost {
    border-color: rgba(238, 244, 240, 0.26);
    color: #eef4f0;
}

.adminbar__links .btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.adminlayout {
    padding-top: 1.5rem;
}

.figlist {
    display: grid;
    gap: 0.55rem;
}

.figrow {
    display: grid;
    grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--ink-2);
}

.figrow__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.figrow__num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--ink);
}

.actionrow {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.55rem;
}

.actionrow .field {
    flex: 1 1 15rem;
    min-width: 0;
}

.queue__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.9rem;
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.queue__meta .pin {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.queue__body {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: 0.95rem 1.15rem;
    border-top: 1px solid var(--line);
}

.queue__body img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--r-sm);
    background: var(--surface-2);
}

.queue__body p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--ink-2);
    margin-bottom: 0.45rem;
}

.queue__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.85rem 1.15rem;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 1080px) {
    .authwrap__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .authside {
        position: static;
        order: -1;
    }

    .publayout {
        grid-template-columns: minmax(0, 1fr);
    }

    .pubside {
        position: static;
    }

    .docwrap {
        grid-template-columns: minmax(0, 1fr);
    }

    .docnav {
        position: static;
        order: -1;
    }
}

@media (max-width: 900px) {
    .shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
        padding-top: 1rem;
    }

    .shell__side {
        position: static;
    }

    .sidenav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.2rem;
        padding: 0.35rem;
    }

    .sidenav__label {
        grid-column: 1 / -1;
        padding-bottom: 0;
    }
}

@media (max-width: 640px) {
    .authcard__head,
    .authcard__body,
    .authcard__foot {
        padding-left: 1.15rem;
        padding-right: 1.15rem;
    }

    .fcard {
        padding: 1rem 1rem 1.15rem;
    }

    .attrrow {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
    }

    .formactions {
        flex-direction: column;
        align-items: stretch;
    }

    .formactions .btn {
        width: 100%;
    }

    .doc {
        padding: 1.15rem;
    }

    .adminbar__inner {
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .adminbar__links {
        width: 100%;
        justify-content: space-between;
    }

    .adminbar__user {
        display: none;
    }

    .split {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .queue__body {
        grid-template-columns: minmax(0, 1fr);
    }

    .queue__body img {
        max-width: 200px;
    }

    .figrow {
        grid-template-columns: minmax(0, 5.5rem) minmax(0, 1fr) auto;
    }
}

@media (min-width: 1200px) {
    .docsec__text {
        max-width: 74ch;
    }

    .doc p,
    .doc li {
        max-width: 78ch;
    }
}
