/* 农业银行手机端样式 */
:root {
    --primary-color: #00A650;
    --primary-dark: #008C44;
    --primary-light: #E8F5E9;
    --gold-color: #C4A35A;
    --danger-color: #E53935;
    --text-color: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #E5E5E5;
    --bg-color: #F5F5F5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

/* 通用类 */
.container {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 0 15px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

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

.text-white {
    color: #ffffff;
}

.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-light {
    color: var(--text-light);
}

.bg-white {
    background-color: #ffffff;
}

.bg-primary {
    background-color: var(--primary-color);
}

.rounded {
    border-radius: 8px;
}

.shadow {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.mb-3 {
    margin-bottom: 12px;
}

.mt-3 {
    margin-top: 12px;
}

.p-3 {
    padding: 12px;
}

.p-4 {
    padding: 16px;
}

.min-h-screen {
    min-height: 100vh;
}

.pb-16 {
    padding-bottom: 64px;
}

.bg-gray-100 {
    background-color: #f5f5f5;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 10px;
    padding: 5px 8px;
    min-width: 50px;
}

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

.bottom-nav-item .icon {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
}

.bottom-nav-item .icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.bottom-nav-item .icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bottom-nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
}

/* 顶部头部 */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    padding: 15px;
    padding-top: calc(15px + env(safe-area-inset-top));
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

/* 卡片 */
.card {
    background: #ffffff;
    border-radius: 8px;
    margin: 12px 15px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

/* 账户余额卡片 */
.balance-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    margin: 15px;
    padding: 20px;
    color: #ffffff;
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
}

.balance-amount .currency {
    font-size: 18px;
    margin-right: 4px;
}

/* 快捷功能网格 */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 15px;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

.quick-item .icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    background: var(--primary-light);
}

.quick-item .icon-wrapper svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

.quick-item span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 个人中心 */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 30px 20px;
    padding-top: calc(30px + env(safe-area-inset-top));
    color: #ffffff;
}

.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar svg {
    width: 40px;
    height: 40px;
    fill: #ffffff;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-phone {
    font-size: 14px;
    opacity: 0.9;
}

/* 菜单列表 */
.menu-list {
    background: #ffffff;
    margin: 12px 15px;
    border-radius: 8px;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

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

.menu-item .icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

.menu-item .icon svg {
    width: 100%;
    height: 100%;
    fill: var(--primary-color);
}

.menu-item .text {
    flex: 1;
    font-size: 15px;
}

.menu-item .arrow {
    width: 16px;
    height: 16px;
    fill: var(--text-light);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #ffffff;
}

.btn-primary:active {
    opacity: 0.9;
}

.btn-danger {
    background: var(--danger-color);
    color: #ffffff;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 60px 30px;
}

.login-logo {
    text-align: center;
    margin-bottom: 50px;
}

.login-logo img {
    width: 80px;
    height: 80px;
}

.login-logo h1 {
    color: #ffffff;
    font-size: 24px;
    margin-top: 15px;
}

.login-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 20px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9000;
    display: none;
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 80%;
    max-width: 300px;
    padding: 25px 20px;
    text-align: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.modal-body {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.modal-buttons .btn {
    flex: 1;
    padding: 10px;
}

/* 密码输入框 */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: var(--text-light);
}

.password-toggle:hover svg {
    fill: var(--text-secondary);
}

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