/* SSO OIDC 统一身份认证中心 - 全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
       background: #f0f2f5; color: #333; font-size: 14px; line-height: 1.6; }
a { color: #667eea; text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #f4f4f4; padding: 2px 6px; border-radius: 3px; font-size: 13px; color: #c7254e; }

/* ========== 登录页 ========== */
.login-page { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh;
               display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-container { background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
                   width: 100%; max-width: 420px; overflow: hidden; }
.login-brand { text-align: center; padding: 36px 32px 20px; }
.brand-logo { font-size: 48px; margin-bottom: 12px; }
.login-brand h1 { font-size: 22px; color: #333; margin-bottom: 6px; }
.login-brand p { color: #888; font-size: 14px; }
.login-form { padding: 0 32px 28px; }
.login-footer { text-align: center; padding: 16px; background: #f8f9fa; color: #999; font-size: 12px; }

/* ========== 表单 ========== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; color: #444; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px;
    transition: border-color .2s, box-shadow .2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,.15); }
.form-group textarea { resize: vertical; font-family: inherit; }
.required { color: #dc3545; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-full { grid-column: 1 / -1; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checkbox-item { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.checkbox-item input { width: auto; }

/* ========== 按钮 ========== */
.btn { display: inline-block; padding: 8px 18px; border: none; border-radius: 6px; font-size: 14px;
       cursor: pointer; text-decoration: none; text-align: center; transition: all .2s; font-weight: 500; }
.btn:hover { text-decoration: none; opacity: .9; }
.btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.btn-outline { background: #fff; color: #667eea; border: 1px solid #667eea; }
.btn-outline:hover { background: #f0f2ff; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-xs { padding: 3px 8px; font-size: 12px; }
.btn-block { width: 100%; padding: 12px; font-size: 16px; }

/* ========== 管理后台布局 ========== */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #1e293b; color: #cbd5e1; flex-shrink: 0; display: flex; flex-direction: column; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid #334155; }
.brand-icon { font-size: 24px; }
.brand-text { font-size: 16px; font-weight: 600; color: #fff; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: #cbd5e1;
            font-size: 14px; transition: all .2s; border-left: 3px solid transparent; }
.nav-item:hover { background: #334155; color: #fff; text-decoration: none; }
.nav-item.active { background: #334155; color: #fff; border-left-color: #667eea; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.main-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; padding: 0 24px; height: 56px; display: flex; align-items: center;
          justify-content: space-between; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.topbar-title { font-size: 17px; font-weight: 600; color: #333; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#667eea,#764ba2);
               color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.user-name { font-size: 14px; color: #555; }
.main-content { flex: 1; padding: 24px; }
.admin-footer { text-align: center; padding: 16px; color: #999; font-size: 12px; background: #fff; border-top: 1px solid #eee; }

/* ========== 卡片 ========== */
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 20px; overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
               border-bottom: 1px solid #f0f0f0; flex-wrap: wrap; gap: 10px; }
.card-header h3 { font-size: 16px; color: #333; }
.card-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-body { padding: 20px; }

/* ========== 统计卡片 ========== */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 18px; display: flex; align-items: center; gap: 14px;
             box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.stat-value { font-size: 24px; font-weight: 700; color: #333; }
.stat-label { font-size: 13px; color: #888; }

/* ========== 表格 ========== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f8f9fa; padding: 10px 12px; text-align: left; font-weight: 600;
                 color: #555; font-size: 13px; border-bottom: 2px solid #e9ecef; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.data-table tr:hover td { background: #f8f9ff; }
.data-table .actions { white-space: nowrap; }
.text-center { text-align: center; }
.text-muted { color: #999; }

/* ========== 徽章 ========== */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }

/* ========== 提示框 ========== */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ========== 搜索表单 ========== */
.search-form { display: flex; align-items: center; gap: 8px; }
.search-form input { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; width: 200px; }
.search-form select { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }

/* ========== 分页 ========== */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.page-link { display: inline-block; padding: 5px 10px; border: 1px solid #ddd; border-radius: 4px;
             color: #555; font-size: 13px; text-decoration: none; }
.page-link:hover { background: #f0f2ff; border-color: #667eea; text-decoration: none; }
.page-link.active { background: #667eea; color: #fff; border-color: #667eea; }
.page-ellipsis { padding: 5px 4px; color: #999; }
.page-info { margin-left: auto; color: #999; font-size: 13px; }

/* ========== 模态框 ========== */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5);
         display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-content { background: #fff; border-radius: 8px; width: 100%; max-width: 480px; max-height: 90vh;
                 overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
                border-bottom: 1px solid #eee; }
.modal-header h4 { font-size: 16px; }
.modal-close { font-size: 22px; cursor: pointer; color: #999; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-footer { padding: 14px 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }

/* ========== 工作台系统卡片 ========== */
.system-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.system-card { background: #fff; border: 1px solid #e9ecef; border-radius: 8px; padding: 20px;
               text-align: center; transition: all .2s; cursor: pointer; display: block; color: inherit; }
.system-card:hover { border-color: #667eea; box-shadow: 0 4px 12px rgba(102,126,234,.2);
                     transform: translateY(-2px); text-decoration: none; }
.system-icon { font-size: 36px; margin-bottom: 10px; }
.system-name { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 4px; }
.system-desc { font-size: 12px; color: #999; }

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 40px 20px; color: #999; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ========== 个人中心 ========== */
.profile-header { display: flex; align-items: center; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.profile-avatar-lg { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg,#667eea,#764ba2);
                     color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; }
.profile-info h3 { font-size: 20px; margin-bottom: 4px; }
.profile-info p { color: #666; font-size: 14px; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .brand-text, .nav-item span:not(.nav-icon) { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
}
