﻿:root {
    --bg-1: #f7f3ed;
    --bg-2: #fff8ef;
    --panel: #fffdfa;
    --ink: #2d241f;
    --muted: #786960;
    --line: #e7d2c3;
    --brand: #d66a3d;
    --brand-dark: #b5532d;
    --danger: #c43f32;
    --shadow: 0 20px 40px rgba(95, 52, 27, 0.12);
}

* {
    box-sizing: border-box;
}

.admin-body {
    margin: 0;
    color: var(--ink);
    font-family: "Noto Sans SC", sans-serif;
    background:
        radial-gradient(circle at 10% 15%, rgba(214, 106, 61, 0.14), transparent 32%),
        radial-gradient(circle at 90% 85%, rgba(242, 190, 123, 0.18), transparent 30%),
        linear-gradient(140deg, var(--bg-1), var(--bg-2));
    min-height: 100vh;
}

h1,
h2,
.login-card h1 {
    margin: 0;
    font-family: "ZCOOL XiaoWei", serif;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.hint {
    color: var(--muted);
    margin: 8px 0 0;
}

.admin-container {
    width: min(1180px, 94%);
    margin: 30px auto 42px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-header h1 {
    font-size: clamp(1.6rem, 3vw, 2rem);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ghost-link {
    text-decoration: none;
    color: var(--brand);
    font-weight: 700;
}

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

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    box-shadow: var(--shadow);
}

.panel h2 {
    color: var(--brand-dark);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.panel h2 small {
    color: var(--muted);
    font-size: 0.88rem;
}

.manage-toolbar {
    margin-bottom: 14px;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 140px auto auto;
    gap: 8px;
    align-items: center;
}

.search-meta {
    margin: 8px 0 2px;
    color: var(--muted);
    font-size: 0.88rem;
}

.list {
    display: grid;
    gap: 10px;
    max-height: 520px;
    overflow: auto;
    padding-right: 2px;
}

.row {
    display: grid;
    gap: 8px;
    border: 1px dashed #e7cab5;
    border-radius: 12px;
    padding: 10px;
    background: #fffdf8;
}

.add-row {
    margin-bottom: 10px;
    background: #fff9f2;
}

textarea,
input[type="text"],
input[type="date"],
input[type="password"] {
    width: 100%;
    border: 1px solid #ddc1ae;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.94rem;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
}

select {
    width: 100%;
    border: 1px solid #ddc1ae;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.94rem;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
}

textarea:focus,
input[type="text"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
select:focus {
    outline: 2px solid rgba(214, 106, 61, 0.25);
    border-color: var(--brand);
}

button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--brand), #eb8c50);
    color: #fff;
    padding: 8px 15px;
    font-weight: 700;
    cursor: pointer;
    width: fit-content;
}

button:hover {
    filter: brightness(0.97);
}

button.danger {
    background: linear-gradient(120deg, var(--danger), #dc5d51);
}

.actions {
    display: flex;
    gap: 8px;
}

.meta,
.empty {
    color: var(--muted);
    font-size: 0.86rem;
}

.pagination {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-link {
    text-decoration: none;
    color: #fff;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--brand), #eb8c50);
    padding: 6px 12px;
    font-size: 0.86rem;
    font-weight: 700;
}

.page-info {
    color: var(--muted);
    font-size: 0.86rem;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    filter: blur(10px);
    z-index: 0;
}

.login-glow-a {
    background: rgba(214, 106, 61, 0.18);
    left: -90px;
    top: -70px;
}

.login-glow-b {
    background: rgba(244, 180, 96, 0.2);
    right: -120px;
    bottom: -120px;
}

.login-card {
    width: min(440px, 94%);
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 250, 0.95);
    box-shadow: var(--shadow);
    padding: 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-card h1 {
    font-size: 1.9rem;
}

.login-form {
    display: grid;
    gap: 10px;
    margin: 14px 0;
    text-align: left;
}

.login-form label {
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 700;
}

.login-form button {
    justify-self: stretch;
    text-align: center;
}

.error {
    margin: 12px 0 2px;
    color: var(--danger);
    font-weight: 700;
}

code {
    padding: 1px 6px;
    border-radius: 6px;
    border: 1px solid #eedccc;
    background: #fff7ef;
    color: #9b4d27;
}

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

    .search-form {
        grid-template-columns: 1fr;
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
