/* 默认显示/隐藏规则 - 添加在文件开头 */
.desktop-order-table {
    display: block !important;
}

.mobile-order-list {
    display: none !important;
}

/* 移动端显示/隐藏规则 */
@media (max-width: 768px) {
    .desktop-order-table {
        display: none !important;
    }

    .mobile-order-list {
        display: block !important;
    }

    /* 页面容器优化 */
    .container {
        max-width: 100%;
    }

    /* 标题和按钮区域 */
    .h5 {
        font-size: 18px;
        color: #333;
        margin: 0;
    }

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

    .card-header {
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    .card-body {
        padding: 0;
    }

    .table-responsive {
        margin: 0;
    }

    .table {
        margin-bottom: 0;
    }

    .table td {
        padding: 12px 15px;
        vertical-align: middle;
    }

    /* 邀请码单元格样式 */
    .table td:first-child {
        padding-right: 0;
    }

    .table td code {
        font-family: monospace;
        font-size: 13px;
        color: #666;
        background: #f8f9fa;
        padding: 6px 8px;
        border-radius: 4px;
        display: inline-block;
        margin-right: 8px;
        word-break: break-all;
    }

    /* 邀请码卡片样式 */
    .invite-code-card {
        background: #fff;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        border: 1px solid #eee;
    }

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

    .code-header .badge {
        padding: 6px 10px;
        font-size: 12px;
        font-weight: normal;
        border-radius: 6px;
    }

    .code-value {
        font-family: monospace;
        font-size: 15px;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 8px;
        margin-bottom: 16px;
        word-break: break-all;
        color: #333;
        border: 1px solid #eee;
        user-select: all;
    }

    .code-info {
        font-size: 14px;
    }

    .info-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid #eee;
    }

    .info-item:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .info-item .label {
        color: #666;
        font-weight: normal;
    }

    .info-item span:last-child {
        color: #333;
        font-weight: 500;
    }

    /* 复制按钮样式 */
    .copy-btn {
        padding: 6px 12px !important;
        font-size: 14px !important;
        border: 1px solid #ddd !important;
        background: #fff !important;
        color: #666 !important;
        border-radius: 6px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        height: 32px;
        min-width: 32px;
        position: relative;
    }

    .copy-btn:hover {
        background: #f8f9fa !important;
        border-color: #ccc !important;
    }

    .copy-btn i {
        font-size: 14px;
    }

    .copy-btn.btn-outline-success {
        color: #28a745 !important;
        border-color: #28a745 !important;
    }

    /* 删除按钮样式 */
    .btn-danger {
        padding: 6px 12px !important;
        font-size: 14px !important;
        border-radius: 6px !important;
        height: 32px;
        min-width: 32px;
    }

    /* 生成按钮样式 */
    .btn-primary {
        padding: 6px 12px !important;
        font-size: 14px !important;
        border-radius: 6px !important;
        height: 32px;
    }

    /* 空状态样式 */
    .empty-state {
        text-align: center;
        padding: 40px 20px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        border: 1px solid #eee;
    }

    .empty-state i {
        font-size: 48px;
        margin-bottom: 16px;
        color: #ccc;
    }

    .empty-state p {
        color: #666;
        margin: 0;
        font-size: 14px;
    }

    /* 暗色模式支持 */
    @media (prefers-color-scheme: dark) {
        body {
            background: #1a1a1a;
        }

        .h5 {
            color: #fff;
        }

        .invite-code-card {
            background: #2d2d2d;
            border-color: #3d3d3d;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }

        .code-value {
            background: #222;
            border-color: #3d3d3d;
            color: #fff;
        }

        .info-item {
            border-bottom-color: #3d3d3d;
        }

        .info-item .label {
            color: #999;
        }

        .info-item span:last-child {
            color: #fff;
        }

        .copy-btn {
            background: #2d2d2d !important;
            border-color: #3d3d3d !important;
            color: #fff !important;
        }

        .copy-btn:hover {
            background: #333 !important;
            border-color: #444 !important;
        }

        .empty-state {
            background: #2d2d2d;
            border-color: #3d3d3d;
        }

        .empty-state i {
            color: #444;
        }

        .empty-state p {
            color: #999;
        }
    }

    /* 状态标签样式 */
    .badge {
        padding: 4px 8px;
        font-size: 12px;
        font-weight: normal;
        border-radius: 4px;
        min-width: 60px;
        text-align: center;
        display: inline-block;
    }

    /* 时间列样式 */
    .table td:nth-child(4),
    .table td:nth-child(5),
    .table td:nth-child(6) {
        font-size: 13px;
        color: #666;
    }

    /* 筛选区域优化 */
    .filter-row {
        margin: 0 10px 15px;
    }
    
    .filter-row > div {
        margin-bottom: 10px;
        padding: 0 5px;
    }

    .input-group {
        margin-bottom: 0;
    }

    /* 按钮组优化 */
    .btn-group {
        gap: 5px;
        flex-wrap: nowrap;
        margin-bottom: 10px;
    }

    .btn-group .btn {
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 4px !important;
    }

    .mobile-order-card {
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        padding: 15px;
        margin-bottom: 15px;
        border: 1px solid #eee;
    }

    .mobile-order-card .order-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .mobile-order-card .order-header h5 {
        font-size: 15px;
        margin: 0;
        color: #333;
    }

    .mobile-order-card .badge {
        font-size: 12px;
        padding: 5px 10px;
        border-radius: 4px;
        width: auto;
        white-space: nowrap;
    }

    .mobile-order-card .order-info {
        margin-bottom: 15px;
    }

    .mobile-order-card .order-info div {
        margin-bottom: 8px;
        font-size: 14px;
        color: #666;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-order-card .order-info strong {
        color: #333;
        min-width: 70px;
    }

    .mobile-order-card .order-actions {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }

    .mobile-order-card .order-actions .btn {
        padding: 6px 12px;
        font-size: 14px;
        border-radius: 4px;
    }

    .mobile-order-card .dropdown-menu {
        width: auto;
        min-width: 160px;
        padding: 5px 0;
        margin-top: 5px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .mobile-order-card .dropdown-item {
        padding: 8px 15px;
        font-size: 14px;
    }

    /* 分页导航优化 */
    .pagination-container {
        padding: 15px 10px;
        background: #fff;
        border-top: 1px solid #eee;
    }

    .pagination {
        margin: 10px 0 0;
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    .pagination .page-item .page-link {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 36px;
        text-align: center;
    }

    /* 状态标签颜色优化 */
    .status-pending { 
        background-color: #ffc107;
        color: #000;
    }
    .status-confirmed { 
        background-color: #17a2b8;
        color: #fff;
    }
    .status-in_progress { 
        background-color: #007bff;
        color: #fff;
    }
    .status-completed { 
        background-color: #28a745;
        color: #fff;
    }
    .status-cancelled { 
        background-color: #dc3545;
        color: #fff;
    }

    /* 搜索框优化 */
    .input-group .form-control {
        height: 38px;
        border-radius: 4px 0 0 4px;
    }

    .input-group .btn {
        border-radius: 0 4px 4px 0;
        padding: 8px 15px;
    }

    /* Select 下拉框优化 */
    .form-select {
        height: 38px;
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 4px;
        background-position: right 8px center;
    }
}

/* 通用优化 */
.btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.form-select, .form-control {
    margin-bottom: 10px;
}

/* 加载动画优化 */
.fa-spinner {
    margin-right: 5px;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .mobile-order-card {
        background: #2d2d2d;
        border-color: #3d3d3d;
    }

    .mobile-order-card .order-header h5 {
        color: #fff;
    }

    .mobile-order-card .order-info div {
        color: #bbb;
    }

    .mobile-order-card .order-info strong {
        color: #fff;
    }

    .mobile-order-card .order-actions {
        border-top-color: #3d3d3d;
    }

    .form-select, .form-control {
        background-color: #2d2d2d;
        border-color: #3d3d3d;
        color: #fff;
    }

    .card {
        background-color: #1d1d1d;
    }

    .card-header {
        border-bottom-color: #3d3d3d;
    }

    .pagination-container {
        background-color: #2d2d2d;
        border-top-color: #3d3d3d;
    }

    .invite-code-card {
        background: #2d2d2d;
        border-color: #3d3d3d;
    }

    .invite-code-card .code-value {
        background: #1d1d1d;
        color: #bbb;
    }

    .invite-code-card .info-item {
        color: #bbb;
    }

    .invite-code-card .info-item .label {
        color: #888;
    }

    .invite-code-card .copy-btn {
        color: #888;
    }

    .invite-code-card .status-available {
        background-color: rgba(46, 125, 50, 0.2);
    }

    .invite-code-card .status-used {
        background-color: rgba(97, 97, 97, 0.2);
    }

    .invite-code-card .status-expired {
        background-color: rgba(198, 40, 40, 0.2);
    }

    .empty-state {
        color: #888;
    }

    .empty-state i {
        color: #444;
    }
}

/* Toast提示框样式 */
.copy-toast {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.3s ease, fadeOut 0.3s ease 1.2s;
    white-space: nowrap;
}

.copy-toast i {
    font-size: 14px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* PC端表格状态标签样式 */
.table .badge {
    min-width: 60px;
    text-align: center;
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: normal;
    border-radius: 4px;
} 