mkcart / frontend /src /components /ProductManagement.module.css
Kumar
updated
c2efbe6
.stat-card-content {
display: flex;
align-items: center;
gap: 16px;
}
.stat-icon-container {
background: var(--color-accent);
border-radius: 12px;
padding: 12px;
display: flex;
align-items: center;
justify-content: center;
}
.stat-info {
flex: 1;
}
.stat-title-text {
margin: 0;
font-weight: 700;
font-size: 1.1rem;
color: #fff;
}
.stat-value-text {
margin: 0;
font-size: 1.5rem;
font-weight: 800;
color: #fff;
}
.stat-change {
color: #10b981;
font-weight: 600;
display: flex;
align-items: center;
gap: 4px;
}
.stat-change.down {
color: #ef4444;
}
.loading-progress-indicator {
position: fixed;
top: 80px;
left: 50%;
transform: translateX(-50%);
z-index: 1000;
padding: 12px 24px;
border-radius: 12px;
background: var(--color-bg-glass);
backdrop-filter: blur(12px);
border: 1px solid var(--color-border);
box-shadow: 0 8px 32px var(--color-shadow);
}
.loading-progress-content {
display: flex;
align-items: center;
gap: 12px;
}
.loading-progress-text {
font-size: 14px;
font-weight: 600;
margin-bottom: 4px;
}
.loading-progress-bar {
width: 200px;
height: 4px;
background: rgba(255,255,255,0.1);
border-radius: 2px;
overflow: hidden;
}
.loading-progress-fill {
height: 100%;
background: linear-gradient(90deg, #3b82f6, #8b5cf6);
border-radius: 2px;
}
.modal-content-large {
max-height: 90vh;
overflow: visible;
position: relative;
z-index: 1000;
}
.modal-form-scrollable {
max-height: calc(90vh - 120px);
overflow-y: auto;
padding-right: 8px;
}
.form-section {
margin-bottom: 24px;
}
.form-section-title {
margin: 0 0 16px 0;
color: var(--color-primary);
font-size: 1.1rem;
}
.form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
.image-preview-container {
margin-top: 16px;
}
.image-preview-label {
display: block;
margin-bottom: 8px;
font-weight: 500;
}
.image-preview-grid {
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.image-preview-item {
position: relative;
width: 80px;
height: 80px;
}
.image-preview-img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 8px;
border: 2px solid var(--color-border);
}
.image-preview-img.new {
border-color: var(--color-accent);
}
.image-remove-btn {
position: absolute;
top: -8px;
right: -8px;
background: var(--color-danger);
color: white;
border: none;
border-radius: 50%;
width: 20px;
height: 20px;
font-size: 12px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.advanced-settings-summary {
cursor: pointer;
color: var(--color-primary);
font-size: 1.1rem;
font-weight: 500;
margin-bottom: 16px;
padding: 8px 0;
}
.uploading-button {
display: flex;
align-items: center;
gap: 8px;
}
.uploading-spinner {
animation: spin 1s linear infinite;
}
.product-table-header {
position: sticky;
top: 0;
z-index: 2;
background: linear-gradient(to right, #38b69df4, #191654);
backdrop-filter: blur(12px);
border-bottom: 2px solid var(--color-border);
padding: 24px 24px;
display: grid;
grid-template-columns: 1.5fr 1.4fr 1.1fr 1fr 1fr 1fr 1fr 1fr 1px;
gap: 12px;
align-items: center;
width: 100%;
color: #ffffff;
box-sizing: border-box;
}
.product-table-cell {
font-weight: 600;
display: flex !important;
justify-content: center !important;
align-items: center !important;
text-align: center !important;
box-sizing: border-box !important;
}
.product-table-cell.left {
justify-content: flex-start !important;
text-align: left !important;
}
.product-table-row {
border-bottom: 1px solid rgba(255,255,255,0.05);
padding: 20px 24px;
display: grid;
grid-template-columns: 80px 2fr 1.8fr 1.2fr 1fr 1fr 1fr 140px;
gap: 12px;
align-items: center;
opacity: 1;
position: relative;
width: 100%;
box-sizing: border-box;
}
.product-table-row .table-cell {
position: relative;
z-index: 1;
box-sizing: border-box !important;
display: flex !important;
align-items: center !important;
}
.product-table-row .actions-cell {
position: relative;
z-index: 10;
}
.product-table-row:hover {
scale: 1.01;
box-shadow: 0 4px 24px var(--color-shadow);
background: rgba(255,255,255,0.02);
transition: box-shadow 0.2s, background 0.3s;
}
.product-table-row.alternate {
background: rgba(255,255,255,0.01);
}
.product-image-cell {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.product-image-container {
width: 80px;
height: 80px;
border-radius: 16;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255,255,255,0.05);
border: 1px solid var(--color-border);
}
.product-image {
width: 100%;
height: 100%;
border-radius: 16px;
object-fit: cover;
}
.product-info-cell {
display: block;
text-align: left;
}
.product-info-content {
display: flex;
flex-direction: column;
gap: 4px;
align-items: flex-start;
justify-content: flex-start;
width: 100%;
text-align: left;
}
.product-name-text {
font-weight: 600;
font-size: 1rem;
text-align: left;
word-break: break-word;
}
.product-id-text {
font-size: 0.8rem;
opacity: 0.7;
text-align: left;
}
.seller-badge {
background: rgba(9, 61, 104, 0.588);
color: #3b82f6;
padding: 6px 12px;
border-radius: 8px;
font-size: 0.85rem;
font-weight: 600;
border: 1px solid rgba(59, 130, 246, 0.2);
display: inline-block;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
min-width: 80px;
margin: 0 auto;
width: fit-content;
}
.category-badge {
background: rgba(16, 62, 98, 0.695);
color: #ad1ecdfc;
padding: 6px 12px;
border-radius: 8px;
font-size: 0.85rem;
font-weight: 600;
border: 1px solid rgba(99, 102, 241, 0.2);
}
.category-cell {
display: flex;
justify-content: center;
min-height: 27px;
width: 100%;
height: 100%;
}
.product-image-container {
width: 60px;
height: 60px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255,255,255,0.05);
border: 1px solid var(--color-border);
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.product-image {
width: 100%;
height: 100%;
border-radius: 8px;
object-fit: cover;
}
.stock-badge {
padding: 6px 12px;
border-radius: 8px;
font-size: 0.85rem;
font-weight: 600;
text-align: center;
min-width: 60px;
display: inline-block;
width: 100%;
max-width: 80px;
}
.stock-badge.high {
background: rgba(34, 197, 94, 0.1);
color: #22c55e;
border: 1px solid rgba(34, 197, 94, 0.2);
}
.stock-badge.low {
background: rgba(245, 158, 11, 0.1);
color: #f59e0b;
border: 1px solid rgba(245, 158, 11, 0.2);
}
.stock-badge.out {
background: rgba(239, 68, 68, 0.1);
color: #ef4444;
border: 1px solid rgba(239, 68, 68, 0.2);
}
.stock-cell {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
width: 100%;
}
.rating-cell {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.actions-cell {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.seller-cell {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
overflow: hidden;
min-width: 0;
}
.price-cell {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
width: 100%;
}
.price-text {
font-weight: 700;
font-size: 1rem;
color: #10b981;
text-align: center;
width: fit-content;
padding: 4px 8px;
background: rgba(16, 185, 129, 0.05);
border-radius: 6px;
border: 1px solid rgba(16, 185, 129, 0.1);
margin: 0 auto;
}
.rating-container {
display: flex;
align-items: center;
gap: 6px;
background: rgba(251, 191, 36, 0.1);
padding: 6px 10px;
border-radius: 8;
border: 1px solid rgba(251, 191, 36, 0.2);
width: fit-content;
border-radius: 10px;
}
.rating-star {
fill: #fbbf24;
color: #fbbf24;
}
.rating-text {
font-weight: 600;
color: #fbbf24;
}
.action-buttons-container {
display: flex;
gap: 0.5rem;
align-items: center;
justify-content: center;
}
.action-button {
width: 36px;
height: 36px;
border-radius: 8px;
border: none;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s ease;
color: white;
font-size: 0.9rem;
}
.action-button.view {
background: linear-gradient(135deg, #1db8f1, #075e74);
}
.action-button.view:hover {
background: linear-gradient(135deg, #044760, #2ca0ce);
transform: scale(1.1);
}
.action-button.edit {
background: linear-gradient(135deg, #f1a522, #673802);
}
.action-button.edit:hover {
background: linear-gradient(135deg, #744c07, #dd7717);
transform: scale(1.1);
}
.action-button.delete {
background: linear-gradient(135deg, #f41a1ac5, #83161695);
}
.action-button.delete:hover {
background: linear-gradient(135deg, #771818c5, #ea1e1e95);
transform: scale(1.1);
}
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 1.5rem;
margin-top: 2rem;
padding: 1.5rem;
}
.pagination-btn {
display: flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
border-radius: 12px;
background: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.9);
border: 1px solid rgba(255, 255, 255, 0.2);
cursor: pointer;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
font-size: 1.1rem;
font-weight: 600;
}
.pagination-btn:hover:not(:disabled) {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
transform: translateY(-3px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
border-color: rgba(102, 126, 234, 0.4);
}
.pagination-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
.pagination-info {
font-weight: 600;
color: rgba(255, 255, 255, 0.9);
font-size: 1rem;
padding: 12px 20px;
background: rgba(255, 255, 255, 0.1);
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
}
.product-pagination-info {
font-weight: 600;
font-size: 1rem;
}
.product-header-column-2 {
display: flex;
gap: 12px;
align-items: flex-end;
flex-shrink: 0;
}
.user-filter-select {
min-width: 150px;
}
.Space {
margin: 10px;
}
.product-table-row-skeleton {
opacity: 0.7;
}
.product-table-cell-skeleton {
display: flex;
align-items: center;
padding: 0.5rem;
}
.order-refresh-btn {
background: rgba(59, 130, 246, 0.1);
color: #3b82f6;
border: 1px solid rgba(59, 130, 246, 0.2);
padding: 12px 16px;
border-radius: 12px;
font-size: 0.95rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 8px;
backdrop-filter: blur(10px);
}
.order-refresh-btn:hover {
background: rgba(59, 130, 246, 0.2);
border-color: rgba(59, 130, 246, 0.4);
transform: translateY(-2px);
}
.order-refresh-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
.management-content {
padding: 2rem;
min-height: 100vh;
position: relative;
}
.content-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 2rem;
gap: 2rem;
flex-wrap: wrap;
}
.order-header-column-1 {
display: flex;
flex-direction: column;
gap: 16px;
flex: 1;
min-width: 0;
}
.order-header-title-section {
display: flex;
align-items: center;
gap: 16px;
flex-wrap: wrap;
}
.order-header-title {
font-size: 1.8rem;
font-weight: 700;
margin: 0;
color: #ffffff;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.order-header-badge {
font-size: 0.85rem;
color: rgba(255, 255, 255, 0.6);
background: rgba(255, 255, 255, 0.05);
padding: 6px 12px;
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
white-space: nowrap;
}
.order-header-search-section {
display: flex;
gap: 12px;
align-items: center;
flex-wrap: wrap;
}
.search-bar {
display: flex;
align-items: center;
gap: 12px;
border: 1px solid var(--border-light);
border-radius: var(--radius-xl);
background: rgba(145, 111, 111, 0.12);
border-radius: 20px;
padding: 12px 20px;
backdrop-filter: blur(20px);
transition: all 0.3s ease;
min-width: 300px;
}
.search-bar:focus-within {
background: rgba(255, 255, 255, 0.15);
border-color: rgba(123, 133, 181, 0.5);
box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
transform: translateY(-1px);
}
.search-bar input {
background: none;
border: none;
color: #fff;
font-size: 1rem;
outline: none;
width: 100%;
font-weight: 500;
}
.search-bar input::placeholder {
color: rgba(255, 255, 255, 0.6);
font-weight: 400;
}
.add-btn {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
border-radius: 12px;
background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
color: white;
border: none;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
font-size: 0.95rem;
}
.add-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 24px var(--color-shadow);
}
.filter-select {
padding: 0.75rem 1rem;
border-radius: 12px;
background: var(--color-card-glass);
border: 1px solid var(--color-border);
color: var(--color-text);
font-size: 0.95rem;
outline: none;
cursor: pointer;
backdrop-filter: blur(10px);
transition: all 0.3s ease;
min-width: 180px;
}
.filter-select:hover {
border-color: var(--color-accent);
box-shadow: 0 4px 16px var(--color-shadow);
}
.filter-select option {
background: var(--color-card);
color: var(--color-text);
padding: 0.5rem;
}
.data-table {
background: rgba(255, 255, 255, 0.05);
border-radius: 18px;
overflow: hidden;
border: 1px solid var(--color-border);
backdrop-filter: blur(15px);
box-shadow: 0 8px 32px var(--color-shadow);
}
.table-header {
display: grid;
gap: 1rem;
padding: 1rem;
background: linear-gradient(to right, #38b69df4, #191654);
border-bottom: 1px solid var(--color-border);
font-weight: 600;
color: var(--color-text);
position: sticky;
top: 0;
z-index: 10;
backdrop-filter: blur(15px);
}
.table-cell {
display: flex;
align-items: center;
padding: 0.5rem;
font-size: 0.9rem;
}
.table-cell-left {
justify-content: flex-start;
}
.table-cell-center {
justify-content: center;
}
.table-row {
display: grid;
gap: 1rem;
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--color-border);
transition: all 0.3s ease;
align-items: center;
}
.table-row:hover {
background: rgba(255, 255, 255, 0.05);
transform: translateY(-1px);
}
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 1.5rem;
margin-top: 2rem;
padding: 1.5rem;
}
.pagination-btn {
display: flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
border-radius: 12px;
background: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.9);
border: 1px solid rgba(255, 255, 255, 0.2);
cursor: pointer;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
font-size: 1.1rem;
font-weight: 600;
}
.pagination-btn:hover:not(:disabled) {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
transform: translateY(-3px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
border-color: rgba(102, 126, 234, 0.4);
}
.pagination-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
.pagination-info {
font-weight: 600;
color: rgba(255, 255, 255, 0.9);
font-size: 1rem;
padding: 12px 20px;
background: rgba(255, 255, 255, 0.1);
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
}
.empty-state-container {
grid-column: 1 / -1;
text-align: center;
padding: 3rem 2rem;
}
.empty-state-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 1.5rem;
max-width: 400px;
margin: 0 auto;
}
.empty-state-icon {
color: var(--color-text);
opacity: 0.5;
}
.empty-state-text {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.empty-state-title {
font-size: 1.25rem;
font-weight: 600;
color: var(--color-text);
margin: 0;
}
.empty-state-subtitle {
font-size: 0.95rem;
color: var(--color-text);
opacity: 0.7;
margin: 0;
}
.empty-state-button {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
border-radius: 12px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
font-size: 0.95rem;
}
.empty-state-button.clear {
background: var(--color-card-glass);
color: var(--color-text);
border: 1px solid var(--color-border);
}
.empty-state-button.clear:hover {
background: var(--color-accent);
color: white;
}
.empty-state-button.add {
background: linear-gradient(135deg, #10b981, #059669);
color: white;
border: none;
}
.empty-state-button.add:hover {
background: linear-gradient(135deg, #059669, #047857);
transform: translateY(-2px);
}
.empty-state-button-icon {
font-size: 0.9rem;
}
.skeleton-shimmer {
width: 100%;
height: 20px;
border-radius: 6px;
background: linear-gradient(90deg,
rgba(200,200,220,0.08) 25%,
rgba(180,180,200,0.18) 50%,
rgba(200,200,220,0.08) 75%);
background-size: 800px 100%;
animation: shimmer 1.2s infinite linear;
}
@keyframes shimmer {
0% { background-position: -400px 0; }
100% { background-position: 400px 0; }
}
.count-increase-btn {
background: linear-gradient(135deg, #f59e0b, #d97706);
color: white;
border: none;
position: relative;
overflow: hidden;
}
.count-increase-btn:hover {
background: linear-gradient(135deg, #d97706, #b45309);
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}
.count-increase-btn:active {
transform: translateY(0);
}
.count-increase-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
transition: left 0.5s;
}
.count-increase-btn:hover::before {
left: 100%;
}
.count-increase-btn.loading {
background: linear-gradient(135deg, #6b7280, #4b5563);
cursor: not-allowed;
transform: none;
}
.count-increase-btn.loading::before {
display: none;
}