/* =============================================================
 * SKN AdminWeb - 全局样式
 * ============================================================= */

[v-cloak] { display: none !important; }

html, body { height: 100%; margin: 0; }
#app { min-height: 100vh; }

/* ---------- 布局 ---------- */
/* 固定侧边栏：页面滚动时菜单保持可视（#app 前缀提升优先级，覆盖 antd 运行时注入的 .ant-layout-sider 定位） */
#app .sk-sider { position: sticky; top: 0; height: 100vh; overflow: auto; }
.sk-sider::-webkit-scrollbar { width: 4px; }
.sk-sider::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 2px; }
body:not(.sk-dark) .sk-sider::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .16); }

.sk-logo { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; color: #fff; overflow: hidden; }
.sk-logo-light { color: rgba(0, 0, 0, .88); }
.sk-logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px; flex: none;
    background: linear-gradient(135deg, #1677ff, #69b1ff);
    font-weight: 700; font-size: 12px; color: #fff; letter-spacing: .5px;
}
.sk-logo-text { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 顶部栏：随明暗模式切换配色（#app 前缀覆盖 antd 默认深蓝底与 64px 高度） */
#app .sk-header {
    display: flex; align-items: center; gap: 2px;
    padding: 0 12px 0 8px; position: sticky; top: 0; z-index: 90; height: 56px; line-height: 56px;
    background: #fff; color: rgba(0, 0, 0, .88); box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
}
body.sk-dark #app .sk-header {
    background: #001529; color: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.sk-header-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 8px; cursor: pointer; font-size: 16px;
    transition: background .2s; user-select: none;
}
.sk-header-btn:hover { background: rgba(127, 127, 127, .14); }
.sk-header-title { font-weight: 600; margin-left: 6px; font-size: 15px; }
.sk-header-crumb { color: rgba(127, 127, 127, .85); font-size: 12px; margin-left: 10px; }
.sk-header-space { flex: 1; }
.sk-header-user { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.sk-header-user:hover { background: rgba(127, 127, 127, .14); }
.sk-header-uname { font-size: 14px; }
.sk-header-role {
    font-size: 12px; color: rgba(127, 127, 127, .9); border: 1px solid rgba(127, 127, 127, .3);
    border-radius: 10px; padding: 0 7px; line-height: 18px;
}
.sk-content { padding: 16px; }
.sk-footer { text-align: center; color: rgba(127, 127, 127, .9); font-size: 12px; padding: 12px 16px; }
.sk-menu-item-text { margin-right: 6px; }

/* ---------- 通用工具 ---------- */
.sk-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.sk-toolbar .ant-input-affix-wrapper, .sk-toolbar .ant-input { width: auto; }
.sk-actions { display: inline-flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.sk-mono { font-family: Consolas, Menlo, Monaco, monospace; font-size: 12px; }
.sk-muted { color: rgba(127, 127, 127, .9); }
.sk-json {
    background: rgba(127, 127, 127, .08); border: 1px solid rgba(127, 127, 127, .18); border-radius: 8px;
    padding: 12px; font-family: Consolas, Menlo, Monaco, monospace; font-size: 12px; line-height: 1.7;
    white-space: pre-wrap; word-break: break-all; max-height: 320px; overflow: auto; margin: 0;
}
.sk-danger { color: #ff4d4f; }
.sk-warning { color: #faad14; }
.sk-success { color: #52c41a; }
.sk-nowrap { white-space: nowrap; }
.sk-page-title { font-size: 16px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.sk-desc-list .ant-descriptions-item-label { width: 120px; }

/* ---------- 产品上传 ---------- */
.sk-cover-empty {
    width: 46px; height: 46px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(127, 127, 127, .1); color: rgba(127, 127, 127, .75); font-size: 20px;
}
.sk-upload-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sk-cover-preview {
    position: relative; width: 88px; height: 88px; border-radius: 8px; overflow: hidden;
    border: 1px solid rgba(127, 127, 127, .25);
}
.sk-cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-cover-mask {
    position: absolute; inset: 0; background: rgba(0, 0, 0, .45); color: #fff; font-size: 12px;
    display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s;
}
.sk-cover-preview:hover .sk-cover-mask { opacity: 1; }
.sk-cover-uploader {
    width: 88px; height: 88px; border-radius: 8px; border: 1px dashed rgba(127, 127, 127, .45);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    color: rgba(127, 127, 127, .95); font-size: 12px; cursor: pointer; transition: border-color .15s;
}
.sk-cover-uploader:hover { border-color: #1677ff; color: #1677ff; }
.sk-shot-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.sk-shot-item {
    position: relative; width: 88px; height: 88px; border-radius: 8px; overflow: hidden;
    border: 1px solid rgba(127, 127, 127, .25);
}
.sk-shot-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-shot-del {
    position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
    background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; display: flex; align-items: center;
    justify-content: center; cursor: pointer; opacity: 0; transition: opacity .15s;
}
.sk-shot-item:hover .sk-shot-del { opacity: 1; }
.sk-shot-add { width: 88px; height: 88px; }

/* ---------- 主题设置 ---------- */
.sk-theme-block { margin-bottom: 4px; }
.sk-theme-label { font-weight: 600; margin-bottom: 12px; }
.sk-color-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.sk-color-dot {
    display: inline-block; width: 26px; height: 26px; border-radius: 50%;
    cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
    transition: transform .15s;
}
.sk-color-dot:hover { transform: scale(1.12); }
.sk-color-dot.active { border-color: #fff; box-shadow: 0 0 0 2px #1677ff; }

/* ---------- 个人中心 ---------- */
.sk-profile-head { text-align: center; padding: 10px 0 2px; }
.sk-profile-name { font-size: 17px; font-weight: 600; margin-top: 10px; }
.sk-profile-sub { margin-top: 2px; font-size: 12px; }

/* ---------- 登录页 ---------- */
.login-page { min-height: 100vh; display: flex; background: #fff; }
body.sk-dark .login-page { background: #141414; }

/* 左：品牌区 */
.login-hero {
    position: relative; flex: 1 1 52%; min-width: 0; overflow: hidden;
    display: flex; color: #fff;
    background:
        radial-gradient(110% 80% at 88% 6%, rgba(22, 119, 255, .42), transparent 58%),
        radial-gradient(90% 70% at 6% 96%, rgba(114, 46, 209, .38), transparent 62%),
        radial-gradient(60% 55% at 74% 82%, rgba(19, 194, 194, .18), transparent 60%),
        linear-gradient(160deg, #0a1230 0%, #0e2158 46%, #10337f 108%);
}
.login-hero-grid {
    position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(90% 80% at 45% 40%, #000 30%, transparent 100%);
    mask-image: radial-gradient(90% 80% at 45% 40%, #000 30%, transparent 100%);
}
.login-orb { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; opacity: .55; }
.login-orb-a { width: 320px; height: 320px; left: -90px; top: -70px; background: rgba(22, 119, 255, .55); animation: sk-orb 11s ease-in-out infinite; }
.login-orb-b { width: 280px; height: 280px; right: -70px; bottom: 8%; background: rgba(114, 46, 209, .5); animation: sk-orb 13s ease-in-out infinite reverse; }
.login-orb-c { width: 200px; height: 200px; left: 30%; bottom: -60px; background: rgba(19, 194, 194, .35); animation: sk-orb 15s ease-in-out infinite; }
@keyframes sk-orb {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -22px, 0); }
}
.login-hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; width: 100%; padding: clamp(34px, 5vw, 64px); }
.login-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.login-brand .sk-logo-mark { width: 38px; height: 38px; border-radius: 10px; font-size: 13px; }
.login-brand-name { font-size: 16px; font-weight: 600; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-brand-ver { flex: none; font-size: 12px; color: rgba(255, 255, 255, .65); border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; padding: 1px 10px; }
.login-hero-body { margin: auto 0; padding: 6vh 0; max-width: 540px; }
.login-hero-title { margin: 0 0 18px; font-size: clamp(28px, 3vw, 40px); line-height: 1.3; font-weight: 700; letter-spacing: .5px; }
.login-hero-desc { margin: 0 0 28px; font-size: 14px; line-height: 1.9; color: rgba(255, 255, 255, .78); max-width: 470px; }
.login-hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.login-hero-points li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255, 255, 255, .88); }
.login-hero-points .anticon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%; font-size: 12px;
    background: rgba(255, 255, 255, .12); color: #7cc4ff; flex: none;
}
.login-hero-foot { font-size: 12px; color: rgba(255, 255, 255, .5); }

/* 右：表单区 */
.login-main { flex: 1 1 48%; display: flex; align-items: center; justify-content: center; padding: 48px 28px; }
.login-panel { width: 100%; max-width: 380px; animation: sk-rise .45s ease both; }
@keyframes sk-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.login-mini-brand { display: none; align-items: center; gap: 10px; margin-bottom: 22px; font-weight: 600; font-size: 15px; }
.login-mini-brand .sk-logo-mark { width: 34px; height: 34px; border-radius: 9px; }
.login-mini-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-hello { font-size: 26px; font-weight: 700; letter-spacing: .5px; }
.login-hello-sub { margin: 8px 0 26px; font-size: 13px; color: rgba(127, 127, 127, .95); }
.login-panel .ant-input-affix-wrapper, .login-panel .ant-input { border-radius: 10px; }
.login-panel .ant-btn-lg { height: 46px; border-radius: 10px; font-size: 15px; }
.login-panel-foot { margin-top: 8px; text-align: center; font-size: 12px; color: rgba(127, 127, 127, .9); }
.login-captcha { display: flex; align-items: center; cursor: pointer; border-radius: 10px; overflow: hidden; border: 1px solid rgba(127, 127, 127, .25); }
.login-captcha img { display: block; height: 40px; }

@media (prefers-reduced-motion: reduce) {
    .login-orb, .login-panel { animation: none; }
}

/* 窄屏：隐藏品牌区，渐变背景 + 居中卡片 */
@media (max-width: 900px) {
    .login-page {
        display: block;
        background:
            radial-gradient(110% 70% at 88% 0%, rgba(22, 119, 255, .4), transparent 60%),
            radial-gradient(90% 70% at 6% 100%, rgba(114, 46, 209, .36), transparent 62%),
            linear-gradient(160deg, #0a1230 0%, #0e2158 46%, #10337f 108%);
    }
    body.sk-dark .login-page {
        background:
            radial-gradient(110% 70% at 88% 0%, rgba(22, 119, 255, .4), transparent 60%),
            radial-gradient(90% 70% at 6% 100%, rgba(114, 46, 209, .36), transparent 62%),
            linear-gradient(160deg, #0a1230 0%, #0e2158 46%, #10337f 108%);
    }
    .login-hero { display: none; }
    .login-main { min-height: 100vh; padding: 24px 18px; }
    .login-panel {
        max-width: 400px; background: #fff; border-radius: 16px; padding: 30px 26px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    }
    body.sk-dark .login-panel { background: #1c1c1f; border: 1px solid rgba(255, 255, 255, .07); }
    .login-mini-brand { display: flex; }
    .login-hello { font-size: 22px; }
}

/* ---------- 工单会话 ---------- */
.ticket-thread { max-height: 460px; overflow: auto; padding: 4px 2px; }
.ticket-msg { display: flex; margin-bottom: 14px; }
.ticket-msg.member { justify-content: flex-start; }
.ticket-msg.admin { justify-content: flex-end; }
.ticket-body { max-width: 82%; }
.ticket-body .ticket-bubble { max-width: none; }
.ticket-bubble {
    max-width: 78%; border-radius: 10px; padding: 10px 14px;
    background: rgba(127, 127, 127, .12); white-space: pre-wrap; word-break: break-word; font-size: 13px;
}
.ticket-msg.admin .ticket-bubble { background: rgba(22, 119, 255, .14); }
.ticket-meta { font-size: 12px; color: rgba(127, 127, 127, .9); margin-bottom: 4px; }

/* ---------- 上传预览 ---------- */
.sk-upload-preview img { max-height: 120px; border-radius: 6px; }
.sk-cover-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: rgba(127, 127, 127, .12); }

/* ---------- 仪表台 ---------- */
.sk-stat .ant-statistic-title { font-size: 13px; }
.sk-stat-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 12px; font-size: 20px; color: #fff;
}
.sk-welcome .ant-card-body { padding: 20px; }
.sk-welcome-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sk-welcome-avatar { background: linear-gradient(135deg, #1677ff, #69b1ff); font-size: 20px; flex: none; }
.sk-welcome-info { min-width: 220px; }
.sk-welcome-name { font-size: 16px; font-weight: 600; }
.sk-welcome-sub { font-size: 12px; margin-top: 2px; }
.sk-welcome-actions { margin-left: auto; }
.sk-row { margin-top: 16px; }
.sk-stat-card { height: 100%; }
.sk-stat-click { cursor: pointer; transition: box-shadow .2s ease; border: 1px solid rgba(127, 127, 127, .16); }
.sk-stat-click:hover { box-shadow: 0 2px 12px rgba(0, 0, 0, .10); }

/* ---------- 角色权限 ---------- */
.sk-perm-box {
    border: 1px solid rgba(127, 127, 127, .18); border-radius: 8px; padding: 12px;
    max-height: 380px; overflow: auto;
}
.sk-stat-row { display: flex; align-items: center; gap: 14px; }
.sk-stat-body { flex: 1; min-width: 0; }
.sk-stat-foot { font-size: 12px; margin-top: 2px; }
.sk-stat-suffix { font-size: 13px; }
.sk-chart-card { height: 100%; }
.sk-chart { width: 100%; }
.sk-chart-trend { height: 320px; }
.sk-chart-pie { height: 260px; }
.sk-trend-foot { margin-top: 8px; border-top: 1px solid rgba(127, 127, 127, .14); padding-top: 12px; }
.sk-trend-num { font-size: 16px; font-weight: 600; }
.sk-todo-list, .sk-ticket-list { display: flex; flex-direction: column; }
.sk-todo-item {
    display: flex; align-items: center; gap: 12px; padding: 8px 6px;
    border-radius: 8px; cursor: pointer; transition: background .15s;
}
.sk-todo-item:hover { background: rgba(127, 127, 127, .1); }
.sk-todo-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px; color: #fff; font-size: 15px; flex: none;
}
.sk-todo-text { flex: 1; min-width: 0; }
.sk-todo-title { font-size: 14px; }
.sk-todo-desc { font-size: 12px; }
.sk-mini-desc .ant-descriptions-item { padding-bottom: 4px; }
.sk-ticket-item {
    display: flex; align-items: center; gap: 12px; padding: 9px 6px;
    border-radius: 8px; cursor: pointer; transition: background .15s;
}
.sk-ticket-item + .sk-ticket-item { border-top: 1px solid rgba(127, 127, 127, .12); }
.sk-ticket-item:hover { background: rgba(127, 127, 127, .1); }
.sk-ticket-main { flex: 1; min-width: 0; }
.sk-ticket-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-ticket-sub { font-size: 12px; margin-top: 2px; }
.sk-ticket-tags { display: inline-flex; gap: 4px; flex: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .sk-content { padding: 12px; }
    .sk-header { padding: 0 6px; }
    .sk-header-title { font-size: 14px; }
    .sk-header-crumb { display: none; }
    .sk-header-uname { display: none; }
    .ticket-bubble { max-width: 92%; }
    .sk-chart-trend { height: 240px; }
    .sk-welcome-actions { margin-left: 0; }
    .sk-ticket-tags { display: none; }
}

/* 幻灯片列表缩略图 */
.sk-media-thumb {
  width: 128px; height: 64px; border: 1px solid #f0f0f0; border-radius: 6px;
  background: #fafafa; overflow: hidden; display: grid; place-items: center;
}
.sk-media-thumb img, .sk-media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- 会员头像 ---- */
.usermenu .avatar, .side .avatar-lg { overflow: hidden; }
.usermenu .avatar img, .side .avatar-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-pick { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-pick .preview { width: 88px; height: 88px; border: 1px solid var(--line); overflow: hidden;
  display: grid; place-items: center; background: var(--surface-3); color: var(--lime);
  font-size: 26px; font-weight: 600; letter-spacing: .04em; }
.avatar-pick .preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-pick .tip { font-size: 12px; color: var(--muted); margin-top: 6px; }
