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

body {
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    min-height: 100vh;
    background: #f7f8fa;
}

.records-page {
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.records-header {
    position: relative;
    padding: 40px 24px 48px;
    text-align: center;
    overflow: visible;
}

.records-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    height: 40px;
    background: #f7f8fa;
    border-radius: 50% 50% 0 0;
    z-index: 1;
}

.records-back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    z-index: 2;
    transition: background 0.15s;
    text-decoration: none;
}

.records-back-btn:hover { background: rgba(255,255,255,0.25); }

.records-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.records-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    position: relative;
    z-index: 1;
}

/* Search box */
.records-search-box {
    display: flex;
    align-items: center;
    max-width: 280px;
    margin: 14px auto 0;
    position: relative;
    z-index: 1;
}

.records-search-icon {
    position: absolute;
    left: 12px;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    pointer-events: none;
}

.records-search-input {
    flex: 1;
    height: 36px;
    padding: 0 12px 0 34px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px 0 0 20px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 13px;
    outline: none;
    backdrop-filter: blur(4px);
}

.records-search-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.records-search-input:focus {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.18);
}

.records-search-btn,
.records-clear-btn {
    height: 36px;
    padding: 0 16px;
    border: 1px solid rgba(255,255,255,0.25);
    border-left: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.records-search-btn {
    border-radius: 0 20px 20px 0;
}

.records-clear-btn {
    border-radius: 0 20px 20px 0;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    font-size: 12px;
}

.records-search-btn + .records-clear-btn {
    border-radius: 0 20px 20px 0;
}

.records-search-btn:has(+ .records-clear-btn) {
    border-radius: 0;
}

.records-search-btn:active,
.records-clear-btn:active {
    background: rgba(255,255,255,0.3);
}

.records-stats {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 4px 14px;
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    position: relative;
    z-index: 1;
}

/* Content */
.records-content {
    position: relative;
    z-index: 2;
    margin: -24px 16px 0;
    flex: 1;
    padding-bottom: 16px;
}

/* Record card */
.record-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 16px 18px;
    margin-bottom: 10px;
    transition: box-shadow 0.15s;
}

.paid-stamp {
    position: absolute;
    right: 22px;
    bottom: 22px;
    padding: 3px 12px;
    border: 2.5px solid rgba(255, 0, 0, 0.5);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 0, 0, 0.5);
    transform: rotate(-8deg);
    z-index: 5;
    pointer-events: none;
    letter-spacing: 2px;
}

.record-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }


.record-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f5f5f5;
}

.record-card-index {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--idx-color, #1a1a2e);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.record-card-index .idx-label {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    line-height: 1;
    margin-bottom: 1px;
}

.record-card-index .idx-num {
    font-size: 20px;
    line-height: 1;
    color: #fff;
    font-family: "DIN Alternate", "Bebas Neue", "Impact", "Arial Black", system-ui, sans-serif;
    letter-spacing: -0.02em;
}

.record-card-index .idx-corner {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent rgba(255,255,255,0.15) transparent;
}

.record-card-time {
    font-size: 12px;
    color: #bbb;
    display: flex;
    align-items: center;
    gap: 4px;
}

.record-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.record-field-row {
    display: flex;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.5;
}

.record-field-label {
    color: #999;
    flex-shrink: 0;
    min-width: 70px;
    margin-right: 8px;
}

.record-field-value {
    color: #333;
    word-break: break-all;
    flex: 1;
}

/* Pagination */
.records-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
}

.records-page-btn {
    height: 36px;
    padding: 0 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}

.records-page-btn:hover:not(:disabled) { border-color: #ccc; }
.records-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.records-page-info {
    font-size: 13px;
    color: #999;
    padding: 0 8px;
}

/* Empty & Error */
.records-empty {
    text-align: center;
    padding: 60px 20px;
    color: #ccc;
}

.records-empty i { font-size: 40px; margin-bottom: 12px; display: block; }
.records-empty h3 { font-size: 16px; color: #999; font-weight: 500; margin-bottom: 6px; }
.records-empty p { font-size: 13px; color: #bbb; }

.error-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.error-page i { font-size: 48px; color: #ddd; margin-bottom: 16px; }
.error-page h2 { font-size: 18px; color: #666; font-weight: 500; margin-bottom: 8px; }
.error-page p { font-size: 13px; color: #999; }

.records-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #bbb;
}

.records-loading {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 14px;
}

.records-loading i {
    font-size: 24px;
    margin-bottom: 12px;
    display: block;
}
