/* ============================================================
   全局样式
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

body {
    background: #f5f7fa;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================================
   顶部栏
   ============================================================ */
.header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 22px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* ============================================================
   统计卡片
   ============================================================ */
.stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 80px;
}

.stat h3 {
    font-size: 12px;
    opacity: 0.9;
}

.stat p {
    font-size: 20px;
    font-weight: bold;
}

/* ============================================================
   区块卡片
   ============================================================ */
.section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    margin: 2px;
    display: inline-block;
    text-decoration: none;
    color: white;
}

.btn-primary {
    background: #667eea;
    color: white;
}
.btn-success {
    background: #48bb78;
    color: white;
}
.btn-danger {
    background: #f56565;
    color: white;
}
.btn-warning {
    background: #ed8936;
    color: white;
}
.btn-secondary {
    background: #718096;
    color: white;
}
.btn-info {
    background: #4299e1;
    color: white;
}
.btn-sm {
    padding: 3px 8px;
    font-size: 12px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #e94560;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 6px;
    letter-spacing: 2px;
}
.btn-submit:hover {
    background: #c73652;
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.35);
}
.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   表格
   ============================================================ */
.table-responsive {
    overflow-x: auto;
}

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

th {
    text-align: left;
    padding: 10px;
    background: #f7fafc;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

/* ============================================================
   徽章
   ============================================================ */
.badge {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
}
.badge-pending {
    background: #feebc8;
    color: #c05621;
}
.badge-approved {
    background: #c6f6d5;
    color: #22543d;
}
.badge-rejected {
    background: #fed7d7;
    color: #742a2a;
}

/* ============================================================
   表单
   ============================================================ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: #ccccee;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #2a2a4a;
    background: #0d0d1a;
    color: #eee;
    font-size: 14px;
    transition: 0.3s;
    outline: none;
}

.form-group input:focus {
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.form-group .hint {
    color: #666688;
    font-size: 11px;
    margin-top: 4px;
}

.form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.form-row input {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 14px;
}

/* ============================================================
   验证码
   ============================================================ */
.captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
.captcha-row input {
    flex: 1;
}

.captcha-img {
    background: #0d0d1a;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #2a2a4a;
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 4px;
    color: #e94560;
    user-select: none;
    min-width: 110px;
    text-align: center;
    font-family: 'Courier New', monospace;
    transition: 0.2s;
}
.captcha-img:hover {
    border-color: #e94560;
}

/* ============================================================
   消息提示
   ============================================================ */
.msg {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.msg.success {
    background: #c6f6d5;
    color: #22543d;
}
.msg.error {
    background: #fed7d7;
    color: #742a2a;
}

/* 前台注册页的消息 */
#msg {
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    display: none;
    text-align: center;
}
#msg.success {
    display: block;
    background: #0a2e1a;
    color: #4ade80;
    border: 1px solid #1a4a2a;
}
#msg.error {
    display: block;
    background: #2e0a0a;
    color: #f87171;
    border: 1px solid #4a1a1a;
}

/* ============================================================
   IP相关
   ============================================================ */
.ip-addr {
    color: #718096;
    font-size: 12px;
    font-family: monospace;
}
.ip-loc {
    color: #48bb78;
    font-size: 12px;
}
.ip-time {
    color: #718096;
    font-size: 11px;
    margin-top: 2px;
}
.ip-cell {
    margin: 2px 0;
}

.no-email {
    color: #a0aec0;
    font-size: 13px;
    font-style: italic;
}

/* ============================================================
   弹窗
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
}

.modal-box h3 {
    margin-bottom: 15px;
}

.modal-box .modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* ============================================================
   登录页
   ============================================================ */
.login-page {
    background: linear-gradient(135deg, #667eea, #764ba2);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    max-width: 90%;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.login-box input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* ============================================================
   前台注册页专用
   ============================================================ */
.register-body {
    background: #0d0d1a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.register-container {
    background: #1a1a2e;
    padding: 40px 35px;
    border-radius: 20px;
    width: 440px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9);
    border: 1px solid #2a2a4a;
}

.register-logo {
    text-align: center;
    margin-bottom: 28px;
}

.register-logo h1 {
    color: #e94560;
    font-size: 26px;
    letter-spacing: 2px;
}

.register-logo p {
    color: #8888aa;
    font-size: 13px;
    margin-top: 4px;
}

.register-footer {
    text-align: center;
    margin-top: 20px;
    color: #555577;
    font-size: 12px;
}

.register-footer a {
    color: #8888aa;
    text-decoration: none;
}
.register-footer a:hover {
    color: #e94560;
}