/* =================================================_
   Massusi Table Component Styles
   ================================================= */

.table-container {
    width: 100%;
    overflow-x: auto;
    background-color: var(--bg-card, #ffffff);
    border-radius: var(--radius-sm, 12px);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.1));
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color, #e2e8f0);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-main, #1e293b);
}

.data-table th,
.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
}

.data-table th {
    background-color: var(--bg-table-header, #f8fafc);
    font-weight: 600;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: var(--bg-table-hover, #f8fafc);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Badges & Status */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef9c3;
    color: #854d0e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #e0f2fe;
    color: #0369a1;
}

/* Table Actions Group */
.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-color, #cbd5e1);
    background-color: transparent;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: var(--primary, #0284c7);
    color: #ffffff;
    border-color: var(--primary, #0284c7);
}

/* ==========================================
   ACTION BUTTON
   ========================================== */

.action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: none;
    border-radius: 6px;

    background: transparent;
    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.btn-action svg {
    width: 17px;
    height: 17px;
    stroke-width: 2;
}

.btn-action-edit {
    color: #2563eb;
}

.btn-action-edit:hover {
    background: #eff6ff;
}

.btn-action-delete {
    color: #dc2626;
}

.btn-action-delete:hover {
    background: #fef2f2;
}

/* ==========================================
   STOK STATUS
   ========================================== */

.stok-status {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.stok-aman {
  background: #dcfce7;
  color: #166534;
}

.stok-kritis {
  background: #fef3c7;
  color: #92400e;
}

.stok-habis {
  background: #fee2e2;
  color: #991b1b;
}

.product-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-name-cell strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.product-sku {
  font-size: 0.75rem;
  color: var(--text-muted);
}