:root {
    --primary-red: #C53D43;
    --gold: #DAA520;
    --paper: #FFF5E6;
    --ink: #3A2E28;
    --romantic-pink: #F3D7D7;
    --champagne-gold: #EED9B6;
    --copper: #D98719
}

*::-webkit-scrollbar {
    height: 10px;
    width: 10px
}

*::-webkit-scrollbar-track {
    border-radius: 5px;
    background-color: #dfe9eb
}

*::-webkit-scrollbar-track:hover {
    background-color: #b8c0c2
}

*::-webkit-scrollbar-track:active {
    background-color: #b8c0c2
}

*::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background-color: #339933;
    border: 2px solid #fff
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #00cc33
}

*::-webkit-scrollbar-thumb:active {
    background-color: #336600
}

@font-face {
  font-family: 'Wen Ding CS';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/webfonts/NaPecZTRCLxvwo41b4gvzkXaRMQ1.woff) format('truetype');
}

@font-face {
  font-family: 'Hua Wen XK';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/webfonts/hwxk.woff) format('truetype');
}

@font-face {
  font-family: 'Wen Ding XZ';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/webfonts/wdcs.woff) format('truetype');
}

body {
    scrollbar-width: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    overflow-y: hidden;
    -ms-overflow-style: none;
    user-select: none;
    margin: 0;
    padding: 0;
}

.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center
}

.ledger-header {
    text-align: center;
    padding: 20px;
    border-bottom: 2px solid var(--primary-red)
}

.ledger-title {
    display: none;
    font-family: 'Wen Ding XZ';
    font-size: 2.5em;
    color: var(--gold);
    writing-mode: horizontal-tb;
    text-align: center;
    margin: 46px 0 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1), inset 2px 2px 3px rgba(255, 255, 255, 0.6)
}

.ledger-title h1 {
    font-size: 24px;
    margin: 0
}

.ledger-id {
    font-size: 20px
}

.logged-in-only {
    display: none
}

.context-menu ul {
    list-style: none;
    margin: 0;
    padding: 0
}

.context-menu {
    display: none;
    position: fixed;
    z-index: 1000000001 !important;
    background: rgba(245, 245, 220, 0.5) !important;
    border: 2px solid rgba(218, 165, 32, 0.3);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 160px
}

.context-menu li {
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.2s
}

.context-menu li:hover {
    background: rgba(197, 69, 67, 0.2);
    color: var(--ink)
}

.context-menu ul li i {
    margin-right: 8px;
    width: 20px;
    text-align: center
}

.modal,
.modals {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: none;
    z-index: 10000;
    background: rgba(255, 245, 230, 0.5) !important;
    backdrop-filter: blur(20px) brightness(110%);
    -webkit-backdrop-filter: blur(20px) brightness(110%);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(218, 165, 32, 0.2);
    min-width: 260px;
    max-width: 12vw
}

.modals {
    min-width: 300px;
    padding: 40px 10px
}

.modal::before,
.modals::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.3) 100%);
    border-radius: inherit;
    pointer-events: none;
    z-index: -1
}

.modal h3,
.modals h3 {
    margin: 0 0 20px 0;
    color: var(--ink);
    text-align: center;
    font-size: 1.6em
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center
}

.modal-close {
    cursor: pointer;
    float: right;
    font-size: 1.2em;
    background: none;
    border: none
}

.pagination-container {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 5px
}

.pagination-ellipsis {
    padding: 0 8px;
    color: #000;
    align-self: flex-end
}

.page-btn {
    min-width: 36px;
    background: var(--champagne-gold);
    border: 1px solid var(--gold);
    color: var(--ink);
    padding: 6px 10px;
    margin: 5px;
    border-radius: 20px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1), -1px -1px 3px rgba(255, 255, 255, 0.8);
    transition: all 0.2s
}

.page-btn.active {
    background: var(--copper);
    color: white;
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.2), inset -2px -2px 4px rgba(255, 255, 255, 0.5)
}

.page-btn:hover:not(.active) {
    background: #e0e0e0;
    transform: translateY(-1px)
}

.ledger-container {
    overflow: hidden;
    padding-bottom: 80px;
    background-size: cover;
    background-position: center
}

.ledger-viewport {
    width: 100%;
    height: calc(100vh - 180px);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    scroll-behavior: smooth
}

.ledger-columns {
    display: flex;
    height: 100%;
    background: transparent;
    transition: transform 0.5s ease
}

.ledger-column {
    width: 10vw;
    min-width: 6vw;
    height: 100%;
    display: flex;
    flex-direction: column;
    user-select: none;
    border: 1px solid var(--gold);
    border-radius: 3px
}

.ledger-cell {
    writing-mode: vertical-rl;
    text-orientation: upright;
    flex: 1;
    padding: 15px 5px;
    font-family: 'Hua Wen XK', cursive;
    /*text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3*/
    font-size: 3.8em;
    letter-spacing: 2px;
    line-height: 1.8;
    display: flex;
    align-items: center
}

.amount-cell {
    font-size: 2em
}

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

.form-group label {
    display: inline-flex;
    margin: 4px 0;
    vertical-align: middle;
    align-items: center; /* 垂直居中对齐 */
    justify-content: flex-start; /* 水平左对齐 */
    color: #333;
    font-size: 14px
}

.account input[type="radio"] {
    margin-right: 5px;
    flex-shrink: 0; /* 防止单选按钮被压缩 */
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="email"],
textarea {
    width: 90%;
    padding: 12px;
    border: 1px solid rgba(30, 165, 84, 0.82);
    border-radius: 8px;
    background: transparent;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #555
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
textarea:hover {
    border-color: var(--copper)
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: #4d90fe;
    box-shadow: 0 2px 8px rgba(77, 144, 254, 0.1);
    outline: none
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0
}

input[type="number"] {
    -moz-appearance: textfield
}

.chinese-amount {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    padding-left: 4px
}

.form-footer {
    margin-top: 24px;
    display: flex;
    gap: 12px
}

.btn-primary,
.btn-secondary,
.btn-danger {
    flex: 1;
    max-width: 120px;
    padding: 12px;
    margin: 0 auto;
    border: 1px solid var(--gold);
    border-radius: 8px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative
}

.btn-primary {
    background: linear-gradient(135deg, #4d90fe, #357ae8);
    color: white;
    box-shadow: 0 4px 12px rgba(77, 144, 254, 0.2), 0 2px 4px rgba(0, 0, 0, 0.05)
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(77, 144, 254, 0.2)
}

.btn-secondary {
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    color: #666;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.02)
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e8e8e8, #d8d8d8)
}

.btn-danger {
    background: #dc3545
}

.btn-danger:hover {
    background: #c82333
}

.user-info {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    color: var(--gold);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 0;
    width: 100%;
    overflow-x: auto;
    box-sizing: border-box
}

.user-info-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
    white-space: nowrap
}

.username {
    font-weight: bold;
    margin-right: 5px
}

.user-role {
    display: flex;
    align-items: center;
    gap: 15px
}

.user-role a {
    text-decoration: none;
    cursor: pointer;
    color: var(--gold);
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.3s
}

.user-role a:hover {
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none !important
}

.user-info::-webkit-scrollbar {
    display: none
}

.vip-badge {
    color: #ff9800;
    font-weight: bold
}

.invalid {
    border-color: #ff4444 !important
}

.error-message {
    color: #ff4444;
    font-size: 0.875rem;
    height: 1.2rem;
    display: block
}

.password-strength-bar {
    height: 4px;
    background: #eee;
    margin-top: 8px;
    border-radius: 2px
}

.password-strength {
    height: 100%;
    transition: width 0.3s ease
}

.password-strength.weak {
    background: #ff4444
}

.password-strength.medium {
    background: #ffc107
}

.password-strength.strong {
    background: #00c851
}

#exportProgressModal {
    width: 400px
}

.progress-container {
    background: #eee;
    border-radius: 10px;
    margin: 20px 0;
    height: 20px;
    position: relative
}

#exportProgressBar {
    background: #4CAF50;
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease
}

.export-content{
    font-size: 8px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333
}

.export-stats {
    display: flex;
    justify-content: space-around;
    margin: 10px 0
}

.stats-content {
    color: var(--ink)
}

.vip-account-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--gold);
    border-radius: 6px;
    text-align: center
}

.username-display {
    font-size: 16px;
    font-weight: 600;
    color: #1890ff
}

.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    overflow: auto;
    padding: 40px 0
}

.modal-contents {
    background: white;
    width: 360px;
    max-height: 90vh;
    height: auto;
    border-radius: 8px;
    padding: 0;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2)
}

.close-btn {
    position: fixed;
    top: 0;
    font-size: 24px;
    cursor: pointer;
    background: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1)
}

.admin-iframe {
    width: 100%;
    height: calc(100vh - 180px);
    min-height: 500px;
    border: none;
    margin-top: 10px
}

.admin-link {
    cursor: pointer;
    text-decoration: underline
}

.table-container {
    overflow-x: auto;
    width: 100%;
    margin-bottom: 10px
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.data-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.action-buttons button {
    padding: 6px 15px;
    margin: 0 4px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s
}

.action-buttons {
    display: flex;
    gap: 8px
}

.open-btn {
    background: #3333ff;
    color: white
}
.edit-btn {
    background: #28a745;
    color: white
}

.delete-btn {
    background: #dc3545;
    color: white
}

select#voiceRole,
select#editLedgerType,
select#editUserRole {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    width: 258px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none
}

select#voiceRole:hover,
select#editLedgerType:hover,
select#editUserRole:hover {
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2)
}

select#voiceRole:focus,
select#editLedgerType:focus,
select#editUserRole:focus {
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.5)
}

select#voiceRole option,
select#editLedgerType option,
select#editUserRole option {
    padding: 8px;
    color: #333
}

select#editUserRole option[value="2"] {
    color: #7b1fa2;
    font-weight: bold
}

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-info {
    color: #6c757d;
    font-size: 0.9em
}

.search-box {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05)
}

.search-box input {
    flex: 1;
    padding: 8px 12px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 6px
}

.search-box button {
    padding: 8px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer
}

/* VIP类型选择器 */
.vip-type-selector {
  padding: 10px;
}

.vip-types {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.vip-type-option {
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.vip-type-option:hover {
  border-color: var(--primary-red);
  transform: translateY(-2px);
}

.vip-type-option.active {
  border-color: var(--primary-red);
  background: #eafff7;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

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

.vip-duration, .pay-duration {
  font-size: 12px;
  color: #666;
}

/* 支付方式选择器 */
.payment-method-selector {
  padding: 30px;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.section-type{
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  position: relative;
  padding-left: 12px;
  text-align: center;
}

.payment-method-option {
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.payment-method-option:hover {
  border-color: var(--primary-red);
}

.payment-method-option.active {
  border-color: var(--primary-red);
  background: #eafff7;
}

.payment-method-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.payment-method-info img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

/* 支付模态框 - 内容样式 */
.vip-name-display {
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
}

.payment-content {
  padding: 15px;
}

/* 二维码容器 */
.qrcode-container {
  text-align: center;
  margin-bottom: 20px;
}

.qrcode-wrapper {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  display: inline-block;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qrcode-image {
  width: 150px;
  height: 150px;
  border-radius: 4px;
}

.payment-info {
  text-align: center;
}

.payment-info .pay-type {
    color:green;
}

.amount-display {
  font-size: 18px;
  margin-bottom: 8px;
  color: #333;
}

.amount-display strong {
  color: #e74c3c;
  font-size: 24px;
}

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

.order-info {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}

.timeout-tip {
  font-size: 12px;
  color: #e67e22;
  margin-bottom: 16px;
}

/* 支付状态 */
.payment-status {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 16px;
}

/* 语音播报相关样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}


.voice-preview {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}



/* VIP徽章样式 */
.vip-badge {
    color: #ff6b00;
    font-weight: bold;
}

/* 语音设置样式 */
.voice-settings {
    max-width: 500px;
    margin: 0 auto;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

.slider-label {
    font-size: 12px;
    color: #666;
    min-width: 30px;
}

.speed-markers {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: 0.25rem;
}

.value-display {
    float: right;
    background: #4CAF50;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 12px;
    font-weight: normal;
}

/* 测试区域 */
.test-section {
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid #c8e6c9;
}

.test-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.test-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #c8e6c9;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.btn-test {
    background: #2196F3;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    margin-right: 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.3s;
}

.btn-test:hover:not(:disabled) {
    background: #1976D2;
}

.btn-test:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-reset {
    background: #ff9800;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.btn-reset:hover {
    background: #f57c00;
}


@media (max-width:960px) {
    
    .ledger-title h1 {
        font-size: 18px;
    }
    
    .ledger-id {
        font-size: 14px
    }
    
    .ledger-column {
        width: 100% !important;
        min-width: 80px
    }

    .ledger-cell {
        font-size: 2em
    }

    .amount-cell {
        font-size: 1.2em
    }

    .context-menu {
        max-width: 60px;
        font-size: 14px
    }

    .pagination-slider {
        bottom: 10px;
        padding: 8px 12px;
        gap: 6px
    }

    .page-btn {
        min-width: 32px;
        padding: 4px 8px;
        font-size: 14px
    }

    .pagination-ellipsis {
        display: none
    }

    .data-table th,
    .data-table td {
        padding: 12px 8px;
        font-size: 14px;
        white-space: nowrap
    }

    .action-buttons button {
        padding: 6px 12px;
        margin: 0 3px
    }

    .table-container::-webkit-scrollbar {
        display: none
    }
}