/* 响应式布局样式 */

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

/* 容器响应式调整 */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* 表格响应式处理 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 表单元素响应式样式 */
.form-control, .form-select, .btn {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
}

/* 卡片响应式样式 */
.card {
    margin-bottom: 1rem;
}

/* 移动端优化 */
@media (max-width: 767.98px) {
    /* 标题调整 */
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* 表格调整 */
    .table-mobile-stack th, 
    .table-mobile-stack td {
        display: block;
        width: 100%;
        text-align: left;
    }
    
    .table-mobile-stack thead {
        display: none;
    }
    
    .table-mobile-stack tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.25rem;
    }
    
    .table-mobile-stack td {
        position: relative;
        padding-left: 50%;
        border: none;
        border-bottom: 1px solid #eee;
    }
    
    .table-mobile-stack td:before {
        position: absolute;
        left: 0.75rem;
        width: 45%;
        white-space: nowrap;
        font-weight: bold;
        content: attr(data-label);
    }
    
    .table-mobile-stack td:last-child {
        border-bottom: none;
    }
    
    /* 按钮组调整 */
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 0.25rem;
        border-radius: 0.25rem !important;
    }
    
    /* 表单布局调整 */
    .form-row {
        flex-direction: column;
    }
    
    .form-row > div {
        margin-bottom: 0.5rem;
    }
    
    /* 导航栏调整 */
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    /* 页面内容边距调整 */
    .content-wrapper {
        padding: 1rem;
    }
}

/* 平板电脑优化 */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    /* 表单布局调整 */
    .form-row {
        display: flex;
        flex-wrap: wrap;
    }
    
    .form-row > div {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* 桌面电脑优化 */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    /* 表单布局调整 */
    .form-row {
        display: flex;
        flex-wrap: wrap;
    }
    
    .form-row > div {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* 大屏幕电脑优化 */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* 打印样式优化 */
@media print {
    .no-print {
        display: none !important;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    body {
        font-size: 12pt;
    }
    
    a[href]:after {
        content: none !important;
    }
}

/* 辅助类 */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 表格数据对齐 */
.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

/* 销售记录详情页面样式 */
.detail-label {
    font-weight: bold;
    color: #495057;
}

.detail-value {
    color: #212529;
}

/* 销售记录表单样式 */
.wing-options {
    padding: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
}

/* 统计卡片样式 */
.stats-card {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
}

.stats-card .card-body {
    padding: 1rem;
}

.stats-card .stats-title {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.stats-card .stats-value {
    color: #212529;
    font-size: 1.5rem;
    font-weight: bold;
}

/* 状态标签样式 */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.status-paid {
    background-color: #28a745;
    color: white;
}

.status-unpaid {
    background-color: #ffc107;
    color: #212529;
}

.status-partial {
    background-color: #17a2b8;
    color: white;
}