/* ==================== 具身智汇 · 培训管理系统 公共样式 ==================== */
:root {
    --primary: #409EFF;
    --sidebar-bg: #304156;
    --sidebar-sub: #1f2d3d;
    --sidebar-text: #bfcbd9;
    --sidebar-active: #409EFF;
    --topbar-h: 50px;
    --content-bg: #f0f2f5;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    background: var(--content-bg);
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: #333;
    font-size: 14px;
}

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

/* ============ 顶部导航 ============ */
.app-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 16px;
}
.app-topbar .logo {
    width: 210px;
    display: flex;
    align-items: center;
    font-size: 17px;
    font-weight: 700;
    color: #303133;
}
.app-topbar .logo .logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    background: linear-gradient(135deg, #409EFF, #2b6cd4);
    border-radius: 6px;
    color: #fff;
    margin-right: 8px;
    font-size: 15px;
}
.app-topbar .navbar-nav {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.app-topbar .navbar-nav > li > a {
    display: block;
    padding: 14px 16px;
    color: #303133;
    font-size: 14px;
    border-bottom: 2px solid transparent;
}
.app-topbar .navbar-nav > li > a:hover,
.app-topbar .navbar-nav > li.active > a {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.app-topbar .top-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}
.top-right .avatar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.top-right .avatar .fa-user-circle { font-size: 26px; color: #909399; }
.top-right .icon-btn {
    color: #606266;
    font-size: 18px;
    cursor: pointer;
    position: relative;
}
.top-right .badge-dot {
    position: absolute;
    top: -4px; right: -8px;
    min-width: 16px; height: 16px;
    background: #f56c6c;
    color: #fff;
    border-radius: 8px;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
}
.top-right .dropdown-menu-ry {
    position: absolute;
    top: 44px; right: 10px;
    background: #fff;
    border: 1px solid #ebeef5;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
    min-width: 120px;
    z-index: 1100;
    display: none;
}
.top-right .dropdown-menu-ry.open { display: block; }
.top-right .dropdown-menu-ry a {
    display: block;
    padding: 10px 16px;
    color: #606266;
    font-size: 13px;
}
.top-right .dropdown-menu-ry a:hover { background: #f5f7fa; color: var(--primary); }

/* ============ 侧边栏 ============ */
.app-sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    width: 210px;
    background: var(--sidebar-bg);
    overflow-y: auto;
    z-index: 999;
    transition: width .25s;
}
.app-sidebar .menu {
    list-style: none;
    margin: 0; padding: 0;
}
.app-sidebar .menu .menu-item > a,
.app-sidebar .menu .submenu > a {
    display: flex;
    align-items: center;
    padding: 13px 20px;
    color: var(--sidebar-text);
    cursor: pointer;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all .2s;
    white-space: nowrap;
    overflow: hidden;
}
.app-sidebar .menu .menu-item > a i,
.app-sidebar .menu .submenu > a i {
    width: 20px;
    margin-right: 8px;
    text-align: center;
}
.app-sidebar .menu .menu-item > a .arrow,
.app-sidebar .menu .submenu > a .arrow {
    margin-left: auto;
    transition: transform .2s;
}
.app-sidebar .menu .menu-item > a:hover,
.app-sidebar .menu .submenu > a:hover {
    color: #fff;
    background: var(--sidebar-sub);
}
.app-sidebar .menu .menu-item.active > a {
    color: #fff;
    background: var(--sidebar-active);
    border-left-color: #66b1ff;
}
.app-sidebar .submenu-list {
    list-style: none;
    margin: 0; padding: 0;
    background: var(--sidebar-sub);
    display: none;
}
.app-sidebar .submenu-list.open { display: block; }
.app-sidebar .submenu-list li a {
    display: block;
    padding: 11px 20px 11px 48px;
    color: var(--sidebar-text);
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    overflow: hidden;
}
.app-sidebar .submenu-list li a:hover { color: #fff; }
.app-sidebar .submenu-list li.active a { color: #409EFF; }

/* ============ 内容区 ============ */
.app-main {
    margin-left: 210px;
    padding-top: var(--topbar-h);
    min-height: 100vh;
}
.app-breadcrumb {
    padding: 12px 20px 0;
    font-size: 13px;
    color: #909399;
}
.app-breadcrumb .sep { margin: 0 6px; }
.app-breadcrumb .current { color: #303133; }
.app-content {
    padding: 16px 20px 30px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,21,41,.08);
    margin-bottom: 16px;
}
.card .card-header {
    padding: 14px 20px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #303133;
}
.card .card-header .card-title { font-size: 15px; }
.card .card-header .card-tools { margin-left: auto; }
.card .card-body { padding: 20px; }

/* 统计卡片 */
.stat-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.stat-card {
    flex: 1;
    min-width: 200px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,21,41,.08);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}
.stat-card .stat-info .stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #303133;
    line-height: 1.2;
}
.stat-card .stat-info .stat-label {
    font-size: 13px;
    color: #909399;
    margin-top: 4px;
}
.bg-blue   { background: #409EFF; }
.bg-green  { background: #67c23a; }
.bg-orange { background: #e6a23c; }
.bg-purple { background: #9254de; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table-ry {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.table-ry th, .table-ry td {
    padding: 12px 12px;
    text-align: left;
    border-bottom: 1px solid #ebeef5;
    font-size: 13px;
    vertical-align: middle;
}
.table-ry th {
    background: #fafafa;
    color: #909399;
    font-weight: 600;
    white-space: nowrap;
}
.table-ry tbody tr:hover { background: #f5f7fa; }

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 12px;
    line-height: 18px;
}
.tag-primary { background: #ecf5ff; color: #409EFF; }
.tag-success { background: #f0f9eb; color: #67c23a; }
.tag-warning { background: #fdf6ec; color: #e6a23c; }
.tag-info    { background: #f4f4f5; color: #909399; }
.tag-danger  { background: #fef0f0; color: #f56c6c; }

/* 按钮 */
.btn-ry {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .2s;
    text-align: center;
    vertical-align: middle;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #66b1ff; }
.btn-plain { background: #fff; color: #606266; border-color: #dcdfe6; }
.btn-plain:hover { color: var(--primary); border-color: var(--primary); }
.btn-success { background: #67c23a; color: #fff; }
.btn-success:hover { background: #85ce61; }
.btn-danger { background: #f56c6c; color: #fff; }
.btn-danger:hover { background: #f78989; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-xs { padding: 3px 9px; font-size: 12px; }

/* 表单 */
.form-ry .form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.form-ry label { color: #606266; font-size: 13px; white-space: nowrap; }
.form-ry input, .form-ry select, .form-ry textarea {
    height: 32px;
    padding: 0 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 13px;
    color: #606266;
    outline: none;
    background: #fff;
}
.form-ry textarea { height: auto; padding: 8px 12px; line-height: 1.6; }
.form-ry input:focus, .form-ry select:focus, .form-ry textarea:focus { border-color: var(--primary); }

/* 分页 */
.pagination-ry {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 12px 0 0;
    flex-wrap: wrap;
}
.pagination-ry .page-btn {
    min-width: 32px; height: 32px;
    padding: 0 8px;
    border: 1px solid #dcdfe6;
    background: #fff;
    border-radius: 4px;
    color: #606266;
    cursor: pointer;
    font-size: 13px;
    line-height: 30px;
    text-align: center;
}
.pagination-ry .page-btn:hover { color: var(--primary); border-color: var(--primary); }
.pagination-ry .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination-ry .page-total { color: #909399; font-size: 13px; margin-right: 8px; }

/* 步骤条 */
.steps {
    display: flex;
    align-items: center;
    margin: 8px 0 24px;
}
.steps .step {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
}
.steps .step .step-dot {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #c0c4cc;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 1;
    flex-shrink: 0;
}
.steps .step.done .step-dot { background: #67c23a; }
.steps .step.active .step-dot { background: var(--primary); }
.steps .step .step-label {
    margin-left: 10px;
    font-size: 13px;
    color: #909399;
    white-space: nowrap;
}
.steps .step.active .step-label { color: var(--primary); font-weight: 600; }
.steps .step.done .step-label { color: #67c23a; }
.steps .step-line {
    flex: 1;
    height: 2px;
    background: #c0c4cc;
    margin: 0 10px;
}
.steps .step.done .step-line { background: #67c23a; }

/* 进度条 */
.progress-ry {
    width: 120px;
    height: 8px;
    background: #ebeef5;
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}
.progress-ry .bar {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
}

/* 登录页 */
.login-body {
    background: linear-gradient(135deg, #2b4d82 0%, #409EFF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-box {
    width: 400px;
    max-width: 92%;
    background: #fff;
    border-radius: 8px;
    padding: 40px 36px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.login-box .login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.login-box .login-logo .logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #409EFF, #2b6cd4);
    border-radius: 12px;
    color: #fff;
    font-size: 28px;
    margin-bottom: 12px;
}
.login-box .login-logo h2 {
    font-size: 20px;
    color: #303133;
    margin: 0;
    font-weight: 700;
}
.login-box .login-logo p {
    color: #909399;
    font-size: 13px;
    margin: 6px 0 0;
}
.login-form .form-item {
    margin-bottom: 20px;
    position: relative;
}
.login-form .form-item .fa {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #c0c4cc;
    font-size: 16px;
}
.login-form .form-item input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 42px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}
.login-form .form-item input:focus { border-color: var(--primary); }
.login-form .login-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
    color: #606266;
}
.login-form .login-btn {
    width: 100%;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    letter-spacing: 2px;
}
.login-form .login-btn:hover { background: #66b1ff; }
.login-form .login-error {
    color: #f56c6c;
    font-size: 13px;
    margin: -10px 0 12px;
    text-align: center;
    display: none;
}

.text-muted { color: #909399; }
.mt-0 { margin-top: 0; }
.mb-16 { margin-bottom: 16px; }
.empty-tip { text-align: center; color: #909399; padding: 40px 0; }

/* 移动端 */
@media (max-width: 768px) {
    .app-sidebar { width: 0; overflow: hidden; }
    .app-main { margin-left: 0; }
    .app-topbar .logo { width: auto; }
}
