/* ============================
   刚刚好·授权中心 后台样式（紫黑主题，区别于系统A的深蓝）
   ============================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f6fa;
    color: #2c2c34;
    font-size: 14px;
    line-height: 1.6;
}
a { color: #722ed1; text-decoration: none; }
a:hover { color: #9254de; }

/* 布局 */
.badmin-layout { display: flex; min-height: 100vh; }
.badmin-sidebar {
    width: 240px; flex-shrink: 0;
    background: linear-gradient(180deg, #1a0f2e 0%, #2b1b4f 50%, #3d2667 100%);
    color: #fff;
    position: fixed; top:0; left:0; bottom:0;
    overflow-y: auto; z-index: 100;
}
.badmin-sidebar .logo {
    padding: 18px 24px;
    font-size: 17px; font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 10px;
}
.badmin-sidebar .logo::before {
    content: '🔐'; font-size: 20px;
    filter: drop-shadow(0 0 8px rgba(146,84,222,.6));
}
.badmin-sidebar .menu { padding: 10px 0; }
.badmin-sidebar .menu-group {
    padding: 8px 24px;
    font-size: 11px; color: rgba(255,255,255,0.35);
    text-transform: uppercase; letter-spacing: 1.2px;
}
.badmin-sidebar .menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 24px;
    color: rgba(255,255,255,0.72);
    transition: all .2s; border-left: 3px solid transparent;
    font-size: 13.5px;
}
.badmin-sidebar .menu a:hover { background: rgba(146,84,222,0.12); color: #fff; }
.badmin-sidebar .menu a.active {
    background: rgba(146,84,222,0.18); color: #fff;
    border-left-color: #b37feb;
}
.badmin-sidebar .menu a .icon { width: 18px; text-align: center; }
.badmin-sidebar .license-balance {
    margin: 14px 20px 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(114,46,209,0.3), rgba(61,38,103,0.3));
    border: 1px solid rgba(179,127,235,0.2);
    border-radius: 10px;
}
.badmin-sidebar .license-balance .t { font-size: 11px; color: rgba(255,255,255,0.55); }
.badmin-sidebar .license-balance .v { font-size: 20px; font-weight: 700; color: #fff2b0; margin-top: 2px; }

/* 主体 */
.badmin-main { margin-left: 240px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.badmin-header {
    height: 56px; background: #fff; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 1px 4px rgba(43,27,79,0.06);
    position: sticky; top: 0; z-index: 50;
}
.badmin-header .breadcrumb { font-size: 14px; color: #6b6b76; }
.badmin-header .breadcrumb a { color: #6b6b76; }
.badmin-header .breadcrumb a:hover { color: #722ed1; }
.badmin-header .header-right { display: flex; align-items: center; gap: 18px; }
.badmin-header .role-tag {
    font-size: 11px; padding: 2px 8px; border-radius: 10px;
    background: linear-gradient(90deg, #722ed1, #9254de); color: #fff;
}
.badmin-header .admin-info { display: flex; align-items: center; gap: 8px; }
.badmin-header .admin-info .avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #722ed1, #b37feb);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700;
}
.badmin-header .logout-btn {
    padding: 6px 14px; background: #fff; border: 1px solid #e0d9e8;
    border-radius: 6px; cursor: pointer; font-size: 13px; color: #595967;
}
.badmin-header .logout-btn:hover { border-color: #722ed1; color: #722ed1; }

.badmin-content { padding: 22px 24px; flex: 1; }
.page-title { font-size: 20px; font-weight: 700; color: #2c2c34; margin-bottom: 18px; }

/* 卡片 */
.card {
    background: #fff; border-radius: 10px; padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(43,27,79,0.04);
    border: 1px solid #efeaf5;
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #f4eefa; }

/* 搜索栏 */
.search-bar {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
    background: #fff; padding: 16px 18px; border-radius: 10px;
    border: 1px solid #efeaf5; margin-bottom: 14px;
}
.search-bar .form-item { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 160px; max-width: 260px; }
.search-bar .form-item label { font-size: 12px; color: #7a7a85; }
.search-bar .form-actions { display: flex; gap: 8px; flex: 0 0 auto; }

/* 表单 */
.form .form-item, .modal-body .form-item { margin-bottom: 14px; display: flex; flex-direction: column; gap: 5px; }
.form .form-item label, .modal-body .form-item label { font-size: 13px; color: #595967; font-weight: 500; }
.form .form-item .hint, .modal-body .form-item .hint { color: #8c8c97; font-size: 12px; }
.form .form-actions { display: flex; gap: 10px; padding-top: 8px; }
input[type="text"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="password"], input[type="email"], select, textarea {
    width: 100%;
    padding: 7px 10px; border: 1px solid #d9d1e3; border-radius: 6px;
    font-size: 13.5px; background: #fff;
    transition: all .15s;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #9254de; box-shadow: 0 0 0 2px rgba(146,84,222,0.15); }
textarea { resize: vertical; }

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    padding: 7px 16px; border-radius: 6px; cursor: pointer;
    font-size: 13.5px; border: 1px solid transparent;
    transition: all .15s; user-select: none; font-weight: 500;
}
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11.5px; }
.btn-primary { background: linear-gradient(90deg, #722ed1, #9254de); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 2px 8px rgba(114,46,209,0.3); }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #49a917; }
.btn-warning { background: #faad14; color: #fff; }
.btn-warning:hover { background: #e09c12; }
.btn-danger { background: #f5222d; color: #fff; }
.btn-danger:hover { background: #d91a22; }
.btn-default { background: #fff; color: #595967; border-color: #d9d1e3; }
.btn-default:hover { border-color: #9254de; color: #722ed1; }
.btn-link { background: transparent; color: #722ed1; padding: 3px 6px; }
.btn-link:hover { color: #9254de; text-decoration: underline; }

/* 批量操作栏 */
.batch-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px; background: #fff8e1; border: 1px solid #fff1b8;
    border-radius: 8px; margin-bottom: 12px;
}
.batch-bar .batch-actions { display: flex; gap: 8px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead th {
    background: #faf7ff; color: #595967;
    padding: 10px 12px; text-align: left; font-weight: 600;
    border-bottom: 1px solid #e8e0f0; font-size: 12.5px;
}
.data-table tbody td { padding: 10px 12px; border-bottom: 1px solid #f4eefa; }
.data-table tbody tr:hover { background: #faf7ff; }
.data-table .check-col { width: 40px; text-align: center; }
.data-table .num-col { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .action-col { width: 220px; }

/* 标签 */
.tag {
    display: inline-block; padding: 2px 8px; font-size: 11.5px;
    border-radius: 10px; font-weight: 500;
}
.tag-green { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.tag-blue { background: #e6f4ff; color: #0958d9; border: 1px solid #91caff; }
.tag-orange { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
.tag-red { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.tag-purple { background: #f9f0ff; color: #531dab; border: 1px solid #d3adf7; }
.tag-gray { background: #fafafa; color: #595959; border: 1px solid #d9d9d9; }

/* 按钮组 */
.btn-group { display: flex; flex-wrap: wrap; gap: 4px; }

/* 弹窗 */
.modal-mask {
    display: none; position: fixed; inset: 0; background: rgba(26,15,46,0.55);
    z-index: 1000; align-items: center; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
    background: #fff; border-radius: 12px; width: 520px; max-width: 92vw;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 10px 40px rgba(43,27,79,0.25);
    animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.95); opacity: .5; } to { transform: scale(1); opacity: 1; } }
.modal-header {
    padding: 14px 18px; border-bottom: 1px solid #f4eefa;
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header .title { font-size: 15px; font-weight: 600; }
.modal-header .close {
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: 6px; cursor: pointer; font-size: 22px; color: #8c8c97;
}
.modal-header .close:hover { background: #f4eefa; color: #722ed1; }
.modal-body { padding: 18px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 18px; border-top: 1px solid #f4eefa; display: flex; justify-content: flex-end; gap: 8px; }

/* 统计卡片网格 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card {
    background: #fff; border-radius: 10px; padding: 16px 18px;
    border: 1px solid #efeaf5; position: relative; overflow: hidden;
}
.stat-card::after {
    content: ''; position: absolute; right: -30px; top: -30px;
    width: 90px; height: 90px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(146,84,222,0.08), rgba(114,46,209,0.04));
}
.stat-card .label { font-size: 12.5px; color: #8c8c97; }
.stat-card .value { font-size: 24px; font-weight: 700; margin-top: 6px; color: #2c2c34; font-variant-numeric: tabular-nums; }
.stat-card .value.c1 { color: #722ed1; }
.stat-card .value.c2 { color: #13c2c2; }
.stat-card .value.c3 { color: #fa8c16; }
.stat-card .value.c4 { color: #eb2f96; }
.stat-card .value.c5 { color: #52c41a; }
.stat-card .value.c6 { color: #f5222d; }

/* 登录页 */
.b-login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1a0f2e 0%, #3d2667 50%, #722ed1 100%);
    padding: 30px; position: relative; overflow: hidden;
}
.b-login-wrap::before, .b-login-wrap::after {
    content: ''; position: absolute; border-radius: 50%; opacity: .25; filter: blur(60px);
}
.b-login-wrap::before { width: 500px; height: 500px; background: #9254de; left: -150px; top: -150px; }
.b-login-wrap::after { width: 420px; height: 420px; background: #13c2c2; right: -120px; bottom: -120px; }
.b-login-box {
    background: #fff; width: 420px; max-width: 100%;
    border-radius: 14px; padding: 36px 36px 30px;
    box-shadow: 0 20px 60px rgba(26,15,46,0.4);
    position: relative; z-index: 2;
}
.b-login-box .logo-big {
    text-align: center; font-size: 22px; font-weight: 700;
    color: #722ed1; margin-bottom: 6px;
}
.b-login-box .logo-sub { text-align: center; color: #8c8c97; font-size: 13px; margin-bottom: 26px; }
.b-login-box .field { margin-bottom: 16px; }
.b-login-box .field label { font-size: 12.5px; color: #595967; display: block; margin-bottom: 6px; }
.b-login-box .btn-login {
    width: 100%; padding: 11px; border-radius: 8px;
    background: linear-gradient(90deg, #722ed1, #9254de); color: #fff;
    border: none; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all .15s;
}
.b-login-box .btn-login:hover { filter: brightness(1.08); box-shadow: 0 4px 16px rgba(114,46,209,0.4); }
.b-login-box .tip {
    margin-top: 16px; text-align: center; color: #8c8c97; font-size: 12px;
}
.b-login-box .tip code { background: #f4eefa; padding: 1px 6px; border-radius: 4px; color: #722ed1; }

/* code / pre */
code { font-family: 'SF Mono', Menlo, Consolas, monospace; background: #f4eefa; padding: 1px 6px; border-radius: 4px; color: #531dab; font-size: 12px; }
pre { background: #1a0f2e; color: #d6c7f0; padding: 14px; border-radius: 8px; font-size: 12.5px; overflow-x: auto; line-height: 1.55; font-family: Menlo, Consolas, monospace; }
pre .c-key { color: #ffd591; }
pre .c-str { color: #95de64; }
pre .c-com { color: #6b5a8c; }

/* 响应式 */
@media (max-width: 960px) {
    .badmin-sidebar { transform: translateX(-100%); transition: transform .25s; }
    .badmin-sidebar.open { transform: translateX(0); }
    .badmin-main { margin-left: 0; }
}
