/* ===================================
   统一专业日本金融风格设计系统
   适用于所有前端页面
   =================================== */

/* 基础重置和变量 */
:root {
    --primary-blue: #2c5aa0;
    --primary-blue-dark: #1e4080;
    --background-gray: #f8f9fb;
    --text-dark: #2c3e50;
    --text-gray: #7f8c8d;
    --border-light: #e8eaed;
    --border-lighter: #f0f2f5;
    --success-green: #27ae60;
    --warning-orange: #f39c12;
    --danger-red: #e74c3c;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 12px rgba(44, 90, 160, 0.3);
    --shadow-heavy: 0 8px 24px rgba(44, 90, 160, 0.3);
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    --font-primary: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

/* 基础重置 */
.financial-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.financial-page {
    font-family: var(--font-primary);
    background: var(--background-gray);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ================================
   布局组件
   ================================ */

/* 页面容器 */
.fin-page-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 100vh;
}

/* 头部区域 */
.fin-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.fin-header-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.fin-header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.fin-back-btn {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 18px;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.fin-back-btn:hover {
    background: var(--background-gray);
}

/* 主要内容区域 */
.fin-main-content {
    padding: 80px 0 100px;
}

/* ================================
   卡片组件
   ================================ */

.fin-card {
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.fin-card-header {
    background: var(--background-gray);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.fin-card-content {
    padding: 20px;
}

/* 渐变卡片 */
.fin-card-gradient {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-heavy);
}

/* ================================
   按钮组件
   ================================ */

.fin-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-height: 44px;
    line-height: 1.4;
}

.fin-btn-primary {
    background: var(--primary-blue);
    color: white;
    border: 1px solid var(--primary-blue);
}

.fin-btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.fin-btn-secondary {
    background: #ffffff;
    color: var(--primary-blue);
    border: 1px solid var(--border-light);
}

.fin-btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.fin-btn-danger {
    background: #ffffff;
    color: var(--danger-red);
    border: 1px solid var(--danger-red);
}

.fin-btn-danger:hover {
    background: var(--danger-red);
    color: white;
}

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

.fin-btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* ================================
   表单组件
   ================================ */

.fin-form-group {
    margin-bottom: 20px;
}

.fin-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.fin-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 16px;
    font-family: var(--font-primary);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fin-form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.fin-form-input::placeholder {
    color: var(--text-gray);
}

/* ================================
   菜单组件
   ================================ */

.fin-menu-item {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-lighter);
    text-decoration: none;
    color: var(--text-dark);
    transition: background-color 0.2s ease;
}

.fin-menu-item:last-child {
    border-bottom: none;
}

.fin-menu-item:hover {
    background: var(--background-gray);
}

.fin-menu-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fin-menu-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fin-menu-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-blue);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.fin-menu-text {
    font-size: 15px;
    font-weight: 500;
}

.fin-menu-arrow {
    color: var(--text-gray);
    font-size: 18px;
}

/* ================================
   用户头像组件
   ================================ */

.fin-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.fin-user-status {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    text-align: center;
}

.fin-user-email {
    font-size: 18px;
    font-weight: 500;
    word-break: break-all;
    text-align: center;
}

/* ================================
   底部导航
   ================================ */

.fin-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-light);
    display: flex;
    padding: 8px 0;
    z-index: 1000;
}

.fin-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    text-decoration: none;
    color: var(--text-gray);
    font-size: 12px;
    transition: color 0.2s ease;
}

.fin-nav-item.active {
    color: var(--primary-blue);
}

.fin-nav-icon {
    font-size: 20px;
}

/* ================================
   模态框组件
   ================================ */

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

.fin-modal {
    background: white;
    border-radius: 12px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.fin-modal-header {
    padding: 24px 24px 16px;
    text-align: center;
}

.fin-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.fin-modal-message {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
}

.fin-modal-actions {
    display: flex;
    border-top: 1px solid var(--border-light);
}

.fin-modal-btn {
    flex: 1;
    padding: 16px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fin-modal-btn:first-child {
    border-right: 1px solid var(--border-light);
    color: var(--text-gray);
}

.fin-modal-btn:first-child:hover {
    background: var(--background-gray);
}

.fin-modal-btn:last-child {
    color: var(--danger-red);
}

.fin-modal-btn:last-child:hover {
    background: #fff5f5;
}

/* ================================
   状态样式
   ================================ */

.fin-success {
    color: var(--success-green);
}

.fin-warning {
    color: var(--warning-orange);
}

.fin-danger {
    color: var(--danger-red);
}

.fin-text-center {
    text-align: center;
}

.fin-text-left {
    text-align: left;
}

.fin-text-right {
    text-align: right;
}

/* ================================
   响应式设计
   ================================ */

@media (max-width: 480px) {
    .fin-page-container {
        padding: 0 12px;
    }
    
    .fin-header-content {
        padding: 0 12px;
    }
    
    .fin-user-avatar {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    .fin-user-email {
        font-size: 16px;
    }
    
    .fin-card-content {
        padding: 16px;
    }
    
    .fin-menu-item {
        padding: 14px 16px;
    }
    
    .fin-menu-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .fin-page-container {
        padding: 0 8px;
    }
    
    .fin-header-content {
        padding: 0 8px;
    }
    
    .fin-user-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .fin-user-email {
        font-size: 15px;
    }
    
    .fin-card-content {
        padding: 12px;
    }
    
    .fin-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* ================================
   工具类
   ================================ */

.fin-mt-0 { margin-top: 0; }
.fin-mt-1 { margin-top: 8px; }
.fin-mt-2 { margin-top: 16px; }
.fin-mt-3 { margin-top: 24px; }
.fin-mt-4 { margin-top: 32px; }

.fin-mb-0 { margin-bottom: 0; }
.fin-mb-1 { margin-bottom: 8px; }
.fin-mb-2 { margin-bottom: 16px; }
.fin-mb-3 { margin-bottom: 24px; }
.fin-mb-4 { margin-bottom: 32px; }

.fin-p-0 { padding: 0; }
.fin-p-1 { padding: 8px; }
.fin-p-2 { padding: 16px; }
.fin-p-3 { padding: 24px; }
.fin-p-4 { padding: 32px; }

.fin-hidden { display: none; }
.fin-visible { display: block; }

.fin-flex { display: flex; }
.fin-flex-center { display: flex; align-items: center; justify-content: center; }
.fin-flex-between { display: flex; align-items: center; justify-content: space-between; }

.fin-w-full { width: 100%; }
.fin-h-full { height: 100%; } 