/**
 * Portal Consign V2 CSS
 * Giao diện mới cho trang tìm kiếm và chi tiết đợt ký gửi
 * Tác giả: Sơn Lê
 * Ngày tạo: 2025-12-11
 */

/* ================================
   Variables
   ================================ */
:root {
    --primary-color: #e91e63;
    --primary-dark: #c2185b;
    --success-color: #10b981;
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ================================
   Search Header
   ================================ */
.consign-search-v2 .search-header {
    background: var(--bg-light);
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.search-box {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.search-icon i {
    color: #4f46e5;
    font-size: 18px;
}

.search-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.search-form .input-group {
    display: flex;
    gap: 12px;
}

.search-input {
    flex: 1;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
    outline: none;
}

.btn-search {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-search:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ================================
   Section Card
   ================================ */
.section-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.section-title i {
    color: var(--primary-color);
}

/* ================================
   Filter Dropdown
   ================================ */
.filter-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 0;
}

.filter-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    min-width: 120px;
}

.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
    outline: none;
}

/* ================================
   Batch Cards
   ================================ */
.batch-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.batch-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.batch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.batch-code {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-dark);
}

.batch-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.batch-status.status-paid {
    background: var(--success-light);
    color: var(--success-color);
}

.batch-status.status-pending {
    background: var(--warning-light);
    color: var(--warning-color);
}

.batch-card-body {
    padding: 16px 20px;
}

.batch-date {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.batch-date i {
    margin-right: 4px;
}

.batch-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.batch-stat {
    display: flex;
    flex-direction: column;
}

.batch-stat .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.batch-stat .stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.batch-stat .stat-value.text-success {
    color: var(--success-color) !important;
}

.batch-stat .stat-value.text-danger {
    color: var(--danger-color) !important;
}

.batch-card-footer {
    padding: 12px 20px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.btn-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 8px;
}

.btn-detail:hover {
    background: white;
    color: var(--primary-color);
}

/* ================================
   Payment List
   ================================ */
.payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 8px;
}

.payment-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.payment-details {
    display: flex;
    flex-direction: column;
}

.payment-date {
    font-weight: 500;
    color: var(--text-dark);
}

.payment-batch {
    font-size: 13px;
    color: var(--text-muted);
}

.payment-amount {
    text-align: right;
}

.payment-amount .amount {
    font-size: 18px;
    font-weight: 700;
}

.payment-amount .method {
    font-size: 13px;
    color: var(--text-muted);
}

/* ================================
   Empty State
   ================================ */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}

.empty-state i {
    color: #d1d5db;
}

/* ================================
   Pagination Info
   ================================ */
.pagination-info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
}

/* ================================
   Batch Detail Page
   ================================ */
.batch-detail-page {
    padding: 24px 0;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* ================================
   Summary Cards
   ================================ */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
}

.summary-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 16px;
}

.summary-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    font-size: 20px;
    flex-shrink: 0;
}

.summary-icon.icon-revenue {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: var(--success-color);
}

.summary-icon.icon-payout {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}

.summary-icon.icon-pending {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: var(--warning-color);
}

.summary-content {
    flex: 1;
}

.summary-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.summary-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.summary-value .main-value {
    font-size: 24px;
}

.summary-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ================================
   Progress Section
   ================================ */
.progress-section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-title {
    font-weight: 600;
    color: var(--text-dark);
}

.progress-stats {
    color: var(--text-muted);
    font-size: 14px;
}

.progress-bar-container {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #fb923c);
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* ================================
   Tabs Section
   ================================ */
.tabs-section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.tabs-section .nav-tabs {
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    background: var(--bg-light);
}

.tabs-section .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-weight: 500;
    padding: 16px 20px;
    border-radius: 0;
    transition: all 0.2s;
}

.tabs-section .nav-link:hover {
    color: var(--text-dark);
    background: transparent;
}

.tabs-section .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

.tab-content {
    padding: 24px;
}

/* ================================
   Products Table
   ================================ */
.store-info {
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
}

.product-table {
    width: 100%;
}

.product-table th {
    background: var(--bg-light);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
}

.product-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.product-image-cell {
    width: 60px;
}

.product-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.product-thumb-placeholder {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
}

.product-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.product-barcode {
    font-size: 12px;
}

.product-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.product-status.status-sold {
    background: var(--success-light);
    color: var(--success-color);
}

.product-status.status-available {
    background: #e0e7ff;
    color: #4f46e5;
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
    .search-form .input-group {
        flex-direction: column;
    }

    .search-input,
    .btn-search {
        width: 100%;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .batch-stats {
        grid-template-columns: 1fr;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .product-table {
        font-size: 13px;
    }

    .product-table th,
    .product-table td {
        padding: 8px 12px;
    }
}

/* ================================
   Text Colors
   ================================ */
.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}