/* ===== SHADOWROOM ADMIN ===== */
/* Aligned with main site brand: black/white neon, monospace data, no rounded corners (except feedback-style form fields) */

:root {
    --black: #0a0a0a;
    --dark-gray: #141414;
    --mid-gray: #1f1f1f;
    --border-gray: #2a2a2a;
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-faint: rgba(255, 255, 255, 0.3);
    --white: #ffffff;
    --font-sans: 'Helvetica Neue', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    --neon-glow: 0 0 8px rgba(255, 255, 255, 0.25), inset 0 0 8px rgba(255, 255, 255, 0.08);
    --neon-glow-strong: 0 0 14px rgba(255, 255, 255, 0.5), inset 0 0 12px rgba(255, 255, 255, 0.15);
    --color-ok: #69db7c;
    --color-err: #ff6b6b;
    --color-warn: #ffc857;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--border-gray); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

body {
    font-family: var(--font-sans);
    background: var(--black);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: var(--white); text-decoration: none; }

/* ===== LOGIN PAGE ===== */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--black);
    position: relative;
    overflow: hidden;
}
.login-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
    animation: gridShift 20s linear infinite;
}
@keyframes gridShift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 48px 48px, 48px 48px; }
}
.login-wrap > * { position: relative; z-index: 1; }
/* 登录页返回首页 —— 固定左上角 */
.back-home {
    position: absolute;
    top: 24px;
    left: 24px;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 2px;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.2s ease;
}
.back-home:hover {
    color: var(--white);
    border-color: var(--white);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--dark-gray);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 48px 40px;
    box-shadow: var(--neon-glow);
}
.login-card .brand { text-align: center; margin-bottom: 12px; }
.login-card .brand .name {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 12px;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
}
.login-card .brand .role {
    font-size: 10px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.login-card .divider {
    width: 60px;
    height: 1px;
    background: var(--white);
    margin: 24px auto 28px;
    opacity: 0.6;
}
.login-card form { display: flex; flex-direction: column; gap: 18px; }
.login-card .field { display: flex; flex-direction: column; gap: 8px; }
.login-card label {
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.login-card .email-row {
    display: flex;
    align-items: center;
    min-width: 0;     /* allow children to shrink below content */
    max-width: 100%;
    background: var(--black);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 0 4px 0 0;
    transition: all 0.3s ease;
    box-shadow: var(--neon-glow);
    overflow: hidden;   /* hard-clip any overflow */
}
.login-card .email-row:focus-within {
    border-color: var(--white);
    box-shadow: var(--neon-glow-strong);
}
.login-card .email-row input {
    flex: 1 1 0;
    min-width: 0;     /* CRITICAL: allow input to shrink */
    width: 100%;
    background: transparent;
    border: none;
    color: var(--white);
    padding: 12px 14px;
    font-size: 15px;
    font-family: var(--font-sans);
    outline: none;
}
.login-card .email-row input::placeholder {
    color: var(--text-faint);
}
.login-card .email-row .suffix {
    flex-shrink: 0;          /* never shrink the suffix */
    white-space: nowrap;
    padding: 0 12px;
    color: var(--white);
    font-size: 14px;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    opacity: 0.85;
    user-select: none;
    border-left: 1px solid var(--border-gray);
    align-self: stretch;
    display: flex;
    align-items: center;
}
.login-card input[type="password"] {
    width: 100%;
    background: var(--black);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    color: var(--white);
    padding: 12px 14px;
    font-size: 15px;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
    outline: none;
    box-shadow: var(--neon-glow);
}
.login-card input[type="password"]:focus {
    border-color: var(--white);
    box-shadow: var(--neon-glow-strong);
}
.login-card .err {
    color: var(--color-err);
    font-size: 12px;
    min-height: 16px;
    margin-top: 4px;
}

/* Role tabs */
.role-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    overflow: hidden;
}
.role-tab {
    flex: 1;
    padding: 10px 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
}
.role-tab:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
}
.role-tab.active {
    color: var(--white);
    background: rgba(255,255,255,0.1);
    box-shadow: inset 0 -2px 0 var(--white);
}
    letter-spacing: 1px;
    text-align: center;
    min-height: 16px;
}
.login-card .footer-hint {
    text-align: center;
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-top: 8px;
}

/* ===== BUTTON (btn-neon style) ===== */
.btn {
    display: inline-block;
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 12px;
    font-family: var(--font-sans);
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--neon-glow);
    user-select: none;
}
.btn:hover {
    background: var(--white);
    color: var(--black);
    letter-spacing: 5px;
    box-shadow: var(--neon-glow-strong);
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}
.btn.small { padding: 6px 14px; font-size: 10px; letter-spacing: 2px; }
.btn.ghost { background: transparent; box-shadow: none; border-color: var(--border-gray); }
.btn.ghost:hover { background: rgba(255,255,255,0.05); color: var(--white); letter-spacing: 3px; box-shadow: none; }
.btn.danger { border-color: rgba(255, 80, 80, 0.6); }
.btn.danger:hover { background: rgba(255, 80, 80, 0.9); color: var(--white); border-color: rgba(255, 80, 80, 1); }

/* ===== LAYOUT (sidebar + main) ===== */
.layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--black);
    border-right: 1px solid var(--border-gray);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar .brand {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}
.sidebar .who {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-gray);
}
.sidebar .who b { color: var(--white); font-weight: 400; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar nav a {
    display: block;
    padding: 12px 16px;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-left: 1px solid transparent;
    transition: all 0.25s ease;
}
.sidebar nav a:hover { color: var(--white); border-left-color: var(--border-gray); }
.sidebar nav a.active {
    color: var(--white);
    border-left-color: var(--white);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 3px 0 8px -3px rgba(255, 255, 255, 0.3);
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}
.sidebar .out { padding-top: 16px; border-top: 1px solid var(--border-gray); }
.sidebar .out button {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-gray);
    color: var(--text-muted);
    padding: 10px;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
    border-radius: 4px;
}
.sidebar .out button:hover { color: var(--white); border-color: var(--white); }

/* ===== MAIN CONTENT ===== */
.main {
    flex: 1;
    padding: 48px 56px;
    min-width: 0;
    max-width: 1400px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.main h1 {
    font-size: 26px;
    font-weight: 300;
    letter-spacing: 8px;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    margin-bottom: 6px;
}
.main .sub {
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-gray);
}
.main h2 {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 40px 0 16px;
    color: var(--white);
}

/* ===== FORM (form-group / .form — feedback style) ===== */
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 520px;
}
.form > .form-group { display: flex; flex-direction: column; gap: 6px; }
.form label {
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.form input,
.form select,
.form textarea {
    background: var(--dark-gray);
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    color: var(--white);
    padding: 12px 14px;
    font-size: 14px;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: var(--neon-glow);
}
.form input:focus,
.form select:focus,
.form textarea:focus,
.email-field:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: var(--neon-glow);
}
.form input::placeholder,
.form textarea::placeholder { color: var(--text-faint); }
.form .hint {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 2px;
}
.form .msg { font-size: 12px; min-height: 16px; }
.form .msg.err { color: var(--color-err); }
.form .msg.ok { color: var(--color-ok); }

/* email-with-suffix: prefix input + readonly suffix */
.email-field {
    display: flex;
    align-items: stretch;
    min-width: 0;
    max-width: 100%;
    background: var(--dark-gray);
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.email-field:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: var(--neon-glow);
}
.email-field input {
    flex: 1 1 0;
    min-width: 0;
    background: transparent;
    border: none;
    color: var(--white);
    padding: 12px 14px;
    font-size: 14px;
    font-family: var(--font-sans);
    outline: none;
}
.email-field input::placeholder { color: var(--text-faint); }
.email-field .suffix {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0 14px;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 1px solid var(--border-gray);
    user-select: none;
}

/* ===== BTN-ROW vs FORM-ACTIONS ===== */
/* btn-row: 页面顶部按钮组 (主操作 + 辅助 ghost) */
.btn-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.btn-row .btn { /* 主按钮: 中等尺寸 */
    padding: 10px 22px;
    font-size: 11px;
    letter-spacing: 3px;
}
.btn-row .btn.small {
    padding: 10px 18px;
    font-size: 10px;
    letter-spacing: 2px;
}
.btn-row .dim { margin-left: auto; }

/* form-actions: 弹窗底部按钮组 —— 居中并排, 内容宽度 */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.form-actions .btn,
.form-actions .btn.ghost,
.form-actions .btn.danger {
    flex: 1;
    max-width: 200px;
    margin: 0;
    padding: 12px 20px;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 42px;
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    overflow: hidden;
}
table th {
    text-align: left;
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 14px 16px;
    background: var(--dark-gray);
    border-bottom: 1px solid var(--border-gray);
    font-weight: 500;
}
table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-gray);
    vertical-align: middle;
}
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: rgba(255, 255, 255, 0.05); }
table tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--white); }
table .mono { font-family: var(--font-mono); font-size: 12px; }
table .dim { color: var(--text-muted); }
table .empty { text-align: center; color: var(--text-faint); padding: 48px; font-size: 12px; letter-spacing: 2px; border: 1px dashed var(--border-gray); }
table input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-gray);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    transition: border-color .15s, background .15s;
}
table input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 0.4);
}
table input[type="checkbox"]:checked {
    background: #fff;
    border-color: #fff;
}
table input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
table input[type="checkbox"]:indeterminate {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}
table input[type="checkbox"]:indeterminate::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 6px;
    width: 8px;
    height: 2px;
    background: #000;
}

.platform-cell { display: flex; flex-wrap: wrap; gap: 6px; max-width: 420px; }
.platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border: 1px solid var(--border-gray);
    border-radius: 3px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--white);
    background: var(--dark-gray);
    transition: all 0.2s ease;
}
.platform-chip:hover { border-color: var(--white); }
.platform-chip .pname { color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-size: 9px; }

/* ===== MODAL ===== */
.modal-bg {
    display: flex;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-bg.show { opacity: 1; visibility: visible; }
.modal {
    background: var(--dark-gray);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 36px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--neon-glow);
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
}
.modal-bg.show .modal { transform: scale(1) translateY(0); }
.modal h3 {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 24px;
    text-align: center;
}
/* 弹窗右上角关闭按钮 —— 正方形 */
.modal .x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    color: var(--white);
    font-size: 22px;
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.modal .x:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--dark-gray);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 14px 22px;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--white);
    box-shadow: var(--neon-glow);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); animation: toastGlow 0.4s ease; }
@keyframes toastGlow {
    0% { box-shadow: 0 0 0px rgba(255, 255, 255, 0); }
    50% { box-shadow: 0 0 16px rgba(255, 255, 255, 0.4); }
    100% { box-shadow: var(--neon-glow); }
}
.toast.err { border-color: rgba(255, 80, 80, 0.7); }
.toast.ok { border-color: rgba(105, 219, 124, 0.7); }

/* ===== HELPERS ===== */
.mono { font-family: var(--font-mono); }
.dim { color: var(--text-muted); }
.s-ok { color: var(--color-ok); }
.s-err { color: var(--color-err); }
.s-warn { color: var(--color-warn); }

/* ===== LOADING ===== */
.loading-box {
    text-align: center;
    padding: 48px;
    color: var(--text-faint);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
}
.loading-box::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    margin: 16px auto 0;
    background: linear-gradient(90deg, transparent, var(--white), transparent);
    background-size: 200% 100%;
    animation: scan 1.5s ease-in-out infinite;
    opacity: 0.6;
}
@keyframes scan {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ===== LINKS ===== */
.link-underline {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-size: 10px;
    letter-spacing: 2px;
}
.link-underline:hover {
    color: var(--white);
    border-bottom-color: var(--white);
}

/* ===== MOBILE / NARROW VIEWPORT (微信内置浏览器 ~390px) ===== */
@media (max-width: 768px) {
    /* Layout 改成上下堆叠：sidebar 横排在顶部，main 在下 */
    .layout {
        flex-direction: column;
        min-height: 100vh;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        z-index: 10;
        padding: 16px 20px;
        gap: 12px;
        flex-shrink: 0;
    }
    .sidebar .brand {
        font-size: 12px;
        letter-spacing: 4px;
    }
    .sidebar .who {
        font-size: 8px;
        padding-bottom: 8px;
    }
    .sidebar nav {
        flex-direction: row;
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar nav a {
        padding: 8px 12px;
        font-size: 9px;
        letter-spacing: 1px;
        white-space: nowrap;
        border-left: none;
        border-bottom: 1px solid transparent;
    }
    .sidebar nav a.active {
        border-left: none;
        border-bottom-color: var(--white);
        background: transparent;
    }
    .sidebar .out {
        padding-top: 8px;
        border-top: none;
    }
    .sidebar .out button {
        padding: 6px 10px;
        font-size: 9px;
        letter-spacing: 1px;
    }

    .main {
        padding: 20px 16px;
    }
    .main h1 {
        font-size: 20px;
        letter-spacing: 4px;
    }
    .main .sub {
        font-size: 9px;
        letter-spacing: 2px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    .main h2 {
        font-size: 12px;
        letter-spacing: 2px;
        margin: 24px 0 12px;
    }

    /* 表格响应：卡片化布局 */
    table, thead, tbody, tr, th, td { display: block; }
    thead { display: none; }
    table {
        border: none;
        border-radius: 0;
        overflow: visible;
    }
    tbody tr {
        background: var(--dark-gray);
        border: 1px solid var(--border-gray);
        border-radius: 6px;
        margin-bottom: 12px;
        padding: 8px 0;
    }
    tbody tr:hover td { background: transparent; }
    tbody tr:hover td:first-child { box-shadow: none; }
    td {
        padding: 8px 16px;
        font-size: 12px;
        border-bottom: 1px solid rgba(255,255,255,0.04);
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        text-align: right;
        white-space: normal;
    }
    td:last-child { border-bottom: none; }
    td::before {
        content: attr(data-label);
        font-size: 9px;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: var(--text-faint);
        flex-shrink: 0;
    }
    td[data-label] > * { text-align: right; }
    td:not([data-label])::before { content: ''; }
    .platform-cell { max-width: 60%; justify-content: flex-end; }
    .artist-cell { justify-content: flex-end; }

    /* 表单 */
    .form { max-width: 100%; }
    .btn {
        padding: 10px 16px;
        font-size: 11px;
        letter-spacing: 2px;
    }
    .btn.small { padding: 4px 10px; font-size: 9px; letter-spacing: 1px; }

    /* 模态 */
    .modal { padding: 24px 20px; }
    .form-actions .btn { max-width: none; }
}

/* ===== Profile page ===== */
.profile-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    margin-top: 24px;
    align-items: start;
}
.profile-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 24px;
}
.avatar-preview {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    position: relative;
    transition: border-color .2s;
}
.avatar-preview:hover { border-color: rgba(255, 255, 255, 0.3); }
.avatar-initial {
    font-size: 72px;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0;
}
.profile-form { max-width: 560px; }
.section-divider {
    display: flex;
    align-items: center;
    margin: 28px 0 20px;
    gap: 12px;
    color: var(--text-faint);
    font-size: 11px;
    letter-spacing: 3px;
}
.section-divider::before, .section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-gray);
}
@media (max-width: 720px) {
    .profile-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .profile-avatar-col {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .avatar-preview { width: 120px; height: 120px; }
    .avatar-initial { font-size: 48px; }
}

/* ===== Sidebar avatar ===== */
.sidebar .brand { display: flex; align-items: center; gap: 12px; }
.sidebar .brand .brand-text { flex: 1; }
.sidebar .brand-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-gray);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}
.sidebar .who { display: flex; align-items: center; gap: 10px; }
.sidebar .who .who-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-gray);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

/* ===== Artists list avatar ===== */
.artist-cell { display: flex; align-items: center; gap: 10px; }
.artist-cell .artist-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-gray);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== Crop modal ===== */
.crop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity .2s;
}
.crop-overlay.show { opacity: 1; }
.crop-box {
    background: var(--dark-gray);
    border: 1px solid var(--border-gray);
    max-width: 560px;
    width: 100%;
    display: flex;
    flex-direction: column;
}
.crop-header {
    padding: 16px 20px;
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-gray);
}
.crop-body {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: #000;
}
.crop-body img {
    max-width: 100%;
    max-height: 400px;
}
.crop-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-gray);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.crop-footer .btn { min-width: 100px; }
@media (max-width: 600px) {
    .crop-body { min-height: 220px; padding: 12px; }
    .crop-body img { max-height: 280px; }
    .crop-header, .crop-footer { padding: 12px 16px; }
}

/* ===== 超小屏优化 (480px 以下, 微信内置浏览器) ===== */
@media (max-width: 480px) {
    /* 登录页返回首页按钮 -- 提到顶部不被遮挡 */
    .login-wrap {
        padding-top: 60px;
        align-items: flex-start;
    }
    .back-home {
        top: 16px;
        left: 16px;
        padding: 6px 10px;
        font-size: 10px;
    }
    .login-card {
        padding: 32px 20px;
        margin-top: 20px;
    }

    /* sidebar 更紧凑 */
    .sidebar {
        padding: 10px 14px;
        gap: 8px;
    }
    .sidebar .brand {
        font-size: 11px;
        letter-spacing: 3px;
    }
    .sidebar .brand-avatar {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
    .sidebar .who {
        font-size: 8px;
        padding-bottom: 6px;
    }
    .sidebar .who .who-avatar {
        width: 22px;
        height: 22px;
        font-size: 8px;
    }
    .sidebar nav a {
        padding: 6px 10px;
        font-size: 8px;
        letter-spacing: 0.5px;
    }
    .sidebar .out button {
        padding: 5px 8px;
        font-size: 8px;
    }

    /* main 内容 */
    .main {
        padding: 16px 12px;
    }
    .main h1 {
        font-size: 18px;
        letter-spacing: 3px;
    }
    .main .sub {
        font-size: 8px;
        letter-spacing: 1px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }
    .main h2 {
        font-size: 11px;
        letter-spacing: 1px;
        margin: 20px 0 10px;
    }

    /* 按钮行 */
    .btn-row {
        gap: 8px;
        margin-bottom: 16px;
    }
    .btn-row .btn {
        padding: 8px 14px;
        font-size: 10px;
        letter-spacing: 1px;
    }
    .btn-row .btn.small {
        padding: 8px 12px;
        font-size: 9px;
    }

    /* 搜索栏 */
    .search-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .search-bar input,
    .search-bar select {
        width: 100%;
    }

    /* 弹窗 - 可滚动, 不溢出 */
    .modal-bg {
        padding: 0;
        align-items: flex-start;
        overflow-y: auto;
    }
    .modal {
        max-width: none;
        width: 100%;
        padding: 20px 16px;
        border-radius: 0;
        border: none;
        min-height: 100vh;
        margin: 0;
    }
    .modal .x {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }
    .modal h3 {
        font-size: 14px;
        letter-spacing: 3px;
        margin-bottom: 20px;
    }

    /* 表单 */
    .form {
        gap: 14px;
    }
    .form input,
    .form select,
    .form textarea {
        padding: 10px 12px;
        font-size: 14px;
    }
    .form label {
        font-size: 9px;
        letter-spacing: 2px;
    }
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    .form-actions .btn,
    .form-actions .btn.ghost,
    .form-actions .btn.danger {
        max-width: none;
        width: 100%;
        padding: 14px;
        font-size: 12px;
    }

    /* 表格卡片 */
    td {
        padding: 6px 12px;
        font-size: 11px;
    }
    td::before {
        font-size: 8px;
    }
    /* 操作按钮在卡片里换行 */
    td[data-label="操作"] {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    td[data-label="操作"] .btn {
        margin: 2px;
    }

    /* Dashboard 卡片 */
    .dash-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .dash-card {
        padding: 16px 14px;
    }
    .dash-card .num {
        font-size: 28px;
    }
    .dash-cols {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .dash-row {
        padding: 8px 14px;
    }

    /* Profile 页 */
    .avatar-preview {
        width: 100px;
        height: 100px;
    }
    .avatar-initial {
        font-size: 40px;
    }

    /* Toast */
    .toast {
        left: 12px;
        right: 12px;
        bottom: 16px;
        text-align: center;
        padding: 12px 16px;
        font-size: 11px;
    }

    /* 裁剪弹窗全屏 */
    .crop-overlay {
        padding: 0;
    }
    .crop-box {
        max-width: none;
        width: 100%;
        min-height: 100vh;
    }
    .crop-body {
        min-height: 50vh;
    }
    .crop-body img {
        max-height: 50vh;
    }
}
