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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #f6f2ea;
    padding-bottom: 60px;
}

.mobile-header {
    background: linear-gradient(90deg, #1f2933 0%, #3b2c20 40%, #7c4b12 100%);
    color: #fdf7e3;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header h2 {
    font-size: 18px;
}

.logout-btn {
    color: #fdf7e3;
    text-decoration: none;
    padding: 5px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.mobile-nav {
    background: white;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 50px;
    z-index: 99;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.mobile-nav summary {
    list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
    display: none;
}

.mobile-nav-group {
    flex: 0 0 auto;
    min-width: 90px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #eee;
}

.mobile-nav-main {
    padding: 8px 12px;
    background: #f5f7fa;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-main span {
    font-weight: 500;
}

.mobile-nav-main i {
    font-style: normal;
    font-size: 12px;
    color: #999;
}

.mobile-nav-sub {
    padding: 6px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-nav-sub a {
    padding: 6px 10px;
    text-decoration: none;
    color: #333;
    white-space: nowrap;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #eee;
    font-size: 13px;
    position: relative;
}

.mobile-nav-sub a:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.mobile-nav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
}

.mobile-container {
    padding: 15px;
}

.alert {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff8e1;
    color: #e65100;
    border: 2px solid #ffb74d;
    font-weight: 500;
    padding: 12px 14px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    margin-bottom: 10px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.mobile-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.mobile-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

.mobile-table th {
    background: #f8f9fa;
    font-weight: 600;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

.status-生效 {
    background: #d4edda;
    color: #155724;
}

.status-将到期 {
    background: #fff3cd;
    color: #856404;
}

.status-逾期 {
    background: #f8d7da;
    color: #721c24;
}

.status-无效 {
    background: #d1ecf1;
    color: #0c5460;
}

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

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

.card-content {
    font-size: 14px;
    color: #666;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background: white;
    transition: all 0.3s;
    font-size: 14px;
}

.pagination a:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination .current {
    background: #3498db;
    color: white;
    border-color: #3498db;
    font-weight: bold;
}

.pagination .disabled {
    color: #999;
    cursor: not-allowed;
    background: #f5f5f5;
}

.pagination .disabled:hover {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
}

.pagination-info {
    margin: 0 10px;
    color: #666;
    font-size: 12px;
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

/* ===== OCR 固定框裁剪弹层（移动端样式） ===== */
.ocr-cropper-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.ocr-cropper-panel {
    width: 100%;
    height: 92vh;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
}

.ocr-cropper-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.ocr-cropper-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ocr-cropper-x {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    background: #fff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.ocr-cropper-canvas-wrap {
    position: relative;
    flex: 1 1 auto;
    background: #111;
}

.ocr-cropper-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.ocr-cropper-hint {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 6px;
}

.ocr-cropper-controls,
.ocr-cropper-actions {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.ocr-btn {
    border: 1px solid #ddd;
    background: #fff;
}

