/* ========== 手机端样式 (屏幕宽度 ≤ 768px) ========== */
@media (max-width: 768px) {
    .stat-value { font-size: 12px; }
    .stat-label { font-size: 9px; }
    .card-title { font-size: 14px; }
    .form-group label { font-size: 12px; }
    .btn { font-size: 14px; padding: 10px; }
    .nav-item span { font-size: 18px; }
    .nav-item div { font-size: 10px; }
    .debt-table th { font-size: 11px; padding: 6px; }
    .debt-table td { padding: 6px; }
    .debt-table input { font-size: 12px; padding: 6px; }
    .person-tag { font-size: 11px; padding: 4px 8px; }
    .info-text { font-size: 10px; }
    .badge { font-size: 10px; }
    .header-top h2 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
    .theme-toggle { padding: 4px 8px; font-size: 14px; margin-left: 5px; }
    .user-name { font-size: 13px; white-space: nowrap; cursor: pointer; }
    .inline-row { gap: 10px; }
    .product-list-item { padding: 8px 10px; font-size: 12px; }
    .category-actions { display: flex; gap: 8px; flex-shrink: 0; }
    .repay-buttons { flex-wrap: wrap; gap: 8px; }
    .repay-buttons .btn, .repay-buttons .btn-sm { flex: 1 1 auto; min-width: 80px; }
    .query-row { flex-direction: column; }
    .modal-content { padding: 16px; }
    .container { padding-bottom: 80px; }
    .category-item { flex-wrap: wrap; }
    .category-info { flex: 1; min-width: 120px; }
    .category-actions { flex-shrink: 0; display: flex; gap: 8px; }
    .product-list-item-card { flex-wrap: wrap; }
    .product-info-card { flex: 1; min-width: 150px; }
    .product-actions-card { flex-shrink: 0; display: flex; gap: 8px; }
    .debt-detail-actions { justify-content: center; width: 100%; margin-top: 8px; }
    .price-tooltip { left: 10px !important; right: auto !important; }
    
    .debt-content {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    .debt-content > div:first-child {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
    }
    .debt-content > div:first-child strong {
        font-size: 14px;
    }
    .price-badge, .floating-badge, .overdue-badge {
        font-size: 10px;
        padding: 2px 6px;
        white-space: nowrap;
        display: inline-block;
    }
    
    .stats {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .stat-box {
        flex: 1;
        min-width: 70px;
        padding: 8px 4px;
        text-align: center;
        border-radius: 10px;
    }
    .stat-value {
        font-size: 12px;
        font-weight: bold;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .stat-label {
        font-size: 9px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .app-header .stats {
        display: flex;
        gap: 6px;
        flex-wrap: nowrap;
        margin-top: 8px;
        justify-content: space-between;
    }
    .app-header .stats .stat-box {
        background: rgba(255,255,255,0.2);
        padding: 6px 4px;
        border-radius: 8px;
        flex: 1;
        min-width: 0;
        text-align: center;
    }
    body.dark-mode .app-header .stats .stat-box {
        background: rgba(255,255,255,0.1);
    }
    .app-header .stats .stat-value {
        font-size: 11px;
    }
    .app-header .stats .stat-label {
        font-size: 8px;
    }
    
    .card .stats {
        display: flex;
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: space-between;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        margin-bottom: 12px;
    }
    .card .stats .stat-box {
        flex: 1;
        min-width: 70px;
        padding: 8px 4px;
        text-align: center;
        border-radius: 10px;
        flex-shrink: 0;
    }
    .card .stats .stat-value {
        font-size: 12px;
        font-weight: bold;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .card .stats .stat-label {
        font-size: 9px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .stat-box.month-debt {
        background: #f0e6ff;
    }
    body.dark-mode .stat-box.month-debt {
        background: #2d1a4e;
    }
    .stat-box.month-paid {
        background: #e6f7e6;
    }
    body.dark-mode .stat-box.month-paid {
        background: #1a3a1a;
    }
    .stat-box.overdue {
        background: #fff0e6;
    }
    body.dark-mode .stat-box.overdue {
        background: #4a2a1a;
    }
    .stat-box.total-profit {
        background: #e6f0ff;
    }
    body.dark-mode .stat-box.total-profit {
        background: #1a2a4a;
    }
    
    .overdue-number {
        color: #f5576c !important;
        cursor: pointer;
        text-decoration: underline;
        text-decoration-style: dotted;
        text-underline-offset: 2px;
    }
    body.dark-mode .overdue-number {
        color: #f87171 !important;
    }
    
    .overdue-badge {
        background: #f5576c;
        color: white;
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 12px;
        margin-left: 8px;
        display: inline-block;
        white-space: nowrap;
        flex-shrink: 0;
    }
    body.dark-mode .overdue-badge {
        background: #f87171;
    }
    
    .overdue-row {
        background-color: rgba(245, 87, 108, 0.1);
        border-left: 3px solid #f5576c;
    }
    body.dark-mode .overdue-row {
        background-color: rgba(248, 113, 113, 0.15);
        border-left-color: #f87171;
    }
    
    .overdue-tooltip-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 2100;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .overdue-tooltip-card {
        background: white;
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.3);
        width: 90%;
        max-width: 500px;
        max-height: 80vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    body.dark-mode .overdue-tooltip-card {
        background: #1e293b;
        border: 1px solid #334155;
    }
    
    .overdue-tooltip-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        font-weight: bold;
        font-size: 16px;
        background: #f5576c;
        color: white;
        flex-shrink: 0;
    }
    body.dark-mode .overdue-tooltip-header {
        border-bottom-color: #334155;
        background: #f87171;
    }
    
    .overdue-tooltip-header .close-tooltip {
        cursor: pointer;
        font-size: 24px;
        color: white;
    }
    
    .overdue-tooltip-body {
        padding: 15px 20px;
        overflow-y: auto;
        flex: 1;
    }
    
    .overdue-tooltip-item {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
        cursor: pointer;
        transition: background 0.2s;
    }
    body.dark-mode .overdue-tooltip-item {
        border-bottom-color: #334155;
    }
    .overdue-tooltip-item:hover {
        background: #f8f9fa;
    }
    body.dark-mode .overdue-tooltip-item:hover {
        background: #0f172a;
    }
    
    .overdue-tooltip-item .invoice {
        font-family: monospace;
        font-size: 12px;
        color: #333;
        flex: 2;
        word-break: break-all;
    }
    body.dark-mode .overdue-tooltip-item .invoice {
        color: #e2e8f0;
    }
    
    .overdue-tooltip-item .amount {
        font-weight: bold;
        color: #f5576c;
        font-size: 12px;
        flex: 1;
        text-align: right;
    }
    
    .overdue-tooltip-item .date {
        font-size: 11px;
        color: #888;
        width: 100%;
        text-align: center;
        margin-top: 8px;
        padding-top: 4px;
    }
    body.dark-mode .overdue-tooltip-item .date {
        color: #94a3b8;
    }
    
    .overdue-tooltip-copy-tip {
        font-size: 11px;
        color: #888;
        margin-top: 10px;
        text-align: center;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }
    body.dark-mode .overdue-tooltip-copy-tip {
        color: #94a3b8;
        border-top-color: #334155;
    }
    
    .toast-copy {
        position: fixed;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        background: #52c41a;
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 12px;
        z-index: 2200;
        white-space: nowrap;
    }
    
    .debt-detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .debt-detail-info {
        width: 100%;
    }
    .debt-detail-info > div:first-child {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
    }
    
    .promised-select, .promised-date-input {
        font-size: 12px;
        padding: 8px;
    }
    
    .product-list-item-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
        border-bottom: 1px solid #eee;
        gap: 8px;
    }
    .product-info-card {
        width: 100%;
    }
    .product-actions-card {
        width: 100%;
        justify-content: center;
    }
    
    .debt-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .debt-checkbox {
        width: 100%;
        margin-bottom: 8px;
    }
    .debt-content {
        width: 100%;
    }
    .debt-row .debt-detail-actions {
        width: 100%;
        justify-content: center;
    }
    
    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .invoice-info {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .invoice-info .invoice-no,
    .invoice-info .overdue-mark,
    .invoice-info .status-badge {
        display: inline-flex;
        margin: 2px 0;
    }
    
    .desktop-buttons {
        display: none !important;
    }
    
    .mobile-buttons-row {
        display: flex;
        justify-content: center;
        gap: 12px;
        padding: 12px 15px;
        margin-top: 8px;
        border-top: 1px solid #e8e8e8;
        background-color: #f5f5f5;
        border-radius: 0 0 12px 12px;
    }
    body.dark-mode .mobile-buttons-row {
        background-color: #1e293b;
        border-top-color: #334155;
    }
    
    .mobile-buttons-row .btn-secondary.btn-sm {
        background: #ff9800 !important;
        color: white !important;
        border: none !important;
        padding: 8px 20px;
        font-size: 14px;
        min-width: 100px;
        border-radius: 20px;
        box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
    }
    
    .mobile-buttons-row .btn-secondary.btn-sm:hover {
        background: #f57c00 !important;
    }
    
    .mobile-buttons-row .btn-danger.btn-sm {
        background: #f5576c !important;
        color: white !important;
        border: none !important;
        padding: 8px 20px;
        font-size: 14px;
        min-width: 100px;
        border-radius: 20px;
    }
    
    .mobile-buttons-row .btn-danger.btn-sm:hover {
        background: #e11d48 !important;
    }
    
    .repay-page .mobile-buttons-row .btn-secondary.btn-sm {
        background: #ff9800 !important;
    }
    
    .repay-page .product-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .repay-page .product-name-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        width: 100%;
    }
    
    .repay-page .product-name {
        font-weight: 500;
        font-size: 14px;
    }
    
    .repay-page .product-detail-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        margin-bottom: 10px;
        font-size: 13px;
        color: #555;
        width: 100%;
    }
    
    .repay-page .product-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-top: 5px;
    }
    
    .repay-page .product-detail,
    .repay-page .product-amount {
        display: none !important;
    }
    
    .repay-page .invoice-info {
        justify-content: flex-start !important;
    }
    
    .repay-page .invoice-info .expand-icon {
        margin-left: auto !important;
    }
    
    .product-checkbox {
        margin-bottom: 5px;
    }
    
    .invoice-summary {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .summary-item {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
    
    .invoice-date-status {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .status-badge {
        margin-top: 5px;
    }
    
    .expand-icon {
        margin-left: 0 !important;
    }
    
    .payment-record-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .record-info {
        width: 100%;
    }
    
    .delete-record-btn {
        align-self: flex-end;
    }
    
    .pay-modal .modal-content {
        width: 95%;
        margin: 0 auto;
    }
    
    .current-debt-amount .amount {
        font-size: 20px;
    }
    
    .debt-detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .debt-detail-info {
        width: 100%;
    }
    .debt-detail-actions {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
    
    .invoice-group {
        margin-bottom: 10px;
        border-radius: 12px;
    }
    
    .debt-detail-actions .btn-sm {
        background: #667eea;
        color: white;
        border: none;
        border-radius: 16px;
        padding: 4px 12px;
    }
    
    .debt-detail-actions .btn-danger {
        background: #f5576c;
    }
    
    .debt-detail-actions .btn-warning {
        background: #ff9800;
    }
    
    .announcement-item {
        flex-direction: column;
    }
    
    .announcement-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }
    
    .announcement-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .read-count {
        margin-left: 0;
        margin-top: 4px;
    }
    
    .announcement-modal .modal-content {
        max-width: 95%;
        padding: 16px;
    }
    
    .expiry-announcement-full {
        padding: 14px;
    }
    
    .expiry-announcement-title {
        font-size: 16px;
    }
    
    .expiry-announcement-content {
        font-size: 13px;
    }
    
    .announcement-list-item {
        padding: 12px;
    }
    
    .announcement-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .announcement-list-header strong {
        width: 100%;
    }
    
    .announcement-date {
        font-size: 10px;
    }
    
    .btn-read {
        align-self: flex-end;
    }
    
    .announcement-list-content {
        font-size: 12px;
        margin-top: 8px;
    }
    
    .all-read-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .expiry-lock-card {
        padding: 25px 20px;
        max-width: 90%;
    }
    
    .expiry-lock-icon {
        font-size: 50px;
    }
    
    .expiry-lock-title {
        font-size: 20px;
    }
    
    .expiry-lock-content {
        font-size: 14px;
    }
    
    .user-mgr-buttons {
        display: flex;
        gap: 10px;
        margin-bottom: 15px;
        flex-direction: column;
    }
    
    .user-mgr-buttons .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .user-table-container {
        max-height: 400px;
        overflow-x: auto;
        overflow-y: auto;
        border: 1px solid #eee;
        border-radius: 8px;
    }
    
    .user-table {
        width: 100%;
        font-size: 11px;
        border-collapse: collapse;
        min-width: 550px;
    }
    
    .user-table th {
        background: #f8f9fa;
        padding: 10px 6px;
        text-align: left;
        font-weight: 600;
        font-size: 11px;
        position: sticky;
        top: 0;
        white-space: nowrap;
    }
    
    .user-table td {
        padding: 10px 6px;
        border-bottom: 1px solid #eee;
        white-space: nowrap;
    }
    
    .user-table .action-buttons {
        white-space: nowrap;
    }
    
    .user-table .action-buttons .btn-sm {
        margin: 0 2px;
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .status-active {
        color: #52c41a;
        font-weight: 500;
    }
    
    .status-suspended {
        color: #f5576c;
        font-weight: 500;
    }
    
    .invite-table-container {
        max-height: 300px;
        overflow-x: auto;
        overflow-y: auto;
        border: 1px solid #eee;
        border-radius: 8px;
    }
    
    .invite-table {
        width: 100%;
        font-size: 11px;
        border-collapse: collapse;
        min-width: 400px;
    }
    
    .invite-table th {
        background: #f8f9fa;
        padding: 8px 6px;
        text-align: left;
        font-weight: 600;
        font-size: 11px;
        position: sticky;
        top: 0;
        white-space: nowrap;
    }
    
    .invite-table td {
        padding: 8px 6px;
        border-bottom: 1px solid #eee;
        white-space: nowrap;
    }
    
    @media (max-width: 480px) {
        .user-table {
            font-size: 10px;
            min-width: 500px;
        }
        .user-table .action-buttons .btn-sm {
            padding: 3px 6px;
            font-size: 9px;
        }
        .invite-table {
            font-size: 10px;
            min-width: 350px;
        }
    }
}

/* ========== 手机端分类管理卡片样式 ========== */
@media (max-width: 768px) {
    .category-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 10px;
        border-bottom: 1px solid #eee;
        gap: 10px;
    }
    
    .category-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .category-name {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 500;
        font-size: 14px;
    }
    
    .category-name span:first-child {
        font-size: 18px;
        cursor: pointer;
    }
    
    .category-name span:last-child {
        cursor: pointer;
    }
    
    .category-created {
        font-size: 11px;
        color: #888;
    }
    
    body.dark-mode .category-created {
        color: #94a3b8;
    }
    
    .category-meta {
        display: flex;
        flex-wrap: nowrap;
        gap: 16px;
        font-size: 11px;
        color: #888;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-meta-item {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .category-actions {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
        align-items: center;
    }
}

/* ========== 重置数据库弹窗按钮样式 ========== */
@media (max-width: 768px) {
    .reset-buttons {
        display: flex;
        gap: 12px;
        margin-top: 15px;
    }
    .reset-buttons .btn {
        flex: 1;
        white-space: nowrap;
        padding: 10px 8px;
        font-size: 14px;
    }
}

/* ========== 手机端订单展开后产品行配色 ========== */
@media (max-width: 768px) {
    .invoice-body .product-item {
        transition: background 0.2s ease;
    }
    .invoice-body .product-item:nth-child(odd) {
        background: #ffffff;
    }
    .invoice-body .product-item:nth-child(even) {
        background: #d4edda;
    }
    .invoice-body .product-item:hover {
        background: #c3e6cb;
    }
    
    body.dark-mode .invoice-body .product-item:nth-child(odd) {
        background: #1e293b;
    }
    body.dark-mode .invoice-body .product-item:nth-child(even) {
        background: #1a3a1a;
    }
    body.dark-mode .invoice-body .product-item:hover {
        background: #2a4a2a;
    }
}

/* ========== 手机端统计页面欠款明细行配色 ========== */
@media (max-width: 768px) {
    .debt-detail-row {
        transition: background 0.2s ease;
    }
    .debt-detail-row:nth-child(odd) {
        background: #ffffff;
    }
    .debt-detail-row:nth-child(even) {
        background: #d4edda;
    }
    .debt-detail-row:hover {
        background: #c3e6cb;
    }
    
    body.dark-mode .debt-detail-row:nth-child(odd) {
        background: #1e293b;
    }
    body.dark-mode .debt-detail-row:nth-child(even) {
        background: #1a3a1a;
    }
    body.dark-mode .debt-detail-row:hover {
        background: #2a4a2a;
    }
}

/* ========== 手机端备份管理弹窗样式 ========== */
@media (max-width: 768px) {
    .backup-list-container {
        max-height: 320px;
        overflow-y: auto;
        border: 1px solid #eee;
        border-radius: 8px;
        margin-top: 8px;
        margin-bottom: 12px;
    }
    
    .backup-item {
        display: flex;
        align-items: center;
        padding: 12px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .backup-item:last-child {
        border-bottom: none;
    }
    
    .backup-radio {
        flex-shrink: 0;
        margin-right: 12px;
    }
    
    .backup-radio input {
        width: 18px;
        height: 18px;
        cursor: pointer;
    }
    
    .backup-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .backup-filename {
        font-size: 13px;
        font-family: monospace;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }
    
    .backup-meta {
        font-size: 11px;
        color: #888;
        text-align: center;
        white-space: nowrap;
    }
    
    .backup-bottom-buttons {
        display: flex;
        justify-content: center;
        gap: 16px;
        padding: 12px 0;
        margin-top: 8px;
        border-top: 1px solid #eee;
    }
    
    .backup-bottom-buttons .btn-secondary,
    .backup-bottom-buttons .btn-danger {
        flex: 1;
        text-align: center;
        padding: 10px 16px;
        font-size: 14px;
        max-width: 140px;
    }
    
    .backup-bottom-buttons .btn-secondary:disabled,
    .backup-bottom-buttons .btn-danger:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
    
    body.dark-mode .backup-list-container {
        border-color: #334155;
    }
    
    body.dark-mode .backup-item {
        border-bottom-color: #2d3748;
    }
    
    body.dark-mode .backup-meta {
        color: #94a3b8;
    }
    
    body.dark-mode .backup-bottom-buttons {
        border-top-color: #334155;
    }
}

/* ========== 手机端暗色模式 - 票据单号和合计行适配 ========== */
@media (max-width: 768px) {
    body.dark-mode .form-group input[readonly],
    body.dark-mode .form-group input[readonly]:focus {
        background: #0f172a !important;
        color: #94a3b8 !important;
        border-color: #334155 !important;
    }
    
    body.dark-mode .debt-table .total-row {
        background: #0f172a !important;
    }
    
    body.dark-mode .debt-table .total-row td {
        background: #0f172a !important;
        color: #e2e8f0 !important;
        border-top: 1px solid #334155;
    }
    
    body.dark-mode .debt-table td {
        border-bottom-color: #334155;
    }
    
    body.dark-mode .debt-table input,
    body.dark-mode .debt-table select {
        background: #0f172a;
        color: #e2e8f0;
        border-color: #334155;
    }
}

/* ========== 手机端暗色模式 - 还款页面和统计页面完整适配 ========== */
@media (max-width: 768px) {
    body.dark-mode .repay-page .invoice-group,
    body.dark-mode .report-page .invoice-group {
        background: #1e293b;
        border-color: #334155;
    }
    
    body.dark-mode .repay-page .invoice-header,
    body.dark-mode .report-page .invoice-header {
        background: #0f172a !important;
        border-bottom-color: #334155;
    }
    
    body.dark-mode .repay-page .invoice-header:hover,
    body.dark-mode .report-page .invoice-header:hover {
        background: #1a2332 !important;
    }
    
    body.dark-mode .repay-page .invoice-no,
    body.dark-mode .report-page .invoice-no {
        background: #4c6ef5;
    }
    
    body.dark-mode .repay-page .customer-info,
    body.dark-mode .report-page .customer-info {
        color: #cbd5e1 !important;
    }
    
    body.dark-mode .repay-page .customer-info span,
    body.dark-mode .report-page .customer-info span {
        color: #94a3b8 !important;
    }
    
    body.dark-mode .repay-page .customer-info span[style*="color: #f5576c"],
    body.dark-mode .report-page .customer-info span[style*="color: #f5576c"] {
        color: #f87171 !important;
    }
    
    body.dark-mode .repay-page .overdue-mark,
    body.dark-mode .report-page .overdue-mark {
        background: #f87171;
    }
    
    body.dark-mode .repay-page .status-unpaid,
    body.dark-mode .report-page .status-unpaid {
        background: #f5576c;
    }
    body.dark-mode .repay-page .status-partial,
    body.dark-mode .report-page .status-partial {
        background: #f59e0b;
    }
    body.dark-mode .repay-page .status-paid,
    body.dark-mode .report-page .status-paid {
        background: #10b981;
    }
    
    body.dark-mode .repay-page .expand-icon,
    body.dark-mode .report-page .expand-icon {
        color: #94a3b8;
    }
    
    body.dark-mode .repay-page .invoice-body,
    body.dark-mode .report-page .invoice-body {
        background: #1e293b;
    }
    
    body.dark-mode .repay-page .product-item {
        border-bottom-color: #334155;
    }
    
    body.dark-mode .repay-page .product-name {
        color: #e2e8f0;
    }
    
    body.dark-mode .repay-page .product-meta {
        color: #94a3b8;
    }
    
    body.dark-mode .repay-page .product-amount {
        color: #f87171;
    }
    
    body.dark-mode .repay-page .invoice-summary,
    body.dark-mode .report-page .invoice-summary {
        background: #0f172a;
        border-top-color: #334155;
    }
    
    body.dark-mode .repay-page .summary-item,
    body.dark-mode .report-page .summary-item {
        color: #cbd5e1;
    }
    
    body.dark-mode .repay-page .summary-item strong,
    body.dark-mode .report-page .summary-item strong {
        color: #f87171;
    }
    
    body.dark-mode .repay-page .invoice-date-status,
    body.dark-mode .report-page .invoice-date-status {
        background: #111827;
        border-top-color: #334155;
        color: #94a3b8;
    }
    
    body.dark-mode .repay-page .invoice-footer,
    body.dark-mode .report-page .invoice-footer {
        background: #2d2a1a;
        border-top-color: #5c4a1a;
        color: #f59e0b;
    }
    
    body.dark-mode .repay-page .invoice-footer:hover,
    body.dark-mode .report-page .invoice-footer:hover {
        background: #3d361a;
    }
    
    body.dark-mode .repay-page .mobile-buttons-row,
    body.dark-mode .report-page .mobile-buttons-row {
        background-color: #1e293b;
        border-top-color: #334155;
    }
    
    body.dark-mode .repay-page .mobile-buttons-row .btn-secondary,
    body.dark-mode .report-page .mobile-buttons-row .btn-secondary {
        background: #ff9800 !important;
    }
    
    body.dark-mode .report-page .debt-detail-row {
        border-bottom-color: #334155;
    }
    
    body.dark-mode .report-page .debt-detail-info {
        color: #e2e8f0;
    }
    
    body.dark-mode .report-page .debt-detail-info .debt-info-line {
        color: #94a3b8;
    }
    
    body.dark-mode .report-page .debt-detail-actions .btn-sm {
        background: #4c6ef5;
        color: white;
    }
    
    body.dark-mode .report-page .debt-detail-actions .btn-danger {
        background: #f5576c;
    }
    
    body.dark-mode .report-page .debt-detail-actions .btn-warning {
        background: #f59e0b;
    }
}

/* ========== 全局暗色模式相邻订单底色适配 ========== */
body.dark-mode .invoice-group[style*="background-color: #f8f9fa"] {
    background-color: #1a2332 !important;
}

/* ========== 浮动商品价格弹窗样式 ========== */
@media (max-width: 768px) {
    .floating-price-modal .modal-content {
        max-width: 90%;
        padding: 16px;
    }
    .floating-price-modal .form-group input {
        font-size: 14px;
        padding: 10px;
    }
    .floating-price-modal .product-name-display {
        font-size: 14px;
        padding: 10px;
    }
}

@media (max-width: 500px) { 
    .debt-table th:nth-child(1) { width: 55%; }
    .debt-table th:nth-child(2) { width: 20%; }
    .debt-table th:nth-child(3) { width: 20%; }
    .debt-table th:nth-child(4) { width: 5%; }
}

@media (max-width: 480px) {
    .header-top h2 { font-size: 12px; max-width: 110px; }
    .user-name { font-size: 11px; }
    .theme-toggle { padding: 3px 6px; font-size: 12px; }
    .repay-buttons .btn, .repay-buttons .btn-sm { font-size: 11px; padding: 6px 8px; }
    .category-actions .btn-sm, .product-actions-card .btn-sm { padding: 4px 8px; font-size: 10px; }
    .container { padding-bottom: 75px; }
    
    .price-badge, .floating-badge, .overdue-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
    .card .stats .stat-value {
        font-size: 11px;
    }
    .card .stats .stat-label {
        font-size: 8px;
    }
    .card .stats .stat-box {
        min-width: 60px;
    }
    .overdue-tooltip-item .invoice {
        font-size: 11px;
    }
    .overdue-tooltip-item .amount {
        font-size: 11px;
    }
    .toast-copy {
        bottom: 75px;
        font-size: 11px;
        padding: 6px 12px;
    }
}
/* ========== 手机端用户管理弹窗暗色模式完整适配 ========== */
@media (max-width: 768px) {
    /* 弹窗整体背景 */
    body.dark-mode .modal-content {
        background: #1e293b !important;
        border: 1px solid #334155;
    }

    body.dark-mode .modal-header {
        border-bottom-color: #334155;
        color: #e2e8f0;
    }

    body.dark-mode .modal-header .close {
        color: #94a3b8;
    }

    /* 用户管理弹窗标题和文字 */
    body.dark-mode .modal-content .user-mgr-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }

    body.dark-mode .modal-content .user-mgr-buttons .btn-secondary {
        background-color: #334155;
        color: #e2e8f0;
        border: none;
        border-radius: 20px;
        padding: 10px 16px;
        font-size: 14px;
        width: 100%;
        text-align: center;
        cursor: pointer;
    }

    body.dark-mode .modal-content .user-mgr-buttons .btn-secondary:hover {
        background-color: #475569;
    }

    /* 用户列表标题 */
    body.dark-mode .modal-content div[style*="font-weight:bold"] {
        color: #e2e8f0;
    }

    /* 用户表格容器 */
    body.dark-mode .modal-content .user-table-container {
        background-color: #0f172a;
        border: 1px solid #334155;
        border-radius: 12px;
        overflow-x: auto;
        max-height: 400px;
        margin-top: 10px;
        margin-bottom: 15px;
    }

    /* 用户表格 */
    body.dark-mode .modal-content .user-table {
        background-color: #0f172a;
        width: 100%;
        min-width: 500px;
        border-collapse: collapse;
    }

    /* 表头 */
    body.dark-mode .modal-content .user-table th {
        background-color: #1e293b;
        color: #e2e8f0;
        border-bottom: 1px solid #334155;
        padding: 10px 8px;
        font-weight: 600;
        font-size: 12px;
        text-align: left;
        position: sticky;
        top: 0;
    }

    /* 表格单元格 */
    body.dark-mode .modal-content .user-table td {
        background-color: #0f172a;
        color: #cbd5e1;
        border-bottom: 1px solid #2d3748;
        padding: 10px 8px;
        font-size: 12px;
    }

    /* 表格行悬停效果 */
    body.dark-mode .modal-content .user-table tr:hover td {
        background-color: #1e293b;
    }

    /* 状态标签 - 正常 */
    body.dark-mode .modal-content .user-table .status-active {
        color: #10b981;
        font-weight: 500;
    }

    /* 状态标签 - 已禁用 */
    body.dark-mode .modal-content .user-table .status-suspended {
        color: #f87171;
        font-weight: 500;
    }

    /* 操作按钮组 */
    body.dark-mode .modal-content .user-table .action-buttons {
        white-space: nowrap;
    }

    /* 操作按钮 - 普通按钮 */
    body.dark-mode .modal-content .user-table .action-buttons .btn-sm {
        background-color: #334155;
        color: #e2e8f0;
        border: none;
        margin: 0 2px;
        padding: 4px 10px;
        border-radius: 16px;
        font-size: 10px;
        cursor: pointer;
        display: inline-block;
    }

    body.dark-mode .modal-content .user-table .action-buttons .btn-sm:active {
        background-color: #475569;
    }

    /* 操作按钮 - 删除按钮（红色） */
    body.dark-mode .modal-content .user-table .action-buttons .btn-danger {
        background-color: #e11d48;
        color: white;
    }

    body.dark-mode .modal-content .user-table .action-buttons .btn-danger:active {
        background-color: #be123c;
    }

    /* 操作按钮 - 启用/禁用按钮 */
    body.dark-mode .modal-content .user-table .action-buttons .btn-secondary {
        background-color: #334155;
        color: #e2e8f0;
    }

    /* 邀请码列表容器 */
    body.dark-mode .modal-content .invite-table-container {
        background-color: #0f172a;
        border: 1px solid #334155;
        border-radius: 12px;
        overflow-x: auto;
        max-height: 250px;
        margin-top: 10px;
    }

    /* 邀请码表格 */
    body.dark-mode .modal-content .invite-table {
        background-color: #0f172a;
        width: 100%;
        min-width: 400px;
        border-collapse: collapse;
    }

    /* 邀请码表头 */
    body.dark-mode .modal-content .invite-table th {
        background-color: #1e293b;
        color: #e2e8f0;
        border-bottom: 1px solid #334155;
        padding: 8px 8px;
        font-size: 11px;
        text-align: left;
        position: sticky;
        top: 0;
    }

    /* 邀请码单元格 */
    body.dark-mode .modal-content .invite-table td {
        background-color: #0f172a;
        color: #cbd5e1;
        border-bottom: 1px solid #2d3748;
        padding: 8px 8px;
        font-size: 11px;
    }

    /* 邀请码表格行悬停 */
    body.dark-mode .modal-content .invite-table tr:hover td {
        background-color: #1e293b;
    }

    /* 清除未使用邀请码按钮 */
    body.dark-mode .modal-content div[style*="text-align:center"] {
        margin-top: 15px;
    }

    body.dark-mode .modal-content .btn-warning.btn-sm {
        background-color: #d97706;
        color: white;
        border: none;
        border-radius: 20px;
        padding: 10px 20px;
        font-size: 13px;
        width: auto;
        min-width: 180px;
        cursor: pointer;
    }

    body.dark-mode .modal-content .btn-warning.btn-sm:active {
        background-color: #b45309;
    }

    /* 用户编辑弹窗 */
    body.dark-mode .modal-content .form-group {
        margin-bottom: 16px;
    }

    body.dark-mode .modal-content .form-group label {
        color: #cbd5e1;
        font-size: 13px;
        margin-bottom: 6px;
        display: block;
    }

    body.dark-mode .modal-content .form-group input,
    body.dark-mode .modal-content .form-group select {
        background-color: #0f172a;
        border: 1px solid #334155;
        color: #e2e8f0;
        padding: 10px 12px;
        border-radius: 12px;
        width: 100%;
        font-size: 14px;
        box-sizing: border-box;
    }

    body.dark-mode .modal-content .form-group input:focus,
    body.dark-mode .modal-content .form-group select:focus {
        border-color: #667eea;
        outline: none;
        box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    }

    body.dark-mode .modal-content .form-group input:read-only {
        background-color: #1e293b;
        color: #94a3b8;
    }

    /* 日期选择器在弹窗中的样式 */
    body.dark-mode .modal-content .promised-date-input {
        background-color: #0f172a;
        border: 1px solid #334155;
        color: #e2e8f0;
        padding: 10px 12px;
        border-radius: 12px;
        width: 100%;
        margin-top: 8px;
    }

    /* 弹窗内的信息文字 */
    body.dark-mode .modal-content .info-text {
        background-color: transparent;
        color: #94a3b8;
        font-size: 12px;
    }

    /* 弹窗内的成功提示 */
    body.dark-mode .modal-content .info-text[style*="color:#52c41a"] {
        color: #10b981 !important;
    }

    /* 用户编辑弹窗中的按钮 */
    body.dark-mode .modal-content .btn {
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
        color: white;
        border: none;
        border-radius: 24px;
        padding: 12px 20px;
        font-size: 16px;
        font-weight: 600;
        width: 100%;
        cursor: pointer;
        margin-top: 10px;
    }

    body.dark-mode .modal-content .btn:active {
        transform: translateY(1px);
    }

    /* 生成邀请码弹窗 */
    body.dark-mode .modal-content .invite-code-list {
        background-color: #0f172a;
        border-radius: 8px;
        padding: 10px;
        margin-top: 10px;
    }

    body.dark-mode .modal-content .invite-code-list div {
        color: #a5b4fc;
        font-family: monospace;
    }

    /* 滚动条样式 */
    body.dark-mode .user-table-container::-webkit-scrollbar,
    body.dark-mode .invite-table-container::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    body.dark-mode .user-table-container::-webkit-scrollbar-track,
    body.dark-mode .invite-table-container::-webkit-scrollbar-track {
        background: #1e293b;
        border-radius: 3px;
    }

    body.dark-mode .user-table-container::-webkit-scrollbar-thumb,
    body.dark-mode .invite-table-container::-webkit-scrollbar-thumb {
        background: #475569;
        border-radius: 3px;
    }

    body.dark-mode .user-table-container::-webkit-scrollbar-thumb:hover,
    body.dark-mode .invite-table-container::-webkit-scrollbar-thumb:hover {
        background: #64748b;
    }
}

/* ========== 手机端超小屏幕（宽度≤480px）额外适配 ========== */
@media (max-width: 480px) {
    body.dark-mode .modal-content .user-table {
        min-width: 450px;
    }
    
    body.dark-mode .modal-content .user-table th,
    body.dark-mode .modal-content .user-table td {
        padding: 8px 4px;
        font-size: 10px;
    }
    
    body.dark-mode .modal-content .user-table .action-buttons .btn-sm {
        padding: 3px 6px;
        font-size: 9px;
    }
    
    body.dark-mode .modal-content .invite-table {
        min-width: 360px;
    }
    
    body.dark-mode .modal-content .invite-table th,
    body.dark-mode .modal-content .invite-table td {
        padding: 6px 4px;
        font-size: 9px;
    }
    
    body.dark-mode .modal-content .btn-warning.btn-sm {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 150px;
    }
}
/* ========== 手机端原生日期选择器暗色模式（方法五完整方案） ========== */
@media (max-width: 768px) {
    /* 手机端日期选择器基础样式增强 */
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"] {
        font-size: 14px;
        padding: 10px 12px;
        -webkit-appearance: none;
        appearance: none;
    }

    /* 下拉箭头图标 - 暗色模式反色（手机端） */
    body.dark-mode input[type="date"]::-webkit-calendar-picker-indicator,
    body.dark-mode input[type="time"]::-webkit-calendar-picker-indicator,
    body.dark-mode input[type="datetime-local"]::-webkit-calendar-picker-indicator {
        filter: invert(1);
        cursor: pointer;
        opacity: 0.7;
        padding: 4px;
    }

    body.dark-mode input[type="date"]::-webkit-calendar-picker-indicator:active,
    body.dark-mode input[type="time"]::-webkit-calendar-picker-indicator:active,
    body.dark-mode input[type="datetime-local"]::-webkit-calendar-picker-indicator:active {
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }

    /* 日期内部文字（年/月/日） - 暗色模式（手机端） */
    body.dark-mode input[type="date"]::-webkit-datetime-edit {
        color: #e2e8f0;
    }

    body.dark-mode input[type="date"]::-webkit-datetime-edit-fields-wrapper {
        color: #e2e8f0;
    }

    body.dark-mode input[type="date"]::-webkit-datetime-edit-text {
        color: #94a3b8;
        padding: 0 2px;
    }

    body.dark-mode input[type="date"]::-webkit-datetime-edit-month-field,
    body.dark-mode input[type="date"]::-webkit-datetime-edit-day-field,
    body.dark-mode input[type="date"]::-webkit-datetime-edit-year-field {
        color: #e2e8f0;
    }

    /* 时间选择器内部文字（手机端） */
    body.dark-mode input[type="time"]::-webkit-datetime-edit {
        color: #e2e8f0;
    }

    body.dark-mode input[type="time"]::-webkit-datetime-edit-fields-wrapper {
        color: #e2e8f0;
    }

    body.dark-mode input[type="time"]::-webkit-datetime-edit-text {
        color: #94a3b8;
    }

    body.dark-mode input[type="time"]::-webkit-datetime-edit-hour-field,
    body.dark-mode input[type="time"]::-webkit-datetime-edit-minute-field {
        color: #e2e8f0;
    }

    /* 日期时间选择器内部文字（手机端） */
    body.dark-mode input[type="datetime-local"]::-webkit-datetime-edit {
        color: #e2e8f0;
    }

    body.dark-mode input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
        color: #e2e8f0;
    }

    body.dark-mode input[type="datetime-local"]::-webkit-datetime-edit-text {
        color: #94a3b8;
    }

    body.dark-mode input[type="datetime-local"]::-webkit-datetime-edit-month-field,
    body.dark-mode input[type="datetime-local"]::-webkit-datetime-edit-day-field,
    body.dark-mode input[type="datetime-local"]::-webkit-datetime-edit-year-field,
    body.dark-mode input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
    body.dark-mode input[type="datetime-local"]::-webkit-datetime-edit-minute-field {
        color: #e2e8f0;
    }

    /* 日期选择器在手机端的占位符样式（如果支持） */
    body.dark-mode input[type="date"]:invalid::-webkit-datetime-edit {
        color: #94a3b8;
    }

    /* 手机端触摸优化 */
    body.dark-mode input[type="date"]:active,
    body.dark-mode input[type="time"]:active,
    body.dark-mode input[type="datetime-local"]:active {
        background-color: #1e293b;
    }
}

/* ========== 手机端超小屏幕（宽度≤480px）额外适配 ========== */
@media (max-width: 480px) {
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"] {
        font-size: 13px;
        padding: 8px 10px;
    }
}
/* ========== 手机端重置数据库弹窗按钮样式统一 ========== */
@media (max-width: 768px) {
    /* 重置弹窗按钮容器 */
    .reset-buttons {
        display: flex;
        gap: 12px;
        margin-top: 15px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    /* 两个按钮统一样式基础 */
    .reset-buttons .btn,
    .reset-buttons .btn-secondary {
        flex: 1;
        text-align: center;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 30px;
        cursor: pointer;
        transition: all 0.2s ease;
        border: none;
        white-space: nowrap;
    }
    
    /* 执行重置按钮样式 */
    .reset-buttons .btn {
        background: linear-gradient(135deg, #f5576c 0%, #e11d48 100%);
        color: white;
        box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
    }
    
    .reset-buttons .btn:active {
        transform: translateY(1px);
        box-shadow: 0 1px 4px rgba(245, 87, 108, 0.3);
    }
    
    .reset-buttons .btn:disabled {
        opacity: 0.6;
        transform: none;
    }
    
    /* 取消按钮样式 */
    .reset-buttons .btn-secondary {
        background: #e2e8f0;
        color: #334155;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .reset-buttons .btn-secondary:active {
        transform: translateY(1px);
        background: #cbd5e1;
    }
    
    /* 暗色模式下的取消按钮 */
    body.dark-mode .reset-buttons .btn-secondary {
        background: #334155;
        color: #e2e8f0;
        border: 1px solid #475569;
    }
    
    body.dark-mode .reset-buttons .btn-secondary:active {
        background: #475569;
    }
    
    /* 暗色模式下的执行重置按钮 */
    body.dark-mode .reset-buttons .btn {
        background: linear-gradient(135deg, #f87171 0%, #e11d48 100%);
    }
}
/* ========== 手机端登录界面测试账号区域美化 ========== */
@media (max-width: 768px) {
    /* 美化卡片容器 - 手机端居中对齐 */
    .login-card .login-info-card {
        width: 100%;
        margin: 16px auto 0 auto;
        padding: 10px 8px;
        text-align: center;
        box-sizing: border-box;
    }
    
    /* 每个信息项 - 手机端不换行、居中对齐 */
    .login-card .login-info-item {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        white-space: nowrap;
        gap: 4px;
        padding: 6px 0;
    }
    
    /* 测试账号行 - 手机端不换行 */
    .login-card .login-info-item.test-account {
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 联系方式行 - 手机端不换行 */
    .login-card .login-info-item.contact-info {
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 图标大小 */
    .login-card .info-icon {
        font-size: 14px;
        flex-shrink: 0;
    }
    
    /* 文字样式 - 手机端 */
    .login-card .info-text {
        font-size: 11px;
        flex-shrink: 0;
    }
    
    /* 测试账号密码加粗文字 */
    .login-card .info-text strong {
        font-weight: 600;
    }
    
    /* 分隔符 */
    .login-card .info-separator {
        font-size: 10px;
        margin: 0 2px;
        flex-shrink: 0;
    }
    
    /* 微信标签 */
    .login-card .info-wechat {
        font-size: 10px;
        padding: 2px 6px;
        flex-shrink: 0;
    }
}

/* ========== 手机端超小屏幕（宽度≤480px）额外适配 ========== */
@media (max-width: 480px) {
    .login-card .login-info-card {
        padding: 8px 6px;
        margin-top: 12px;
    }
    
    .login-card .login-info-item {
        padding: 4px 0;
        gap: 3px;
    }
    
    .login-card .info-text {
        font-size: 10px;
    }
    
    .login-card .info-wechat {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .login-card .info-icon {
        font-size: 12px;
    }
}
/* ========== 手机端顶部标题栏暗色模式 ========== */
@media (max-width: 768px) {
    body.dark-mode .app-header {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-bottom: 1px solid #334155;
    }
    
    body.dark-mode .app-header .header-left h2 {
        font-size: 14px;
        color: #e2e8f0;
    }
    
    body.dark-mode .app-header .user-name {
        font-size: 12px;
        color: #e2e8f0;
    }
    
    body.dark-mode .app-header .theme-toggle {
        background: rgba(255, 255, 255, 0.15);
        padding: 4px 8px;
        border-radius: 20px;
    }
    
    /* 手机端统计卡片暗色模式 */
    body.dark-mode .app-header .stats {
        margin-top: 8px;
    }
    
    body.dark-mode .app-header .stats .stat-box {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }
    
    body.dark-mode .app-header .stats .stat-value {
        font-size: 12px;
        color: #e2e8f0;
    }
    
    body.dark-mode .app-header .stats .stat-label {
        font-size: 9px;
        color: #94a3b8;
    }
}
/* ========== 手机端夜间模式统一修复 ========== */
@media (max-width: 768px) {
    /* 还款页面按钮组手机端适配 */
    body.dark-mode .repay-buttons .btn,
    body.dark-mode .repay-buttons .btn-sm {
        background: #334155;
        color: #e2e8f0;
        border: none;
        border-radius: 30px;
        padding: 8px 12px;
    }
    
    body.dark-mode .repay-buttons .btn-success {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
    }
    
    body.dark-mode .repay-buttons .btn-warning {
        background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    }
    
    /* 还款页面单号卡片手机端 */
    body.dark-mode .invoice-group {
        background: #1e293b;
        border: 1px solid #334155;
        border-radius: 16px;
    }
    
    body.dark-mode .invoice-header {
        background: #0f172a !important;
        border-radius: 16px 16px 0 0;
    }
    
    /* 手机端操作按钮样式 */
    body.dark-mode .mobile-buttons-row .btn-secondary {
        background: #f59e0b !important;
        color: white !important;
    }
    
    body.dark-mode .mobile-buttons-row .btn-danger {
        background: #e11d48 !important;
        color: white !important;
    }
    
    /* 统计页面手机端按钮 */
    body.dark-mode .debt-detail-actions .btn-sm {
        background: #4f46e5;
        color: white;
        border: none;
        border-radius: 20px;
        padding: 6px 12px;
    }
    
    body.dark-mode .debt-detail-actions .btn-warning {
        background: #f59e0b;
    }
    
    body.dark-mode .debt-detail-actions .btn-danger {
        background: #e11d48;
    }
    
    /* 查询输入框手机端 */
    body.dark-mode .query-bar input,
    body.dark-mode .query-bar select {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
        border-radius: 12px;
        padding: 8px 10px;
    }
    
    /* 底部导航手机端 */
    body.dark-mode .bottom-nav {
        background: #1e293b;
        border-top-color: #334155;
    }
    
    body.dark-mode .nav-item {
        color: #94a3b8;
    }
    
    body.dark-mode .nav-item.active {
        background: #2d3a5e;
        color: #a5b4fc;
        border-radius: 30px;
    }
    
    /* 客户页面添加客户按钮手机端 */
    body.dark-mode .card .btn {
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    }
    
    /* 记账页面批量确认按钮手机端 */
    body.dark-mode .btn-success {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
    }
}
/* ========== 手机端登录界面夜间模式适配 ========== */
@media (max-width: 768px) {
    body.dark-mode .login-container {
        padding: 16px;
    }
    
    body.dark-mode .login-card {
        padding: 24px 20px;
        border-radius: 24px;
    }
    
    body.dark-mode .login-card h2 {
        font-size: 18px;
        margin-bottom: 24px;
    }
    
    body.dark-mode .login-card .form-group {
        margin-bottom: 16px;
    }
    
    body.dark-mode .login-card .form-group input {
        padding: 12px 14px;
        border-radius: 14px;
        font-size: 14px;
    }
    
    body.dark-mode .login-card .btn {
        padding: 12px;
        border-radius: 14px;
        font-size: 15px;
        margin-top: 8px;
    }
    
    body.dark-mode .login-card .link {
        font-size: 13px;
    }
    
    /* 测试账号卡片手机端 */
    body.dark-mode .login-info-card {
        margin-top: 20px;
        padding: 10px 12px;
        border-radius: 16px;
    }
    
    body.dark-mode .login-info-item {
        padding: 5px 0;
    }
    
    body.dark-mode .info-text {
        font-size: 11px;
    }
    
    body.dark-mode .info-wechat {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    /* 弹窗手机端 */
    body.dark-mode .modal-content {
        padding: 20px 16px;
        border-radius: 24px;
    }
    
    body.dark-mode .modal-header {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    body.dark-mode .modal-content .form-group input {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 14px;
    }
    
    body.dark-mode .modal-content .btn {
        padding: 12px;
        font-size: 15px;
        border-radius: 30px;
        margin-top: 8px;
    }
}

/* ========== 手机端超小屏幕（宽度≤480px）登录界面额外适配 ========== */
@media (max-width: 480px) {
    body.dark-mode .login-card {
        padding: 20px 16px;
        border-radius: 20px;
    }
    
    body.dark-mode .login-card h2 {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    body.dark-mode .login-card .form-group input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    body.dark-mode .login-card .btn {
        padding: 10px;
        font-size: 14px;
    }
    
    body.dark-mode .info-text {
        font-size: 10px;
    }
    
    body.dark-mode .info-icon {
        font-size: 12px;
    }
}