/* =========================================================
   西柳中学学生会信息技术部 · 内容管理后台
   ========================================================= */

:root {
    --ink: #17271d;
    --ink-soft: #405045;
    --forest: #0f4d35;
    --forest-deep: #092f21;
    --forest-mid: #1a6347;
    --lime: #d9f36c;
    --lime-soft: #eef8c3;
    --cream: #f2efe4;
    --cream-deep: #e8e3d4;
    --paper: #fbfaf5;
    --white: #ffffff;
    --canvas: #f4f1e8;
    --muted: #6d7c71;
    --muted-light: #97a198;
    --line: rgba(23, 39, 29, 0.12);
    --line-strong: rgba(23, 39, 29, 0.22);
    --danger: #b24d38;
    --danger-bg: #f9ece6;
    --sans: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
    --serif: "STZhongsong", "Songti SC", "SimSun", "Source Han Serif SC", serif;
    --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
    --sidebar: 252px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body.admin-nav-open {
    overflow: hidden;
}

img,
video,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
    cursor: pointer;
}

p,
h1,
h2,
h3,
h4,
figure,
dl,
dd {
    margin: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--forest);
    outline-offset: 3px;
}

::selection {
    color: var(--forest-deep);
    background: var(--lime);
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 999;
    padding: 9px 14px;
    color: var(--white);
    background: var(--forest-deep);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: none;
}

.kicker {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

/* ---------- layout ---------- */
.admin-layout {
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: flex;
    width: var(--sidebar);
    flex-direction: column;
    padding: 26px 20px 20px;
    overflow-y: auto;
    color: var(--paper);
    background:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        var(--forest-deep);
    background-size: 64px 64px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 5px;
}

.admin-brand__mark {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: var(--white);
}

.admin-brand__mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-brand > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.admin-brand strong {
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.admin-brand small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.37);
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 0.1em;
}

.admin-side-context {
    padding: 28px 5px 17px;
    margin-top: 17px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-side-context span {
    color: var(--lime);
    font-family: var(--mono);
    font-size: 7.5px;
    letter-spacing: 0.12em;
}

.admin-side-context p {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.47);
    font-size: 10px;
    letter-spacing: 0.05em;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 7px;
}

.admin-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: rgba(255, 255, 255, 0.62);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.admin-nav__link svg {
    flex: 0 0 auto;
    opacity: 0.8;
}

.admin-nav__link > span {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 12.5px;
    font-weight: 600;
}

.admin-nav__link em {
    color: rgba(255, 255, 255, 0.27);
    font-family: var(--mono);
    font-size: 7px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.admin-nav__link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.admin-nav__link.is-active {
    border-color: rgba(217, 243, 108, 0.18);
    color: var(--forest-deep);
    background: var(--lime);
}

.admin-nav__link.is-active em {
    color: rgba(9, 47, 33, 0.48);
}

.admin-nav__link.is-active svg {
    opacity: 1;
}

.admin-side-bottom {
    padding-top: 22px;
    margin-top: auto;
}

.admin-view-site {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    font-size: 10px;
    transition: color 0.2s ease;
}

.admin-view-site:hover {
    color: var(--lime);
}

.admin-logout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px;
    border: 0;
    color: rgba(255, 255, 255, 0.45);
    background: transparent;
    font-size: 10px;
    transition: color 0.2s ease;
}

.admin-logout:hover {
    color: var(--white);
}

.admin-side-meta {
    padding: 19px 12px 0;
    color: rgba(255, 255, 255, 0.22);
    font-family: var(--mono);
    font-size: 7px;
    line-height: 1.8;
    letter-spacing: 0.08em;
}

.admin-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(5, 22, 14, 0.55);
    backdrop-filter: blur(2px);
}

.admin-shell {
    min-height: 100vh;
    margin-left: var(--sidebar);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    min-height: 82px;
    align-items: center;
    gap: 20px;
    padding: 13px clamp(22px, 3vw, 42px);
    border-bottom: 1px solid var(--line);
    background: rgba(251, 250, 245, 0.95);
    backdrop-filter: blur(14px);
}

.admin-menu {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: transparent;
}

.admin-menu span {
    display: block;
    width: 16px;
    height: 1px;
    margin: 4px auto;
    background: var(--ink);
}

.admin-topbar__title {
    min-width: 0;
}

.admin-topbar__title > span {
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 0.11em;
}

.admin-topbar__title h1 {
    margin-top: 2px;
    overflow: hidden;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-topbar__actions {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.admin-topbar__new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    font-size: 10.5px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.admin-topbar__new:hover {
    border-color: var(--forest);
    color: var(--lime);
    background: var(--forest);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 21px;
    border-left: 1px solid var(--line);
}

.admin-user__avatar {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 50%;
    color: var(--lime);
    background: var(--forest);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
}

.admin-user__copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.3;
}

.admin-user__copy strong {
    font-size: 10.5px;
    font-weight: 600;
}

.admin-user__copy small {
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 7.5px;
}

.admin-main {
    width: 100%;
    max-width: 1560px;
    padding: clamp(24px, 3vw, 40px);
    margin: 0 auto;
}

/* ---------- shared UI ---------- */
.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.admin-button:hover {
    transform: translateY(-1px);
}

.admin-button--primary {
    color: var(--paper);
    background: var(--forest);
}

.admin-button--primary:hover {
    background: var(--forest-deep);
}

.admin-button--quiet {
    border-color: var(--line-strong);
    color: var(--ink-soft);
    background: transparent;
}

.admin-button--quiet:hover {
    border-color: var(--forest);
    color: var(--forest);
    background: rgba(15, 77, 53, 0.04);
}

.admin-button.is-loading {
    opacity: 0.68;
    pointer-events: none;
}

.admin-link,
.admin-text-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--forest);
    font-size: 10px;
    font-weight: 600;
}

.admin-link:hover span,
.admin-text-link:hover span {
    transform: translateX(3px);
}

.admin-link span,
.admin-text-link span {
    transition: transform 0.2s ease;
}

.admin-pagehead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    padding-bottom: 23px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.admin-pagehead h2 {
    margin-top: 5px;
    font-family: var(--serif);
    font-size: clamp(27px, 2.8vw, 38px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.045em;
}

.admin-pagehead > div > p:last-child {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10.5px;
}

.admin-panel {
    border: 1px solid var(--line);
    background: var(--paper);
}

.admin-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 21px 23px 17px;
    border-bottom: 1px solid var(--line);
}

.admin-panel__head h3 {
    margin-top: 4px;
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.admin-panel__count {
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 8px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.status-pill--published {
    color: var(--forest);
    background: #e7f2db;
}

.status-pill--draft {
    color: #8a6a21;
    background: #f4ecd3;
}

.admin-empty {
    padding: 45px 24px;
    text-align: center;
}

.admin-empty__mark {
    display: block;
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.11em;
}

.admin-empty h3 {
    margin-top: 9px;
    font-family: var(--serif);
    font-size: 25px;
    letter-spacing: -0.03em;
}

.admin-empty p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 10.5px;
}

.admin-empty .admin-button {
    margin-top: 18px;
}

.admin-empty--large {
    padding: 85px 24px;
}

/* ---------- flash / notices ---------- */
.flash-stack {
    margin-bottom: 20px;
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--forest);
    background: var(--paper);
    font-size: 11px;
}

.flash--success {
    border-left-color: var(--forest);
    background: #eef5e5;
}

.flash--error {
    border-left-color: var(--danger);
    background: var(--danger-bg);
}

.flash + .flash {
    margin-top: 7px;
}

.flash__close {
    border: 0;
    color: inherit;
    background: transparent;
    font-size: 18px;
    line-height: 1;
}

.admin-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
    margin-bottom: 20px;
    border: 1px solid #dfcf9f;
    border-left: 3px solid #b7902e;
    background: #fbf4dd;
}

.admin-alert strong {
    font-size: 11px;
}

.admin-alert p {
    margin-top: 2px;
    color: #806b35;
    font-size: 9.5px;
}

.admin-alert > a {
    flex: 0 0 auto;
    color: #7e631f;
    font-size: 10px;
    font-weight: 600;
}

/* ---------- dashboard ---------- */
.dash-welcome {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 24px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.dash-welcome h2 {
    margin-top: 6px;
    font-family: var(--serif);
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.045em;
}

.dash-welcome p:last-child {
    margin-top: 7px;
    color: var(--muted);
    font-size: 10.5px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    position: relative;
    min-height: 160px;
    padding: 19px 20px 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--paper);
}

.stat-card--green {
    color: var(--paper);
    background: var(--forest);
}

.stat-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.05em;
}

.stat-card--green .stat-card__top {
    color: rgba(255, 255, 255, 0.48);
}

.stat-card__icon {
    font-size: 14px;
    line-height: 1;
}

.stat-card > strong {
    display: block;
    margin-top: 17px;
    font-family: var(--serif);
    font-size: clamp(34px, 3.4vw, 48px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.05em;
}

.stat-card > p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 9.5px;
}

.stat-card--green > p {
    color: rgba(255, 255, 255, 0.48);
}

.stat-card__line {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--lime);
    transform: scaleX(0.34);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.stat-card:hover .stat-card__line {
    transform: scaleX(1);
}

.stat-card--green .stat-card__line {
    background: var(--lime);
}

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 335px;
    gap: 20px;
    align-items: start;
}

.dash-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-list {
    padding: 3px 23px;
}

.recent-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 15px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.recent-row:last-child {
    border-bottom: 0;
}

.recent-row__thumb {
    display: block;
    aspect-ratio: 1.38;
    overflow: hidden;
    background: var(--cream);
}

.recent-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recent-row:hover .recent-row__thumb img {
    transform: scale(1.04);
}

.recent-row__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 7.5px;
}

.recent-row__copy h4 {
    margin-top: 4px;
    overflow: hidden;
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-row__copy h4 a:hover {
    color: var(--forest);
}

.recent-row__copy p {
    margin-top: 2px;
    color: var(--muted-light);
    font-size: 8.5px;
}

.recent-row__actions {
    display: flex;
    gap: 5px;
}

.recent-row__actions a {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.recent-row__actions a:hover {
    border-color: var(--forest);
    color: var(--lime);
    background: var(--forest);
}

.category-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 19px 23px 23px;
}

.bar-row__label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--ink-soft);
    font-size: 9.5px;
}

.bar-row__label span:last-child {
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 7.5px;
}

.bar-row__track {
    height: 4px;
    overflow: hidden;
    background: var(--cream-deep);
}

.bar-row__track span {
    display: block;
    height: 100%;
    background: var(--forest);
    transition: width 0.8s ease;
}

.system-list {
    padding: 9px 23px 13px;
}

.system-list > div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 7px 0;
    border-bottom: 1px dotted var(--line);
    font-size: 9.5px;
}

.system-list > div:last-child {
    border-bottom: 0;
}

.system-list dt {
    color: var(--muted);
}

.system-list dd {
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 8.5px;
}

.system-panel > .admin-text-link {
    margin: 4px 23px 20px;
}

/* ---------- article table ---------- */
.admin-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    padding: 12px;
    margin-bottom: 17px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.admin-search {
    display: flex;
    min-width: 220px;
    flex: 1;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: var(--white);
}

.admin-search svg {
    flex: 0 0 auto;
    color: var(--muted-light);
}

.admin-search input {
    width: 100%;
    height: 38px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 10.5px;
}

.admin-search input::placeholder {
    color: var(--muted-light);
}

.admin-select select {
    height: 40px;
    min-width: 126px;
    padding: 0 32px 0 12px;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink-soft);
    background: var(--white);
    font-size: 10px;
    outline: none;
    cursor: pointer;
}

.admin-filter__reset {
    padding: 0 5px;
    color: var(--muted);
    font-size: 9.5px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-table-panel {
    overflow: hidden;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.admin-table th {
    padding: 12px 15px;
    border-bottom: 1px solid var(--line);
    color: var(--muted-light);
    background: #f7f4eb;
    font-family: var(--mono);
    font-size: 7.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table td {
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 10.5px;
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr {
    transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
    background: #f8f5ed;
}

.admin-table .align-right {
    text-align: right;
}

.table-article {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 310px;
}

.table-article__thumb {
    display: block;
    width: 66px;
    height: 46px;
    flex: 0 0 auto;
    overflow: hidden;
    background: var(--cream);
}

.table-article__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.table-article > div {
    min-width: 0;
}

.table-article__title {
    display: block;
    max-width: 390px;
    overflow: hidden;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.table-article__title:hover {
    color: var(--forest);
}

.table-article__excerpt {
    display: block;
    max-width: 370px;
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted-light);
    font-size: 8.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-category {
    color: var(--muted);
    font-size: 9.5px;
    white-space: nowrap;
}

.table-number {
    font-family: var(--mono);
    font-size: 9px;
}

.table-date {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8.5px;
    white-space: nowrap;
}

.table-date small {
    display: block;
    color: var(--muted-light);
    font-size: 7.5px;
}

.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    opacity: 0.62;
    transition: opacity 0.2s ease;
}

.admin-table tr:hover .row-actions {
    opacity: 1;
}

.row-actions form {
    display: inline-flex;
    margin: 0;
}

.row-actions a,
.row-actions button {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    line-height: 1;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.row-actions a:hover,
.row-actions button:hover {
    border-color: var(--forest);
    color: var(--lime);
    background: var(--forest);
}

.row-actions .is-danger:hover {
    border-color: var(--danger);
    color: var(--white);
    background: var(--danger);
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 17px;
    border-top: 1px solid var(--line);
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 8px;
}

.admin-pagination > div {
    display: flex;
    gap: 16px;
}

.admin-pagination a {
    color: var(--forest);
    transition: opacity 0.2s ease;
}

.admin-pagination a:hover {
    opacity: 0.65;
}

/* ---------- editor ---------- */
.editor-pagehead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    padding-bottom: 20px;
    margin-bottom: 19px;
    border-bottom: 1px solid var(--line);
}

.editor-back {
    color: var(--muted);
    font-size: 9.5px;
    transition: color 0.2s ease;
}

.editor-back:hover {
    color: var(--forest);
}

.editor-pagehead h2 {
    margin-top: 7px;
    font-family: var(--serif);
    font-size: clamp(26px, 2.6vw, 36px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.04em;
}

.editor-pagehead > div > p:last-child {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.editor-pagehead__status {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.editor-errors {
    padding: 15px 18px;
    margin-bottom: 16px;
    border: 1px solid #e2c4ba;
    border-left: 3px solid var(--danger);
    background: var(--danger-bg);
}

.editor-errors strong {
    color: #7a2e1e;
    font-size: 11px;
}

.editor-errors ul {
    padding-left: 17px;
    margin-top: 6px;
    color: #8e4230;
    font-size: 10px;
}

.editor-form {
    position: relative;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 18px;
    align-items: start;
}

.editor-main {
    min-width: 0;
}

.editor-side {
    position: sticky;
    top: 103px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.editor-panel {
    border: 1px solid var(--line);
    background: var(--paper);
}

.editor-title-panel {
    padding: 22px 25px 15px;
    margin-bottom: 15px;
}

.editor-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 7.5px;
    letter-spacing: 0.08em;
}

.editor-label span {
    color: #a26a4b;
    font-size: 7px;
}

.title-input {
    display: block;
    width: 100%;
    min-height: 76px;
    padding: 12px 0 7px;
    overflow: hidden;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    background: transparent;
    font-family: var(--serif);
    font-size: clamp(25px, 2.8vw, 38px);
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.04em;
    outline: none;
    resize: none;
}

.title-input::placeholder {
    color: #b2b8ae;
}

.title-input:focus {
    border-bottom-color: var(--forest);
}

.title-input__foot {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 10px;
    color: var(--muted-light);
    font-size: 8.5px;
}

.title-input__foot b {
    color: var(--muted);
    font-family: var(--mono);
    font-weight: 500;
}

.editor-content-panel {
    margin-bottom: 15px;
}

.editor-toolbar {
    position: sticky;
    top: 82px;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    background: #f5f2e9;
    backdrop-filter: blur(8px);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.toolbar-group--end {
    margin-left: auto;
}

.toolbar-divider {
    width: 1px;
    height: 17px;
    margin: 0 5px;
    background: var(--line);
}

.editor-toolbar button {
    min-width: 29px;
    height: 29px;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: var(--ink-soft);
    background: transparent;
    font-family: var(--sans);
    font-size: 10px;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.editor-toolbar button:hover,
.editor-toolbar button.is-active {
    border-color: var(--line);
    color: var(--forest);
    background: var(--white);
}

.toolbar-insert {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px !important;
    border-color: var(--forest) !important;
    color: var(--lime) !important;
    background: var(--forest) !important;
    font-size: 9px !important;
}

.toolbar-insert:hover {
    background: var(--forest-deep) !important;
}

.rich-editor {
    min-height: 520px;
    padding: 29px 32px 38px;
    color: var(--ink-soft);
    background: var(--white);
    font-size: 14px;
    line-height: 1.9;
    outline: none;
    overflow-wrap: anywhere;
}

.rich-editor:empty::before {
    color: #aab3a8;
    content: attr(data-placeholder);
    pointer-events: none;
}

.rich-editor > *:first-child {
    margin-top: 0;
}

.rich-editor p {
    margin-top: 1.3em;
}

.rich-editor > p:first-child {
    color: var(--ink);
    font-size: 16px;
}

.rich-editor h2 {
    padding-top: 8px;
    margin-top: 2em;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 27px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.035em;
}

.rich-editor h3 {
    margin-top: 1.8em;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.45;
}

.rich-editor strong {
    color: var(--ink);
}

.rich-editor blockquote {
    padding: 18px 22px;
    margin: 1.8em 0;
    border-left: 3px solid var(--forest);
    color: var(--forest);
    background: var(--cream);
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.7;
}

.rich-editor blockquote p {
    margin: 0;
}

.rich-editor ul,
.rich-editor ol {
    padding-left: 1.4em;
    margin-top: 1.1em;
}

.rich-editor li {
    margin-top: 0.35em;
}

.rich-editor li::marker {
    color: var(--forest);
}

.rich-editor a {
    border-bottom: 1px solid currentColor;
    color: var(--forest);
}

.rich-editor hr {
    width: 70px;
    height: 1px;
    margin: 2.3em auto;
    border: 0;
    background: var(--line-strong);
}

.rich-editor figure {
    margin: 1.8em 0;
}

.rich-editor img,
.rich-editor video {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 2px;
    background: var(--cream);
}

.rich-editor video {
    width: 100%;
    background: #101a14;
}

.rich-editor figcaption {
    padding-top: 6px;
    color: var(--muted-light);
    font-size: 9px;
    text-align: center;
}

.rich-editor code {
    padding: 1px 4px;
    background: var(--cream);
    font-family: var(--mono);
    font-size: 0.9em;
}

.editor-content-foot {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 9px 16px;
    border-top: 1px solid var(--line);
    color: var(--muted-light);
    font-size: 8px;
}

.editor-content-foot span:first-child {
    color: var(--muted);
    font-family: var(--mono);
}

/* media panel */
.media-panel {
    padding: 22px;
}

.media-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 17px;
}

.media-panel__head h3 {
    margin-top: 4px;
    font-family: var(--serif);
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.media-panel__head p:last-child {
    max-width: 540px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.media-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 136px;
    padding: 20px;
    border: 1px dashed var(--line-strong);
    color: var(--muted);
    background: #f8f5ed;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.media-dropzone:hover,
.media-dropzone.is-dragging {
    border-color: var(--forest);
    background: #f1f6e9;
}

.media-dropzone__icon {
    display: grid;
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--forest);
    font-family: var(--mono);
    font-size: 18px;
    line-height: 1;
}

.media-dropzone strong {
    color: var(--ink-soft);
    font-size: 10.5px;
    font-weight: 600;
}

.media-dropzone > span:not(.media-dropzone__icon) {
    margin-top: 4px;
    color: var(--muted-light);
    font-size: 8.5px;
}

.media-dropzone em {
    max-width: 550px;
    margin-top: 7px;
    color: #997331;
    font-size: 8px;
    font-style: normal;
}

.media-upload-status {
    min-height: 0;
    color: var(--forest);
    font-size: 9px;
}

.media-upload-status:not(:empty) {
    padding: 9px 2px 0;
}

.media-upload-status.is-error {
    color: var(--danger);
}

.media-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 13px;
}

.media-list:empty {
    margin-top: 0;
}

.media-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0 12px;
    padding: 9px;
    border: 1px solid var(--line);
    background: var(--white);
}

.media-item__preview {
    position: relative;
    grid-row: span 2;
    aspect-ratio: 1.3;
    overflow: hidden;
    background: var(--cream);
}

.media-item__preview img,
.media-item__preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item__type {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 2px 4px;
    color: var(--lime);
    background: rgba(9, 47, 33, 0.78);
    font-family: var(--mono);
    font-size: 5.5px;
    letter-spacing: 0.06em;
}

.media-item__body {
    min-width: 0;
    align-self: center;
}

.media-item__body strong {
    display: block;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-item__body span {
    display: block;
    margin-top: 1px;
    overflow: hidden;
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 6.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-item__actions {
    display: flex;
    gap: 4px;
    align-self: end;
    margin-top: 4px;
}

.media-item__actions button {
    padding: 3px 6px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
    font-size: 7.5px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.media-item__actions button:hover {
    border-color: var(--forest);
    color: var(--lime);
    background: var(--forest);
}

.media-item__actions .is-danger:hover {
    border-color: var(--danger);
    color: var(--white);
    background: var(--danger);
}

.media-empty {
    padding: 22px 0 4px;
    color: var(--muted-light);
    text-align: center;
}

.media-empty span {
    font-family: var(--mono);
    font-size: 7.5px;
    letter-spacing: 0.08em;
}

.media-empty p {
    margin-top: 3px;
    font-size: 9px;
}

/* side panels */
.side-panel {
    padding: 20px;
}

.side-panel__head {
    padding-bottom: 14px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--line);
}

.side-panel__head h3 {
    margin-top: 4px;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.side-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 15px;
}

.side-field > span {
    color: var(--muted);
    font-size: 9px;
}

.side-field select,
.side-field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink-soft);
    background: var(--white);
    font-size: 10.5px;
    outline: none;
    transition: border-color 0.2s ease;
}

.side-field select {
    height: 40px;
    padding: 0 10px;
}

.side-field textarea {
    min-height: 105px;
    padding: 10px 11px;
    line-height: 1.75;
    resize: vertical;
}

.side-field select:focus,
.side-field textarea:focus {
    border-color: var(--forest);
}

.field-counter {
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 7.5px;
    text-align: right;
}

.check-field {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    cursor: pointer;
}

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

.check-field__box {
    position: relative;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin-top: 1px;
    border: 1px solid var(--line-strong);
    background: var(--white);
}

.check-field input:checked + .check-field__box {
    border-color: var(--forest);
    background: var(--forest);
}

.check-field input:checked + .check-field__box::after {
    position: absolute;
    top: 2px;
    left: 4px;
    width: 5px;
    height: 8px;
    border: solid var(--lime);
    border-width: 0 1.5px 1.5px 0;
    content: "";
    transform: rotate(45deg);
}

.check-field input:focus-visible + .check-field__box {
    outline: 2px solid var(--forest);
    outline-offset: 2px;
}

.check-field > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.check-field strong {
    font-size: 9.5px;
    font-weight: 600;
}

.check-field small {
    color: var(--muted-light);
    font-size: 8px;
}

.side-divider {
    height: 1px;
    margin: 17px 0;
    background: var(--line);
}

.cover-field__label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 9px;
}

.cover-field__label span:last-child {
    color: var(--muted-light);
    font-size: 7.5px;
}

.cover-preview {
    position: relative;
    display: flex;
    aspect-ratio: 1.34;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    overflow: hidden;
    border: 1px dashed var(--line-strong);
    color: var(--muted);
    background: #f8f5ed;
    text-align: center;
}

.cover-preview.has-image {
    border-style: solid;
}

.cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-preview__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 8.5px;
}

.cover-preview__loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--lime);
    background: rgba(9, 47, 33, 0.82);
    font-family: var(--mono);
    font-size: 8px;
}

.cover-preview.is-loading .cover-preview__loading {
    display: flex;
}

.cover-actions {
    display: flex;
    gap: 4px;
    margin-top: 7px;
}

.cover-actions button {
    flex: 1;
    min-height: 30px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
    font-size: 8px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.cover-actions button:hover:not(:disabled) {
    border-color: var(--forest);
    color: var(--forest);
    background: #f4f7ed;
}

.cover-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.side-tips {
    padding: 20px;
    color: var(--paper);
    background: var(--forest);
}

.side-tips .kicker {
    color: var(--lime);
}

.side-tips h3 {
    margin-top: 4px;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.side-tips ol {
    padding-left: 15px;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 8.5px;
    line-height: 1.8;
}

.side-tips li {
    margin-top: 4px;
}

.side-tips__quote {
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    color: var(--lime);
    font-family: var(--serif);
    font-size: 11px;
}

.editor-submitbar {
    position: sticky;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 14px;
    margin-top: 17px;
    border: 1px solid var(--line);
    background: rgba(251, 250, 245, 0.96);
    box-shadow: 0 -12px 30px rgba(23, 39, 29, 0.04);
    backdrop-filter: blur(10px);
}

.editor-submitbar__left {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted-light);
    font-size: 8px;
}

.editor-submitbar__left a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.editor-submitbar__actions {
    display: flex;
    gap: 7px;
}

/* ---------- account ---------- */
.account-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.account-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.account-panel {
    padding-bottom: 9px;
}

.account-form {
    padding: 20px 23px 13px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field__label {
    color: var(--ink-soft);
    font-size: 9.5px;
    font-weight: 600;
}

.field__control {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid var(--line);
    background: var(--white);
    transition: border-color 0.2s ease;
}

.field__control:focus-within {
    border-color: var(--forest);
}

.field__control svg {
    flex: 0 0 auto;
    color: var(--muted-light);
}

.field__control input {
    width: 100%;
    height: 40px;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 11px;
}

.field__control input:disabled {
    color: var(--muted-light);
}

.field__control--plain {
    padding: 0 11px;
}

.field__peek {
    display: grid;
    width: 29px;
    height: 29px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    background: transparent;
}

.field__peek span {
    position: relative;
    width: 16px;
    height: 10px;
    border: 1px solid var(--muted-light);
    border-radius: 50%;
}

.field__peek span::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--muted-light);
    content: "";
    transform: translate(-50%, -50%);
}

.field__peek.is-visible span {
    background: var(--cream);
}

.field small {
    color: var(--muted-light);
    font-size: 8px;
}

.account-form__actions {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-top: 5px;
}

.account-form__note {
    color: var(--muted-light);
    font-size: 8px;
}

.account-warning {
    padding: 4px 7px;
    color: #8a6a21;
    background: #f4ecd3;
    font-size: 8px;
}

.password-meter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin: -5px 0 14px;
}

.password-meter > span {
    height: 3px;
    background: var(--cream-deep);
    transition: background 0.2s ease;
}

.password-meter[data-strength="1"] > span:nth-child(1) {
    background: #c65b41;
}

.password-meter[data-strength="2"] > span:nth-child(-n+2) {
    background: #c79a37;
}

.password-meter[data-strength="3"] > span:nth-child(-n+3) {
    background: #7d9e46;
}

.password-meter[data-strength="4"] > span {
    background: var(--forest);
}

.password-meter p {
    grid-column: 1 / -1;
    margin-top: 2px;
    color: var(--muted-light);
    font-size: 8px;
}

.account-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.account-info {
    padding: 22px;
}

.account-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.account-identity__avatar {
    display: grid;
    width: 49px;
    height: 49px;
    place-items: center;
    border-radius: 50%;
    color: var(--lime);
    background: var(--forest);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
}

.account-identity > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-identity strong {
    font-family: var(--serif);
    font-size: 15px;
}

.account-identity span {
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 8px;
}

.account-meta {
    padding-top: 11px;
}

.account-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 6px 0;
    font-size: 9px;
}

.account-meta dt {
    color: var(--muted);
}

.account-meta dd {
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 8px;
}

.status-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 4px;
    border-radius: 50%;
    background: #5b9b4a;
}

.account-tips {
    padding: 21px;
}

.account-tips h3 {
    margin-top: 4px;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
}

.account-tips ul {
    padding-left: 14px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.8;
}

.account-tips li {
    margin-top: 4px;
}

/* ---------- login ---------- */
.admin-login-body {
    overflow-x: hidden;
    background: var(--paper);
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    min-height: 100vh;
}

.login-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(30px, 5vw, 58px) clamp(30px, 6vw, 84px);
    color: var(--paper);
    background:
        radial-gradient(ellipse at 18% 88%, rgba(217, 243, 108, 0.16), transparent 40%),
        var(--forest-deep);
}

.login-brand-panel__grid {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 82px 82px;
    mask-image: linear-gradient(180deg, #000, transparent 94%);
    pointer-events: none;
}

.login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    align-self: flex-start;
}

.login-brand > span {
    width: 47px;
    height: 47px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: var(--white);
}

.login-brand img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-brand strong {
    display: flex;
    flex-direction: column;
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.login-brand small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.39);
    font-family: var(--sans);
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.login-brand-panel__copy {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: auto 0;
    padding: 65px 0;
}

.login-brand-panel__copy h1 {
    margin-top: 23px;
    font-family: var(--serif);
    font-size: clamp(50px, 6.2vw, 94px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.08em;
}

.login-brand-panel__copy > p:last-child {
    max-width: 430px;
    margin-top: 27px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12.5px;
    line-height: 1.9;
}

.login-brand-panel__foot {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.3);
    font-family: var(--mono);
    font-size: 7.5px;
    letter-spacing: 0.1em;
}

.login-brand-panel__mark {
    position: absolute;
    right: -0.1em;
    bottom: -0.36em;
    color: rgba(255, 255, 255, 0.035);
    font-family: var(--serif);
    font-size: 38vw;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.12em;
    pointer-events: none;
}

.login-form-panel {
    display: flex;
    flex-direction: column;
    padding: 30px clamp(28px, 6vw, 90px) 22px;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(217, 243, 108, 0.12), transparent 38%),
        var(--paper);
}

.login-back {
    align-self: flex-start;
    color: var(--muted);
    font-size: 9.5px;
    transition: color 0.2s ease;
}

.login-back span {
    margin-right: 4px;
}

.login-back:hover {
    color: var(--forest);
}

.login-form-wrap {
    width: min(100%, 390px);
    margin: auto;
    padding: 40px 0;
}

.login-form-wrap h2 {
    margin-top: 9px;
    font-family: var(--serif);
    font-size: clamp(32px, 3.2vw, 42px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.05em;
}

.login-form__intro {
    max-width: 330px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.8;
}

.login-error {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    margin-top: 18px;
    border: 1px solid #e3c7bd;
    color: #8a3a26;
    background: var(--danger-bg);
    font-size: 10px;
    line-height: 1.6;
}

.login-error__icon {
    display: grid;
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--danger);
    font-family: var(--mono);
    font-size: 9px;
}

.login-form {
    margin-top: 25px;
}

.login-form .field {
    margin-bottom: 15px;
}

.login-form .field__label {
    color: var(--muted);
    font-size: 9px;
}

.login-form .field__control {
    min-height: 47px;
    background: var(--white);
}

.login-form .field__control input {
    height: 45px;
    font-size: 12px;
}

.login-submit {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    margin-top: 22px;
    border: 0;
    color: var(--paper);
    background: var(--forest);
    font-size: 11px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.login-submit:hover {
    background: var(--forest-deep);
    transform: translateY(-1px);
}

.login-hint {
    margin-top: 18px;
    color: var(--muted-light);
    font-size: 8.5px;
    line-height: 1.7;
    text-align: center;
}

.login-form-panel__foot {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted-light);
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 0.04em;
}

/* ---------- animations ---------- */
@keyframes admin-reveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.reveal {
    animation: admin-reveal 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.stat-grid .reveal:nth-child(2) { animation-delay: 0.04s; }
.stat-grid .reveal:nth-child(3) { animation-delay: 0.08s; }
.stat-grid .reveal:nth-child(4) { animation-delay: 0.12s; }

/* ---------- responsive ---------- */
@media (max-width: 1300px) {
    .dash-grid {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .editor-layout {
        grid-template-columns: minmax(0, 1fr) 285px;
    }
}

@media (max-width: 1160px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-grid {
        grid-template-columns: 1fr;
    }

    .dash-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-side {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .side-tips {
        grid-column: 1 / -1;
    }

    .account-grid {
        grid-template-columns: 1fr 290px;
    }
}

@media (max-width: 980px) {
    :root {
        --sidebar: 0px;
    }

    .admin-sidebar {
        width: 268px;
        transform: translateX(-103%);
        transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .admin-sidebar.is-open {
        transform: none;
    }

    .admin-menu {
        display: block;
    }

    .admin-topbar {
        min-height: 72px;
    }

    .admin-topbar__title > span {
        display: none;
    }

    .admin-topbar__title h1 {
        font-size: 20px;
    }

    .admin-main {
        padding: 24px 20px 40px;
    }

    .editor-toolbar {
        top: 72px;
    }

    .editor-side {
        top: auto;
    }

    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: 300px;
        padding: 26px 28px;
    }

    .login-brand-panel__copy {
        padding: 45px 0 20px;
    }

    .login-brand-panel__copy h1 {
        font-size: clamp(44px, 10vw, 66px);
    }

    .login-brand-panel__copy > p:last-child,
    .login-brand-panel__foot {
        display: none;
    }

    .login-form-panel {
        min-height: calc(100vh - 300px);
        padding: 24px 28px 20px;
    }

    .login-form-wrap {
        padding: 34px 0;
    }
}

@media (max-width: 760px) {
    .admin-topbar {
        gap: 12px;
        padding: 11px 16px;
    }

    .admin-topbar__new {
        width: 36px;
        padding: 0;
        font-size: 0;
        justify-content: center;
    }

    .admin-user {
        padding-left: 12px;
    }

    .admin-user__copy {
        display: none;
    }

    .admin-main {
        padding: 18px 14px 32px;
    }

    .admin-pagehead,
    .editor-pagehead,
    .dash-welcome {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .admin-pagehead > .admin-button,
    .dash-welcome > .admin-button {
        width: 100%;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .stat-card {
        min-height: 140px;
        padding: 15px;
    }

    .stat-card > strong {
        font-size: 34px;
    }

    .dash-side {
        grid-template-columns: 1fr;
    }

    .recent-list {
        padding: 0 14px;
    }

    .recent-row {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 10px;
    }

    .recent-row__actions {
        display: none;
    }

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

    .admin-search {
        min-width: 0;
    }

    .admin-select select {
        width: 100%;
    }

    .admin-filter .admin-button {
        width: 100%;
    }

    .admin-pagination {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

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

    .editor-title-panel {
        padding: 18px 18px 12px;
    }

    .rich-editor {
        min-height: 420px;
        padding: 22px 18px 30px;
    }

    .editor-toolbar {
        gap: 1px;
        padding: 7px;
    }

    .toolbar-divider {
        margin: 0 3px;
    }

    .toolbar-insert {
        width: 100%;
        margin-top: 4px;
    }

    .toolbar-group--end {
        width: 100%;
        margin-left: 0;
    }

    .editor-content-foot {
        flex-direction: column;
        gap: 3px;
    }

    .media-panel {
        padding: 18px;
    }

    .media-panel__head {
        flex-direction: column;
    }

    .media-panel__head .admin-button {
        width: 100%;
    }

    .media-list {
        grid-template-columns: 1fr;
    }

    .editor-side {
        grid-template-columns: 1fr;
    }

    .side-tips {
        grid-column: auto;
    }

    .editor-submitbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .editor-submitbar__actions {
        width: 100%;
    }

    .editor-submitbar__actions .admin-button {
        flex: 1;
    }

    .account-grid {
        grid-template-columns: 1fr;
    }

    .account-panel .admin-panel__head {
        padding: 18px;
    }

    .account-form {
        padding: 17px 18px 10px;
    }

    .account-side {
        order: -1;
    }

    .login-brand-panel {
        min-height: 235px;
    }

    .login-brand-panel__copy {
        padding-top: 28px;
    }

    .login-brand-panel__copy .kicker,
    .login-brand-panel__copy > p:last-child {
        display: none;
    }

    .login-brand-panel__copy h1 {
        margin-top: 0;
        font-size: 42px;
    }

    .login-form-panel {
        min-height: calc(100vh - 235px);
        padding: 20px 22px 18px;
    }

    .login-form-wrap {
        padding: 25px 0;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar__new {
        display: none;
    }

    .admin-user {
        margin-left: auto;
        border-left: 0;
    }

    .recent-row__copy p {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
