* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
.container { margin: 0 auto; padding: 20px; max-width: 1400px; }

/* 基础卡片样式 */
.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}
.card-title {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}
.card-title-sm {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}
.card-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
}

/* 导航样式 */
.nav-container {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    transition: all 0.3s ease;
}
.nav-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}
.nav-brand { display: flex; align-items: center; }
.nav-title {
    color: #2c3e50;
    font-size: 15px;
    font-weight: 600;
}
.nav-toggle-btn {
    background: #f8f9fa;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-toggle-btn:hover { background: #e9ecef; }
.toggle-icon {
    font-size: 18px;
    color: #495057;
    transition: transform 0.3s ease;
}
.nav-content-wrapper {
    transition: max-height 0.3s ease;
    max-height: 500px;
}
.nav-container.nav-collapsed .nav-content-wrapper {
    max-height: 0;
    overflow: hidden;
}
.nav-container.nav-collapsed .nav-brand { display: none; }
.nav-container.nav-collapsed .toggle-icon { transform: rotate(90deg); }
.nav-links {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #495057;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.nav-link:hover {
    background: #f8f9fa;
    color: #667eea;
}
.nav-link.active {
    background: #667eea;
    color: white;
}
.nav-link-icon { font-size: 16px; flex-shrink: 0; }
.nav-link-text { white-space: nowrap; }
.nav-divider {
    width: 1px;
    height: 24px;
    background: #e9ecef;
    margin: 0 8px;
}
.nav-dropdown { position: relative; }
.nav-dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #495057;
    font-size: 13px;
}
.nav-dropdown-header:hover { background: #f8f9fa; }
.nav-dropdown.active .nav-dropdown-header {
    background: #667eea;
    color: white;
}
.nav-dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}
.nav-dropdown.active .nav-dropdown-arrow { transform: rotate(180deg); }
.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 150px;
    z-index: 1000;
    margin-top: 4px;
    padding: 4px 0;
}
.nav-dropdown.active .nav-dropdown-content { display: block; }

/* 头部行布局 */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* 最后记录栏样式 */
.last-record-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    
    flex-shrink: 0;
}
.last-record-label {
    font-weight: 600;
    color: #856404;
    font-size: 13px;
    white-space: nowrap;
}
.last-record-content {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.last-record-item {
    font-size: 12px;
    color: #333;
    padding: 3px 8px;
    background: rgba(255,255,255,0.7);
    border-radius: 3px;
}
.last-record-item strong {
    color: #856404;
}
.last-record-details {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 10px;
    border-left: 1px dashed #ffc107;
}
.last-record-details-label {
    font-weight: 500;
    color: #856404;
    font-size: 12px;
    white-space: nowrap;
}
.last-record-codes {
    font-size: 14px;
    color: #333;
    background: rgba(255,255,255,0.7);
    padding: 3px 8px;
    border-radius: 3px;
    max-width: 380px;
    word-break: break-all;
}
.last-record-codes .code-num {
    color: #136af4;
    font-weight: 600;
}
.last-record-codes .code-separator {
    color: #6c757d;
    margin: 0 2px;
}
.last-record-codes .code-value {
    color: #dc3545;
    font-weight: 500;
}
.last-record-codes .code-comma {
    color: #6c757d;
}

.nav-dropdown-content a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    color: #495057;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.nav-dropdown-content a:hover { background: #f8f9fa; }
.nav-dropdown-content a.active {
    background: #667eea;
    color: white;
}
.nav-dropdown-content a.logout { color: #dc3545; }
.nav-dropdown-content a.logout:hover {
    background: #f8d7da;
    color: #c82333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
    font-size: 13px;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    min-height: 500px;
    align-items: flex-start;
}
.form-left {
    flex: 0 0 28%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.form-actions { margin-top: 5px; }
.form-hidden { display: none; }
.form-control {
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
}
.btn-primary { background: #667eea; color: white; }
.btn-primary:hover { background: #5a6fd6; transform: translateY(-1px); }
.btn-secondary { background: #6c757d; color: white; }
.btn-secondary:hover { background: #5a6268; transform: translateY(-1px); }
.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #c82333; transform: translateY(-1px); }
.btn-success { background: #28a745; color: white; }
.btn-success:hover { background: #218838; transform: translateY(-1px); }
.btn-warning { background: #ff9800; color: white; }
.btn-warning:hover { background: #f57c00; transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.mode-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
    background: #6c757d;
    color: white;
}
.mode-btn:hover { background: #5a6268; transform: translateY(-1px); }
.mode-btn.active { background: #667eea; }
.mode-btn.active:hover { background: #5a6fd6; }
.mode-btn.cancel { background: #dc3545; }
.mode-btn.cancel:hover { background: #c82333; }

/* 消息提示 */
.message-box {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}
.message-box.show { transform: translateX(0); }
.message-box.success { background: #28a745; }
.message-box.error { background: #dc3545; }
.message {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}
.message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* 表格样式 */
.table-wrapper { overflow-x: auto; margin: 15px 0; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}
.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #f8f9fa; }
.data-table tbody tr.selected-row { 
    background: #f8e579 !important; 
    border-left: 3px solid #21f34f;
}
.data-table tbody tr.selected-row:hover { 
    background: #3cb206 !important; 
}
.data-table .status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}
.status-link { cursor: pointer; text-decoration: none; }
.status-checked { color: #28a745; font-weight: bold; }
.status-unchecked { color: #ffc107; }
.data-table .code-number { font-weight: bold; color: #136af4; }
.data-table .code-value { color: #000000; font-weight: 500; }
.no-data { text-align: center; color: #6c757d; padding: 20px; font-size: 14px; }

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}
.modal.show {
    display: flex;
}
.modal-content {
    background-color: white;
    margin: 20px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}
.modal-title { margin-bottom: 20px; color: #2c3e50; font-size: 18px; }
.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover, .modal-close:focus { color: #000; text-decoration: none; }

/* 快速数字输入模态框 */
.quick-input-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.6);
}
.quick-input-modal.show {
    display: block;
}
.quick-input-content {
    position: absolute;
    top: 50px;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 16px 0 0 16px;
    box-shadow: -10px 0 40px rgba(0,0,0,0.3);
    width: 420px;
    max-width: calc(100% - 40px);
    color: white;
    animation: slideInRight 0.3s ease;
}
@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.quick-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.quick-input-title {
    font-size: 20px;
    font-weight: 600;
}
.quick-input-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.quick-input-close:hover {
    background: rgba(255,255,255,0.3);
}
.quick-input-body {
    margin-bottom: 20px;
}
.quick-number-display {
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    min-height: 100px;
    margin-bottom: 20px;
}
.quick-number-display .label {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 10px;
    display: block;
}
.quick-number-display .numbers {
    font-size: 24px;
    font-weight: bold;
    word-break: break-all;
    line-height: 1.5;
}
.quick-number-display .numbers:empty::after {
    content: '等待输入数字...';
    opacity: 0.5;
}
.quick-input-summary {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 16px;
}
.quick-input-summary span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.quick-input-summary #quickInputCount,
.quick-input-summary #quickInputTotalAmount {
    font-weight: bold;
    font-size: 18px;
    color: #ffd700;
}
.quick-input-field {
    width: 100%;
    padding: 15px;
    font-size: 20px;
    text-align: center;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: white;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 20px;
}
.quick-input-field::placeholder {
    color: rgba(255,255,255,0.5);
}
.quick-input-field:focus {
    border-color: white;
}
.quick-input-field::-webkit-outer-spin-button,
.quick-input-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.quick-input-field[type=number] {
    -moz-appearance: textfield;
}
.quick-input-actions {
    display: flex;
    gap: 10px;
}
.quick-input-btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.quick-input-btn.primary {
    background: white;
    color: #667eea;
}
.quick-input-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.quick-input-btn.danger {
    background: rgba(220,53,69,0.8);
    color: white;
}
.quick-input-btn.danger:hover {
    background: rgba(220,53,69,1);
    transform: translateY(-2px);
}
.quick-input-btn.secondary {
    background: rgba(255,255,255,0.2);
    color: white;
}
.quick-input-btn.secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}
.quick-input-hint {
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
    margin-top: 15px;
}
.quick-input-hint code {
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}
.quick-number-display .number-item {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    padding: 4px 6px;
    border-radius: 6px;
    margin: 3px;
    font-weight: 600;
}
.number-remove-btn {
    width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0;
    background: rgba(220,53,69,0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.number-remove-btn:hover {
    background: rgba(220,53,69,1);
    transform: scale(1.1);
}

/* 标签页样式 */
.tabs { display: flex; gap: 4px; }
.tab-btn {
    padding: 3px 8px;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn:hover { background: #f8f9fa; border-color: #adb5bd; }
.tab-btn.active { background: #667eea; color: white; border-color: #667eea; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.category-tabs { 
    display: flex; 
    gap: 6px; 
    margin-bottom: 12px; 
    flex-wrap: wrap;
    align-items: center;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 6px;
}
.tab-divider {
    color: #adb5bd;
    font-size: 14px;
    margin: 0 2px;
}
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 16px;
}
.filter-bar label {
    font-weight: 500;
    color: #495057;
}
.filter-bar select {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}
/* 类别tab（澳门/香港）- 简洁样式 */
.category-tab {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid #6b7280;
    border-radius: 16px;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}
.category-tab:hover { border-color: #3b82f6; color: #3b82f6; }
.category-tab.active { background: #3b82f6; color: white; border-color: #3b82f6; }

/* 类型tab（特码/平码/组合连码）- 简洁样式 */
.tab-btn {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid #6b7280;
    border-radius: 4px;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn:hover { border-color: #f97316; color: #f97316; }
.tab-btn.active { background: #f97316; color: white; border-color: #f97316; }

/* 网格布局 */
.grid { display: grid; gap: 8px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.grid-10 { grid-template-columns: repeat(10, 1fr); }
.grid-12 { grid-template-columns: repeat(12, 1fr); }

/* 数字网格 */
.number-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    padding: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    width: 100%;
    min-width: 0;
}
.number-grid.packages { padding: 8px; gap: 4px; }
.number-btn {
    width: 100%;
    height: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}
.number-btn .n { font-size: 14px; font-weight: bold; color: #333; }
.number-btn .z { font-size: 11px; color: #6c757d; font-weight: 700; }
.number-btn:hover { background: #e3f2fd; border-color: #2196f3; transform: translateY(-2px); }
.number-btn.selected {
    background: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
}
.number-btn.selected .n { color: white !important; font-weight: bold; }
.number-btn.selected .z { color: rgba(255, 255, 255, 0.9) !important; }
.number-btn.selected-count-display {
    background-color: #c800ff !important;
    border: 2px solid #e900f5 !important;
    border-radius: 8px !important;
    box-shadow: 0 0 10px rgba(234, 0, 255, 0.784) !important;
    animation: pulse 2s infinite !important;
}
.number-btn.selected-count-display span:first-child {
    font-weight: bold !important;
    font-size: 13px !important;
    color: white !important;
}
.number-btn.selected-count-display span:last-child {
    font-size: 16px !important;
    font-weight: bold !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 152, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); }
}

.checkbox-hidden { display: none; }

/* 套餐相关 */
.package-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 12px; }
.package-btn {
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    color: #333;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}
.package-btn.active { color: white; }
.package-btn.no-use { color: #6c757d; }
.package-btn.no-use.active {
    color: white;
    background-color: #6c757d;
    border-radius: 4px;
}
.wave-package-btn {
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    color: #333;
    height: 100%;
}
.wave-package-btn.active { color: white; }
.wave-package-btn.no-use { color: #6c757d; }
.wave-package-btn.no-use.active {
    color: white;
    background-color: #6c757d;
    border-radius: 4px;
}
.package-numbers { font-size: 12px; font-weight: normal; opacity: 0.8; margin-left: 4px; }

/* 生肖对照卡片 */
.zodiac-card {
    padding: 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-align: center;
    position: relative;
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.zodiac-card .name {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    z-index: 2;
    position: relative;
}
.zodiac-card .index-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    margin-left: 4px;
    min-width: 16px;
    text-align: center;
}
.zodiac-card .key-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    margin-left: 4px;
    min-width: 20px;
    text-align: center;
}
.zodiac-card.active .index-badge {
    background: white;
    color: #667eea;
}
.zodiac-card.active .key-badge {
    background: white;
    color: #667eea;
}
.zodiac-card .items {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
}
.zodiac-card .item {
    position: absolute;
    padding: 2px 4px;
    font-size: 10px;
    font-weight: 500;
    color: #6c757d;
}
.zodiac-card .item:nth-child(1) { top: 4px; left: 4px; }
.zodiac-card .item:nth-child(2) { top: 4px; right: 4px; }
.zodiac-card .item:nth-child(3) { bottom: 4px; left: 4px; }
.zodiac-card .item:nth-child(4) { bottom: 4px; right: 4px; }
.zodiac-card .item:nth-child(5) { bottom: 4px; left: 50%; transform: translateX(-50%); }
.zodiac-card.active {
    background-color: #667eea;
    border-color: #667eea;
}
.zodiac-card.active .name,
.zodiac-card.active .item { color: white !important; }

/* 输入区域 */
.input-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.input-field {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}
.values-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    min-height: 40px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
}
.values-list { display: flex; flex-wrap: wrap; gap: 10px; }
.value-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.value-item .seq-num { color: #999; font-size: 11px; min-width: 16px; }
.value-item .code-number { font-weight: bold; color: #667eea; }
.value-item .code-value { color: #28a745; font-weight: 500; }
.value-item .number { font-weight: bold; color: #667eea; }
.value-item .value { color: #28a745; font-weight: 500; }
.value-item .code-value.value-updated { color: #dc3545; font-weight: bold; }
.value-item .delete-value-btn {
    display: none;
    background: none;
    border: none;
    color: #dc3545;
    font-size: 16px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.2s;
}
.value-item .delete-value-btn:hover { color: #c82333; }
.value-item:hover .delete-value-btn { display: inline-flex; }

/* 求和框 */
.sum-box {
    background: #667eea;
    color: white;
    border-radius: 8px;
    text-align: center;
    padding: 8px;
}
.sum-box .label { font-size: 12px; opacity: 0.9; }
.sum-box .value { font-size: 20px; font-weight: 700; margin-top: 2px; }

/* 客户信息 */
.customer-row { display: flex; gap: 8px; }
.customer-field { flex: 1; }
.customer-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
}
.customer-field input,
.customer-field select {
    
    padding: 6px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 12px;
    color: #495057;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.customer-field input:focus,
.customer-field select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

/* 批量操作 */
.batch-ops { background: #f8f9fa; padding: 15px; border-radius: 8px; margin-bottom: 15px; }
.batch-ops .row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }

/* 统计页面样式 */
.stats-card {
    text-align: center;
    padding: 8px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}
.stats-card h4 {
    font-size: 11px;
    color: #6c757d;
    margin: 0 0 4px;
}
.stats-card p {
    font-size: 14px;
    font-weight: bold;
    margin: 0;
    color: #2c3e50;
}
.stats-card .small {
    font-size: 14px;
    font-weight: normal;
    margin: 4px 0 0;
    color: #6c757d;
}
.stats-grid { grid-template-columns: repeat(6, 1fr) !important; }

/* 统计摘要 */
.stats-section {
    margin-top: 16px;
    border-top: 1px solid #ddd;
    padding-top: 16px;
}
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 12px;
}
.stats-box {
    flex: 1;
    min-width: 250px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}
.stats-box-title {
    margin-bottom: 12px;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}
.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 8px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}
.summary-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
}
.summary-table tr:last-child td { border-bottom: none; }
.summary-table td:first-child {
    font-weight: 600;
    color: #495057;
    width: 40px;
}
.summary-table td:last-child {
    color: #2c3e50;
    font-weight: 500;
}
.summary-table-row-alt { background: #f8f9fa; }
.summary-table-row-light { background: #ffffff; }
.summary-table-cell-label {
    width: 60px;
    border-right: 1px solid #e9ecef;
}
.summary-table-cell-note {
    font-size: 12px;
    color: #6c757d;
}

/* 状态颜色 */
.text-primary { color: #667eea; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-white { color: white; }
.bg-warning {
    background-color: #fac3c3;
    color: #fd0000;
}
.bet-positive { color: #28a745; }
.bet-negative { color: #dc3545; }

/* 条目徽章 */
.item-badge {
    padding: 4px 8px;
    border-radius: 4px;
    margin: 2px;
}
.item-badge-light { background: #f8f9fa; }
.item-badge-success {
    background: #28a745;
    color: white;
}
.item-number { font-weight: bold; }
.item-value { font-weight: 500; }
.winning-numbers {
    color: red;
    font-weight: bold;
}

/* 工具类 */
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.active, .selected {
    background: #667eea;    
    border-color: #667eea;
}
.show { display: block !important; }
.hide { display: none !important; }

/* 登录页 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}
.login-container h1 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 700;
}
.login-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.login-btn:hover { background: #5a6fde; }

/* 响应式 */
@media (max-width: 768px) {
    .container { padding: 10px; }
    .form-layout { flex-direction: column; }
    .form-left { flex: 1; width: 100%; }
    .form-right { flex: 1; width: 100%; min-width: 0; }
    .number-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 2px;
        padding: 5px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    .number-btn {
        border: 1px solid #dee2e6;
        border-radius: 3px;
        font-size: 13px;
        min-width: 0;
        padding: 4px 2px;
    }
    .number-btn .n { font-size: 13px; }
    .number-btn .z { font-size: 11px; }
    .package-grid { grid-template-columns: repeat(2, 1fr); }
    .customer-row { flex-direction: column; }
    .nav-content { flex-direction: column; gap: 20px; }
    .nav-section { min-width: 100%; }
    .stats-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .input-row { flex-wrap: wrap; gap: 6px; }
    .input-field { padding: 8px 10px; font-size: 14px; }
    .btn { padding: 8px 12px; font-size: 14px; }
    .btn-sm { padding: 4px 8px; font-size: 11px; }
    .mode-btn { padding: 8px 10px; font-size: 12px; }
    .wave-package-btn { padding: 4px 8px; font-size: 11px; }
    .card { padding: 12px; }
}
@media (max-width: 480px) {
    .number-grid { 
        grid-template-columns: repeat(10, 1fr); 
        gap: 1px; 
        padding: 3px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    .number-btn { 
        border: 1px solid #dee2e6;
        border-radius: 2px;
        font-size: 11px;
        min-width: 0;
        padding: 2px 1px;
    }
    .number-btn .n { font-size: 11px; }
    .number-btn .z { font-size: 10px; }
    .package-grid { grid-template-columns: repeat(2, 1fr); gap: 2px; }
    .sum-box { padding: 8px; }
    .sum-box .label { font-size: 10px; }
    .sum-box .value { font-size: 14px; }
    .input-row { flex-wrap: wrap; gap: 4px; }
    .input-field { padding: 6px 8px; font-size: 12px; }
    .btn { padding: 6px 10px; font-size: 11px; }
    .btn-sm { padding: 3px 6px; font-size: 10px; }
    .mode-btn { padding: 6px 8px; font-size: 11px; }
    .wave-package-btn { padding: 3px 6px; font-size: 10px; }
    .card { padding: 10px; }
}

/* 语音输入区域样式 */
.voice-input-section {
    margin-bottom: 20px;
    padding: 15px 20px;
}

.voice-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.voice-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.voice-actions {
    display: flex;
    gap: 8px;
}

.voice-btn,
.voice-clear-btn,
.voice-copy-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.voice-btn:hover,
.voice-clear-btn:hover,
.voice-copy-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.voice-btn.recording {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.voice-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.voice-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.voice-textarea.recording {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.voice-message {
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    animation: fadeIn 0.3s ease;
}

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

.voice-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.voice-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.voice-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .voice-input-section {
        padding: 12px 15px;
    }
    
    .voice-title {
        font-size: 14px;
    }
    
    .voice-btn,
    .voice-clear-btn,
    .voice-copy-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .voice-textarea {
        min-height: 60px;
        padding: 10px;
        font-size: 13px;
    }
}
    /* .table-wrapper { display: none; } */
}
.disabled-row {
    opacity: 0.6;
    background-color: #f5f5f5;
}
.disabled-row td {
    color: #999;
}

/* 记录详情弹窗样式 */
.detail-row {
    display: flex;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.detail-label {
    font-weight: 600;
    color: #666;
    min-width: 80px;
}
.detail-value {
    flex: 1;
    color: #333;
}
.detail-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
}
.detail-item-number {
    font-weight: 600;
    color: #3b82f6;
}
.detail-item-amount {
    color: #16a34a;
}