@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
    --sidebar: #101d33;
    --sidebar-deep: #0b1527;
    --bg: #eef3f9;
    --panel: #ffffff;
    --line: #d9e3ef;
    --line-soft: #e8eef6;
    --text: #152236;
    --muted: #6d7d92;
    --blue: #1f4fb8;
    --blue-soft: #eaf1ff;
    --red: #e33d3d;
    --red-soft: #fff0f0;
    --gold: #e3bd62;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--text);
    background: var(--bg);
}

.admin-layout-body {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 20% 0%, rgba(64, 118, 210, 0.22), transparent 28%),
        linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-deep) 100%);
    color: #d8e2f1;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 4px 8px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.admin-brand-mark {
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--blue);
    font-weight: 900;
}

.admin-brand strong,
.admin-brand span {
    display: block;
}

.admin-brand strong {
    max-width: 160px;
    color: #fff;
    font-size: 17px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-brand span {
    width: fit-content;
    margin-top: 8px;
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #b8c8df;
    background: rgba(255, 255, 255, 0.05);
    font-size: 13px;
    line-height: 1;
}

.admin-nav-label {
    margin: 0 8px 10px;
    color: rgba(216, 226, 241, 0.52);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.admin-nav {
    display: grid;
    gap: 7px;
}

.admin-nav a,
.admin-sidebar-footer a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    color: #d5dfef;
    text-decoration: none;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.admin-nav a::before {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #9eb0ca;
    background: rgba(255, 255, 255, 0.06);
    font-size: 13px;
    font-weight: 900;
    transition: color 0.2s ease, background 0.2s ease;
}

.admin-nav a[data-nav-key="overview"]::before {
    content: '总';
}

.admin-nav a[data-nav-key="categories"]::before {
    content: '类';
}

.admin-nav a[data-nav-key="software"]::before {
    content: '软';
}

.admin-nav a[data-nav-key="settings"]::before {
    content: '设';
}

.admin-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(2px);
}

.admin-nav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.075));
    box-shadow: inset 3px 0 0 var(--gold), 0 12px 22px rgba(0, 0, 0, 0.11);
}

.admin-nav a.active::before {
    color: #13213a;
    background: #f3c765;
}

.admin-sidebar-footer {
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-footer a {
    justify-content: center;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    color: #b9c7dc;
    font-size: 13px;
    font-weight: 700;
}

.admin-sidebar-footer a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.admin-sidebar-footer .sidebar-front-link {
    color: #dbe8ff;
    background: rgba(91, 142, 224, 0.16);
}

.admin-sidebar-footer .sidebar-logout-link {
    color: #f4c9c9;
    background: rgba(227, 61, 61, 0.1);
}

.admin-main {
    width: min(1260px, calc(100vw - 290px));
    padding: 24px 30px 54px;
}

.admin-page-title {
    margin-bottom: 20px;
    padding: 20px 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--line-soft);
}

.admin-page-title span,
.admin-card-head span {
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}

.admin-page-title h1,
.admin-card-head h2 {
    margin: 6px 0 0;
    font-size: 28px;
    line-height: 1.25;
}

.overview-page-title {
    display: none;
}

.overview-hero-card {
    position: relative;
    min-height: 230px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 30px;
    border: 1px solid rgba(58, 104, 174, 0.18);
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 8%, rgba(52, 112, 230, 0.22), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #eef6ff 58%, #eaf2ff 100%);
    box-shadow: 0 24px 60px rgba(39, 69, 112, 0.12);
}

.overview-hero-card::before {
    content: '';
    position: absolute;
    right: 360px;
    top: 28px;
    width: 82px;
    height: 82px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(31, 79, 184, 0.14), rgba(227, 189, 98, 0.2));
    transform: rotate(12deg);
}

.overview-hero-card::after {
    content: '';
    position: absolute;
    right: -68px;
    bottom: -92px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(31, 79, 184, 0.12);
}

.overview-hero-copy,
.overview-hero-panel {
    position: relative;
    z-index: 1;
}

.overview-hero-copy span,
.overview-panel-title {
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
}

.overview-hero-copy h2 {
    margin: 12px 0 10px;
    font-size: 34px;
    line-height: 1.18;
}

.overview-hero-copy p {
    max-width: 720px;
    margin: 0;
    color: #53677f;
    line-height: 1.8;
}

.overview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.overview-actions a,
.overview-card-head a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
}

.overview-actions a:first-child {
    color: #fff;
    background: linear-gradient(135deg, #1f65e8, #1749aa);
    box-shadow: 0 14px 28px rgba(31, 101, 232, 0.22);
}

.overview-actions a:last-child,
.overview-card-head a {
    color: var(--blue);
    background: #eef4ff;
}

.overview-hero-panel {
    display: grid;
    align-content: center;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 18px 42px rgba(38, 63, 100, 0.1);
    backdrop-filter: blur(8px);
}

.overview-hero-panel strong {
    margin-top: 8px;
    font-size: 28px;
}

.overview-pulse-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.overview-pulse-list span {
    min-height: 36px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 10px;
    color: #304159;
    background: #f4f8fd;
    font-weight: 700;
}

.admin-two-column {
    display: grid;
    grid-template-columns: 410px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.admin-card,
.stat-card {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(30, 50, 80, 0.08);
}

.admin-card {
    padding: 26px;
}

.wide-card {
    min-width: 0;
}

.settings-card {
    max-width: 1040px;
}

.password-settings-card {
    margin-top: 18px;
}

.site-logo-setting-row {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.site-logo-preview {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 1px solid #dbe5f0;
    border-radius: 18px;
    background: #f7fafe;
}

.site-logo-preview img {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    object-fit: contain;
}

.site-logo-actions {
    display: grid;
    gap: 10px;
}

.admin-card-head {
    margin-bottom: 22px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    position: relative;
    padding: 22px;
    overflow: hidden;
}

.overview-stats-grid {
    margin-bottom: 18px;
}

.overview-stats-grid .stat-card {
    min-height: 150px;
    border-radius: 16px;
}

.overview-stats-grid .stat-card::after {
    content: '';
    position: absolute;
    right: -28px;
    top: -28px;
    width: 112px;
    height: 112px;
    border-radius: 40px;
    background: rgba(31, 79, 184, 0.08);
    transform: rotate(18deg);
}

.overview-quick-strip {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff, #f7fbff);
    box-shadow: 0 20px 50px rgba(30, 50, 80, 0.08);
}

.overview-quick-title span {
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
}

.overview-quick-title h2 {
    margin: 8px 0 0;
    color: #14233a;
    font-size: 26px;
}

.overview-quick-title p {
    margin: 8px 0 0;
    color: var(--apple-admin-muted);
    font-size: 13px;
    line-height: 1.6;
}

.overview-quick-strip .overview-quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 15px;
    border-radius: 13px;
    color: #fff;
    font-weight: 900;
    background: var(--blue);
}

.stat-card-blue .stat-icon {
    background: linear-gradient(135deg, #1f65e8, #153f9c);
}

.stat-card-green .stat-icon {
    background: linear-gradient(135deg, #17a674, #0e8065);
}

.stat-card-gold .stat-icon {
    background: linear-gradient(135deg, #e3bd62, #bc8732);
}

.stat-card-red .stat-icon {
    background: linear-gradient(135deg, #ef6b5b, #d23d3d);
}

.stat-card span {
    color: var(--muted);
    font-size: 14px;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 34px;
}

.stat-card small {
    display: block;
    margin-top: 6px;
    color: #7a899b;
}

.overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    gap: 18px;
    align-items: start;
}

.overview-list-card,
.overview-side-card {
    border-radius: 16px;
}

.overview-list-card {
    min-height: 420px;
}

.overview-side-card {
    min-width: 0;
}

.overview-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

.overview-card-head span,
.overview-card-head h2 {
    grid-column: 1;
}

.overview-card-head a {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    min-height: 34px;
    padding: 0 13px;
    font-size: 13px;
}

.overview-software-list,
.overview-category-list,
.overview-quick-actions {
    display: grid;
    gap: 12px;
}

.overview-software-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 13px;
    border: 1px solid #edf2f8;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.overview-thumb {
    width: 54px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eef5ff;
    overflow: hidden;
}

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

.overview-thumb span {
    color: var(--blue);
    font-weight: 900;
}

.overview-software-item strong,
.overview-category-item strong,
.overview-quick-actions strong {
    display: block;
    color: #14233a;
    font-size: 15px;
}

.overview-software-item p,
.overview-category-item span,
.overview-quick-actions span {
    display: block;
    margin: 4px 0 0;
    color: #708198;
    font-size: 13px;
}

.overview-software-item em {
    padding: 6px 10px;
    border-radius: 999px;
    color: #11614b;
    background: #e9f8f2;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.overview-empty {
    padding: 24px;
    border-radius: 14px;
    color: var(--muted);
    background: #f6f9fd;
}

.overview-category-item {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #edf2f8;
    border-radius: 14px;
    background: #fff;
}

.overview-category-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf3fa;
}

.overview-category-bar i {
    display: block;
    height: 100%;
    min-width: 8px;
    border-radius: inherit;
    background: linear-gradient(90deg, #1f65e8, #61a0ff);
}

.overview-quick-actions a {
    display: block;
    padding: 16px;
    border: 1px solid #e9f0f8;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
    color: inherit;
    text-decoration: none;
}

.simple-form {
    display: grid;
    gap: 16px;
}

.simple-form label,
.simple-form .form-field {
    display: grid;
    gap: 8px;
}

.simple-form label span,
.simple-form .form-field > span {
    font-size: 14px;
    font-weight: 700;
    color: #304159;
}

.simple-form input,
.simple-form select,
.simple-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cfdced;
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.simple-form small {
    color: var(--muted);
    line-height: 1.6;
}

.upload-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px dashed #c8d6e8;
    border-radius: 8px;
    background: #fbfcfe;
}

.upload-preview[hidden] {
    display: none;
}

.upload-preview img {
    width: 70px;
    height: 54px;
    object-fit: cover;
    border-radius: 7px;
    background: #eef3f9;
}

.icon-preview img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.upload-preview span {
    color: var(--muted) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.inline-upload-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #cfdced;
    border-radius: 7px;
    background: #f8fafc;
}

.inline-upload-action span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.inline-upload-button {
    min-width: 92px;
    min-height: 40px;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(90deg, #2558c7, #153a94);
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.file-upload-button {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px !important;
    min-height: 50px;
    padding: 9px 10px;
    border: 1px solid #cfdced;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}

.file-upload-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.file-upload-button strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 6px;
    background: var(--blue);
    color: #fff;
    font-size: 13px;
}

.file-upload-button em {
    min-width: 0;
    color: var(--muted);
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-form {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-form .primary-button {
    grid-column: 1 / -1;
}

.media-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.media-card {
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.media-card h3 {
    margin: 0;
    font-size: 17px;
}

.muted-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.category-filter-status {
    margin-top: 8px;
    font-size: 13px;
}

.background-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.background-item {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 8px !important;
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
}

.background-item img {
    grid-column: 1 / -1;
    width: 100%;
    height: 92px;
    object-fit: cover;
    border-radius: 6px;
}

.background-item span,
.music-item span {
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.background-item input,
.music-item input {
    width: 16px;
    min-height: 16px;
    justify-self: end;
}

.background-item em,
.music-item em {
    grid-column: 1 / -1;
    color: var(--red);
    font-style: normal;
    font-size: 12px;
}

.music-list {
    display: grid;
    gap: 10px;
}

.music-item {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px !important;
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
}

.music-item audio {
    grid-column: 1 / -1;
    width: 100%;
    height: 34px;
}

.checkbox-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
}

.checkbox-row input {
    width: 18px;
    min-height: 18px;
}

.primary-button {
    min-height: 46px;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(90deg, #2558c7, #153a94);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.clean-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.clean-table th,
.clean-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}

.clean-table th {
    background: #f8fafc;
    color: #60718a;
    font-size: 13px;
}

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

.category-empty-row td {
    padding: 28px 12px;
    color: var(--muted);
    text-align: center;
}

.clean-table strong,
.clean-table small {
    display: block;
}

.clean-table small {
    max-width: 320px;
    margin-top: 3px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-thumb {
    width: 54px;
    height: 42px;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid var(--line-soft);
    background: #f4f7fb;
}

.admin-thumb-empty {
    display: inline-grid;
    place-items: center;
    color: #9aa8ba;
    font-size: 12px;
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.table-actions form {
    margin: 0;
}

.edit-link,
.delete-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.edit-link {
    color: #1452d9;
    background: var(--blue-soft);
}

.delete-link {
    color: var(--red);
    background: var(--red-soft);
}

.progress-card {
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f8fafc;
}

.progress-head,
.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.progress-track {
    height: 10px;
    margin: 10px 0;
    overflow: hidden;
    border-radius: 999px;
    background: #e5edf7;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: var(--blue);
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
}

.alert-success {
    color: #216d49;
    background: #eefbf4;
    border: 1px solid #c7ead5;
}

.alert-error {
    color: #9f3045;
    background: #fff2f4;
    border: 1px solid #f2c7cf;
}

.admin-login-body {
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 18%, rgba(75, 144, 255, 0.24), transparent 28%),
        radial-gradient(circle at 84% 26%, rgba(64, 126, 236, 0.18), transparent 24%),
        linear-gradient(135deg, #d9ebff 0%, #f7fbff 48%, #d8eaff 100%);
}

.admin-login-body::before,
.admin-login-body::after {
    content: '';
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
}

.admin-login-body::before {
    left: -8vw;
    bottom: -22vh;
    width: 86vw;
    height: 42vh;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 70px rgba(80, 148, 255, 0.12);
    transform: rotate(8deg);
}

.admin-login-body::after {
    right: 7vw;
    top: 7vh;
    width: 72px;
    height: 72px;
    background: rgba(191, 218, 255, 0.38);
}

.admin-login-shell {
    position: relative;
    z-index: 2;
    width: min(720px, calc(100vw - 28px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    place-items: center;
}

.admin-login-card {
    width: min(660px, 100%);
    padding: 62px 70px 36px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 34px 90px rgba(76, 122, 190, 0.22);
    backdrop-filter: blur(18px);
}

.login-brand-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.login-brand-line h1 {
    margin: 0;
    color: #16243a;
    font-size: 34px;
    line-height: 1.25;
    letter-spacing: 0.02em;
}

.admin-login-card p {
    margin: 28px 0 34px;
    color: #637184;
    text-align: center;
    font-size: 18px;
}

.admin-login-form {
    display: grid;
    gap: 20px;
}

.login-input-row {
    min-height: 64px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    border: 1px solid #d9e2ee;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.login-input-row svg {
    width: 23px;
    height: 23px;
    fill: #8b98a9;
}

.login-input-row input {
    width: 100%;
    min-height: 58px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1e2d44;
    font: inherit;
    font-size: 17px;
}

.login-input-row input::placeholder {
    color: #8a96a8;
}

.login-captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 12px;
}

.login-captcha-row .login-input-row {
    min-width: 0;
}

.login-captcha-image {
    width: 150px;
    height: 64px;
    border: 1px solid #d9e2ee;
    border-radius: 10px;
    background: #f4f7ff;
    cursor: pointer;
    object-fit: cover;
}

.login-help-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #1f73ff;
    font-size: 15px;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #2d4059;
}

.login-remember input {
    width: 19px;
    height: 19px;
}

.admin-login-form button {
    min-height: 64px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(90deg, #0f68ff, #1473ff);
    box-shadow: 0 16px 30px rgba(20, 106, 255, 0.28);
    font: inherit;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
}

.admin-login-card footer {
    margin-top: 36px;
    color: #7c8798;
    text-align: center;
    font-size: 15px;
}

.login-ornament {
    position: fixed;
    z-index: 1;
    pointer-events: none;
}

.login-ornament-left {
    left: 7vw;
    bottom: 18vh;
    width: 230px;
    height: 250px;
}

.login-ornament-right {
    right: 8vw;
    bottom: 18vh;
    width: 260px;
    height: 260px;
}

.download-box,
.shield-base {
    position: absolute;
    left: 34px;
    bottom: 0;
    width: 170px;
    height: 98px;
    border-radius: 22px;
    background: linear-gradient(145deg, #eaf4ff 0%, #196fff 80%);
    box-shadow: 0 32px 70px rgba(22, 107, 238, 0.28);
}

.download-box::before,
.shield-base::before {
    content: '';
    position: absolute;
    left: 28px;
    right: 28px;
    top: -54px;
    height: 78px;
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff, #cfe4ff);
    box-shadow: 0 16px 40px rgba(67, 131, 225, 0.18);
}

.download-arrow {
    position: absolute;
    left: 91px;
    bottom: 105px;
    width: 56px;
    height: 106px;
    border-radius: 20px 20px 8px 8px;
    background: linear-gradient(180deg, #69a4ff, #1268ef);
    box-shadow: 0 18px 34px rgba(18, 104, 239, 0.34);
}

.download-arrow::after {
    content: '';
    position: absolute;
    left: -28px;
    bottom: -30px;
    border-left: 56px solid transparent;
    border-right: 56px solid transparent;
    border-top: 56px solid #146cff;
}

.shield-base {
    left: 42px;
    width: 176px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f2f8ff, #d5e6ff);
}

.shield-mark {
    position: absolute;
    left: 70px;
    bottom: 54px;
    width: 120px;
    height: 142px;
    border-radius: 32px 32px 52px 52px;
    background: linear-gradient(145deg, #5da0ff, #1166f4);
    clip-path: polygon(50% 0, 100% 22%, 88% 78%, 50% 100%, 12% 78%, 0 22%);
    box-shadow: 0 28px 62px rgba(21, 102, 238, 0.34);
}

.shield-mark::after {
    content: '';
    position: absolute;
    left: 37px;
    top: 62px;
    width: 50px;
    height: 24px;
    border-left: 10px solid #fff;
    border-bottom: 10px solid #fff;
    transform: rotate(-45deg);
}

.float-cube {
    position: absolute;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(32, 120, 255, 0.82));
    box-shadow: 0 12px 26px rgba(31, 102, 214, 0.22);
}

.cube-one {
    left: 0;
    bottom: 150px;
}

.cube-two {
    right: 0;
    top: 20px;
    opacity: 0.42;
}

.cube-three {
    left: 0;
    top: 26px;
    opacity: 0.45;
}

.cube-four {
    right: 0;
    bottom: 98px;
}

.mini-badge {
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}

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

    .admin-sidebar {
        position: static;
        height: auto;
        padding: 18px;
    }

    .admin-brand {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .admin-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-sidebar-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 18px;
    }

    .admin-main {
        width: 100%;
        padding: 18px;
    }

    .admin-two-column,
    .stats-grid,
    .overview-hero-card,
    .overview-grid,
    .overview-quick-strip,
    .settings-form,
    .media-settings-grid,
    .background-gallery {
        grid-template-columns: 1fr;
    }

    .overview-quick-strip .overview-quick-actions {
        grid-template-columns: 1fr;
    }

    .overview-hero-card {
        padding: 22px;
    }

    .overview-hero-copy h2 {
        font-size: 28px;
    }

    .login-ornament {
        display: none;
    }

    .admin-login-card {
        padding: 36px 22px 26px;
    }

    .login-brand-line {
        display: grid;
        justify-items: center;
        gap: 14px;
        text-align: center;
    }

    .login-brand-line h1 {
        font-size: 25px;
    }

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

    .login-captcha-image {
        width: 100%;
    }
}

/* Apple-style backend refresh */
:root {
    --apple-admin-bg: #f5f5f7;
    --apple-admin-panel: rgba(255, 255, 255, 0.82);
    --apple-admin-panel-solid: #ffffff;
    --apple-admin-text: #1d1d1f;
    --apple-admin-muted: #6e6e73;
    --apple-admin-blue: #0071e3;
    --apple-admin-blue-deep: #0066cc;
    --apple-admin-line: rgba(0, 0, 0, 0.08);
    --apple-admin-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
}

body.admin-body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Noto Sans SC', sans-serif;
    color: var(--apple-admin-text);
    background:
        radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.92), transparent 24%),
        radial-gradient(circle at 80% 8%, rgba(0, 113, 227, 0.12), transparent 20%),
        var(--apple-admin-bg);
}

.admin-layout-body {
    grid-template-columns: 248px minmax(0, 1fr);
}

.admin-sidebar {
    margin: 14px 0 14px 14px;
    height: calc(100vh - 28px);
    padding: 18px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(28, 28, 30, 0.96), rgba(18, 18, 20, 0.96)),
        #1d1d1f;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.admin-brand {
    margin-bottom: 18px;
    padding: 6px 10px 18px;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.admin-brand strong {
    max-width: 180px;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.admin-brand span {
    padding: 5px 10px;
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(245, 245, 247, 0.78);
}

.admin-nav-label {
    color: rgba(245, 245, 247, 0.42);
    letter-spacing: 0.14em;
}

.admin-nav a,
.admin-sidebar-footer a {
    border-radius: 14px;
    color: rgba(245, 245, 247, 0.76);
}

.admin-nav a::before {
    border-radius: 10px;
    color: rgba(245, 245, 247, 0.62);
    background: rgba(255, 255, 255, 0.07);
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.admin-nav a.active::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34c759;
}

.admin-nav a.active::before {
    color: #fff;
    background: var(--apple-admin-blue);
}

.admin-sidebar-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.admin-sidebar-footer .sidebar-front-link,
.admin-sidebar-footer .sidebar-logout-link {
    background: rgba(255, 255, 255, 0.08);
}

.admin-sidebar-footer .sidebar-front-link {
    color: #f5f5f7;
}

.admin-sidebar-footer .sidebar-logout-link {
    color: #ffb4b4;
}

.admin-main {
    width: min(1240px, calc(100vw - 292px));
    padding: 28px 32px 58px;
}

.admin-page-title,
.admin-card,
.stat-card,
.overview-quick-strip,
.overview-hero-card {
    border: 1px solid var(--apple-admin-line);
    border-radius: 26px;
    background: var(--apple-admin-panel);
    box-shadow: var(--apple-admin-shadow);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.admin-page-title {
    padding: 24px 28px;
}

.admin-page-title span,
.admin-card-head span,
.overview-hero-copy span,
.overview-panel-title,
.overview-quick-title span {
    color: var(--apple-admin-blue);
    letter-spacing: 0.04em;
}

.admin-page-title h1,
.admin-card-head h2,
.overview-quick-title h2 {
    color: var(--apple-admin-text);
    letter-spacing: -0.035em;
}

.admin-card {
    padding: 24px;
}

.overview-quick-strip {
    grid-template-columns: 180px minmax(0, 1fr);
    background: rgba(255, 255, 255, 0.88);
}

.overview-quick-actions a,
.overview-software-item,
.overview-category-item,
.media-card,
.background-item,
.music-item,
.progress-card,
.upload-preview,
.file-upload-button,
.inline-upload-action {
    border-color: var(--apple-admin-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.overview-quick-actions a {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.overview-quick-actions a:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.overview-hero-card {
    background:
        radial-gradient(circle at 82% 18%, rgba(0, 113, 227, 0.12), transparent 26%),
        rgba(255, 255, 255, 0.84);
}

.overview-hero-card::before,
.overview-hero-card::after {
    display: none;
}

.overview-hero-copy h2 {
    color: var(--apple-admin-text);
    letter-spacing: -0.045em;
}

.overview-hero-copy p,
.stat-card span,
.stat-card small,
.overview-software-item p,
.overview-category-item span,
.overview-quick-actions span,
.simple-form small,
.muted-text {
    color: var(--apple-admin-muted);
}

.overview-hero-panel {
    border-color: var(--apple-admin-line);
    border-radius: 22px;
    background: rgba(245, 245, 247, 0.78);
    box-shadow: none;
}

.overview-actions a:first-child,
.primary-button,
.inline-upload-button,
.file-upload-button strong,
.admin-login-form button {
    background: var(--apple-admin-blue);
    box-shadow: 0 14px 30px rgba(0, 113, 227, 0.22);
}

.overview-actions a:first-child:hover,
.primary-button:hover,
.inline-upload-button:hover,
.file-upload-button:hover strong,
.admin-login-form button:hover {
    background: var(--apple-admin-blue-deep);
}

.overview-actions a:last-child,
.overview-card-head a,
.edit-link {
    color: var(--apple-admin-blue);
    background: rgba(0, 113, 227, 0.09);
}

.stat-card {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
}

.stat-icon {
    border-radius: 14px;
    background: #1d1d1f !important;
}

.simple-form input,
.simple-form select,
.simple-form textarea {
    min-height: 46px;
    border-color: var(--apple-admin-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    outline: 0;
}

.simple-form input:focus,
.simple-form select:focus,
.simple-form textarea:focus {
    border-color: rgba(0, 113, 227, 0.5);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.primary-button,
.inline-upload-button,
.file-upload-button strong,
.edit-link,
.delete-link {
    border-radius: 999px;
}

.delete-link {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.1);
}

.clean-table {
    border-color: var(--apple-admin-line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
}

.clean-table th {
    background: rgba(245, 245, 247, 0.94);
    color: var(--apple-admin-muted);
}

.clean-table th,
.clean-table td {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.admin-thumb,
.site-logo-preview,
.upload-preview img {
    border-radius: 16px;
}

.alert {
    border-radius: 18px;
}

.admin-login-body {
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.92), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(0, 113, 227, 0.16), transparent 24%),
        linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 100%);
}

.admin-login-body::before,
.admin-login-body::after,
.login-ornament {
    display: none;
}

.admin-login-shell {
    width: min(520px, calc(100vw - 28px));
}

.admin-login-card {
    width: 100%;
    padding: 38px;
    border: 1px solid var(--apple-admin-line);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.1);
}

.login-system-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, #1d1d1f, #4b4b50);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
    font-size: 28px;
    font-weight: 800;
}

.login-brand-line h1 {
    font-size: 30px;
    letter-spacing: -0.045em;
    text-align: center;
}

.admin-login-card p {
    margin: 14px 0 28px;
    color: var(--apple-admin-muted);
    font-size: 16px;
}

.login-input-row {
    min-height: 56px;
    border-color: var(--apple-admin-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
}

.login-input-row input {
    min-height: 52px;
    font-size: 16px;
}

.login-captcha-image {
    height: 56px;
    border-color: var(--apple-admin-line);
    border-radius: 16px;
}

.login-help-row {
    color: var(--apple-admin-muted);
}

.admin-login-form button {
    min-height: 56px;
    border-radius: 999px;
    font-size: 18px;
}

@media (max-width: 1120px) {
    .admin-sidebar {
        margin: 10px;
        height: auto;
        border-radius: 24px;
    }

    .admin-main {
        width: 100%;
        padding: 10px 14px 40px;
    }
}

@media (max-width: 640px) {
    .admin-login-card {
        padding: 28px 20px;
        border-radius: 24px;
    }

    .login-system-mark {
        width: 50px;
        height: 50px;
        border-radius: 16px;
        font-size: 24px;
    }
}
