/* ========== 管理后台公共样式 ========== */
body { background-color: #1f2225; color: #e5e7eb; font-family: Inter, system-ui, sans-serif; }

.adm-layout { display: flex; min-height: 100vh; }

#adm-sidebar {
    width: 230px; flex-shrink: 0; background-color: #16181a;
    border-right: 1px solid rgba(255,255,255,.06);
    padding: 20px 14px; position: fixed; inset: 0 auto 0 0; z-index: 40;
    overflow-y: auto; transition: transform .3s ease;
}
.adm-main { flex: 1; margin-left: 230px; min-width: 0; }
#adm-topbar {
    height: 60px; position: sticky; top: 0; z-index: 30;
    background-color: rgba(31,34,37,.94); backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 0 22px; display: flex; align-items: center; gap: 14px;
}
.adm-content { padding: 24px 22px; }

@media (max-width: 767px) {
    #adm-sidebar { transform: translateX(-100%); }
    #adm-sidebar.adm-open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.5); }
    .adm-main { margin-left: 0; }
    .adm-content { padding: 16px 12px; }
}

/* 卡片/表格/表单 */
.adm-card { background:#262a2e; border:1px solid rgba(255,255,255,.06); border-radius:14px; padding:20px; }
.adm-table { width:100%; border-collapse:collapse; font-size:14px; }
.adm-table th { text-align:left; padding:12px 14px; color:#9ca3af; font-weight:500; font-size:12px; border-bottom:1px solid rgba(255,255,255,.08); white-space:nowrap; }
.adm-table td { padding:12px 14px; border-bottom:1px solid rgba(255,255,255,.05); vertical-align:middle; }
.adm-table tr:last-child td { border-bottom:none; }
.adm-table tbody tr:hover { background:rgba(255,255,255,.02); }

.adm-input { width:100%; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.12); border-radius:9px; padding:9px 12px; color:#f3f4f6; outline:none; font-size:14px; }
.adm-input:focus { border-color:#D35400; }
.adm-input::placeholder { color:#6b7280; }
select.adm-input option { background:#262a2e; }

.adm-btn { display:inline-flex; align-items:center; gap:6px; padding:8px 16px; border-radius:9px; font-size:13px; font-weight:500; cursor:pointer; transition:all .2s; border:1px solid transparent; white-space:nowrap; }
.adm-btn-primary { background:#D35400; color:#fff; }
.adm-btn-primary:hover { background:#b94800; }
.adm-btn-ghost { background:transparent; border-color:rgba(255,255,255,.18); color:#d1d5db; }
.adm-btn-ghost:hover { border-color:#D35400; color:#D35400; }
.adm-btn-danger { background:transparent; border-color:rgba(231,76,60,.4); color:#e74c3c; }
.adm-btn-danger:hover { background:#e74c3c; color:#fff; }
.adm-btn-sm { padding:5px 10px; font-size:12px; border-radius:7px; }

/* 标签 */
.adm-badge { display:inline-block; padding:2px 10px; border-radius:999px; font-size:12px; font-weight:500; }
.adm-badge-live { background:rgba(231,76,60,.18); color:#ff6b5e; }
.adm-badge-off { background:rgba(156,163,175,.18); color:#9ca3af; }
.adm-badge-serial { background:rgba(0,184,148,.16); color:#2dd4a7; }
.adm-badge-done { background:rgba(156,163,175,.18); color:#9ca3af; }
.adm-badge-ban { background:rgba(231,76,60,.18); color:#ff6b5e; }
.adm-badge-ok { background:rgba(0,184,148,.16); color:#2dd4a7; }

/* 开关 */
.adm-switch { position:relative; display:inline-block; width:42px; height:23px; }
.adm-switch input { opacity:0; width:0; height:0; }
.adm-switch .slider { position:absolute; cursor:pointer; inset:0; background:#4b5563; border-radius:999px; transition:.25s; }
.adm-switch .slider:before { content:""; position:absolute; height:17px; width:17px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.25s; }
.adm-switch input:checked + .slider { background:#D35400; }
.adm-switch input:checked + .slider:before { transform:translateX(19px); }

/* 弹窗 */
.adm-modal-mask { position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:90; display:flex; align-items:center; justify-content:center; padding:16px; }
.adm-modal { background:#262a2e; border:1px solid rgba(255,255,255,.1); border-radius:16px; width:100%; max-width:520px; max-height:90vh; overflow-y:auto; }
.adm-modal-head { display:flex; align-items:center; justify-content:space-between; padding:18px 22px; border-bottom:1px solid rgba(255,255,255,.07); }
.adm-modal-body { padding:22px; }
.adm-modal-foot { padding:16px 22px; border-top:1px solid rgba(255,255,255,.07); display:flex; justify-content:flex-end; gap:10px; }

.empty { text-align:center; padding:60px 20px; color:#6b7280; }
.empty i { font-size:42px; margin-bottom:12px; display:block; }

/* Toast */
#adm-toast { position:fixed; top:76px; left:50%; transform:translateX(-50%); z-index:200; display:flex; flex-direction:column; gap:8px; align-items:center; pointer-events:none; }
.adm-toast-item { color:#fff; padding:10px 22px; border-radius:999px; font-size:14px; box-shadow:0 8px 24px rgba(0,0,0,.35); animation:admToast 2.4s ease forwards; }
@keyframes admToast { 0%{opacity:0;transform:translateY(-12px)} 12%{opacity:1;transform:translateY(0)} 85%{opacity:1} 100%{opacity:0;transform:translateY(-12px)} }

/* 登录页 */
.adm-login-bg { background:linear-gradient(135deg,#16181a 0%,#2D3436 60%,#3a2415 100%); }
