/* 图文广告店管理系统 - 自定义样式 */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
}

/* 统计卡片 */
.stat-card {
    border-left: 4px solid;
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}
.stat-card.border-primary { border-left-color: #0d6efd; }
.stat-card.border-success { border-left-color: #198754; }
.stat-card.border-warning { border-left-color: #ffc107; }
.stat-card.border-danger { border-left-color: #dc3545; }
.stat-card.border-info { border-left-color: #0dcaf0; }

/* 生产看板 */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}
.kanban-column {
    min-width: 280px;
    flex: 1;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
.kanban-column .column-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-bottom: 2px solid;
    border-radius: 8px 8px 0 0;
}
.kanban-column .column-header.bg-warning { border-bottom-color: #ff9800; }
.kanban-column .column-header.bg-info { border-bottom-color: #2196f3; }
.kanban-column .column-header.bg-primary { border-bottom-color: #0d6efd; }
.kanban-column .column-header.bg-success { border-bottom-color: #198754; }
.kanban-column .card {
    margin: 0.5rem;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.kanban-column .card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 图库样式 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.photo-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.photo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.photo-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.photo-card .photo-info {
    padding: 0.5rem;
}
.photo-card .photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.photo-card:hover .photo-overlay {
    display: flex;
}

/* 标签 */
.tag-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin: 0.1rem;
}

/* 产品卡片 */
.product-card {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
}
.product-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.18);
    transform: translateY(-2px);
}
.product-card.selected {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.25);
}
.product-card.selected::after {
    content: '\2713';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #198754;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    z-index: 2;
}
.product-card .product-img-wrap {
    position: relative;
    height: 70px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}
.product-card .product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.product-card:hover .product-img-wrap img {
    transform: scale(1.08);
}
.product-card .product-img-wrap .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #adb5bd;
    font-size: 1.2rem;
}
.product-card .product-price-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    z-index: 1;
}
.product-card .product-info {
    padding: 4px 5px;
    text-align: center;
}
.product-card .product-info .product-name {
    font-weight: 600;
    font-size: 0.78rem;
    color: #212529;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-card .product-info .product-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
}
.product-card .product-info .product-price {
    font-weight: 700;
    color: #dc3545;
}
.product-card .product-info .product-unit {
    color: #6c757d;
}

/* 产品分类标签 */
.category-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 14px;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}
.category-label i {
    font-size: 0.75rem;
    color: #0d6efd;
}
/* 产品分类筛选标签页 */
.product-cat-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.product-cat-tabs .cat-tab {
    border-radius: 20px;
    padding: 2px 14px;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.product-cat-tabs .cat-tab.active {
    box-shadow: 0 2px 6px rgba(13,110,253,0.25);
}

/* 登录页 */
.login-container {
    max-width: 420px;
    margin: 80px auto;
}
.login-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* 订单详情 */
.order-timeline {
    position: relative;
    padding-left: 30px;
}
.order-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}
.order-timeline .timeline-item {
    position: relative;
    padding-bottom: 1rem;
}
.order-timeline .timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0d6efd;
    border: 2px solid #fff;
}

/* 上传区域 */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: #0d6efd;
    background-color: #f0f7ff;
}
.upload-zone i {
    font-size: 3rem;
    color: #6c757d;
}

/* 表格 */
.table th {
    white-space: nowrap;
    font-weight: 600;
}
.table td {
    vertical-align: middle;
}

/* 搜索框 */
.search-box {
    position: relative;
}
.search-box .form-control {
    padding-left: 2.5rem;
}
.search-box .bi {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .kanban-board {
        flex-direction: column;
    }
    .kanban-column {
        min-width: 100%;
    }
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* 客户端底部悬浮导航（手机端） */
@media (max-width: 991.98px) {
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 56px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1030;
        border-top: 1px solid #e9ecef;
    }
    body {
        padding-bottom: 60px;
    }
}
@media (min-width: 992px) {
    .bottom-nav {
        display: none;
    }
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.7rem;
    flex: 1;
    height: 100%;
    transition: color 0.2s;
}
.bottom-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 2px;
}
.bottom-nav-item.active {
    color: #0d6efd;
}

/* ==================== 手机端全局样式 ==================== */

/* 手机端简洁顶部栏 */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
    padding: 0 12px;
    background: #0d6efd;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1020;
}
.mobile-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
}
.mobile-header-brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
}
.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mobile-header-btn {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    position: relative;
}
.mobile-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #dc3545;
    color: #fff;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 10px;
    line-height: 1;
}

/* 手机端订单卡片 */
.mobile-order-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    transition: box-shadow 0.2s;
}
.mobile-order-card:active {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #f8f9fa;
}

/* 手机端产品价格卡片 */
.mobile-product-price-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
}

/* 手机端表单优化 */
@media (max-width: 991.98px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    .card-header {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    .form-control, .form-select {
        font-size: 0.95rem;
        padding: 8px 12px;
    }
    .btn {
        font-size: 0.95rem;
    }
    h4 {
        font-size: 1.1rem;
    }
    /* 统计卡片紧凑 */
    .stat-card .card-body {
        padding: 10px;
    }
    .stat-card .h3 {
        font-size: 1.5rem;
    }
    .stat-card .text-muted {
        font-size: 0.75rem;
    }
}

/* 手机端产品卡片紧凑 */
@media (max-width: 576px) {
    .product-card .product-img-wrap {
        height: 47px;
    }
    .product-card .product-info {
        padding: 2px 3px;
    }
    .product-card .product-info .product-name {
        font-size: 0.7rem;
    }
    .product-card .product-info .product-meta {
        font-size: 0.65rem;
    }
}
