/* ==========================================================================
   统一品牌主题 theme.css
   用于登录 / 注册 / 会员中心 / 我的站点等前台页面，与官网落地页风格保持一致。
   仅覆盖视觉（颜色/圆角/阴影/间距），不改变 DOM 结构，保证 nice-validator、
   验证码、上传等交互照常工作。
   ========================================================================== */
:root {
    --brand: #4f46e5;
    --brand-2: #7c3aed;
    --brand-grad: linear-gradient(135deg, #4f46e5, #7c3aed);
    --accent: #06b6d4;
    --ink: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f8fafc;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(30, 41, 59, .08);
    --shadow-lg: 0 20px 50px rgba(79, 70, 229, .18);
}

/* 基础 */
body {
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--brand); transition: color .2s ease; }
a:hover, a:focus { color: var(--brand-2); }
main.content { min-height: calc(100vh - 170px); padding-top: 10px; }

/* 顶部导航 */
.navbar-white {
    background: rgba(255, 255, 255, .9) !important;
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 10px rgba(30, 41, 59, .05);
}
.navbar-white .navbar-brand {
    font-weight: 800;
    letter-spacing: -.3px;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}
.navbar-white .navbar-nav > li > a { color: #475569; }
.navbar-white .navbar-nav > li > a:hover,
.navbar-white .navbar-nav > li > a:focus,
.navbar-white .navbar-nav > .active > a { color: var(--brand); background: transparent; }
.navbar-white .dropdown-menu { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.navbar-white .dropdown-menu > li > a { border-radius: 8px; padding: 8px 14px; color: #475569; }
.navbar-white .dropdown-menu > li > a:hover { background: #eef2ff; color: var(--brand); }

/* 按钮 */
.btn-primary {
    background: var(--brand-grad);
    border: none;
    box-shadow: 0 8px 20px rgba(79, 70, 229, .25);
    transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--brand-grad);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(79, 70, 229, .32);
}
.btn-default { border-color: var(--line); color: #475569; background: #fff; }
.btn-default:hover { border-color: var(--brand); color: var(--brand); background: #fff; }

/* 表单控件 */
.form-control {
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.input-group-addon { background: #f1f5f9; border-color: var(--line); color: var(--muted); border-radius: 10px; }
label.control-label { color: #334155; font-weight: 600; }

/* 登录 / 注册 卡片 */
.login-section {
    width: 100%;
    max-width: 440px;
    margin: 40px auto !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    overflow: hidden;
}
.login-section .logon-tab {
    margin: 0 !important;
    display: flex;
    background: #f1f5f9;
    border-bottom: 1px solid var(--line);
}
.login-section .logon-tab > a {
    flex: 1;
    text-align: center;
    padding: 16px 0 !important;
    margin: 0 !important;
    color: var(--muted);
    font-weight: 600;
    background: transparent !important;
    border: none !important;
}
.login-section .logon-tab > a:hover { color: var(--brand); background: #e9eefc !important; }
.login-section .logon-tab > a.active {
    color: var(--brand);
    background: #fff !important;
    box-shadow: inset 0 -3px 0 var(--brand);
}
.login-section .login-main { padding: 30px 30px 12px !important; }
.login-section .alert-info {
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    color: #3730a3;
    border-radius: 10px;
}

/* 面板 / 卡片（会员中心、我的站点） */
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #fff;
    margin-bottom: 24px;
}
.panel > .panel-heading {
    background: #fff;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0 !important;
    font-weight: 700;
    color: var(--ink);
}
.panel > .panel-heading .fa { color: var(--brand); margin-right: 6px; }
.panel-default > .panel-heading { color: var(--ink); }
.panel-body { padding: 20px; }
.page-header { border-bottom: 1px solid var(--line); padding-bottom: 12px; }

/* 表格 */
.table > thead > tr > th { border-bottom: 2px solid var(--line); color: var(--muted); font-weight: 600; }
.table > tbody > tr > td { border-color: #f1f5f9; }
.table-striped > tbody > tr:nth-of-type(odd) { background: #fafbff; }

/* 会员中心侧边导航 */
.sidenav .list-group {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px;
    margin-bottom: 20px;
}
.sidenav .list-group-heading {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 10px 12px 8px;
    background: transparent;
    border: 0;
}
.sidenav .list-group-item {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 2px 0;
    border-radius: 10px;
}
.sidenav .list-group-item > a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: #475569;
    font-weight: 500;
    border-radius: 10px;
    transition: background .2s ease, color .2s ease;
}
.sidenav .list-group-item > a .fa {
    color: var(--muted);
    width: 18px;
    text-align: center;
    transition: color .2s ease;
}
.sidenav .list-group-item > a:hover { background: #f1f5f9; color: var(--ink); }
.sidenav .list-group-item > a:hover .fa { color: var(--brand); }
.sidenav .list-group-item.active,
.sidenav .list-group-item.active:hover,
.sidenav .list-group-item.active:focus { background: transparent; }
.sidenav .list-group-item.active > a {
    background: #eef2ff;
    color: var(--brand);
    font-weight: 600;
}
.sidenav .list-group-item.active > a .fa { color: var(--brand); }

/* 进度条 */
.progress { border-radius: 999px; background: #eef2f7; box-shadow: none; }
.progress-bar { background: var(--brand-grad); }

/* 标签 */
.label-success { background: #16a34a; }
.label-warning { background: #f59e0b; }
.label-danger  { background: #dc2626; }

/* 页脚 */
footer.footer {
    background: #0f172a;
    color: #94a3b8;
    margin-top: 40px;
    padding: 22px 0;
}
footer.footer .copyright { color: #94a3b8; line-height: 28px; }
footer.footer a { color: #cbd5e1; }
footer.footer a:hover { color: #fff; }

/* 头像 */
.avatar-img img { border-radius: 50%; }

/* 会员中心概览 */
.member-overview > .panel-body { padding: 26px; }
.member-profile {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}
.member-avatar .avatar-img {
    display: block;
    box-sizing: border-box;
    width: 72px;
    height: 72px;
    line-height: normal;
    border-radius: 50%;
    background-color: #eef2ff;
    overflow: hidden;
    flex-shrink: 0;
}
.member-avatar .avatar-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}
.member-avatar:hover .avatar-img img { transform: scale(1.04); }
.member-meta { flex: 1; min-width: 0; }
.member-meta h4 { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: var(--ink); }
.member-bio {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.member-edit { flex-shrink: 0; }
.member-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 22px;
}
.mstat {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.mstat-label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.mstat-value { font-size: 18px; font-weight: 700; color: var(--ink); }
.mstat-value.mstat-time { font-size: 15px; font-weight: 600; }
@media (max-width: 767px) {
    .member-overview > .panel-body { padding: 20px; }
    .member-profile { flex-wrap: wrap; }
    .member-edit { width: 100%; }
    .member-stats { grid-template-columns: 1fr 1fr; }
}

/* 登录 / 注册 欢迎标题 */
.auth-title { text-align: center; margin: 34px 0 -14px; }
.auth-title h1 { font-size: 26px; font-weight: 800; color: var(--ink); margin: 0; letter-spacing: -.5px; }
.auth-title p { color: var(--muted); margin: 6px 0 0; font-size: 15px; }

/* 响应式微调 */
@media (max-width: 640px) {
    .login-section { margin: 20px auto !important; border-radius: 0; border-left: none; border-right: none; }
    .login-section .login-main { padding: 22px 18px 8px !important; }
    main.content { padding-top: 0; }
}
