/* Modern Product Management Interface - Corporate Design */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
.products-modern-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.products-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: var(--transition);
}

.products-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Header Styles */
.products-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.products-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.products-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

.products-subtitle {
    opacity: 0.9;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* Advanced Search Section */
.advanced-search-panel {
    background: linear-gradient(to bottom, #f8fafc, white);
    border-bottom: 2px solid #e2e8f0;
    padding: 1.5rem;
}

.search-box-modern {
    position: relative;
}

.search-box-modern input {
    border-radius: 50px;
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    border: 2px solid #e2e8f0;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-box-modern input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
    outline: none;
}

.search-box-modern .search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    z-index: 10;
}

/* Filter Pills */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filters-row-modern {
    margin-bottom: 1.5rem;
}
.badge.bg-light.text-secondary {
    background: #f1f5f9 !important;
    color: #64748b !important;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(100,116,139,0.08);
}

.filter-pill {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-pill:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
    transform: translateY(-1px);
}

.filter-pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-pill .badge {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* Quick Actions Bar */
.quick-actions-bar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.quick-action-btn {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.quick-action-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: white;
}

.quick-action-btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.quick-action-btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);
    border: 2px solid #e2e8f0;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, white, #f8fafc);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.stat-card-label {
    color: var(--secondary-color);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card-icon {
    font-size: 2.5rem;
    opacity: 0.2;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Modern Table */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.table-modern thead th {
    background: var(--light-color);
    color: var(--dark-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-modern tbody tr {
    background: white;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table-modern tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.table-modern tbody td {
    padding: 1.25rem 1rem;
    border: none;
    vertical-align: middle;
}

.table-modern tbody tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.table-modern tbody tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Product Row */
.product-row-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.product-name {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1rem;
}

.product-description {
    color: var(--secondary-color);
    font-size: 0.875rem;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-quantity {
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.875rem;
}

.product-quantity.low-stock {
    background: #fef3c7;
    color: #92400e;
}

.product-quantity.normal-stock {
    background: #d1fae5;
    color: #065f46;
}

/* Category Badges */
.category-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.25rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Status Badge */
.status-badge-modern {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge-modern.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge-modern.inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.action-btn-modern {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.875rem;
}

.action-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn-view {
    background: linear-gradient(135deg, var(--info-color), #0891b2);
    color: white;
}

.action-btn-edit {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
}

.action-btn-delete {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.action-btn-transfer {
    background: linear-gradient(135deg, var(--secondary-color), #475569);
    color: white;
}

/* Timeline Visual */
.timeline-container {
    padding: 2rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.timeline-container-modern {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    margin: 1rem 0;
    min-height: 10vh;
}

.timeline-item-modern:first-child {
    margin-top: 0.5rem;
}
.timeline-item-modern {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
}
.timeline-icon-modern {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}
.timeline-content-modern {
    flex: 1;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.timeline-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: -2rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

.timeline-icon.created {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.timeline-icon.updated {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
}

.timeline-icon.deleted {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

.timeline-icon.transferred {
    background: linear-gradient(135deg, var(--info-color), #0891b2);
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-weight: 600;
    color: var(--dark-color);
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

.timeline-details {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Pagination Modern */
.pagination-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination-modern .page-btn {
    min-width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background: white;
    color: var(--dark-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.pagination-modern .page-btn:hover:not(.active):not(:disabled) {
    border-color: var(--primary-color);
    background: #eff6ff;
    transform: translateY(-2px);
}

.pagination-modern .page-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: white;
    border-color: var(--primary-color);
}

.pagination-modern .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .products-modern-container {
        padding: 1rem 0;
    }

    .products-title {
        font-size: 1.5rem;
    }

    .advanced-search-panel {
        padding: 1rem;
    }

    .quick-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-action-btn {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-modern {
        display: block;
        overflow-x: auto;
    }

    .table-modern thead {
        display: none;
    }

    .table-modern tbody tr {
        display: block;
        margin-bottom: 1rem;
        border-radius: var(--border-radius);
    }

    .table-modern tbody td {
        display: block;
        text-align: right;
        padding: 0.75rem;
        border-bottom: 1px solid #e2e8f0;
    }

    .table-modern tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--dark-color);
    }

    .table-modern tbody td:last-child {
        border-bottom: none;
    }

    .action-buttons {
        justify-content: center;
        margin-top: 0.5rem;
    }
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Tooltips */
.tooltip-modern {
    position: relative;
}

.tooltip-modern::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 0.75rem;
    background: var(--dark-color);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.tooltip-modern:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}
