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

html {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    padding-bottom: 60px;
}

.container {
    max-width: 414px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    padding-bottom: 80px;
    position: relative;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px 30px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

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

.notification-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    cursor: pointer;
}

/* 借款盒子 */
.loan-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 20px;
    padding: 20px;
    border-radius: 12px;
    color: white;
    position: relative;
    overflow: hidden;
}

.loan-info {
    margin-bottom: 15px;
}

.loan-amount {
    font-size: 16px;
    margin-bottom: 8px;
}

.interest-rate {
    font-size: 14px;
    opacity: 0.9;
}

.login-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: block;
    width: 100%;
    margin-top: 15px;
    text-align: center;
}

/* 用户信息卡片 */
.user-info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 20px;
    padding: 20px;
    border-radius: 12px;
    color: white;
}

.user-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.user-name {
    font-size: 20px;
    font-weight: bold;
}

.overdue-tag {
    background: #ff6b6b;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

.user-overdue-info {
    background: rgba(255,255,255,0.15);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.overdue-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 10px;
}

.overdue-label {
    font-size: 14px;
    opacity: 0.9;
    width: 80px;
}

.overdue-value {
    font-size: 28px;
    font-weight: bold;
}

.overdue-value.total {
    color: #ffd43b;
}

.overdue-unit {
    font-size: 14px;
    margin-left: 5px;
}

.overdue-detail {
    display: flex;
    gap: 15px;
    font-size: 13px;
    opacity: 0.9;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.overdue-detail em {
    font-style: normal;
    font-weight: bold;
}

.repay-now-btn {
    width: 100%;
    background: white;
    color: #667eea;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

/* 减免信息 */
.reduction-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.reduction-tag {
    background: #ffd43b;
    color: #333;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: bold;
}

.reduction-item {
    background: rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* 功能网格 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
}

.feature-item {
    text-align: center;
    background: white;
    padding: 20px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.feature-icon.orange { background: #ff6b6b; }
.feature-icon.green { background: #51cf66; }
.feature-icon.blue { background: #339af0; }
.feature-icon.pink { background: #f06595; }
.feature-icon.purple { background: #845ef7; }

.feature-text {
    font-size: 14px;
    color: #333;
}

/* 通知栏 */
.notification-bar {
    background: #fff3cd;
    padding: 12px 20px;
    margin: 0 20px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.speaker-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.notification-scroll {
    flex: 1;
    height: 20px;
    overflow: hidden;
    position: relative;
}

.notification-list {
    animation: scrollUp 30s linear infinite;
}

.notification-item {
    color: #ff6b6b;
    font-size: 14px;
    height: 20px;
    line-height: 20px;
    white-space: nowrap;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* 借款产品 */
.product-section {
    padding: 20px;
}

.product-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-item {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.product-item:hover {
    transform: translateX(5px);
}

.product-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
}

.product-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.product-amount {
    font-size: 13px;
    color: #999;
}

.product-arrow {
    font-size: 24px;
    color: #ccc;
}

/* 逾期提示弹窗 */
.overdue-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.overdue-modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    width: 80%;
    max-width: 300px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.overdue-modal-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.overdue-modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.overdue-modal-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.overdue-modal-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
}

/* 逾期影响 */
.overdue-section {
    padding: 20px;
}

.overdue-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

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

.impact-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    background: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.impact-text {
    font-size: 12px;
    color: #666;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    text-align: center;
    cursor: pointer;
}

.nav-item.active .nav-icon {
    color: #667eea;
}

.nav-item.active .nav-text {
    color: #667eea;
}

.nav-icon {
    font-size: 24px;
    color: #999;
}

.nav-text {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

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

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.error-msg {
    color: #ff6b6b;
    margin-top: 15px;
    text-align: center;
    display: none;
}

.success-msg {
    color: #51cf66;
    margin-top: 15px;
    text-align: center;
    display: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-secondary:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 首页样式 */
.overdue-card {
    background: white;
    margin: 20px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.overdue-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ff6b6b;
}

.overdue-content {
    margin-bottom: 15px;
}

.overdue-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.overdue-item .value {
    font-weight: bold;
    color: #ff6b6b;
}

.overdue-item .amount {
    font-size: 20px;
}

.btn-detail {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.info-card {
    background: white;
    margin: 20px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.info-label {
    color: #666;
}

.info-value {
    font-weight: bold;
    color: #333;
}

.logout-btn, .back-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* 详情页 */
.detail-card {
    background: white;
    margin: 20px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-section {
    margin-bottom: 25px;
}

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

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
}

.detail-label {
    color: #666;
}

.detail-value {
    font-weight: bold;
    color: #333;
}

.total-amount {
    color: #ff6b6b;
    font-size: 20px;
}

.action-buttons {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.btn-action {
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    color: white;
}

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

.btn-contract {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-upload {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn-certificate {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

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

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

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    background: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-confirm {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* 后台管理样式 */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
}

.admin-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    background: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: #333;
}

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

.btn-add {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.table-container {
    background: white;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.btn-edit {
    padding: 6px 12px;
    background: #4facfe;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

.btn-delete {
    padding: 6px 12px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.config-section,
.form-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.config-section h2,
.form-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}


