/* static/mobile.css - 移动端专用样式 */

/* 重置和基础样式 */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7fa;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 15px;
}

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

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

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

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    min-height: 50px;
    line-height: 1.2;
}

.btn-primary {
    background: #007aff;
    color: #fff;
}

.btn-primary:active {
    background: #0056b3;
    transform: scale(0.98);
}

.btn-success {
    background: #34c759;
    color: #fff;
}

.btn-danger {
    background: #ff3b30;
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid #007aff;
    color: #007aff;
}

.btn-sm {
    padding: 8px 16px;
    min-height: 40px;
    font-size: 14px;
}

/* Toast 提示消息 */
.toast-message {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    text-align: center;
    z-index: 9999;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast-success {
    background: #34c759;
}

.toast-error {
    background: #ff3b30;
}

.toast-warning {
    background: #ff9500;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 二维码展示区 */
.qrcode-container {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.qrcode-container img {
    max-width: 100%;
    width: 220px;
    height: 220px;
    border-radius: 8px;
}

.qrcode-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.qrcode-actions .btn {
    flex: 1;
}

/* 收款码展示 */
.payment-qrcode-box {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 16px;
    margin: 20px 0;
}

.payment-qrcode-box img {
    max-width: 100%;
    width: 260px;
    height: 260px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.payment-amount {
    font-size: 32px;
    font-weight: bold;
    color: #ff3b30;
    margin: 15px 0;
}

.payment-tips {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

/* 学员列表 */
.student-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.student-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 5px;
}

.student-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.student-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #666;
}

.tag-paid {
    background: #34c759;
    color: #fff;
}

.tag-unpaid {
    background: #ff9500;
    color: #fff;
}

.tag-passed {
    background: #007aff;
    color: #fff;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #007aff;
}

.stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    display: flex;
    border-top: 1px solid #eee;
    padding: 8px 0;
    padding-bottom: env(safe-area-inset-bottom, 8px);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888;
    font-size: 11px;
}

.bottom-nav-item.active {
    color: #007aff;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    margin-bottom: 3px;
}

/* 页面主内容需要留出底部导航的空间 */
.has-bottom-nav {
    padding-bottom: 80px;
}

/* 链接卡片 */
.link-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.link-url {
    background: #f5f7fa;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    word-break: break-all;
    margin: 10px 0;
    border: 1px dashed #ddd;
}

.link-qrcode {
    width: 100px;
    height: 100px;
    border-radius: 8px;
}

/* 响应式表格 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 浮动操作按钮 */
.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: #007aff;
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0,122,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    z-index: 100;
}

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

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007aff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 分隔线 */
.divider {
    height: 1px;
    background: #eee;
    margin: 15px 0;
}

/* 文本颜色 */
.text-primary { color: #007aff; }
.text-success { color: #34c759; }
.text-danger { color: #ff3b30; }
.text-warning { color: #ff9500; }
.text-muted { color: #888; }

/* 实用工具类 */
.text-center { text-align: center; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 10px; }
.flex-1 { flex: 1; }