/* WHMO Frontend Styles - v2.0 */

/* ===== 通用 ===== */
.whmo-form {
    max-width: 520px;
    margin: 20px auto;
    padding: 24px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.whmo-form h2 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #8B0000;
    color: #333;
}
.whmo-form h3 {
    color: #8B0000;
    font-size: 16px;
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.whmo-form-section { margin-bottom: 10px; }
.whmo-edit-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ddd;
}
.whmo-edit-section:last-of-type { border-bottom: none; }

/* ===== 表单 ===== */
.whmo-form-group {
    margin-bottom: 16px;
}
.whmo-form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #555;
}
.whmo-form-group label .required {
    color: #c00;
}
.whmo-form-group input[type="text"],
.whmo-form-group input[type="email"],
.whmo-form-group input[type="password"],
.whmo-form-group input[type="tel"],
.whmo-form-group input[type="url"],
.whmo-form-group select,
.whmo-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
.whmo-form-group textarea { resize: vertical; }
.whmo-form-group small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 12px;
}
.whmo-input-with-btn {
    display: flex;
    gap: 8px;
}
.whmo-input-with-btn input { flex: 1; }

/* ===== 按钮 ===== */
.whmo-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #8B0000;
    background: #fff;
    color: #8B0000;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s;
    min-height: 44px;
    box-sizing: border-box;
}
.whmo-btn:hover {
    background: #8B0000;
    color: #fff;
}
.whmo-btn-primary {
    background: #8B0000;
    color: #fff;
}
.whmo-btn-primary:hover {
    background: #a00000;
    border-color: #a00000;
}
.whmo-btn-secondary {
    border-color: #666;
    color: #666;
}
.whmo-btn-secondary:hover {
    background: #666;
    color: #fff;
}
.whmo-btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    white-space: nowrap;
}
.whmo-form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.whmo-form-links {
    margin-top: 16px;
    text-align: center;
}
.whmo-form-links a {
    color: #8B0000;
    margin: 0 8px;
}

/* ===== 步骤指示器 ===== */
.whmo-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 10px;
}
.whmo-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}
.whmo-step::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #ddd;
    z-index: 0;
}
.whmo-step:last-child::after { display: none; }
.whmo-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 1;
    margin-bottom: 6px;
}
.whmo-step.active .whmo-step-num {
    background: #8B0000;
}
.whmo-step.completed .whmo-step-num {
    background: #28a745;
}
.whmo-step.completed::after {
    background: #28a745;
}
.whmo-step-label {
    font-size: 12px;
    color: #888;
}
.whmo-step.active .whmo-step-label {
    color: #8B0000;
    font-weight: 600;
}

/* ===== 文件上传区域 ===== */
.whmo-upload-area {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all .2s;
    cursor: pointer;
}
.whmo-upload-area:hover,
.whmo-upload-area.dragover {
    border-color: #8B0000;
    background: #fff5f5;
}
.whmo-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.whmo-upload-placeholder {
    color: #888;
}
.whmo-upload-icon {
    display: block;
    font-size: 32px;
    margin-bottom: 8px;
}
.whmo-upload-placeholder small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
}
.whmo-upload-preview {
    position: relative;
}
.whmo-upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
}
.whmo-upload-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #c00;
    color: #fff;
    border: 2px solid #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.whmo-upload-remove:hover {
    background: #a00;
}

/* ===== 单选按钮组 ===== */
.whmo-radio-group {
    display: flex;
    gap: 20px;
}
.whmo-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.whmo-radio input {
    margin-right: 6px;
}

/* ===== 提示框 ===== */
.whmo-notice-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #8B0000;
    border-radius: 4px;
    padding: 16px;
}
.whmo-notice-box h4 {
    margin: 0 0 10px;
    color: #333;
}
.whmo-notice-box ul {
    margin: 10px 0 0;
    padding-left: 20px;
}
.whmo-notice-box li {
    margin-bottom: 6px;
    color: #555;
}

/* ===== 消息 ===== */
.whmo-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}
.whmo-message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.whmo-message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ===== Profile ===== */
.whmo-profile {
    max-width: 750px;
    margin: 20px auto;
}
.whmo-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #8B0000, #a00000);
    color: #fff;
    border-radius: 8px 8px 0 0;
}
.whmo-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #DAA520;
}
.whmo-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    background: #333;
    color: #fff;
}
.whmo-avatar-sm {
    width: 48px;
    height: 48px;
    font-size: 18px;
}
.whmo-profile-info h2 {
    margin: 0 0 8px;
    color: #fff;
}
.whmo-profile-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.whmo-level-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}
.whmo-level-observer { background: #888; color: #fff; }
.whmo-level-member { background: #2196F3; color: #fff; }
.whmo-level-director { background: #FF9800; color: #fff; }
.whmo-level-standing { background: #DAA520; color: #333; }
.whmo-review-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}
.whmo-review-warning { background: #fff3cd; color: #856404; }
.whmo-review-success { background: #d4edda; color: #155724; }
.whmo-review-error { background: #f8d7da; color: #721c24; }
.whmo-member-id { font-size: 13px; opacity: .8; margin: 0; }
.whmo-profile-body {
    margin-top: 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
}
.whmo-profile-section {
    margin-bottom: 24px;
}
.whmo-profile-section h3 {
    color: #8B0000;
    font-size: 16px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.whmo-info-table {
    width: 100%;
}
.whmo-info-table td {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.whmo-info-table td:first-child {
    width: 120px;
    color: #888;
}
.whmo-profile-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}
.whmo-certificate-img {
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===== 提醒框 ===== */
.whmo-alert {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.whmo-alert-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}
.whmo-alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}
.whmo-alert-icon {
    font-size: 24px;
}
.whmo-alert strong { display: block; margin-bottom: 4px; }
.whmo-alert p { margin: 0; font-size: 14px; }

/* ===== 企业信息卡片 ===== */
.whmo-enterprise-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}
.whmo-enterprise-content {
    display: flex;
    gap: 16px;
}
.whmo-enterprise-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}
.whmo-enterprise-info { flex: 1; }
.whmo-enterprise-info h4 {
    margin: 0 0 6px;
    color: #333;
}
.whmo-enterprise-industry {
    color: #8B0000;
    font-size: 13px;
    margin: 0 0 8px;
}
.whmo-enterprise-desc {
    color: #666;
    font-size: 14px;
    margin: 0 0 8px;
}
.whmo-enterprise-address {
    color: #888;
    font-size: 13px;
    margin: 0;
}

/* ===== 企业信息编辑 ===== */
.whmo-enterprise-edit { background: #f8f9fa; padding: 16px; border-radius: 8px; }
.whmo-enterprise-edit h3 small { color: #888; font-weight: normal; }
.whmo-logo-edit { display: flex; align-items: center; gap: 12px; }
.whmo-enterprise-logo-preview {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}
.whmo-enterprise-logo-placeholder {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ddd;
    border-radius: 8px;
    color: #888;
    font-size: 12px;
    background: #fff;
}

/* ===== 头像编辑 ===== */
.whmo-avatar-edit {
    display: flex;
    align-items: center;
    gap: 12px;
}
.whmo-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

/* ===== 状态标签 ===== */
.whmo-status-active { color: #28a745; }
.whmo-status-inactive { color: #dc3545; }

/* ===== Member Directory ===== */
.whmo-member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.whmo-member-card-small {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.whmo-member-card-info strong { display: block; }

/* ===== 会员证 ===== */
.whmo-member-card {
    max-width: 800px;
    margin: 20px auto;
    padding: 24px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.whmo-member-card h2 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #8B0000;
    color: #333;
}
.whmo-card-image { text-align: center; margin-bottom: 16px; }
.whmo-card-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.whmo-card-meta {
    text-align: center;
    margin-bottom: 16px;
    color: #666;
}
.whmo-card-meta p { margin: 4px 0; }
.whmo-card-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.whmo-card-empty {
    text-align: center;
    padding: 40px 20px;
}
.whmo-card-empty-icon {
    font-size: 64px;
    margin-bottom: 12px;
}
.whmo-card-empty p {
    margin: 4px 0;
    color: #333;
    font-size: 16px;
}
.whmo-card-hint {
    color: #888 !important;
    font-size: 14px !important;
}

/* ===== Activity ===== */
.whmo-activity-cards { display: flex; flex-direction: column; gap: 16px; }
.whmo-activity-card { background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 16px; }
.whmo-activity-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.whmo-activity-card-header h3 { margin: 0; }
.whmo-activity-card-header h3 a { color: #8B0000; text-decoration: none; }
.whmo-activity-card-body p { margin: 4px 0; color: #555; font-size: 14px; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .whmo-profile-header { flex-direction: column; text-align: center; }
    .whmo-steps { font-size: 11px; padding: 0 4px; }
    .whmo-step-num { width: 24px; height: 24px; font-size: 12px; }
    .whmo-step::after { top: 12px; }
    .whmo-step-label { font-size: 9px; }
    .whmo-enterprise-content { flex-direction: column; }
    .whmo-logo-edit, .whmo-avatar-edit { flex-wrap: wrap; }
    .whmo-form { padding: 16px 12px; margin: 12px auto; }
    .whmo-form h2 { font-size: 1.2em; }
    .whmo-form h3 { font-size: 14px; }
    .whmo-upload-area { padding: 16px 12px; }
    .whmo-upload-icon { font-size: 28px; }
    .whmo-radio-group { flex-direction: column; gap: 10px; }
    .whmo-form-actions { flex-direction: column; gap: 12px; }
    .whmo-form-actions .whmo-btn { width: 100%; text-align: center; padding: 12px 20px; font-size: 15px; min-height: 48px; }
    .whmo-member-card { padding: 16px 12px; }
    .whmo-card-actions { flex-direction: column; }
    .whmo-card-actions .whmo-btn { width: 100%; text-align: center; }
    .whmo-filter-row { flex-direction: column; align-items: stretch; }
    .whmo-filter-item { width: 100%; }
    .whmo-filter-item input[type="text"],
    .whmo-filter-item select { min-width: 100%; width: 100%; box-sizing: border-box; }
    .whmo-filter-search input { min-width: 100%; }
    .whmo-filter-actions { width: 100%; justify-content: stretch; }
    .whmo-filter-actions .whmo-btn { flex: 1; text-align: center; }
    .whmo-directory-stats { font-size: 13px; }
    .whmo-member-grid { grid-template-columns: 1fr; }
    .whmo-member-card-small { padding: 10px; }
    .whmo-captcha-input-row { flex-wrap: wrap; }
    .whmo-captcha-input-row input { width: 100%; }
    .whmo-input-with-btn { flex-wrap: wrap; }
    .whmo-input-with-btn input { width: 100%; flex: none; }
    .whmo-input-with-btn .whmo-btn { width: 100%; text-align: center; min-height: 44px; }
}

/* 超小屏 480px */
@media (max-width: 480px) {
    .whmo-steps { font-size: 10px; }
    .whmo-step-num { width: 22px; height: 22px; font-size: 11px; }
    .whmo-step::after { top: 11px; }
    .whmo-step-label { font-size: 8px; }
    .whmo-form-group input[type="text"],
    .whmo-form-group input[type="email"],
    .whmo-form-group input[type="password"],
    .whmo-form-group input[type="tel"],
    .whmo-form-group select,
    .whmo-form-group textarea { font-size: 16px; }
    .whmo-upload-preview img { max-height: 150px; }
    .whmo-profile-header { padding: 16px 12px; }
    .whmo-avatar { width: 64px; height: 64px; }
    .whmo-profile-info h2 { font-size: 1.1em; }
    .whmo-level-badge { font-size: 11px; padding: 2px 8px; }
}


/* ===== 会员名录搜索筛选 ===== */
.whmo-directory-filters {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}
.whmo-filter-form { margin: 0; }
.whmo-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.whmo-filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.whmo-filter-item label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}
.whmo-filter-item input[type="text"],
.whmo-filter-item select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-width: 140px;
}
.whmo-filter-search input {
    min-width: 200px;
}
.whmo-filter-actions {
    flex-direction: row;
    gap: 8px;
    align-items: center;
}
.whmo-directory-stats {
    margin-bottom: 16px;
    color: #666;
    font-size: 14px;
}
.whmo-member-hall {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* 分页样式 */
.whmo-directory-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.whmo-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s;
}
.whmo-page-btn:hover {
    border-color: #8B0000;
    color: #8B0000;
    text-decoration: none;
}
.whmo-page-current {
    background: #8B0000;
    border-color: #8B0000;
    color: #fff;
    cursor: default;
}
.whmo-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: #999;
}

/* 空状态 */
.whmo-empty {
    text-align: center;
    padding: 40px;
    color: #888;
    background: #f8f9fa;
    border-radius: 8px;
}


/* ===== 数学验证码 ===== */
.whmo-captcha-group label {
    font-size: 16px;
    font-weight: bold;
    color: #8B0000;
}
.whmo-captcha-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.whmo-captcha-input-row input {
    width: 80px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}
.whmo-refresh-captcha {
    padding: 6px 10px;
    font-size: 16px;
}
.whmo-refresh-captcha:hover {
    transform: rotate(180deg);
}

/* ===== 会员核验页面 ===== */
.whmo-verify-page {
    max-width: 560px;
    margin: 40px auto;
    padding: 32px;
    background: #fff;
    border: 1px solid #e0d5c5;
    border-radius: 10px;
    text-align: center;
}
.whmo-verify-header h2 {
    color: #8B0000;
    font-size: 22px;
    margin: 0 0 8px;
}
.whmo-verify-desc {
    color: #888;
    font-size: 14px;
    margin: 0 0 24px;
}
.whmo-verify-input-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.whmo-verify-input-group input {
    flex: 1;
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid #d4c5a9;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}
.whmo-verify-input-group input:focus {
    border-color: #8B0000;
}
#whmo-verify-result {
    margin-top: 24px;
}
.whmo-verify-card {
    padding: 20px;
    border-radius: 8px;
    text-align: left;
}
.whmo-verify-card.verified {
    background: #f0faf0;
    border: 2px solid #2d8f2d;
}
.whmo-verify-status {
    font-size: 18px;
    font-weight: bold;
    color: #2d8f2d;
    margin-bottom: 16px;
    text-align: center;
}
.whmo-verify-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.whmo-verify-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #d4c5a9;
}
.whmo-verify-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
.whmo-verify-number {
    font-size: 14px;
    color: #8B0000;
    font-weight: bold;
    margin: 4px 0;
}
.whmo-verify-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: bold;
}
.whmo-verify-badge.standing { background: #5c0011; color: #ffd700; }
.whmo-verify-badge.director { background: #8B4513; color: #fff; }
.whmo-verify-badge.member { background: #003366; color: #fff; }
.whmo-verify-badge.observer { background: #666; color: #fff; }
.whmo-verify-hall, .whmo-verify-date {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}
