:root {
    color-scheme: light;
    --ink: #26384b;
    --ink-strong: #16283a;
    --muted: #7d8da0;
    --line: #e7edf2;
    --surface: #fff;
    --canvas: #f2f5f8;
    --accent: #34566f;
    --accent-pale: #edf3f7;
    --danger: #c85858;
    --shadow: 0 12px 35px rgba(30, 53, 74, .055);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; box-shadow: none !important; transform: none !important; }
a { color: inherit; }
[v-cloak] { display: none; }

/* Shared visual language with the music homepage */
.admin-header { height: 72px; position: sticky; top: 0; z-index: 70; background: rgba(255,255,255,.96); border-bottom: 1px solid #e8edf1; box-shadow: 0 3px 18px rgba(20,38,53,.035); backdrop-filter: blur(18px); }
.header-inner { max-width: 1680px; height: 100%; margin: auto; padding: 0 38px; display: flex; align-items: center; gap: 24px; }
.admin-brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--ink); text-decoration: none; font-size: 22px; font-weight: 750; letter-spacing: -.055em; }
.admin-brand strong { font-weight: 750; }
.brand-icon { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg, #293f54, #57758a); color: white; font-size: 24px; line-height: 1; letter-spacing: 0; box-shadow: 0 5px 12px rgba(39,66,87,.15); }
.header-location { display: inline-flex; align-items: center; gap: 20px; color: #8794a1; font-size: 13px; font-weight: 600; white-space: nowrap; }
.location-divider { width: 1px; height: 22px; background: #dce3e9; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-link { padding: 10px 14px; border-radius: 9px; text-decoration: none; color: #607184; font-size: 13px; font-weight: 600; transition: background .18s, color .18s; white-space: nowrap; }
.header-link:hover { background: #f1f5f8; color: var(--ink); }
.header-link span { font-size: 13px; margin-left: 3px; }
.header-link-strong { color: var(--accent); background: var(--accent-pale); }
.header-link-strong:hover { background: #e3edf3; }
.admin-identity { margin-left: 10px; padding-left: 20px; border-left: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.identity-avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; font-size: 13px; background: linear-gradient(140deg, #425f75, #263d52); }
.identity-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.identity-copy strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13px; }
.identity-copy small { color: #9ba6b0; font-size: 11px; margin-top: 2px; }

.admin-layout { max-width: 1680px; min-height: calc(100vh - 72px); margin: auto; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 72px; height: calc(100vh - 72px); display: flex; flex-direction: column; padding: 28px 18px 24px; background: var(--surface); border-right: 1px solid var(--line); }
.tab-bar { display: flex; flex-direction: column; gap: 5px; }
.tab-btn { min-height: 47px; width: 100%; border: 0; border-radius: 10px; background: transparent; color: #65778a; display: flex; align-items: center; gap: 12px; padding: 0 14px; text-align: left; font-size: 13px; font-weight: 630; transition: background .18s, color .18s, transform .18s; }
.tab-btn:hover { background: #f2f6f8; color: var(--ink); transform: translateX(2px); }
.tab-btn.active { background: #eaf1f5; color: #263f54; font-weight: 750; box-shadow: inset 3px 0 #3d6078; }
.nav-icon { width: 25px; flex: 0 0 25px; text-align: center; font-size: 19px; line-height: 1; font-weight: 500; }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 7px; background: #edf1f4; color: #83909d; font-size: 10px; font-variant-numeric: tabular-nums; }
.tab-btn.active .nav-count { background: #d9e5ed; color: #34556b; }
.sidebar-utility { min-height: 43px; margin-top: 24px; padding: 0 14px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); color: #71889a; font-size: 12px; font-weight: 650; text-decoration: none; }
.sidebar-utility:hover { color: #304e63; }
.utility-arrow { margin-left: auto; }
.admin-main { min-width: 0; padding: 32px clamp(24px, 4vw, 56px) 68px; }
.admin-surface { padding: 28px 30px 34px; background: var(--surface); border: 1px solid #e9edf1; border-radius: 17px; box-shadow: var(--shadow); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 23px; margin-bottom: 23px; border-bottom: 1px solid var(--line); }
.section-heading h1 { margin: 0; font-size: 23px; color: #25394b; letter-spacing: -.04em; }
.section-total { flex-shrink: 0; display: flex; align-items: baseline; gap: 7px; color: #91a0ac; font-size: 11px; }
.section-total strong { color: #344e62; font-size: 29px; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar input[type="text"] { width: auto; flex: 1 1 230px; min-width: 160px; max-width: 450px; height: 39px; padding: 0 14px; border-radius: 8px; border: 1px solid #dfe7ec; background: #f8fafb; outline: none; color: var(--ink); font-size: 12px; transition: border-color .18s, box-shadow .18s, background .18s; }
.toolbar input[type="text"]:focus, .modal input:focus, .modal select:focus, .modal textarea:focus, .banner-card input:focus, .banner-card select:focus { border-color: #7290a4 !important; box-shadow: 0 0 0 3px rgba(91,124,145,.12); background: #fff; outline: none; }
.toolbar input::placeholder, .modal input::placeholder, .banner-card input::placeholder { color: #aeb9c3; }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: #45677e; vertical-align: middle; cursor: pointer; }
.toolbar label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px !important; color: #637588 !important; font-weight: 600; }
.selection-toolbar { margin-bottom: 9px; }
.selection-count { color: #9aa7b1; font-size: 11px; }
.push-right { margin-left: auto; }
.btn, .btn-sm { display: inline-flex; justify-content: center; align-items: center; gap: 4px; border-radius: 8px; text-decoration: none; white-space: nowrap; font-weight: 650; transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s; }
.btn { min-height: 39px; padding: 0 15px; border: 1px solid transparent; font-size: 12px; }
.btn:hover:not(:disabled), .btn-sm:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary { color: white; background: #304b60; border-color: #304b60; box-shadow: 0 3px 9px rgba(40,68,87,.1); }
.btn-primary:hover:not(:disabled) { background: #42657c; border-color: #42657c; }
.btn-outline { background: #fff; color: #526b7f; border-color: #dce5eb; }
.btn-outline:hover:not(:disabled) { background: #f3f7f9; border-color: #bfcfd9; }
.btn-danger { color: #b64e4e; background: #fff6f5; border-color: #f1d7d5; }
.btn-danger:hover:not(:disabled) { background: #fceae8; }
.btn-ai { color: #fff; background: #60718e; border-color: #60718e; }
.btn-ai:hover:not(:disabled) { background: #7183a0; }
.btn-sm { min-height: 29px; padding: 4px 9px; border: 1px solid transparent; font-size: 11px; }
.btn-edit-sm { color: #3a607b; background: #eef4f7; }
.btn-edit-sm:hover:not(:disabled) { background: #dfeaf0; }
.btn-role-sm { color: #8d6b3f; background: #f9f3e9; }
.btn-role-sm:hover:not(:disabled) { background: #f3e8d4; }
.btn-danger-sm { color: #bb6260; background: #fcf0ee; }
.btn-danger-sm:hover:not(:disabled) { background: #f8e0dd; }
.btn-tag-sm { color: #715a8d; background: #f2eef8; }
.btn-recommend-sm { color: #ac6f48; background: #fbf4ea; border-color: #f3e1cc; }
.btn-recommend-sm.active { color: #925f39; background: #f9e8ce; }
.success-msg { color: #368368; font-size: 12px; }

.table-scroll { width: 100%; overflow-x: auto; border: 1px solid #e9edf0; border-radius: 10px; scrollbar-color: #cddae3 transparent; }
.data-table { width: 100%; min-width: 900px; border-spacing: 0; border-collapse: separate; background: #fff; }
.data-table th, .data-table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid #edf1f3; vertical-align: middle; }
.data-table th { color: #82909e; background: #f7f9fa; font-size: 11px; font-weight: 750; letter-spacing: .025em; white-space: nowrap; }
.data-table td { color: #4b5c6e; font-size: 12px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f8fbfc; }
.data-table .actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 125px; }
.music-cell { display: flex; align-items: center; gap: 11px; min-width: 180px; }
.music-cover { width: 43px; height: 43px; border-radius: 8px; object-fit: cover; background: #eaf0f4; flex: 0 0 auto; }
.music-info { min-width: 0; }
.music-info .title { max-width: 220px; color: #2d4155; font-size: 12px; font-weight: 750; line-height: 1.35; }
.music-info .meta { max-width: 220px; margin-top: 4px; color: #95a2ac; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar { width: 39px; height: 39px; border-radius: 50%; object-fit: cover; background: #e8eef2; }
.id-col { color: #a6b1ba !important; font-size: 11px !important; font-variant-numeric: tabular-nums; }
.text-ellipsis { max-width: 220px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 100px; }
.tag-badge, .tag-blank { display: inline-flex; align-items: center; min-height: 19px; padding: 1px 6px; border-radius: 5px; white-space: nowrap; font-size: 10px; font-weight: 600; }
.tag-badge { background: #edf1f6; color: #60728a; }
.tag-badge.tag-lang { background: #eaf4ee; color: #4b8564; }
.tag-badge.tag-genre { background: #eaf1fa; color: #5a78a1; }
.tag-badge.tag-feature { background: #fbf2e8; color: #a17c4a; }
.tag-badge.tag-honor { background: #fbeced; color: #ad6a73; }
.tag-blank { background: #f3f5f7; color: #a9b1b9; }
.tag-empty { color: #a8b2bd; font-size: 11px; }
.role-badge { display: inline-block; padding: 5px 9px; border-radius: 6px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.role-user { color: #558168; background: #eaf4ec; }
.role-verified { color: #536fb0; background: #ecf1fc; }
.role-admin { color: #ad7745; background: #fff1e6; }
.visibility-badge { display: inline-block; padding: 5px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.visibility-public { color: #57876b; background: #eaf4ee; }
.visibility-private { color: #a97765; background: #f9eeeb; }
.user-visibility { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 65px; }
.user-visibility span { padding: 4px 7px; border-radius: 6px; color: #a97765; background: #f9eeeb; font-size: 10px; font-weight: 700; white-space: nowrap; }
.user-visibility .visibility-normal { color: #57876b; background: #eaf4ee; }
.moderation-options { display: grid; gap: 8px; }
.moderation-options label { min-height: 43px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid #e5ebef; border-radius: 8px; color: #40566a; background: #fafcfd; font-size: 12px; font-weight: 650; cursor: pointer; }
.moderation-warning { margin: 14px 0 0; color: #ac6862; font-size: 11px; line-height: 1.5; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 11px; margin-top: 24px; }
.pagination button { border: 1px solid #dfe8ed; border-radius: 7px; padding: 8px 13px; background: #fff; color: #52697b; font-size: 11px; font-weight: 650; }
.pagination button:hover:not(:disabled) { background: #eff5f8; }
.pagination .page-info { color: #92a0ab; font-size: 11px; font-variant-numeric: tabular-nums; }
.empty-state { display: grid; place-items: center; min-height: 195px; padding: 32px; border: 1px dashed #dce6ed; border-radius: 10px; background: #fafcfd; color: #96a5b1; text-align: center; font-size: 13px; }

.banner-card { position: relative; display: flex; align-items: center; gap: 15px; padding: 16px; margin-bottom: 12px; border: 1px solid #e9eef1; border-radius: 11px; background: #fff; box-shadow: 0 5px 14px rgba(32,54,71,.035); }
.banner-toolbar { margin-bottom: 16px; }
.banner-toolbar .btn { margin-left: auto; }
.toolbar-note { color: #8595a3; font-size: 12px; }
.banner-index { width: 26px; flex: 0 0 26px; align-self: flex-start; padding-top: 8px; color: #a8b4bd; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.banner-image { width: 142px; height: 84px; position: relative; flex: 0 0 142px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: #ecf1f4; cursor: pointer; }
.banner-image:focus-visible { outline: 3px solid #7393a7; outline-offset: 2px; }
.banner-image img { width: 100%; height: 100%; object-fit: cover; }
.banner-image-empty { font-size: 29px; color: #a9bbc7; }
.banner-image-caption { position: absolute; inset: auto 0 0; padding: 5px 0; background: rgba(17,36,51,.7); color: white; font-size: 10px; text-align: center; }
.banner-fields { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.banner-title-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.banner-title-fields input { width: 100%; padding: 0 10px; font-size: 11px; }
.banner-search-wrap { flex: 1; min-width: 0; position: relative; }
.banner-actions { display: flex; flex-direction: column; align-items: stretch; gap: 5px; }
.banner-card input, .banner-card select { color: #405366; background: #f9fbfc; border: 1px solid #dce6ed !important; border-radius: 7px !important; outline: none; }
.banner-card input { min-height: 34px; }
.banner-link-row { display: flex; align-items: center; gap: 8px; }
.banner-link-row select { flex: 0 0 99px; height: 34px; padding: 0 8px; font-size: 11px; }
.banner-link-row input { flex: 1; width: 100%; min-width: 0; height: 34px; padding: 0 10px; font-size: 11px; }
.banner-search-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; max-height: 215px; overflow-y: auto; background: #fff; border: 1px solid #dce5ec; border-radius: 8px; box-shadow: 0 12px 24px rgba(30,53,74,.14); }
.banner-search-item { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 11px; color: #4d6274; font-size: 11px; cursor: pointer; }
.banner-search-item:hover { background: #f1f6f8; }
.banner-search-hint { color: #a6b3bd; font-size: 10px; }
.banner-save-actions { margin-top: 15px; text-align: right; }
.banner-save-message { margin-top: 8px; text-align: right; }

.modal-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(17,32,45,.55); backdrop-filter: blur(5px); }
.modal { width: min(100%, 510px); max-height: min(85vh, 850px); overflow-y: auto; padding: 27px; border: 1px solid #edf1f3; border-radius: 16px; background: #fff; box-shadow: 0 22px 60px rgba(14,30,42,.22); }
.modal-wide { width: min(100%, 600px); }
.modal h3 { margin: 0 0 23px; padding-bottom: 17px; border-bottom: 1px solid var(--line); color: #253b50; font-size: 17px; letter-spacing: -.02em; }
.modal .form-group { margin-bottom: 17px; }
.modal .form-group label { display: block; margin-bottom: 7px; color: #6b7d8d; font-size: 11px; font-weight: 750; }
.modal .form-group input, .modal .form-group select, .modal .form-group textarea { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #dde6eb !important; border-radius: 8px !important; color: #31475a; background: #fafcfd; font-size: 12px; box-sizing: border-box; }
.modal .form-group textarea { resize: vertical; line-height: 1.55; }
.modal .modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 16px; margin-top: 17px; border-top: 1px solid var(--line); }
.modal .modal-actions .btn { min-width: 70px; }

@media (max-width: 1150px) {
    .admin-layout { grid-template-columns: 204px minmax(0, 1fr); }
    .admin-main { padding: 26px 26px 54px; }
}
@media (max-width: 820px) {
    .admin-header { height: 64px; }
    .header-inner { padding: 0 18px; }
    .header-location, .identity-copy, .header-link-strong { display: none; }
    .admin-layout { display: block; }
    .admin-sidebar { position: sticky; top: 64px; z-index: 60; width: 100%; height: auto; padding: 8px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
    .tab-bar { flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none; }
    .sidebar-utility { position: absolute; right: 14px; top: 8px; min-height: 43px; margin: 0; padding: 0 9px; border: 0; background: #fff; white-space: nowrap; box-shadow: -10px 0 12px 7px #fff; }
    .sidebar-utility .nav-icon { display: none; }
    .sidebar-utility .utility-arrow { display: none; }
    .tab-bar { padding-right: 122px; }
    .tab-bar::-webkit-scrollbar { display: none; }
    .tab-btn { min-width: max-content; width: auto; min-height: 43px; padding: 0 13px; font-size: 11px; gap: 7px; }
    .tab-btn.active { box-shadow: inset 0 -3px #3d6078; }
    .nav-icon { width: auto; flex: none; font-size: 16px; }
    .nav-count { margin-left: 2px; padding: 1px 5px; }
    .admin-main { padding: 22px 20px 46px; }
}
@media (max-width: 600px) {
    .admin-brand { font-size: 18px; }
    .brand-icon { width: 29px; height: 29px; font-size: 21px; }
    .header-link { padding: 8px; font-size: 11px; }
    .header-actions { gap: 3px; }
    .admin-identity { margin-left: 2px; padding-left: 9px; }
    .admin-main { padding: 16px 12px 35px; }
    .admin-surface { padding: 19px 13px 23px; border-radius: 12px; }
    .section-heading { margin-bottom: 18px; padding-bottom: 17px; }
    .section-heading h1 { font-size: 20px; }
    .section-total strong { font-size: 23px; }
    .toolbar { gap: 7px; }
    .toolbar input[type="text"] { max-width: none; flex-basis: 100%; }
    .banner-card { align-items: stretch; flex-wrap: wrap; }
    .banner-index { position: absolute; top: 16px; right: 16px; z-index: 1; width: auto; padding: 3px 7px; border-radius: 5px; background: rgba(255,255,255,.9); }
    .banner-image { width: 100%; height: 132px; flex-basis: 100%; }
    .banner-fields { flex-basis: 100%; }
    .banner-title-fields { grid-template-columns: 1fr; }
    .banner-actions { flex-direction: row; margin-left: auto; }
    .modal { padding: 21px 16px; }
}
