/* 预约签到系统 - 移动端样式 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 420px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
}

/* 头部 */
.header {
    text-align: center;
    padding: 24px 0 16px;
}

.header h1 {
    font-size: 20px;
    color: #07c160;
    font-weight: 600;
}

.header .subtitle {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

/* 事件信息 */
.event-info {
    text-align: center;
    padding: 16px 0;
}

.event-info .event-name {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.event-info .event-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.event-info .event-time {
    font-size: 13px;
    color: #999;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

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

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.form-group input:focus {
    border-color: #07c160;
}

/* 按钮 */
.btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
    -webkit-appearance: none;
    text-decoration: none;
}

.btn:active {
    opacity: 0.8;
}

.btn-primary {
    background: #07c160;
    color: #fff;
}

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

.btn-outline {
    background: #fff;
    color: #07c160;
    border: 1px solid #07c160;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
    display: inline-block;
    border-radius: 6px;
}

/* 二维码区域 */
.qrcode-section {
    text-align: center;
    padding: 20px 0;
}

.qrcode-section .qrcode-title {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    margin-bottom: 16px;
}

.qrcode-section .qrcode-wrapper {
    display: inline-block;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #07c160;
}

.qrcode-section .qrcode-hint {
    font-size: 13px;
    color: #999;
    margin-top: 12px;
}

/* 状态徽章 */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-reserved {
    background: #fff3e0;
    color: #e65100;
}

.badge-checked_in {
    background: #e8f5e9;
    color: #2e7d32;
}

/* 成功提示 */
.success-icon {
    width: 64px;
    height: 64px;
    background: #07c160;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.success-icon::after {
    content: '✓';
    color: #fff;
    font-size: 32px;
    font-weight: bold;
}

.success-text {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #07c160;
    margin-bottom: 8px;
}

.success-sub {
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* 用户信息 */
.user-info {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 14px;
    margin: 12px 0;
}

.user-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}

.user-info .info-label {
    color: #999;
}

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

/* 错误页 */
.error-page {
    text-align: center;
    padding: 60px 20px;
}

.error-page .error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-page .error-text {
    font-size: 16px;
    color: #666;
}

/* ========== 管理后台样式 ========== */
.admin-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.admin-header h1 {
    font-size: 20px;
    color: #333;
}

.admin-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 8px 16px;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: #07c160;
    color: #fff;
    border-color: #07c160;
}

/* 表格 */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
}

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

.data-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #666;
    font-size: 13px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

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

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #07c160;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* QR码打印区域 */
.print-area {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px 0;
}

.print-qr-card {
    text-align: center;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #ddd;
    min-width: 240px;
}

.print-qr-card h3 {
    margin-bottom: 12px;
    color: #333;
}

.print-qr-card .qr-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    word-break: break-all;
}

/* 登录页 */
.login-box {
    max-width: 320px;
    margin: 60px auto;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 24px;
    color: #333;
}

/* 开发模式标识 */
.dev-badge {
    position: fixed;
    top: 8px;
    right: 8px;
    background: #ff9800;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    z-index: 1000;
}

/* 打印样式 */
@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .container { max-width: 100%; }
    .print-qr-card { border: 2px solid #333; }
}

/* 响应式 */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .data-table {
        font-size: 13px;
    }
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}
