/**
 * 公共样式文件
 */

/* 重置样式 */
* {
    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: 16px;
    color: #333;
    line-height: 1.6;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 隐藏手机状态栏区域 */
.status-bar {
    display: none;
}

/* 头部导航栏 */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid #e0e0e0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.nav-back {
    position: absolute;
    left: 15px;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-back::before {
    content: '←';
    margin-right: 5px;
    font-size: 20px;
}

/* 内容区域（考虑导航栏高度） */
.page-content {
    padding-top: 44px;
    min-height: calc(100vh - 44px);
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 列表项样式 */
.list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.list-item:active {
    background-color: #f5f5f5;
}

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

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.list-item-desc {
    font-size: 14px;
    color: #999;
}

.list-item-arrow {
    color: #999;
    font-size: 16px;
}

.list-item-arrow::after {
    content: '>';
    margin-left: 10px;
}

/* 底部导航图标容器与角标 */
.nav-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.nav-badge {
    position: absolute;
    top: -4px;
    right: -12px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.paid {
    background: #e8f5e9;
    color: #4caf50;
}

.status-badge.unpaid {
    background: #fff3e0;
    color: #ff9800;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

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

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

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

.loading::after {
    content: '...';
    animation: loading 1.4s infinite;
}

@keyframes loading {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state-text {
    font-size: 14px;
}

/* 分割线 */
.divider {
    height: 10px;
    background: #f5f5f5;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
}

/* 弹窗遮罩 */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* 响应式设计 */
@media (max-width: 375px) {
    body {
        font-size: 14px;
    }
    
    .card {
        margin: 10px;
        padding: 12px;
    }
}


