/* SSO 统一认证中心 - 样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 40px 36px;
}

.card h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: #888;
    font-size: 14px;
    text-align: center;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: #4f6ef7;
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.1);
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn-primary {
    background: #4f6ef7;
    color: #fff;
}

.btn-primary:hover {
    background: #3b5de7;
}

.btn-secondary {
    background: #f0f2f5;
    color: #555;
}

.btn-secondary:hover {
    background: #e4e6e9;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-block {
    display: block;
    width: 100%;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fff0f0;
    color: #e74c3c;
    border: 1px solid #fdd;
}

.alert-success {
    background: #f0fff0;
    color: #27ae60;
    border: 1px solid #dfd;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #888;
}

.form-footer a {
    color: #4f6ef7;
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

.actions {
    text-align: center;
    margin-top: 24px;
}

.actions .btn + .btn {
    margin-left: 12px;
}

.user-info {
    text-align: center;
    margin: 20px 0;
    padding: 16px;
    background: #f8f9ff;
    border-radius: 8px;
}

.user-info p {
    margin-bottom: 6px;
}

.auth-info {
    margin: 20px 0;
    padding: 16px;
    background: #f8f9ff;
    border-radius: 8px;
    line-height: 1.8;
}

.auth-info .muted {
    color: #999;
    font-size: 13px;
}

.auth-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.auth-actions .btn {
    flex: 1;
}

.muted {
    color: #999;
}

/* 后台样式 */
.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.admin-sidebar {
    width: 220px;
    background: #1a1a2e;
    color: #fff;
    padding: 24px 0;
    flex-shrink: 0;
}

.admin-sidebar .brand {
    font-size: 18px;
    font-weight: 700;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}

.admin-sidebar nav a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.admin-main {
    flex: 1;
    padding: 32px;
    background: #f0f2f5;
    overflow-x: auto;
}

.admin-main h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

.admin-main .card {
    padding: 24px;
    margin-bottom: 20px;
}

/* 表格样式 */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th,
table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    font-weight: 600;
    color: #555;
    background: #fafafa;
}

table tr:hover td {
    background: #f8f9ff;
}

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-danger {
    background: #ffebee;
    color: #c62828;
}

/* 仪表盘 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #4f6ef7;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
}

/* ──────────── 用户中心样式 ──────────── */
.profile-card {
    max-width: 520px !important;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: #e0e0e0;
}

.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 24px;
    background: #fafbfc;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.profile-tab {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    background: transparent;
    transition: all 0.25s;
    position: relative;
}

.profile-tab:hover {
    color: #333;
    background: #f0f2f5;
}

.profile-tab.active {
    color: #4f6ef7;
    background: #fff;
    border-bottom: 2px solid #4f6ef7;
    margin-bottom: -2px;
}

.profile-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #333;
}

.avatar-preview-wrap {
    text-align: center;
    margin-bottom: 16px;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f2f5;
}

.input-hint {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

input[type="file"] {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

input:disabled {
    background: #f8f8f8;
    color: #888;
    cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 180px;
    }
    .admin-main {
        padding: 20px;
    }
    .card {
        padding: 24px 20px;
    }
}

@media (max-width: 600px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        padding: 16px;
    }
    .admin-sidebar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .admin-sidebar nav a {
        padding: 8px 14px;
    }
}
